Category Archives: Tutorials

Tutorials and Examples for Nyquist programming

Nyquist Programming – Variables and data types

“Variables” are a fundamental concept in programming. They provide a way to refer to a value, even if the value is not known. For example, if we have some apples, but we don’t know how many apples, we can refer to “the apples” without knowing how many. If we have 5 apples, then “the number … Continue reading Nyquist Programming – Variables and data types

Three band crossover filter (part 1)

What are crossover filters? Due to mechanical / physical constraints it is near impossible for a single speaker cone to accurately reproduce the full audio range. Carefully designed small speakers may work adequately for low power use such as portable radios, but for larger, higher power and higher sound quality speakers, multiple “driver” units are … Continue reading Three band crossover filter (part 1)

Synthesizing musical notes

This is a short tutorial about generating sounds and shaping the sound with an envelope. Nyquist includes a number of oscillators and other simple sound generators that may be used as building blocks. In this tutorial we will be using the triangle waveform oscillator as the basis of a simple piano-like “ding” sound.We’ll start with … Continue reading Synthesizing musical notes

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)