My recent work on music transcription has resulted in a lot of NMF-related code. There are a number of variants of this algorithm out there and a few good Matlab implementations. Part of the motivtion for writing my own versions was pedagogical: there's no better way to understand how something works than to build it yourself! However, as I began to amass this collection of tools, I realized that I had writen them with a certain set of design principles in mind (specifically, speed and consistency) and that others might find the code useful as well. Thus, I am making the resulting collection of Matlab functions, called NMFlib, available here. Currently, it provides implementations of the following algorithms:

Hopefully others will find these tools useful. If you do find yourself using it for one reason or another, drop me an email and let me know. I'd love to hear about what you're working on and how the code has helped (or perhaps hindered!) your work. Also, although I have put a substantial amount of time into this codebase, it is v0.1.3 and there are bound to be issues. Please let me know if you find any bugs/problems or have suggestions for how the library might be improved. The latest code is available from the mercurial repository here or you can just grab a recent snapshot below.

Download NMFlib

Matlab Audio and Music Library (MAML)

MAML is a collection of functions that I have found useful when working with MIDI and audio in Matlab. Many of the functions are related to MIDI-to-audio conversion (via timidity), although there are other utilities for things like envelope followers and generating impulse responses for artificial reverb. The latest code is available from the mercurial repository here or you can just grab the snapshot below.

Download MAML

Midi Toolbox Updates

A subset of the MAML toolbox consists of drop-in replacements for some of the functions in the excellent Midi Toolbox. The modifications add support for things multiple instruments and 64-bit Linux as well as other minor fixes. See the documentation for more detail. If you're only interested in the Midi Toolbox updates and don't want the rest of MAML, you can download them as a separate package below.

Download Midi Toolbox Updates

Rhythmbox Plugin for Ampache

Ampache is a fantastic piece of software for accessing/sharing/streaming music collections over the web. While it has a really nice web interface, sometimes it's preferable to have a stand-alone player. I've been helping to develop an Ampache plugin for Rhythmbox. You can download the latest version here.

On-the-Fly Video Transcoding and Streaming

Here is a bash script that uses VLC to transcode and stream video on-the-fly. This is useful for streaming video over low-bandwidth connections without having to re-encode (and store) everything. The script is pretty flexible and supports whatever video and audio codecs are installed and supported by VLC. Note that it was heavily inspired by code posted on the VLC wiki page.

Assuming that you've got a Linux machine with VLC installed, just download the script, make it executable (chmod u+x stream_video), and put it somewhere convenient. There is support for setting the aspect ratio, video and audio codecs and bitrates, de-interlacing, scaling, FPS, and stream container. Run the script with no arguments to get help and see the defaults. These defaults are set to what I've found to work well for streaming video over a typical home internet connection (H264 at 192 kb/s video codec, MP3 at 96 kb/s audio codec, ASF container, and stream destination of, but obviously you can change them to suit your needs. Enjoy!

Download the script

LabROSA LaTeX Poster Template

Here is a LabROSA-branded packaging of the a0poster template files.

Download the template files