Hi, 
I'd need high resolution, stable timing and sleep for Win32 apps and it
seems to me the Windows multimedia timers should be used for this
purpose. So, is there already support for them or is it planned in the
future if not? I've searched various PPM reps with no luck so far. Which
timers does Time::HiRes use for Windows internally?

I've also been considering wrapping the functionality using Win32::API.
As with so many other things in Windows, though, the API for them
requires that you implement a normal Win32 callback function that gets
called when the timer fiers. Is it possible to do callbacks using
Win32::API? how much overhead does using Win32::API mean, i.e. does it
make sense to even attempt wrapping high res timing? I've casually
browsed through the Win32::API manual page but found no mention of
callbacks in the datatypes, though structs are well supported.

If all else fails, I might consider writing a wrapper in C. I'm not a
very good C coder, however, and have no idea of how the APi is like
apart from having browsed advanced PErl Programming and Perl Internals a
little. I've read Perl and C integration is much harder than in some
other langs but cannot really comment on that. Are there good tutorials
for writing C extensions, at any rate?

The background for this thing is that since I like Perl I decided to
code myself one of the first keyboard usable drum machines out there in
it, using modules like Win32:::MIDI and Win32::GUI. IN terms of timing
it means a heart beat timer for 32nd notes (from about 200 ms down to 30
ms) and a high res sleep for implementing shuffle using MIDI on the
wire. I'm using Win32::GUI::Timer and Win32::Sleep for these. For a dual
core machine with high res timers it ticks away quite steadily but does
not exactly match the tempo and timing. For an older laptop lacking
these timers, though, the timing is bad enough to be virtually unusable.
CPu usage does not appear to be the problem,

If someone happens to be interested in this project as an end user or
coder, in particular, here's a link to an early alpha version, though
the GUi code is messy and the architecture could be much better:

http://www.student.oulu.fi/~vtatila/beats_me.html

Any help appreciated. I've already asked in the Win32::GUI list so
appologies for any redundancy.

-- 
With kind regards Veli-Pekka Tätilä ([EMAIL PROTECTED])
Accessibility, game music, synthesizers and programming:
http://www.student.oulu.fi/~vtatila
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to