Tone Generators: Siren

I think this is a reasonably good approximation of the “Track 68” siren without making it overly complicated (below).
Perhaps you would like to have a go at the others yourself. Give a shout if you get stuck.

;type generate

(setf duration 10.0) ; duration in seconds

;Make a skewed triangle waveform
(defun mod-table ()
  (let* ((mod-table (pwlv -1 0.55 1 1 -1)))
    (list mod-table (hz-to-step 1.0) t)))

(setf *table*
  (sum (mult 0.5 (build-harmonic 1.0 2048))
       (mult 0.05 (build-harmonic 2.0 2048))
       (mult 0.05 (build-harmonic 3.0 2048))
       (mult 0.03 (build-harmonic 4.0 2048))
       (mult 0.02 (build-harmonic 5.0 2048))
       (mult 0.01 (build-harmonic 6.0 2048))))
(setf *table* (list *table* (hz-to-step 1.0) t))

(setf siren
  (let ((mod (hp (osc (hz-to-step 0.22) duration (mod-table)) 0.3))
        (env (sum 1.4 (hp (osc (hz-to-step 0.22) duration (mod-table))0.3))))
    (setf mod (sum 480 (mult 530 (sum 1 mod))))
    (mult 0.5 env (fmosc 0 mod *table*))))

(mult 0.3 (jcrev siren 2.0 0.3)) ; add a bit of reverb