Change tempo of all tracks, except one, at once to one specific length through macro

Hello,

I am using Audacity for 5 years now and started using macro’s and stuff. So I made an account because I have question that is not answered yet.

I am creating a macro and want to change the tempo of 8 tracks to the same length as the shortest one of all 8 of them at once. I have 9 tracks in total, so one track remains unedited.

How am I going to do that?
From what I now I can only change tempo in percentages and not in set values.
Does anyone have a solution for this? That would be really appreciated.
Thank you.

I have Audacity 3.2.1

Also → How can I put in macro that all these tracks slide 2 seconds to the right at once? And then have like 2 seconds between these 8 tracks and one headtrack on the end? (the remaining headtrack needs to be deleted, only want 2 seconds remaining on the end).

That can’t be done with a normal Audacity macro.

Audacity macros provide a way to run a list of commands. The commands run in strict sequence from first to last. The entire macro must be fully defined before running the macro. There is no facility for “branching”, changing effect parameters on the fly, or any other “conditional logic” - it’s just a list of commands.

For more complex automated tasks, you would need to use some kind of programming language to send the commands. Audacity has a programming built in called “Nyquist”, or you could use an external language such as Python, or you could use an automation app such as AutoKeys.

Personally I’d just process the tracks one at a time manually.

Okay yes I already did that part manually, and automated the rest of the process.
The thing is it is a process I do a lot so I try to incorporate as much automation as possible.
Thank u anyways.

Other question:
How can I slide 8 selected tracks 2 seconds to the right?
The selection part works, only the sliding I need to know what command that is? The sliding command is kind of complicated lol.

Assuming that all of the tracks start at time = 0, here’s a macro:
move to right 2s.txt (108 Bytes)

Oh thank U =D I have 9 tracks, the first one needs to stay at time 0, the other 8 from time 0 to 2.
In my macro I already selected the 8 tracks, so is it still correct? I think I need to remove the select all part?

This is my macro:

Focus to first track
Focus to next track
Select End = 0 Mode = Set Start = 0 TrackCount = 8

Your macro.

This was my original macro:

SelectAll:
SelectTime:End="2" RelativeTo="ProjectStart" Start="0"
Copy:
CursTrackStart:
Paste:
SplitDelete:

but you now want to deselect the first track, so…

SelectAll:
SelectTracks:Mode="Remove" Track="0" TrackCount="1"
SelectTime:End="2" RelativeTo="ProjectStart" Start="0"
Copy:
CursTrackStart:
Paste:
SplitDelete:

Notice that the second command removes the first track (track index “0”) from the selection.

Hi thank u it works =D.
Other question I am using the duplicate function in one of my macros and then audacity gives duplicate without the audio in it (or does other weird things). I think it is a bug/glitch around the duplicate function.
How can I work around it?

I have 7 tracks.
The last two need to be duplicated.
I tried deselecting everything and then select the last track, I tried only the focus but that does not seem to work.
It does work if I put it after the command: put track one higher, it then duplicates track 5 (instead of 2 which is selected).
So it seems completely random.

UPDATE: I already solved it with your previous macro, it had to do with the selecting part.

Never mind I solved it with your previous macro, it had to do with selecting it.

Hey I was wondering, since I cannot automate the tempo effect;
Is it possible to set all tracks to one specific time length at once by hand?

For example:
I have 8 tracks and they are all different time lengths.
I want all of them to be the same time length as the shortest one.
The shortest one is 1 hour.
So I want the other 7 tracks to be exactly 1 hour long by changing the tempo.

What I do now is that I do all of them separately, but maybe I can do them all at once (that would be much faster).

Also: How can I slide page to the right, which command?

Thank u.

?

The Change Tempo effect stretches according to the “Percent Change” setting. The “From” and “To” length settings are just a convenience to save you having to work out the percentage yourself.


If you do them all at once, each track will be stretched by the same percentage, which is not what you want. If the tracks are different lengths, you will need a different percentage change for each.

As I wrote previously:

For more complex automated tasks, you would need to use some kind of programming language to send the commands. Audacity has a programming built in called “Nyquist”, or you could use an external language such as Python, or you could use an automation app such as AutoKeys.

Okay thank u! Than I know I automated everything I can for now.

Hey we are a year farther now. Are there any changes in the newer audacity versions that have these settings included or do i still need Nyquist? And if so how do I do this?