Newbe trying to get Nyquist Prompt to work.

Windows 10
Audacity 2.4.1 (and 2.3.1)

I am a retired C programmer, with no experience with LISP and Nyquist. To get started, I am trying to follow the simple examples on this page:

https://wiki.audacityteam.org/wiki/Nyquist_Basics:_The_Audacity_Nyquist_Prompt

First of all, there is some confusion about exactly where to find the Nyquist Prompt. It looks like it was once located under the Effect tab, but has been moved to the Tool tab. Yes? The link above talks about both locations and needs to be edited.

First example: I can get the (print “hello”) example to work. It displays in a window labeled “Nyquist Prompt”

Second example, an intentional error (print hello). When I press OK, nothing happens, and suddenly, I am looking at the regular Audacity display with my track(s) on it. If I press Debug, I immediately get a “Debug Output” window displaying: "error: unbound variable - HELLO if continued: try evaluating symbol again 1> " I never get any kind of Nyquist Prompt window showing any useful information.

Third example (sum s 1), intended to add a DC offset to my track. I select my track, go to tools> Nyquist Prompt. Enter (sum s 1), press Debug, and get a Nyquist Prompt window showing “Nyquist returned the value: 1.250000.” when I press “OK”, I get a blank Debug Output window. No change is made to my track. No DC offset. What the heck is 1.250000? S must evaluate to 0.25. Why?

I tried using “track” instead of “s”, but Nyquist clearly doesn’t like that.

I believe I followed the simple exercise exactly. I reinstalled the Audacity software, with the same results. If I can just get this stupidly simple tutorial to work, I believe I will be fine.

Please help.

Doug

I found one mention of it being in the Effect menu, which I have corrected (yes, it was in the Effect menu when that article was first written).


Normally we use screenshots taken on Windows 10.
In this case the screenshots were taken on macOS, with an old version of Audacity.
This is what the Nyquist Prompt looks like for me on Linux with Audacity 2.4.1:

prompt.png
And that produces the result:

result.png
If you post suitable Windows 10 screenshots, I will update the images in the article.

I have updated this section. Please check that it now matches what you see.

After my post, I figured out how to make the examples work by replacing “s” with “track”. I still feel like I am missing some detail. It is hard to believe that some upgrade of Audacity would cause errors on all previous code using “s”.

Steve, Thanks for your reply. I found another similar page with the same error

https://wiki.audacityteam.org/wiki/Nyquist_Basics:_The_Audacity_Nyquist_Prompt_With_SAL

I also think both pages have the same s variable error.

Doug

This is one of the reasons why the global variable for the selected audio was changed from “S” to “TRACK”.

Nyquist exists as a stand alone audio programming language outside of Audacity. When Nyquist was shoehorned into Audacity, the variable “S” was chosen to pass sound from Audacity to Nyquist. This was a bad choice because the variable “S” was already defined in Nyquist as 1/4 as a part of “Adagio notation” (see: MIDI, Adagio, and Sequences)

This conflict was resolved when Audacity / Nyquist was updated to version 4 syntax, by using “track” for the selected audio, allowing “S” to revert to it’s normal Nyquist default value of 0.25.

I think the page is now updated apart from the Windows 10 screenshots.
Let me know if I’ve missed anything, or if any of it remains unclear.

As I wrote previously, if you can post updated screenshots, I’ll be happy to replace the ones in the wiki article. It’s really just the Nyquist Prompt images that desperately need updating.