Difference between revisions of "Lilypond"

From SME Server
Jump to navigationJump to search
m
Line 33: Line 33:
 
====MediaWiki Extension====
 
====MediaWiki Extension====
  
 +
=====Install=====
 
* Install MediaWiki <br>
 
* Install MediaWiki <br>
 
Thank you Dietmar for the prepared rpm http://wiki.contribs.org/Mediawiki
 
Thank you Dietmar for the prepared rpm http://wiki.contribs.org/Mediawiki
Line 44: Line 45:
  
 
  cd /opt/mediawiki/
 
  cd /opt/mediawiki/
  cp LilyPond.php extensions/Lilypond.php
+
  cp /path2file/LilyPond.php extensions/Lilypond.php
  
 
Add the extension to the Local settings config file
 
Add the extension to the Local settings config file
Line 50: Line 51:
 
  require_once("extensions/LilyPond.php");
 
  require_once("extensions/LilyPond.php");
  
* Usage
+
=====Usage=====
=====<lilypond>=====
+
 
 +
* <lilypond>
 
You place special tags in your wiki article, in a nutshell,
 
You place special tags in your wiki article, in a nutshell,
  
Line 65: Line 67:
 
[[Image:LilypondScale.png|Lilypond Scale]]
 
[[Image:LilypondScale.png|Lilypond Scale]]
  
=====<lilybook>=====
+
 
 +
* <lilymidi>
  
 
  <lilymidi>
 
  <lilymidi>
Line 73: Line 76:
 
Produces: The above image plus makes it a clickable link to a .midi file
 
Produces: The above image plus makes it a clickable link to a .midi file
  
=====<lilybook>=====
+
* <lilybook>
  
 
  <lilymidi>
 
  <lilymidi>

Revision as of 02:25, 26 August 2007

Lilypond – Music notation for everyone

LilyPond is an automated engraving system. It formats music beautifully and automatically, and has a friendly syntax for its input files.

Refer to the Lilypond FAQ or Lilypond userguide for further information


Installation

Download the latest installer from http://lilypond.org/web/install/

wget http://download.linuxaudio.org/lilypond/binaries/linux-x86/lilypond-X.Y.Z.linux-x86.sh

And run the installer

sh lilypond-X.Y.Z.linux-x86.sh

Shell Access

As the preferred method to enter a score is a text editor, any editor can edit the files stored on the server.

If you have trustworthy users give them shell access. They can then run lilypond to produce a .pdf file for printing and optionally a .midi file

cd /home/e-smith/files/ibays/scores/mozart/
lilypond K321.ly

Shell access lets users use all the features of Lilypond, such as importing a .midi file

midi2ly  K123.midi

MediaWiki Extension

Install
  • Install MediaWiki

Thank you Dietmar for the prepared rpm http://wiki.contribs.org/Mediawiki

  • Install the Lilypond Extension

For the extension announcement see http://bugzilla.wikipedia.org/show_bug.cgi?id=189#c12

Obtain an updated extension from here, which fixes some bugs http://bugs.contribs.org/show_bug.cgi?id=3338

cd /opt/mediawiki/
cp /path2file/LilyPond.php extensions/Lilypond.php

Add the extension to the Local settings config file

nano -w LocalSettings.php
require_once("extensions/LilyPond.php");
Usage
  • <lilypond>

You place special tags in your wiki article, in a nutshell,

<lilypond>
  c, d e f 
  g a b c
  b a g f 
  e d c
</lilypond>

produces:

Lilypond Scale


  • <lilymidi>
<lilymidi>
  c, d e f 
</lilymidi>

Produces: The above image plus makes it a clickable link to a .midi file

  • <lilybook>
<lilymidi>
 lots of code... 
</lilybook>

Produces: same as <lilymidi>

For this method you enter the text of an entire .ly file

For all three methods, macro code is disabled for security reasons


Further Information

The Lilypond syntax cheat sheet may be less daunting for wiki users then the full manual.

See the Lilypond Snippet Registry for more advanced syntax examples