A Short Introduction to

MMA - Musical MIDI Accompaniment

Music Essays

Sax Zen

Clean your Sax

Optimal Reed Installation

Légère Reeds

Writing Intros

Beginning Improvisation

Akai EWI4000s Links

My Favorite Music

Introduction to MMA

MMA Grooves

Practice with MMA

In this short article I hope to show you why I wrote MMA, how to do some basic song writing with it, how to create your own style files and some cute tips and tricks.

Just what is this program?

MMA is really just a very fancy metronome which understands chords and rhythms. A fancy metronome? really? Okay, it might be best if we go back to the beginning ... not of time, but about five years ago when I started to write MMA.

I play the saxophone (as well as a number of other instruments). But, saxophone was the newest and was demanding a lot of my practise time. Mastering the mechanics of the horn was one thing; doing that in time to music was another. I'd been spoiled over the years playing electronic organs and keyboards with their auto-accompaniments. Nothing like that on sax. So, at first, I played the chords on a keyboard, recorded them and then practised with the result. I also purchased some “Music Minus One” CDs. All this helped, but it seemed to me that a computer program should do this for me.

I'd seen a demo of the “Band In A Box” software on a PC. Cool, but I run Linux. I did a bit of investigating and really didn't like the BiaB solution: proprietary file formats, the on-going expense, and a sense of a lock in to a vendor. Plus, I'd have to run it on a PC or Mac. Not cool in my mind.

Being rather silly at times, I decided to write a simple program which would generate some beats and play some chords to my MIDI keyboard. After a bit of struggling and reading I figured out how to generate a MIDI file using the Python language.

Why Python? No particular reason other than I'd been playing with it at the time. I certainly had doubts as to its suitability and speed, but I've not had any problems with this. The joy of Python is that it permits very fast development of new code. These days I've forgotten most of what I've learned about C and other languages.

I did a lot of hacking before I posted my first Alpha version for the world to pound on! But, the basics were there.

MMA uses two files to produce a MIDI file:

We will cover the second file, the library, in this article. But, first let's look at your song file. Let's say you have a song called, creatively, “My Song.” And let's further agree that this is a Latin Tango played at 120 beats per minute. A few minutes with a text editor might generate the file “mysong.mma” which looks something like:

MMA Source For My Song

  Tempo 120
  Groove Tango
  1  C
  2  F
  3  G7
  4  C  / Em
  5  C
  6  /
  7  F
  8  C

To create a MIDI file you just need to let MMA does it's magic. From a shell prompt type:

  $: mma mysong

and the MIDI “mysong.mid” will be created. MMA is kind enough to inform you that the song is 8 bars long and should play for about a half a minute.

Fire up your MIDI player to listen.

Before we leave this example, I do want to have a better look at the song file.

The first line in the file sets the tempo in beats per minute. By default, MMA generates all its songs at 120 bpm, so this command really isn't necessary in this file. Also, not so obvious, is the fact that you can change the tempo at any point in the song. If you wanted to have the last 2 bars played faster you could insert a “Tempo 140” between bars 6 and 7.

The second line in the file sets the style of the piece. In this case we've used a basic Tango, but MMA ships with over 800 different styles so you're sure to find something suitable. If not, stay tuned because we'll show you how to create your own styles in a upcoming article. Again, we can change styles at any time in the song. So, following from our tempo example, above, we could insert “Groove TangoEnd” right after our new Tempo to give a fast ending.

Finally we get to the chords. Each line in the file consists of a number and some chord symbols. The number represents the bar number of your song. It is optional, but it makes debugging a lot simpler! Following the number are a series of chords. The style of the piece determines the maximum number of chords you can have in a bar. In most cases this is four (but in a waltz it'd be three). If you have too many chords in a bar MMA will print out a helpful error message.

MMA assumes that you want the same chord for the duration of the bar. So, the line:

  1 C

will generate a C chord on each beat.

Need to change mid-bar? Not a problem. Use the “/” repeat symbol and another chord symbol. So,

  1  C  /  Dm  Em

will use a C for the first 2 beats, a Dm on the third and a Em on the fourth.

If you use the same chord in successive bars, the repeat symbol comes in handy as well:

  5  C
  6  /

puts each beat in bars 5 and 6 to a C chord.

So, grab a copy of MMA and play a bit. It's free ... what a deal.

Have fun.

The entire contents of this article as well as "MMA" and
"Musical MIDI Accompaniment" are (C) Copyright Bob van der Poel.
All rights reserved.

If you wish to share this document with others please link to it.

Please supprt the author by clicking on one of the ads at the top of page. Every penny helps a starving musician.

Back to the essay list

Web Design--Bob van der Poel
This page "mma-introduction.html" was last modified on Thu May 12 18:42:43 2016