MIDI Data to Audio Signal Conversion (Midi Over Audio)
Hey Guys,
First of all a short as possible explanation of the setting to understand why and what I'm trying to achieve:
I'm playing on stage on a keyboard that can send audio and midi. The audio signal goes into a Midas digital stagebox which is connected to a Behringer X32 mixer via a 30m long ethernet cable. At the FOH a computer is connected to the X32 so we can play with Ableton and Max on the FOH side.
The FOH tech asked me if it's possible to send the midi data as well so she can use it to control parameters with my notes.
Although there is a MIDI in on the stagebox, it turns out to be sluggish and useless.
So... My assessment is that either we have to make a wireless connection for MIDI over Wifi or we have to run another 30m long ethernet cable for running MIDI, or possibly a 3rd option.
The thing is that we have some audio inputs left over and this got me thinking if there might be a way to convert MIDI data into an audio signal, run it through the stagebox and convert it back to MIDI on the other side.
Does anyone have any experience with this? It doesn't need to be perfect, considering we'll not be generating audio with it but just control some parameters in the Ableton session.
Cheers!!
The furthest I've gotten thus far is producing clicks at different amplitudes. A first click for pitch (low amp=low note/high amp=high note), a second click for velocity (higher amp=higher velocity) and a negative click for note off. I'm guessing this might be the way to get it done, but so far it's not so reliable and wonky.
I'm going to keep working on this strategy, but I'm still curious if someone solved this already and if I'm on the right track or if there's a more effective way.
By the way, most of my processing is done in gen~ to get sample accurate measurements.
Hope someone has some insight :)
Cheers!
What is the problem with the midi port on the stage box ?
Is it dependant on X32 midi settings , which could be causing the troubles ?
Midi is a simple square wave pulse sent at 38400 baud,
I guess I/O capacitors on both stage box and console
would degrade the midi signal.
I mean in case you want to use audio I/O to send midi
The midi port on the stage box works, but with a lot of latency, shifty rates and it only receives data on the first 3 midi channels so i'm guessing they only designed it to work as a remote for the mixer.
Indeed I want to try to use an audio I/O to send midi. Just pitch and velocity data and if possible polyphonic. I'm guessing it takes a bit of creative coding, but I was hoping someone already tackled a similar puzzle before I'm trying to reinvent the wheel.
http://www.96khz.org/oldpages/midiasaudio.htm
Found this, but still a bit in the dark as to what it means. Still quite a noob on a lot of subjects :P
Thanks for the reply, it's much appreciated :)
midi -> rtpmidi interface -> mix with the audio in a network switch -> only one ethernet cable -> unmix with network router -> X32 / midi?
but complicated, >USD 500 for gear, and it might not even work to mix things since rtp midi is not an IP protocol.
You might be better off using long midi cable.
Maybe at the end a little current booster, but with a good cable
it should not be necessary.
If someone can make din to xlr connectors for you,
you can test that using standard balanced mic cables.
I would solder pins 2 & 3 together, and use pin 1 (shield) as 5v.
That would cause least current loss.
-------
Midi inputs are run through optocoupler. Trouble using long cables is that
current might drop because of cable resistance, and optocoupler would not trigger.
On sender side, 5v and data signal are connected via 220 ohm resistors,
signal is high when quiet, low on pulses.
input side also 220 ohm inserted at opto input.
that limits the current to +- 11 mA without cable taken into calculation.
Depending on opto used, that might drop too low with long cable and thin wire.
------
It would be a simple thing to measure the cable resistance, add that to 440 ohm and calculate the loss.

I must add a word of warning : you should not connect midi
connector to XLR input of any stage box or mixer.
If someone turns Phantom Power On, it would distroy midi out circuit at least,
and maybe much more in the keyboard.
As Roman proposes, I do use a iConnectivity interface with RTP on stage connected to a Mac over an ethernet cable. The ethernet connection is shared with a Dante setup and it seems to work reliably so far. So there is only one cat5e cable between the stage and the sound booth.
Dante is supposed to work on a regular ethernet network, but I don't know for the X32.
The stage boxes for the X32/M32 family only have MIDI ports on them for use when they are configured for standalone operation. (no dig console) .
From the manual:
"Head amp gain and phantom power settings can be controlled remotely via MIDI whenever it is used standalone, independent from X32 console products.
Note: The S16 will only accept MIDI controls when its preamps are not controlled via AES50 already. Connection to an X32 series console or another S16 in SN Master mode will always inhibit reception of preamp related MIDI commands."
Bummer, I know. I tried to make it work, too.
The cat5e shielded cable that is used for the X32 is AES50 and not ethernet like Dante.
The use of an additional Cat5 ethernet link with rtpmidi is a good solution. Don't mix up the AES50 cables and the Ethernet. To be safe, you can put the Neutrik Ethercon shells on the AES50 cable and that mistake won't happen. They will fit on a cable that is already terminated.
I have also successfully used larger gauge, high quality AES audio cable as a long MIDI cable over 100 feet with 5 pin DIN connectors on each end. (no XLRs to be safe) Don't eliminate the shield. Use the pair as the current loop and connect the shield at both ends in the cable. The MIDI spec uses a current loop and lifts the shield at the destination in the instrument as part of the MIDI spec. That was a brilliant choice in the early 80s. The number of common impedance/ground loops that would have occurred without that lift would plague every setup. I don't remember what was driving the cable though. Source impedance may vary and so may your mileage/footage.
Do you have Max available on both ends?
If so, you could receive MIDI, code it to an audio stream, send it, and then convert it back.
Assuming no audio processing whatsoever was being applied to the audio stream, the decoding should work..
You only need note messsages?