abc2mma
abc2mma is a Perl script that attempts to read ABC music notation containing chords and produces MMA output.
I wrote this program to generate jazz backing tracks easily from ABC notation. I'm a classical guitarist currently trying to learn jazz. The variant of ABC I use is abcm2ps.
Features
- Attempts to calculate the timings of the chord changes, instead of just extracting the chords from ABC files (which has been done long time ago by someone else).
- Midi files generated by abc2midi can be automatically included by the script in the final MMA output, via MMA's MIDIinc command.
- MMA commands can be inserted directly in the ABC file using the command "%%X-MMA <mma command>". Please see the included demo.abc for examples.
- Handles multi-song ABC files. Roll your own fakebook anyone? :-)
Free for personal and non-commercial use.
Download
Current version - abc2mma 0.51 beta (zip file)
Usage
abc2mma.pl <abcfile.abc | abcfile.txt> [options]
output filename is in the form: <abcfile><N><suffix>.mma
- default=<abcfile><N>_mma.mma
- the _mma suffix is added to avoid name collision with
abc2midi ouput
- N is the song reference number (X:) in the ABC file
Options:
-o or -output=<mmafile>
- output to <mmafile>.mma (overrides -songref and -suffix)
-songref=<yes|no>
- sets whether to use the song reference number in outfile filename
also affects the MIDI filename in the MIDIinc line
(default=yes)
-suffix=<suffix>
- appends suffix to filename (default=_mma)
-writefile=<yes|no>
- generates file (overrides -outfile) (default=yes)
-includemidi=<yes|no>
- inserts MIDIinc command to include <abcfile>.mid (default=yes)
-groove=<mma_groove>
- sets Groove (default=Folk)
-swingmode=<yes|no>
- sets SwingMode (default=yes)
-tempo=<t>
- sets tempo (default=80);
Frequently Asked Questions
- How do I insert MMA commands?
Use "%%X-MMA <mma command>" to directly insert MMA commands at the appropriate sections in the file (note: must be on a separate line). Please refer to the included demo.abc for examples.
- The included melody (from abc2midi) and the chords accompaniment are not aligned! The music has a pick-up measure.
Insert the "BeatAdjust" MMA command with the appropriate number of beats to offset after the pick-up measure. Please refer to the included demo.abc for examples.
- I get a run-time error with ABC files containing the "%%MIDI program" command.
Please download the latest version of MMA.
Notes / Disclaimers
- This is NOT a parser! I'm just using mostly string substitution to get the results I want. I'm too lazy to write a full abc parser. :-P
- I do not claim to handle all possible abc notation scenarios. There are features of abc notation which I don't use, so I'm sure there are many cases which are broken.
- Finally, use at your own risk! I'm not responsible for any damages, blah blah... that may result from the use of this software.
Change Log
- Version 0.5: 8 Apr 2006 - Beta release
- Version 0.51: 14 Apr 2006 - Fixed logical bug in compound time
To Do
- Handling of parts
- Handling of voices and multiple staffs
Contact
Send your comments, bugs, requests to: gek<remove this>siong AT <remove this - no spam!>yahoo DOT com
abc2mma and the contents of this page are copyright (c) Gek S. Low, 2006