Nyquist Help Please!

Using Nyquist scripts in Audacity.
Post and download new plug-ins.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
Post Reply
CurtisBalch
Posts: 1
Joined: Wed Mar 01, 2017 5:53 am
Operating System: Windows 10

Nyquist Help Please!

Post by CurtisBalch » Wed Mar 01, 2017 5:57 am

Does anyone know of a pre-made nyquist prompt that will ease a section into a high pass filter as opposed to just going from no filter to full on filter?

steve
Site Admin
Posts: 47282
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu
Contact:

Re: Nyquist Help Please!

Post by steve » Wed Mar 01, 2017 10:16 am

  • The "Nyquist Prompt": is an effect that allows you to run "Nyquist commands" inside Audacity.
  • "Nyquist": is a programming language for audio that is included in Audacity, but is separate from Audacity (a stand-alone version is also available).
  • "Nyquist plug-ins": are "Nyquist scripts" (programs), in plain text format, that have a few additional lines at the beginning of the file to tell Audacity to run the code as a plug-in (and optionally may tell Audacity to create a simple graphical interface).
Here's a "Nyquist script" that can be run in the "Nyquist Prompt effect" that goes from (almost) no filter to 2500 Hz high-pass filter. The transition occurs over the first 1/10th of the selected audio. The filter is a first-order (6 dB/octave) high-pass filter.

Code: Select all

;version 4
(setf hz-env (pwl 0 0 0.1 2500 1 2500 1))
(hp *track* hz-env)
The first line tells Audacity to treat the code as a "version 4" Nyquist plug-in.

The second line creates a symbol (a "variable") called "hz-env" (it could be called almost anything), and sets it's value to the result of the "PWL" command.
The PWL command creates a varying control signal with a list of "control points". The control points are "time, level" pairs in the form:
"T0, L0", "T1, L1", "T2, L2"....
ending with a final "time value" and an implied but not written level of 0.
In Audacity effects, the times are relative to the length of the selection, so we have:
time = 0, level = 0
time = 0.1, level = 2500
time = 1, level = 2500 (end of the selection)
time = 1, implied level = 0, but we've already reached the end of the selection, so effectively ignored.
PWL in the Nyquist manual: http://www.cs.cmu.edu/~rbd/doc/nyquist/ ... l#index408

The final line is the filter, in the form:
HP the high-pass filter function: http://www.cs.cmu.edu/~rbd/doc/nyquist/ ... l#index444
*TRACK* a special symbol that represents the selected audio.
hz-env the filter frequency, which we have created as a varying control signal.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply