MIDI Input with Propeller?
Hi,
I found the OBJ for Midi Input at the Parallax Obex but have no
clue how to use it to handle NoteOn, NoteOff, etc.
I'd like to use NoteOn, NoteOff, Pitchbend etc. to control
things like the Stereo Spatializer, Vocal tract etc.
Any help very appreciated!
I found the OBJ for Midi Input at the Parallax Obex but have no
clue how to use it to handle NoteOn, NoteOff, etc.
I'd like to use NoteOn, NoteOff, Pitchbend etc. to control
things like the Stereo Spatializer, Vocal tract etc.
Any help very appreciated!

Comments
Okay, thanks!
It works. I can handle the MidiOn, MidiOff and Pitchbend events. But
the Controller Change doesn't seem to work.
The Code looks something like:
CON _clkmode = xtal1 + pll16x OBJ [other OBJs] MIDI: "FullDuplexSerial" PUB main | b, runningStatus ch1note, ch2note, ch3note, ch0bend, ch0bendval, ccnum, ccval, ch0vel, ch1vel, ch2vel MIDI.start(5,4,%0000,31250) repeat ch1note := -1 ch2note := -1 ch3note := -1 if(b := MIDI.rxcheck) <> -1 if b & $80 runningStatus := b b := MIDI.rx if(runningStatus) == $B0 ' CC handling (broken?) ccnum := MIDI.rx ccval := MIDI.rx ' For some reason we must receive a 3rd dummy byte MIDI.rx if(runningStatus) == $90 ' Note on event on Midi Channel 1 ch1note := b ch1vel := MIDI.rx if ch1vel == 0 ch1note := -1 if(runningStatus) == $91 ' Note on event on Midi Channel 2 ch2note := b ch2vel := MIDI.rx if ch1vel == 0 ch2note := -1 if(runningStatus) == $92 ' Note on event on Midi Channel 3 ch3note := b ch3vel := MIDI.rx if ch3vel == 0 ch3note := -1 if(runningStatus) == $E0 ' Pitch bend event on Midi Channel 1 ch0bend := midi.rx if ch0note <> -1 (do some note on event on ch0) else (do some note off event on ch0) (do this for every channel)So Midi NoteOn+NoteOff+PitchBend for channel 1, 2 and 3 works properly,
but the propeller hangs if it receives a controller change message, if not
receiving the dummy byte. Any suggestion?
Im using this as a reference: http://museinfo.sapp.org/doc/formats/midi/
Thanks
if(runningStatus) == $B0 ' CC handling (broken?) ccnum := b ccval := MIDI.rxAndy