Hi Josh!
thank you for the reply and sorry for the delay, it took me some time to simplify the problem to an example.
I have a synthdef that is controlled by 18 envelopes. when the envelopes have many control points I cannot render the score. To illustrate the issue i just placed 18 SinOsc inside a synthdef that are controlled by 18 envelopes.
(
~size={rrand(200,500)}! 28131;
~time=Array.new;
~time4Env=Array.new;
~size.size.do({|i,index|
~time=~time.add( rrand(1,20.0));
~time4Env=~time4Env.add( rrand(0.0001,20))});
~time4Env.sort;
)
(
var pnotes, group, playsin;
var score, now;
var options;
options = ServerOptions.new
.numOutputBusChannels_(2)
.numInputBusChannels_(2)
.memSize_((32768 * 60).nextPowerOfTwo)
.maxNodes_((32768 * 90).nextPowerOfTwo)
.blockSize_((32/2).nextPowerOfTwo)
.numControlBusChannels_((~size.size * 60).nextPowerOfTwo);
s.options = options;
s.newAllocators;
score = CtkScore.new;
pnotes = CtkProtoNotes(
SynthDef(\sin, {arg buffer, freq= 1, freq1= 1,freq2= 1,freq3= 1,freq4= 1,freq5= 1,freq6= 1,freq7= 1,freq8= 1,freq9= 1,freq10= 1,freq11= 1,freq12= 1,freq13= 1,freq14= 1,freq15= 1,freq16= 1,freq17= 1,freq18= 1,amp,pan,outbus,duration;
var envperc=EnvGen.kr(Env.sine(duration, 1));
OffsetOut.ar(0,
Pan2.ar(
((SinOsc.ar(freq, mul: amp)+SinOsc.ar(freq1, mul: amp)+SinOsc.ar(freq2, mul: amp)+SinOsc.ar(freq3, mul: amp)+SinOsc.ar(freq4, mul: amp)+SinOsc.ar(freq5, mul: amp)+SinOsc.ar(freq6, mul: amp)+SinOsc.ar(freq7, mul: amp)+SinOsc.ar(freq8, mul: amp)+SinOsc.ar(freq9, mul: amp)+SinOsc.ar(freq10, mul: amp)+SinOsc.ar(freq11, mul: amp)+SinOsc.ar(freq12, mul: amp)+SinOsc.ar(freq13, mul: amp)+SinOsc.ar(freq14, mul: amp)+SinOsc.ar(freq15, mul: amp)+SinOsc.ar(freq16, mul: amp)+SinOsc.ar(freq17, mul: amp)+SinOsc.ar(freq18, mul: amp))/18) * envperc * 0.2, pan));
}).load(s)
);
playsin= {arg starttime, duration, freqenv,freqenv1,freqenv2,freqenv3,freqenv4,freqenv5,freqenv6,freqenv7,freqenv8,freqenv9,freqenv10,freqenv11,freqenv12,freqenv13,freqenv14,freqenv15,freqenv16,freqenv17,freqenv18,ampenv, panenv,buss;
var note, now, ratio, rate;
pnotes[\sin].note(starttime,duration)
.freq_(CtkControl.env(freqenv))
.freq1_(CtkControl.env(freqenv1))
.freq2_(CtkControl.env(freqenv2))
.freq3_(CtkControl.env(freqenv3))
.freq4_(CtkControl.env(freqenv4))
.freq5_(CtkControl.env(freqenv5))
.freq6_(CtkControl.env(freqenv6))
.freq7_(CtkControl.env(freqenv7))
.freq8_(CtkControl.env(freqenv8))
.freq9_(CtkControl.env(freqenv9))
.freq10_(CtkControl.env(freqenv10))
.freq11_(CtkControl.env(freqenv11))
.freq12_(CtkControl.env(freqenv12))
.freq13_(CtkControl.env(freqenv13))
.freq14_(CtkControl.env(freqenv14))
.freq15_(CtkControl.env(freqenv15))
.freq16_(CtkControl.env(freqenv16))
.freq17_(CtkControl.env(freqenv17))
.freq18_(CtkControl.env(freqenv18))
.amp_(CtkControl.env(ampenv))
.pan_(CtkControl.env(panenv))
.outbus_(buss)
.duration_(duration)
.addTo(score);
};
~size.do({|i,index|
var size=i;
var time=({rrand(0.1,1.0)}!(size-1));
var timesum= (time.sum );
var start=(~time4Env[index]);
var freqenv = Env(((({rrand(300,1000.0)}!(size)))),time,\lin);
var freqenv1 = Env(((({rrand(300,1000.0)}!(size)))),time,\lin);
var freqenv2 = Env(((({rrand(300,1000.0)}!(size)))),time,\lin);
var freqenv3 = Env(((({rrand(300,1000.0)}!(size)))),time,\lin);
var freqenv4 = Env(((({rrand(300,1000.0)}!(size)))),time,\lin);
var freqenv5 = Env(((({rrand(300,1000.0)}!(size)))),time,\lin);
var freqenv6 = Env(((({rrand(300,1000.0)}!(size)))),time,\lin);
var freqenv7 = Env(((({rrand(300,1000.0)}!(size)))),time,\lin);
var freqenv8 = Env(((({rrand(300,1000.0)}!(size)))),time,\lin);
var freqenv9 = Env(((({rrand(300,1000.0)}!(size)))),time,\lin);
var freqenv10 = Env(((({rrand(300,1000.0)}!(size)))),time,\lin);
var freqenv11 = Env(((({rrand(300,1000.0)}!(size)))),time,\lin);
var freqenv12 = Env(((({rrand(300,1000.0)}!(size)))),time,\lin);
var freqenv13 = Env(((({rrand(300,1000.0)}!(size)))),time,\lin);
var freqenv14 = Env(((({rrand(300,1000.0)}!(size)))),time,\lin);
var freqenv15 = Env(((({rrand(300,1000.0)}!(size)))),time,\lin);
var freqenv16 = Env(((({rrand(300,1000.0)}!(size)))),time,\lin);
var freqenv17 = Env(((({rrand(300,1000.0)}!(size)))),time,\lin);
var freqenv18 = Env(((({rrand(300,1000.0)}!(size)))),time,\lin);
var ampenv = Env(((({rrand(0.001,1.0)}!(size))/10)),time,\sin);
var panenv = Env((({rrand(-1.0,1.0)}!(size))),time,\sin);
playsin.value(start, timesum, freqenv,freqenv1,freqenv2,freqenv3,freqenv4,freqenv5,freqenv6,freqenv7,freqenv8,freqenv9,freqenv10,freqenv11,freqenv12,freqenv13,freqenv14,freqenv15,freqenv16,freqenv17,freqenv18, ampenv, panenv);
});
score.write("~/Desktop/nrt_test.aiff".standardizePath, sampleRate:44100, sampleFormat:"float", options: options);
)
Hope this will demonstrate the issue, if not let me know what other information you would like me to post.
Thank you!!
PS: Around 1-2 years ago, you had helped me with some NRT CTK issues and I wanted to say that I am really grateful for your help ( to show the problem i am having now, I did a variation of a previous code you had posted)!!