SynthDef , argument for output

I created an argument \ ouptputcontrol to control the output of a synthdef , on the last line of the SynthGen grap function

Somehow it ain’t working in the set message , no error in console either
Any help is appreciated

(
SynthDef (\hurry,
{       arg freq=88,detunemin=10,detunemax=200,outputvol=1;
		q=Array.fill(16,{SinOscFB.ar(freq+MouseX.kr(detunemin ,detunemax,1).rand,feedback:MouseY.kr(0.3,0.9,1))})*1/8;
		r=Splay.ar(q,4);
		t=HPF.ar(r,100);
		Out.ar(0,t)*outputvol;
}).add
)

~ward=Synth (\hurry);
~ward.free;
~ward.set(\freq,30.midicps);//midinotevalue
~ward.set(\outputvol,0.5);////not working 
~ward.set(\detunemin,100);
~ward.set(\detunemax,1000);
~ward.set(\detunemin,20);
~ward.set(\detunemax,50);
~ward.set(\detunemin,20);
~ward.set(\detunemax,150);
//////////////////////

O.K
Think I found it , in the posted example it also multiplies the bus assignment with the argument ,which is not good
This works
Or better , the code line preceding last.

Out.ar(0,t*outputvol)

It doesn’t – I’m not sure where you got that idea.

(
SynthDef(\test, { |out, mul = 1|
	Out.ar(out, DC.ar(1)) * mul
}).add;
)

a = Synth(\test, [out: 4, mul: 2]);
a.trace;

TRACE 1000  test    #units: 3
  unit 0 Control
    in 
    out 4 2
  unit 1 DC
    in  1
    out 1
  unit 2 Out
    in  4 1
    out

a.free;

Passed in 4 for out, and Out is still writing to bus 4 (with mul = 2).

For a math operation to alter the value of a UGen input, the math must be done on the input – not to the result of the UGen. You initially put the * outside of the Out, therefore it should be expected that the Out’s inputs would be unaffected.

hjh

For a math operation to alter the value of a UGen input, the math must be done on the input

You’re right