If you post to the page where you found that plug-in, Robert may be subscribed to the page and see your post. (Robert is still around, but doesn’t visit the forum very frequently).
Try applying the un-modified code to white noise. You will still get the warning, but should be able to see that it is doing something. Use “Plot Spectrum” to see what it is doing.
To fix the warning, change the “:isnew” method to:
(send filter-class :answer :isnew '(snd w p)
'((setf s1
(let ((sr (snd-srate snd)))
(seq snd (cue (snd-const 0 0 sr (/ 1 sr 2))))))
(setf win w)
(setf percentile (min 100 (abs p)))
(setf histo (let ((n0 (snd-fetch s1)))
(dotimes (i win h) (setf h (cons n0 h)))))))
Sorry that I took so long to respond, had to find the link to that post.
What I do to learn Nyquist, I collect whatever plugins people have written and then go through them, try them out and edit them to better understand.
I normally also keep the url, but in this case, must have forgotten.
I think that technically there’s another error in the :isnew method. It does not affect how the code runs, but “h” has not been defined when it is first used, so it defaults to the value 2.0 (See: https://www.cs.cmu.edu/~rbd/doc/nyquist/part2.html#index59).
To be technically correct, I think “h” should be initialised as an empty list (or NIL), as here:
(send filter-class :answer :isnew '(snd w p)
'((setf s1
(let ((sr (snd-srate snd)))
(seq snd (cue (snd-const 0 0 sr (/ 1 sr 2))))))
(setf win w)
(setf percentile (min 100 (abs p)))
(setf histo (let ((n0 (snd-fetch s1))
(h ()))
(dotimes (i win h)
(setf h (cons n0 h)))))))
There should be a book to teach people about Nyquist and Xlisp.
It could be titled:
“Learn Nyquist & Xlisp in 21 years”.
That’s how long it feels like it’s going to take me.
Seriously though, have you ever though about making Youtube videos about this stuff?
Maybe something along the lines of, DSP theory and examples using Audacity and Xlisp.