Midi Controller for audio software

Hello my friends,

As I was talking to Grumpy Mike in other topic, I need help to build some controllers to my studio. I´m newbie in electronics and I´m having my very first experiences with arduino, then I need some orientation even to study things better.

I gonna explain everything I want to do then you guys can give me some suggestion for where I should start.

My intention is to build 3 or 4 controllers to be able to control the parameters of my virtual audio tools with potentiometers and pushbuttons.

Each controler will have around 24... 30 potentiometers and 8 or 10 pushbuttons.

My intention is to build it using the Arduino Uno with the Mux Shield II.

The first test I did with the arduino was using a crap "instructiables" sketch. This code was depedent of two softwares, MIDI YOKE and SERIAL MIDI CONVERTER. I have nothing against those softwares... but the problem is, the Serial Midi Converter I have to open and set it up everytime I use the controller. I need something that I can save the setup and use always I want. Or if possible to build a project that doesn´t need those external softwares would be great..

Another Issue is that I use Windows 8.1 x64 on my studio and both softwares Midi Yoke and Serial Midi doesn´t work in that version. I did some tests with those softwares in other computer x32 based.

Grumpy Mike said to me that the only way to not depend on that extra softwares is to use midi ports on the arduino, conected to a real midi interface. Ok I have that option, coz I do have true midi conections at my audio interface. As I said before my intention is to build 3 or 4 controllers. Then I would like to know which is the best way to do it... if use all the controllers through USB or MIDI conection.

I need some suggestions for where I could start.... Would possible to do a sketch to make arduino works like a midi controller through the usb port? I see many equipments in the market today are able to control the softwares and they are only USB conection, working without any external software. I can use an external software if it´s necessary... but I´m just looking for the best and stable way to do it.

Well that´s it... too long post already! :fearful:

Hope someone can give me some tips for the best way to build that project and to study the codes.

Thanks a lot!

First I will ask that you have looked at the Arduino MIDI library and project hosted on GITHUB?

Second, it has been some time and some where in an old closet buried in a unknown box I have a published article I wrote on building a serial MIDI controller, if I can find the magazine article and refresh my memory on it all and find my notes as I had info on UBS to MIDI in the package also, I would be happy to send the info to you. But do not hold your breath.
Shame all the files to the days of MIDI efforts got left behind on my PC when I kissed the PC world good-bye.

spicetraders:
First I will ask that you have looked at the Arduino MIDI library and project hosted on GITHUB?

Second, it has been some time and some where in an old closet buried in a unknown box I have a published article I wrote on building a serial MIDI controller, if I can find the magazine article and refresh my memory on it all and find my notes as I had info on UBS to MIDI in the package also, I would be happy to send the info to you. But do not hold your breath.
Shame all the files to the days of MIDI efforts got left behind on my PC when I kissed the PC world good-bye.

Thanks a lot spicetraders,

I really need to study the basic stuff about the midi codes. I gonna take a look for those you suggested. Also if you have more suggestion for important material to study for midi code I will really apreciatte.

If you find the material you mentined please let me know :).

Cheers,

I have not thought on MIDI for years so a lot of refresh to be much help.
LOL just read a GIZMAG on IRig Pads portable MIDI controller much cooler stuff then in past.

Also might check out: zZounds.com | Musical Instruments Music Store. Shop for Guitars, Drums, Amplifiers and Equipment.
they have a forum on midi related stuff and midi control itself.

Thanks for the tips once again...

I´m cheking everything here :smiley:

I´m still in doubt about that USB or True Midi Conection. I would like to know which is the best and most stable way to do it. I ask this coz I see today most of good keyboards and daw controllers doesn´t use midi conection anymore... everything is done through USB and they don´t use any external softwares. Acuatlly I would like to know which language is used by these controllers to comunicate to the DAW.

Chreers,

I´m trying to do some experiences with Arduino MIDI Library v4.2... but I need some help.

I don´t know what to declare in these lines:

MIDI_CREATE_DEFAULT_INSTANCE();
MIDI.begin();
MIDI.read();

I´m getting the following errors:

MIDI_SimpleSynth:5: error: expected constructor, destructor, or type conversion before ';' token
MIDI_SimpleSynth.ino: In function 'void setup()':
MIDI_SimpleSynth:89: error: 'MIDI' was not declared in this scope
MIDI_SimpleSynth.ino: In function 'void loop()':
MIDI_SimpleSynth:96: error: 'MIDI' was not declared in this scope

Where can I find exemples to declare those values?

Thanks,

For the moment i´m using the sketch I found on "instructables" and it´s working well for the purpose I want. Now i´m using Hairless and LoopMIDI and everything is working fine. But I see the code has a lot of commands that I don´t need. I don´t know if there is some problem to use it like that or if should be better to clean the sketch a little bit... keeping only the usefull code for my purposes.

I gonna attach the code... hope someone can help me to clean it up a little bit.

Thanks,

MIDI_Controller.ino (19.2 KB)

I built a midi interface for the Sinclair Spectrum many years back and also rewrote the ROM to take full advantage of it. It's such a long time ago that I'm struggling to remember the details. As I recall the baud rate is exactly a 32nd of 1Mhz. The method I came up with was to use a 1Mhz ceramic resonator and a ripple counter to do the dividing. This ripple counter was reset at the start of an incoming byte to keep everything in sync. Another handy feature of the ripple counter was that a more significant valued pin gave me a signal that the end of a byte had been reached. I used this to trigger the chip enable of a latch to capture the value and then create an interrupt for the Z80. Electrically the signals were all current driven opto-isolators.

All in all it was a fairly interesting project at the time.

KenF:
I built a midi interface for the Sinclair Spectrum many years back and also rewrote the ROM to take full advantage of it. It's such a long time ago that I'm struggling to remember the details. As I recall the baud rate is exactly a 32nd of 1Mhz. The method I came up with was to use a 1Mhz ceramic resonator and a ripple counter to do the dividing. This ripple counter was reset at the start of an incoming byte to keep everything in sync. Another handy feature of the ripple counter was that a more significant valued pin gave me a signal that the end of a byte had been reached. I used this to trigger the chip enable of a latch to capture the value and then create an interrupt for the Z80. Electrically the signals were all current driven opto-isolators.

All in all it was a fairly interesting project at the time.

Kenf looks like you did a quite interesting project! What I need is definitly simpler than this... I need only knobs and pushbuttons to control some virtual devices on my audio software. I supose it doesn´t need a complex project of codes, am I right? Maybe you could help me to upgrade the sketch I´m using. I did attach it on my last post. The code is working but I thinks the code has much more than I need... I think it could be cleaned and upgraded a bit. If you could help me would be great! :slight_smile:

Take a look at the attached file of last post if u can...

Cheers,

@ctechdx:
I'd to prefer a "real midi interface", cause your sound card should have optocouplers at the midi in ports, so no interference frequencies will harm your audio.
My idea:
get one (or more) of those cheap arduino pro minis for ebay (about 3 bucks) - don't forget to get at least one FTDI USB to TTL Serial Adapter Module (ebay about 4 bucks) OR build your standalone "arduinos".
build one "master interface":
output: midi to sound card. Interface: Serial.
input: several midi controller. Interface: SPI or I2C
So each of your midi controller communicate with the master device via SPI or I2C, the master device collecting the messages and send it via Serial/MIDI of your sound card.

This solution is - more or less - easy to implement and uses less additional electronics as necessary.

Regards
Matthias

hi. i have built some time ago a MIDI controller, which i also use with my computer software (mainly with Ableton live).
It has 8 pots, 8 buttons and some LEDs, plus two more "scene" buttons (which do not send any midi command).
You can see it here (including diagram, code and even a little crap video! :wink: ):
http://forum.arduino.cc/index.php?topic=180338.0

I do need to use the Serial to MIDI converter each time i use it (yep, it's a pain in the butt), but it may already give you an idea of some of the things you have been looking for.

Please keep in mind that i am also a beginner in all this electronic stuff, so my coding is most likely not the best!

Good luck!
:wink:

boguz:
hi. i have built some time ago a MIDI controller, which i also use with my computer software (mainly with Ableton live).
It has 8 pots, 8 buttons and some LEDs, plus two more "scene" buttons (which do not send any midi command).
You can see it here (including diagram, code and even a little crap video! :wink: ):
JALKA - MIDI Footcontroller - Exhibition / Gallery - Arduino Forum

I do need to use the Serial to MIDI converter each time i use it (yep, it's a pain in the butt), but it may already give you an idea of some of the things you have been looking for.

Please keep in mind that i am also a beginner in all this electronic stuff, so my coding is most likely not the best!

Good luck!
:wink:

Thanks for all the replies... has been quite usefull for me... thanks a lot!

Boguz, I would recommend to you the LoopMIDI with Hairless Midi Serial. Those softwares are much better than serial to midi converter. Take a look... i´m sure you gonna like it.

I gonna check your codes... :slight_smile:

Thanks

Guys please... help me with another doubt.

How does work a balance potentiometer with center position on arduino?

I doing my tests with linear pots and everything is working fine, but some of my parameters has the zero position at the center, like the equalizers for exemple... center = 0... cut for left and boost for right. Then I´m thinking to use a balance pot, but I don´t know how the arduino will react to that. The balance pot is zero at the center and 10k for each side. anyone knows how it works on arduino?

Thanks,

ctechdx:
Guys please... help me with another doubt.

How does work a balance potentiometer with center position on arduino?

I would suggest posting that question in a new post. It will open it up to many others to see.

A center zero potentiometer is usually 2 potentiometers with just one control knob. Sometimes they'll be configured so each will have it's zero point at the middle. Turning one way will increase the resistance on one of the pots, while the other remains at short circuit (or at least at it's lowest resistance).

So you'll probably want to hook it up to two separate analogue pins. One for left, the other for right.

ctechdx:
Guys please... help me with another doubt.

How does work a balance potentiometer with center position on arduino?

A pot with a center detent works the same as a pot without. Assume that the pot is 10K for example, one side connected to ground, the other side connected to Vcc. The wiper goes to one of the analog pin (A0 for example). The Arduino will read the voltage at A0 from 0 to 5V (roughly).

A center detent pot will then read roughly 2.5V at it's center position. In your Arduino sketch if the voltage you're reading drops below 2.5V, you then map that to a 0-63 MIDI value (using the Arduino MAP command would be one way to do it), and anything above 2.5V maps out to 64-127.

In MIDI there are no negative values for CC#'s. If you look at the MIDI implementation document for whatever it is that you want to control, you could see something like this (examples only):

CC# 66 : PAN : 00 - 7F : L64 - R63
CC# 39 : GAIN : 00 - 1E : -15 - +15 [dB]

In the first CC#66, any value less than 64 pans left, 63 is the zero point, 64 and up is pan right.
Second example CC#39, MIDI range is 00 to 1E (1E - 30 in decimal). A MIDI value of 15 is the center point (0db). Value of 0 is -15db, value of 30 is +15db.

Generic MIDI controllers generate generic MIDI values. If you're building a custom MIDI controller to control a specific device or software, you need to spend a lot of time in the MIDI Implementation document for the device or software to figure out what it responds to. After that point, then you start with the Arduino. Never the other way around.

After fully learning the MIDI requirement of what you want to control, you can use an Arduino with push buttons or rotary encoders for digital pins and pots for analog ones. You just read states and voltages, map those to MIDI values, send them out.

Mel

ctechdx:
Boguz, I would recommend to you the LoopMIDI with Hairless Midi Serial. Those softwares are much better than serial to midi converter. Take a look... i´m sure you gonna like it.

I gonna check your codes... :slight_smile:

Thanks for the tip, i'll take a look at it!
:wink: