[HOW TO] Trimming 360 samples from your tracks

HOW TO BATCH REMOVE 360 SAMPLES (WINDOWS):

  1. Install SoX (http://sox.sourceforge.net/)

  2. Browse to SoX install location, e.g. “C:\Program Files (x86)\sox-14-4-2”

  3. Create new batch file (.BAT) with the following contents:

    cd %~dp0
    mkdir trimmed
    FOR %%A IN (%*) DO sox %%A "trimmed/%%~nxA" trim 0 -360s
    pause

  4. Drag and drop files directly onto the batch file. Trimmed samples go to “trimmed” directory.

3 Likes

Hey there, interesting!

This would be for the end of the file? If it trims the beginning of the file this won’t work!

Here’s a link to the Mac ports. https://www.macports.org/install.php

Looks like you’ll have to download and install Xcode and the tools; the package installer of SoX for your MacOS system as well as building their own script to work with MacOS version.

Seems like an awful long haul for what could be a short slide with a DAW.

1 Like

Can I just rename a txt file bat?

EDIT: No it fails.

I get this error… sox FAIL formats: no handler for file extension `wavÈÃÏ’

Probably because I put it in Reaper first.

So I tried again with files that I didn’t load into Reaper, and I got a different error…

‘sox’ is not recognized as an internal or external command,
operable program or batch file.

I am in the sox folder next to sox.exe with my bat file in there too.

Hopefully a future release of Aeros splits this crossfade track to another file. No reason for this to be appended to this file.

2 Likes

Agreed!

Yes, the minus sign on -360s indicates that the end-point of the trim is counted backwards from the end of the file.

Yes, you absolutely can, but you need to make sure that you have “Hide extensions for known filetypes” set to OFF in Windows Folder Options.

I do not know what is causing your other issues. I built this batch based on the example batch included in the SoX directory and it worked right away. Try the batch-example.bat that comes with SoX and report back.

2 Likes

I fixed it. The fault was hard to spot, but when I converted a text file to a bat file the font was different. It used " " with a curl on them. Those curls messed up the code.

1 Like

Thank you for the feedback. The forum software made its own interpretation of my quotation marks. I wrapped the OP’s text in grave accents `` (looks like this) to remove the styling.

1 Like