Everything that processes a signal rather than generating one: delays, saturation, modulation effects, seven reverbs, and a thirty-class dynamics section.
1. Placing an effect
An effect is a UGen with an input, so it goes on the end of a chuck chain like anything else:
voice := SawOsc new => ADSREnv new => MoogVcf new => GreyHole new.
dsp := voice stereo asDsp.
dsp init.
dsp start.
dsp displayUI.
dsp stop.
Mono take one channel; those ending Stereo take two.
Send stereo before a stereo effect so it has two channels to work
with — see Connecting §7.
1.1 Dry and wet
Most effects sound best blended with the untreated signal rather than replacing it. Two mixers exist for exactly this:
| Class | Use |
|---|---|
| DryWetMonoMixer | Blend a mono effect with its input |
| DryWetStereoMixer | Blend a stereo effect with its input |
Many effects also expose wetAmount: directly, from the
PhWetAmountSetter trait, which is simpler when the effect supports it.
2. Delays and echo
PhDelays and its subclasses are the raw delay lines; PhEcho is the
musical echo built on top of one.
| Class | Use |
|---|---|
| PhSimpleDelay | Integer-sample delay — cheapest, cannot be modulated smoothly |
| PhFractionalDelay | Interpolated delay — required for smooth pitch and modulation |
| PhSmoothDelay | Delay with a smoothed delay-time control, for artefact-free changes |
| PhEcho | Echo with feedback — a delay you can actually play with |
| PhFibonacci | Multi-tap delay with Fibonacci-spaced taps |
| PhLooper | Looping buffer, from the toolkit |
Delay time and feedback come from PhParamsSetter: maxDel:,
fb: and feedBack:.
PhFractionalDelay or PhSmoothDelay.
3. Saturation and distortion
Saturators has nineteen subclasses, each a different waveshaping curve. They all
do the same thing — map input amplitude to output amplitude through a nonlinear function —
and differ entirely in the shape of that curve, which is what you hear as character.
| Group | Classes | Character |
|---|---|---|
| Hard clipping | Hardclip, Hardclip2, PhClip | Abrupt; harsh odd harmonics, digital-sounding |
| Soft quadratic | SoftClipQuadratic, SoftClipQuadratic1, SoftClipQuadratic2 | Gentle onset; warm, tube-like |
| Hyperbolic | Tanh1, Hyperbolic, Hyperbolic2 | Smooth compression into saturation; very musical |
| Trigonometric | ArcTan, ArcTan2, SinArcTan, SinArcTan2 | Progressive, softer than tanh |
| Inverse hyperbolic | ASinh1, ASinh2 | Expands rather than compresses near zero |
| Polynomial | Cubic1, Parabolic, Parabolic2 | Predictable harmonic content, cheap |
| Folding | PhWavefold | Folds instead of clipping — wild, inharmonic, West Coast |
CubicNl is a separate cubic nonlinearity with its own controls, and
PhBitCrusher and PhDownSampler in the Basics family give the
complementary digital degradations.
drive: or uLevel:, then reduce afterwards — that
difference is the effect. Add a DcBlocker after any asymmetric curve; see
Filters §9.
4. Modulation effects
| Class | Effect |
|---|---|
| PhFlangerMono | Flanger — a swept short delay mixed with the dry signal |
| DopplerShift | Doppler pitch shift from a moving source |
| PhTranspose | Pitch transposition |
Controls come from PhModulationSetter — modFreq: and
modDepth: — and from PhParamsSetter's depth: and
fb:.
FlangerMono. The class name carries the
Ph prefix.
5. Wah and formant effects
| Class | Effect |
|---|---|
| PhWah | Wah — a swept resonant band-pass |
| CryBaby | Model of the classic wah pedal |
| AutoWah | Envelope-following wah — the sweep tracks input level |
| PhSpeakerBp | Small-speaker simulation, band-limited |
AutoWah is worth understanding as a pattern rather than only as an effect: it is
a filter whose cutoff is driven by an envelope follower on its own input. You can build the
same idea by hand with an averaging filter from Filters §8 and any
filter you like.
6. Reverbs
Seven reverb algorithms, each with a distinct personality. Reverb choice matters more to the character of a patch than almost any other effect decision.
| Class | Algorithm | Character |
|---|---|---|
| FreeverbMono | Schroeder–Moorer | The familiar workhorse; cheap and neutral |
| ZitaRevStereo | Zita-Rev1 (Fons Adriaensen) | High quality, natural; excellent as a send reverb |
| DattorroRev | Dattorro plate | Dense plate reverb; smooth tail, classic on drums and voice |
| GreyHole | Greyhole (from Faust/SC) | Diffuse, pitch-shifting, unpredictable — a texture generator |
| JpVerb | JPverb | Long, lush, ambient; designed for very long tails |
| SpringReverb | Spring tank | Boingy, resonant; guitar-amp character |
| SatRev | Saturating reverb | Reverb with built-in saturation |
"GreyHole is as much an instrument as an effect"
texture := ElecGuitar new => GreyHole new.
ZitaRevStereo. For a recognisable
plate on a drum, DattorroRev. For ambient washes, JpVerb. For
something that will surprise you, GreyHole — it shifts pitch as it diffuses and
does not sound like a room at all.
Related demo modules — Freeverb_Demo, ZitaRev1,
JpRev_Demo, Dattorro_Rev_Demo, ReverbTank_Demo,
KbRomRev1, PhVitalRev_Demo — are ready-made stereo patches; see the
Demo Gallery.
7. Dynamics
Thirty classes handle level control. The naming is systematic, and once you can read it the family stops being intimidating.
7.1 Compressors
| Class | Use |
|---|---|
| PhCompressorMono | Standard mono compressor |
| PhCompressorStereo | Standard stereo compressor, linked channels |
| PhCompressorLadMono | Lookahead-style mono compressor |
The …CompressionGain… classes are a level below these: they compute a gain
signal rather than applying it, so you can route it yourself — for sidechaining, for
ducking one source with another, or for visualising gain reduction.
7.2 Peak or RMS, feed-forward or feedback
Read the class names as a combination of three choices:
| Name part | Meaning |
|---|---|
Peak… | Detects instantaneous peaks — fast, catches transients |
RMS… | Detects average energy — slower, tracks perceived loudness |
FF… | Feed-forward: measures the input. Precise, modern |
FB… | Feedback: measures the output. Softer, more "analogue" |
FBFF… | Both, blended |
…_dB | Gain expressed in decibels rather than linear |
…Mono / …Stereo | Channel count |
So PhRMSFBFFCompressorGainStereo is an RMS-detecting, combined
feedback/feed-forward stereo gain computer. The names are long but entirely predictable.
Ratio2Strength and Strength2Ratio convert between the two ways of
expressing how hard a compressor works.
7.3 Limiters
| Class | Use |
|---|---|
| PhLimiter1176Mono | 1176-style limiter, mono — fast, coloured |
| PhLimiter1176Stereo | 1176-style limiter, stereo |
| PhLookaheadLimiter | Lookahead limiter — catches transients before they arrive |
| PhLimiterLadMono | Lookahead limiter, mono |
| PhLimiterLadStereo | Lookahead limiter, stereo |
7.4 Gates and expanders
| Class | Use |
|---|---|
| PhGateMono | Noise gate, mono |
| PhGateStereo | Noise gate, stereo |
| PhExpander | Downward expander — the gentle version of a gate |
| PhExpanderStereo | Stereo expander |
| PhExpanderSCStereo | Sidechain-controlled stereo expander |
| PhPeakExpansionGainStereo | Expansion gain computer |
| PhDensityGate | Density-based gate, from the toolkit |
8. Spatial
| Class | Use |
|---|---|
| Panner | Position a mono source in the stereo field |
| PhSpatials | Superclass of the spatialisation effects |
| DopplerShift | Pitch shift from source movement |
A Panner whose position is driven by an LFO is auto-panning; driven by an
envelope, it is a movement gesture tied to each note. As always, the destination accepts any
signal — see Envelopes & Modulation.
9. Order of the chain
Effects are not commutative, and a few orderings are conventional because they solve real problems:
11. Troubleshooting
The effect makes no audible difference
Either the wet amount is at zero, or a saturator is not being driven hard enough to reach its nonlinear region. See §1.1 and §3.
A stereo effect only outputs on one side
It received one channel. Send stereo before the effect, not after — §1.
My flanger clicks as it sweeps
It is built on an integer-sample delay. Use PhFractionalDelay or
PhSmoothDelay — §2.
The compressor pumps unpleasantly
A peak detector is reacting to individual transients. Move to an RMS variant, or lengthen the release — §7.2.
The reverb sounds metallic and thin
The algorithm is not suited to the material, or the input is mono into a stereo reverb.
GreyHole in particular is deliberately not a room simulator — try
ZitaRevStereo — §6.
My patch clips only when the reverb is engaged
The reverb is adding energy on top of the dry signal. Lower the wet amount, or put a limiter after it — §7.3.