Pages: [1]   Go Down
Author Topic: MIDI through usb  (Read 2617 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm working on a MIDI controller with the newest arduino uno model. I know most MIDI controllers are usb and MIDI. Since MIDI signals can be sent via usb is there a way to do so with the arduino with out any other software? I've tried a few different ways but none seem to work. The free software to convert usb to MIDI never work, so if MIDI can be sent via usb then is there any software that works out there?
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It's probably easier to work with MIDI itself. Do you have a MIDI output, or only USB on the device?
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33314
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You need some sort of software or driver on the computer side.
Quote
The free software to convert usb to MIDI never work, so
What software is that? I have found code that works, are you on a PC or mac?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Right now I'm just using the USB on the arduino itself, If it can't then I'm going to get a MIDI port then a MIDI to USB converter. I've also just used random free ware stuff I've found online, if you can let me know where the code you had was that would be very helpful. I think my biggest problem with the stuff I've found so far is it is just there are no instructions on how to use it.
Logged

Wellington, New Zealand
Offline Offline
Sr. Member
****
Karma: 1
Posts: 404
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can replace the atmega16u2 firmware with a USB midi driver and you get native USB midi in and out of your arduino.  Take a look at my blog here Arduino UNO Midi firmware and use the latest firmware from here. Also check out the other projects doing the same thing on the playground: http://arduino.cc/playground/Main/InterfacingWithHardware#USB.

The drawback is that you can't yet use serial and Midi at the same time so you have to burn back the serial driver to load sketches or use the ISP.

If you're using Linux or OSX see this thread about patching dfu-programmer to support the atmega16u2 http://arduino.cc/forum/index.php/topic,92148.0.html. If you're on windows then the latest version of flip from Atmel should already support it.

Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So if I change the firmware on it, I first need to write the code? If I understand it correctly. Such as I write the code for what I have lets say 10 buttons and 2 pots, I write my code for it put it on my arduino uno then change the firmware to what you sent me?
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33314
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have used:-
http://www.spikenzielabs.com/SpikenzieLabs/Serial_MIDI.html
Successfully.
If you can't get it going, run the source code direct from processing.
Logged

Wellington, New Zealand
Offline Offline
Sr. Member
****
Karma: 1
Posts: 404
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So if I change the firmware on it, I first need to write the code? If I understand it correctly. Such as I write the code for what I have lets say 10 buttons and 2 pots, I write my code for it put it on my arduino uno then change the firmware to what you sent me?

Yes. So the steps would be:
1. Work on the sketch
2. Write sketch to UNO
3. Put UNO in DFU mode and flash the MIDI firmware
4. Test to see if it works
5. Not working properly? Put UNO into DFU mode and flash serial firmware. Goto 1.

If you have an FTDI serial to USB cable then you can connect that to a couple of digital pins on the UNO and use software serial to provide some debug output.
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the help dhunt, while I do like your solution I am very new to MIDI programing and just fear that I will be spending a lot of time flashing back and forth so I have ordered a midi port and a MIDI to USB converter, I didn't notice just how cheap they where, so I think that is how I will end up making every thing work, but once I get the code all figured out I might switch the firmware just because it seems like it would be nicer in the long run then having to use a converter. Before I set out on this project any tips or pointers to a newbe? 
Logged

Wellington, New Zealand
Offline Offline
Sr. Member
****
Karma: 1
Posts: 404
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Okay.

You probably could have purchased another UNO for the same price, and used that as an ISP programmer and second serial interface via software serial.

Another option is to have your sketch send ASCII commands via the serial monitor, and then once you're happy with what its doing switch it to binary commands and load the MIDI firmware to the 8u2.

I'd recommend taking the "risk".  You'll learn some useful skills and get a native USB MIDI device out of the effort.
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

alright so after getting MIDI converter and getting the wrong one do to a mix up in shipping, I got the right one, but it was broken out of the box. So now I am going back to the flashing of firmware. Could you give me a simple code that I can use? Something that has a few buttons. Just something that I can see how it works so then I can add to it. 
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 41
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

as said before:
use this tutorial it will work
http://www.spikenzielabs.com/SpikenzieLabs/Serial_MIDI.html
also additional links worth mentioning
http://midi.songstuff.com/article/midi_message_format
and in case of making a midi keyboard:
http://gieskes.nl/browserjockey/hardware/yt-midi/
(the picture)
Logged

Wellington, New Zealand
Offline Offline
Sr. Member
****
Karma: 1
Posts: 404
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

alright so after getting MIDI converter and getting the wrong one do to a mix up in shipping, I got the right one, but it was broken out of the box. So now I am going back to the flashing of firmware. Could you give me a simple code that I can use? Something that has a few buttons. Just something that I can see how it works so then I can add to it. 

So the example sketch on the blog was not enough to get you going? What else do you need?
Logged


Pages: [1]   Go Up
Jump to: