Midi Timing

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

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!

Post

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:

Code: Select all

typedef struct { 
    DWORD dwDeltaTime; 
    DWORD dwStreamID; 
    DWORD dwEvent; 
    DWORD dwParms[]; 
} MIDIEVENT; 
 

Post

I didn't know this function; will surely try it, thanks!

Post Reply

Return to “DSP and Plugin Development”