Here’s the proof-of-concept I made a few weeks ago to receive MIDI from an external 4-channel sequencer transmitting on channels 1, 2, 3, and 11. I direct those channels to SPI’s built-in piano.
live_loop :midi_piano1 do
use_real_time
sync "/midi:mioxl_din_5:1/note_on"
synth :piano, note: ring(:d1, :e1, :f1).tick
end
live_loop :midi_piano2 do
use_real_time
sync "/midi:mioxl_din_5:2/note_on"
synth :piano, note: ring(:d3, :e3, :f3).tick
end
with_fx :echo do
live_loop :midi_piano3 do
use_real_time
sync "/midi:mioxl_din_5:3/note_on"
synth :piano, note: ring(:d4, :e4, :f4).tick
end
end
with_fx :reverb, mix: 0.9, room: 0.8 do
live_loop :midi_piano11 do
use_real_time
sync "/midi:mioxl_din_5:11/note_on"
synth :piano, note: ring(:d5, :e5, :f5).tick
end
end
Here’s MIDI note on/off being sent to the MIDI in of a software sample player on the same computer:
live_loop :horn do
midi_note_on :e2, velocity: 40, channel: 3
sleep 0.5
midi_note_off :e2, channel: 2
end
live_loop :bass do
midi_note_on :e1, velocity: 50, channel: 3
sleep 1
midi_note_off :e1, channel: 3
end