3
\$\begingroup\$

I have two MIDI output devices: an Axiom49 keyboard and a Korg SQ-1 step sequencer. The Axiom49 drives a MIDI input circuit that I've built using an Arduino just fine. The Korg SQ-1, however, does not work with it at all.

The Axiom49's output is simply 31.25k baud RS-232, which conforms with the MIDI specification. The output on the Korg SQ-1, however, is totally different than I was expecting and does not work with my MIDI input circuit at all.

So, I hooked both of them up to an oscilloscope (across pins 4 and 5 of the MIDI 5-pin DIN connector, coming from the MIDI OUT plug on both devices) to see what their output looked like (screenshots below).

Also worth noting is that I was able to hook the Korg SQ-1 up to a friend's computer using a MIDI-to-USB cable and drive a software synth.

So, does anyone know why the waveforms between two MIDI devices could be so different?

Axiom49 oscilloscope screenshot Korg SQ-1 oscilloscope screenshot

\$\endgroup\$
8
  • \$\begingroup\$ Can the Korg drive anything successfully with that disaster of a serial waveform? \$\endgroup\$ Commented Dec 2, 2016 at 3:37
  • \$\begingroup\$ @ThreePhaseEel It drove a software synth on my friend's laptop last night using a Roland MIDI-to-USB converter. \$\endgroup\$
    – Dan
    Commented Dec 2, 2016 at 3:44
  • 1
    \$\begingroup\$ that's one tolerant MIDI-USB converter man. I wonder if there's anything you can do to the Korg to get it to clean up its act? \$\endgroup\$ Commented Dec 2, 2016 at 3:45
  • \$\begingroup\$ Looks broken, or you're on the wrong pins. \$\endgroup\$
    – Daniel
    Commented Dec 2, 2016 at 6:29
  • \$\begingroup\$ Show your MIDI input circuit. \$\endgroup\$
    – CL.
    Commented Dec 2, 2016 at 7:53

1 Answer 1

4
\$\begingroup\$

RS-232 and MIDI are completely different. In particular, MIDI uses a current loop; the "space" state (logic 0) is defined as a current of (at least) 5 mA.

Depending on the MIDI output circuit, you cannot simply measure the voltage at a bare pin (or between two bare pins) of the MIDI connector. Your Korg waveform looks as if you tried to measure a floating voltage, and got noise from something else. (And a sample rate of 80 kHz is much too low to capture the actual MIDI signal.)

You have to measure the current by, e.g., connecting a resistor between pins 4 and 5 and measuring the voltage drop over that.

\$\endgroup\$
8
  • 1
    \$\begingroup\$ I'll try measuring a resistor across pins 4 and 5 tonight when I get home from work. I'm curious though -- my Arduino MIDI IN circuit is reading the Axiom49 device just fine as a 31.25k baud RS-232 signal (I'm assuming that's what I'm reading when I'm using the RX pin on the Arduino with the baud rate set to 31250). \$\endgroup\$
    – Dan
    Commented Dec 2, 2016 at 15:42
  • \$\begingroup\$ The RX pin would not work with RS-232 signals. \$\endgroup\$
    – CL.
    Commented Dec 2, 2016 at 16:08
  • \$\begingroup\$ I bought a PC900 optocoupler last night to build the official input circuit as provided by the original MIDI specification: Official MIDI input circuit. I'm going to try this tonight. \$\endgroup\$
    – Dan
    Commented Dec 2, 2016 at 18:51
  • \$\begingroup\$ Also, I see what you mean about it not being RS-232 now. RS-232 is 12VDC serial communication, whereas the Arduino TX/RX pins use 5VDC serial communication. Thanks for pointing that out. \$\endgroup\$
    – Dan
    Commented Dec 2, 2016 at 19:00
  • \$\begingroup\$ The MIDI interface itself does not use a specific voltage; the output/input circuits convert between 5 V logic and the 5 mA current loop. The official circuit can be improved by making Rd 1kΩ and adding a bypass capacitor (see the PC900 datsheet). \$\endgroup\$
    – CL.
    Commented Dec 2, 2016 at 19:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.