I own a Roland SP-404SX Wave Sampler. It stores audio clips onto an SD card. There are two ways to assign new clips (“samples”) to the device’s buttons (“pads”):
- Using the Record button on the device to record from the line-in ports or the built-in microphone.
- Loading WAV files from a computer onto an SD card with Roland’s Windows-based Wave Converter utility.
Since I run Linux, I first tried BankRobber, an Adobe Air clone of Wave Converter which purportedly writes to the SD card using Roland’s proprietary file format. This failed for a reason I can’t recall.
Later, I discovered that Wave Converter runs just fine with Wine if you do two things:
- Map a drive letter to your mounted SD card. E.g. “D:”->”/media/tyler/SP-404SX”
- Run sync(1) before removing the SD card from your computer.
Recently I’ve been working on some projects that necessitate batch assignment of handfuls of WAVs from my laptop. Unfortunately, the Wave Converter utility is “manual” – for each sample you have to…
- Click the pad on the GUI.
- Click “Import”.
- Browse to the WAV.
- Click “Open”.
This becomes tedious and error-prone when dealing with a full bank of 12 pads.
I decided to automate the process.
The Sikuli script I wrote takes WAV filenames as commandline arguments and assigns each to subsequent pads.
One challenge I encountered was the “browse for WAV” file-finder dialog – it begins in the last-used directory and clicking arbitrary filenames with Sikuli seemed difficult. Luckily, the last-used directory and filename are stored in the Windows registry. So, I pre-populate these values with reg.exe, open the dialog, and simply click “Open”.