How to bulk resample audio files?

Having sample from multiple sources, I struggle with the sample rate being handled differently across machines. For example, I’ve just grabbed ~200 samples from N64 games they’re at different sample rates (up to 92 kHz). Let’s say I want to use them on the Polyend Tracker which accepts only 44.1 kHz.

How can I resample audio files in bulks? By just setting a targetted sample rate. If I can have a high pass filter at 200Hz that would be gold.

on Linux, i would do it with command line and sox.
don’t know about mainstream OS.

1 Like

I was about to script with librosa
Which command line tool are you using?

Another vote for SOX.

1 Like

Using Twisted Wave which is good for applying a sequence of actions to numbers of files.

Here you go:

Thanks folks

Soundforge can do batch processing and scripting.

Think you can do that in audacity. Not sure, but worth checking out

1 Like

Audacity I believe can do it. It’s been a while but I’m very sure. Search google for “audacity batch conversion” also I -believe- there is scripting / tools. So say convolution reverb go from 0-100% by 10% and have 10 samples with varying degrees of convolution reverb :star_struck: load them up and have fun going in and out of a sonic dream.

Depending on what daw you have as well there may be scripting abilities or batch export. Like flstudio sliceX export for common use and I believe you can set the sample rate for export. Just drag a bunch in and drop down and hit go.

Also don’t forget this is a challenge that has been seen before. Maybe a windows powershell script. Depends on how quick and dirty or how deep you want to go. If you need to do it all the time with very specific needs then I’d search for a dedicated tool and that tool, depending on how elaborate it is, may cost money. Lots of ways though.

Went with SoX, very nice tool. I’ve shared the script here:

You can easily re-adjust to your needs.

4 Likes

sox +1

code example:

cd ~/Documents/moreDrums/

ls

mkdir converted

for file in *.wav; do sox $file -c 1 -r 48000 -b 16 converted/$(basename $file) -V; done

Rogue Amoeba’s Audio Fission tool can apparently do batch conversions. I haven’t tried it myself, but they offer a free trial: