Reverse engineering the Yamaha DTX-Multi 12
I have a Yamaha electronic percussion pad that I’m planning on using as part of one of my drum kits. This means I need to load a lot of custom kits and samples. The factory patches aren’t really going to work for me. Some of them are pretty interesting but they lean toward ethnic percussion and some things that aren’t going to be that useful to me.
I started loading some samples via the USB port but I quickly realized that it’s going to be a long process. Each sample has to be loaded individually and there is a lot of menu flipping to get all of the settings set up. I looked around for an editor and it seems like Yamaha created an iPad app but there are no other projects that target the Multi 12 that I could find.
This got me looking for a sysex implementation. I didn’t find anything in the manual or online yet. I also wondered what the save file format looks like. There are several options for saving data on the pad. I selected ALL and tried it out. I wonder if it’s got the wav data stored along with the patch data?
I took a look at the save file using xxd
➜ dtx-parser git:(main) xxd F.MTA | head
00000000: 2038 4833 3920 414c 4c20 2020 2020 2020 8H39 ALL
00000010: 5665 7220 3031 2e30 3020 2020 2020 2020 Ver 01.00
00000020: ffff ffff ffff ffff ffff ffff ffff ffff ................
00000030: 5953 4643 ffff ffff ffff ffff ffff ffff YSFC............
00000040: ffff ffff ffff ffff ffff ffff ffff ffff ................
00000050: ffff ffff ffff ffff ffff ffff ffff ffff ................
00000060: ffff ffff ffff ffff ffff ffff ffff ffff ................
00000070: ffff ffff ffff ffff ffff ffff ffff ffff ................
00000080: 4552 4f54 0000 0200 454b 4954 0000 0240 EROT....EKIT...@
00000090: 4557 4156 0000 1b60 4550 544e 0000 1bc0 EWAV...`EPTN....
This looks promising. It’s got a file header that we can parse with a version number. I’m not sure yet what 8H39 is but it’s probably an OS or file format version. We will see if that changes.
Out of curiosity let’s look to see if there are interesting strings in the save file.
➜ strings F.MTA | head
8H39 ALL Ver 01.00
YSFC
EROT
EKIT
@EWAV
`EPTN
ETRG
EUTL
`DROT
DKIT
Ok it looks like there might be WAV file sections in there. So I guess we will have to just dig around.
Searching down through the file for DWAV sections, near the end of the file I found something that looks like wave data. I had a wav file in there with a name like khatsc-12.wav and I see it’s shortened to DOS length KHATSC~1.
00c22c0: 4457 4156 0002 b5e0 ffff ffff ffff ffff DWAV............
000c22d0: ffff ffff ffff ffff ffff ffff ffff ffff ................
000c22e0: 0000 00c9 0000 0000 0000 0060 ffff ffff ...........`....
000c22f0: ffff ffff ffff ffff ffff ffff ffff ffff ................
000c2300: 0000 00ca 0000 0000 0000 ef50 ffff ffff ...........P....
000c2310: ffff ffff ffff ffff ffff ffff ffff ffff ................
000c2320: 4b48 4154 5343 7e31 2020 0000 0001 0000 KHATSC~1 ......
000c2330: 0000 0000 007f 017f 7f40 0000 3c40 4001 .........@..<@@.
000c2340: 0000 0501 0000 0800 0000 0000 0000 0000 ................
000c2350: 0000 0000 0000 ac44 0000 0000 0000 0000 .......D........
000c2360: 0000 0775 0000 0775 0400 0000 0000 0000 ...u...u........
000c2370: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000c2380: 0000 fff9 001f ffd7 005d ff47 0583 06f8 .........].G....
000c2390: effa f555 04b1 faca faa4 03f9 055b ffd6 ...U.........[..
000c23a0: fb37 fc01 ffae fe0d fb04 0278 0413 f4ac .7.........x....
000c23b0: f042 030e 074a 060e 0851 fbf9 ff4e 07b9 .B...J...Q...N..
000c23c0: fd63 fd9e 01b4 fee7 047c 0a48 0458 03fb .c.......|.H.X..
000c23d0: 0190 023c 0256 fba8 fe1d fc10 fce1 0218 ...<.V..........
Going down through the data, since it’s a cymbal and decays to zero at the end of the sample it looks roughly correct. I’m assuming this is PCM encoded at this point but I’m not sure.
000d0f80: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000d0f90: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000d0fa0: 0000 0000 0000 0000 0000 0001 0000 0000 ................
000d0fb0: 0000 0000 0000 0001 0000 0000 0000 0000 ................
000d0fc0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000d0fd0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000d0fe0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000d0ff0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000d1000: 0000 0001 0000 0000 0000 0000 0000 0000 ................
000d1010: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000d1020: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000d1030: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000d1040: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000d1050: 0000 0000 0000 0000 0000 0000 0001 0000 ................
000d1060: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000d1070: 0000 0000 0000 0000 0000 0000 ffff 0000 ................
000d1080: 0000 ffff 0000 0000 0000 0000 0000 0000 ................
000d1090: 0000 0000 0000 0000 0000 0001 0000 0000 ................
000d10a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000d10b0: 0000 ffff 0000 0000 0000 0000 0000 0000 ................
000d10c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000d10d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
Ok let’s get a parser set up for this. I looked around and found a binary file parser written in nodejs, let’s try this
import { readFile } from "fs";
import { join } from "path";
import { Parser } from "binary-parser";
const header = new Parser()
.endianness("little")
.string("type", {
length: 5,
assert: " 8H39",
});
const parser = new Parser()
.nest("fileHeader", {
type: header,
});
readFile(join(__dirname, "F.MTA"), (_, data) => {
console.log(parser.parse(data));
});
Ok so we grabbed the version number out of the header:
➜ dtx-parser git:(main) ✗ npx ts-node dtx.ts
{ fileHeader: { type: ' 8H39' } }
That’s a good start. Next time I’ll try to continue this by getting the wav file data and see if I can recover it correctly. That will be a good start at writing something that can also generate a save file with new wave data so we can create a tool that will bundle up a kit from a folder of wav files and generate a save file that I can load on the DTX.