Sorry to answer so late, but I did not have internet access for a week (weather accident).
Thank you, I would not have found it alone … and I also understood that I could record directly on the hard drive without going through a bus.
I did a little synthesis on the recording with or without bus, for those who, like me, have trouble finding information:
// +++ RECORDING THROUGH A BUS +++
// create a 3-channels Bus on default server (s):
~busOut = Bus.audio(s,3);
// Then create 3 very simple SynthDef to produce 3 synths to record:
(
SynthDef(\sin, {|amp=0.3, freq=220|
var env, sig;
env = EnvGen.ar(Env.perc(0.01, 1), doneAction:2);
sig = SinOsc.ar(freq)envamp;
Out.ar(~busOut.subBus(0), sig); //subBus(0): first channel of Bus ~busOut
}).add;
SynthDef(\saw, {|amp=0.3, freq=330|
var env, sig;
env = EnvGen.ar(Env.perc(0.01, 1), doneAction:2);
sig = Saw.ar(freq)envamp;
Out.ar(~busOut.subBus(1), sig); //subBus(1): seconde channel of Bus ~busOut
}).add;
SynthDef(\pul, {|amp=0.3, freq=440|
var env, sig;
env = EnvGen.ar(Env.perc(0.01, 1), doneAction:2);
sig = Pulse.ar(freq)envamp;
Out.ar(~busOut.subBus(2), sig);
}).add;
)
// …and start recording (s.record(path, bus, numChannels, node, duration):
s.record("~/3channels2.aiff", ~busOut, numChannels:3);
//Then play the Synths:
(
Synth(\sin);
Synth(\saw);
Synth(\pul);
)
// stop recording
s.stopRecording;
///////////////////////////////////////////////////
//+++ RECORDING DIRECTLY TO THE HARD DRIVE +++
// check number of output bus channels on the server:
s.options.numOutputBusChannels;
// change this number if necessary:
s.options.numOutputBusChannels = 3;
// Create 3 very simple SynthDef to produce 3 synths to record:
(
SynthDef(\sin, {|amp=0.3, freq=220|
var env, sig;
env = EnvGen.ar(Env.perc(0.01, 1), doneAction:2);
sig = SinOsc.ar(freq)envamp;
Out.ar(0, sig); //channel 0
}).add;
SynthDef(\saw, {|amp=0.3, freq=330|
var env, sig;
env = EnvGen.ar(Env.perc(0.01, 1), doneAction:2);
sig = Saw.ar(freq)envamp;
Out.ar(1, sig); //channel 1
}).add;
SynthDef(\pul, {|amp=0.3, freq=440|
var env, sig;
env = EnvGen.ar(Env.perc(0.01, 1), doneAction:2);
sig = Pulse.ar(freq)envamp;
Out.ar(2, sig); //channel 2
}).add;
)
// …and start recording (s.record(path, bus, numChannels, node, duration):
s.record("~/3channels3.aiff", 0, numChannels:3);
//Then play the Synths:
(
Synth(\sin);
Synth(\saw);
Synth(\pul);
)
// stop recording
s.stopRecording;