Next  |  Prev  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search


A Simple Example FAUST Program

Figure 5 lists a small FAUST program specifying the constant-peak-gain resonator discussed in [10].

Figure 5: FAUST program specifying a constant-peak-gain resonator. Input parameters are resonance frequency fr (Hz), resonance bandwidth bw (Hz), and desired peak-gain g.

 
process = firpart : + ~ feedback
with {
  bw = 100; fr = 1000; g = 1; // parameters - see caption
  SR = fconstant(int fSamplingFreq, <math.h>);
  pi = 4*atan(1.0);    // circumference over diameter
  R = exp(-pi*bw/SR);  // pole radius
  A = 2*pi*fr/SR;      // pole angle (radians)
  RR = R*R;
  firpart(x) = (x - x'') * g * (1-RR)/2;
  // time-domain coefficients ASSUMING ONE-SAMPLE FEEDBACK DELAY:
  feedback(x) = 0 + 2*R*cos(A)*x - RR*x';
};

We will now study this example in a variety of ways. First we will illustrate the typical development cycle (look at the block diagram, etc.) Second, we will add a GUI and look at some of the various types of applications and plugins that can be generated from it.


Next  |  Prev  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Download aspf.pdf
[Comment on this page via email]

``Audio Signal Processing in Faust'', by Julius O. Smith III.
Copyright © 2022-05-05 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA