CAMEL – A Framework for Audio Analysis

Music Information Retrieval

CAMEL – A Framework for Audio Analysis

CAMEL (Content-based Audio and Music Extraction Library) is an easy-to-use C++ framework developed for content-based audio and music analysis. The framework provides a set of tools for easy Segmentation, Feature Extraction, Domain Extraction, etc.



My MSc. research was on the segmentation of music for audio analysis.  I needed a audio analysis framework that allowed me to define custom segmentation routines and to extract common audio features from those segments.  I spent several weeks trying to make other music information retrieval (MIR) libraries work.  Most of the MIR frameworks available were massive projects with a focus on other aspects of the MIR lifecycle (feature extraction, classification, etc.) meaning I was spending a great deal of time trying to get things to work that I would never need.

I finally came to the decision that I needed was a small lightweight framework of code, which did not yet exist.  I wrote CAMEL without ever thinking I would publish the code, or that anyone else would ever see what I built.  When I was done a friend asked if he could use my code to do some similar work.  Together we made some changes so that the framework would accommodate both of our needs.

It wasn’t long before my friend suggested that we polish up the framework a bit more and make it available to the MIR community.  We announced our work with a publication to the Audio Mostly Conference in 2010. The Publication

CAMEL has some major advantages over other frameworks.  The first being accuracy: When I wrote CAMEL it was important that every feature I implemented be exactly correct to the mathematical definition.  In testing, we compared the output of CAMEL to a lot of other frameworks and were surprised to find that many had made errors in their implementations.  During this work we communicated with the authors of other frameworks and helped them improve their libraries at the same time.  A second advantage of CAMEL is simplicity: If you wanted to know the mathematical definition of an audio analysis function, whether it be a windowing function, or feature, it is written in a single location and clearly commented within the CAMEL framework.  Certainly this makes it a lot easier to pick the right code for your application but, perhaps more usefully, this allows anyone needing a reference to how the various features work, a simple index.  Another major advantage of CAMEL is that it is lightweight:  Camel does not require a lot of external library dependencies, only requiring the FFTW library for fast calculation of fourier transforms (which is free and well maintained).

The one major drawback to CAMEL is that it expects its input files to be in raw PCM (Pulse-Code Modulation) ASCII format.  We wanted to build in an MP3 to PCM converter but never found the time.  However, MP3 to PCM converters are fairly popular and this should not pose a huge problem for users of the library.

Now, looking back at this code, I can see a lot of ways it could be improved, however, in terms of finding easy to use functionality and clarity of code, I still do not see any frameworks that match CAMEL.

GitHub Link