Macro Help with Selecting Tracks

I have read tons of forum posts and tried several options, but I cannot for the life of me figure out something exceedingly simple.

I have a raw audio file that I want to duplicate, and then run a treble increase on one of the tracks and a bass increase on the other, before merging them back.

I have tried “Toggle Focused tracks” “select track start to end” “move focus to first track” etc and several combinations. It always either selects everything and does the effects on both tracks or it stops and says “Bass Treble needs a track to be selected.”

This should be this hard but unfortunately these macros are not as self explanatory as on face value.

So, what is the order of operations for this result?

The underlying problem that you have is the you should be using Select rather than Focus - as all Audacity’s effects work on Selections.

Focus is different from selection a bit of an oddity, it is there for providing something to work on for the focused track commands. Mostly these commands work on actions within the Track Control Panel for which there are normally no menu items (but you can turn on the Extra menus in View > Enable Extra Menus).
See this page in the Manual: Selecting Audio - Audacity Manual

I think the macro command that you want to add to your Macro is Select Tracks

I am no expert on how this command works, so you may have to play with it to suss it out.

Peter

I have tried using select tracks, and it works for the first track, but if I use it again and specify the last track it doesn’t do it. I just does it to both.

Do you have a simple order of operations I need to do to obtain the result I want?

@TudorAlexander

OK, so I’m always game for a little experimenting and this little macro just worked for me.

So I created a project with two tones

This is the macro:

And when I apply that Macro to the project I get:


A few things to note:

  1. the track counting for the tracks starts (for some odd reason) at zero - so the first track command is Track=0 and the second track command is Track=1.
    The manual does clearly state that this is the case, but I’ve no idea why it was implemented that way - seems odd to me.
    This is reminding me of my old programming days when arrays in Fortran started from one, but in Algol they started from zero.

  2. the second Select command for each track the Select Track Start to End is needed because without it for the second track the selection would be in track 2 but shortened to the length of track 1. I have no idea why !

  3. Obviously for this test I uses Fade commands just so I could easily see what is going on - you would need to replace these with your own required processing.

  1. Here is the .txt file of the Macro (which I got via the Export)
    image

Do let me know how you get on please.

Peter.

Excellent, I reproduced this and it works. Thank you very much for your help. However my question is how do you make sense of the “Select Tracks” option. The wording and setup is very confusing to me.

It has two options: First Track or Track Count. It doesn’t make sense to me why they have this labeling. I would expect to see a simple “Select Track #” or whatever. In your macro you just kept First Track and just changed the number to 1, which makes no sense to me as to why.

I also don’t understand the purpose of the second option, which is Track Count, and how that’s different from the first. Wouldn’t it make sense that if you have other tracks besides the first that you would use that option instead?

It’s because the TrackCount parameter tells the macro how many tracks to select starting from the one you are selecting - which in this case was Track=1 as that is the second track - so you get one track selected starting at track 2

Peter

If I understand it correctly it enables you to
a) select one channel of a stereo track by setting track count to 0.5
b) with multi-channel tracks (and yes you can manage those in audacity) I suspect you could cherry pick channels - but I’ve no real idea how.

Peter.

@steve

Is there a more elegant, more succinct, way of writing such a Macro?

Peter.

It was very confusing to me until I:
a) had a very careful read of the Manual
b) spent some time experimenting - and my early attempts failed miserably :wink:

I also note that it’s quite hard to navigate to the page in the Manual that documents this, I struggled a bit - I’ll see what I can do to improve that (I am the primary editor of the manual).

Peter

@TudorAlexander

And note there is yet another macro command that might be useful to you:


I have no idea right bow of how all of those parameters work, but note that it has the same stuff as the SelectTracks but also allows a time range in addition. I really have no idea what the High and Low do.

Also see the whole slew of select commands that are available for Macros.

Peter

So the “Track Count” tells the macro how many tracks to move upon the next selection. If it is set to default, which is 1, then it will move over 1 track - correct? But then why does it even exist as a clickable option? It seems then that you have to choose between the two, but if the Track Count parameter is already working in some way into the macro that just again makes no sense to me.

I think this could have been done much simpler. As it is now this is not intuitive whatsoever. All you need is “Select Track #” and set the number of the track so the macro knows which track to select. End of story in my opinion. If you want to select part of a stereo track then they can have that option in there, but either way could be much more simplified.

No, my understanding is that it tells the macro how many tracks to select with that particular use of the selection command - so you can get multiple tracks selected with the one macro command.

But I have not tested that - that

And an update re the “simple” Select macro command:
image
I am inferring that the High anf Low enable you to make a frequency rang selection.

See the Select Frequencies macro command:

Peter

See also the Selct Time macro command

From which I infer that the “simple” Select command is an amalgam of
a) Select Time
b) Select Frequencies
c) Select Tracks

Peter

Please list the exact and precise steps that you would use to do this manually, so that I know exactly what you want the macro to do.

I did in my original comment, which you quoted in your response. We figured it out though, it is the Select function not Focus functions.

If the issue is now solved, click the [✓] below the post that contains the solution so that others know that your question has been answered.

This topic was automatically closed after 30 days. New replies are no longer allowed.