HI jamshark70, thank you very much for your super detailed explanation! So, with the benefit of your example, I now have this partially working.
I am still having a small issue that is likely due to syntax, or my method of calling ~pattern.asScore. I am using Ppar() to run two Pmono instances in parallel, like this:
(
Pdef(\scene0, Pdef(\part1,
Ppar([
Pmono(
\gransyn,
\soundBuf, ~sndbuf,
\dur, Pseq([1, 5, 4,5], 1),
\attack, Pseq([0, 0, 0, 1], 1),
\release, Pseq([0, 0, 0, 1], 1),
\posLo, Pseq([0, 0, 0, 1], 1),
\posHi, Pseq([1, 1, 1, 1], 1),
\posRateE, Pseq([0, 0, 0, 0], 1),
\posRateM, Pseq([1, 0.5, 1, 1], 1),
\posRateMLag, Pseq([0, 0, 0, 0], 1),
\posRateMCurve, Pseq([0, 0, 0, 0], 1),
\overlap, Pseq([1, 2, 1, 1], 1),
\overlapLag, Pseq([0, 2, 1, 1], 1),
\overlapCurve, Pseq([0, 0, 0, 0], 1),
\trigRate, Pseq([0, 10, 2, 2], 1),
\trigRateLag, Pseq([0, 0, 3, 3], 1),
\trigRateCurve, Pseq([0, 0, 0, 0], 1),
\rate, Pseq([1, 3, 1, 1], 1),
\rateLag, Pseq([0, 3, 2, 0], 1),
\rateCurve, Pseq([0, 0, 0, 0], 1),
\lpFreq, Pseq([20000,20000, 20000, 20000], 1),
\lpLag, Pseq([0, 0, 0, 0], 1),
\lpCurve, Pseq([0, 0, 0, 0], 1),
\hpFreq,Pseq([10, 10, 10, 10], 1),
\hpLag, Pseq([0, 0, 0, 0], 1),
\hpCurve, Pseq([0, 0, 0, 0], 1),
\amp, Pseq([0, 1, 0, 0], 1),
\ampLag, Pseq([3, 1, 1/2, 4], 1),
\ampCurve, Pseq([0, 0, 0, 0], 1),
),
Pmono(
\gransyn,
\soundBuf, ~sndbuf,
\dur, Pseq([1, 5, 4, 7], 1),
\attack, Pseq([0, 0, 0, 0], 1),
\release, Pseq([0, 0, 0, 0], 1),
\posLo, Pseq([0, 0, 0.4, 0.4], 1),
\posHi, Pseq([1, 1, 0.5, 0.5], 1),
\posRateE, Pseq([0, 0, 0, 0], 1),
\posRateM, Pseq([1, 0.5, -1, 1], 1),
\posRateMLag, Pseq([0, 0, 0, 0], 1),
\posRateMCurve, Pseq([0, 0, 0, 0], 1),
\overlap, Pseq([1, 2, 2, 3], 1),
\overlapLag, Pseq([0, 2, 0, 0], 1),
\overlapCurve, Pseq([0, 0, 0, 0], 1),
\trigRate, Pseq([0, 10, 10, 20], 1),
\trigRateLag, Pseq([0, 0, 0, 2], 1),
\trigRateCurve, Pseq([0, 0, 0, 0], 1),
\rate, Pseq([1, 1, 0.75, 0.6], 1),
\rateLag, Pseq([0, 3, 0, 0], 1),
\rateCurve, Pseq([0, 0, 0, 0], 1),
\lpFreq, Pseq([20000,20000, 2000, 1000], 1),
\lpLag, Pseq([0, 0, 3, 3], 1),
\lpCurve, Pseq([0, 0, 0, 0], 1),
\hpFreq,Pseq([10, 10, 10, 10], 1),
\hpLag, Pseq([0, 0, 0, 0], 1),
\hpCurve, Pseq([0, 0, 0, 0], 1),
\amp, Pseq([0, 1, 1, 0], 1),
\ampLag, Pseq([0, 3, 2, 3], 1),
\ampCurve, Pseq([0, 0, 0, 0.5], 1),
),
])
));
);
In this example, only the the second Pmono() stream is included in my NRT recorded audio file. For reference, my current code for recording to NRT is as follows. I use a Pdef(), Pseq(), and Pfindur() to run through the above score (which is actually in 3 parts):
(
var options;
// create new score
~score = Score.new;
// create a Buffer object for adding to the Score
~sndbuf = Buffer.new;
// for NRT rendering, the buffer messages must be added to the Score
~score.add([0, ~sndbuf.allocReadMsg(thisProcess.nowExecutingPath.dirname +/+ "voice.wav")]);
//call synthdef
Require("gransyn.scd");
// call external score
Require("score.scd");
~pattern = Pdef(\scene0, Pdef(\main,
Pseq([
//start score
Pfindur(17, Pdef(\part1)),
Pfindur(20, Pdef(\part2)),
Pfindur(22, Pdef(\part3)),
],1),
));
~pattern = ~pattern.asScore(59);
// ~score.add(~pattern);
~pattern.score.do{|e| ~score.add(e)};
// the ServerOptions for rendering the soundfile
options = ServerOptions.new.numOutputBusChannels_(2);
~score.recordNRT(
outputFilePath: "~/test.wav".standardizePath,
headerFormat: "wav",
sampleFormat: "int24",
options: options,
duration: 59,
action: { "done".postln }
);
)
Is there anything obvious I am doing here which would cause .recordNRT to record only one part of two parallel processes in my score? Thank you sincerely for your assistance!