Just saw in the Score helpfile:
The list should be in the following format, with times in ascending order.
[
[beat1, [OSCcmd1]],
[beat2, [OSCcmd2], [OSCcmd3]],
...
[beat_n, [OSCcmdn]],
[beatToEndNRT, [\c_set, 0, 0]] // finish
]
and:
.sort
sort the score time order. This is recommended to do before recordNRT or
write when you are not sure about the packet order.
I have been using Score without doing this and not noticed any problems.
i.e.:
(
~server = Server(\nrt,
options: ServerOptions()
.sampleRate_(48000)
.numOutputBusChannels_(1)
.numInputBusChannels_(0)
.memSize_(1024*1024));
~score = Score([
[0.0, ['/d_recv',
SynthDef(\note, {
var freq = \freq.kr(200);
var env = Env.perc.ar(2);
var sig = LPF.ar(Saw.ar(freq), env.linexp(0, 1, freq, freq * 5));
Out.ar(0, sig * 0.1);
}).asBytes;
]],
[2.0, [\s_new, \note, 1002, 0, 1, \freq, 300]],
[0.0, [\s_new, \note, 1000, 0, 1, \freq, 100]],
[4.0, [\s_new, \note, 1004, 0, 1, \freq, 500]],
[1.0, [\s_new, \note, 1001, 0, 1, \freq, 200]],
[3.0, [\s_new, \note, 1003, 0, 1, \freq, 400]],
]);
~score.recordNRT(
outputFilePath: "~/score_order_node.wav".standardizePath,
headerFormat: "w64",
sampleFormat: "int16",
options: ~server.options,
duration: 5,
action: { "done".postln; }
);
)
So I am curious if this is still relevant advice, at least for NRT? or, is it just relevant to make sure the SynthDefs come before the Synths?