Category Archives: Tutorials

Tutorials and Examples for Nyquist programming

Arrays as function arguments

When calling a function we commonly pass one or more parameters to that function. In most cases these are simple variables; integers or floats, but could be lists or arrays. In the case of passing arrays there is a hidden danger. Let’s consider a simple function:

To use this function we pass two values, … Continue reading Arrays as function arguments

Changing the speed and length very accurately

Audacity has a “Change Speed” effect, but it is only accurate to three decimal places. For greater accuracy a short Nyquist script can be used in the Nyquist Prompt effect. In this example the length of the selected audio was 599.999 seconds and I wanted to stretch it to 600 seconds duration.The durations may be … Continue reading Changing the speed and length very accurately

Are Nyquist Plug-ins slow? (Compiled vs Interpreted languages)

It is a common misconception that Audacity’s Nyquist plug-ins must be slow because they are written in an interpreted programming Language. Nyquist is an interpreted language, meaning that it runs directly from the code rather than being compiled first, but the inner loops of many DSP functions are pre-compiled in highly optimised compiled C code. … Continue reading Are Nyquist Plug-ins slow? (Compiled vs Interpreted languages)

Display time as hh:mm:ss

For a shorter display when hours [or hh:mm] are not required, set the ‘short’ parameter to 1. To display hh:mm:ss without milliseconds, set the second parameter [places] to 0. The ’round’ parameter can be set to round up, round down or round to the closest whole number of seconds. For full details of all options, … Continue reading Display time as hh:mm:ss

Getting Started with Nyquist

So you’ve used a few plug-ins in Audacity and you’ve heard that it’s possible (and not too difficult) to write your own plug-ins. Now what? Where do you start? Here’s some pointers that will hopefully get you on your way. First, three pages from the official Audacity web site: http://audacity.sourceforge.net/help/nyquist http://audacity.sourceforge.net/help/nyquist2 http://audacity.sourceforge.net/help/nyquist3 After that, an … Continue reading Getting Started with Nyquist