FAUST (programming Language) - Simple Examples

Simple Examples

Let’s start with some really simple one-line examples of FAUST program. Here is a first example that produces silence:

process = 0;

The second example is a little bit more sophisticated and copies the input signal to the output signal. It involves the _ (underscore) primitive that denotes the identity function on signals (that is a simple audio cable for a sound engineer):

process = _;

Another very simple example is the conversion of a two-channel stereo signal into a one-channel mono signal using the + primitive that adds two signals together:

process = +;

Most FAUST primitives are analogue to their C counterpart on numbers, but lifted to signals. For example the FAUST primitive sin operates on a signal X by applying the C function sin to each sample X(t) of X. In other words sin transforms an input signal X into an output signal Y such that Y (t) = sin(X(t)). All C numerical functions have their counterpart in FAUST. Some signal processing primitives are specific to FAUST. For example the delay operator @ takes two input signals: X (the signal to be delayed) and D (the delay to be applied), and produces an output signal Y such that Y (t) = X(t − D(t)).

Read more about this topic:  FAUST (programming Language)

Famous quotes containing the words simple and/or examples:

    It is a curious emotion, this certain homesickness I have in mind. With Americans, it is a national trait, as native to us as the rollercoaster or the jukebox. It is no simple longing for the home town or country of our birth. The emotion is Janus-faced: we are torn between a nostalgia for the familiar and an urge for the foreign and strange. As often as not, we are homesick most for the places we have never known.
    Carson McCullers (1917–1967)

    In the examples that I here bring in of what I have [read], heard, done or said, I have refrained from daring to alter even the smallest and most indifferent circumstances. My conscience falsifies not an iota; for my knowledge I cannot answer.
    Michel de Montaigne (1533–1592)