Installation

Basic dependency

  • Wordpress ≥ 2.2
  • ImageMagick ≥ 6.3.5.7 (due to usage of -alpha option). 6.3.9-6 or later is preferred, since a bug about detecting PostScript transparency is fixed, which affects Mup and PMW notations.
  • PHP 5.x with GD extension
  • GhostScript (Usually pre-installed on Linux; download and install prepackaged installer on Windows. Other methods are not verified by author. ImageMagick needs it for converting PostScript to PNG image.)
  • Music rendering applications (Please refer to the ‘External program dependency’ section below)

For those who want to use this plugin but can’t meet the demanding requirement (especially ImageMagick and PHP5), please download version 0.1.3 here. It only requires ImageMagick 6, WordPress 2.0.3 and PHP 4.4.x. If your hosting machine is using PHP4, it’s better to keep that version rather than upgrade.

External program dependency

Depending on the notation used, various other programs (except for Guido notation) may need to be installed on the web server:

  • Lilypond notation: Lilypond ≥ 2.8.1
  • Mup notation: Mup (unregistered version will print a BIG watermark on the sheet music)
  • ABC notation: abcm2ps (note that other ABC notation rendering program is intentionally not supported due to difficulty in maintenance). Some might still work if you modify ScoreRender source code.
  • PMW notation: PMW ≥ 4.12 (older version completely sucks). Note that no prepackaged version for recent releases is available for any platform, so users must compile from source code.

Configuration

Important note 1: Site admin must disable ‘WordPress should correct invalidly nested XHTML automatically’ checkbox under ‘Option → Writing’ page. Otherwise this option will mangle certain Lilypond and Mup constructs, and cause render error. To be specific, the aforementioned option will forcefully insert space in between double angle brackets ‘<<’ and ‘>>’, and there is no way to circumvent it (yet).

Important note 2: Authors should also disable visual editor (TinyMCE), and use HTML instead, since visual editor would mangle some kind of syntax (especially for Lilypond and Mup) and destroy the fragments. Compatibility with visual editor is planned later.

Here are some of the important settings to take care of:

Image cache directory The folder containing all cached copies of rendered images
Image cache URL The same folder, but using web accessible URL
Show music source in new browser window/tab If enabled, image will be clickable and source will be shown
Invert image colours Image color would be white on black, instead of (default) black on white
Use transparent background Add transparency to PNG image (for IE6 or below)

The interaction of last 2 settings can be decided in the following matrix:

No Invert Invert
No Transparency Black note
White background
White note
Black background
With Transparency Black note
Transparent background
White note
Transparent background

Usage

In posts, pages and comments, enclose each kind of music fragments with corresponding tags:

Notation Start tag End tag
ABC [abc] [/abc]
GUIDO [guido] [/guido]
Lilypond [lilypond] [/lilypond]
Mup [mup] [/mup]
Philip’s Music Writer [pmw] [/pmw]

About how to use and learn the notations, please refer to documentation about each format in demo pages.

Leave a Reply