[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is there a bug in the way Lilypond handles staccatos?
From: |
David Wright |
Subject: |
Re: Is there a bug in the way Lilypond handles staccatos? |
Date: |
Mon, 15 Feb 2016 19:32:27 -0600 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Mon 15 Feb 2016 at 14:53:18 (-0500), Devin wrote:
> @Urs, Klaus, and Andrew
>
> Thank you very much!
>
> This makes sense now (I guess Lilypond does not need to be a "programming
> language" per se and that is where the confusion is). I will add your replies
> to our Music Blocks discussion thread so that everyone from our team is in the
> loop about this.
No, LilyPond _is_ a programming language. Many programming languages
have syntactic elements such as { } to structure the code into blocks
which are manipulated as a single item (usually a sequence, like notes
(the default in LilyPond), lyrics, markup, or whatever).
The { } characters affect how what lies between them is processed;
they aren't elements of the music itself, but only of the source code.
In the following, they have nothing to do with music at all:
\layout {
indent = 0
\context {
\Score
\omit BarNumber
}
\context {
\GrandStaff
\numericTimeSignature
systemStartDelimiter = #'SystemStartBracket
\override SystemStartBracket.collapse-height = #1
\remove Span_bar_engraver
\accepts Lyrics
}
}
However, the ( [ ) ] are semantic elements. They denote slurs and
beams which are printed in the music. Because slurs and beams have
a starting and a finishing point, they _happen_ to be paired, but that
pairing is a property of the printed music, not the LilyPond language.
Try removing a brace: you'll get an error straight away while parsing
the code. Try removing a slur: the code will parse perfectly, but
you'll get an error later on while interpreting the music.
The ) in
a'4( b'4 \tuplet 3/2 { a'8 b'8 c'8 } )
is meaningless because you can't attach one slur to a sequence
of three notes. You have to pick which note terminates the slur:
a'4( b'4) \tuplet 3/2 { a'8 b'8 c'8 } )
a'4( b'4 \tuplet 3/2 { a'8) b'8 c'8 } )
a'4( b'4 \tuplet 3/2 { a'8 b'8) c'8 } )
a'4( b'4 \tuplet 3/2 { a'8 b'8 c'8) } )
a'4( b'4 \tuplet 3/2 { a'8 b'8 c'8 } x) where x might be any number of
notes.
Whether to attach the [ ( ] ) elements to the notes (as I have done
above) is a matter of taste. However, whitespace round the " { "
and " } " is most certainly advised (because occasionally essential).
Cheers,
David.