Stafford, UK
Offline
Newbie
Karma: 0
Posts: 18
:)
|
 |
« on: January 13, 2013, 03:09:23 pm » |
Hi everyone,
For my final year project at University I intend to make a MIDI Controller which utilises the Arduino Uno.
It's still in the very early stages as I'm still getting to grips with coding (not exactly my forte!)
At the moment, I have a linear potentiometer that is sending serial data to my computer, which I can view in the serial monitor window. Unfortunately, I cannot set the Baud Rate to 31250 as I cannot view anything in the serial monitor window otherwise (anyone know a work around for this?)
All I want to do at the moment is get the potentiometer to send MIDI information to my computer, so I can change the volume or something in a DAW. Ideally, I'd like to do this via USB. I don't really know where to start - I've been desperately searching the internet for some coding tutorials for Arduinos and MIDI, but no luck.
I understand I probably sound a little ignorant and for that I apologise - but I'd really appreciate any help anyone can give.
Thanks!
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
UK
Online
Brattain Member
Karma: 143
Posts: 19368
I don't think you connected the grounds, Dave.
|
 |
« Reply #1 on: January 13, 2013, 06:08:25 pm » |
If you're not sending the data to an actual MIDI device and just need to view it on a computer, just set the baud rate to some more normal rate, like 115200. You don't have to use the serial monitor, you can use any terminal emulator, like puTTY. Or have I not understood the question?
|
|
|
|
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
Stafford, UK
Offline
Newbie
Karma: 0
Posts: 18
:)
|
 |
« Reply #2 on: January 13, 2013, 08:57:11 pm » |
Ooops, sorry I mean I want to use the controller to control things in a DAW, like Logic or Pro Tools.
|
|
|
|
|
Logged
|
|
|
|
|
Sydney
Offline
God Member
Karma: 15
Posts: 743
Big things come in large packages
|
 |
« Reply #3 on: January 14, 2013, 02:17:30 am » |
Post the code that you already have so we can all see what's missing.
I am assuming that you have looked up the MIDI specification and know the codes and messages to send to the device to do what you want?
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 299
Posts: 26025
Solder is electric glue
|
 |
« Reply #4 on: January 14, 2013, 03:10:05 am » |
- I've been desperately searching the internet for some coding tutorials for Arduinos and MIDI, but no luck Come off it the Internet is crawling with MIDI arduino stuff. Just look at one of my projects for a start, and there is more on that site as well. http://www.thebox.myzen.co.uk/Hardware/MIDI_Footsteps.html
|
|
|
|
|
Logged
|
|
|
|
|
Stafford, UK
Offline
Newbie
Karma: 0
Posts: 18
:)
|
 |
« Reply #5 on: January 16, 2013, 10:29:54 am » |
Hi all, Sorry for the late reply. As it stands, I have created the MIDI circuit shown in 4/5 on this site: http://itp.nyu.edu/physcomp/Labs/MIDIOutput I've purchased a MIDI to USB cable and would like to use the code to generate notes in Logic. What software do I need to do this? Where am I going wrong?
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 299
Posts: 26025
Solder is electric glue
|
 |
« Reply #6 on: January 16, 2013, 05:29:58 pm » |
Where am I going wrong? Hard to say because you haven't said what is wrong.
|
|
|
|
|
Logged
|
|
|
|
|
Stafford, UK
Offline
Newbie
Karma: 0
Posts: 18
:)
|
 |
« Reply #7 on: January 16, 2013, 06:39:29 pm » |
The Arduino is not being detected by my computer as a controller sending MIDI information.
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 299
Posts: 26025
Solder is electric glue
|
 |
« Reply #8 on: January 17, 2013, 11:55:18 am » |
So how have you wired it up? The arduino only looks like a serial port to a USB connection. That link which is a rubbish circuit by the way, needs to be fed into a MIDI interface attached to your computer. It is that interface that the computer will recognise.
|
|
|
|
|
Logged
|
|
|
|
|
Stafford, UK
Offline
Newbie
Karma: 0
Posts: 18
:)
|
 |
« Reply #9 on: January 17, 2013, 02:15:18 pm » |
Oh I see. I have used the circuit from the link. I was using a MIDI to USB cable which was connected to the MIDI output on the circuit. What makes it a bad circuit?
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 299
Posts: 26025
Solder is electric glue
|
 |
« Reply #10 on: January 17, 2013, 10:27:28 pm » |
It is a bad circuit because the current output is less than the MIDI specification, you need a transistor in the circuit. Look at the link I poster earlier for a much better output circuit. Also a lot of people get the connections to the MIDI plugg wrong. Depending on if you are looking at the pins or looking at the back of the socket those two can be swapped over. If you have a USB to MIDI lead then your system will see that, if it does not then there is something wrong on your PC end not the arduino.
|
|
|
|
|
Logged
|
|
|
|
|
Stafford, UK
Offline
Newbie
Karma: 0
Posts: 18
:)
|
 |
« Reply #11 on: January 18, 2013, 02:33:42 am » |
My computer picks up the cable.
Okay I shall adapt my circuit so it has the same circuit output as the one you have suggested and post my results. Thanks!
|
|
|
|
|
Logged
|
|
|
|
|
Stafford, UK
Offline
Newbie
Karma: 0
Posts: 18
:)
|
 |
« Reply #12 on: January 30, 2013, 01:07:00 pm » |
Hi all, Firstly thank you for your previous help. My Arduino now plays MIDI notes straight into Pro Tools and I'm getting to grips with changing the code so that I can change the velocity, length of the notes and the min/max pitch. The next thing I'd like to do is add a potentiometer so I can begin to control parameters in my DAW. What would be my first steps? I want to be able to go into the DAW and select a parameter for the potentiometer to effect. Thank you
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 299
Posts: 26025
Solder is electric glue
|
 |
« Reply #13 on: January 30, 2013, 04:48:52 pm » |
Wire up a pot and read the value. Do this once in each loop, save the reading as te last thing you do. When you read it next time round the loop compair it to the last time reading, if it is not the same send a CC message with the reading from the pot shifted to the right 4 times to put it into range. The shift operation is >> and <<
|
|
|
|
|
Logged
|
|
|
|
|
|