[sdiy] MIDI bytestream parser

Neil Johnson neil.johnson97 at ntlworld.com
Wed Nov 17 00:24:53 CET 2010


Hi Tom,

> Ok, *now* I get it, thanks!

Great!

> It's a workaround for crap compilers to ensure that they produce  
> something that is a reasonable approximation to efficient code.

No, its simply a common programming method applied to processing MIDI  
messages.  Compilers and good and bad, and compilers are tuned for  
specific reasons.  It is certainly *not* a "workaround".

> Because although the point of higher level languages is the easy  
> readability and useful structures like switch, if you actually use  
> them you finish up with hideous bloatware that won't go in your  
> chip, let alone run fast and do the job in hand? Am I close?!

No, but this is an argument that has been raging on for years, and I  
don't think you really mean to open that can of worms!

> Grrr...not convinced by C. If that's the kind of stuff you have to  
> do to make things work, I'm going back to assembly language...

A pity -- there's so much to learn from studying high(er) level  
languages that would benefit programming in assembler.  But its your  
choice.  At the very least, remember that algorithms and code are not  
the same, although they are related.  If I was going to target a  
specific processor and write this in assembler, the structure and  
methods employed would look pretty similar to what I've written in  
C.  It would just be in a different representation, that's all.

Cheers,
Neil
--
http://www.njohnson.co.uk






More information about the Synth-diy mailing list