NAME

Octaves -- how to do pitches

DESCRIPTION

The LilyPond input language, Mudela (help, silly name), should be easy to read and write. In my experience Mudela is already quite convenient for entering music. Every time I've entered a substantial piece of music, however, I found that I made quite a few mistakes. The MIDI output helps a lot with locating and correcting the errors. There's one type of error that seems to be frequent, stubborn and hard to catch, and that's the octavation error. The relative octave feature is an attempt to make Mudela a bit easier to write. In addition, this feature makes it harder to make octavation mistakes, yet if you made one, its a lot simpler to find and correct. Here's how it works.
  • forget the old "\octave c';" command
  • forget the old octave boundaries with octaves c .. c'
  • You can enter a piece of music in relative mode, by typing
    
        \melodic \relative c { ... }
    
    

    From then on, the pitch of a note will be the closest to the last one, assuming that large intervals are a lot more rare than small ones. Thus, you can enter a scale without using octavation quotes:

    
        c d e f g a b c
    
    

    the last c being an octave higher than the first. If you have to enter an interval that is greater than a fifth, you must specify whether the pitch goes up, using post-quotes:

    
        c c' % octave up
        c g' % fifth up 
    
    

    or down, using pre-quotes:

    
        c c, % octave down
        c f, % fifth down
    
    

    CONVERTING

    To convert a piece of music from absolute-octave notation to relative octaves, lilypond provides the -Q, --find-old-relative feature to locate all big intervals in your music.

    First, edit the .ly file, add "\relative c" to all melodic chunks:

    
        foo = \melodic \relative c { ... }
    
    

    and remove all "\octave " commands. See the example file input/test/find-fifths.ly.

    Use lily to find the fifths:

    
        lilypond -Q find-fifths.ly 2>&1 | tee fifths
        ...
        find-fifths.ly:3:18: warning: Interval greater than fourth, relative: g':
    		  c d c f c g
    			      c b, c g, c f, c c'' c
    
        find-fifths.ly:3:20: warning: Interval greater than fourth, relative: c,:
    		  c d c f c g c
    				b, c g, c f, c c'' c
    
    

    Then, load a copy of the original mudela file in your favourite editor, and let it parse the 'error file' intervals. First you remove all octavation quotes. Then, jumping from warning to warning, you enter quotes as suggested by LilyPond.


    Return to GNU LilyPond's home page.

    Please send GNU LilyPond questions and comments to gnu-music-discuss@gnu.org.

    Please send comments on these web pages to (address unknown), send other FSF & GNU inquiries and questions to gnu@gnu.org.

    Copyright (c) 1997, 1998, 1999 Han-Wen Nienhuys and Jan Nieuwenhuizen.

    Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.


    This page was built from GNU LilyPond-1.1.57 by

    root <(address unknown)>, at Tue Jul 13 11:31:35 1999 CDT.