To get you started with Nyquist Macros:
- Create a new Audacity project containing 1 track
- Run this code in the Nyquist Prompt effect (https://manual.audacityteam.org/man/nyquist_prompt.html). The Nyquist Prompt is an easy way to test out short Nyquist scripts.
(aud-do "SelectAll:")
(aud-do "Duplicate:")
(print "Done")
If you wanted to create three tracks:
(aud-do "SelectAll:")
(aud-do "Duplicate:")
(aud-do "SelectTracks: Track=0 TrackCount=1 Mode=Set")
(aud-do "Duplicate:")
(print "Done")
You can also use loops:
(aud-do "SelectAll:") ;selects the track and time region
(dotimes (i 6)
(aud-do-command "SelectTracks" :track 0 :trackcount 1 :mode "Set")
(aud-do "Duplicate:"))
(print "Done")
There’s a good amount of documentation for Nyquist these days. See: https://forum.audacityteam.org/t/manuals-and-reference-material/32817/1