Rounding for Change Tempo

I am Truncating Silence on some audio tracks for my church, then I change the tempo to round up/down to the nearest 5 minutes. Right now I just have a reference table for the seconds so I know which is the next closest five minute increment. I am looking at the Macro option but Change Tempo parameters doesn’t directly allow a rounding option. I would imagine this would require the macro/script to read in the current length, then round to the next closest increment, compare that to the current value, and then calculate the percentage change and set that in the Change Tempo parameter. Any suggestions/help you can provide would be great. My table is below.
Min Sec
20 1200
25 1500
30 1800
35 2100
40 2400
45 2700
50 3000
55 3300
60 3600
65 3900
70 4200
75 4500
80 4800
85 5100
90 5400
95 5700
100 6000

Change tempo in Audacity adds audio artifacts: it sounds computery.
IMO don’t change tempo, just add some bumpers to fill time if you need duration of the shows to be an exact number of minutes long.

So Audacity’s macro facilities do not currently offer any decision making or parameter passing other than what you are aware of. To do what you want you would need to either use Nyquist or a (python) script.

A “Nyquist Macro” would probably not be too difficult, but why is it necessary to change the speed at all? Surely it will be better for the listener if the audio plays at the correct speed, even if the sections are a little more or less than multiples of 5 minutes :confused:

There’s some info in this topic that may help: https://forum.audacityteam.org/t/batch-processing-tempo-change-script/65489/1