Hi there,
I’m still discovering sound synthesis, and SC is awesome for this, as you have a direct correlation between mathematical operations and sound output, without having a GUI abstraction hiding the hard part.
Since I don’t know much, I use the plot function to understand what does what, for example I discovered by myself this soft distortion :
{ SinOsc.ar( 440, mul: pi ).tanh }.plot
So far so good. But when composing, it becomes really convenient to use SynthDefs, with tons of parameters. I’d like to be able to compare different parameters settings quickly, like this :
Synth( \mySynth, [ \freq, 220, \modIndex, 4, \overlap, 0.5 ] ).plot;
Synth( \mySynth, [ \freq, 440, \modIndex, 16, \overlap, 1 ] ).plot;
Obviously, this is not working…
I think it’s because Synth() is not a UGen, it’s kind of a message from sclang to scsynth telling 'yo ! play this note !".
But what confuses me is that the function in the first example is not a ‘real’ UGen either…
{ SinOsc.ar( 440, mul: pi ).tanh }.inspect
results in < closed FunctionDef > . I have the feeling it’s implicitly converted as a UGen representation, but I don’t know where I can find more information about this process. So if you have a clue about this, please can you help me find where I can find out what’s going on.
Then, the main question. The plot method documentation says it’s supposed to work primarily on Arrayed Collection, but also works on other classes, including Function, Bus, Env, Buffer, SoundFile, Wavetable.
So I supposed the best way to plot the result of the Synth() call was to output it’s sound to a Buffer, then to call plot on the result, but it seems inelegant and adds a lot of extra steps to the process. I was wondering if there was an easier way to achieve this ?
Many thanks, D.