[sdiy] MIDI spec
Seb Francis
seb at is-uk.com
Thu Dec 5 17:57:57 CET 2002
Hi René,
René Schmitz wrote:
> Hi Seb,
>
> At 20:35 04.12.02 +0000, you wrote:
> >I agree in normal circumstances the MIDI message buffer is not needed, but when sending and handling 15CVs worth of MIDI CC messages, playing a few chords + some pitch bend, plus changing the LCD display, I can imagine the buffer could fall behind by a message or 2. And if it does it's much better that that "note off" message is 1ms late rather than dropped!
>
> Within that 1ms there could be three new messages. What are you going to do with these? Delay them for three milliseconds? Then there might be ten new messages already.... Thats all I'm saying.
>
I do agree :) But at least having a buffer gives you the chance to "catch up" with the delayed messages during quieter periods. A buffer of 16 bytes means messages could get handle up to about ~5ms late. This is, in most situations, pretty much unnoticeable .. probably an even bigger buffer would make sense if memory allowed.
>
> I see that this is only a theorectical worst case, but I think that to make it rock solid one should assume the worst case.
If the worst case is the device continuously receiving the "most expensive to process" kind of messages then I think I would have to go and buy an 18 series PIC (and programmer). So personally I have considered the worst case is that the device could sometimes receive slightly more than it can process in realtime, hence the buffer. If the buffer overflows I output an error message to the display - so far I didn't get the message to appear .. in fact I always manage to overstress Cubase VST and lock the whole computer before I get the MIDI2CV to overflow! When I finish adding all the other realtime software features I will have to see if this is still the case.
Seb
More information about the Synth-diy
mailing list