[chuck-users] Very Basic Question

Spencer Salazar spencer at ccrma.stanford.edu
Wed Jun 26 06:13:37 EDT 2013

Hey Rich,

For the various Osc classes (SinOsc, TriOsc, etc.) phase controls how far
along in one cycle the oscillator is. I.e., if you draw one full cycle of
the waveform on a graph, phase is the x axis [0,1] and the oscillators
output is the y axis [-1,1]. In ChucK the phase is periodically updating
every sample as the oscillator computes its value, so setting the phase
manually is more like "resetting" it.

In SndBuf its basically the same thing, except that the entire file in
memory is treated as a single cycle of a waveform. With a small enough file
you could use this for wavetable synthesis, or simply say e.g. "i want to
go to the half-way point of the file" and set phase to 0.5 (because phase
is normalized to [0,1]). phaseOffset is the same thing but offset from the
current position.


On Wed, Jun 26, 2013 at 4:29 AM, Rich Caloggero <rjc at mit.edu> wrote:

>   On several ugens, I see both a phase parameter and a phase offset
> parameter. What exactly do these mean and how would one use them.
> For instance, on the sndbuff ugen:
> • .phase - ( float , READ/WRITE ) - set/get phase position ( 0-1 )
> • .phaseOffset - ( float , READ/WRITE ) - set/get a phase offset
> Thanx much...
> -- Rich
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20130626/5393494d/attachment.html>

More information about the chuck-users mailing list