Hacking The Wavedrum
Hacking The Wavedrum
https://elephly.net/posts/2013-08-11-hacking-the-wavedrum.html 1/10
2/17/2018 Hacking the Wavedrum
Once the rim and drum head are out of the way, one can already see
much of the main board, but access is denied by a transparent plastic
disk. In my instrument the plastic disk was only screwed to two posts
although there are holes for seven screws. The heads of the two screws
are covered with adhesive pads that can easily be removed to undo the
screws. (Don’t worry, the glue on the pads is strong enough to put
them back on when you’re done.)
Warning: if you are following these instructions, at this point, I believe, you might be
voiding your warranty. If you’re careful and you don’t tell anyone, nobody should ever
notice. Note that I cannot be made responsible for any damage to your device that may
result from following these instructions.
https://elephly.net/posts/2013-08-11-hacking-the-wavedrum.html 2/10
2/17/2018 Hacking the Wavedrum
the micro SD card won’t be recognised. (If you’re unsure whether the
card is recognised by your system check the output of dmesg.) Even-
tually, the card was recognised as /dev/sdb1. (/dev/sdb is the SD
card reader device itself.) As this is my only Wavedrum and I intend to
use it for years to come I decided to be especially careful this time and
only operate on a copy of the card. The Wavedrum’s card reader is per-
fectly capable of reading 8GB micro SD HC cards, so if you want to
play with the data on the card I recommend mirroring the original card
image onto whatever micro SD card you have at your disposal and
play with that instead of the original card. To create a block level copy
of the card I did notmount the filesystem and simply executed the fol-
lowing command:
dd if=/dev/sdb1 of=wavedrum.img
This instructs dd to copy all blocks from the input device file (if,
i.e. /dev/sdb1) to the output file (of) of the name wavedrum.img.
Dependent on the number of disks on your system, the input device
file may have a different name. Check the output of dmesg | tail as
you connect the card reader to see which device node is created for the
micro SD card. Note that this blindly copies everything on the micro
SD card, not just files that are available through the FAT32 filesystem.
Hence, the size of the image is quite a bit larger than the sum of all
files on the mounted image (502,145,536 bytes vs 234,479,878 bytes).
Before continuing, please put the micro SD card back into the Wave-
drum’s card reader and lock it to prevent it from being damaged
(things can get messy, you know). Going forward, we only need to
mount the image to access the data stored on the card. Run the follow-
ing as root to mount the card image as a read-only filesystem:
mkdir wavedrum
mount -o loop,ro wavedrum.img wavedrum/
/
├── ( 16) CALIB.BOR
├── ( 16K) Factory
│ ├── (192K) F_INFO.BOR
│ ├── ( 57K) F_INST_H.BOR
│ ├── ( 57K) F_INST_R.BOR
│ ├── ( 16K) F_PROG.BOR
│ └── ( 88) F_USER.BOR
├── ( 57K) INST_H.BOR
├── ( 57K) INST_R.BOR
├── ( 16K) LOOP
│ ├── (744K) LOOP0001.BIN
│ ├── (402K) LOOP0002.BIN
│ ├
https://elephly.net/posts/2013-08-11-hacking-the-wavedrum.html 4/10
2/17/2018 Hacking the Wavedrum
00000000 | 00 00 00 64 00 00 00 67 00 00 00 7b 00 00 00 6c
00000010 | 00 00 00 65 00 00 00 68 00 00 00 71 00 00 00 7a
00000020 | 00 00 00 84 00 00 00 8c 00 00 00 8b 00 00 00 95
00000030 | 00 00 00 00 00 00 00 00 00 00 00 75 00 00 00 26
00000040 | 00 00 00 07 00 00 00 14 00 00 00 07 00 00 00 14
00000050 | 00 00 00 05 00 00 00 64
Every 8 digit block (4 byte) is used for one slot. We can see that the
first slot in bank A is set to programme 100 (0x64 hex), the second to
programme 103 (0x67 hex) and so on. As the Wavedrum only allows
for 12 slots to store programme identifiers, only the first 48 bytes are
used for programmes. The remaining 40 bytes (starting at 0x30) are
used for global parameters that can be adjusted in “global” editing
mode. The global parameters are stored in this order:
delay pan
aux input level
loop phrase select
https://elephly.net/posts/2013-08-11-hacking-the-wavedrum.html 5/10
2/17/2018 Hacking the Wavedrum
Audio data
All files in the LOOP directory as well as WD2_DATA.BORcontain raw
audio data. Unfortunately, I haven’t quite figured out the format yet,
but you can listen to the clearly recognisable loop patterns
with play (part of the SoX applications):
04 dc 10 d3 uU vV 5W 95 01 d4 00 d0 30 f8 22 b5
46 95 56 95 57 95 57 95 d6 2e 56 95 56 e2 57 95
54 95 46 95 32 f4 22 f4 xX yY 5W 95
With a few exceptions (namely 0009, 0025, 0027, 0030, 0033, 0036,
0049, 0054, 0064, 0082, 0091, 0103, 0104, 0107, 0108, 0127, 0128,
0129, 0130, 0131, 0132, 0135), vV equals yY in most loops. It seems
that loops with the same number of bytes have the exact same numbers
for uU, vV, W, xX, and yY. This is especially apparent in the loops
https://elephly.net/posts/2013-08-11-hacking-the-wavedrum.html 6/10
2/17/2018 Hacking the Wavedrum
0127 to 0132 (inclusive), which are all 192,010 bytes long and all have
the values 54:7b:54 for uU:vV:5W and 88:78:54 for xX:yY:5W.
Clearly, more work is required to figure out the complete format of
these loop files. Once this is understood we could use custom loops
with the Wavedrum.
The raw audio data in WD2_DATA.BOR suffers from the same prob-
lems. Although the data can be interpreted as raw audio, the sound is
distorted and playback is unnaturally fast.
System files
I don’t know what SYSTEM/WDORS110.BIN is used for. The only use-
ful string contained in the file is “BOOTABLE”. Your guess is as good
as mine as to what it does.
SYSTEM/VERSION.INF is only 16 bytes short and pretty boring as it
contains just what the name implies: version numbers.
02 02 01 10 02 02 00 00 57 44 4f 52 00 00 00 00
Some of the strings embedded in the firmware are file names, some of
which are not available on the micro SD card. This includes the fol-
lowing files: SYS00000.BIN, SYS00100.BIN, SYS-
TEM/WDORS100.BIN, SYSTEM/WDX_M100.BIN, SYS-
TEM/WDX_S100.BIN, and SUBXXXXX.BIN (a pattern?).
https://elephly.net/posts/2013-08-11-hacking-the-wavedrum.html 7/10
2/17/2018 Hacking the Wavedrum
This procedure has allowed me to figure out in what order the parame-
ters are stored in the file. Each programme is exactly 54 16-bit words
long; each parameter takes up exactly 16 bits. Negative values are
stored in two’s complement format (e.g. negative six is stored as
0xFFFA). The file is exactly 16200 bytes long which is just enough to
hold 150 custom programmes, each taking up 108 bytes.
I’m currently writing a Haskell library to parse / build progammes
and parameters. The code is available for free here under the GNU
GPLv3.
The parameters are stored in this order:
identifier mode target name
07.1 Edit 1 head algorithm Pressure curve
type Edit 2 – Pre EQ
01.1 Edit 1 head algorithm Tune
02.1 Edit 1 head algorithm Decay
03.1 Edit 1 head algorithm Level
04.1 Edit 1 head algorithm Pan
05.1 Edit 1 head algorithm Algorithm select
hd.1 Edit 2 head algorithm Algorithm parameter 1
hd.2 Edit 2 head algorithm Algorithm parameter 2
hd.3 Edit 2 head algorithm Algorithm parameter 3
hd.4 Edit 2 head algorithm Algorithm parameter 4
hd.5 Edit 2 head algorithm Algorithm parameter 5
hd.6 Edit 2 head algorithm Algorithm parameter 6
hd.7 Edit 2 head algorithm Algorithm parameter 7
hd.8 Edit 2 head algorithm Algorithm parameter 8
01.3 Edit 1 rim algorithm Tune
02.3 Edit 1 rim algorithm Decay
03.3 Edit 1 rim algorithm Level
04.3 Edit 1 rim algorithm Pan
05.3 Edit 1 rim algorithm Algorithm select
rm.1 Edit 2 rim algorithm Algorithm parameter 1
rm.2 Edit 2 rim algorithm Algorithm parameter 2
rm.3 Edit 2 rim algorithm Algorithm parameter 3
rm.4 Edit 2 rim algorithm Algorithm parameter 4
rm.5 Edit 2 rim algorithm Algorithm parameter 5
https://elephly.net/posts/2013-08-11-hacking-the-wavedrum.html 8/10
2/17/2018 Hacking the Wavedrum
Thanks
The following tools have proven indispensable in the analysis:
calc, a calculator for the command line supporting hexadecimal repre-
sentations of numbers (both input and output using
the base and base2 functions)
vbindiff, a tool to visualise differences between two binary files with a
split-screen hexadecimal display
ghex, a simple hexadecimal editor supporting pattern search and high-
lighting
https://elephly.net/posts/2013-08-11-hacking-the-wavedrum.html 9/10
2/17/2018 Hacking the Wavedrum
← other posts
Comments? Then send me an email! Interesting comments may be published here.
https://elephly.net/posts/2013-08-11-hacking-the-wavedrum.html 10/10