I think it would be very useful to be able to record all orbits separately directly inside SuperCollider, without having to do a routing to a DAW. Currently I am using soundflower and reaper and it works fine but I am seeing around that other people are having trouble finding substitutes on other OS and also I think it would be more efficient to do all the work in a single environment.
Talking about this with @torotumbo and @ritchse we ended up with this piece of code provided by @ritchse. I did a few corrections but despite those it still doesn’t work on my machine (I am on macOS High Sierra). Actually everything seems fine but when I evaluate the Stop recording block I get this:
WARNING: Not recording
for each orbit.
(
// 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?fbclid=IwAR1RerxBYrBVCluqT9sXFP4rRIxQglsotz4brg641TNHplTsBfjeRsegcO8)
s.options.numBuffers = 1024 * 256; // increase this if you need to load more samples
s.options.memSize = 8192 * 32; // 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 = 2; // 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;
s.sync;
~orbs = [Bus.new()] ++ ({Bus.audio(s,2)}!11);
~dirt.start(57120, ~orbs);
//~amountOfOrbitsToRecord = 12;
// start listening on port 57120, create two busses each sending audio to channel 0
};
(
~orbs.do({
arg item, i;
if(i != 0,{~orbs[i].play();});
});
); // This code sends all orbits to your speakers. More on this at the end of the file.
~amountOfOrbitsToRecord = 12;
~rec = {Recorder.new(s)}!12;
s.latency = 0.5; // increase this if you get "late" messages
)
( // Start recording
var amountOfOrbitsToRecord = 12;
~orbs.do({
arg item, i;
if(i < amountOfOrbitsToRecord)},{
~rec[i].record(bus: ~orbs[i], numsChannels: 2,
path: "Users/admin/Music/SuperCollider Recordings/Name"++i++".aiff");
});
)
( // Stop recording
~rec.do({
arg item, i;
~rec[i].stopRecording;
});
)
// I highly recommend doing a test tone when you start recording, so synchronization gets easier.Maybe try:
{SinOsc.ar(440!2, mul: 0.4)}.play //and Ctrl+.
/*
How this works: Every orbit gets send to a different Bus. In SC the first to buses are just L+R to the speakers, but if you make new ones, those are purely logical, they are not listenable unless you explicitly send them to the main buses. That's why there's some code to make all orbits sound off your speakers. So, basically: Use orbits from 1 to 11. Do not use the '0' orbit to avoid trouble
*/
Hi! Talking with @torotumbo I ended up writing this for recording SuperDirt + physical audio inputs… not sure about globalEffects though, but I think it’s flexible enough to meet different SuperDirt setups
This is for routing different orbits to a DAW with sound flower
//install soundflower 64 channels
(
// configure the sound server: here you could add hardware specific options
// see http://doc.sccode.org/Classes/ServerOptions.html
s.options.device = "Soundflower (64ch)";
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 = 26; // 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, 16, 18, 20, 22, 24]); // 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
);