2004-08-01 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * input/regression/beam-dir-functions.ly: move from test/
+
+ * Documentation/user/notation.itely (Feathered beams): new node.
+
+ * Documentation/user/changing-defaults.itely (Difficult tweaks):
+ new node
+
+ * input/regression/lyric-hyphen-retain.ly: move to regression.
+
+ * input/regression/harmonic.ly: fold into manual
+
+ * input/test/{hshift,move-accidentals,crescendi,feathered-beam,
+ stem-length,chord-names-no-inversions}.ly: remove
+
+ * input/test/tie-cross-voice.ly: move to regression.
+
+ * Documentation/user/notation.itely (Running trills): new node.
+
+ * scm/define-grobs.scm (all-grob-descriptions): new grob TrillSpanner
+
+ * scm/define-music-types.scm (music-descriptions): add TrillSpanEvent
+
+ * lily/trill-spanner-engraver.cc: new file.
+
+ * input/regression/trill-spanner.ly: new file.
+
+ * input/test/timing.ly: fold into manual.
+
+ * input/test/time.ly: remove
+
+ * input/test/trill.ly: remove
+
+ * input/test/time-signature-double.ly: fold into manual
+
+ * input/test/separate-staccato.ly: remove
+
+ * input/test/spanner-after-break-tweak.ly: fold into manual.
+
+ * input/test/script-priority.ly: fold into manual.
+
+ * input/test/scheme-interactions.ly: remove.
+
+ * input/test/unfold-all-repeats.ly (mel),
+ input/test/repeat.ly,input/test/repeat-shorter-bracket.ly,
+ input/test/polymetric-differing-notes.ly input/test/polymetric.ly:
+ fold into manual.
+
+ * input/regression/no-staff.ly: move from input/test/
+
+ * input/regression/markup-score.ly: move from input/test/
+
+ * input/test/lyrics-melisma-faster.ly: fold into manual
+
+ * input/test/lyrics-melisma-variants.ly: fold into manual
+
+ * Documentation/user/notation.itely (Popular music): new node.
+
+ * input/test/gourlay.ly: remove
+
+ * input/test/improv.ly: fold into manual.
+
+ * input/test/figured-bass-alternate.ly (fl): remove
+
* lily/dynamic-text-spanner.cc (print): new file.
* scm/define-grobs.scm (all-grob-descriptions): add DynamicTextSpanner
@unnumbered New features in 2.3 since 2.2
@itemize @bullet
+
+@item Running trills now have their own spanner and event. They are
+started and stopped with
+@example
+ @var{note}\startTrillSpan
+ @var{note}\stopTrillSpan
+@end example
+
+@item There is a new markup commands @code{\postscript} that takes a
+string that is dumped as verbatim postscript.
+
@item The melody for a @code{\lyricsto} text can be changed during a
melody by setting the @code{associatedVoice} property.
>>
@end lilypond
+With this mechanism, it is possible to define an Urtext (original
+edition), with the option put several distinct articulations on the
+same notes.
+
@cindex @code{\context}
@cindex creating contexts
* Navigating the program reference::
* Layout interfaces::
* Determining the grob property::
+* Difficult tweaks::
@end menu
Fingering_engraver is part of contexts: @dots{} @b{@internalsref{Voice}}
@end quotation
+@node Difficult tweaks
+@subsection Difficult tweaks
+
+There are two classes of difficult adjustments. First, when there are
+several of the same objects at one point, and you want to adjust only
+one. For example, if you want to change only one note head in a chord.
+
+In this case, the @code{\applyoutput} function must be used. The
+next example defines a Scheme function @code{set-position-font-size}
+that sets the @code{font-size} property, but only
+on objects that have @internalsref{note-head-interface} and are at the
+right Y-position.
+
+@lilypond[verbatim]
+#(define ((set-position-font-size pos size) grob origin current)
+ (let*
+ ((interfaces (ly:grob-property grob 'interfaces))
+ (position (ly:grob-property grob 'staff-position)))
+ (if (and
+
+ ; is this a note head?
+ (memq 'note-head-interface interfaces)
+
+ ; is the Y coordinate right?
+ (= pos position))
+
+ ; then do it.
+ (set! (ly:grob-property grob 'font-size) size))))
+
+\relative {
+ c
+ \applyoutput #(set-position-font-size -2 4)
+ <c e g>
+}
+@end lilypond
+
+@noindent
+A similar technique can be used for accidentals. In that case, the
+function should check for @code{accidental-interface}.
+
+Another difficult adjustment is the appearance of spanner objects,
+such as slur and tie. Initially, only one of these objects is created,
+and they can be adjust with the normal mechanism. However, in some
+cases the spanners cross line breaks. If this happens, these objects
+are cloned. A separate object is created for every system that it is
+in. These are clones of the original object and inherit all
+properties, including @code{\override}s.
+
+In other words, an @code{\override} always affects all pieces of a
+broken spanner. To change only one part of a spanner at a line break,
+it is necessary to hook into the formatting process. The
+@code{after-line-breaking-callback} property contains the Scheme procedure
+that is called after line breaks have been determined, and layout
+objects have been split over different systems.
+
+In the following example, we define a procedure
+@code{my-callback}. This procedure
+
+@itemize @bullet
+@item
+determines if we have been split across line breaks
+@item
+if yes, retrieves all the split objects
+@item
+checks if we are the last of the split objects
+@item
+if yes, it sets @code{extra-offset}.
+@end itemize
+
+This procedure is installed into @internalsref{Tie}, so the last part
+of broken tie is translated up.
+
+
+@lilypond[verbatim,raggedright]
+#(define (my-callback grob)
+ (let* (
+
+ ; have we been split?
+ (orig (ly:grob-original grob))
+
+ ; if yes, get the split pieces (our siblings)
+ (siblings (if (ly:grob? orig) (ly:spanner-broken-into orig) '() )))
+
+
+ (if (and (>= (length siblings) 2)
+ (eq? (car (last-pair siblings)) grob))
+ (ly:grob-set-property! grob 'extra-offset '(-2 . 5))
+ )))
+
+\relative c'' {
+ \override Tie #'after-line-breaking-callback =
+ #my-callback
+ c1 ~ \break c2 ~ c
+}
+@end lilypond
+
+
+When applying this trick, the new @code{after-line-breaking-callback}
+should also call the old @code{after-line-breaking-callback}, if there
+is one. For example, if using this with @code{Slur},
+@code{Slur::after_line_breaking} should also be called.
@node Fonts
@section Fonts
+
@seealso
Init files: @file{scm/new-markup.scm}.
@menu
* Text encoding::
+* Nested scores::
* Overview of text markup commands::
@end menu
@cindex @TeX{} commands in strings
+@node Nested scores
+@subsection Nested scores
+
+It is possible to nest music inside markups, by adding a @code{\score}
+block to markup expression. Such a score must contain a @code{\paper}
+block.
+
+@lilypond[verbatim,raggedright]
+\relative {
+ c4 d^\markup {
+ \score {
+ \relative { c4 d e f }
+ \paper { }
+ }
+ }
+ e f
+}
+@end lilypond
+
@node Overview of text markup commands
* Rhythmic music::
* Piano music::
* Vocal music::
+* Other instrument specific notation::
* Tablatures::
-* Chord names::
+* Popular music::
* Orchestral music::
* Formatting cue notes::
* Ancient notation::
* Partial measures::
* Unmetered music::
* Bar lines::
+* Time administration::
* Controlling formatting of prefatory matter::
@end menu
@code{set-octavation} will get confused when clef changes happen
during an octavation bracket.
+
+
+
@node Time signature
@subsection Time signature
@cindex Time signature
The symbol that is printed can be customized with the @code{style}
property. Setting it to @code{#'()} uses fraction style for 4/4 and
-2/2 time. There are many more options for its layout. See
-@inputfileref{input/test,time.ly} for more examples.
+2/2 time,
+
+@lilypond[fragment,verbatim]
+\time 4/4 c'1
+\time 2/2 c'1
+\override TimeSignature #'style = #'()
+\time 4/4 c'1
+\time 2/2 c'1
+@end lilypond
+
+
+
+There are many more options for its layout. See @ref{Ancient time
+signatures} for more examples.
This command sets the property @code{timeSignatureFraction},
Examples: @inputfileref{input/test,bar-lines.ly},
+
+@node Time administration
+@subsection Time administration
+
+Time is administered by the @internalsref{Time_signature_engraver},
+which usually lives in the @internalsref{Score} context.
+The bookkeeping deals with the following variables
+
+@table @code
+@item currentBarNumber
+ the measure number
+@item measureLength
+ the length of the measures in the current time signature. For a 4/4
+ time this is 1, and for 6/8 it is 3/4.
+@item measurePosition
+ the point within the measure where we currently are. This quantity
+ is reset to 0 whenever it exceeds @code{measureLength}. When that happens,
+ @code{currentBarNumber} is incremented.
+@item timing
+ if set to true, the above variables are updated for every time
+ step. When set to false, the engraver stays in the current measure
+ indefinitely.
+@end table
+
+Timing can be changed by setting any of these variables explicitly.
+In the next example, the 4/4 time signature is printed, but
+@code{measureLength} is set to 5/4. After a while, the measure is
+shortened by 1/8, by setting @code{measurePosition} to -3/8 at 2/4 in
+the measure, so the next bar line will fall at 2/4 + 3/8.
+
+@lilypond[verbatim]
+{
+ \set Score.measureLength = #(ly:make-moment 5 4)
+ c1 c4
+ c1 c4
+ c4 c4
+ \set Score.measurePosition = #(ly:make-moment -3 8)
+ b8 b b
+ c4 c1
+}
+@end lilypond
+
+
@node Controlling formatting of prefatory matter
@subsection Controlling formatting of prefatory matter
* Text spanners::
* Analysis brackets::
* Articulations::
+* Running trills::
* Fingering instructions::
* Text scripts::
* Grace notes::
@lilypondfile[quote,raggedright]{script-chart.ly}
+
+The vertical ordering of scripts is controlled with the
+@code{script-priority} property. The lower this number, the closer it
+will be put to the note. In this example, the
+@internalsref{TextScript} (the sharp symbol) first has the lowest
+priority, so it is put lowest in the first example. In the second, the
+prall trill (the @internalsref{Script}) has the lowest, so it on the
+inside. When two objects have the same priority, the order in which
+they are entered decides which one comes first.
+
+
+@lilypond[verbatim]
+\relative g''{
+ \once \override TextScript #'script-priority = #-100
+ a4^\prall^\markup { \sharp }
+
+ \once \override Script #'script-priority = #-100
+ a4^\prall^\markup { \sharp }
+}
+@end lilypond
+
+
+
@refcommands
@cindex @code{\scriptUp}
effect on the MIDI rendering of the music.
+
+@node Running trills
+@subsection Running trills
+
+Long running trills are made with @code{\startTrillSpan} and
+@code{\stopTrillSpan},
+
+
+@lilypond[verbatim]
+\relative \new Voice {
+ << { c1 \startTrillSpan }
+ { s2. \grace { d16[\stopTrillSpan e] } } >>
+ c4 }
+@end lilypond
+
+@refcommands
+
+@code{\startTrillSpan},
+@cindex @code{\startTrillSpan}
+@code{\stopTrillSpan}.
+@cindex @code{\stopTrillSpan}
+
+@seealso
+
+Program reference: @internalsref{TrillSpanner},
+@internalsref{TrillSpanEvent}.
+
@node Fingering instructions
@subsection Fingering instructions
property @inputfileref{input/regression,volta-multi-staff.ly},
@inputfileref{input/regression,volta-chord-names.ly}
+It is possible to shorten volta brackets
+by setting @code{voltaSpannerDuration}. In the next example, the
+bracket only lasts one measure, which is a duration of 3/4.
+
+
+
+@lilypond[verbatim,raggedright]
+\relative c''{
+ \time 3/4
+ c c c
+ \set Staff.voltaSpannerDuration = #(ly:make-moment 3 4)
+ \repeat "volta" 5 { d d d }
+ \alternative { { e e e f f f }
+ { g g g } }
+}
+@end lilypond
+
@refbugs
A nested repeat like
@cindex expanding repeats
-For instructions on how to expand repeats for MIDI output, see the
-example file @inputfileref{input/test,unfold-all-repeats.ly}.
+An advantage of the unified syntax for repeats, is that all repeats
+may be played out for the MIDI output. This is achieved by
+applying the @code{\unfoldrepeats} music function.
+
+@lilypond[verbatim,raggedright]
+\new Staff
+ \unfoldrepeats {
+ \repeat tremolo 8 {c'32 e' }
+ \repeat percent 2 { c''8 d'' }
+ \repeat volta 2 {c'4 d' e' f'}
+ \alternative {
+ { g' a' a' g' }
+ {f' e' d' c' }
+ }
+ \bar "|."
+ }
+@end lilypond
+When creating a score file using @code{\unfoldrepeats} for midi, then
+it is necessary to make two @code{\score} blocks. One for MIDI, with
+unfolded repeats, and one for notation, eg.
+@example
+ \score @{
+ @var{..music..}
+ \paper @{ .. @}
+ @}
+ \score @{
+ \unfoldrepeats @var{..music..}
+ \midi @{ .. @}
+ @}
+@end example
@node Manual repeat commands
@subsection Manual repeat commands
@end lilypond
+
@seealso
Program reference: @internalsref{VoltaBracket}, @internalsref{RepeatedMusic},
@menu
* Entering lyrics::
* The Lyrics context::
+* Flexibility in alignment::
* More stanzas::
* Ambitus::
@end menu
} >>
@end lilypond
-
-
-
-When multiple stanzas are put on the same melody, it can happen that
-two stanzas have melismata in different locations. This can be
-remedied by switching off melismata for one
-@internalsref{Lyrics}. This is achieved by setting
-the @code{ignoreMelismata} property to @code{#t}. An example is shown
-in @inputfileref{input/regression,lyric-combine-new.ly}.
-
@cindex SATB
@cindex choral score
For proper processing of extender lines, the
-@internalsref{Lyrics} and @internalsref{Voice} should be
+ @internalsref{Lyrics} and @internalsref{Voice} should be
linked. This can be achieved either by using @code{\lyricsto} or by
setting corresponding names for both contexts. The latter is explained
in @ref{More stanzas}.
@c TODO: document \new Staff << Voice \lyricsto >> bug
-@node More stanzas
-@subsection More stanzas
+@node Flexibility in alignment
+@subsection Flexibility in alignment
-@cindex phrasing, in lyrics
+Often, different stanzas of one song are put to one melody in slightly
+differing ways. Such variations can still be captured with
+@code{\lyricsto}.
-The lyrics should be aligned with the note heads of the melody. To
-achieve this, each line of lyrics should be marked to correspond with
-the melodic line. This is done automatically when @code{\lyricsto},
-but it can also be done manually.
+One possibility is that the text has a melisma in one stanza, but
+multiple syllables in another one. One solution is to make the faster
+voice ignore the melisma. This is done by setting
+@code{ignoreMelismata} in the Lyrics context.
+
+There has one tricky aspect. The setting for @code{ignoreMelismata}
+must be set one syllable @emph{before} the non-melismatic syllable
+in the text, as shown here,
+
+@lilypond[verbatim,raggedright]
+<<
+ \relative \context Voice = "lahlah" {
+ \set Staff.autoBeaming = ##f
+ c4
+ \slurDotted
+ f8.[( g16])
+ a4
+ }
+ \new Lyrics \lyricsto "lahlah" {
+ more slow -- ly
+ }
+ \new Lyrics \lyricsto "lahlah" {
+ \set ignoreMelismata = ##t % applies to "fas"
+ go fas -- ter
+ \unset ignoreMelismata
+ still
+ }
+>>
+@end lilypond
+
+
+The @code{ignoreMelismata} applies to the syllable ``fas'', so it
+should bev entered before ``go''.
+
+The reverse is also possible: making a lyric line slower than the
+standard. This can be achieved by insert @code{\skip}s into the
+lyrics. For every @code{\skip}, the text will be delayed another note.
+For example,
+
+@lilypond[verbatim,raggedright]
+\relative { c c g' }
+\newlyrics {
+ twin -- \skip 4
+ kle
+}
+@end lilypond
+
+More complex variations in text underlay are possible. It is possible
+to switch the melody for a line of lyrics during the text. This is
+done by setting the @code{associatedVoice} property. In the example
+
+@lilypond[raggedright]
+<<
+ \relative \context Voice = "lahlah" {
+ \set Staff.autoBeaming = ##f
+ c4
+ <<
+ \context Voice = alternative {
+ \voiceOne
+ \times 2/3 {
+
+ % show associations clearly.
+ \override NoteColumn #'force-hshift = #-3
+ f8 f g
+ }
+ }
+ {
+ \voiceTwo
+ f8.[ g16]
+ \oneVoice
+ } >>
+ a8( b) c
+
+ }
+ \new Lyrics \lyricsto "lahlah" {
+ Ju -- ras -- sic Park
+ }
+ \new Lyrics \lyricsto "lahlah" {
+
+ % Tricky: need to set associatedVoice
+ % one syllable too soon!
+ \set associatedVoice = alternative % applies to "ran"
+ Ty --
+ ran --
+ no --
+ \set associatedVoice = lahlah % applies to "rus"
+ sau -- rus Rex
+ } >>
+@end lilypond
+
+@noindent
+the text for the first stanza is set to a melody called ``lahlah'',
+
+@verbatim
+ \new Lyrics \lyricsto "lahlah" {
+ Ju -- ras -- sic Park
+ }
+@end verbatim
-To this end, give the @internalsref{Voice} context an identity
-@example
-\context Voice = duet @{
- \time 3/4
- g2 e4 a2 f4 g2. @}
-@end example
-Then set the @internalsref{Lyrics} contexts to names starting with
-that identity followed by a dash. In the preceding example, the
-@internalsref{Voice} identity is @code{duet}, so the identities of the
-@internalsref{Lyrics}s are marked @code{duet-1} and @code{duet-2}
+The second stanza initially is set to the @code{lahlah} context, but
+for the syllable ``ran'', it switches to a different melody.
+This is achieved with
@example
- \context Lyrics = "duet-1" @{
- Hi, my name is Bert. @}
- \context Lyrics = "duet-2" @{
- Ooooo, ch\'e -- ri, je t'aime. @}
+ \set associatedVoice = alternative
@end example
-@c \lyricsto in the example below is pointless, given subject of the
-@c section.
+@noindent
+Here, @code{alternative} is the name of the @code{Voice} context
+containing the triplet.
+Again, the command must be one syllable too early, before ``Ty'' in
+this case.
+
+@verbatim
+ \new Lyrics \lyricsto "lahlah" {
+ \set associatedVoice = alternative % applies to "ran"
+ Ty --
+ ran --
+ no --
+ \set associatedVoice = lahlah % applies to "rus"
+ sau -- rus Rex
+ }
+@end verbatim
+
+@noindent
+The underlay is switched back to the starting situation by assigning
+@code{lahlah} to @code{associatedVoice}.
+
+
+
+
+@node More stanzas
+@subsection More stanzas
+
+@cindex phrasing, in lyrics
-The complete example is shown here
-@lilypond[quote,raggedright,verbatim]
- <<
- \relative c'' \context Voice = duet {
- \time 3/4
- g2 e4 a2 f4 g2. }
- <<
- \lyricsto "duet" \new Lyrics {
- \set vocalName = "Bert"
- Hi, my name is Bert. }
- \lyricsto "duet" \new Lyrics {
- \set vocalName = "Ernie"
- Ooooo, ch\'e -- ri, je t'aime. }
- >>
- >>
-@end lilypond
@cindex stanza number
@cindex singer's names
Stanza numbers can be added by setting @code{stanza}, e.g.
@lilypond[quote,verbatim,relative=2]
-<<
- \context Voice = duet {
- \time 3/4 g2 e4 a2 f4 g2. }
- \lyricsto "duet" \new Lyrics {
+\context Voice {
+ \time 3/4 g2 e4 a2 f4 g2.
+} \newlyrics {
\set stanza = "1. "
- Hi, my name is Bert. }
->>
+ Hi, my name is Bert.
+} \newlyrics {
+ \set stanza = "2. "
+ Oh, che -- ri, je t'aime
+}
@end lilypond
-This example also demonstrates how names of the singers can be added
-using @code{vocalName} analogous to instrument annotations for staves.
-A short version may be entered as @code{vocNam}.
+These numbers are put just before the start of first syllable.
+
+Names of singers can also be added. They are printed at the start of
+the line, just like instrument names. They are created by setting
+@code{vocalName}. A short version may be entered as @code{vocNam}.
-To make empty spaces in lyrics, use @code{\skip}.
+@lilypond[quote,verbatim,relative=2]
+\context Voice {
+ \time 3/4 g2 e4 a2 f4 g2.
+} \newlyrics {
+ \set vocalName = "Bert "
+ Hi, my name is Bert.
+} \newlyrics {
+ \set vocalName = "Ernie "
+ Oh, che -- ri, je t'aime
+}
+@end lilypond
@seealso
There is no collision handling in the case of multiple per-voice
ambitus.
+@node Other instrument specific notation
+@section Other instrument specific notation
+
+@menu
+* Harmonic notes::
+@end menu
+
+@node Harmonic notes
+@subsection Harmonic notes
+
+@cindex artificial harmonics
+@cindex harmonics
+
+Artificial harmonics are notated with a different notehead style. They
+are entered by
+marking the harmonic pitch with @code{\harmonic}.
+
+@lilypond[raggedright,verbatim]
+{
+ <c' g'\harmonic>4
+}
+@end lilypond
+
+
@node Tablatures
@section Tablatures
Program reference: @internalsref{Tab_note_heads_engraver}.
+@node Popular music
+@section Popular music
+
+
+
+@menu
+* Chord names::
+* Chords mode::
+* Printing chord names::
+* Improvisation::
+@end menu
+
@node Chord names
-@section Chord names
+@subsection Chord names
@cindex Chords
LilyPond has support for both printing chord names. Chords may be
@code{< .. >} syntax.
+@node Improvisation
+@subsection Improvisation
+
+Improvisation is sometimes denoted with slashed note heads. Such note
+heads can be created by adding a @internalsref{Pitch_squash_engraver}
+to the @internalsref{Staff} or @internalsref{Voice} context. Then, the
+following command
+
+@example
+ \set squashedPosition = #0
+ \override NoteHead #'style = #'slash
+@end example
+
+@noindent
+switches on the slashes.
+
+There are shortcuts @code{\improvisationOn} (and an accompanying
+@code{\improvisationOff}) for this command sequence. They are used in
+the following example
+
+@lilypond[verbatim,raggedright]
+\new Staff \with {
+ \consists Pitch_squash_engraver
+} \transpose c c' {
+ e8 e g a a16(bes)(a8) g \improvisationOn
+ e8
+ ~e2~e8 f4 fis8
+ ~fis2 \improvisationOff a16(bes) a8 g e
+}
+@end lilypond
+
@node Orchestral music
following table
@lilypond[quote]
-\score {
- {
- \set Score.timing = ##f
- \set Score.barAlways = ##t
- s_\markup { "$\\backslash$time 4/4" }
- ^\markup { " " \musicglyph #"timesig-neomensural4/4" }
- s
- s_\markup { "$\\backslash$time 2/2" }
- ^\markup { " " \musicglyph #"timesig-neomensural2/2" }
- s
- s_\markup { "$\\backslash$time 6/4" }
- ^\markup { " " \musicglyph #"timesig-neomensural6/4" }
- s
- s_\markup { "$\\backslash$time 6/8" }
- ^\markup { " " \musicglyph #"timesig-neomensural6/8" }
- \break
- s_\markup { "$\\backslash$time 3/2" }
- ^\markup { " " \musicglyph #"timesig-neomensural3/2" }
- s
- s_\markup { "$\\backslash$time 3/4" }
- ^\markup { " " \musicglyph #"timesig-neomensural3/4" }
- s
- s_\markup { "$\\backslash$time 9/4" }
- ^\markup { " " \musicglyph #"timesig-neomensural9/4" }
- s
- s_\markup { "$\\backslash$time 9/8" }
- ^\markup { " " \musicglyph #"timesig-neomensural9/8" }
- \break
- s_\markup { "$\\backslash$time 4/8" }
- ^\markup { " " \musicglyph #"timesig-neomensural4/8" }
- s
- s_\markup { "$\\backslash$time 2/4" }
- ^\markup { " " \musicglyph #"timesig-neomensural2/4" }
- \break
- }
- \paper {
- indent = 0.0
- raggedright = ##t
- \context {
- \Staff
- \remove Staff_symbol_engraver
- \remove Clef_engraver
- \remove Time_signature_engraver
- }
+\paper {
+ indent = 0.0
+ raggedright = ##t
+ \context {
+ \Staff
+ \remove Staff_symbol_engraver
+ \remove Clef_engraver
+ \remove Time_signature_engraver
}
+} {
+ \set Score.timing = ##f
+ \set Score.barAlways = ##t
+ s_\markup { "$\\backslash$time 4/4" }
+ ^\markup { " " \musicglyph #"timesig-neomensural4/4" }
+ s
+ s_\markup { "$\\backslash$time 2/2" }
+ ^\markup { " " \musicglyph #"timesig-neomensural2/2" }
+ s
+ s_\markup { "$\\backslash$time 6/4" }
+ ^\markup { " " \musicglyph #"timesig-neomensural6/4" }
+ s
+ s_\markup { "$\\backslash$time 6/8" }
+ ^\markup { " " \musicglyph #"timesig-neomensural6/8" }
+ \break
+ s_\markup { "$\\backslash$time 3/2" }
+ ^\markup { " " \musicglyph #"timesig-neomensural3/2" }
+ s
+ s_\markup { "$\\backslash$time 3/4" }
+ ^\markup { " " \musicglyph #"timesig-neomensural3/4" }
+ s
+ s_\markup { "$\\backslash$time 9/4" }
+ ^\markup { " " \musicglyph #"timesig-neomensural9/4" }
+ s
+ s_\markup { "$\\backslash$time 9/8" }
+ ^\markup { " " \musicglyph #"timesig-neomensural9/8" }
+ \break
+ s_\markup { "$\\backslash$time 4/8" }
+ ^\markup { " " \musicglyph #"timesig-neomensural4/8" }
+ s
+ s_\markup { "$\\backslash$time 2/4" }
+ ^\markup { " " \musicglyph #"timesig-neomensural2/4" }
+ \break
}
@end lilypond
incipit of transcriptions of mensural pieces. The @code{mensural}
style mimics the look of historical printings of the 16th century.
-@inputfileref{input/test,time.ly} gives an overview over all available
-ancient and modern styles.
+The following examples shows the differences in style,
+@lilypond[raggedright]
+{
+ \time 2/2
+ c1^\markup { \hspace #-2.0 \typewriter default }
+
+ \override TimeSignature #'style = #'numbered
+ \time 2/2
+ c1^\markup { \hspace #-2.0 \typewriter numbered }
+
+ \override TimeSignature #'style = #'mensural
+ \time 2/2
+ c1^\markup { \hspace #-2.0 \typewriter mensural }
+
+ \override TimeSignature #'style = #'neomensural
+ \time 2/2
+ c1^\markup { \hspace #-2.0 \typewriter neomensural }
+ \override TimeSignature #'style = #'single-digit
+ \time 2/2
+ c1^\markup { \hspace #-2.0 \typewriter single-digit }
+}
+@end lilypond
@seealso
-Program reference: @ref{Time signature} gives a general introduction into the use of time
-signatures.
+This manual: @ref{Time signature} gives a general introduction into
+the use of time signatures.
@refbugs
-Mensural signature glyphs are mapped to time fractions in a hard-wired
-way. This mapping is sensible, but still arbitrary: given a mensural
-time signature, the time fraction represents a modern meter that
-usually will be a good choice when transcribing a mensural piece of
-music. For a particular piece of mensural music, however, the mapping
-may be unsatisfactory. In particular, the mapping assumes a fixed
-transcription of durations (e.g. brevis = half note in 2/2, i.e. 4:1).
-Some glyphs (such as the alternate glyph for 6/8 meter) are not at all
-accessible through the @code{\time} command.
-
-Mensural time signatures are supported typographically, but not yet
-musically. The internal representation of durations is
-based on a purely binary system; a ternary division such as 1 brevis =
-3 semibrevis (tempus perfectum) or 1 semibrevis = 3 minima (cum
-prolatione maiori) is not correctly handled: event times in ternary
-modes will be badly computed, resulting e.g. in horizontally
-misaligned note heads, and bar checks are likely to erroneously fail.
-
-The syntax and semantics of the @code{\time} command for mensural
-music is subject to change.
+Ratios of note durations do not change with the time signature. For
+example, the ratio of 1 brevis = 3 semibrevis (tempus perfectum) must
+be made by hand, by setting
+
+@example
+ breveTP = #(ly:make-duration -1 0 3 2)
+@end example
+
+@noindent
+This sets breveTP to 3/2 times 2 = 3 times a whole note.
+
+The @code{old6/8alt} symbol (an alternate symbol for 6/8) is not
+addressable with @code{\time}. Use a @code{\markup} instead
@node Custodes
@subsection Custodes
@menu
+* Polymetric notation::
* Clusters::
* Fermatas::
@end menu
+@node Polymetric notation
+@subsection Polymetric notation
+
+Double time signatures are not supported explicitly, but they can be
+faked. In the next example, the markup for the time signature is
+created with a markup text. This markup text is inserted in the
+@internalsref{TimeSignature} grob.
+
+@lilypond[verbatim,raggedright]
+
+% create 2/4 + 5/8
+tsMarkup =\markup {
+ \number {
+ \column < "2" "4" >
+ \musicglyph #"scripts-stopped"
+ \bracket \column < "5" "8" >
+ }
+}
+
+{
+ \override Staff.TimeSignature #'print-function = #Text_item::print
+ \override Staff.TimeSignature #'text = #tsMarkup
+ \time 3/2
+ c'2 \bar ":" c'4 c'4.
+}
+@end lilypond
+
+Each staff can also have its own time signature. This is done by
+moving the @internalsref{Timing_engraver} to @internalsref{Staff}
+context.
+
+@verbatim
+\paper{
+ \context{
+ \Score
+ \remove "Timing_engraver"
+ }
+ \context{
+ \Staff
+ \consists "Timing_engraver"
+ }
+}
+@end verbatim
+
+
+Now, each staff has its own time signature.
+@verbatim
+<<
+ \new Staff {
+ \time 3/4
+ c4 c c | c c c |
+ }
+
+ \new Staff {
+ \time 2/4
+ c4 c | c c | c c
+ }
+ \new Staff {
+ \time 3/8
+ c4. c8 c c c4. c8 c c
+ }
+>>
+@end verbatim
+
+@lilypond[raggedright]
+\paper{
+ \context{
+ \Score
+ \remove "Timing_engraver"
+ }
+ \context{
+ \Staff
+ \consists "Timing_engraver"
+ }
+}
+
+\relative c' <<
+ \new Staff {
+ \time 3/4
+ c4 c c | c c c |
+ }
+
+ \new Staff {
+ \time 2/4
+ c4 c | c c | c c
+ }
+ \new Staff {
+ \time 3/8
+ c4. c8 c c c4. c8 c c
+ }
+>>
+@end lilypond
+
+
+A different form of polymetric notation is where note lengths have
+different values across staves.
+
+This notation can be created by setting a common time signature for
+each staff but replacing it manually using
+@code{timeSignatureFraction} to the desired fraction. Then the printed
+durations in each staff are scaled to the common time signature.
+The latter is done with @code{\compressmusic}, which is similar to
+@code{\times}, but does not create a tuplet bracket.
+
+
+In this example, music with the time signatures of 3/4, 9/8 and 10/8 are
+used in parallel. In the second staff, shown durations are multiplied by
+2/3, so that 2/3 * 9/8 = 3/4, and in the third staff, shown durations are
+multiplied by 3/5, so that 3/5 * 10/8 = 3/4.
+
+@lilypond[raggedright,verbatim]
+\relative c' <<
+ \new Staff {
+ \time 3/4
+ c4 c c | c c c |
+ }
+ \new Staff {
+ \time 3/4
+ \set Staff.timeSignatureFraction = #'(9 . 8)
+ \compressmusic #'(2 . 3)
+ \repeat unfold 6 { c8[ c c] }
+ }
+ \new Staff {
+ \time 3/4
+ \set Staff.timeSignatureFraction = #'(10 . 8)
+ \compressmusic #'(3 . 5)
+ { \repeat unfold 2 { c8[ c c] }
+ \repeat unfold 2 { c8[ c] }
+ | c4. c4. \times 2/3 { c8 c c } c4 }
+ }
+>>
+@end lilypond
+
+
+
+
+@refbugs
+
+When using different time signatures in parallel, the spacing is
+aligned vertically, but bar lines distort the regular spacing.
+
+
+
@node Clusters
@subsection Clusters
See @ref{Articulations} for general instructions how to apply scripts
such as fermatas to notes.
+@node Feathered beams
+@subsection Feathered beams
+
+Feathered beams are not supported natively, but they can be faked by
+forcing two beams to overlap. Here is an example,
+
+@lilypond[raggedright]
+\relative \new Staff <<
+ \new Voice
+ {
+ \stemUp
+ \once \override Voice.Beam #'positions = #'(0 . 0.5)
+ c8[ c c c c ]
+ }
+ \new Voice {
+ \stemUp
+ \once \override Voice.Beam #'positions = #'(0 . -0.5)
+ c[ c c c c]
+ }
+>>
+@end lilypond
+
+
@node Educational use
@section Educational use
Other applications of @code{\applymusic} are writing out repeats
automatically (@inputfileref{input/test,unfold-all-repeats.ly}),
saving keystrokes (@inputfileref{input/test,music-box.ly}) and
-exporting
-LilyPond input to other formats (@inputfileref{input/test,to-xml.ly})
+exporting LilyPond input to other formats
+(@inputfileref{input/test,to-xml.ly})
@seealso
--- /dev/null
+% junkme?
+\version "2.3.8"
+\header {
+ texidoc = "@cindex Beam Dir Functions
+
+The direction of a beam may be calculated in several ways. As shown in
+the example, the beam are be below the notes if:
+@table @code
+@item majority
+of (individual) notes would have down stems,
+@item mean
+of note pitches is on the center line or below it, or
+@item median
+of note pithes (i.e. the centermost element of ordered pitches) is
+on the center line or below it.
+@end table
+
+If your favourite algorithm is not one of these, you can hook up your
+own one.
+(These beam direction functions are defined in @file{scm/beam.scm}.)
+"
+}
+
+\paper { raggedright = ##t}
+\score {
+ \relative c'' {\time 3/4
+ \override Beam #'dir-function = #beam-dir-majority
+ c8[ g]
+ \override Beam #'dir-function = #beam-dir-mean
+ c[ g]
+ \override Beam #'dir-function = #beam-dir-median
+ c[ g]
+
+ \time 3/8
+ \override Beam #'dir-function = #beam-dir-majority
+ c8[ c g]
+ \override Beam #'dir-function = #beam-dir-mean
+ c[ c g]
+ \override Beam #'dir-function = #beam-dir-median
+ c[ c g]
+ }
+\paper{raggedright = ##t}
+}
+
+%% Local variables:
+%% LilyPond-indent-level:2
+%% End:
+
+
+
--- /dev/null
+
+\version "2.3.8"
+
+\header {
+
+texidoc = "In tightly engraved music, hyphens are removed, except at the
+end of the line. Normally, lyrics are not typeset so tightly, but by
+tuning down @code{padding} of in @code{SeparationItem}, syllables are put
+closer together, and as a result hyphens may disappear.
+
+In some languages (e.g. German and Hungarian), hyphens should not
+disappear, since spelling depends on hyphenation. For that purpose,
+hyphens can be forced to remain by overriding @code{minimum-length} of
+the @code{LyricHyphen} grob.
+"
+
+}
+
+\score {
+<< \new Staff \relative c'' { \time 1/4 c16[ c c c]
+\time 1/4
+c16[ c c c]
+\time 1/4
+c16[ c c c]
+
+}
+ \new Lyrics \with {
+ % Otherwise lyrics are so far apart that hyphens don't disappear
+ \override SeparationItem #'padding = #0.0
+ }
+ \lyrics {
+ bla -- bla -- bla -- bla --
+ bla -- bla -- bla -- bla --
+
+ \override LyricHyphen #'minimum-length = #0.7
+ \override LyricHyphen #'spacing-procedure =
+ #Hyphen_spanner::set_spacing_rods
+
+ bla -- bla -- bla -- bla
+ }>>
+ \paper {
+ indent = 0.0 \cm
+ linewidth = 3.4 \cm
+
+ \context {
+ \Staff \remove "Time_signature_engraver"
+ }
+
+ }
+
+}
+
+
--- /dev/null
+\header {
+ texidoc = "Use \\score block as markup command."
+}
+
+\version "2.3.8"
+
+tuning = \markup {
+ \score {
+ \new Staff \with {
+ \remove Time_signature_engraver
+ } {
+ \clef bass <c, g, d g>1
+ }
+ \paper { raggedright = ##t }
+ }
+}
+
+
+\header {
+ title = "Solo Cello Suites"
+ subtitle = "Suite IV"
+ subsubtitle = \markup { \fill-line < { "Originalstimmung: " \tuning } > }
+}
+
+\relative {
+ \time 4/8
+ \times 2/3 { c'8 d e } \times 2/3 {c d e}
+ \times 2/3 { c8 d e } \times 2/3 {c d e}
+ g8 a8 g8 a
+ g8 a8 g8 a
+}
+
--- /dev/null
+\version "2.3.8"
+% possible rename to staff-something. -gp
+
+\header{ texidoc = "@cindex Staff Remove
+The printing of the staff lines may be suppressed by removing the
+corresponding engraver.
+"
+}
+
+\score {
+ { c4 d4 e8 d8 }
+ \paper {
+ raggedright = ##t
+ \context {
+ \Staff
+ \remove Staff_symbol_engraver
+ \consists Pitch_squash_engraver
+ \remove Clef_engraver
+ }
+ }
+}
+
+
\version "2.3.4"
-\header { texidoc = "Volta repeats may be unfolded through the Scheme
- function @code{unfold-repeats}."
+\header { texidoc = "Volta repeats may be unfolded through the music
+ function @code{\unfoldrepeats}."
}
nots = \relative c' {
c4 \repeat volta 2 c4 \alternative { d e }
}
+\paper {raggedright = ##t}
-\score {
- \context Voice {
- \nots
- \bar "||"
- \applymusic #unfold-repeats \nots
- }
- \paper {raggedright = ##t}
+\context Voice {
+ \nots
+ \bar "||"
+ \unfoldrepeats \nots
}
--- /dev/null
+\header {
+ texidoc = "Trill spanner"
+}
+
+\version "2.3.9"
+\paper {
+ raggedright = ##T
+}
+\relative \new Voice {
+ << { c1 \startTrillSpan }
+ { s2. \grace { d16[\stopTrillSpan e] } } >>
+ c4 }
+++ /dev/null
-
-\version "2.3.8"
-\header {
- texidoc = "@cindex Beam Dir Functions
-
-The direction of a beam may be calculated in several ways. As shown in
-the example, the beam are be below the notes if:
-@table @code
-@item majority
-of (individual) notes would have down stems,
-@item mean
-of note pitches is on the center line or below it, or
-@item median
-of note pithes (i.e. the centermost element of ordered pitches) is
-on the center line or below it.
-@end table
-
-If your favourite algorithm is not one of these, you can hook up your
-own one.
-(These beam direction functions are defined in @file{scm/beam.scm}.)
-"
-}
-
-\paper { raggedright = ##t}
-\score {
- \relative c'' {\time 3/4
- \override Beam #'dir-function = #beam-dir-majority
- c8[ g]
- \override Beam #'dir-function = #beam-dir-mean
- c[ g]
- \override Beam #'dir-function = #beam-dir-median
- c[ g]
-
- \time 3/8
- \override Beam #'dir-function = #beam-dir-majority
- c8[ c g]
- \override Beam #'dir-function = #beam-dir-mean
- c[ c g]
- \override Beam #'dir-function = #beam-dir-median
- c[ c g]
- }
-\paper{raggedright = ##t}
-}
-
-%% Local variables:
-%% LilyPond-indent-level:2
-%% End:
-
-
-
+++ /dev/null
-\version "2.3.8"
-\header { texidoc= "@cindex Chord Names No Inversions
-Since there are several interpretations for recognizing
-chord names, the lowest note is the bass note of a chord and the inversion
-of the chord is found accordingly. " }
-
-scheme = {
- <c' e' g'>1
- <e' g' c''>
- <e e' g' c''>
-}
-
-\score {
- <<
- \context ChordNames \scheme
- \context Staff \scheme
- >>
- \paper { raggedright = ##t}
-}
-
+++ /dev/null
-
-\version "2.3.8"
-\header{
- texidoc="@cindex Crescendi
-Crescendi can be printed in a number of different ways.
-" }
-\score{
-\relative c''{
-a1\fff\> a\pp\!
-a\< a\!
-\set crescendoText = \markup { \italic \bold "cresc." }
-\set crescendoSpanner = #'dashed-line
-a\mf\< a a\!
-a\< a\!
-}
-\paper{
-raggedright = ##t
-}
-\midi{
-\tempo 1 = 60
-}
-}
-
+++ /dev/null
-\version "2.3.8" \header {
-
- texidoc = "A hack to create feathered
-beams: manually make two beams overlap. This uses tuplets to
-condense the spacing."
-
- }
-\paper { raggedright = ##t }
-
-\relative \new Staff <<
- \new Voice
- {
- \stemUp
- \once \override Voice.Beam #'positions = #'(0 . 0.5)
- \once \override Voice.TupletBracket #'number-visibility = ##f
- \times 1/2 { c8[ c c c c c c c]
- }
- }
- \new Voice {
- \stemUp
- \once \override Voice.Beam #'positions = #'(0 . -0.5)
- \once \override Voice.TupletBracket #'number-visibility = ##f
- \times 1/2 { c[ c c c c c c c] }
- }
->>
-
+++ /dev/null
-\header
-{
-texidoc = "An alternate method to make bass figures is to use
-@code{markup} texts."
-}
-\version "2.3.8"
-
-nat = \markup { \natural }
-sh = \markup { \smaller \raise #0.6 \sharp }
-fl = \markup { \flat }
-
-\score {
- \context Voice {
- \clef bass
- \override TextScript #'font-family = #'number
- \override TextScript #'font-size = #-6
- \override TextScript #'baseline-skip = #1.4
-
- dis4_\markup { 6 }
-
- c_\markup { 7 }
- d_\markup { \column < { 6 \sh } \bracket { \nat } >}
- ais_\markup { \column < 6 5 \bracket { 3 \sh } >}
- }
-}
+++ /dev/null
-\version "2.3.8"
-\header{
-
- texidoc="@cindex Gourlay
-
-The breaking of line works also with polyphony. This is taken from
-Gourlay's paper on breaking lines. "
-
-}
-
-\score{
- \context Staff \relative c'' <<
- { \stemUp d2 d | d d | d4 d2. | \break c1 }
- \\
- { \stemDown g4 g g g | \times 2/3 { g2 g2 g2 } | g4. g8 g2 | c1 }
- >>
- \paper{
- raggedright = ##t
- }
-}
-
-
\version "2.3.8"
\header {
- title = "Gregorian Scripts"
texidoc = "@cindex Gregorian Scripts
Here is demonstrated a preliminary support of Gregorian Scripts:
+++ /dev/null
-\version "2.3.8"
-\header {
- texidoc ="@cindex Artificial Harmonics
-
-Artificial harmonics are notated with a different notehead style, by
-marking the harmonic pitch with @code{\harmonic}."
-
-}
-
-\score {
- {
- <c' g'\harmonic>4
- }
- \paper {
- raggedright=##t
- }
-}
-
+++ /dev/null
-\version "2.3.8"
-\header { texidoc = "@cindex Horizontal Shift
-Notes may be manually horizontally shifted. " }
-
-shiftI = \override NoteColumn #'horizontal-shift = #0
-shiftII = \override NoteColumn #'horizontal-shift = #1
-shiftIII = \override NoteColumn #'horizontal-shift = #2
-shiftIV = \override NoteColumn #'horizontal-shift = #3
-shiftV = \override NoteColumn #'horizontal-shift = #4
-
-\score {
- \context Voice \relative c {
-
- \context Staff <<
- \new Voice {\stemUp \shiftI g'' }
- \new Voice {\stemUp \shiftII e }
- \new Voice {\stemUp \shiftIII c }
- \new Voice {\stemUp \shiftIV a }
- \new Voice {\stemUp \shiftV f }
- >>
- }
- \paper { raggedright = ##t }
-}
-
+++ /dev/null
-\version "2.3.8"
-\header {
-
- texidoc =
-"
-
-In improvisation, noteheads do not have a pitch, and have different
-shapes. In this example, this is achieved by adding
-@code{Pitch_squash_engraver} and setting @code{squashedPosition} when the
-improvisation is active.
-
-"
-
-}
-
-
-improOn = {
- \set squashedPosition = #0
- \override NoteHead #'style = #'slash
-}
-
-improOff = {
- \unset squashedPosition
- \revert NoteHead #'style
-}
-
-global = { s1*3 \bar "|." }
-
-\score {
- <<
- \context ChordNames \chords {
- e8*7:m7 a2.:m7 bes4:m7 b1:m7 e8:m
- }
- <<
- \context Voice = melo \transpose c c' {
- e8 e g a a16(bes)(a8) g \improOn
- e8
- ~e2~e8 f4 fis8
- ~fis2 \improOff a16(bes) a8 g e
- }
- >>
- >>
- \paper {
- \context {
- \Voice
- \consists Pitch_squash_engraver
- }
- raggedright = ##t
- }
-}
-
\version "2.3.8"
\header { texidoc = "@cindex Ancient Vaticana
-Vaticana ligature uses four staff lines, special clef, an notes
+Vaticana ligature uses four staff lines, special clef, and
calligraphic notes. "
}
+++ /dev/null
-
-\version "2.3.8"
-
-\header {
-
-texidoc = "In tightly engraved music, hyphens are removed, except at the
-end of the line. Normally, lyrics are not typeset so tightly, but by
-tuning down @code{padding} of in @code{SeparationItem}, syllables are put
-closer together, and as a result hyphens may disappear.
-
-In some languages (e.g. German and Hungarian), hyphens should not
-disappear, since spelling depends on hyphenation. For that purpose,
-hyphens can be forced to remain by overriding @code{minimum-length} of
-the @code{LyricHyphen} grob.
-"
-
-}
-
-\score {
-<< \new Staff \relative c'' { \time 1/4 c16[ c c c]
-\time 1/4
-c16[ c c c]
-\time 1/4
-c16[ c c c]
-
-}
- \new Lyrics \with {
- % Otherwise lyrics are so far apart that hyphens don't disappear
- \override SeparationItem #'padding = #0.0
- }
- \lyrics {
- bla -- bla -- bla -- bla --
- bla -- bla -- bla -- bla --
-
- \override LyricHyphen #'minimum-length = #0.7
- \override LyricHyphen #'spacing-procedure =
- #Hyphen_spanner::set_spacing_rods
-
- bla -- bla -- bla -- bla
- }>>
- \paper {
- indent = 0.0 \cm
- linewidth = 3.4 \cm
-
- \context {
- \Staff \remove "Time_signature_engraver"
- }
-
- }
-
-}
-
-
+++ /dev/null
-\header
-{
- texidoc = "A faster lyrics line may be set to a melismatic melody by
-setting @code{ignoreMelismata}. A tricky aspect is that ignoreMelismata
-must be set a syllable too soon."
-
-}
-
-
-\paper {
- raggedright = ##t
-}
-
-\version "2.3.8"
-
-<<
- \relative \context Voice = "lahlah" {
- \set Staff.autoBeaming = ##f
- c4
- \slurDotted
- f8.[( g16])
- a4
- }
- \new Lyrics \lyricsto "lahlah" {
- more slow -- ly
- }
- \new Lyrics \lyricsto "lahlah" {
- \set ignoreMelismata = ##t % applies to "fas"
- go fas -- ter
- \unset ignoreMelismata
- still
- }
->>
+++ /dev/null
-\header {
-
-texidoc = "You can switch the Voice context for a lyrics melody
- during a lyrics line using @code{associatedVoice}. Here, the
- syllables \"rannosau\" are set to triplets.
-
-A tricky aspect is that @code{associatedVoice} needs to be changed one
-syllable too soon.
-
-"
-}
-
-\paper {
- raggedright = ##t
-}
-
-\version "2.3.8"
-
-<<
- \relative \context Voice = "lahlah" {
- \set Staff.autoBeaming = ##f
- c4
- <<
- \context Voice = alternative {
- \voiceOne
- \times 2/3 {
-
- % show associations clearly.
- \override NoteColumn #'force-hshift = #-3
- f8 f g
- }
- }
- {
- \voiceTwo
- f8.[ g16]
- \oneVoice
- } >>
- a8( b) c
-
- }
- \new Lyrics \lyricsto "lahlah" \lyrics {
- Ju -- ras -- sic Park
- }
- \new Lyrics \lyricsto "lahlah" \lyrics {
-
- % Tricky: need to set associatedVoice
- % one syllable too soon!
- \set associatedVoice = alternative % applies to "ran"
- Ty --
- ran --
- no --
- \set associatedVoice = lahlah % applies to "rus"
- sau -- rus Rex
- } >>
-
-
-
+++ /dev/null
-\header {
- texidoc = "Use \\score block as markup command."
-}
-
-\version "2.3.8"
-
-tuning = \markup {
- \score {
- \new Staff \with {
- \remove Time_signature_engraver
- } {
- \clef bass <c, g, d g>1
- }
- \paper { raggedright = ##t }
- }
-}
-
-
-\header {
- title = "Solo Cello Suites"
- subtitle = "Suite IV"
- subsubtitle = \markup { \fill-line < { "Originalstimmung: " \tuning } > }
-}
-
-\relative {
- \time 4/8
- \times 2/3 { c'8 d e } \times 2/3 {c d e}
- \times 2/3 { c8 d e } \times 2/3 {c d e}
- g8 a8 g8 a
- g8 a8 g8 a
-}
-
+++ /dev/null
-\version "2.3.8"
-
-% possible rename to scheme- or something like that. -gp
-\header { texidoc= "@cindex Scheme Manual Accidentals
-The positions of accidentals may be manually set by incorporating
-some Scheme code. " }
-
-#(define (make-acc-position-checker pos)
- (lambda (elt)
- (and
- (not (eq? #f (memq 'accidental-interface
- (ly:grob-property elt 'interfaces))))
- (eq? (ly:grob-property
- (ly:grob-parent elt 1) 'staff-position) pos))))
-
-\score {
- \context Voice \relative c'' {
- c2.
- <<
-\set Staff.AccidentalPlacement = \turnOff
-\context Staff \applyoutput #(outputproperty-compatibility (make-acc-position-checker 9)
- 'extra-offset '(-1 . 0))
-\context Staff \applyoutput #(outputproperty-compatibility (make-acc-position-checker 5)
- 'extra-offset '(-2 . 0))
-\context Staff \applyoutput #(outputproperty-compatibility (make-acc-position-checker 3)
- 'extra-offset '(-3 . 0))
-\context Staff \applyoutput #(outputproperty-compatibility (make-acc-position-checker 2)
- 'extra-offset '(-4 . 0))
- d!4
- eis
- gis
- d'!
- >>
- }
- \paper {
- raggedright = ##t
- }
-}
-
+++ /dev/null
-\version "2.3.8"
-% possible rename to staff-something. -gp
-
-\header{ texidoc = "@cindex Staff Remove
-The printing of the staff lines may be suppressed by removing the
-corresponding engraver.
-"
-}
-
-\score {
- { c4 d4 e8 d8 }
- \paper {
- raggedright = ##t
- \context {
- \Staff
- \remove Staff_symbol_engraver
- \consists Pitch_squash_engraver
- \remove Clef_engraver
- }
- }
-}
-
-
+++ /dev/null
-\version "2.3.8"
-
-\header{ texidoc="
-
-@cindex polymetric music
-
-@cindex scaling durations
-
-It is possible to have multiple time signatures, each one in an own staffs,
-at the same time, and have even a proper vertical alignment of the different
-durations. This is done, firstly, by setting a common time signature for
-each staff but replacing it manually using @code{timeSignatureFraction} to
-the desired fraction, and secondly, by scaling the printed durations to
-the actual, polymetric durations.
-
-In this example, music with the time signatures of 3/4, 9/8 and 10/8 are
-used in parallel. In the second staff, shown durations are multiplied by
-2/3, so that 2/3 * 9/8 = 3/4, and in the third staff, shown durations are
-multiplied by 3/5, so that 3/5 * 10/8 = 3/4.
-
-"
-
-}
-
-#(define ((scale-music-function fraction) x)
- (ly:music-compress x (ly:make-moment (car fraction) (cdr fraction))))
-
-
-
-
-\score {
- \relative c' <<
- \new Staff {
- \time 3/4
- c4 c c | c c c |
- }
- \new Staff {
- \time 3/4
- \set Staff.timeSignatureFraction = #'(9 . 8)
- \applymusic #(scale-music-function '(2 . 3))
- \repeat unfold 6 { c8[ c c] }
- }
-
- \new Staff {
- \time 3/4
- \set Staff.timeSignatureFraction = #'(10 . 8)
- \applymusic #(scale-music-function '(3 . 5))
- { \repeat unfold 2 { c8[ c c] }
- \repeat unfold 2 { c8[ c] }
- | c4. c4. \times 2/3 { c8 c c } c4 }
- }
- >>
- \paper { raggedright = ##t }
-}
+++ /dev/null
-\version "2.3.8"
-
-\header{ texidoc="@cindex Time Signature Multiple
-
-@cindex polymetric music
-
-You can have multiple time signatures occuring at the same time.
-
-This is done by moving the timing engraver to staff context. Also,
-@code{Staff} should be given the alias @code{Timing} to make @code{\\time}
-command work correctly. The spacing is aligned vertically, although the bar
-lines seem to distort the regular spacing.
-
-" }
-
-%% Multiple time signatures seem not to be printed, however.
-%% Should print bar lines according to the time signature of each staff. -HJJ
-
-\score{
- \relative c' <<
- \new Staff {
- \time 3/4
- c4 c c | c c c |
- }
-
- \new Staff {
- \time 2/4
- c4 c | c c | c c
- }
- \new Staff {
- \time 3/8
- c4. c8 c c c4. c8 c c
- }
- >>
-
- \paper{
- raggedright = ##t
- \context{
- \Score
- \remove "Timing_engraver"
- }
- \context{
- \Staff
- \consists "Timing_engraver"
-
- }
- }
-}
-
+++ /dev/null
-\version "2.3.8"
-\header{
- texidoc="
-
-@cindex shorter volta bracket
-
-By setting @code{voltaSpannerDuration}, the horizontal length of a volta
-bracket can be shortened.
-
-"
-
-}
-
-
-\score {
- <<
- \context Staff \relative c''{
- c c c c
- % coda-klugde: let volta span only one bar
- \set Staff.voltaSpannerDuration = #(ly:make-moment 1 1)
- \repeat "volta" 5 { d d d d }
- \alternative { { e e e e f f f f }
- { g g g g } }
- }
- \context Lyrics \lyrics{
- intro1
- \repeat fold 5 { }
- \alternative {
- { chorus1 one verse1 }
- { chorus1 two verse1 }
- { chorus1 three verse }
- { chorus1 four verse }
- }
- five1
- }
- >>
- \paper{ raggedright = ##t }
-}
-
-
- %
-
+++ /dev/null
-\version "2.3.8"
-
-% possible rename to lyric-repeat or repeat-lyric.
-
-\header{ texidoc = "@cindex Repeat Lyrics
-Alternate lyrics can be used, as well as alternate notes for repeats. "
-}
-
-%% Syntax << { aaa } { bbb } >> seems not to work in lyrics.
-%% The notes are lyrics do not match syntactically here. - HJJ
-
-\score{
- <<
- \context Staff \relative c'{
- c d e f
- \repeat "volta" 2 { g a b c }
- \alternative { { c b a g } { f e d c } }
- }
- \context Lyrics \lyrics {
- De eer- ste << { maat } { moet } >>
- \repeat fold 2 { }
- \alternative {
- { en dan twee keer }
- { een koe- plet _ }
- }
- en dan nog dit er ach- ter aan
- }
- >>
- \paper{raggedright=##t}
-}
-
+++ /dev/null
-\version "2.3.8"
-\header { texidoc = "@cindex Scheme Interactions
-Using @code{ly:export}, the result of Scheme expressions can be passed
-as LilyPond input. Within a Scheme expression, you can use, define or
-change the corresponding variables. In this example, the D-s and E-s are
-generated using scheme functions, and between there are manually
-(without Scheme) entered C-s.
-
-" }
-
-foo = \transpose c c { d''4-. }
-bra = \transpose c c { e'4-. }
-
-
-\score {
- \context Voice \relative c' {
- c4
- #(ly:export (make-sequential-music (list foo foo foo )))
- #(begin (define baz (make-simultaneous-music (list foo bra)))
- (empty-music))
- c4
- \baz
- c4
- }
- \paper {raggedright=##t}
-}
-
+++ /dev/null
-
-\version "2.3.8"
-
-\header { texidoc = "@cindex Script Priority
-Relative placements of different script types can be controlled
-by overriding @code{script-priority}.
-
-In this example, accidentals are put either below or above other
-script symbols.
-
-"
-}
-
-
-\score{
- \context Staff \relative g''{
-
- \override Score.TextScript #'script-priority = #-100
- a4^\prall^\markup { \sharp }
-
-
- \override Score.Script #'script-priority = #-100
- \revert Score.TextScript #'script-priority
-
- a4^\prall^\markup { \sharp }
- }
- \paper { raggedright = ##t}
-}
-
+++ /dev/null
-
-\version "2.3.8"
-
-\header { texidoc = "@cindex Stacked Text Articulation
-Text and articulations may be stacked on top of each other. "
-}
-
-\score {
- \relative c' {
- c2_"geen gedonder"_"jij gaat onder"
- c2^^^.^|^"down"^"up"
- }
- \paper { raggedright = ##t}
-}
-
+++ /dev/null
-
-\version "2.3.8"
-% possible rename. -gp
-
-\header { texidoc="@cindex Seperate Staccato
-You can enter notes and articulations separately, and merge
-them into one thread. In this example, a repead series of staccato dots
-is attached to the notes."
-}
-
-staccatos = { s4-. s-. s-. s s }
-
-music = \relative c' { c4 d e f g a b c d e }
-
-\score {
- \context Voice <<
- \music
- \repeat unfold 2 \staccatos
- >>
- \paper{raggedright=##t}
-}
-
+++ /dev/null
-
-\version "2.3.8"
-
-\header { texidoc = "@cindex Spanner after break
-
-In order to selectively change the properties of spanners after
-a line break, Scheme code must be used. In thas manner, the tie
-after the line break in this example is moved around. "
-
- }
-
-#(define (my-callback grob)
- (let* (
- (o (ly:grob-original grob))
- (b (if (ly:grob? o) (ly:spanner-broken-into o) '() )))
-
- ;; Call the equivalent of Tie::after_line_breaking
- ;; if you're using this for other grob-types.
-
- (if (and (>= (length b) 2) (eq? (car (last-pair b)) grob))
- (ly:grob-set-property! grob 'extra-offset '(-2 . 5))
- )))
-
-\paper { raggedright = ##t }
-
-\relative c'' {
- \override Tie #'after-line-breaking-callback =
- #my-callback
- c1 ~ \break c2 ~ c
-}
+++ /dev/null
-
-\version "2.3.8"
-
-\header{ texidoc = "@cindex Stem Length
-The length of stems can be altered. "
-}
-
-\score {
- \context Voice \relative c {
- g''4 \override Stem #'length = #14 g4
- \override Stem #'length = #3 g4 g,,4
- }
- \paper { raggedright = ##t }
-}
-
+++ /dev/null
-\version "2.3.8"
-
-
-
-\header {
- texidoc = "Cross voice ties can be faked by using transparent noteheads."
- }
-
-
-\score {
-\context Staff {
-\relative c'' <<
- {
- \once \override Stem #'transparent = ##t
- b8~ b8 }
- \\
- { b[ g8] }
->>
-}
-\paper { raggedright = ##t }
-}
+++ /dev/null
-
-\version "2.3.8"
-
-\header { texidoc= "
-
-@cindex Double time signature
-@cindex markup
-@cindex Time signature, double.
-
-
-Double time
-signatures are not supported explicitly, but they can be faked with
-markups and overriding formatting routines. " }
-
-tsMarkup =
-\markup {
- \number {
- \column < "6" "4" >
- \musicglyph #"scripts-stopped"
- \bracket \column < "3" "2" >
- }}
-
-
-\score { \relative c'
- {
- \override Staff.TimeSignature #'print-function = #Text_item::print
- \override Staff.TimeSignature #'text = #tsMarkup
-
-
- \time 3/2
- c2 c c
-
- }
- \paper{ raggedright = ##t}
-}
+++ /dev/null
-
-\version "2.3.9"
-% TODO: This file could be old. Ask about it later. -gp
-
-\header { texidoc = "@cindex Time
-
-The different styles for time signatures are shown in this file.
-
-"
-}
-
-
-%{
-
-two examples what might be expected. -- jr
-
-TODO: The former "old6/8alt" is currently not addressable. This will
-be fixed by introducing an additional style property that switches
-between various mensural diminution styles. -- jr
-
-TODO: Style "1xxx" really should be a special case of style
-"numbered". In other words, style "1xxx" should be removed, and a new
-property "denominator-style" should be introduced, with values
-"numbered" (which should be equivalent to the current "numbered"
-style), "none" (which should be equivalent to the current "1xxx"
-style), and "notehead" (which should place a proper notehead to the
-right side of the nominator). -- jr
-
-
-****************
-
-IMPORTANT NOTE: The current selection scheme for time signature
-symbols is not flexible enough for future extensions such as various
-flavours of early mensural notation or complex signatures as in
-contemporary music. Therefore, the semantics of time-signature
-properties will quite definitely change, and maybe the syntax of the
-\time request will possibly be extended. See the input file for TODOs.
-
-****************
-
-%}
-
-\score {
- \context Voice \relative c {
- % LilyPond doesn't understand 'default =>> it does what you want
- \override Staff.TimeSignature #'style = #'default
- \time 1/1
- c''1^"TimeSignature style = \#'default"
- \time 2/2
- c1
- \time 2/4
- c2
- \time 4/8
- c2
- \time 3/4
- c2.
- \time 4/4
- c1
- \time 5/4
- c2. c2
- \time 6/4
- c1.
- \time 3/2
- c1.
- \time 7/4
- c1 c2.
- \time 8/4
- c\breve
- \time 9/4
- c2. c2. c2.
- \break
- \override Staff.TimeSignature #'style = #'mensural
- \time 1/1
- c1^"TimeSignature style = \#'mensural"
- \time 2/2
- c1
- \time 2/4
- c2
- \time 4/8
- c2
- \time 3/4
- c2.
- \time 4/4
- c1
- \time 5/4
- c2. c2
- \time 6/4
- c1.
- \time 3/2
- c1.
- \time 7/4
- c1 c2.
- \time 8/4
- c\breve
- \time 9/4
- c2. c2. c2.
- \time 6/8
- c2.
- \time 9/8
- c4. c4. c4.
- \break
- \override Staff.TimeSignature #'style = #'neomensural
- \time 1/1
- c1^"TimeSignature style = \#'neo\_mensural"
- \time 2/2
- c1
- \time 2/4
- c2
- \time 4/8
- c2
- \time 3/4
- c2.
- \time 4/4
- c1
- \time 5/4
- c2. c2
- \time 6/4
- c1.
- \time 3/2
- c1.
- \time 7/4
- c1 c2.
- \time 8/4
- c\breve
- \time 9/4
- c2. c2. c2.
- \time 6/8
- c2.
- \time 9/8
- c4. c4. c4.
- \break
- \override Staff.TimeSignature #'style = #'numbered
- \time 1/1
- c1^"TimeSignature style = \#'numbered"
- \time 2/2
- c1
- \time 2/4
- c2
- \time 4/8
- c2
- \time 3/4
- c2.
- \time 4/4
- c1
- \time 5/4
- c2. c2
- \time 6/4
- c1.
- \time 3/2
- c1.
- \time 7/4
- c1 c2.
- \time 8/4
- c\breve
- \time 9/4
- c2. c2. c2.
- \break
- % If the style starts with a '1', you get this style
- \override Staff.TimeSignature #'style = #'1style
- \time 1/1
- c1^"TimeSignature style = \#'1xxx"
- \time 2/2
- c1
- \time 2/4
- c2
- \time 4/8
- c2
- \time 3/4
- c2.
- \time 4/4
- c1
- \time 5/4
- c2. c2
- \time 6/4
- c1.
- \time 3/2
- c1.
- \time 7/4
- c1 c2.
- \time 8/4
- c\breve
- \time 9/4
- c2. c2. c2.
- }
- \paper { }
- \midi { }
-}
-
+++ /dev/null
-
-\version "2.3.8"
-% possible rename to bar-something.
-
-\header{ texidoc = "@cindex Bar Length
-
-You can alter the length of bars by setting explicitly
-@code{measureLength} or by resetting @code{measurePosition}. "
-}
-
-\score {
- \context Voice \relative c {
-
-
- % \set Score.measurePosition = #(ly:make-moment -1 4)
- \partial 4
- c''4 c4 c4 c2 c1
- \cadenzaOn c8[ d e f] g[ a b c b c b c]
- \cadenzaOff
- c4 c4 c4 c4
- \set Score.measureLength = #(ly:make-moment 5 4)
-
- c1 c4
- c1 c4
- c4 c4
- \set Score.measurePosition = #(ly:make-moment -3 8)
- b8 b b
- c4 c1
-
- }
- \paper { raggedright= ##t}
-}
-
+++ /dev/null
-\version "2.3.8"
-
-\header { texidoc="@cindex Trill
-The extended trill may be produced using @code{TextSpanner} with @code{trill}
-spanner style.
-"
-}
-
-\paper { raggedright = ##t}
-
-
-{
- \stemDown
- \override Stem #'transparent = ##t
- \override TextSpanner #'dash-fraction = #0.0
- \override TextSpanner #'dash-period = #1.0
- \override TextSpanner #'edge-height = #'(0 . 1.5)
- \override TextSpanner #'edge-text = #'("bla " . "")
- a\startTextSpan b c a\stopTextSpan
-
-
- %% TODO: should have trill spanner.
- \override TextSpanner #'style = #'trill
- \override TextSpanner #'edge-height = #'(0 . 0)
- \override TextSpanner #'edge-text
- = #(cons (make-musicglyph-markup "scripts-trill") "")
- a\startTextSpan b c a\stopTextSpan
-}
-
-
+++ /dev/null
-\version "2.3.8"
-% regression. -gp
-
-\header {
-texidoc = "Applying the standard function @code{unfold-repeats} unfolds
-recursively all repeats for a correct MIDI output."
-}
-
-
-mel = \context Staff {
- \repeat tremolo 8 {c'32 e' }
- \repeat percent 2 { c''8 d'' }
- \repeat volta 2 {c'4 d' e' f'}
- \alternative {
- { g' a' a' g' }
- {f' e' d' c' }
- }
- \bar "|."
-}
-
-\score { {
- \mel \break
- \applymusic #unfold-repeats \mel
- }
-}
-
-
-
}
ADD_INTERFACE (Dynamic_text_spanner,
- "crescendo-text-spanner-interface",
+ "dynamic-text-spanner-interface",
"A text spanner for crescendo texts",
"dash-period dash-fraction edge-text style thickness");
ly_import_module (header_, s.header_);
}
+
LY_DEFINE (ly_run_translator, "ly:run-translator",
2, 0, 0, (SCM mus, SCM output_def),
"Process @var{mus} according to @var{output_def}. "
SCM_ASSERT_TYPE (sc, score, SCM_ARG1, __FUNCTION__, "Score");
SCM_ASSERT_TYPE (od, paper, SCM_ARG2, __FUNCTION__, "Output_def");
- SCM lines = SCM_EOL;
Output_def * score_def = 0;
/* UGR, FIXME, these are default \paper blocks once again. They
score_def = sc->defs_[i];
if (!score_def)
- return lines;
+ return scm_c_make_vector (0, SCM_EOL);
score_def = score_def->clone ();
SCM prot = score_def->self_scm ();
score_def->parent_ = od;
SCM context = ly_run_translator (sc->music_, score_def->self_scm ());
- lines = ly_format_output (context, scm_makfrom0str ("<embedded>"));
+ SCM lines = ly_format_output (context, scm_makfrom0str ("<embedded>"));
scm_remember_upto_here_1 (prot);
return lines;
}
Stencil m;
- if (ly_c_symbol_p (st))
+ if (st == ly_symbol2scm ("single-digit"))
{
- String style (ly_scm2string (scm_symbol_to_string (st)));
- if (style[0]=='1')
- {
- m = numbered_time_signature (me, n, 0);
- }
- else
- {
- m = special_time_signature (me, st, n, d);
- }
+ m = numbered_time_signature (me, n, 0);
+ }
+ else if (ly_c_symbol_p (st))
+ {
+ m = special_time_signature (me, st, n, d);
}
else
m = numbered_time_signature (me, n,d);
" typeset with mensural style mensuration marks. All other time\n"
" signatures are written with two digits.\n"
"\n"
-" @item @code{1xxx}\n"
+" @item @code{single-digit"
" All time signatures are typeset with a single\n"
-" digit, e.g. 3/2 is written as 3. (Any symbol starting\n"
-" with the digit @code{1} will do.)\n"
+" digit, e.g. 3/2 is written as 3.\n"
" @end table\n"
"\n"
"See also the test-file @file{input/test/time.ly}.\n",
/* creats*/ "",
/* accepts */ "",
/* acks */ "",
-/* reads */ "timeSignatureFraction automaticBars whichBar barAlways defaultBarType skipBars timing measureLength measurePosition currentBarNumber",
+/* reads */ "automaticBars whichBar barAlways defaultBarType skipBars timing measureLength measurePosition currentBarNumber",
/* write */ "");
--- /dev/null
+/*
+ trill-spanner-engraver.cc -- implement Trill_spanner_engraver
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 2000--2004 Jan Nieuwenhuizen <janneke@gnu.org>
+*/
+
+/*
+ C&P from text-spanner.cc
+
+ - todo: ending should be detected automatically? a new note
+ automatically is the end of the trill?
+
+ */
+
+#include "note-column.hh"
+#include "item.hh"
+#include "side-position-interface.hh"
+#include "engraver.hh"
+
+class Trill_spanner_engraver : public Engraver
+{
+public:
+ TRANSLATOR_DECLARATIONS (Trill_spanner_engraver);
+protected:
+ virtual void finalize ();
+ virtual void acknowledge_grob (Grob_info);
+ virtual bool try_music (Music *);
+ virtual void stop_translation_timestep ();
+ virtual void process_music ();
+
+private:
+ Spanner *span_;
+ Spanner *finished_;
+ Music *current_req_;
+ Drul_array<Music*> req_drul_;
+ void typeset_all ();
+};
+
+
+Trill_spanner_engraver::Trill_spanner_engraver ()
+{
+ finished_ = 0;
+ current_req_ = 0;
+ span_ =0;
+ req_drul_[START] = 0;
+ req_drul_[STOP] = 0;
+}
+
+bool
+Trill_spanner_engraver::try_music (Music *m)
+{
+ if (m->is_mus_type ("trill-span-event"))
+ {
+ Direction d = to_dir (m->get_property ("span-direction"));
+ req_drul_[d] = m;
+ return true;
+ }
+
+ return false;
+}
+
+void
+Trill_spanner_engraver::process_music ()
+{
+ if (req_drul_[STOP])
+ {
+ if (!span_)
+ {
+ req_drul_[STOP]->origin ()->warning (_ ("can't find start of trill spanner"));
+ }
+ else
+ {
+ finished_ = span_;
+ span_ = 0;
+ current_req_ = 0;
+ }
+ }
+
+ if (req_drul_[START])
+ {
+ if (current_req_)
+ {
+ req_drul_[START]->origin ()->warning (_ ("already have a trill spanner"));
+ }
+ else
+ {
+ current_req_ = req_drul_[START];
+ span_ = make_spanner ("TrillSpanner", req_drul_[START]->self_scm ());
+ Side_position_interface::set_axis (span_, Y_AXIS);
+ req_drul_[START] = 0;
+ }
+ }
+}
+
+void
+Trill_spanner_engraver::acknowledge_grob (Grob_info info)
+{
+ Spanner * spans[2] ={span_, finished_};
+ for (int i = 0; i < 2 ; i++)
+ {
+ if (spans[i] && Note_column::has_interface (info.grob_))
+ {
+ Side_position_interface::add_support (spans[i], info.grob_);
+ add_bound_item (spans[i], dynamic_cast<Item*> (info.grob_));
+ }
+ }
+}
+
+void
+Trill_spanner_engraver::typeset_all ()
+{
+ if (finished_)
+ {
+ if (!finished_->get_bound (RIGHT))
+ {
+ Grob* e = unsmob_grob (get_property ("currentMusicalColumn"));
+ finished_->set_bound (RIGHT, e);
+ }
+ finished_ = 0;
+ }
+}
+
+void
+Trill_spanner_engraver::stop_translation_timestep ()
+{
+ if (span_ && !span_->get_bound (LEFT))
+ {
+ Grob* e = unsmob_grob (get_property ("currentMusicalColumn"));
+ span_->set_bound (LEFT, e);
+ }
+
+ typeset_all ();
+ req_drul_[START] = 0;
+ req_drul_[STOP] = 0;
+}
+
+void
+Trill_spanner_engraver::finalize ()
+{
+ typeset_all ();
+ if (span_)
+ {
+ current_req_->origin ()->warning (_ ("unterminated trill spanner"));
+ span_->suicide ();
+ span_ = 0;
+ }
+}
+
+ENTER_DESCRIPTION (Trill_spanner_engraver,
+/* descr */ "Create trill spanner from a Music.",
+/* creats*/ "TrillSpanner",
+/* accepts */ "trill-span-event",
+/* acks */ "note-column-interface",
+/* reads */ "",
+/* write */ "");
\consists "Arpeggio_engraver"
\consists "Multi_measure_rest_engraver"
\consists "Text_spanner_engraver"
+ \consists "Trill_spanner_engraver"
\consists "Grob_pq_engraver"
\consists "Forbid_line_break_engraver"
'origin location
'elements (list (make-music 'BreathingSignEvent))))
+
+unfoldrepeats = #(def-music-function (location music) (ly:music?)
+ (unfold-repeats music))
+
+compressmusic = #(def-music-function
+ (location fraction music) (number-pair? ly:music?)
+ (ly:music-compress music (ly:make-moment (car fraction) (cdr fraction))))
+
+
%% \mytag #'foo { ... } ==> OK
%% c-\mytag #'foo ^4 ==> KO
%{
\set chordRootNamer = #(chord-name->german-markup #f)
\set chordNoteNamer = #note-name->german-markup
}
+
+
+
+improvisationOn = {
+ \set squashedPosition = #0
+ \override NoteHead #'style = #'slash
+}
+
+improvisationOff = {
+ \unset squashedPosition
+ \revert NoteHead #'style
+}
enddecr = #(make-span-event 'DecrescendoEvent STOP)
endcr = #(make-span-event 'CrescendoEvent STOP)
+
startTextSpan = #(make-span-event 'TextSpanEvent START)
stopTextSpan = #(make-span-event 'TextSpanEvent STOP)
-% TODO: junkme!
+startTrillSpan = #(make-span-event 'TrillSpanEvent START)
+stopTrillSpan = #(make-span-event 'TrillSpanEvent STOP)
+
+
+% STOP: junkme!
cresc = {
#(ly:export (make-event-chord (list cr)))
\set crescendoText = \markup { \italic "cresc." }
(direction . 1)
(meta . ((interfaces . (text-spanner-interface side-position-interface font-interface spanner-interface))))
))
+ (TrillSpanner
+ . (
+ (print-function . ,Dynamic_text_spanner::print)
+ (edge-text . ,(cons (make-musicglyph-markup "scripts-trill")
+ ""))
+ (style . trill)
+ (staff-padding . 1.0)
+ (padding . 0.5)
+ (direction . 1)
+ (Y-offset-callbacks . (,Side_position_interface::aligned_side))
+ (meta . ((interfaces . (text-spanner-interface side-position-interface font-interface spanner-interface))))
+ ))
(OttavaBracket
. (
(def-markup-command (score paper props score) (ly:score?)
(let*
- ((systems (ly:score-embedded-format score paper))
- (1st (vector-ref systems 0))
- (stencil (ly:paper-system-stencil 1st)) )
-
- (ly:stencil-align-to! stencil Y CENTER)
- stencil))
+ ((systems (ly:score-embedded-format score paper)))
+
+ (if (= 0 (vector-length systems))
+ (begin
+ (ly:warn "No systems found in \\score markup. Did you forget \\paper?")
+ empty-markup)
+ (begin
+ (let*
+ ((stencil (ly:paper-system-stencil (vector-ref systems 0))))
+
+ (ly:stencil-align-to! stencil Y CENTER)
+ stencil)))))
(def-markup-command (simple paper props str) (string?)
"A simple text string; @code{\\markup @{ foo @}} is equivalent with
(internal-class-name . "Event")
(types . (general-music event busy-playing-event))
))
- (StartPlayingEvent
+ (ContextChange
. (
- (description . "Used internally to signal beginning of notes.")
+ (description . "Change staffs in Piano staff.
- (internal-class-name . "Event")
- (types . (general-music event start-playing-event))
+Syntax @code{\\translator Staff = @var{new-id}}.")
+ (internal-class-name . "Music")
+ (iterator-ctor . , Change_iterator::constructor)
+ (types . (general-music translator-change-instruction))
))
-
+
(ClusterNoteEvent
. (
(description . "A note that is part of a cluster.")
(internal-class-name . "Event")
(types . (general-music event rhythmic-event rest-event))
))
+ (RevertProperty
+ . (
+ (description . "The opposite of @ref{OverrideProperty}: remove a
+previously added property from a graphical object definition
+ ")
+
+ (internal-class-name . "Music")
+ (types . (general-music layout-instruction))
+ (iterator-ctor . , Pop_property_iterator::constructor)
+ ))
+
(SequentialMusic
. (
(description . "Music expressions concatenated.
(types . (general-music span-event slur-event))
))
- (RevertProperty
+ (StartPlayingEvent
. (
- (description . "The opposite of @ref{OverrideProperty}: remove a
-previously added property from a graphical object definition
- ")
+ (description . "Used internally to signal beginning of notes.")
- (internal-class-name . "Music")
- (types . (general-music layout-instruction))
- (iterator-ctor . , Pop_property_iterator::constructor)
+ (internal-class-name . "Event")
+ (types . (general-music event start-playing-event))
))
-
+
(OutputPropertySetMusic
. (
(description . "Set grob properties in objects
(types . (general-music span-event text-span-event))
))
- (ContextChange
+ (TrillSpanEvent
. (
- (description . "Change staffs in Piano staff.
-
-Syntax @code{\\translator Staff = @var{new-id}}.")
- (internal-class-name . "Music")
- (iterator-ctor . , Change_iterator::constructor)
- (types . (general-music translator-change-instruction))
+ (description . "Start a trill spanner tr~~~")
+ (internal-class-name . "Event")
+ (types . (general-music span-event trill-span-event))
))
(TimeScaledMusic
(define (grob-doc description)
"Given a property alist DESCRIPTION, make a documentation
node."
-
+
(let*
- (
- (metah (assoc 'meta description))
+ ((metah (assoc 'meta description))
(meta (cdr metah))
(name (cdr (assoc 'name meta)))
(ifaces (map lookup-interface (cdr (assoc 'interfaces meta))))
(engravers (filter
(lambda (x) (engraver-makes-grob? name x)) all-engravers-list))
(namestr (symbol->string name))
- (engraver-names (map symbol->string (map ly:translator-name engravers)))
- )
+ (engraver-names (map symbol->string (map ly:translator-name engravers))))
(make <texi-node>
#:name namestr
(define-public (collect-music-for-book parser music)
(collect-scores-for-book parser (ly:music-scorify music)))
+
+
;;;;;;;;;;;;;;;;
; alist