Does a macro for creating all the overtones in separate tracks exist?

People,

I want to play around with overtones for a particular (fundamental) frequency and then chords derived from those notes - so, is there a list somewhere of all the macros that already exist that have been shared by users? - it would be good if I didn’t have to re-invent wheels . .

Thanks,
Phil.

Not that I’m aware of, though there are several posted in this forum board. Unfortunately there’s no easy way to search for them other than manually looking through the posts.

If you’re sufficiently interested / motivated, you could post a “feature request” for such a list. For a feature request to be seen by the development team, post it as an “issue” on GitHub (Issues · audacity/audacity · GitHub - requires a free GitHub account).

I agree with your comment here: Synchronizing multiple mp3 files - #27 by philip_rhoades that “Nyquist” is probably a better approach.

OK - thanks for that - I did look but couldn’t find anything . .

I will put a feature request in!

Really? - I had another job in mind for the Nyquist script but I sort of assumed (I know I know) that a script would only run in / for one track . .

There’s slightly different behaviours depending on the type of plug-in, but basically a normal Nyquist plug-in will iterate over each selected track.

For example, try creating a project with 4 mono tracks, select all of the tracks, then run this code in the Nyquist Prompt effect:

(setf basehz 440)

(let ((idx (get '*track* 'index)))
  (mult 0.3 (hzosc (* idx basehz))))

How this works is that (get 'track 'index) asks Audacity for the track index number (the first track in the project has an index of 1). The track index is stored in the variable IDX.
HZOSC generates a tone at a frequency of IDX x BASEHZ, where BASEHZ has been set to a value of 440.
The result should be a series of tones, one per track, with frequencies of 440, 880, 1320, 1760 Hz.

Ah right . .

For example, try creating a project with 4 mono tracks, select all of the tracks, then run this code in the > Nyquist Prompt > effect:

(setf basehz 440)

(let ((idx (get 'track 'index)))
(mult 0.3 (hzosc (* idx basehz))))

>

Ah! - beautiful! - in three lines!

> How this works is that (get '*track* 'index) asks Audacity for the track index number (the first track in the project has an index of 1). The track index is stored in the variable IDX.
> HZOSC generates a tone at a frequency of IDX x BASEHZ, where BASEHZ has been set to a value of 440.
> The result should be a series of tones, one per track, with frequencies of 440, 880, 1320, 1760 Hz.

Yes, the unfamiliar syntax is starting to make sense . .

Thanks!

The key to Nyquist’s syntax is that the “operator” / “function name” comes first, followed by its “arguments” / “parameters”, and the expression is wrapped in parentheses

Example:

In standard arithmetic notation we would write:

5 + 6

where “+” is the operator, and “5”, “6” are the arguments.

In Nyquist / Lisp notation, the operator (“+”) comes first, followed by a list of arguments:

+ 5 6

and wrapped in parentheses so that we (and the Nyquist interpreter) can see where the expression starts and ends:

(+ 5 6)

Almost everything in Nyquist follows this pattern.

The documentation tells you how many arguments a function takes, and what order they need to be in. For example the “The ‘+’ function adds a list of numbers together and returns the result.”
So whereas we might write (in standard arithmetic notation)

1 + 2 + 3 + 4

In Nyquist we would write:

(+ 1 2 3 4)