Zoë Blade's notebook

Wavesplit

In a sample-first workflow, it's convenient to be able to take some sample fodder, and automatically split the recording up into one sample per hit. Automating this saves you a lot of time, and lets you concentrate on deciding which samples to discard and which to keep.

Sox is great for this sort of thing. Here's a handy script I wrote to use it to split up one .flac or .wav file into multiple ones, wavesplit.sh:

#!/bin/sh
sox $1 ${1%.*}-.${1##*.} silence 1 0.125 1% 1 0.125 0.25% : newfile : restart

If you copy it to your ~/bin directory, you can use it like this:

$ ls
recording.wav
$ wavesplit.sh recording.wav
$ ls
recording.wav
recording-001.wav
recording-002.wav
recording-003.wav

UNIX shell scripts: Wavesplit