Offline
Newbie
Karma: 0
Posts: 8
|
 |
« on: November 11, 2011, 02:00:40 pm » |
I'm starting with Arduino and I need developer a project for read and play a MIDI file in Arduino UNO.
If anypeople can help me, I'll make me feel very happy! :-)
Best Regards
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 298
Posts: 26024
Solder is electric glue
|
 |
« Reply #1 on: November 11, 2011, 04:54:05 pm » |
What do you mean by:- read and play a MIDI file in Arduino UNO. Where is the MIDI file to be stored and are you expecting the arduino to generate the sound? If so you will be disappointed as the arduno can't produce many tones let alone anything approaching the MIDI GM sound set.
|
|
|
|
|
Logged
|
|
|
|
|
Newcastle, England
Offline
Sr. Member
Karma: 2
Posts: 489
Always learning!
|
 |
« Reply #2 on: November 11, 2011, 05:00:02 pm » |
Although you cannot generate any quality audio with the UNO alone, it is possible to use something else - the midi shield! http://www.skpang.co.uk/catalog/midi-shield-p-669.htmlThat should sort out the issues of bad sound quality. Onions.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 8
|
 |
« Reply #3 on: November 12, 2011, 07:05:05 pm » |
Thanks Grumpy_Mike and Oniosn :-) My ideia is: read a MIDI file maybe in my computer (I started with arduino in few weeks :S) and after play in piezo buzzer. Example of OUTPUT: http://www.youtube.com/watch?feature=player_embedded&v=mAG3W4RwNl0But I don't undertand how Interpret the Structure of MIDI file and if I can put my MIDI file in my computer. Best Regards
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 298
Posts: 26024
Solder is electric glue
|
 |
« Reply #4 on: November 13, 2011, 05:01:38 am » |
You need something on your PC that reads MIDI files and outputs MIDI data. You also need a MIDI interface on your PC. Then you need a MIDI interface on the Arduino and some software. This project:- http://www.thebox.myzen.co.uk/Hardware/Glockenspiel.htmlfires solenoids when it receives MIDI data but you can modify it so that it generates a tone instead using the tone function.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 8
|
 |
« Reply #5 on: November 13, 2011, 07:15:53 pm » |
Maybe this project http://www.varal.org/ttymidi/But I don't understand how send the mid music 
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 298
Posts: 26024
Solder is electric glue
|
 |
« Reply #6 on: November 14, 2011, 05:54:28 am » |
But I don't understand how send the mid music That is what I said at the start, you need an application on your computer to read a MIDI file and output it. There are lots around most MIDI musics apps allow you to do this.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 8
|
 |
« Reply #7 on: November 14, 2011, 06:29:15 am » |
Yes, I have timidity (it's works), but in tutorial don't show that send the MIDI file (messages). # start ttymidi ttymidi -s /dev/ttyUSB0 &
# start some ALSA compatible MIDI # program (timidity, in this case) timidity -iA &
# list available MIDI input clients aconnect -i
# list available MIDI output clients aconnect -o
# connect aconnect 128:0 129:0
# ...where 128 and 129 are the client # numbers for ttymidi and timidity, # found with the commands above But where is the MIDI file? example: timidity abba.mid (with tty already connected com arduino) and after my buzzer in arduino singing abba :-) Thanks 
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 298
Posts: 26024
Solder is electric glue
|
 |
« Reply #8 on: November 14, 2011, 06:33:22 am » |
Timidity does not do anything with MIDI files, it acts as a conduit for you to put MIDI data through. You need an application that handles MIDI files and you point it at timidity an tell it to play the file.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 8
|
 |
« Reply #9 on: November 14, 2011, 08:51:34 am » |
Some idea how to do this?
I just want: 1 - Create a program in arduino that understand MIDI music file and reproduce. 2 - A way to put(send) MIDI file (messages, bytes, WHETEVER) to arduino. 3 - My piezo buzzer singing simple sound.
:S I will go cry!!!
This is very difficulty
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 298
Posts: 26024
Solder is electric glue
|
 |
« Reply #10 on: November 14, 2011, 10:34:41 am » |
2 - A way to put(send) MIDI file (messages, bytes, WHETEVER) to arduino. I use Garage Band, do you have that? No well you need to get a program on your PC to do this. I am sorry but you haven't even said what operating system you are using. You need to search and find a MIDI sequencer or other sort of file player. I am not sure how many time I have to tell you? This is very difficulty You are making it difficult for your self by not reading my replies.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 8
|
 |
« Reply #11 on: November 14, 2011, 12:14:58 pm » |
You are making it difficult for your self by not reading my replies. Ok, sorry and thanks a lot about your help. No well you need to get a program on your PC to do this. I am sorry but you haven't even said what operating system you are using. My O.S. is ubuntu 11.10. I thought that timitidy is a file player
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 298
Posts: 26024
Solder is electric glue
|
 |
« Reply #12 on: November 15, 2011, 05:06:57 am » |
My O.S. is ubuntu 11.10That makes all the difference, sorry but I know little about Linux. I thought that timitidy is a file player The link you posted is for ttymidi, the first sentence says ttymidi is a GPL-licensed program that allows external serial devices to interface with ALSA MIDI applications. What you need is an ALSA MIDI applications, that is the thing that reads the file. Sorry but I can't find one for you due to my lack of experience with you operating system.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 8
|
 |
« Reply #13 on: November 15, 2011, 05:30:17 am » |
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 23
Arduino rocks
|
 |
« Reply #14 on: November 20, 2011, 08:07:52 pm » |
I just finished a project that might be do something similar to what you are asking here. It takes a midi file (saved as musicxml) and allows you to select up to three parts that will be played on the arduino using the three timers. This post has more information: http://jarv.org/2011/11/arduino-music-from-a-midi-file/I also used this lib to protype creating a cheap musical greeting card using an attiny - http://jarv.org/2011/11/custom-musical-greeting-card-for-less-than-5/How a midi conversion turned out for the SMB theme -
|
|
|
|
« Last Edit: November 20, 2011, 08:09:53 pm by jarv »
|
Logged
|
|
|
|
|
|