I've noticed there are quite a few soft-developers here.
I'm developing some Midi Sequencer and was wondering if there's a better way to have an absolutely correct midi-timing then by using the Multimedia timer (Windows API TimeSetEvent) in a new Thread?
(This timer has a resolution of minimum 1 ms) What do people use when they have p.e. 768PPQ / 300BPM???
Any advice much appreciated!
Midi Timing
-
- KVRian
- 922 posts since 26 Mar, 2003 from Guildford, England
Not completely sure, but after a bit of a dig, looks like you can get the system to use a buffered output, with midi events occuring with an offset into the buffer.
look for 'MidiStreamOut'.
There is a
MIDIEVENT struct:
look for 'MidiStreamOut'.
There is a
MIDIEVENT struct:
Code: Select all
typedef struct {
DWORD dwDeltaTime;
DWORD dwStreamID;
DWORD dwEvent;
DWORD dwParms[];
} MIDIEVENT;