Songlib: The C Library for Music Composition

written by: John C. Lusth

Revision Date: April 11, 2012

Printable Version


Downloading and installing songlib

Songlib is distributed in a tarball; the tarball consists of the songlib source and a set of precompiled utilities. The tarball has enough music samples to run the sample programs in the tarball; to install more music samples, see installing sample packs.

Begin the installation process by downloading the tarball appropriate for your architecture:

We will assume it ends up in the ~/Downloads/ directory. Next, unpack the tarball in a directory named songlib:

    mkdir ~/songlib
    cp ~/Downloads/songlib-1.09-i386.tgz ~/songlib
    cd ~/songlib
    tar xvfz *.tgz

Next, install the sox and flac packages:

    sudo apt-get install sox flac

Finally, build and install the library and install the utilities and sample note files by typing the command:

    make install

while in the songlib directory. To test your installation, move into the quickstart directory and type make play:

    cd quickstart
    make play

You should see the song being constructed and then should hear it begin to play.

Using songlib

Songlib is a simple and (mostly) imperative C library for creating music. Currently, these documents exist for explaining how to use songlib.

Here are the currently available documents on Readily Readable Audio:

Documents on recording samples:

lusth@cs.ua.edu