Start from the Arduino MIDI shield project or the USB Midi Adaptor Dongle. Locate the shield MIDI OUT DIN5 connector and pin4, pin5 and ground from this image.
An LED lamp may be on the MIDI port, or not. The blinking we see on the lamp is the "waveform" ups-and-downs we are looking for on the scope.
Connector view looking in. MIDI uses pin4 and pin5 of a DIN5 connector. The circuits are described in the Arduino MIDI shield project. We are looking at the MIDI OUT connector from the front.
MIDI OrganizationGet more information on the MIDI format, commands, etc. Entire studios can be managed with automation. MIDI specifies the circuit loop shown in this diagram. Two conductors transmit 5volt pulses across a stage to make a little lamp blink. Ground on one device is isolated from the other.
MIDI THRU is an optional repeater circuit at the receiver. MIDI THRU connectors should carry the signal from MIDI IN when equipment is powered.
Music Keyboard MIDI OUTWe may use an electronic music keyboard and get the same affect. Long lead of LED goes in pin5, short lead in pin4. Resistor not needed for short time.
Your oscilloscope lead has two conductors that you need to attach. The black alligator clip goes to any one of the ground leads to the board. Power the Arduino with a USB power block for safe grounding.
A display of voltage over time. MIDI signal is standard 31500 bits per second (baud rate) so bits are 30microconds wide. This display is set to 80µs so two and half bits per centimeter.
Pin 4 of the MIDI OUT connector floats at +5volts to show idle transmitter. Trigger scope when voltage drops to ground for a start pulse then toggles ones and zeros.
AUTOLook for an AUTO setting or button on your scope controls. It won't be the settings you are looking for but from here you can widen or shrink, move up or down.
RUN/Single SweepFeatures on advanced scopes. You trigger a single sweep of the scope to freeze the waveform. RUN refreshes constantly. Expensive scopes run faster and capture quicker signals.
This new pocket oscilloscope multimeter device does a good job with the MIDI signal waveform. Radio signals will be faster, higher frequency but this serial interface bit rate is okay.
Complete specifications are available at the MIDI organization. Along with tutorials. Websearch also turns up many howto's, guides and introductions. A sparkfun tutorial on the Arduino MIDI shield is quite good.
In our Arduino MIDI shields project we program a microcontroller to transmit 3 bytes of 8 bits to tell a PC to generate one sound or another. The code for to generate note A on octave 3 is:
// Note A
Serial.write(0x90); // Note On at channel 0
Serial.write(0x39); // Note A from the Low octave
Serial.write(0x50); // Velocity 80
delay(250);
Serial.write(0x80); // Note Off at channel 0
Serial.write(0x39); // Note A from the Low octave
Serial.write(0x50); // Velocity 80
The first byte says it is a command to begin generating a note. The second byte is the note number. The third byte says how hard to strike the note. Quality keyboards measure this velocity value. Cheap keyboards might only transmit the maximum velocity value of 80.
Is it only notes?No, you can turn recording machines on and off, automate patch panels, control effects modules and much, much more.
Our projects, here, are meant to be simple so let's focus on the musical notes. An attachment is a text file that lists the note numbers for a couple of octaves.
Comments