Automating Sample-loading for the Roland SP-404SX


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”):

  1. Using the Record button on the device to record from the line-in ports or the built-in microphone.
  2. 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:

  1. Map a drive letter to your mounted SD card. E.g. “D:”->”/media/tyler/SP-404SX”
  2. 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…

  1. Click the pad on the GUI.
  2. Click “Import”.
  3. Browse to the WAV.
  4. Click “Open”.

This becomes tedious and error-prone when dealing with a full bank of 12 pads.

I decided to automate the process.

xdotool and friends failed to handle the nuances of Wine so I decided to take the opportunity to learn Sikuli - a clever GUI automation tool that marries OpenCV with a WYSIWYG script editor.

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”.

Here’s the script for previewing and the script with all the graphics it depends on.

Information and Links


Other Posts

Write a Comment

Take a moment to comment and tell us what you think. Some basic HTML is allowed for formatting.

Reader Comments

Be the first to leave a comment!