libgamemusic provides a standard interface to access different music file formats.
The main interface to the library is the getManager() function, which returns an instance of the Manager class. The Manager is used to query supported music formats, and for each supported file format it returns an instance of the FormatType class.
The FormatType class can be used to examine files and check what file format they are in, and if they are in the correct format, to open them. Successfully opening a music file produces an instance of the Music class. The MusicType class can also be used to create new music files from scratch, which will again return a Music instance.
Reading and writing files through the Music class is done with lists of "events", such as note-on and note-off. These events are transparently converted to and from the underlying file format by the Music class.
The libgamemusic distribution comes with example code in the form of the gamemus utility, which provides a simple command-line interface to the full functionality of the library.
For a small "hello world" example, try this:
When run, this program produces output similar to the following:
Additional information including a mailing list is available from the Camoto homepage http://www.shikadi.net/camoto.