SilenceFinder cancels macro execution?

Dear Scripting Ninjas,

Recently created a macro to handle batch processing.

Works great! -unless, it comes across a file that has "no silence’ to process (as it halts subsequent execution).

Does this mean I need to create a “Nyquist Macro” script to handle "null’ cases?
(-to allow handling groups of files that MAY / MAY NOT have silences to trim.)


Fwiw, tried this route, but have been having trouble getting (AUD-DO “SilenceFinder”) command working?

Might any kind soul have a link to a demo script using “SilenceFinder”?

(Found "InsertSilence.ny’ on the forum, but looks to be v3?)

-your assistance / wisdom is humbly requested!

: )
marcro-attempt.png
marcro-result.png

Is that because it is waiting for you to dismiss the “no Silences Found” message?
If you (manually) dismiss the “No Silences Found” message, does the macro continue and complete successfully or are there additional problems?

So I’ve been playing with macros a tad and I was thinking that adding a little bit of silence to every file might “fix” the problem.

The following macro should add 1 second of silence before and after the track if you have at least one second of audio to begin with:

SelectAll:
Duplicate:
Select:End="999999" Mode="Set" Start="1" Track="0"
Cut:
Select:End="1" Mode="Set" Start="0" Track="0"
Silence:Use_Preset="<Current Settings>"
Select:End="999999" Mode="Set" Start="0" Track="1"
Copy:
Select:End="1" Mode="Set" Start="1" Track="0"
Paste:
Select:End="1" Mode="Set" Start="0" Track="0"
Copy:
CursTrackEnd:
Paste:
SelectAll:
SelectTracks:Mode="Set" Track="1" TrackCount="1"
Silence:Use_Preset="<Current Settings>"
SelectAll:
MixAndRender:

I am sure steve knows a much easier way to do this. :slight_smile:

I hope this helps. :smiley:

Hello,

I have a similliar issue, if the audio file does not have clicks, the click removal halts the batch processing.
The expected behaviour is to continiue the next command and process all the files.

Nart

I don’t agree. If there’s a dialog window that requires a button to be pressed, then I’d expect the macro to wait for the button to be pressed.

If you are running a long batch processing task on a lot of files, and the script requires labels to be set by SilenceFinder, the script will obviously fail if SilenceFinder doesn’t find any silences. If the script fails silently, then you would never know until you manually check every file, but by then you may have deleted your source files, which could be a disaster.

I agree that how macros handle script errors could be improved, but that’s a much broader problem (and a much bigger development task) than just suppressing an error message in SilenceFinder.