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
A common problem for people that are new to Nyquist is how to modify audio samples, for example, to set certain sample values to zero (silence). The temptation may be to read the audio sample by sample and modify them as necessary. In the vast majority of cases this is NOT the best approach as … Continue reading Silence part of an audio track (part 1)
A newline, also known as a line break or end-of-line (EOL) marker, is a special character or sequence of characters signifying the end of a line of text. The actual codes representing a newline vary across operating systems, which can be a problem when exchanging text files between systems with different newline representations. Windows uses … Continue reading New Line CR+LF
Since version 4 Nyquist plug-ins, the global variable that passes the track audio from Audacity to Nyquist changed from S to *TRACK*.
For mono tracks …
In Nyquist, as with List, there are two types of numbers – Integers and Floating Point numbers. An integer is a whole number with no decimal part, such as 1, 2, 99, 1000000. A floating point number is referred to as a FLONUM, or simply a “float” (floating point number) and is most easily defined … Continue reading Floats and Integers
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
Nyquist can produce tones that are accurate to the exact number of samples required. For example, if you want to generate 441 samples of a 1kHz sine tone, you can use the following code in the “Nyquist Prompt” effect: [cc lang=”lisp”] (setq num 441) (abs-env (sustain (/ num *sound-srate*)(hzosc 1000))) [/cc]
A couple of simple but useful functions. Hopefully this will save someone several hours of scouring Google. To test the code, copy and paste it into the Nyquist Prompt effect and press the DEBUG button to see the output. [cc lang=”lisp”] ; function to convert a number to a string (defun number-to-string (number) (format nil … Continue reading Converting numbers to strings and strings to lists
To clip a waveform we can just use: (clip sound amplitude)
To work round this problem we can create a sim function that works with multi-channel sound.
Here we look at conditioning the recorded square wave to make it more “square” using a simple Nyquist script…. We can then modulate this with a high frequency carrier wave which could then be used to drive an IR transmitter from a computer sound card […]