I hope you can forgive me for asking this question, but it is confusing for me.
I see some audio shields that playback MP3 (and other audio formats) also support MIDI.
Now, I am confused. MP3/WAV/etc are all files which contain all the data.
MIDI is only notes/instructions to another device which plays the sounds.
So how can a a card which plays MP3 (I'll only refer to that for the sake of simplicity) play MIDI?
What am I missing?
Why am I asking?
Well, I am wanting to make a music player to "replace" my existing system.
It is getting too annoying having to turn on a heap of stuff to play music. Note: I hardly listen to the radio much these days. I have HEAPS of CDs of which I prefer the music.
So if I can get a small device to play the files I would be happy.
A small SMPS, and a little box with the player connected to some speakers, I'd be happy.
A "line out" may be nice to feed it into a better amp, but I won't expect too much.
So how can a a card which plays MP3 ......... play MIDI?
MP3 is a set of compression / decompression algorithms. The music is split up into small data packets a fractional of a second long and compressed. The data when played back is rehydrate so to speak back into data samples which are then played through the D/A. Once you have this system it is a relatively simple matter to have a few bytes of data define an instrument sound and rehydrate them in response to the note on commands of MIDI.
Genral MIDI is a standard set of sounds. i.e a program 1 is a Acoustics piano on all of them. Same for all the other sounds. It mostly for karaoke type stuff i think. Most mp3 shields i have seen with midi just include midi ports connected to the serial bus on the arduino. They add a opto isolator and some other bits. But you can hook up your ardunio to midi (in/out) with a couple of sockets and not much else. The serial in out of the arduino is what you use for midi in out just set the baud rate correctly. Basically there is nothing to sending/receving midi on the arduino but playing mp3/wav is a lot more complicated and it is that thats on the shield.
Unless it is a general midi synch in which case there will be more to the midi/synth side of it.