convert midi input to basic tones?

ive been toying with midi a while here using the midi shield from sparkfun electronics, and i want to use the midi input jack to actually take the midi and transform it into tones on a speaker. very basic but im not sure how to change a note on and off into tone on and off, and with the right frequency for tones to be played. thanks.

Use the MIDI input code that I used in :-
http://www.thebox.myzen.co.uk/Hardware/Glockenspiel.html

then at the bit when it fires the solenoids replace those commands with ones to tone().

Hey there

@Grumpy_mike:
What sort of impedance matching worked well (if any)?

What sort of impedance matching worked well

Not sure what you mean and it's relevance to this thread but by definition any sort of impedance matching will work, otherwise it wouldn't be impedance matching.

Sorry, what I ment was did you use any?

Is this what you're looking for?

http://subsynth.sourceforge.net/midinote2freq.html

(you'll have to round off frequencies for the tone library)