how could i theoretically fix this?
Server.local.makeWindow
s.options.memSize = 2000000;
s.reboot;
(
SynthDef(\mysynth, {
var bufferSize = 128;
~oscs = [SinOsc, Saw, Pulse, LFSaw];
~env = Mix.new([
EnvGen.kr(Env.asr(0.1, 0.5, 0.5), 1),
EnvGen.kr(Env.perc(0.1, 1), 1)
]);
~modOsc = SinOsc.kr(freq: 1);
~filters = [LPF, BPF, HPF];
Mix.fill(bufferSize, {
~a=~filters.choose.ar(~oscs.choose.ar(
freq: TRand.kr(30, 20000, Impulse.kr(
freq: 1/60)) + ~modOsc ,
mul: SinOsc.kr(TRand.kr(0.125,8,Impulse.kr(1/60)))
* ~env*12 * SinOsc.kr(TRand.kr(0.125,8,Impulse.kr(1/10))))*(1/bufferSize),
// Multiply the output of the oscillators by 0.5
freq: TRand.kr(30,20000,Impulse.kr(1/10)).abs);
~b=~filters.choose.ar(~oscs.choose.ar(
freq: TRand.kr(30, 20000, Impulse.kr(
freq: 1/60)) + ~modOsc,
mul: SinOsc.kr(TRand.kr(0.125,8,Impulse.kr(1/60)))
* ~env*12 * SinOsc.kr(TRand.kr(0.125,8,Impulse.kr(1/10))))*(1/bufferSize),
freq: TRand.kr(30,20000,Impulse.kr(1/10)).abs);
~reverb = FreeVerb.ar(Mix.new(~a+~b), 0.5, 0.5);
~delay = DelayC.ar(~reverb, 0.5, 0.5);
~output = [~a+~b+~reverb+~delay]!2;
~output=Pan2.ar(~output, SinOsc.kr(TRand.kr(0.125,3.14,Impulse.kr(1/10)),mul:1),0.3);
Out.ar(0, ~output);
});
}).add;
)
a = Synth(\mysynth);
thank you so much
i fixed the for loop as indicated by mr @Thor_Madsen
by the way, besides crediting @Thor_Madsen and the supercollider forum community, for helping me iterating this, i should do the same for openai chatgpt
by the way, thank you @semiquaver for the extra help as well as @jamshark70
so for, it’ts fixed fixed. at least for now. i may need some further iteration so don’t close this thread yet, which may lead to the necessity of getting some extra help