aUCBLogo Demos and Tests / miditest
to miditest
for [i 0 MidiCountDevices-1]
[ print MidiDeviceInfo i
]
MidiOpen 0
ignore
[ MidiProgramChange 0 117
MidiNoteOn 0 50 127
; waitMS 300
MidiNoteOff 0 60 127
]
;stop
ignore
[
MidiNoteOn 0 60 127
MidiNoteOn 1 64 127
MidiNoteOn 2 67 127
waitMS 500
MidiNoteOff 0 60 127
MidiNoteOff 1 64 127
MidiNoteOff 2 67 127
waitMS 200
MidiProgramChange 0 16
MidiMessage (list 144 60 127 144+1 64 127 144+2 67 127)
waitMS 200
MidiAllSoundsOff
]
MidiProgramChange 0 81
ignore
[
for [j 40 48 4]
[ MidiNoteOn 0 j 64
for [i 0 10 0.1]
[ MidiMessage (list 224 mod Int 127*128*i/10 127 Int 127+127*i/10)
waitMS 20
]
MidiNoteOff 0 j 127
]
]
;stop
note=0
for [i 40 60 0.04]
[ lastnote=note
note=4*Int i/4
if note != lastnote
[ MidiNoteOff 0 lastnote 0
MidiNoteOn 0 note 64
]
MidiMessage (list 224 0 Int 127+127*(mod i 4)/4)
waitMS 20
]
MidiAllSoundsOff
MidiClose
end