This weekend I posted a video of a SonicPi and Volca livecoding jam where I used the new midi functions of SonicPi 3 to control my synths. In this post I describe the setup I used and explain the code a little bit.
My Volcas are connected to a midi interface (iConnect MIO10 in my case) and an audio interface (Behringer XR18) which are both connected to my linux box. I then routed the audio inputs via jack to SonicPI and started a live_loop that mixes the live audio feeds in sonic pi. In my case the volcas I used are connected to input 7,8 and 9
live_loop :audio do live_audio :in1, amp: 3, input: 7 live_audio :in2, amp: 3, input: 8 live_audio :in3, amp: 3, input: 9 sleep 1 end
then I use the new midi command to send midi note to the volcas in another live_loop the following code fragment is used to create the bass line for example
volca_bass="mio10_midi_6" root = 40 n = (ring 0,10,24,0,12,15 ) live_loop :bass do idx = tick(); if spread(5,8)[idx] then midi root+n[idx], sustain:0.125, channel:1, port: volca_bass end sleep 0.125 end
The names for the midi port can be found in the "IO"-Tab of the Prefs-Dialog.