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. 

spencer



On Wed, Jun 26, 2013 at 4:29 AM, Rich Caloggero <rjc@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@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users