MIDI Data to Audio Signal Conversion (Midi Over Audio)


    Apr 03 2021 | 4:45 pm
    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!!

    • Apr 04 2021 | 12:04 pm
      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!
    • Apr 04 2021 | 4:08 pm
      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
    • Apr 06 2021 | 1:06 pm
      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 :)
    • Apr 06 2021 | 1:48 pm
      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.
    • Apr 06 2021 | 2:42 pm
      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.
    • Apr 07 2021 | 2:12 pm
      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.
    • Apr 07 2021 | 3:06 pm
      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.