Designing Sound in SuperCollider/Sirens

28: US-style police siren
We'll use the internal server to make sure we can use the oscilloscope etc.:

Fig 28.6: imitation of capacitor charge/discharge
In SuperCollider we can provide an almost-direct physical model: the LFPulse represents a "raw" on/off signal before smoothing by capacitors, and the "lagud" provides exponential smoothing, with the handy feature of allowing different time-periods for the "on" and "off" convergence. This one-line example will plot the curve for you:

The siren
Now let's use this technique both for the pitch curve, and for waveform synthesis.

Exercise: instead of using the lagged-pulse implementation of the waveform, do as the book says and try using a simple triangle oscillator (LFTri) - this loses the physical-modelling "realism" of the authentic circuit but will be more efficient, and reasonably similar. How much of an effect on the tone quality do you get?