rauschendes licht
die transformation von echtzeitdaten in eine interaktive lichtskulptur
.

midiScript


Author:   wolfgang muench  
Posted: 15.05.2002; 10:17:13
Topic: midiScript
Msg #: 83 (top msg in thread)
Prev/Next: 82/84
Reads: 4565

------------------------------------**

on initMidi

if not objectP(midiXtra) then

-- openXLib "@\Xtras\MIDIio"

midiXtra=new(xtra "MIDIio" )

Register( midiXtra,registrationNummer)

Init(midiXtra)

end if

--

SetSystemFilter(midiXtra,[])

midiXtra.SetChannelFilter([#notes],0 ) -- note on/off on all channels

--

end

--------------------------------**

on MIDI_Prg_Cg ch,nr

SendMessage(midiXtra,[#programChange,(ch),(nr-1)])

end

on MIDI_Key_On ch,pitch,vel

SendMessage(midiXtra,[#noteOn,(ch),pitch,vel])

end

on MIDI_Key_Off ch,pitch

SendMessage(midiXtra,[#noteOff,(ch),pitch,0])

end

on MIDI_Volume ch, newValue

SendMessage( midiXtra,[#controlChange,(ch),7,newValue])

end

on MIDI_Set_Pan ch, newValue

SendMessage( midiXtra,[#controlChange,(ch),10,newValue])

end

on MIDI_Ch_Rev theChan,theRev

MIDI_Set_Effect theChan,theRev

end

on MIDI_Set_Effect ch, theValue

SendMessage(midiXtra,[#controlChange,(ch),91,theValue])

end on MIDI_CH_Off ch

SendMessage(midiXtra,[#allNotesOff,(ch)])

end