Samples need to be 16 bit / 48kHz mono wav files.
Helper function to convert an audio sample to Alpha Base compatible format:
Tested only with
zsh. Add this function to your~/.zshrcfile for example (and reload withsource ~/.zshrc)
function wav2mono16bit48khzwav() {
INPUT=$1
OUTPUT=${INPUT:r}-16bit-48khz-mono.wav
ffmpeg -i $INPUT -acodec pcm_s16le -ac 1 -ar 48000 $OUTPUT
}Usage: wav2mono16bit48khzwav /path/to/sample.wav
Creates a file next to the original file named sample-16bit-48khz-mono.wav
Should also work with mp3 and other audio files as input
To convert an entire directory including subdirectories with samples:
Note that the Alpha Base doesn't support subdirectories, all samples must either be placed in the SD card root, or you can store samples in directories. Those can't have subdirectories, so samples should be placed max 1 level deep
# Go to your samples directory
cd /path/to/samples-directory
# (optional) Remove any .asd Ableton files if you want
rm ./**/*.asd
# Convert all wavs to 16 bit / 48kHz mono wavs
for f in ./**/*.wav; do wav2mono16bit48khzwav $f; done
# Or if you have both mp3 and wav files:
for f in ./**/*.{mp3,wav}; do wav2mono16bit48khzwav $f; done
# Remove the old (non-mono) wavs
for f in ./**/*.wav; do test "${f#*16bit-48khz-mono}" = "$f" && rm $f; done
# Rename all samples by removing "-16bit-48khz-mono" from the filename
for f in ./**/*.wav; do mv "$f" ${f//-16bit-48khz-mono/}; doneOr optionally do it all at once. I personally like the above approach because I want to check things before removing/renaming/etc.
# Go to your samples directory
cd /path/to/samples-directory
# Convert and replace all samples with 16 bit / 48kHz mono wavs
for f in ./**/*.wav; do
OUTPUT=${f:r}-16bit-48khz-mono.wav
ffmpeg -i $f -acodec pcm_s16le -ac 1 -ar 48000 $OUTPUT && rm $f && mv $OUTPUT ${f:r}.wav
doneNow you can copy the samples to the SD card for use on the Alpha Base 👍