Thirty-four ready-made patches from the FAUST demo library, each one instantiable in a single line. The fastest way to hear what an algorithm sounds like before committing to it.
1. Using a demo
A demo is an ordinary UGen. Instantiate it, turn it into a DSP, open its interface:
"A complete virtual-analogue oscillator with a full control panel"
demo := Virtual_Analog_Oscillator_Demo new.
dsp := demo asDsp.
dsp init.
dsp start.
dsp displayUI.
dsp stop.
dsp destroy.
Demos come from FAUST's demos.lib, which packages each algorithm together with a
complete, sensibly ranged set of controls. That is their value: no wiring, no guessing at
parameter ranges.
1.1 Mono, stereo and generators
The superclass tells you what a demo expects:
| Superclass | Meaning |
|---|---|
| PhDemos | A generator or analyser — needs no input |
| PhDemosMono | An effect taking one channel of input |
| PhDemosStereo | An effect taking two channels of input |
"Effects need something to process"
voice := SawOsc new => ADSREnv new.
"Mono effect"
dsp := (voice => Moog_Vcf_Demo new) stereo asDsp.
"Stereo effect — widen before, not after"
dsp := (voice stereo => Freeverb_Demo new) asDsp.
1.2 Finding the controls
Demos use nested FAUST groups, so their parameter names are paths rather than simple
labels — something like 'Freeverb/0x00/RoomSize'. Do not try to construct
these:
dsp traceAllParams. "copy the names exactly as printed"
displayUI is almost always the better route — the generated panel
is laid out the way the algorithm's author intended, with the controls grouped
meaningfully. Reach for setValue:parameter: only once you know what you want
to automate.
2. Generators and analysis
These need no input — instantiate and play.
| Class | Demonstrates |
|---|---|
| Virtual_Analog_Oscillator_Demo | A full virtual-analogue oscillator section with several waveforms |
| Sawtooth_Demo | Sawtooth generation methods compared |
| Twin_Osc_Demo | Two detuned oscillators |
| Oscrs_Demo | Resonant oscillator bank |
| Colored_Noise_Demo | Noise with adjustable spectral tilt |
| Velvet_Noise_Demo | Velvet noise — sparse impulses, used in reverb design |
| Envelopes_Demo | The envelope generators side by side |
| Latch_Demo | Sample-and-hold behaviour |
| Fft_Spectral_Level_demo | FFT spectral level analysis and display |
3. Mono effects
These take one channel of input.
| Class | Demonstrates |
|---|---|
| Moog_Vcf_Demo | The Moog voltage-controlled filter |
| Wah4_Demo | Four-pole wah |
| CryBaby_Demo | The Cry Baby wah pedal model |
| Parametric_Eq_Demo | Parametric equaliser |
| Spectral_Tilt_Demo | Tilting the whole spectrum around a pivot |
| FilterBank_Demo | A bank of band filters |
| Vocoder_Demo | Channel vocoder |
| Cubicnl_Demo | Cubic nonlinear distortion |
| Exciter_Demo | Harmonic exciter — adds high-frequency content |
| Reverse_Echo_Demo | Reversed echo |
| PosPass_Demo | Positional pass filtering |
traceAllParams for which input is which.
4. Stereo effects and reverbs
These take two channels. Send stereo to the source first.
| Class | Demonstrates |
|---|---|
| Freeverb_Demo | Freeverb — the classic Schroeder–Moorer reverb |
| ZitaRev1 | Zita-Rev1, a high-quality FDN reverberator |
| ZitaLight | A lighter-weight Zita configuration |
| JpRev_Demo | JPverb — long, lush ambient reverb |
| Dattorro_Rev_Demo | The Dattorro plate reverb |
| GreyHole_Demo | Greyhole — diffuse, pitch-shifting, unpredictable |
| ReverbTank_Demo | Spring-tank style reverb |
| KbRomRev1 | A room reverberator |
| PhVitalRev_Demo | Reverb modelled on the Vital synthesiser's |
| Flanger_Demo | Stereo flanger |
| Phaser2_Demo | Stereo phaser |
| TapeStop_Demo | Tape-stop effect — pitch and speed falling to a halt |
| Compressor_Demo | Stereo compressor with metering |
| Gate_Demo | Stereo noise gate |
Several of these have direct UGen equivalents — ZitaRevStereo,
DattorroRev, GreyHole, JpVerb — described in
Effects §6. The demo versions carry more controls; the plain UGens
are leaner and easier to automate.
5. Reading a demo as a lesson
Demos are worth more than a quick audition. Because every one is a complete, working, professionally parameterised patch, they are a reference for how an algorithm should be set up.
displayUI, and move every control to learn what the algorithm responds to.dsp traceAllParams shows the minimum, maximum and default the author chose. These are good defaults for your own patch.dsp generatedCode returns the FAUST source. This is the actual algorithm, and it is often short."What is this demo actually doing?"
demo := Dattorro_Rev_Demo new.
dsp := demo asDsp.
dsp init.
dsp traceAllParams.
dsp generatedCode. "the FAUST source behind it"
7. Troubleshooting
The demo is silent
It is an effect and has no input. Check its superclass — PhDemosMono and
PhDemosStereo both need a source chucked into them. §1.1.
A stereo demo only outputs on one side
The source was mono. Send stereo before the demo, not after — §1.1.
I cannot work out the parameter names
They are nested group paths with hex segments. Copy them verbatim from
traceAllParams, or just use displayUI — §1.2.
The demo uses a lot of CPU
Expected — demos favour completeness over efficiency. Switch to the plain UGen equivalent once you know what you need. §5.
The vocoder does nothing useful
It needs both a carrier and a modulator — §3.
I want a FAUST demo that is not in this list
demos.lib has more than Phausto wraps. Reach it with a raw FAUST string — see
Raw FAUST & the Box API.