Re: Karl, I need to understand your Timer!
- From: MM <kylix_is@xxxxxxxxxxx>
- Date: Tue, 16 Jun 2009 18:30:00 +0100
On Mon, 15 Jun 2009 14:01:19 +0100, "Alfie [UK]" <alfie@xxxxxxxxxxxx>
wrote:
On Sun, 14 Jun 2009 14:10:09 +0200, "Schmidt" <sss@xxxxxxxxx> wrote:
Maybe give the MMTimer-approach (-controls) a try - and
see, how the "win-message-concurrency" works out,
compared with the entirely non-satisfying DoEvents-
"workaround" you currently have.
An MMTimer is probably the best idea, as it runs in it's own thread,
and as far as I know isn't blocked by other messages like a system
timer.
As Steve McMahon mentions
http://www.vbaccelerator.com/home/vb/code/Libraries/HiResTimer/article.asp
it is better to encapsulate the MMTimer in it's own AX DLL to avoid
issues when working within the IDE.
I am at last making progress! Using a multimedia timer I have just
successfully "played" a sequence of MIDI events that kept on playing
(on Windows 98SE nota bene!) even while I moved the form. I even added
a flexgrid to the form and in Form_Load filled it with 1000 rows of
dummy data so that I could stress the CPU by scrolling up and down
while the MIDI output is in progress. Again, NO interruption!
This is still early days, because I have to work out timing based on a
tick generator (the multimedia timer) rather than Sleep(ing) for a
precise period. Basically, as far as I can make out from Paul
Messick's Maximum MIDI (written in C/C++), the tick generator
generates ticks and at each one you increment a tick counter and
compare it with the delta time of the next MIDI event pending in the
queue. If the tick counter meets or exceeds the DT, then
midiOutShortMsg for that event and reset the counter. I'll give that a
go next.
MM
.
- Follow-Ups:
- Re: Karl, I need to understand your Timer!
- From: Schmidt
- Re: Karl, I need to understand your Timer!
- References:
- Karl, I need to understand your Timer!
- From: MM
- Re: Karl, I need to understand your Timer!
- From: Schmidt
- Re: Karl, I need to understand your Timer!
- From: MM
- Re: Karl, I need to understand your Timer!
- From: Schmidt
- Re: Karl, I need to understand your Timer!
- From: MM
- Re: Karl, I need to understand your Timer!
- From: Schmidt
- Re: Karl, I need to understand your Timer!
- From: Alfie [UK]
- Karl, I need to understand your Timer!
- Prev by Date: Re: When the compiler freezes.... what is the rescue?
- Next by Date: Re: When the compiler freezes.... what is the rescue?
- Previous by thread: Re: Karl, I need to understand your Timer!
- Next by thread: Re: Karl, I need to understand your Timer!
- Index(es):
Relevant Pages
|
Loading