Planning on extending your Arduino sound making into MP3? Then, you may want to opt for the SparkFun MP3 Player Shield
(DEV-10628). The MP3 board is very similar to the MIDI-only Music Instrument Shield, but it also exposes pins for controlling MP3 playback.

If you use the MP3 player shield, you need to re-arrange some of the wiring for the servos and the Parallax line following
module. As the pin definitions need to be different, you must change the sketches accordingly. See www.robotoid.com for
alternative versions of all the sketches for use with the SparkFun MP3 player shield.

statement line
sendMIDI(0xC0|0, 0, 0)
sets the instrument on
channel 0 to 0.

All of the boards from
SparkFun use the VLSI
VS10xx series of MIDI/MP3
chips and in these,
instrument 0 is an acoustic
grand piano. The VS10xx
chips offer two instrument
banks, referenced as 0x79
for a set of “melodic”
instruments, and 0x78 for a
set of drum and other
percussion. If you don’t
specify a bank, the chip will
default to bank 0 which is
the same as the melodic
bank.

Take a closer look at the
sendMIDI function itself.
Notice that there’s a bit of
code to determine if the
message contains two or
three bytes:

The logic is this: If the
most significant four bits –
the ones on the left – are
equal to or less than 0xB0,
or equal to 0xE0, the
message is assumed to have
three bytes. If the test
doesn’t meet these
requirements, the message is
assumed to have just two
bytes. The sendMIDI
function takes three bytes
regardless, so when passing
a two-byte message just fill
in the third parameter with
a 0.

The loop() function cycles through, turning a note
on and off at one second intervals. Two function calls
are used here: noteOn and noteOff. They’re simply
wrappers to the sendMIDI function, and make the coding
simpler. Both take the same arguments, but they do