<div dir="ltr">Hey Rich,<div><br></div><div style>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. </div>
<div style><br></div><div style>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. </div>
<div><br></div><div>spencer</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 26, 2013 at 4:29 AM, Rich Caloggero <span dir="ltr"><<a href="mailto:rjc@mit.edu" target="_blank">rjc@mit.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div dir="ltr">
<div style="font-size:10pt;font-family:'Arial'">
<div>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.</div>
<div>For instance, on the sndbuff ugen:</div>
<div> </div>
<div>• .phase - ( float , READ/WRITE ) - set/get phase position ( 0-1 )</div>
<div>• .phaseOffset - ( float , READ/WRITE ) - set/get a phase offset</div>
<div> </div>
<div>Thanx much...</div><span class="HOEnZb"><font color="#888888">
<div>-- Rich</div>
<div> </div></font></span></div></div></div>
<br>_______________________________________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
<br></blockquote></div><br></div>