Translate

Wednesday 13 February 2013

Using MMA to generate musical accompaniments under Linux

Musical Midi Accompaniment (MMA) provides an open source alternative to the proprietary Windows/Mac Band in a Box. It is a command line utility with an extensive reference manual.

There is also a GUI available called linuxband which is simple to use and provides some access to the functionality of MMA. Linuxband enables you to quickly create chord sequences for midi output and choose a "Groove" which is a musical style for the chords. Linux band requires the jack soundserver which is typically started up and configured using qjackctl. You may find, like me, that linuxband appears as an output port in qjackctl with nothing  to connect it to, like so...


...because your input ports are all under the ALSA tab...



If this is the case, you can use a2jmidid  to surface the ALSA input ports under the midi tab (for Gentoo and OpenSUSE users there are packages available). Once a2jmidid is running, the relevant connections can be made. Use the -e switch to make hardware ports available such as the emu10k1 ports (shown below):


a2jmidid will also make software synths such as fluidsynth and its GUI frontend qsynth available as a writable client for linuxband.  

There are a huge number of Band in a Box files available on the Internet so it's useful to have a utility that converts these files to MMA format. Alain Brenzikofer's Perl script no longer works with recent versions of Perl 5 (because of a deprecated function. I tried it on v5.16.1). Here is an amended version which will work. The download includes a gentoo ebuild which will pull in this version from my Web site. According to the documentation, the script can't convert all BIAB files but so far it has worked fine with everything I have tried.       

If you are learning to improvise, it's useful to have a backing track in all 12 keys. This script (usage: transpose [file].mma)  transposes an mma file into all the other keys of  he chromatic scale. It assumes the mma file contains a Groove command. 

The -T switch used with the mma command is very handy if you need to reduce the number of instruments in a backing track. I use this to create backing tracks containing only bass and drums. The -c switch displays which tracks are available in any given mma file.  

Here are some midi files with bass and drums generated from mma which I use for jazz practice: