Nyquist Basics: The Audacity Nyquist Prompt
|With the Audacity Nyquist Prompt you can test small snippets of Nyquist code or doing quick audio hacks. On this page the basic usage of the Nyquist prompt is explained.
The Audacity Nyquist prompt is placed in the Audacity "Effect" menu which only can be activated if an Audacity audio track exists and at least a part of it marked or selected.
Load a Sound File
If you have a mono or stereo sound file available you can load it into Audacity via:
CTRL + SHIFT + Ior the shortcut
If you have no sound files available you can build your own mono or stereo tracks via the Audacity "Generate" menu.
Create a Mono Track
Click. Leave everything as-is, just click "OK", a mono track will appear in the Audacity window:
Create a Stereo Track
1. Select the whole mono track either by pressing CTRL + A on the keyboard, or by clicking with the mouse on the Track Panel (take care not to move the buttons or sliders). The audio waveform will then have a shaded colour.
2. Click. A second, identical mono track will appear below the first one:
3. In the upper mono track, open the track menu by clicking on the small black triangle at the top of the Track Panel choose Make stereo track. Both mono tracks then will be combined into the left and right channel of a single stereo track:
The Nyquist Prompt
Click CTRL + A on the keyboard. A window like the following will appear:. If the Effect Menu is greyed out because no part of the audio is selected, press
The Nyquist Interpreter
In the "Nyquist Prompt" window, type into the text field a string "hello" with quotes:
If you click "OK", you should get a window displaying the word hello:
Click "OK" in the "hello" window to make it disappear again.
Congratulations, you just have learned how to send text messages to the user.
The Nyquist Debugger
After clicking "OK" in the "hello" window, go back to the Audacity Effect menu and choose Nyquist prompt again, but this time type the word hello without the quotes:
Important: Now click "Debug" instead of "OK".
You should first get a window displaying a "Nyquist did not return audio" or similar message:
After clicking "OK" in the window above, a second window appears, displaying the detailed Nyquist error messages: