NamedControl: inoperative spec argument

Hi,

it seems that the spec argument in a NamedControl doesn’t behave as expected…

\freq.ar(100, 0, \freq.asSpec)

has no effect when trying to send the synth’s control values between 0.0 - 1.0

\freq.ar(0.1).linexp(0.0, 1.0, 20, 20000)

works fine…

Any insight on what’s wrong here?

Many thanks!

I dug around in the source and I’m not sure but I think that the spec in a Control is used when for instance you generate a gui using Ndef.gui. In that case, SC needs to guess what range to give a slider for a Synth’s Controls. So the spec inside a SynthDef is just indicating the range and warp factor of expected input, not modifying or scaling input as the Spec for a Slider might.

Someone else here may know better but that’s my guess!

1 Like