Tip: Splitting into cuepointed section by batch process

GoldWave general discussions and community help
Post Reply
chrisjj
Posts: 115
Joined: Tue Feb 07, 2006 5:38 pm

Tip: Splitting into cuepointed section by batch process

Post by chrisjj » Sat Sep 13, 2014 7:58 am

Anyone else seeking to split tracks into an arbitrary number of cuepoint-marked sections using batch processing may find this method useful.

The snag in using BP for such is that each selection action addresses a cuepoint with a fixed name, and each process saves only one output.

My solution is for all cuepoints to have the same name e.g. #. The process retains from the cue point to the end:

Image

Though undefined behaviour, I find on V5.67 this always addresses the first cuepoint having the specified name.

A CMD batch file calls GW with /preset, in a loop, both saving the output file and feeding it as the input to the next GW call. The loop exits when the output file is empty of audio - in practice >22000bytes for WMA. This is detected by:

Code: Select all

IF %%~zG LSS 22000 
For an input track with n cuepoints named #, the results is n files where each one, i, contains the section of sound from the i'th cuepoint to the end.

If anyone can see an improvement of this, please say. I'd like a safer termination condition. Ideal would be an exit code from the GW batch process indicating cuepoint addressing fail, but GW does not provide that (yet).

Note: You can use more general names for cue points if you are sure to exclude numbers, and then address the cue point by ordinal, e.g. #2 here: http://i.imgur.com/dEHrN4z.png

Help says:
Add Edit
If using the Cue option, the first cue point matching the given name is used. If a number is given, cue points are searched for a name matching the number. If no such cue point is found, then the number is used as an index in the list of cue points. So if the number 6 is given, for example, a cue point with the name "6" is searched for first. If that name isn't found, then the sixth cue point is used.

Post Reply