Macro For Sequencing Setup

Questions, discussion and recipes for scripting and batch processing in Audacity.
See also the "Scripting" section of the Audacity manual.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
Post Reply
tdrusk
Posts: 2
Joined: Thu May 14, 2020 11:24 pm
Operating System: Windows 10

Macro For Sequencing Setup

Post by tdrusk » Fri May 15, 2020 12:08 am

I use audacity for sequencing.

My setup is

1) turn on snap to nearest
2) Generate Rhythm Track based on my criteria
3) Analyze - beat finder with defaults
4) drag the beat finder 'beat' to the nearest snapping position (to the left)

From there I align my tracks with the beats.

I've figured out how to do 1 and 3 with a macro.
How can I open the generate rhyhtm track dialog via macro/script?
How can I move the beat finder track to the nearest snapping position?

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Macro For Sequencing Setup

Post by steve » Fri May 15, 2020 9:06 am

tdrusk wrote:
Fri May 15, 2020 12:08 am
How can I open the generate rhyhtm track dialog via macro/script?
You can't. Audacity's Macros are just a simple list of instructions. When a Macro sends a command to run the Rhythm Track plug-in, it can include the required parameters (settings) for the effect, or else the effect runs with default settings. You can't change that on the fly in a normal Macro.

For more advanced scripting, you need to use a language that is more flexible than just a list of commands. Audacity provides two options:
Nyquist Macros: https://manual.audacityteam.org/man/nyquist_macros.html
Python scripting: https://manual.audacityteam.org/man/scripting.html
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

tdrusk
Posts: 2
Joined: Thu May 14, 2020 11:24 pm
Operating System: Windows 10

Re: Macro For Sequencing Setup

Post by tdrusk » Sat May 16, 2020 5:45 pm

Thanks, I got a pretty functional solution using only Macros. Strongly inspired by Demonic Sweaters on youtube https://www.youtube.com/watch?v=Iyio2jEPYOk

Gonna leave this here for anyone that stumbles on this thread in the future. Note, you have to edit the macro to tweak the RhythmTrack options.

Code: Select all

RhythmTrack:bars="120" click-track-dur="0" click-type="Metronome" high="84" low="80" offset="0" swing="0" tempo="30" timesig="4"
SetTrack:Name="click"
BeatFinder:thresval="65"
SelectTracks:Mode="Set" Track="1"
SetTrack:Name="beat"
SelectTime:End="0" Start="0"
SelectTime:End="0.017" Start="0"
Delete:

Post Reply