Possible problem with CursTrackEnd: command

Hi all,
I’ve got a macro question using 3.2.3.
The process I’m trying to speed up is checking the lead-ins and lead-outs on a group of songs to see if I need to do any fading in or out. Applying a fade to all is not appropriate here, this is just a manual check to decide what, if anything, is appropriate. I created two macros in 3.2.3, one to step through the lead-ins and another to step through the lead-outs.
I’ll load from 6 to 20 songs (one album) into Audacity, then solo the first one, spacebar to play, spacebar again to stop, then hot key the lead-in macro, spacebar to stop until the last track.
The lead-in macro works.
NextTrack:
TrackSolo:
CursTrackStart:
Play:
The one for the lead-outs doesn’t work however. Here I’ll manually start playing near the end of the first track, spacebar to stop (unless it’s the longest track) and then hot key the macro. The problem seems to be with the CursTrackEnd: command as it goes to the end of the last (bottom) track then jumps left from there. If I omit the CursorLongJumpLeft:, it just goes to the end of the last track. I expected CursTrackEnd: to take me to the end of the soloed track. The CursTrackStart: is only there in case the curser is already to the right of the soloed track end, but it probably isn’t needed.
NextTrack:
TrackSolo:
CursTrackStart:
CursTrackEnd:
CursorLongJumpLeft:
Play:
Am I missing something?
Probably not related, but the Skip to End button on the transport toolbar always takes the curser to the end of the longest song currently loaded even if a shorter one is soloed. Is that the way it’s intended to work?
Thanks, gws

The command reference is here: Scripting Reference - Audacity Manual

Note that the command CursTrackEnd: “Moves the cursor to the end of the selected track” (not the “soloed” track and not the “focused” track).

NextTrack: moves focus to the next track, but you also need to deselect the previous track and select the new track.

This should do it:

SelectNone:
ShiftDown:
TrackSolo:
CursTrackEnd:
CursorLongJumpLeft:
Play:

but better would be to select the final 15 seconds rather than just setting the cursor position. Playback will then automatically stop at the end of the track:

However, there does appear to be a bug in that ShiftDown: is not working correctly for me.
Let me check the bug tracker to see if there is any information about this …

Yes, here it is: Extra menu commands for Move Focus to Next/Previous and Select - do not make the selection · Issue #2363 · audacity/audacity · GitHub

Now to see if I can find a workaround…

I can’t find an easy workaround - moving focus to the next track is simply not working.

It sort of works for me, but not quite like it should.
On pressing “Space” to stop playback, focus moves to the next track and solo’s that track. Fortunately this problem does not happen if I use the Stop button rather than pressing “Space”.

Try this macro:
Play end of next track.txt (392 Bytes)

Steve,
Thanks for the assist. The Nyquist macro works from track 1 to track 2 only if track 1 is selected before invoking it. Next pass, it doesn’t select track 3 and consequentially doesn’t position the cursor as expected. On some successive iterations it skips over some tracks???
I tried many different versions of my macro before I first posted. Many of them included various selection commands. No joy there. Reading the bug report you referenced seemed to verify my suspicion that the selection commands may be the problem.
I wonder if the CursTrackStart: command is also affected. Perhaps it seems to work for me because the default start point is time 0. Since all of my tracks begin at time 0, I wouldn’t see a problem. So I shifted one track the right about 10 seconds and it started playing at time 0, not the beginning of the track. Sorry to add to the problem, or you’re welcome for an additional clue, don’t know which one is appropriate.
Thanks to the team for adding so much new functionality to the macros compared to chains in version 2. Guess the peril of adding all that is the possibility of surprises like these.
Thanks for looking into it!
gws

I assumed that track 1 would be selected, given that you said that you were previewing the ends of each track in turn. More generally, the macro assumes that you have a selection in a track and the macro should play the end of the next track.


More to the point in my opinion is that there’s been no attempt to fix it since it was reported over a year ago, and an awful lot of new bugs, some quite critical, have appeared since Audacity has been under its new governance.