Macro Not Selecting Appropriate Tracks

I’m probably doing something that is not necessary, but I have an audio file of heavy breaths that I removed from a podcast. My podcast now has spots where the breaths were that have no audio and so it sounds disjointed when listening to it. I wanted to add back in some noise (I’m thinking Brownian) where the breaths were taken out.

I can do it fairly quickly using AutoDuck, but I wanted to create a Macro to do it. My initial Macro commands are as follows:

  1. Duplicate
  2. Move Focus to Next and Select
  3. Duplicate
  4. Move Focus to Next and Select.

That leaves me with three copies of the same track and the last track has the focus and is selected – which is what I expected.

If I then add another step to the Macro of “Move Focus to Previous and Select”, I end up with the last two tracks selected and focus on the second track.

I had hoped that the last track would not retain its selection and that the second track would have focus and would be selected.

Is it my misunderstanding of what the Macro commands should be doing, or is the “Move Focus to Previous and Select” not working correctly?


Mike (Macro Below)


For step 4, use:
Select Tracks Mode=“Set” Track=“1” TrackCount=“1”

If the next command requires the selected track to have focus, then you will need to also add (after “Select Tracks”)
Set Track Status Focused=“1”


You may not need to use a Macro at all. Have you considered using the “PunchCopy.ny” / “PunchPaste.ny” effects instead?

Thanks Steve,

I have used Punch-Copy-Paste on some other areas that needed to be filled, but this particular audio has quite a few bad spots and doing them individually would take quite a while.

I did use the approach you mentioned to Select Tracks, and that works in the Macro if you know the position of the track within the project and/or if the tracks are always in the same position in the project. Is there a way to select the track that currently has the focus but make sure that any other tracks in the project aren’t selected? I can’t seem to get the macros to do that.



For professional quality, “quite a while” editing is normal. People tend to be less critical of podcasts than say audiobooks so it’s reasonable to take a few shortcuts.

I don’t think you can do that with an ordinary Macro.

What you are asking is “conditional logic”. In pseudo code:

IF [track has focus] 
THEN ( [deselect current track] AND [select previous track] )

Normal Macros are “just a list”. For logical operations you need to use a proper programming language such as Nyquist or Python.

Thanks Steve

Sometime I’ll look into those other options - in the meantime, I think I’m able to use the Macro approach with a bit of manual intervention to accomplish what I want.