Getting started with micro-controllers and MIDI

...and how to do so...
Post Reply New Topic
RELATED
PRODUCTS

Post

Hello!
I'm very interested in developing my own MIDI controllers, but I'm relatively new to digital electronics and just started learning about micro-controllers. I'm afraid this subject is to vast for me at the moment, so I'm asking more experienced colleagues for a little push in the right direction.
What is the good way to start experimenting - what type of micro-controller should I buy? What are the characteristics of micro-controllers I should be aware of? Can you give me a suggestion for a book, article, tutorial or discussion to help me collect knowledge on this subject? (primarily covering usage of micro-controllers in midi, but actually any good text about micro-controllers in general would be helpful)
For starters, I would like to build something really simple - maybe a foot-switch to control a guitar sound processing VST, with just few knobs and switches. I believe this will help me understand the system, so I could build something more complex in the future.
And, if you have any personal experience regarding this matter, it would be most kind of you to share it with me. :)
Cheers!

Post

Here are a few things to consider:

Are you looking for a pre-programmed solution that is ready to use with the addition of some pots/encoders/switches or are you trying to build something from scratch?

Do you need a solution that will transmit MIDI over USB or are you just trying to send data out of a 5-pin Din connector (standard MIDI connector)?

If you want to start simple, I would recommend looking at the DIY options from Doepfer or Livid instruments.

If you want to start from a lower level with an Arduino or other AVR, PIC or ARM based micros, things get a bit more complicated. Maybe check out the AVR freaks forum.

Post

What I'm trying to learn is the very basic level of understanding and working with micro-controllers. I'm relatively new to digital electronics and really don't know where to start from.
So, what I'm trying to do is not meant to be a "quick" solution like buying those DIY kits, but to learn to do it the harder way, from scratch.
Either USB or DIN connection would do, it doesn't really matter.
I checked out AVR Freaks, and it's a very good forum, thanks. :)

Post

Arduino and a Sparkfun MIDI shield - inexpensive, wonderful, safe, and all the code is already there for you to start reading, learning and modifying.

Post

I've recently built a couple of MIDI controllers using Arduino programming language.

Post

Image

Image

Post

At current, the small one completely works, but only the master channel strip works on the big one. That's because of time constraints (it's a university project). I'm currently writing a dissertation on microcontrollers and how I made and programmed them. But when i'm finished, I don't mind sharing my code and resources if your interested in building your own.

Also, check out this Instructable

http://www.instructables.com/id/A-Frame ... sh-Modula/

Really good starting point. Some of the coding is fairly complicated to a complete beginner, and I've found simpler approaches in my personal project.

Post

Wow, great stuff, thanks!
I would very much appreciate if you would share your experiences with me, so remember this forum topic when you finish your project! :)
Can you tell me just what parts did you use for its "brain"? You said you used Arduino's programming language but did you used the whole Arduino board or Teensy mentioned in this tutorial, or something different?

Post

I'll remember! Hopefully next week I'll have some time and I'll upload some photos, circuit diagrams and code etc. to my tumblr or something.

I used a Teensy for the "brain" like the one in the project link I sent.

Teensy is just a microcontroller, exactly like an official Arduino hardware board is.

However, using a Teensy has a distinct advantage over using an Arduino hardware board, a Teensy is a class compliant USB MIDI device, meaning that it can be programmed to be a plug and play MIDI device without any extra drivers. An Arduino hardware board doesn't have this luxury, making the Teensy a much better candidate for USB MIDI controllers.

The Teensy then, can still be programming with the Arduino programming language, through the Arduino software. Teensy comes with lot's of extra Arduino software extensions (called libraries) which enable you to write the code for the Teensy specific things, like USB MIDI. There is allot of support on the Teensy manufacturer's website

http://www.pjrc.com/teensy/

He calls these extra libraries, Teensyduino.

http://www.pjrc.com/teensy/teensyduino.html

I've made use of quite allot of these Teensy specific extensions in my project.
Last edited by hoof123 on Fri May 31, 2013 6:19 pm, edited 1 time in total.

Post

I really can recommend to use the Arduino UNO, it uses a programmable USB controller (Atmel 8U2) which can be used as USB MIDI (with MOCO LUFA firmware). You still able to use standard midi with DIN outs, there is nothing different in the programming, you just have to setup the correct MID baud rate (31250).

Here are 2 examples (check the arduino sketch!):
http://arduino.cc/en/Hacking/MidiWith8U2Firmware
http://arduino.cc/en/Tutorial/Midi

Arduino UNO is great, maybe buy a second one for using it as ISP programmer, i use a AVR ISP MKii (costs around 40$). You need a programmer if your upload has crashed the microchip.

you find the firmwares in the Arduino IDE folder
XXXX:\arduino-1.0.3\hardware\arduino\firmwares\atmegaxxu2

FLIP can be downloaded here:
http://www.atmel.com/tools/FLIP.aspx

Use the usb dfu drivers from the FLIP folder for installing the Arduino UNO to get it working in FLIP!
C:\xxxxxxxx\ATMEL\Flip 3.4.7\usb

http://arduino.cc/en/Hacking/DFUProgramming8U2

You have to flash the 8U2 with this midi firmware after uploading your program.
http://morecatlab.akiba.coocan.jp/lab/i ... o/?lang=en

Now learn to program the basics and then switch to using multiplexers (4051 (8channel/inputs) / 4067 (16channel/inputs).
http://quarknet.fnal.gov/fnal-uc/quarkn ... rduino.pdf


Here are a few articles about arduino, multiplexers,ISP and midi.

http://playground.arduino.cc/learning/4051
http://forum.arduino.cc/index.php?topic=108448.0
http://playground.arduino.cc//Main/Inte ... dware#MIDI
http://arduino.cc/en/Hacking/MidiWith8U2Firmware
http://arduino.cc/en/Tutorial/Midi
http://forum.arduino.cc/index.php?topic=77753.0

http://little-scale.blogspot.de/2008/07 ... -data.html
http://little-scale.blogspot.de/2012/10 ... oller.html
http://little-scale.blogspot.de/2010/01 ... pedal.html

http://seetrontech.blogspot.de/2012/11/ ... duino.html
http://www.johndimo.com/2012/01/18/prog ... w-1-0-ide/
http://myarduinobox.blogspot.de/p/source-code.html
http://outsidescience.wordpress.com/201 ... er-shield/
https://www.sparkfun.com/products/9056
http://mayhewlabs.com/products/arduino-mux-shield
http://www.thebox.myzen.co.uk/Hardware/MIDI_Shield.html
http://bildr.org/2011/02/cd74hc4067-arduino/
http://itp.nyu.edu/physcomp/Labs/MIDIOutput
http://www.instructables.com/id/Send-an ... h-Arduino/

MIDI Messages List
http://www.midi.org/techspecs/midimessages.php#3

MidiOX - great MIDI tools
http://www.midiox.com/
http://www.midiox.com/

Have fun!
T

Post

So I finally finished my dissertation.

Here's a link if your interested in reading it.
I explain the basic concepts and theory. Then I show examples of how specific components are wired and more importantly programmed.

https://dl.dropboxusercontent.com/u/854 ... roject.pdf

Post Reply

Return to “DIY: Build it and they will come”