Nyquist prompt - seems broken

I just updated Audacity on Windows (to 3.6.4), and on the Kubuntu 24 laptop, installed 3.4.2 (that’s the version the software menu offered).

In both, if I open a new project, then generate noise with the “generate” menu, select all, then open Nyquist prompt, enter (s-abs s) to get the absolute value - which used to work last year when I last did that, I get, on both computers, the error dialog: “Nyquist returned the value 0.250000”

What might be wrong?

 (s-abs s) 

That code is using extremely old syntax.

In very old versions of Audacity, the “S” variable name was used to refer to the selected audio in the track being processed. Unfortunately this conflicted with another use of “S” defined in Nyquist itself. To resolve this conflict, the special “S” variable was changed to a more explicit: *track*

For many years, the Nyquist Prompt had a checkbox option to switch to the old “legacy” syntax. After about 10 years, the legacy option was removed.

The solution:

 (s-abs *track*) 

Aaaah, thanks, makes sense. As things go, tutorials floating around the net, especially if they are not generic but to achieve a very specific thing, won’t likely be updated… :wink:
I have not found it mentioned on the audacity pages about Nyquist either, i.e. how to get at “the sound” in the first place, only supported function names.
Are such things documented somewhere?

It would be really helpful if the error message was a meaningful text instead of “0.250000” :smiley:

:slight_smile: The message is actually “meaningful”, but only if you know that “S” represents the constant “Sixteenth note” (quarter of a crochet, or 0.25).

This information used to be in the Audacity wiki, but that has now been replaced by the support site.

There’s also a stack of documentation on my blog: Documentation | AudioNyq

This topic was automatically closed after 30 days. New replies are no longer allowed.