Build a MIDI Controller with Arduino Uno

Discuss music production with Ableton Live.
Post Reply
FLF
Posts: 4
Joined: Thu Oct 17, 2013 9:27 pm

Build a MIDI Controller with Arduino Uno

Post by FLF » Tue Oct 22, 2013 2:54 pm

Hello everyone, I hope you're well :)

I'm new to the world of Arduino, that's why I'm here.

I am looking to build a MIDI Controller for my final year project using Arduino Uno.

The Controller ideally will have 5 different knobs to control parameters and another one to select the actual parameter to control, by turning it right or left so that the orange selector in Ableton will move accordingly.

Moreover, I'd like to incorporate a number of buttons to write live patterns while playing live or producing, along with Play, Stop, Rewind and Forwad buttons.

I found a few interesting suggestions regarding using PureData and Firmdata, along with the Arduino software, to connect the knobs and enable them to communicate with the music software.
Does anybody else have any other suggestions or ways to approach this?

I still haven't found anything regarding Reading Buttons, could someone please point me to some good source of information?
Moreover, should I have a PCB with a number of resistors and capacitor on it, which I'd then connect to the Arduino oard or will the Arduino One board be able to cope with it by itself?

I look forward to hear from you people, thanks a lot for your help in advance :)

MrCravon
Posts: 52
Joined: Thu Jun 20, 2013 7:29 pm

Re: Build a MIDI Controller with Arduino Uno

Post by MrCravon » Tue Oct 22, 2013 5:32 pm

I think this post covers most of what you need on order to make your Arduino board in to a midi-controller.
http://forum.arduino.cc/index.php/topic,22336.0.html

When it comes to controlling parameters in live i think that would be as easy as putting live in to midi learn mode as long as you manage to send midi messages from your board.
The manual also covers different types of mapping. (Absolute/Relative) https://www.ableton.com/en/manual/midi- ... e-control/

When it comes to controlling other parameters in live like moving the selector or using transport controls and the like i think maybe you can create something using the API functionality in Max for Live if you have the suit version.

When it comes to buttons you can easily just solder them directly between your VDD and your GPIO pins on the Arduino and scan for changes (easy way). Or connect them to interrupt pins on the MCU (bit more challenging).

When we are talking about rotary control elements the easy way is to go for a digital rotary encoder, rather than a potentiometer connected to your A/D inputs. All you need to know about rotary encoders and Arduino you can find here.

http://playground.arduino.cc/Main/RotaryEncoders

Hope this helps you some.

FLF
Posts: 4
Joined: Thu Oct 17, 2013 9:27 pm

Re: Build a MIDI Controller with Arduino Uno

Post by FLF » Wed Oct 30, 2013 5:05 pm

Thanks for the help Mr :)

Is the Arduino One capable of storing and processing, upon request, a number of samples?

MrCravon
Posts: 52
Joined: Thu Jun 20, 2013 7:29 pm

Re: Build a MIDI Controller with Arduino Uno

Post by MrCravon » Wed Oct 30, 2013 6:51 pm

The short answer is yes. However, it will in no way be more efficient than doing whatever processing you want to do on your computer. Also, the arduino is not meant for heavy DSP operations.

I am guessing this is unrelated to the midi controller?

If you want to process audio with a microcontroller you will run in to som challanges:

1. Where do you get the audio samples from?
-Storing them in the arduino takes a lot of space. 1 second of 24bit audio sampled at 44100Hz takes over 1kB of memory and i belive the arduino uno only has 32kb of memory available which also must contain your program and DSP algorithem. Also storing 24bit audio on a 8bit MCU is a bit of a hazzle, requiering 3 memory locations per sample. Ofcoure you can always extend the memory with external ram. (still has to be 8bit) However this requires a lot of considerations. (Memorymapped? I2C? SPI? Sizelimitations? Speed?)
I found this example of someone running FFT on an Arduino but it is at a significantly reduced sample- and bitrate: http://forum.arduino.cc/index.php/topic,38153.0.html

2. Does it have enough juice?
-It depends. How much compromise are you willing to accept? Have a look at this and it will get you a long way:
http://interface.khm.de/index.php/lab/e ... rocessing/
Especially look at the sourcecode at the bottom. (Creating your own code makes you a decent programmer, looking at and understanding other peoples code makes you a great programmer.) You can see that it includes examples of reverb, phasor, sinewaves, ringmodulator and more.

Also look at this:
http://www.youtube.com/watch?v=kKfGLWvXQG8
http://www.instructables.com/id/Just-Ve ... o-Beetbox/
As you can see, both of these projects uses an external "Sheild" for the audio part to achieve higher quality. I believe it is this card: http://www.adafruit.com/products/94

Good luck! :wink:

hacktheplanet
Posts: 2846
Joined: Sat Sep 25, 2004 6:37 am
Location: Chicago, IL
Contact:

Re: Build a MIDI Controller with Arduino Uno

Post by hacktheplanet » Wed Oct 30, 2013 6:57 pm

MIDI controllers are pretty straight forward.
Code for a knob or button is like:
-Check the value at a pin.
-If the value is different that the previous value, then send MIDI data out.
-If the value is the same as the previous value, then do nothing.
FLF wrote:Thanks for the help Mr :)

Is the Arduino One capable of storing and processing, upon request, a number of samples?
The Uno only has a 32kb of flash memory and 2kb of sram... Not very practical for audio recording. ;)
It would be possible to add extra sram or flash, and use that as sample memory while the Uno does all the processing, though if you are new to digital electronics and micro controllers, it will take some research.

You could also just get an audio shield like this, just make sure the shield would work for your Arduino: http://learn.adafruit.com/adafruit-wave ... or-arduino
Image

FLF
Posts: 4
Joined: Thu Oct 17, 2013 9:27 pm

Re: Build a MIDI Controller with Arduino Uno

Post by FLF » Mon Nov 11, 2013 8:58 pm

Thank you guys!

I have made a design of my controller, so that I can have an idea of how it could look like and where to place all the different components.

Image

I will probably add another Arduino Uno to work with the LED Touch Screen and a Shield on the one that is already included in my design, to process and store audio files.

Any other thoughts?

FLF
Posts: 4
Joined: Thu Oct 17, 2013 9:27 pm

Re: Build a MIDI Controller with Arduino Uno

Post by FLF » Thu Dec 05, 2013 11:26 am

I've been thinking on how to make the MIDI Controller talk with a music software like Ableton and I have been wondering whether is just via simple USB that the user can scroll and control Ableton's interface or there's more to it?

Post Reply