[sdiy] Tips for writing a MIDI parser wanted

Tom Wiltshire tom at electricdruid.net
Wed Mar 25 14:45:11 CET 2009


On 25 Mar 2009, at 12:40, Seb Francis wrote:
>
> I would go along with this, but also add that you should be careful  
> not to use all the MIDI bandwidth - consider if you are outputting  
> MIDI messages in response to movement of pots, pitch bend wheels,  
> etc.  Some older MIDI gear may not keep up with sustained fast data  
> transmission, and even if this is not a problem, consider when this  
> stream of data gets merged in your sequencer with some note on/off  
> messages - then you have the strong possibility these time critical  
> messages will get delayed.
>
> For my JoyKontrol I make sure there is a gap of at least 1ms after  
> every MIDI message, so effectively it can use at most 50% of the  
> MIDI bandwidth.  This is probably still OTT in terms of information  
> density but I wanted it to have a smooth response even to very fast  
> moments of the controls (and anyway with most modern sequencers  
> there is a function to reduce down continuous controller data if  
> needed).
>
> Seb

Yes, this is important to consider. For now, it doesn't matter, since  
I'm only dealing with scanning the keyboard and sending note ons/ 
offs. These only occur when a key is pressed or released, and I'm  
assuming that physics and human limitations will mean that notes  
can't be repeated faster than 1mS, even if the keyboard were scanned  
much faster than that.

  For continuous controllers, I'd better think of a better way -  
either only scan them periodically, or only send a new MIDI message  
when the value has changed by a significant amount.

T.





More information about the Synth-diy mailing list