[lively-kernel] lively-kernel Digest, Vol 3, Issue 15
Jay Hardesty
jay.hardesty at gmail.com
Fri Apr 23 02:57:48 CEST 2010
>Hi, Alex -
>
>>Not sure what Chris meant, but you could generate the contents of a
>>midi file in memory, then feed those bytes (after
>><http://en.wikipedia.org/wiki/Uuencoding>uuencoding) to your
>>platform's midi player (w/ the embed tag). Here's an
>>example: <http://tinlizzie.org/ometa-js/#Etude>http://tinlizzie.org/ometa-js/#Etude
>>
>>I doubt this approach would be useful for real-time stuff like
>>making sounds come out of your keyboard morph, but it's definitely
>>worth knowing about.
>
>Definitely, and I remember getting this close once before.
>
>The real question is : Do you know if midi players allow a note to
>be started in one file and ended in another? This would allow
>key-down and key-up events to come in real time from the keyboard. I
>would make this work if the answer is yes.
>
>Thanks
> - Dan
As far as I know a MIDI player does not care where (or from which
file) a MIDI ON, or subsequent MIDI OFF message comes from.
Each is just a pair of bytes arriving from wherever.
(That is, the first byte MIDI ON event is 144 for channel 1, 145 for
channel 2. etc. up to 159 for channel 16. Second byte contains pitch
and velocity. MIDI OFF events have first byte set to 128 for channel 1
up to 143 for channel 16 etc)
More information about the lively-kernel
mailing list