Analyze and then Process Question

Hi,

I’m new to Nyquist programming. I’m interested in developing a dynamic EQ (i.e. a filter is applied to the input audio when the level of a specific frequency band rises above a specific threshold). Most plugins seem to either analyse or process the input audio but not do both. Is this possible?

Cheers,

Chris

There are (currently) three “types” of Nyquist plug-in.
The “type” is set in the plug-in header http://wiki.audacityteam.org/wiki/Nyquist_Plug-ins_Reference#Required_plug-in_header_lines
Any of the types may return a sound, a stereo sound, a label track, or text (in a pop-up window).

Plug-in types:

  • generate
  • Appear in the Generate menu
    • Do not require a track selection (will create a new audio track if one is not selected)
    • Do not have access to selected audio
    • Usually return a “sound” to the track
  • process
  • Appear in the Effect menu
    • Require an audio track selection
    • Have access to the selected audio (value of variable “S”)
    • Usually “process” (change) the selected sound and return the result
  • analyze
  • Appear in the Analyze menu
    • Require an audio track selection
    • Have access to the selected audio (value of variable “S”)
    • Usually “analyze” (measure in some way) the selected sound.

Nyquist plug-ins act on one track at a time, and can make multiple “passes” over the sound before returning a “result”. So yes, you can have an effect (process) plug-in that analyzes the track audio and then processes it. However, for a general release plug-in you need to take care about memory usage. Some Nyquist functions are performed in RAM and leave the RAM allocated until the code completes, for example “PEAK”.

“Normalizing” is particularly tricky for Nyquist in Audacity as it loads the entire track into RAM, which could exhaust the available memory and cause Audacity to crash if the audio is too big. Most functions that suffer from this issue are duly noted in the Nyquist manual.

You can return sound from a analyse plug-in as well.
It’s just the question if you use more the analysing or the processing part of the plug-in.
It is often convenient to display additional or “Analyze” information on the debug screen.