# Multichannel routing to Ableton via Soundflower

**URL:** <https://forum.toplap.org/t/multichannel-routing-to-ableton-via-soundflower/398>\
**Category:** TidalCycles\
**Created:** [12 April 2019 21:45 UTC](https://forum.toplap.org/t/multichannel-routing-to-ableton-via-soundflower/398 "2019-04-12T21:45:07Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![oobobbypinoo](https://forum.toplap.org/user_avatar/forum.toplap.org/oobobbypinoo/32/302_2.png) [@oobobbypinoo](https://forum.toplap.org/u/oobobbypinoo)\
**Post date:** [12 April 2019 21:45 UTC](https://forum.toplap.org/t/multichannel-routing-to-ableton-via-soundflower/398/1 "2019-04-12T21:45:07Z")

</div>

Hello! I am trying (in vain) to send separate voices / tracks (d1, d2, etc…) to different output channels through Soundflower (as virtual audio interface) to Ableton to record individual tracks. I have tried a myriad of alterations in the startupcode to make this work… I keep getting this message:

WARNING: SuperDirt: event falls out of existining orbits, index (2)

Please help I’ve been trying for days… bahhhh.

---

<div class="post-metadata">

**Author:** ![yaxu](https://forum.toplap.org/user_avatar/forum.toplap.org/yaxu/32/3_2.png) [@yaxu](https://forum.toplap.org/u/yaxu)\
**Post date:** [13 April 2019 07:41 UTC](https://forum.toplap.org/t/multichannel-routing-to-ableton-via-soundflower/398/2 "2019-04-13T07:41:48Z")

</div>

Hi @oobobbypinoo,

It takes a while to click as there’s a couple of things to change to configure this.

Starting from the example: [https://github.com/musikinformatik/SuperDirt/blob/develop/superdirt\_startup.scd](https://github.com/musikinformatik/SuperDirt/blob/develop/superdirt_startup.scd)

Lets assume you want eight outputs, each one stereo (two channels each).

That’s 16 channels total, so `s.options.numOutputBusChannels` needs to be 16.

Each output is stereo, so leave this line as-is `~dirt = SuperDirt(2, s);`. You might be tempted to change it, but this is configuring the number of channels per output, _not_ the total number or channels or the number of outputs.

The final line to change is this one:

```auto
~dirt.start(57120, [0, 0]);

```

The default `[0, 0]` means two ‘orbits’, both sending to channels with no offset. I.e. both orbits go to the first two channels. You probably want eight orbits, each one offset so that they go to different pairs of channels. I.e.:

```auto
~dirt.start(57120, [0, 2, 4, 6, 8, 10, 12, 14]);

```

That’s it! You can test in tidal with e.g.:

```auto
d1 $ slow 4 $ orbit "0 1 2 3 4 5 6 7" # n "0 1 2 3 4 5 6 7" # sound "alphabet"

```

The full superdirt startup code for eight stereo outputs is shown below.

```auto
 (
// configure the sound server: here you could add hardware specific options
// see http://doc.sccode.org/Classes/ServerOptions.html

s.options.numBuffers = 1024 * 256; // increase this if you need to load more samples
s.options.memSize = 8192 * 16; // increase this if you get "alloc failed" messages
s.options.maxNodes = 1024 * 32; // increase this if you are getting drop outs and the message "too many nodes"
s.options.numOutputBusChannels = 16; // set this to your hardware output channel size, if necessary

s.options.numInputBusChannels = 2; // set this to your hardware output channel size, if necessary

// boot the server and start SuperDirt

s.waitForBoot {

~dirt = SuperDirt(2, s); // two output channels, increase if you want to pan across more channels

~dirt.loadSoundFiles; // load samples (path containing a wildcard can be passed in)

// for example: ~dirt.loadSoundFiles("/Users/myUserName/Dirt/samples/*");

// s.sync; // optionally: wait for samples to be read

~dirt.start(57120, [0, 2, 4, 6, 8, 10, 12, 14]); // start listening on port 57120, create two busses each sending audio to channel 0

// optional, needed for the sclang tests only:

(

~d1 = ~dirt.orbits[0]; // one orbit

~d2 = ~dirt.orbits[1];

);

};

s.latency = 0.3; // increase this if you get "late" messages

);

```

---

<div class="post-metadata">

**Author:** ![yaxu](https://forum.toplap.org/user_avatar/forum.toplap.org/yaxu/32/3_2.png) [@yaxu](https://forum.toplap.org/u/yaxu)\
**Post date:** [13 April 2019 07:46 UTC](https://forum.toplap.org/t/multichannel-routing-to-ableton-via-soundflower/398/3 "2019-04-13T07:46:36Z")

</div>

One thing I like to do on the Tidal side is redefine d1 … d8 so they automatically go to a different orbit. You can do that by running the following:

```auto
let d1 = p 1 . (|< orbit 0) 
    d2 = p 2 . (|< orbit 1) 
    d3 = p 3 . (|< orbit 2) 
    d4 = p 4 . (|< orbit 3) 
    d5 = p 5 . (|< orbit 4) 
    d6 = p 6 . (|< orbit 5) 
    d7 = p 7 . (|< orbit 6) 
    d8 = p 8 . (|< orbit 7) 

```

You can put that in your BootTidal.hs startup like this:

```auto
:{
let d1 = p 1 . (|< orbit 0) 
    d2 = p 2 . (|< orbit 1) 
    d3 = p 3 . (|< orbit 2) 
    d4 = p 4 . (|< orbit 3) 
    d5 = p 5 . (|< orbit 4) 
    d6 = p 6 . (|< orbit 5) 
    d7 = p 7 . (|< orbit 6) 
    d8 = p 8 . (|< orbit 7) 
:}

```

---

<div class="post-metadata">

**Author:** ![oobobbypinoo](https://forum.toplap.org/user_avatar/forum.toplap.org/oobobbypinoo/32/302_2.png) [@oobobbypinoo](https://forum.toplap.org/u/oobobbypinoo)\
**Post date:** [13 April 2019 13:50 UTC](https://forum.toplap.org/t/multichannel-routing-to-ableton-via-soundflower/398/4 "2019-04-13T13:50:21Z")

</div>

Thanks for your quick reply! Unfortunately I’m still geting the same warning message in supercollider… Something else must be wrong…

---

<div class="post-metadata">

**Author:** ![yaxu](https://forum.toplap.org/user_avatar/forum.toplap.org/yaxu/32/3_2.png) [@yaxu](https://forum.toplap.org/u/yaxu)\
**Post date:** [13 April 2019 14:10 UTC](https://forum.toplap.org/t/multichannel-routing-to-ableton-via-soundflower/398/5 "2019-04-13T14:10:41Z")

</div>

Make sure you run this instead of any other method for starting superdirt. restarting supercollider first is a good idea too

---

<div class="post-metadata">

**Author:** ![oobobbypinoo](https://forum.toplap.org/user_avatar/forum.toplap.org/oobobbypinoo/32/302_2.png) [@oobobbypinoo](https://forum.toplap.org/u/oobobbypinoo)\
**Post date:** [13 April 2019 14:14 UTC](https://forum.toplap.org/t/multichannel-routing-to-ableton-via-soundflower/398/6 "2019-04-13T14:14:44Z")

</div>

oh so instead of doing SuperDirt.start I just run :

(  
// configure the sound server: here you could add hardware specific options  
// see [http://doc.sccode.org/Classes/ServerOptions.html](http://doc.sccode.org/Classes/ServerOptions.html)

s.options.numBuffers = 1024 \* 256; // increase this if you need to load more samples  
s.options.memSize = 8192 \* 16; // increase this if you get “alloc failed” messages  
s.options.maxNodes = 1024 \* 32; // increase this if you are getting drop outs and the message “too many nodes”  
s.options.numOutputBusChannels = 16; // set this to your hardware output channel size, if necessary

s.options.numInputBusChannels = 2; // set this to your hardware output channel size, if necessary

// boot the server and start SuperDirt

s.waitForBoot {

~dirt = SuperDirt(2, s); // two output channels, increase if you want to pan across more channels

~dirt.loadSoundFiles; // load samples (path containing a wildcard can be passed in)

// for example: ~dirt.loadSoundFiles("/Users/myUserName/Dirt/samples/\*");

// s.sync; // optionally: wait for samples to be read

~dirt.start(57120, [0, 2, 4, 6, 8, 10, 12, 14]); // start listening on port 57120, create two busses each sending audio to channel 0

// optional, needed for the sclang tests only:

(

~d1 = ~dirt.orbits[0]; // one orbit

~d2 = ~dirt.orbits[1];

);

};

s.latency = 0.3; // increase this if you get “late” messages

);  
… in Supercollider? ok

---

<div class="post-metadata">

**Author:** ![oobobbypinoo](https://forum.toplap.org/user_avatar/forum.toplap.org/oobobbypinoo/32/302_2.png) [@oobobbypinoo](https://forum.toplap.org/u/oobobbypinoo)\
**Post date:** [13 April 2019 14:26 UTC](https://forum.toplap.org/t/multichannel-routing-to-ableton-via-soundflower/398/7 "2019-04-13T14:26:29Z")

</div>

Sweet! Thanks it worked! 😃🤩

---

<div class="post-metadata">

**Author:** ![tuborgman](https://forum.toplap.org/user_avatar/forum.toplap.org/tuborgman/32/500_2.png) [@tuborgman](https://forum.toplap.org/u/tuborgman)\
**Post date:** [13 April 2019 20:59 UTC](https://forum.toplap.org/t/multichannel-routing-to-ableton-via-soundflower/398/8 "2019-04-13T20:59:42Z")

</div>

Can it be configured so some outputs are stereo and some are mono (one channel)?

---

<div class="post-metadata">

**Author:** ![ovitus](https://forum.toplap.org/letter_avatar_proxy/v4/letter/o/ea5d25/32.png) [@ovitus](https://forum.toplap.org/u/ovitus)\
**Post date:** [15 April 2019 18:14 UTC](https://forum.toplap.org/t/multichannel-routing-to-ableton-via-soundflower/398/9 "2019-04-15T18:14:54Z")

</div>

Where are you supposed to place the startup configuration for Tidal?

I tried placing it:  
/home/awright/.vim/plugged/vim-tidal/BootTidal.hs

---

<div class="post-metadata">

**Author:** ![eerieear](https://forum.toplap.org/user_avatar/forum.toplap.org/eerieear/32/249_2.png) [@eerieear](https://forum.toplap.org/u/eerieear)\
**Post date:** [25 April 2019 11:04 UTC](https://forum.toplap.org/t/multichannel-routing-to-ableton-via-soundflower/398/11 "2019-04-25T11:04:40Z")

</div>

/Users/yourUser/Library/Application Support/SuperCollider/startup.scd

---

<div class="post-metadata">

**Author:** ![Enveehaa](https://forum.toplap.org/letter_avatar_proxy/v4/letter/e/e47774/32.png) [@Enveehaa](https://forum.toplap.org/u/Enveehaa)\
**Post date:** [3 November 2019 16:14 UTC](https://forum.toplap.org/t/multichannel-routing-to-ableton-via-soundflower/398/12 "2019-11-03T16:14:40Z")

</div>

Hi. I am trying the same, only on Windows 10 with Bitwig. I tried it with Jack and Loopbeaudio, but cant get it to work.  
Wish i was on mac, Soundflower (now Loopback) seems so easy. (I used to be on mac, but switched with my newly built desktop)  
I understood Supercollider can be a pain with Jack. Anyone tried Loopbeaudio?  
Thanks. 🙂

Edit. O jeez, found more: Synchronous Audio Router and Breakawayone. Will try those too

---

<div class="post-metadata">

**Author:** ![Nesso](https://forum.toplap.org/user_avatar/forum.toplap.org/nesso/32/1094_2.png) [@Nesso](https://forum.toplap.org/u/Nesso)\
**Post date:** [17 March 2020 10:05 UTC](https://forum.toplap.org/t/multichannel-routing-to-ableton-via-soundflower/398/13 "2020-03-17T10:05:14Z")

</div>

Since this method for routing orbits separately doesn’t seem to work smoothly for everyone according to their OS and other stuff, I think it should be best to find a way of recording all orbits inside SC itself, so that we don’t need to rely on soundflower or other routing systems. We were talking about this with @torotumbo and @ritchse, there is already some code for doing this, even if I couldn’t be able to make it work on my machine. I will open a discussion on the SuperCollider section since I think this could be useful for everyone.

---

<div class="post-metadata">

**Author:** ![torotumbo](https://forum.toplap.org/letter_avatar_proxy/v4/letter/t/aca169/32.png) [@torotumbo](https://forum.toplap.org/u/torotumbo)\
**Post date:** [17 March 2020 14:17 UTC](https://forum.toplap.org/t/multichannel-routing-to-ableton-via-soundflower/398/14 "2020-03-17T14:17:49Z")

</div>

I think that the aproach that @leandroyako made is interesting cause you got the SC channels recorded and then you can put them in any daw. Although you might think about directly recording supercollider channels (tidal orbits, audio in the soundcard -like hardware synths- or in -like pbindef or stuff inside supercollider-) directly to your daw (ableton, protools, reaper, whatever).

---

<div class="post-metadata">

**Author:** ![selcukartut](https://forum.toplap.org/user_avatar/forum.toplap.org/selcukartut/32/655_2.png) [@selcukartut](https://forum.toplap.org/u/selcukartut)\
**Post date:** [27 March 2020 18:37 UTC](https://forum.toplap.org/t/multichannel-routing-to-ableton-via-soundflower/398/15 "2020-03-27T18:37:30Z")

</div>

Here is a video tutorial for Mac + Soundflower combination solution with Reaper used as a DAW

---

<div class="post-metadata">

**Author:** ![tugruls](https://forum.toplap.org/user_avatar/forum.toplap.org/tugruls/32/688_2.png) [@tugruls](https://forum.toplap.org/u/tugruls)\
**Post date:** [20 April 2020 11:53 UTC](https://forum.toplap.org/t/multichannel-routing-to-ableton-via-soundflower/398/16 "2020-04-20T11:53:43Z")

</div>

Hello everyone. Routing in Windows is problematic so I decided to record as separet channels in Supercollider. I’ve changed the startup file for 6 stereo audio output, 12 in total; but when I play in tidalcycles after first three channels (after **d3** or **orbit 2** ), I am not getting any sound. Is there anyone who also facing this issue? Thank you in advance.

---

<div class="post-metadata">

**Author:** ![yaxu](https://forum.toplap.org/user_avatar/forum.toplap.org/yaxu/32/3_2.png) [@yaxu](https://forum.toplap.org/u/yaxu)\
**Post date:** [21 April 2020 11:48 UTC](https://forum.toplap.org/t/multichannel-routing-to-ableton-via-soundflower/398/17 "2020-04-21T11:48:41Z")

</div>

If you share your superdirt startup, I can have a look

---

<div class="post-metadata">

**Author:** ![tugruls](https://forum.toplap.org/user_avatar/forum.toplap.org/tugruls/32/688_2.png) [@tugruls](https://forum.toplap.org/u/tugruls)\
**Post date:** [21 April 2020 15:40 UTC](https://forum.toplap.org/t/multichannel-routing-to-ableton-via-soundflower/398/18 "2020-04-21T15:40:34Z")

</div>

Sure, thank you.

(  
s.options.numBuffers = 1024 \* 6;  
s.options.memSize = 8192 \* 16;  
s.options.maxNodes = 1024 \* 64;

```
s.options.numOutputBusChannels = 12;

s.waitForBoot{

```

~dirt = SuperDirt(2,s);  
~dirt.loadSoundFiles;  
// wait until load is done  
s.sync;

//configure your bus routes  
~dirt.start(57120, [0,2,4,6,8,10]);  
s.meter;  
s.latency = 0.0;  
}  
)

---

<div class="post-metadata">

**Author:** ![tugruls](https://forum.toplap.org/user_avatar/forum.toplap.org/tugruls/32/688_2.png) [@tugruls](https://forum.toplap.org/u/tugruls)\
**Post date:** [22 April 2020 20:23 UTC](https://forum.toplap.org/t/multichannel-routing-to-ableton-via-soundflower/398/19 "2020-04-22T20:23:29Z")

</div>

Actually I figured it out with _s.meter_ that Supercollider gets the multichannel audio as it is defined. But the most channel **default audio device** gives to Supercollider is 6 (so 3 stereo). I’ve changed the audio device the most I could have was 8 channels. I think Windows has some kind of limitations…

---

<div class="post-metadata">

**Author:** ![jamshark70](https://forum.toplap.org/letter_avatar_proxy/v4/letter/j/47e85d/32.png) [@jamshark70](https://forum.toplap.org/u/jamshark70)\
**Post date:** [24 April 2020 02:06 UTC](https://forum.toplap.org/t/multichannel-routing-to-ableton-via-soundflower/398/20 "2020-04-24T02:06:18Z")

</div>

> [@tugruls](#):
>
> s.latency = 0.0;

This doesn’t have to do with output channels, but one suggestion here: setting latency to 0 means that _every_ message to scsynth will be late.

The consequence is that scsynth can evaluate the message only at the next hardware buffer boundary. This may be acceptable if you’re using a small audio buffer size (128 or 256) but if you’re hitting performance problems and need to raise the buffer size, then you lose timing resolution of musical events.

The best for musical timing is to set latency to hardware buffer latency + a small amount to account for network transmission – if the hardware buffer is 256 samples, 256/44100 = 0.0058, plus 10-20 ms for network, so `s.latency = 0.02` or so.

If you really want “as soon as possible,” `s.latency = nil` may be better (but events’ timing relative to each other will suffer).

hjh

---

<div class="post-metadata">

**Author:** ![yaxu](https://forum.toplap.org/user_avatar/forum.toplap.org/yaxu/32/3_2.png) [@yaxu](https://forum.toplap.org/u/yaxu)\
**Post date:** [24 April 2020 21:02 UTC](https://forum.toplap.org/t/multichannel-routing-to-ableton-via-soundflower/398/21 "2020-04-24T21:02:26Z")

</div>

I’ve not noticed that `s.latency` has any effect. My guess is that because tidal sends trigger messages to `sclang` ahead of time according to its (tidal’s) own latency setting, sclang passes this onwards to superdirt ahead of time regardless of what s.latency says.

[Next page](https://forum.toplap.org/t/multichannel-routing-to-ableton-via-soundflower/398.md?page=2)
