Information burst

More reading, more changes of mind.

As my requirements for this MIDI interface are limited only to sending notes, I came to the realisation that I don’t need to handle journals inbound to me and the only journal I need to create outbound is a Chapter N for NOTE ON/OFF events. After playing with reference implementation and copying most of the sample code from the RFC, I’ve taken it all out again and I’m starting from scratch. The RFC code isn’t the best example of a Chapter N journal so I need to go over the details again and translate the concept. I’m sure it’s relatively simple, I just need to wrap my head around it (I’m a bear of little brain).

I have 2 binaries right now. The first is a simple Avahi registration app that publishes host and port 5004 and the name of the service (_apple-midi._udp). The second listens on the ports for events. The listener app is correctly unpacking the Apple MIDI events. I did clean up some segfaults when the OS X MIDI app ends the session ( by sending a BY event ). I’m debating whether I want to handle just 1 session or multiple.

On the hardware side, having got a little bored of starting at C code, I spent some money at Radio Shack and other places to get capacitors, resistors, diodes and also some 3.5mm audio inputs that are breadboard combatible.

I did some reading up on how to handle the drum pad inputs. As the teardown showed, it’s a piezo trigger and, according to the internet, that requires some special handling.

The following pages are useful information: and

They show the circuits needed to handle a piezo input.

Here’s my problem right now. I built the circuit using the info from Peter Vieth’s page and, if I connect up my multimeter, I can see there is a change in voltage when I hit a pad but it’s very small. Some of the many questions I have is whether I’m supposed to be seeing such a small voltage change ( which I saw when I first tested the pad a couple of months ago ). In some cases, with light hits, I don’t see a change at all.

I connected the drum pads back up to the controller they came with and they play fine. Light hits are registering so I know I haven’t broken anything ( hard to do seeing as it’s a piezo trigger ). The controller uses a 9v DC input and I’ve hooked my circuit to a 9v battery but see little change.

The other question I have is whether I’m actually using my multimeter correctly or if I should even be seeing anything register with a multimeter. The info on the Leucos site shows some good data using an oscilloscope but I don’t want to get into that at my stage of life ( $$$ ).


I guess more reading is in order. I have some work colleagues that are part of Noisebridge ( and they have sessions on a Monday  which helps members learn about circuits’n’stuff so I may check them out.

3 thoughts on “Information burst

  1. Matthew Ebel

    Hey there! Did you ever conjure up a way to use raveloxmidi as a general MIDI event listener? I’m trying to build a pi-based LED controller that I can control via wireless MIDI. So far your setup is the closest thing I’ve found yet… but I can’t figure out how to just take incoming RTP-MIDI (AppleMidi) data and utilize it.

    I’ve done this before (wired) on an Arduino, and all I needed there was to listen for incoming MIDI data on a specific channel and run some LED-blinking subroutines based on the continuous control number and the value (i.e. control 20, value 10 would run a subroutine for a strobe effect, passing the value 10 as the number of seconds to continue flashing).

    All I can seem to accomplish, however, is seeing the debug data fly by whenever I send it data from my MIDI hardware.

    1. Dave Kelly

      I’ve had this request a couple of time but, to be honest, real life has gotten in the way of me actually being able to do something about it 🙂

      raveloxmidi wasn’t originally intended to be bi-directional but more of a one-way broadcast from a Raspberry Pi to other places.

      That said, I don’t think it’s too much of a task for note events because the code is there, I just need to handle the other direction. If you’re asking for Control Change events, that means a little more research into the journalling that’s involved for RTP-MIDI.

      Bottom line is that I’m sure it’s doable (it’s only software).

Leave a Reply

Your email address will not be published. Required fields are marked *