Introduction: MIDI Controller With Arduino (for DJ or Musician)

This my first arduino (microcontroller) project. I want to learn arduino with a usefull and large project.

I decided to make a midi DJ controller that have all the functions needed to be standalone to mix.

Every kind of sensor (potentiometer, push button,...) can be learn independantly and I think the best way is to learn "how it works" and "how it is connected" for each sensor step by step.

Everything work like this :

  1. Sensor connected to the arduino detect a change
  2. The arduino send this change to the computer
  3. A software on the computer converts the serial (arduino) information in MIDI that you can use in ableton for example

My controller has:

  • 6 potientometer axial for EQ
  • 3 potientometer axial for effects
  • 6 potientometer linear for Volume
  • 2 push button for Play
  • 2 Ultrasonic sensor (SR04) for effects with the distance of my hands
  • 2 push botton for Cue
  • 2 x 4 buttons RGB led pad
  • 1 encoder for Scratch

Step 1: Standalone or Software

First of all I researched the different tutorials of MIDI controller with arduino.

  • You can do a MIDI controller with a software which translate what you do in MIDI (what i have done).

You will need :

  1. Software for sending/receiving midi data http://projectgus.github.io/hairless-midiserial/Dont forget to set the baud rate in "preferences" in accordance with the one in your arduino code (for me 9600 because "Serial.begin(9600);")
  2. A virtual midi device http://nerds.de/en/loopbe1.html

Another example:

https://www.instructables.com/id/Easy-3-Pot-Potentiometer-Arduino-Uno-Effects-Midi-/

________________________________

  • You can do a "real" MIDI controller which without a software running on your computer to translate what you do on the controller in MIDI is sending MIDI to the computer.

For the moment with an arduino Uno or Mega you need to flash the arduino room or something like that to directly send midi. From what I have understand if you did this you need to be sure of the code you send on the arduino because when the arduino is flash you can't send anymore code (you need reflash again). I have done many many test codes so I choosed the second option but it's better to have a plug and play MIDI device for sure.

Example to go further:

https://create.arduino.cc/projecthub/etiennedesportes/ableton-live-midi-controller-9182b3

Step 2: Wood and Case

Wood case design: I used a case generator http://www.makercase.com/, deleted the top and the slot for the top. To determine the height I look for the height of my heightest button and add 2cm.

For the top I used one MDF board and one Plywood Poplar 3mm which is the one engraved .

Laser cut the wood boards with the plans.

Cut/drilled a hole for the USB cable.

I have joined my plans but on this step it a lot more interesting to do your personal controller.

Assembling:

For the sides I glued and assembled the different sides boards.

For the top I drilled 4 holes in the 2 top MDF. (diameter of my screw + 1mm)

I screw a bolt and glue the nut to the angle four times, to screw the 2 top wood boards by the top after.

This way I have 4 angles with one nut glued, the holes with the nut are the holes for the screws to fix the top boards. In fact I can't acces to the nut below when I screw the top wood boards.

I drilled holes in sides boards (the box), fixed (screw and after glue everything) the angles to the sides.

Put the two top boards and screw them.

By this way there is no visible nut and the top board no need wood slut to be fixed, it's surprisingly solid but there is maybe a better way.

Polish:

I used "Vernis bois brillant 125 ml Avel Louis XIII" (french polish) that is working very well.

It was a bit long because I laid several layers and wait 24h between each.

The top looks great and the wood is protected. It was my first time so I didn't wait as much as needed or I put too much vernish on some parts because the polish was sometimes not solid even after drying, now (2 months after) it is ok.

Graphic: montage of Fornaseti artworks and personnal drawing.

p.s: advices to design the midi controller, on my plan the two RGB 4 buttons pad are too near from each other

https://www.instructables.com/id/A-Framework-For-Making-Affordable-Stylish-Modula/

Step 3: Electronic

I have put everything (for my project) on a Fritzing file.

For each type of sensor you need to learn how it is working or what he gaves to the arduino .

To do this, watch tutorials on inctructable for example (" potentiometer arduino",...).

I used:

  • Potentiometer
  • RGB pad
  • Ultrasound HC-SR04 (distance detector)
  • Encoder
  • Push button (arcade button)

I recommend when you wanted to do your final montage to do it on fritzing in the same time because it is hard to see when there is ton of cables.


Order:

After knowing all what I want or at least the bigger part I ordered my components. This way you have less shipping costs.

For my part, I order the most on Conrad or RS (I am in France) and more specifical pieces like RGB pad on robotshop.

One example of my Conrad command in the images

Step 4: Arduino Code

There is my code for arduino. You need to send it, after your changes if you do a different controller, with Arduino IDE to your microcontroller by USB (youtube has tutorials). In attachments:

  • The final one
  • One just to work the 2 RGB Pads with 6 colours possible (RGB +cyan+rose+yellow).
  • Old parts of code I wrote to learn the differents sensor

Some parts are taken some written by me.

You need to install arduino libraries (look the error and the "include") like Keypad.h for the pad.

The differents classes are at the end of the files.

You can note that one classe is here to send the serial information.

"void MIDImessage(byte command, byte data1, byte data2) // --------- NECESSARY, pass values out through standard Midi Command

{ Serial.write(command); Serial.write(data1); Serial.write(data2); }"

Step 5: Improvements

Everything is working but it is a prototype. There is some questions or point of improvement.

Energy:

- When I used the RGB pad with every sensor the RGB leds shines very little. The 5v arduino are they too few for my project? When I use them only, no problem.

Code:

- I have the serial from the encoder but I don't know how it's works in MIDI. I mean what they want in MIDI output. If you know how to set the encoder to scratch on traktor contact me.

- Some of my codes for buttons are not good for a music application. We need the fastest responsitivity and I saw that some of my button codes are not written in the best way to do that (Play button if I remember well).

Comments

author
electrical inventor (author)2017-08-07

neat project!

you should consider using the vs1053 codec chip. it has a MIDI player built into it (and can play most any audio file- MP3, AAC, Ogg Vorbis, WMA, MIDI, FLAC, WAV. it can also record). Just send serial data to it, and it outputs stereo audio.

Adafruit has several breakouts, some with headphone output, some with speaker amps. https://www.adafruit.com/?q=vs1053&

author
RowanCant (author)2017-08-06

Yup, you can make the UNO into a native USB midi controller and it's actually pretty easy. I've found though that the Arcore library with Pro Micro chips is awesome and super easy to use. You can even be running info through the serial port and sending midi notes at the same time which is awesome for debugging. I've just built a drumkit with it and it was so simple to use that I've just bought two more pro micros for other midi ideas.

author
jrbums (author)2017-08-02

That is a really slick front panel!

author
seamster (author)2017-08-01

Cool!

author
Funkit (author)seamster2017-08-02

Thanks ! :)

About This Instructable

1,461views

35favorites

License:

Bio: hum hum
More by Funkit:MIDI Controller With Arduino (for DJ or Musician)
Add instructable to: