First test at trying to control the music with MIDI. This controls the cutoff with a knob on the controller:
use_bpm 100 co = 0 #cutoff live_loop "starp" do with_synth :dpulse do with_fx :reverb, room: 0.8 do play_pattern_timed [:c4, :e4, :g4, :b4, :c5, :b4, :g4, :e4], [0.25], attack: 0.1, release: 0.25, cutoff: co end end end loop do ctrl, co = sync "/midi/mpkmini2/0/1/control_change" end
The first thing I’ve noticed is that the cutoff value doesn’t change until the next iteration of the play_pattern_timed, which isn’t exactly what I want, suppose that I could change it to 8 individual plays and sleeps.
Any other pointers?
EDIT: oops, should point out that this is not my composition. Y’all probably recognize it right off.