<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi<br>
<br>
If this<br>
<br>
<tt> // calculate the next sample: phase ranges from 0 -> 1,
but sin()</tt><tt><br>
</tt><tt> // expects its input in radians. Just multiply by 2 PI
to convert it!</tt><tt><br>
</tt><tt> // We also multiply by volume so its not extremely
loud.</tt><tt><br>
</tt><tt> output[pos] = sin( self->phase * 2 * PI ) * volume;</tt><tt><br>
</tt><br>
Sends a sine wave to output (this is the standard <a
href="http://www.cplusplus.com/reference/cmath/sin/">sin</a> math
function, right?) then what would send a square wave? What would
send noise?<br>
<br>
Thanks -Phil<br>
<pre class="moz-signature" cols="72">--
Philippe "xaccrocheur" Coatmeur
<a class="moz-txt-link-freetext" href="http://bitbucket.org/xaccrocheur">http://bitbucket.org/xaccrocheur</a> / <a class="moz-txt-link-freetext" href="https://github.com/xaccrocheur">https://github.com/xaccrocheur</a>
<a class="moz-txt-link-freetext" href="http://opensimo.org/play/">http://opensimo.org/play/</a></pre>
</body>
</html>