I’ve been playing around with using Arduino to send midi data into Sonic Pi. Here is something I did with 3 potentiometers to play with the parameters of the bitcrusher fx. There are so many possibilities that I can see using this for: fx parameters, changing notes, random seeds, moving through arrays, subdivisions…
(Can anyone tell me what I need to do to get the video from this tweet to appear here instead of having to click on the link?)
Continuing work with #Arduino and @Sonic_Pi now up to 3 potentiometers sending midi control change data to effect bits, cutoff & sample rate for bitcrusher fx. great way to get a feel for fx capabilities pic.twitter.com/gCeTCz0eLq
— Mister Bomb (@mrbombmusic) February 18, 2018
Here’s the code:
live_loop :cutz do
use_real_time
a, bb = sync "/midi/iac_driver_bus_1/0/3/control_change"
set :cut, bb
end
live_loop :bitz do
use_real_time
c, dd = sync "/midi/iac_driver_bus_1/0/2/control_change"
set :bit, dd
end
live_loop :samp do
use_real_time
e, ff = sync "/midi/iac_driver_bus_1/0/1/control_change"
set :sam, ff
end
live_loop :octs do
use_real_time
x = get[:bit]
y = get[:cut]
z = get[:sam]
puts y," " , x," ", z*1000
with_fx :bitcrusher, bits: x, cutoff: y, sample_rate: z*1000 do
use_synth :dsaw
play (octs, :e1, 3).choose
sleep 0.25
end
end
If anyone wants to see the Arduino code, let me know and I’ll throw it up here too.
I’m interested to see if anyone else out there has played around with using sensor input to control various parameters in SPi. I realize that using a Raspberry Pi probably makes more sense, but I have more experience with Arduino and at this point, setting up my Raspberry Pi is a bit more trouble than it is worth as I have to put it away when I’m done to avoid little hands messing with it.
But I would love to see or hear about anything being down with microcontrollers.