From: Joe E. <jo...@em...> - 2005-02-24 02:11:34
|
Jeff Weber wrote: >--- Joe Emenaker <jo...@em...> wrote: > > >>I can only think of *two* >>different ways of doing the >>conversion that aren't completely insane... >> >> >For each group of seven bytes the FCB1010 takes bit 8 >from each byte and creates and 8th byte at the end of >the group. The representation of the 8th byte is: >0, msb byte 6, msb byte 5, msb byte 4...msb byte 0 > >Make sense? > > Doh! That's one of the "insane" ways. :) After thinking about it, it's probably not all that insane. In fact, the code to to the encoding/decoding is probably tighter than the code to do it the Alesis way. The Alesis way is a little easier to draw on paper. Just take the meaningful 7 bits of the eight MIDI bytes and string them together. You now have 56 bits. Take the first 8 and that's your first "real" byte, the next 8 are your next byte, etc. So, MIDI bytes like 0x37 0x21 0x44 ... would give you a string of bits like: 0110111 0100001 1000100 ... re-grouped as 8-bit sets, you get: 01101110 10000110 00100... or... 0x6E 0x86 ... Anyhow, I'm still not convinced that each synthdriver author should have to re-write nibbilizers each time. I'm sure that there are a fixed number of ways were going to see this done in real life... and they're all going to need to be accessible to the XML driver *anyway*... so I still vote for consolidating them somewhere. - Joe |