I'm no musician, but lately I've been experimenting with MIDI (Musical Instrument Digital Interface) in my projects. MIDI is a standard for controlling instruments that works by passing messages between pieces of connected equipment. The messages aren't actual music in the same way as, say, an MP3 is. Instead, they are commands for making music—"Play middle C on an electric piano," for example. Messages consist of a channel number (1 through 16) followed by a status byte, which indicates the type of message (such as Note On or Note Off) and, where needed, data (such as the note to be played). MIDI devices known as controllers create the messages, and MIDI synthesizers receive them, with the result usually being musical sounds (although I've also built projects that map notes to relays that control Christmas lights and fireballs).
A basic MIDI setup might include a microcontroller, such as an Arduino, along with a MIDI Shield ($20; sparkfun.com) to provide the physical interface, and the Arduino MIDI library (free; arduino.cc) to communicate using MIDI messages. The last part is the software. I've written some starter code [see link below] to demonstrate simple functions like Control Change messages, which adjust aspects of the sounds, including volume and sustain. Things get really interesting with Real Time System Exclusive messages, which go beyond music-creation projects with advanced functions like MIDI Timecode, Show Control and Machine Control. Those give MIDI the ability to synchronize whole stage acts with music and preprogrammed cues, control recording-studio equipment, and more.
For sample code and links to more information, click here.
This seems like a cool electronic toy. It includes the fun of working with electronic and music. I adore anything electronics. As a robot, perhaps I should become a robotic doctor, hmmm?!
Science sees no further than what it can sense, i.e. facts.
Religion sees beyond the senses, i.e. faith.
Open your mind and see!
Why not use a project like HIDUINO? You don't need any shield or MIDI interface for your computer, just a regular Arduino which can act like a USB-MIDI device.
https://github.com/ddiakopoulos/hiduino The project also has a bunch of starter code too