Perhaps you can answer this, is it possible to…
Using the standalone version of Nyquist (ver 3.12 XLISP ver 2.0 and CLI on Linux), import a wav file,
add an effect using one of Audacity’s .ny plugins and then saving the resulting wav?
I have tried the following but it always errors out with a:
“error: sound save: expression did not return a sound - NIL”
(setf plug-in "/usr/share/audacity/plug-ins/highpass.ny") (setf in-file "/path/to/in-file.wav") (setf out-file "/path/to/out-file.wav") ; Set plug-in parameters - var names same as in highpass.ny (setf frequency 1000) (setf rolloff 4) ; Populate the properties (setf *track* (s-read in-file)) (setf len (snd-length (aref *track* 0) 100000000)) ; Import the plug-in code (defun process-it () (do* ((fp (open plug-in :direction :input)) (ex (read fp nil) (read fp nil))) ((null ex) (close fp) nil) (eval ex))) ; Process and store the audio (s-save (process-it) len out-file) (exit)
I then save the above as Paul-1.ny and run it as such:
ny -l Paul-1.ny
However, if I change the s-save line to:
(s-save (aref *track* 0) len out-file)
Then it does create the output wav, but no filtering action has taken place.
Another interesting thing, if I set rolloff higher than 4, then it errors.
This is a good thing as there are only 4 options, so it tells me it is seeing the
highpass.ny plugin code.