 1;

process = sawtooth(440);

--></faust-editor>
<br>
</div>
<!-- /faust-run -->

<h3 id="example-4-square-wave-generator">Example 4: Square wave generator</h3>
<p>We can also use the phase generator to produce a square wave signal:</p>
<!-- faust-run -->
<div class="faust-run"><img src="exfaust26/exfaust26.svg" class="mx-auto d-block">
<faust-editor><!--

import("stdfaust.lib");

decimalpart(x) = x-int(x);
phase(f) = f/ma.SR : (+ : decimalpart) ~ _;
squarewave(f) = (phase(f) > 0.5) * 2 - 1;

process = squ