Separate output channels for live_loops (or buffers)?


I sometimes think it would be a great feature, if you could direct one (or more) live_loops (or buffers) to separate outputs - as if a live_loop or a buffer was something like a track or channel.

I have no idea if that is even technically possible and also how I would use such a feature running on my Linux system (allthough I think it should be perfectly possible via Jack).

Right now I am thinking this would make it possible to

  • prelisten to a running live_loop and further more
  • you could do some post-mixing

Does anyone share this interest? And is it a feasable feature at all?

Audio out to external daw

Hi Martin
Maybe this is what you’re thinking about?

live_loop :bd do
  with_fx :sound_out, output: 1 do #Ch1 -> left
      sample :bd_haus
      sleep 1

Hi Christian,

wow, I must have repeatedly overlooked this in the documentation. Thanks for the enlightenment! Now I have only to find out how to use that …




I did manage to figure it out using Jack-Mixer to route 2 live_loops to different output channels (the wording is somehow confusing: output, channel, client, port; I did encounter all these terms while doing some research); might be of interest for someone, who wants to achieve something similar:

Strangly if I set output: 1 for the first live_loop I would expect to hear just this one (out_1 and out_2) but I don’t; I hear both loops. If I use e. g. output: 3 for one and output: 5 (as in the screenshot) for the other loop, I am able to rout its sounds to different mixer channels. But… this is a first try and I am definitely not sure if I missed something…


Hmm I wondered something similar. I think it would be an incredibly useful feature to be able to record each buffer as a separate track simultaneously. I imagine this would be hard to do. However it would mean that I could perform an improvisation, pull out each instrument separately and post process them individually (trim out any mistake) and have an amazing sounding song.


Well, it seems perfectly possible to do that, see my first attempt (and by no means final result). Though - besides other things - it does involve a setup, which depends on the OS you are using.


By default FX always pass audio to the outer context. The sound_out* FX are no exception. What they actually do is both route the audio to the specified sound card output and route the audio to be outer lexical context. In your case these end up in the same audio card output audio channels hence the confusion.

If you were to output to audio card channel 10, the audio will be heard both on 10 and on 1,2 as expected as it’s the outer FX.

To only route the audio to channel 10, you would need to supply an amp: 0 as an opt to the :sound_out FX to suppress the standard lexical output behaviour but only after the FX has routed to channel 10.

Hope this makes sense :slight_smile:

Sonic Pi at Cologne Sonoj Convention 2018

Ok, thanks! And yes, makes sense so far. I will look into it more deeply next week. (By the way: A great feature!)

1 Like

For those, who are interested: Another proof of concept: A running configuration with Sonic Pi, Nonmixer and Carla with Calf Reverb Plugin applied to one of the live_loops:

Now obviously this quickly becomes a performance issue. I do need same faster hardware …

Route Sonic Pi -> DAW
Mixing and mastering