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 a commercially-available engraving solution and a fruity computer to use it, you decide that LilyPond is the solution for you.
Set Up the Score
- Open Frescobaldi into a blank document
- Use the 'LilyPond > Setup New Score' dialogue
- Set the title and composer (and any other field) on the 'Titles and Headers' tab
- You need a two staves, so you go to 'Parts' then 'Keyboard' then 'Piano'
- 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
- You go to the 'Score settings' tab
- since you've already played through this example, uncheck "Create MIDI output" and save processing time
- your example is in F Major
- You want only whole notes, with no barlines; choose a 4/4 time signature, since we'll change this later
- Press 'Try' to get a preview of the score setup - the notes are demonstrative and will not be there
- If the setup looks like you want it, then press 'OK' to generate the template
Inputting the Parts
- 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.
- The piano's upper staff will contain the notes between the { and } following the " right = \relative c " portion
- The piano's lower ... left
- The figured bass will say what you put in figBass
- start with the piano's upper part. Input "f1 g a f d e f c a f g f" (explain)
- Check that it's right. Preview by press the "LilyPond" button on the toolbar
- The exercise starts too high, and it ends too low. Change the starting pitch by " right = \relative c' "
- Preview again; of course, it still ends too low (these simple exercises usually start and end on the same pitch).
- Put a ' right after the c so that it goes to the upper C
- Preview again, and this time it's right.
- 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"
- Preview the output again, and see that it starts too high, but ends on the right pitch.
- Fix the start-too-high by changing to " left = \relative c { "
- 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"
- Enter the interval number between the top and bottom between the { and } preceded by " figBass = \figuremode "
- 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>"
- 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.
- 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.
- the \score{ } section contains everything in the score; notice that the figured bass has the identifier \bassFiguresPart; remove this
- scroll up to where it says "bassFiguresPart = ... " and comment it with %
- 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
- now erase the part that you commented in (2) (or leave it there)
- 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
- Find the part that begins "pianoPart = ... " and erase the "instrumentName ... " line (or comment it)
- 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
- Find the "global" section
- After \key and \time, put " \override Score.BarLine #'stencil = ##f "
- Preview the file, and see that this doesn't work quite as intended.
- It so happens that, while measure lines within a staff are handled by Staff.BarLine, measure lines between staves are handled by Staff.SpanBar; so you'll need to set its 'transparent symbol to #t also
- But there's still no measure-line at the end! 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 and \revert Score.SpanBar #'transparent")
- But even this isn't quite right. You want a double-barline at the end. So, put the cursor after the \revert lines, and then from the menu, 'LilyPond > Bar Lines > Ending Bar Line' . It knows what you want, remembers the symbol for you, so you don't have to!
- explain in there the difference between a Staff.* and Score.* override
- Unlike with some other elements, if you simply remove the "\time 4/4" indicator, it will still print the default 4/4 time signature.
- This example is musically simple, but it includes some advanced concepts, and importantly helps to get over a couple of common (and understandable) fears, especially for beginners, and especially for musically-simple things like this