Extension:AbcMusic

Overview
You can typeset music with this extension. Just enclose some music in ABC syntax in ... tags.

This implementation uses LilyPond as the underlying rendering engine. LilyPond comes packaged with a script, abc2ly, that converts ABC notation to LilyPond. The extension calls abc2ly then LilyPond.

See the Wikipedia article on ABC notation for links to tutorials and song collections.

Example
X:1 T: Twinkle Twinkle Little Star M: 2/4 L: 1/4 K: C w: Twin- kle twin- kle lit- tle star, "F" F F | "C" E E | "G7" D D | "C" C2 | w: how I won- der what you are.
 * "C" C C | "C" G G | "F" A A | "C" G2 |

Produces: [Need image. In four days my account will be autoconfirmed, and I will upload.]

Issues
The script abc2ly is a very nice piece of code, but it is not being actively developed, and it is lagging behind the current ABC standard. Programmers, go forth and develop!

This extension will inherit any idiosyncrasies of the current abc2ly.

Exception: abc2ly does not handle multiple songs in a single file, but this extension works around that limitation, by splitting a multi-song file into separate parts, and making repeated calls to abc2ly, LilyPond.

Further Work
1. Make the generated MIDI file available. Just follow the coding pattern used in Extension:LilyPond for exposing the midi file.

2. Include an enhanced script abc2ly as part of this extension.

3. Read files from a URL. This should be another tag.

Acknowledgement
This code was originally derived from Extension:LilyPond.

Installation
Make sure you have LilyPond installed.

Then copy AbcMusic.php into the extensions/ directory.