# Faust: Feedback

## The Feedback Operator

Feedback in Faust is implemented with the ~ operator. The left hand side of the operator declares the forward processing, whereas the right hand side contains the processing in the feedback branch. This example does not make sense in terms of audio processing but shows the application of feedback. The feedback signal is multiplied with 0.1 and simply added to the forward signal:

process = + ~ (_*0.1);


The related flow chart:

## Feedback Example

Combined with a variable delay, the feedback operator can be used to create a simple delay effect with adjustable delay time and feedback strength:

Load the example in the Faust online IDE for a quick start:

import("stdfaust.lib");

// two parameters as horizontal sliders
gain  = hslider("Gain",0, 0, 1, 0.01);
delay = hslider("Delay",0, 0, 10000, 1);

// source signal is a pulsetrain
sig = os.lf_imptrain(1);

// the processing function
process = sig : + ~ (gain * (_ ,delay : @)) ;


Contents © Henrik von Coler 2021 - Contact