Difference between revisions of "Lilypond"
m (→Install) |
|||
(25 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
===Lilypond – Music notation for everyone=== | ===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. | + | [http://lilypond.org/web/ LilyPond] is an automated engraving system. It formats music beautifully and automatically, and has a friendly syntax for its input files. |
+ | |||
+ | Refer to the | ||
+ | [http://lilypond.org/web/about/faq Lilypond FAQ] or | ||
+ | [http://lilypond.org/doc/v2.10/Documentation Lilypond userguide] | ||
+ | for further information | ||
− | |||
====Installation==== | ====Installation==== | ||
Line 18: | Line 22: | ||
As the preferred method to enter a score is a text editor, any editor can edit the files stored on the server. | 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 | + | 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 | Shell access lets users use all the features of Lilypond, such as importing a .midi file | ||
− | + | midi2ly K123.midi | |
====MediaWiki Extension==== | ====MediaWiki Extension==== | ||
− | Install MediaWiki | + | Insert fragments of music or whole scores into your wiki pages. |
+ | |||
+ | After installing the Mediawiki Lilypond extension you can work on your score anywhere you have browser access. | ||
+ | |||
+ | =====Install===== | ||
+ | * Install MediaWiki <br> | ||
+ | Thank you Dietmar for the prepared rpm http://wiki.contribs.org/Mediawiki | ||
− | Install the Lilypond Extension | + | * Install the Lilypond Extension |
+ | http://www.mediawiki.org/wiki/Extension:LilyPond | ||
+ | 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, | You place special tags in your wiki article, in a nutshell, | ||
− | |||
<lilypond> | <lilypond> | ||
c, d e f | c, d e f | ||
Line 40: | Line 61: | ||
b a g f | b a g f | ||
e d c | e d c | ||
− | + | </lilypond> | |
− | </code | + | |
+ | Produces: An Image | ||
+ | |||
+ | [[Image:LilypondScale.png|Lilypond Scale]] | ||
+ | |||
+ | |||
+ | * <lilymidi> | ||
+ | Produces: An image plus makes it a clickable link to a .midi file | ||
+ | |||
+ | <lilymidi> | ||
+ | c, d e f | ||
+ | </lilymidi> | ||
+ | |||
+ | |||
+ | * <lilybook> | ||
+ | |||
+ | <lilybook> | ||
+ | \version "2.10.29" | ||
+ | |||
+ | \header { | ||
+ | title = "Mary Had a Little Lamb" | ||
+ | tagline = "" | ||
+ | } | ||
+ | |||
+ | \paper { | ||
+ | ragged-right = ##t | ||
+ | ragged-bottom = ##t | ||
+ | indent = 0\mm | ||
+ | } | ||
+ | |||
+ | melody = \relative c' { | ||
+ | e d c d | e e e e | | ||
+ | d d e d | c1 | | ||
+ | } | ||
+ | |||
+ | text = \lyricmode { | ||
+ | \set stanza = "1." Ma- ry had a lit- tle lamb, | ||
+ | its fleece was white as snow. | ||
+ | } | ||
+ | |||
+ | \book{ | ||
+ | \score{ << | ||
+ | \new Voice = "one" { \melody } | ||
+ | \new Lyrics \lyricsto "one" \text | ||
+ | >> | ||
+ | |||
+ | \layout { } | ||
+ | \midi { } | ||
+ | } | ||
+ | |||
+ | \markup{ | ||
+ | \wordwrap-string #" | ||
+ | Verse 2. | ||
+ | |||
+ | Mary took it home again, | ||
+ | |||
+ | It was against the rule." | ||
+ | } | ||
+ | } | ||
+ | </lilybook> | ||
+ | |||
+ | Produces: An Image, linked to a midi if ''' \midi { }''' is included | ||
+ | |||
+ | [[Image:LilypondMary.png|Lilypond Song]] | ||
+ | |||
+ | {{Note box| | ||
+ | For the <lilybook> method you enter the text of an entire .ly file | ||
+ | |||
+ | For <lilypond> and <lilymidi> you are just entering the notes from the melody | ||
+ | |||
+ | For all three methods, macro code is disabled for security reasons. | ||
+ | }} | ||
− | + | ====Further Information==== | |
+ | The [http://lilypond.org/doc/v2.10/Documentation/user/lilypond/Cheat-sheet Lilypond syntax cheat sheet] may be less daunting for wiki users then the full manual. | ||
− | + | See the [http://lsr.dsi.unimi.it/LSR/Browse?s=1&m=20 Lilypond Snippet Registry] | |
+ | for more advanced syntax examples | ||
<noinclude>[[Category:Howto]]</noinclude> | <noinclude>[[Category:Howto]]</noinclude> | ||
+ | <noinclude>[[Category:Dungog]]</noinclude> |
Latest revision as of 12:33, 30 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
Insert fragments of music or whole scores into your wiki pages.
After installing the Mediawiki Lilypond extension you can work on your score anywhere you have browser access.
Install
- Install MediaWiki
Thank you Dietmar for the prepared rpm http://wiki.contribs.org/Mediawiki
- Install the Lilypond Extension
http://www.mediawiki.org/wiki/Extension:LilyPond
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: An Image
- <lilymidi>
Produces: An image plus makes it a clickable link to a .midi file
<lilymidi> c, d e f </lilymidi>
- <lilybook>
<lilybook> \version "2.10.29" \header { title = "Mary Had a Little Lamb" tagline = "" } \paper { ragged-right = ##t ragged-bottom = ##t indent = 0\mm } melody = \relative c' { e d c d | e e e e | d d e d | c1 | } text = \lyricmode { \set stanza = "1." Ma- ry had a lit- tle lamb, its fleece was white as snow. } \book{ \score{ << \new Voice = "one" { \melody } \new Lyrics \lyricsto "one" \text >> \layout { } \midi { } } \markup{ \wordwrap-string #" Verse 2. Mary took it home again, It was against the rule." } } </lilybook>
Produces: An Image, linked to a midi if \midi { } is included
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