Nyquist Prompt

From Audacity Development Manual

Jump to: navigation, search

Nyquist Prompt lets you run and debug code snippets for your own plug-ins created using the Nyquist programming language. See Nyquist Plug-ins Reference - Audacity Wiki for more information about writing Nyquist code.
To use Nyquist Prompt, first select some audio. If the code you want to test generates audio, you can avoid the initial steps of preparing an audio selection by installing the Nyquist Generate Prompt plug-in instead.
Accessed by: Effect > Nyquist Prompt...
Nyquist Prompt W10.png

Enter Nyquist Command

Type the command as required. Enter on the keyboard moves the cursor to a new line. The code is lost after quitting Audacity, so you may want to copy any valuable code before quit.

Use legacy (version 3) syntax

When selected, commands entered in the main text window will be interpreted as the "version 3" code. When not selected (default), commands entered in the main text window will be interpreted as "version 4" code.

Version 4 code includes a number of variables that are not available in version 3. In particular, the S variable is no longer used to pass sound from Audacity to Nyquist. In version 4 the S variable has been replaced by *TRACK*. Full details about the difference between version 3 and version 4 code can be found in the Audacity wiki

Buttons

  • Preview: Previews what the code would sound like if applied. As with preview in all effects, playback lasts for the length of preview specified in Playback Preferences.
Plugin authors should use this button to test if a Preview button in their plug-in would accurately preview the effect as applied to the waveform. Preview should not be used in effects that change over time (such as a fade effect) because Audacity's preview as currently implemented only applies the effect to the length of the previewed selection.
  • Debug: The Debug button works as it does in all Nyquist effects. Clicking this button shows a progress dialog for processing the code, followed by an uneditable "Nyquist Output" window listing any errors or other output. Click OK to close the output window and process the command, or use Enter on the keyboard. Hold Ctrl on Windows or Command on Mac before pressing Enter.
  • OK: Applies the code to the waveform selection without debug output. Your entered code will be retained next time you open Nyquist Prompt in the Audacity session. Using the keyboard, hold Ctrl on Windows (or Command on Mac) then press Enter.
  • Cancel: No code is processed or debugged. Any code you entered after opening the window this time will be discarded.
Warning icon The Nyquist prompt supports both LISP syntax and SAL syntax. If the code you enter cannot be recognized as valid Nyquist code in either LISP or SAL syntax, an error message will appear with a hint about making a correction.
Advanced users: An experimental "Nyquist Workbench" graphical editor module is available if you compile the module and Audacity from source code, then enable the module in Modules Preferences.

Links

|< Index of Effects, Generators and Analyzers

|< Effect Menu

Views

Donate securely by PayPal, using your credit card or PayPal account!

Useful External Links