FAUST (programming language): Difference between revisions

Content deleted Content added
Line 35:
 
==Example Code==
FAUST programs define a <code>process</code> function that operates on incoming data. This is analogous to the <code>main</code> function in most programming languages. The following is an example that produces silence:
<source lang=haskell>
process = 0;
</source>
The second example copies the input signal to the output signal. It involves the <code>_</code> primitive that denotes the [[identity function]] on signals:
<source lang=haskell>
process = _;
</source>
Another example convertssums a two-channel stereo signal into a one-channel mono signal using the <code>+</code> primitive that adds two signals together:
<source lang=haskell>
process = +;