by the way, for Lisp code it is usual to put all trailing “)” on the same line, like this:
(normalize
(lp s
(control
(sum f
(mult depth
(sum 1
(hzosc modf *sine-table* 270)))))))
Also. where possible, I prefer to split long rambling lines like that into a series of lines so that it is easier to read and see what is going on. For example:
You can of course “cascade” a series of first order lp filters to give an approximation of a higher order filter.
These two snippets will both produce similar results (over most of the audio range), but the first can accept a sound as the filter frequency:
OK. I’ve cascaded frequency-distributed notches to get comb filters previously, so here’s my current solution, with intermediate variables renamed to suit my conventions, and styled as you suggested:
(let* ((raised-lfomod (sum 1 (hzosc modf *sine-table* 270))) ;raised sine LFO filter modulation
(scaled-lfomod (sum f (mult depth raised-lfomod)))) ;scaled filter modulation
(normalize (lp (lp s (control scaled-lfomod)) (control scaled-lfomod))))