Automating Repetitive Tasks

I searched for automate but found answers for specific things people were trying to do.

Is there a way to automate simple processes in Audacity… like if you load up a stereo file, split is to mono, invert right channel, amplify, echo etc…

I want to turn a number of stereo files into 5.1 and I go through the exact same process every time.

Thank you.

What version of Audacity do you have, what computer and what operating system?

– Bill

I am currently using the Beta 1.3.12 on a Mac but I would be willing to use any version or any operating system if I could automate this process.

I am trying to automate this task : https://forum.audacityteam.org/t/convert-audio-to-5-1-as-in-this-other-thread/16580/1

Even if there is a different program I should be using (would be willing to purchase) or a different program that can automate tasks in any program (ie: take control of mouse and repeat actions).

I am open to a bunch of different options… but I do like Audacity!

You probably can’t do what you want with Chains. Short of hacking the source code, you could try QuicKeys. http://startly.com/products/quickeys/mac/4/

Not free ($60) but should be able to manipulate all of Audacity’s menus and buttons. It has a free trial period so you can be sure it will do what you want.

– Bill

That is the type of program I was looking for.

Thanks for taking the time to respond!

Please let us know how you get on with QuicKeys. I’ve played with it briefly trying to control Audacity. What I tried worked fine, but I know that some interface elements in Audacity may not be exposed as “controls” and QuicKeys may not be able to see them.

– Bill

Hey Bill,

As a payback for all the help I’ve received, here are the commands I am using to convert Stereo to 5.1 in Audacity. These work on my system (which is a MAC) but I don’t see why they shouldn’t transfer to another. The settings probably require tweaking, and could sound better, but they are good enough for what I need.

My next step is to try and automate this with Quickeys. I used as many keyboard commands as possible but there is one thing that I think I have to do with the mouse… and that is to split a stereo track (if you know a shortcut, let me know).

If anyone would like to tweak this to make it sound better, please let me know what can be changed. I’d like this to sound as great as possible.


Using Audacity 1.3.12 to Simulate Surround with a Stereo file

NOTES:

I have to hold Fn to use my F1,F2 etc… keys
I have enabled multi-channel export

Programmed Shortcuts:
Shift+Cmd+0 = Stereo Track to Mono
Shift+Cmd+9 = Mix and Render

Commands in CAPS must be done with the mouse from the track drop down
Commands in quotations are simply typed without the quotations


2x Cmd+D
SPLIT STEREO TRACK
Shift+Cmd+A
2x Down
Return
Shift+Cmd+0
Shift-K

Ctrl-Fn-F2
8x Right
3x Down
Return
4x Fn+Del
“-4”
Return

Shift+Cmd+A
Down
Return
Shift+Cmd+0
Shift-K

Ctrl-Fn-F2
8x Right
Down
“low”
Return
Tab
4x Fn+Del
“180”
Return

Shift+Cmd+A
Down
Return
Shift-K
SPLIT STEREO TRACK
Cmd+D
Shift+Cmd+A
Down
Return
Shift-K

Ctrl-Fn-F2
8x Right
Down
“i”
Return

Ctrl-Fn-F2
8x Right
3x Down
Return
4x Fn+Del
“-3”
Return

Shift+Up
Shift+Cmd+9
Return
Shift+Cmd+0

Shift+Cmd+A
2x Up
Return
Shift-K

Ctrl-Fn-F2
8x Right
Down
“i”
Return

Ctrl-Fn-F2
8x Right
3x Down
Return
4x Fn+Del
“-3”
Return

Shift+Down
Shift+Cmd+9
Return
Shift+Cmd+0
Shift+Up

Ctrl-Fn-F2
8x Right
Down
“de”
Return
2x Fn+Del
“10”
3x Tab
2x Fn+Del
“1”
Return

Ctrl-Fn-F2
2x Right
Down
“ex”
2x Up

Return
Return
Return
Return

Wow! Nicely done. Just a few questions.

– this assumes that the single stereo track is selected before you start
2x Cmd+D – at this point you have 4 stereo tracks, all selected
SPLIT STEREO TRACK – Split which stereo track? I’ll assume the top one
Shift+Cmd+A – unselect all, top track has keyboard focus?
2x Down – move focus to third track
Return – select it
Shift+Cmd+0 – Tracks > Stereo to Mono
Shift-K – select the track just converted to mono

– a very sneaky way of selecting the Amplify effect!
Ctrl-Fn-F2 – selects the Apple menu
8x Right – selects the Effect mneu
3x Down – selects the Amplify effect
Return – chooses the Amplify effect
4x Fn+Del – removes test from the “Amount” box
“-4” – enters “-4” in the amount box
Return – apply the Amplify effect

Shift+Cmd+A – unselect all
Down – since the mono track has focus, this moves down to the (now) fourth track, which is a copy of the original
Return – select the track
Shift+Cmd+0 – Tracks > Stereo to Mono
Shift-K – select the track just converted to mono

– OK, I’m getting the hang of this :wink:
– apply the Low Pass Filter with cutoff 180 Hz to the track
Ctrl-Fn-F2
8x Right
Down
“low”
Return
Tab
4x Fn+Del
“180”
Return

Shift+Cmd+A
Down
Return
Shift-K – bottom stereo track (last remaining copy of the original) is selected
SPLIT STEREO TRACK – assume you mean to split the selected track?
Cmd+D – now have 4 copies of that split stereo track - 2 left and 2 right
Shift+Cmd+A
Down
Return
Shift-K - you’ve selected the right channel of the split stereo track

– apply the Invert effect
Ctrl-Fn-F2
8x Right
Down
“i”
Return

– and apply the Amplify effect with gain -3 dB
Ctrl-Fn-F2
8x Right
3x Down
Return
4x Fn+Del
“-3”
Return

Shift+Up – select the left channel of the split stereo pair
Shift+Cmd+9 – mix and render, creating a new stereo track at the bottom of the track area
Return – select that new track
Shift+Cmd+0 – convert to mono

– select the left channel of the remaining split stereo pair
Shift+Cmd+A
2x Up
Return
Shift-K

– invert it
Ctrl-Fn-F2
8x Right
Down
“i”
Return

– amplify by -3 dB
Ctrl-Fn-F2
8x Right
3x Down
Return
4x Fn+Del
“-3”
Return

– select the stereo pair, mix and render and convert to mono
Shift+Down
Shift+Cmd+9
Return
Shift+Cmd+0
Shift+Up

– at this point the bottom “mix” track is selected
Ctrl-Fn-F2
8x Right
Down
“de”
Return
2x Fn+Del – you are in the “decay” box. This box could contain any value, so should do more deletes to clear it?
“10” – type “10”
3x Tab – leaving the default delay time and pitch change? Shouldn’t you set these just to be sure?
2x Fn+Del
“1” – 1 echo
Return

Ctrl-Fn-F2
2x Right
Down
“ex” – selects “Export Multiple”
2x Up – go up to the “Export” command

– all these returns assume that the export location is OK and channel mapping is OK.
Return
Return
Return
Return

After all this is done, you have 6 tracks in the project. What are they? They appear to be (from top to bottom), left-front, right-front, center, LFE, left-rear and right-rear. Why the delay in only one rear channel?

– Bill

Shift+M – opens the track menu
UP UP Up – Split Stereo to Mono
or
UP UP UP UP – Split Stereo Track.


Is that a standard shortcut or a custom one?

Regarding QuicKeys …

If you set a standard window height (say, the height of your monitor - just use the green zoom button), then do a SHIFT+CMD+F (fit vertically) before accessing the Track Control Panel drop down menu (to do the split stereo track), the drop-down menus will be in known locations in the window at that point in the process. If you then click on the drop-down menu and select “Split Stereo Track”, QuicKeys will register that as a mouse-down and mouse-up at specific screen or window coordinates, and will effectively access the menu for you. This assuming you use the “Record Me” feature of QuicKeys. At least I think it should - my trial copy has expired and I can’t test it. :frowning:

– Bill

Nice! Missed that one. Makes my comment about QuicKeys and mouse events irrelevant. :frowning:

It’s a custom shortcut he set. As he also did for Mix and Render.

– Bill

I thought it looked unfamiliar :stuck_out_tongue:

I don’t know if it works on Macs, but for Windows and Linux:

Alt+T
Down – Stereo to Mono

Alt+T
Down Down – Mix and Render

(a bit off-topic, but an interesting shortcut that I regularly use: Ctrl+Shift+M – Mix to new track – I guess you’d write that as Cmd+Shift+M ?)

I’ve never played with keyboard menu access on Mac before, so I’m learning too.

Mac doesn’t have the “menu accessors” (or whatever they’re called - the underlined letters in the menus and menu items).

CTRL+F2 accesses the menu bar and selects the apple menu. The OP is adding the “fn” key because he has his function keys set to do the “special functions” that Apple assigns, such as volume up/down, brightness up/down, and has to add the “fn” key to make them behave as generic function keys. I have my Mac set the opposite way.

To access the tracks menu you can do RIGHT six times, or type “trac” (to differentiate it from the Transport menu). You then have to do DOWN to open the menu, then DOWN as many times to get to the menu item, or quickly type enough characters to unambiguously choose a menu item.

Yes, I use SHIFT+CMD+M more often than Mix and Render.

– Bill

Hey Bill,

I put some of my responses in here in Bold and Caps… not to be rude but just so you could see them over your bold comments (I’m not to used to multiple responses).

Shift+M – opens the track menu
UP UP Up – Split Stereo to Mono
or
UP UP UP UP – Split Stereo Track.
/quote]

Ah ha! That does work on the MAC. Therefore, no mouse manipulation needed!

Alt-T doesn’t seem to work on the mac (I also tried the other buttons and T)

The mix to new track does work though! I may be able to use that too.

Haha. That seems like something I should have figured out… tells you how much of a n00b I am with this program.

All of these have helped a lot.
In the next little while, I will revamp my commands and repost them… maybe after I get my cables and can fool around with the delay parameters a bit more.

Thank you both for your expertise!

Two other things I did not address.

#1 - Steve… in my method you can see that I went with what I originally thought the person was trying to explain in his stereo to 5.1 thread, and not what you said he may have been explaining (although I know you were not certain either https://forum.audacityteam.org/t/convert-audio-to-5-1-as-in-this-other-thread/16580/1). This is not because I think my explanation was right but only because I couldn’t hear enough of a difference between the two methods to warrant the extra steps. Your explanation may in fact be more precise.

#2 Quick Keys

I tried out Quickeys and I tried to tighten the script to do this. It was kind of frustrating because I had to put a lot of pauses in. It would work sometimes, but not others. So, in the end, I just put a 0.5s pause in between most commands and told myself that I will just have to wait 2 minutes to get a song done. This isn’t bad for me, because I only do a few a week. If needed, I may tighten it up.

So, Quickeys seems to be working consistently now, but I will keep trying it for the trial period. There are a few different ways to do things in this program and I doubt I am using the most efficient. I am pretty certain I will purchase it even if just to accomplish this.

There is “chain” for batch processing in Audacity,

(personally I couldn’t get "chain"to do what I wanted: the list of processes which can be added to a chain of commands is limited).

However you may be able to automate part(s) of your repetetive processing by defining one or more chains.

http://manual.audacityteam.org/index.php?title=Edit_Chains

Yes, missed the SHIFT, so delay is applied to both tracks.

– Bill