Macros consisting of existing Audacity shortcuts
Posted: Sun Jan 19, 2014 2:29 pm
Moderator Note: Moved to "Adding Features"
Over time, quite a few people have tried various ways to script Audacity.
For me, the need was Punch and Roll editing. Someone posted a way to do this with a 3rd party program in Windows, but I am on a Mac.
So, I wrote my own using AppleScript http://www.stevenjaycohen.com/2014/01/1 ... n-mac-osx/
But, I got thinking about this...
My script relies almost entirely on shortcuts already built into Audacity (see below);
So, if Audacity would allow macros consisting of the following:
-Stringing built-in Audacity shortcuts together
-Access to Cut/Copy/Paste from the host operating system
-Some kind of pause/wait command
Then, people like me could write/share Macros that would work in a way similar to Chains.
What do you think?
Over time, quite a few people have tried various ways to script Audacity.
For me, the need was Punch and Roll editing. Someone posted a way to do this with a 3rd party program in Windows, but I am on a Mac.
So, I wrote my own using AppleScript http://www.stevenjaycohen.com/2014/01/1 ... n-mac-osx/
But, I got thinking about this...
My script relies almost entirely on shortcuts already built into Audacity (see below);
Code: Select all
keystroke "k" using {shift down} -- Select to end of VO Track
keystroke "z" -- find Zero Crossing Cut
keystroke "x" using {command down} -- Cut the Audio
keystroke return -- Disarms VO Track
keystroke "b" using {command down} -- Add Label to Label Track
keystroke "?" -- Name Label
keystroke return -- Saves Label
keystroke return -- Disarms LABEL Track
keystroke (ASCII character 30) -- Up Arrow selects EDIT Track
keystroke return -- Arms EDIT Track
keystroke "v" using {command down} -- Pastes to EDIT Track
keystroke return -- Disarms EDIT Track
keystroke (ASCII character 30) -- Up Arrow selects VO Track
keystroke return -- Arms VO Track
keystroke ",,,,," -- back up 5 seconds
keystroke " " -- Start playback
delay 5 -- wait 5 seconds until end of playback
keystroke "a" using {shift down} -- stop Playback & set cursor
delay 1 -- needed or the following command does not work
keystroke "r" using {shift down} -- Record from end of track
-Stringing built-in Audacity shortcuts together
-Access to Cut/Copy/Paste from the host operating system
-Some kind of pause/wait command
Then, people like me could write/share Macros that would work in a way similar to Chains.
What do you think?