Trimming multiple samples by the same amount

(Jez Gomez) #1

I have imported multiple stem wavs into separate instruments. Each of them has the same period of silence at the start and I want to trim the same amount from each sample in a reliable way (ie, without having to manually select the area by using the mouse). If batch trimming is possible too, this would be fantastic.

(Jesse Schilling) #2

xCleaner Tool

This Tool does a bit more than what you are asking, but has an option to trim leading/trailing silence.

(Jez Gomez) #3

Thanks @rainydayshirts but this doesn’t quite do what I want. The samples all have a differing amount of silence at the start, so I’m looking for a tool which will let me cut the a specific amount of time from the start of each sample. xCleaner looks cool though!

(Jesse Schilling) #4

So you still want some silence on some of the samples?

Edit: Found another tool on the forum that might be worth a look.

dSample Trim


Just keep in mind that you might have to ask @taktik for a link to the tool (unless someone has a copy) and it may not work (without modification) in the most recent version of Renoise.

(Also maybe consider an external command line program such as sox to trim a fixed length from the start of the wav files. Note that depending on how many wav files need to be processed, you may need to write a batch file/shell script to loop through the files.)

(Veggies) #6

I know you probably don’t want a recommendation for paid software but I’ve been using Goldwave for more than 15 years and you can do a great deal with its batch processing, including this, very easily.

(Jez Gomez) #7

Thanks everyone for being so helpful. What a nice community :slight_smile:

I’d read about dSampleTrim before but couldn’t find the link to the tool. And as @4tey says, it may not work with the latest version. In fact, I’m having problems with xCleaner freezing.

@vegeta897 - I used to use Goldwave back in the 90s! Incredible that it’s still going.

Omitted to say that I’m on a Mac. Think the quickest solution will be to use GarageBand. I can load all the stems and set the start point for each track really easily.

(Jesse Schilling) #8

There’s also always Audacity if we’re going 3rd party.

(Raul (ulneiz)) #9

Within the API are there any forms of …?:

  1. …determine the length of a sample.
  2. …cut the sample in said length (or in a shorter one).

I still do not know very well all the ins and outs of the API to manipulate samples. But if those 2 points are possible, it would be relatively easy to build a tool for this purpose.


Length of a sample might be:[1].samples[1].sample_buffer.number_of_frames

Cutting the sample data to a length I suppose you would have to create a new sample buffer, copy the sample buffer data you want into the new sample (within a loop) and then delete the old sample? Could be slow though on large samples with a large trim area and also doing it in a batch loop. Note that that was specified by re.dread with his dSampleTrim tool:

WARNING: Batch trimming samples can take quite a bit of time!

(Also quickly see trimming from sample_buffer )

(Jez Gomez) #11

Thanks @rainydayshirts - I have Reaper as well. Was hoping I’d avoid having to learn yet another package, that’s all :-/