Access 8 tracks and create a new one

I am struggling to understand the following paragraph:

Important: The Nyquist interface within Audacity can handle a maximum of two channels simultaneously [Audacity stereo tracks]. If in Audacity more than one audio track were selected, each of the selected tracks will be given sequentially, one after the other, with a maximum of two channels simultaneously [stereo] to Nyquist for processing. It is not possible with Nyquist in Audacity e.g. to copy audio signals from one Audacity track into another track.

I want to write a plugin that processes 8 tracks and creates a new track based on computations made from the 8 tracks. Can I do this in Nyquist? Specifically:

Can I get to all 8 tracks using (aref track n) ?
How do I create a new track?
What type of plugin would this be (analyse, generate, process)?


It would have been helpful to provide a link, but I guess you’re looking at this page in the Audacity wiki: Missing features - Audacity Support

Not in “pure” Nyquist, because as it says in the above quote, Nyquist only has access to the selected tracks which it can process sequentially.

Nyquist cannot create new tracks in Audacity.

Nyquist is a programming language that has been shoehorned into Audacity. The way that Nyquist effects work is:

  1. Audacity passes the selected audio to Nyquist from the first selected track
  2. Nyquist processes the audio (which may be mono or stereo)
  3. Nyquist returns the processed audio back to Audacity
  4. Audacity replaces the selected audio from the first selected track with the audio that it has received from Nyquist
  5. If there are more selected tracks, loop back to step 1 with the next selected track.

However, Nyquist can also work in another way.
Rather than processing audio, Nyquist can send “macro commands” to Audacity. This mode of behaviour is called a “Nyquist Macro”.
There’s a tutorial about Nyquist Macros here: Missing features - Audacity Support

Thanks for the reply. This is great info. I’m a complete beginner to Audacity programming.

So I can use scripting to make my new track. Any suggestions about doing the computational side? It doesn’t have to be Nyquist. I am comfortable programming in Lisp, C, C++, whatever. The code is currently written in Julia. Perhaps one of the other Audacity extension mechanisms would be more suitable for my task? Basically I want to do some 2D phased array computations using signal processing algorithms I have developed. It would be nice to have some GUI extensions too, but not absolutely essential. I do need GUI inputs to parameterise the algorithms, but the Nyquist mechanism is perfectly OK for this.


Maybe you could write your algorithms as LV2 plug-ins?

I’m going to try Vamp.

Vamp is usually used for analysis rather than audio processing. I can’t be certain whether Audacity will support a Vamp plugin that returns processed audio as I’ve never seen a Vamp plugin that does that.

Also, most Vamp software is very old. The Vamp plugin SDK is still supported as far as I’m aware, but it seems to be a one person (Chris Cannam) project these days.

If you are wanting to process audio, I think LV2 would be a better option.
If you are wanting to use your algorithms to process audio and return the results as labels or text, then Vamp may be best.