Since I mostly use my Eurorack system as a giant, impractical, and expensive drum machine, Erica Synths’ Sample Drum has quickly become one of my favorite modules. I’m pretty skeptical of any menu-driven modules but navigating around is intuitive and having a nice screen makes everything super easy. The CV inputs, onboard effects, and performance mode give you a ton of flexibility. I’d want a rack full of them!

(Side note: I wish Erica open sourced their firmware. This module seems like it would be an ideal platform for homebrew projects.)

If you’re impatient like me, you probably dropped a few gigs of samples onto the SD card, and then got mad when the Sample Drum failed to load some of them. Well, a quick check of the manual makes it clear that the module expects 48kHz 16bit mono wav files. Lower sample rates are ok, but I apparently have a lot of 24bit drum samples lying around. The module will also load one channel of a stereo file, but it will make you pick and who has time for that?

I dealt with a similar challenge with the Bastl grandPA and wrote a ruby script to use sox to convert files but that was like 2 computers ago! A quick search revealed this blog post that actually solves the problem completely. But I wanted to tweak some of the logic in the script and I’m too dumb to start hacking bash scripts. Let’s hack ruby instead:

require 'shellwords'
require 'fileutils'

dir = ARGV[0]&.strip
unless dir
  puts "tell me the directory dude!"

dir.gsub!(/\/$/, '') # remove trailing slash
output_dir = dir + '-CONVERTED'

files = `find #{dir.shellescape} -name "*.wav"`

files.each_line do |f|
  next if f =~ /\._/
  new_file = f.gsub(/^#{dir}/, output_dir) # switch to the output dir
  new_file.gsub!(/\s+/, '') # remove whitespace
  new_dir = File.dirname(new_file)
  FileUtils.mkdir_p(new_dir) unless

  cmd = "sox -G #{f.shellescape} -t wav --norm=-1 -b 16 -r 48k -c 1 #{new_file.shellescape}"
  puts cmd
  puts `#{cmd}`

If you save this as convert.rb and run ruby convert.rb my-drum-samples it will normalize & convert all the samples in that directory and maintain the internal directory structure (these things are usually grouped by sub directories for kicks, snares, etc) and drop them in my-drum-samples-CONVERTED. It will also remove whitespace from directory names to make them easier to see on that little screen. You can rename that directory to something short, drop it on your SD card and you’re good to go.