Cheap way to remap midi notes inline (midiboy maybe?)


I was searching for a device to remap midi notes on the fly and I came across the MIDIHub, midiboy and your community here.

My use case is pretty simple I think. I play rock band using an electronic drum kit (Alesis DM10) and I would like to remap certain hi-hat events to other midi notes. The DM10 module does not support remapping hi-hat notes, but by default I believe it outputs these notes/events:

#42, Hi-Hat Bow Closed
#44, Hi-Hat Pedal Chick
#46, Hi-Hat Bow Open

The problem is, the device I use to translate midi notes into rock band translates both notes 42 and 46 to the same in game note. I would like to instead map note 46 to 51. Since I can not change this in the module itself, I started looking for an inline device to accomplish this.

The MIDIHub sounds like its designed for just this sort of task, but is probably pretty overkill for this simple of a use case. I also saw the midiboy which I think could also handle this sort of task (in my limited understanding) though I’m kind of confused about the game aspect of it.

Before I went down that path though, I just wanted to check in for some advice if this is a reasonable approach. Or, is what im trying to do already accomplished by something simpler? I’m specifically looking for a standalone device since I dont have a computer connected to my drum kit.

In the future I would potentially like to look into doing something more advanced with the CC messages for something more accurate (dont really know much about this), but for now I’d be happy just to remap the note.

I appreciate any help, thanks.

Hey, yes, this is possible to do with both of the devices. It’d be a bit easier with Midihub as this can be programmed in the Editor, while Midiboy is programmed to do its stuff using code in Arduino IDE. If you don’t plan on adding more devices into the mix, then Midiboy would be sufficient.

As for Midiboy’s game aspect - the hardware it has coincidentally turned out to be quite close to Arduboy, the only thing lacking in early prototypes was 2 additional buttons and a buzzer, so we just added those missing parts, and quite a lot of Arduboy’s sketches can run unmodified on Midiboy. :slight_smile:

Do you know how to write code?

There’s a Midimon sketch available for Midiboy that displays the MIDI data on the screen and passes it through. While there’s quite an amount of code there, it actually has a convenient hook for transforming MIDI data as it is passing through:

The msg argument is an in/out argument - it contains the message passing through, you’d just write code there to detect the Note On/Off messages, and change the note number parameter according to your mapping needs. You’d also see your operation in action on the screen. :slight_smile:


Thanks for that very detailed response! I do know how to write code, though I’ve never programmed an arduino before. I suspect I can figure it out. Sounds like the midiboy might be the way to go. What is the approximate assembly time for someone who has a decent amount of soldering experience?

It sounds like reassigning the note is pretty straight forward, it looks like I could even add a little ui button to toggle the mode on screen if I got really ambitious.

If I wanted to do something more advanced in the future with the cc#4 messages does minimon have hooks for that as well? My (limited) understanding is that drum modules send midi cc#4 messages with the “openness” of the hi-hat pedal. So the logic would look something like, if most recent cc#4 value is above x when the hi-hat bow is struck, send note y, if the value is below x, send note z.

This emulates some of the logic that is already happening in the drum module, but I think it would give me more fine grained control of whether to return open or closed for the “intermediate” hi-hat states. I think this is very similar to what softwares like superior drummer do as they often have many more intermediate hi-hat samples than simply open and closed.

Assembling Midiboy should take up to roughly 1 and a half hours, probably less. :slight_smile:

Yes, all of the messages pass through the same hook. The MIDI protocol is really simple - all messages are up to 3 bytes long (except for SysEx which simply starts and ends with special bytes 0xf0 and 0xf7).

Any byte with the most significant bit set to 1 is considered the message status byte. The higher nibble is the message type, the lower nibble is either a subtype or the MIDI channel number.

Depending on the type, the MIDI messages can have up to 2 data bytes (except for SysEx which can have any amount of those). The most significant bit on data bytes must be 0, so that makes maximum data value of 0x7f.

So in your case, you’re interested in these status bytes: Note On (0x9n), Note Off (0x8n) and CC (0xBn) types. (n signifies channel nibble)

Midimon makes it easy, it takes care of calling the processing hook with a single message, and the status byte is always at msg[0].

Then Note On and Note Off have Note Number and Note Velocity data bytes in msg[1] and msg[2]. If a message is a Note On, but the velocity is 0, it should be considered a Note Off message (relevant to sound engines)

The CC messages have CC Number and CC Value data bytes in msg[1] and msg[2].

This Summary of MIDI 1.0 is very useful for quick reference on MIDI messages.

ordered one, thanks for the very clear explanation, looking forward to getting it going

1 Like