MIDI

When using midiMsg where is the output sent to? How do I send it to the speaker I've connected up?

What are you trying to do?

Are you sending or receiving that message?

There's no "sound" built into the Arduino.

You could receive a MIDI message (from a MIDI keyboard, etc.) and generate a square wave note/tone.* But, you wouldn't be able to use the velocity (loudness) information and there wouldn't be any ADSR character to the sound.

Anything beyond that is going to require some kind of additional sound-generating hardware.

You can drive a piezo speaker directly with the Arduino, but regular speakers or headphones require an amplifier. Or, you can use powered computer speakers.

You can us a MIDI library to receive and "decode" the MIDI message, but then you have to write the software to "do something" with that message.

  • If you don't know what a square wave sounds like you can run the tone() function with the Arduino connected to your computer-speakers. Or, Audacity can generate square waves that you can play on your computer (without the Arduino).

When using midiMsg

What is this, is it your short hand for MIDI messages or is it some commercial hardware or software.

MIDI is just a control protocol it does not generate any sound.