Extra Nyquist Files

Hi all,

Any reason/s why certain extra Nyquist .lsp files have not been included in the Audacity distributions?
More specifically, Spatial.lsp and Bandfx.lsp.

Is it due to licensing or perhaps incompatibility?

Thanks.

I don’t know specifically about those two files, but I know that some features have been omitted for compatibility reasons. A few more for security reasons (such as the ability to directly read and write to memory addresses).

OK, thanks Steve.

Since I don’t have the knowledge to check for compatibility, will try them out on my “suicide” machine first.
It’s a Celeron running RaspianX86 (Debian based) and that has Audacity on it.

If it trashes Audacity there, no big worries, I just re-install, as opposed to trashing Audacity on my main working machine.

Where did you see those? I don’t see them in the stand-alone Nyquist 3.16

For bandfx.lsp:

;; bandfx – audio effects based on separate frequency bands
;;
;; by Michael Mishkin and Roger B. Dannenberg

For spatial.lsp:

; SPATIAL.LSP
; created by Adam Hartman and Roger B. Dannenberg
; 2005
; stereo manipulation and spatialization functions

Since Roger B. Dannenberg co-wrote, I assume they are official.

That’s an old version of Nyquist (3.08) from 2013. The latest version of stand alone Nyquist is on Sourceforge.
The official home page for Nyquist is here: https://www.cs.cmu.edu/~music/nyquist/

OK thanks for the link.
Had a look, spatial.lsp seems to have been replaced by surround.lsp as they have the same functions.

The latest version of stand alone Nyquist…

However, surround.lsp is not in the nyquist folder of Audacity.

Few others are not included either.

The main purpose of that file concerns 4 channel surround sound. Audacity currently only supports stereo playback, and tracks are limited to one or two channels.

That would be a problem agreed, but there are some like “doppler”, “absorb” and “atten”, that presumably would work with mono or stereo files.

You can certainly try it, but I doubt it will work as expected.

OK thanks Steve, will give it a go.

UPDATE:

Been messing about with those other .lsp files and happy to report that some do work.
Anything to do with multi-channel sound (more than 2 channels), I have left alone as they will not work.

There are some really nice functions and seems a waste to not be using them.

What I will probably land up doing is, taking the ones that do work, from all of them, and creating an “extras.lsp” file.
Also perfect opportunity to add some helper functions that I’ve come across on the internet and this forum.

Of course, the downside is that any scripts that use them, will not be universal.

Now if I can only get doppler to work. :frowning:
One of the variables is “r” and it’s not just the distance in meters…time to brush up on some math.

They could be. You just need to include all the necessary parts that your code requires in your .NY file.

I can do that, just need to keep track of what is non-standard.
It’s a pity an “include” statement is not available, that would make it much more versatile.

See: LOAD https://www.audacity-forum.de/download/edgar/nyquist/nyquist-doc/xlisp/xlisp-ref/xlisp-ref-152.htm

I did come across “load” but assumed it could only be used in “nyinit.lsp”.
Gonna try it out in other .ny files.

This then makes things easier to add new functions in “extras.lsp” and use them over and over again in other scripts, without the need
for users to modify their “nyinit.lsp” file.

As long as “extras.lsp” is in the same folder as “Whatever.ny”, then all good.

The one down side is, no easy check to see if “extras.lsp” exists before continuing with a script that relies on it:

Common Lisp uses an optional keyword parameter ‘:if-does-not-exist’ which XLISP does not support.

You could do something like:

(if (load myfile)
    (do-my-program)
    (format nil "File not found: ~a" myfile))

Perfect, thank you.