From Fedora Project Wiki

< User:Crantila‎ | FSC

Revision as of 01:45, 10 June 2010 by Crantila (talk | contribs) (page creation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

What LilyPond Is

(no algorithms)

How LilyPond Works

(no algorithms; may require illustrations)

Installation

1.) run 'yum install lilypond' 2.) Review the dependencies; it will want to install a lot of things called lilypond-*-fonts 3.) LilyPond can be run from the command-line, as 'lilypond'

It's recommended to install the "Frescobaldi" GUI for LilyPond, which greatly reduces the complexity of the user experience.

A Brief Introduction to LilyPond Syntax

I think I'm going to direct readers to the official LilyPond documentation, specifically the "Learning Manual." As for exactly what I'll suggest they read, or whether I'll incorporate/adapt some of it into this guide, remains to be seen.

Working on a Counterpoint Exercise

Scenario: You're in Counterpoint class, and you've been asked to submit a very clean copy of your next assignment. Since you don't want to pay $450,000 for Sibelius/Finale and a fruity computer to use it, you decide that LilyPond is the solution for you.

Set Up the Score

1.) Open Frescobaldi into a blank document 2.) Use the 'LilyPond > Setup New Score' dialogue 3.) Set the title and composer (and any other field) on the 'Titles and Headers' tab 4.) You need a two staves, so you go to 'Parts' then 'Keyboard' then 'Piano' 5.) You need to label the intervals between the notes, so you choose 'Special' then 'Figured Bass' (we'll put it in the right spot later 6.) You go to the 'Score settings' tab

 a) since you've already played through this example, uncheck "Create MIDI output" and save processing time
 b) your example is in F Major
 c) You want only whole notes, with no barlines; choose a 4/4 time signature, since we'll change this later

7.) Press 'Try' to get a preview of the score setup - the notes are demonstrative and will not be there 8.) If the setup looks like you want it, then press 'OK' to generate the template

Inputting the Parts

1.) Look over the template. It's not important to understand what any of this means, but it's good if you can figure it out. 2.) The piano's upper staff will contain the notes between the { and } following the " right = \relative c " portion 3.) The piano's lower ... left 4.) The figured bass will say what you put in figBass 5.) start with the piano's upper part. Input "f1 g a f d e f c a f g f" (explain) 6.) Check that it's right. Preview by press the "LilyPond" button on the toolbar 7.) The exercise starts too high, and it ends too low. Change the starting pitch by " right = \relative c' " 8.) Preview again; of course, it still ends too low (these simple exercises usually start and end on the same pitch). 9.) Put a ' right after the c so that it goes to the upper C 10.) Preview again, and this time it's right. 11.) Now, enter the notes that you've written for the piano's lower staff: "f1 e d c bes c bes f d bes e f" 12.) Preview the output again, and see that it starts too high, but ends on the right pitch. 13.) Fix the start-too-high by changing to " left = \relative c { " 14.) Preview again, and decide where to fix the other change (NB: I end up with "f1 e d c bes c bes f' d bes e f" 15.) Enter the interval number between the top and bottom between the { and } preceded by " figBass = \figuremode " 16.) You have to put each interval between < > brackets. The note-length of the figure's duration goes after the >, so I end up with "<1>1 <3> <5> <4> <3> <3> <5> <5> <5> <5> <3> <1>" 17.) Now you realize that there are some signficant errors in your work. The top staff is the cantus, and cannot change. You have to correct the lower staff. 18.) I've ended up with a lower part that is "f1 e d a bes c d e f d c f", which gives figures that are "<1>1 <3> <5> <6> <3> <3> <3> <6> <3> <3> <5> <1>"

Formatting the Score

I do this last, so that my primary focus is the note-wise content, and formatting is only a secondary concern. LilyPond is particularly good at handling this sort of outlook.

Move the Figured Bass

Normally, figured bass parts are below the staves. This example is using the figured-bass feature of LilyPond to do something else, so we're going to move the figured bass so that it's where it needs to be. 1.) the \score{ } section contains everything in the score; notice that the figured bass has the identifier \bassFiguresPart; remove this 2.) scroll up to where it says "bassFiguresPart = ... " and comment it with % 3.) scroll up to where it says "pianoPart = ... " and enter the "\new FiguredBass \figBass" line that you just commented out, on a line between the "right" and "left" staves 4.) now erase the part that you commented in (2) (or leave it there) 5.) Preview the file, and see that the figures now appear between the piano staves

Take away the word "Piano" at the start of the staves

1.) Find the part that begins "pianoPart = ... " and erase the "instrumentName ... " line (or comment it) 2.) Preview the file, and see that it no longer says, "Piano"

Make Some Elements Transparent

This involves some more advanced tweaking. Explain this sort of command.

Every layout object has a "stencil" property. By default, this is set to whatever function draws the object. If you set that property to #f, which means "false", then the drawing function is not called, and the object will not appear on the score.

Every layout object also has a "transparent" property. By default, this is set to #f ("false"). Setting it to #t ("true") will make the object transparent.

You can use "\once \override ..." or \revert ..." too

1.) Find the "global" section 2.) After \key and \time, put " \override Score.BarLine #'stencil = ##f " 3.) Preview the file, and see that this doesn't work quite as intended. 4.) You want a barline at the end, so pick one of the staves (right, left, figBass - it doesn't matter in this case) and use the \revert command (don't know if I should put this in, but: "\revert Score.BarLine #'transparent") !!!!!!!! For some reason, there are barlines left between the staves... I'm working this out

Unlike with some other elements, if you simply remove the "\time 4/4" indicator, it will still print the default 4/4 time signature.

1.) In the "global" section, after \key and \time, put the following: \override Staff.TimeSignature #'transparent = ##t

Working on a Piano Score

(these can get quite complex; we'll focus on issues unique to piano music)

Working on an Large Ensemble Score

(probably a work for orchestra; we'll focus on issues unique to large ensemble music)