Songlib: The C Library for Music Composition

written by: John C. Lusth

Revision Date: May 3, 2017

Printable Version


Linux installation instructions

Begin the installation process by downloading the songlib source tarball into a directory named songlib:

    mkdir ~/songlib
    cd ~/songlib
    wget beastie.cs.ua.edu/songlib/songlib-1.47.tgz

Then, unpack the tarball:

    tar xvfz *.tgz

If /usr/local/bin/ is not in your path, then you should add it. See the web for instructions on how to add a directory to the PATH environment variable.

Install the following supporing packages:

    sudo apt-get install build-essential sox flac

If you are not on a Debian-based system and don't have apt-get, consult the web on how to install these packages.

For mp3 support, install:

    sudo apt-get install lame libsox-fmt-mp3 

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

    sudo 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.

lusth@cs.ua.edu