From the original SynthMaker forum (2004–2014), with its members’ names and dates.
unkargherth ·
thinking on the new MIDI Modules ( specifically MIDI split), a question arised
If midi msgs are 4 bytes long, it's obvious that i cannot run at audio sample rate ( which anyway not needed. MIDI spec sets Dta rate at max of 32kbits/second)
Then, when i need to process to or more related midi messages, How can i now the timming difference between them? How many amples run between the first and the second ( assuming midi source sent them as fast as midispec allows) ?
NothanUmber ·
You could perhaps use the midi clock ( http://www.borg.com/~jglatt/tech/midispec/clock.htm ) and the sample rate informations from the Settings-module in order to calculate how many samples passed per quarter note at the current playing speed (not sure if that's what you wanted...). The time between two arbitrary consecutive midi messages could be mesured with the aid of a timer component that has a midi in, a midi out, an int out (for the current gap in milliseconds) and a trigger out that indicates a new message. It measures the time between two messages with a timer component (WTimer) that increments a counter at each tick (the counter is reset each time a new message comes in and it's last max. value is then saved in a sample and hold module which is connected to the output) Don't know the exact frequency of the WTimer module though (even not sure if the time between two ticks is absolutely equal)
unkargherth ·
Wtimer period suposed to be 1/25 secs, but i suspect it depends on CPU load
Anyway what i meant to askk ( soory if don't exprerssed correctly) is if MIDI Msgs coming from a source sending it as fats as it can are recived on regular intervals, or at irregulars intervals , if they are buffered or not, or if they simply arrived as fast as they are received
NothanUmber ·
Hm, the transfer speed should in any case be faster than 25 messages per second so if that's the finest resolution you can measure you can assume that you'll receive more than one message per interval if your event generator is continuously creating new messages at it's full rate. The number and regulatiry of messages per interval will most likely depend on the event generator, as you already wrote only the maximum transfer rate is (approximately) mentioned by the midi-specs. That doesn't mean that every controller has to be able to send it's messages at full rate (or even a rate that constantly divides the latter one).
unkargherth ·
So then, it is safe to assume irregular, asynchronous arriving of messages?
NothanUmber ·
Jupp (at least at my understanding...)
Wrote something here? To have a post removed or your name hidden, write to [email protected].