Nyquist Prompt

From Audacity Development Manual
Revision as of 11:14, 7 April 2015 by PeterSampson (talk | contribs) (P2=>P2P)
Jump to: navigation, search

Comando Nyquist

Nyquist Prompt lets you run and debug code snippets for your own plugins created using the Nyquist programming language. See Nyquist Plugins 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 plugin instead.
Gale 14May13: There is some discussion of adding Steve's improved Nyquist Generate Prompt to Audacity. If this is only offered on Wiki, we should link to it here http://wiki.audacityteam.org/wiki/Nyquist_Generate_Plugins#Nyquist_Generate_Prompt.
The Nyquist Prompt image needs updating.
  • Peter 18Dec14: Updated the image - removed the P1
Accessed by: Effect > Nyquist Prompt...
Nyquist Prompt.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 plugin 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.
Advice 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.
Peter 25Aug13: Modules Preferences were made experimental in r12363 and remain so for 2.0.4.
  • Peter 13Jan15: It's looking like, if I read Vaughan's RM email comments correctly that Modules will not be in 2.1.0.
    • Peter 29Jan15: ToDo-2P Placeholder Modules not in 2.1.0 - will probably be turned on in next alphas
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