Arguments to SinOsc (and some other UGens?)

I found this:
´´´
sines = SinOsc.ar(freqs +.t [0.55,0.6]).cubed.sum;
´´´
in one of the example codes in the documentation. I could for the life of me not figure out what the “+.t” meant. Couldn’t find any explanation in the documentation and google was not my friend this time. The only hint I got was from chat.GPT (!):

"In SuperCollider, SinOsc is a type of oscillator that generates a sine wave. The freqs argument determines the frequency of the sine wave. The +.t notation indicates that the freqs value should be interpreted as a time-varying signal.

For example, if you define freqs as an EnvGen object with an envelope that sweeps from a low frequency to a high frequency over a certain period of time, the SinOsc will sweep through the frequencies specified by the envelope. If you used the SinOsc without the +.t notation, the oscillator would use a constant frequency instead of a time-varying signal."

Are there any sources one can check to get some more insight into this notation/way of using SinOsc?

Yours, Amit

They are called operators adverbs. You’d have to look at some of the more abstract help documentation to have found it my yourself.

https://doc.sccode.org/Reference/Adverbs.html

1 Like

So the explanation by ChatGPT is completely bogus :smiley:

When isn’t it?

Post must be at least 20 characters

Thanks! Makes sense. The resulting sound is slowly meandering in a way that one would expect given twhat “+.t” does.

No.

The resulting sound is slowly meandering because of the UGens that had been assigned to freqs.

If, in a SynthDef, you declare a variable freqs and assign to it a UGen, or array of UGens, whose value is slowly meandering, and use this as the frequency input to an oscillator with or without +.t, then the oscillator’s output will be time varying.

var freqs = Array.fill(5, { LFDNoise3.kr(Rand(0.5, 1.0)).exprange(200, 400) });

var timeVarying = SinOsc.ar(freqs);

var alsoTimeVarying = SinOsc.ar(freqs +.t [0, 0.55, 0.6]);

But wait… didn’t ChatGPT say “If you used the SinOsc without the +.t notation, the oscillator would use a constant frequency instead of a time-varying signal”?

It did. But this is 100% completely, absolutely, totally wrong.

It’s garbage.

Do not believe it.

Do not conclude that the time-varying characteristics of the signal is because of +.t in any way.

If you take a time-varying frequency and add a constant offset to it, then you get… a time-varying frequency. The addition operation has not changed whether it is time-varying or not.

hjh

1 Like