Typically programming with third party platform compatible libraries is the way to start with. Libraries such as RTMidi, JDKMidi etc...
JDKMidi is better than RTMidi in its capabilities. If you wish to not learn about MIDI complexities, and purely want to concentrate on programming the Music, then you can consider the CFugue MusicNote library.
CFugue is a high level Music Programming Library. This library makes it possible to play music notes directly from C/C++ programs, without ever having to deal with the low-level MIDI complexities. This library provides a beautiful abstraction that lets you concetrate on programming the music rather than worry about the MIDI nuances. Provides features that makes it possible to use this library directly from many platforms, including but not limited to ASP pages, .Net applications and even non-Windows based systems.
For usage samples and further details, please refer to the documentation at http://cfugue.sourceforge.net/docs/html/index.html
Using this library to play music is as easy as writing plain music notes. Just create a Player object and call the Play method on it supplying the Music notes to be played. Simple.
MusicNoteLib::Player player; // Create the Player Object
player.Play("C D E F G A B"); // Play the Music Notes on the default MIDI output port
With built-in support for both Carnatic and Western Music alike, this is the first and only one of its kind.
If you wish to take part in building this world class library, join the CFugue project development team at: http://gopalakrishna.palem.in/CFugue.html
Author: Gopalakrishna Palem
Copyright (C) 2009 CineFx Digital Media Pvt. Ltd.