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 . .
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 (https://github.com/audacity/audacity/issues - requires a free GitHub account).
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! - 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.