[question] - supercollider synthesis definition not working

I’m not sure why you are inheriting from StandingWaves. You probably don’t need to do that. You also just need to return the signal at the bottom:

TMM88 {
	*ar {
	~num = 100;
	// var num = 256; // very cpu heavy, maybe not sonically more interesting?
	// var num = 10; // really cool!
	~dur = 1/60;
	// var dur = 1/6; // more action
	~sig = ~num.collect{
		~freq = rrand(30, 5000) * SinOsc.kr(LFNoise1.kr(~dur/6).range(30, 1000), 0, LFNoise1.kr(~dur).range(0.01, 8)).midiratio;
		~sig = Select.ar(LFNoise0.kr(~dur).range(0, 2).round, [SinOsc.ar(~freq, 0, 0.1), Saw.ar(~freq, 0.1), Pulse.ar(~freq, 0, 0.1)]);
		~filtFreq = rrand(30, 1000) * LFNoise1.kr(~dur).range(1.0, 5.0);
		~filt = Select.ar(LFNoise0.kr(~dur).range(0, 2).round, [LPF.ar(~sig, ~filtFreq), HPF.ar(~sig, ~filtFreq), BPF.ar(~sig, ~filtFreq)]);
		~dly = CombL.ar(~sig, 0.5, LFNoise1.kr(~dur/6).range(0.02, 0.5), rrand(0.3, 2));
		~dly
	};
	~sig = Splay.ar(~sig); // nb! levelComp: true, so if removed signal will be extremely loud!
	~sig = FreeVerb2.ar(~sig[0], ~sig[1], LFNoise1.kr(~dur).range(0, 1.0), LFNoise1.kr(~dur * 3).range(0.2, 2));
	^~sig
	}
}

Sam

MethastasickSound1 {
	*ar {
	~num = 100;
	// var num = 256; // very cpu heavy, maybe not sonically more interesting?
	// var num = 10; // really cool!
	~dur = 1/60;
	// var dur = 1/6; // more action
	~sig = ~num.collect{
		~freq = rrand(30, 5000) * SinOsc.kr(LFNoise1.kr(~dur/6).range(30, 1000), 0, LFNoise1.kr(~dur).range(0.01, 8)).midiratio;
		~sig = Select.ar(LFNoise0.kr(~dur).range(0, 2).round, [SinOsc.ar(~freq, 0, 0.1), Saw.ar(~freq, 0.1), Pulse.ar(~freq, 0, 0.1)]);
		~filtFreq = rrand(30, 1000) * LFNoise1.kr(~dur).range(1.0, 5.0);
		~filt = Select.ar(LFNoise0.kr(~dur).range(0, 2).round, [LPF.ar(~sig, ~filtFreq), HPF.ar(~sig, ~filtFreq), BPF.ar(~sig, ~filtFreq)]);
		~dly = CombL.ar(~sig, 0.5, LFNoise1.kr(~dur/6).range(0.02, 0.5), rrand(0.3, 2));
		~dly
	};
	~sig = Splay.ar(~sig); // nb! levelComp: true, so if removed signal will be extremely loud!
	~sig = FreeVerb2.ar(~sig[0], ~sig[1], LFNoise1.kr(~dur).range(0, 1.0), LFNoise1.kr(~dur * 3).range(0.2, 2));
	^~sig
	}
}

here’s how i solved it. seems to work. thank you @Sam_Pluta say hi to evan peter and joel

something to keep in mind. you definitely don’t want to use Environment varaibles like you are using:

~dur = 5;
{MethastasickSound1.ar}.play
~dur.postln;

~dur gets changed inside the Methastasick block box. not so good.

so, i would declare all your variables inside the *ar{} method.

Sam

I am not sure it makes much sense to turn the function I posted into a class, in it its ‘default’ setting you would pretty much be able to run 1 instance and then nothing else before running out of system resources. Why not just keep it a function or turn it into a SynthDef?

because then it becomes easier to map these things into NDefs, and Classes Hierarchically to achieve some opensoundcontrol mapping and that sort of thing