MIDI TO ARDUINO
This is already part of some of my Instructables, but probably hard to find via the search function.

The fritzing is pretty much self explaning, you can use any arduino you want.
Be sure to unplug the line to the TX pin on the arduino while uploading programs, i made a small button that i press while uploading on my midi shield.

Step 1: PARTSLIST

MIDI TO ARDUINO
1x 5pin DIN/MIDI socket

1x 4n35 optocoupler or matching type

1x diode, or matching type

1x 220 Ohms resistor

1x 560 Ohms resistor (i used a 220 and a 330 in series and it worked)

1x bread or stripboard, as you prefer

1x Arduino (clone) obviously

1x MIDI cable

1x a MIDI source, the shield will work with ever device that sends MIDI protocol

Step 2: THE CIRCUIT

MIDI TO ARDUINO
MIDI TO ARDUINO
Its pretty easy to connect, depending on the type of board and MIDI-plug you got, you have to solder wires to it.

Make sure the diode is in the correct direction.

What the circuit does is decoupling the MIDI line from the Arduino.
The reason why you have to do this, is because the device that sends the MIDI signal, for example a keyboard, also "powers" the MIDI communication.
That means that it provides the 5V that "are" the MIDI signal.

If you would connect the MIDI plug with your Arduino directly you would most possibly kill the Arduino Input Pin, especially if there is some faulty wireing in the keyboard or sequencer you use.

As the name implies, the optocoupler is coupling by light, and therefore the MIDI host and the Arduino are not connected electrically.


Mechanically its a small LED and a photoresistor that has (nearly) no resistance when its exposed to light, and a very high resistance when its in the dark.
So everytime the MIDI host sends a HI the lamp flashes on, the resistor is no resistor anymore, and the arduino gets a HI on the inpout too.

The diode in the circtuit protects everything against false polarity.

This all is based on the MIDI standard, and the original schematic can be found here: http://www.midi.org/techspecs/electrispec.php

Step 3: THE CODE

MIDI TO ARDUINO
This is the basic MIDI CALLBACK script.

It checks if a NoteOn is coming in and then jumps to the position in the script.
On this position you can put your code in, like read the velocity of that note and map it to a servo motor.

Step 4: THE POSSIBILITIES

MIDI TO ARDUINO
As MIDI can be automated in DAWs and this MIDI tracks can be saved with your projects,The main possibilities i saw in this project are audio related.

To name a few:

Automated Microphone Stand.

Imagine re-amping, with a remote controlable microphone stand, saveable with your projects.

Automated Microphone Stand in a

Same Idea taken a bit further

Acoustic Drum Machine

Servos, Motors, a drumkit, a pair of spoons, an experimental acousic drum machine

Everything Timelapse related

As MIDI sequencers put out values in a 16/16 grid, and you can control and sync the tempo, its ideal for timelapse.
Also easy speedramping would be an option.



 
 

Tag cloud

make build easy simple arduino making homemade solar laser printed portable cheap mini building custom cardboard wooden create super lego turn paracord chocolate your paper light intel