Einstellung lässt sich aber durch die Eigenschaft @code{hairpinToBarline}
verändern.
-@lilypond[quote,ragged-right,fragment,verbatim,relative=2]
-\set hairpinToBarline = ##f
-c4\< c2. c4\!
-@end lilypond
+@c TODO: Add link to new snippet for #'to-barline
In manchen Situationen kann auch der @code{\espressivo}-Befehl
geeignet sein, ein An- und Abschwellen einer Note anzuzeigen.
anterior. Esto se puede modificar estableciendo la propiedad
@code{hairpinToBarline}:
-@lilypond[verbatim,quote,ragged-right,fragment,relative=2]
-e4\< e2. e1\!
-\set hairpinToBarline = ##f
-e4\< e2. e1\!
-@end lilypond
+@c TODO: Add link to new snippet for #'to-barline
@cindex espressivo, articulación
en assignant @emph{faux} (lettre @q{f}) à la propriété
@code{hairpinToBarline} :
-@lilypond[quote,ragged-right,fragment,verbatim,relative=2]
-\set hairpinToBarline = ##f
-c4\< c2. c4\!
-@end lilypond
+@c TODO: Add link to new snippet for #'to-barline
On peut avoir recours à l'indication @code{\espressivo} pour indiquer un
crescendo puis un decrescendo sur une seule note.
illustrates this behavior:
@c This example currently does not work. -pm
-
-@lilypond[verbatim,quote,ragged-right,fragment,relative=2]
-e4\< e2. e1\!
-\set hairpinToBarline = ##f
-e4\< e2. e1\!
-@end lilypond
+@c TODO: Add link to new snippet for #'to-barline
Spacer notes are needed to engrave multiple marks on one note.
-\version "2.11.43"
+\version "2.11.45"
\header {
- lsrtags = "expressive-marks,text,tweaks-and-overrides"
+ lsrtags = "expressive-marks,tweaks-and-overrides"
texidoc = "
Using Scheme code to override the stencil for @code{MetronomeMark}
objects, this example allows the creation of metronome marks which include
-text directions. The function @code{\tempoChangeMarkup} is called with three
-strings: the text label, note duration, and beats per minute. To print the
-new metronome mark, this is followed by the standard @code{\tempo} command.
+text directions. The function @code{\movement} is called with three
+arguments: the text label, note duration, and beats per minute.
"
doctitle = "Adding text indications to metronome marks"
}
-% Thanks to Alexander Kobel for this snippet
+#(define-markup-command (mvt layout props arg) (markup?)
+ (interpret-markup layout props
+ (markup #:huge #:bold arg)))
-tempoMarkLabelSize = #0
-tempoMarkNoteSize = #-6
+#(define (string->duration duration-string)
+ "Parse the `duration-string', e.g. ''4..'' or ''breve.'', and return a duration object."
+ (let* ((length (string-length duration-string))
+ (dot-index (or (string-index duration-string #\.) length))
+ (len (substring duration-string 0 dot-index))
+ (dots (- length dot-index)))
+ (ly:make-duration (cond ((string=? len "breve") -1)
+ ((string=? len "longa") -2)
+ ((string=? len "maxima") -3)
+ (else (log2 (string->number len))))
+ dots 1 1)))
-#(define (tempoChangeMarkupFactory grob label noteValue tempo)
- (interpret-markup
- (ly:grob-layout grob)
- (ly:grob-alist-chain grob (ly:output-def-lookup (ly:grob-layout grob) 'text-font-defaults))
- (markup
- #:fontsize tempoMarkLabelSize #:italic #:concat (label (if (string-null? label) "(" " (" ))
- #:hspace -1
- #:fontsize tempoMarkNoteSize #:general-align Y DOWN #:note noteValue UP
- #:fontsize tempoMarkLabelSize #:italic #:concat( "= " tempo ")" )
- )
- ))
+movement = #(define-music-function (parser location text duration count music)
+ (string? string? integer? ly:music?)
+ (define (format-movement-markup dur count context)
+ (markup #:mvt text #:hspace 1
+ #:concat ("(" #:general-align Y DOWN #:smaller #:note duration 1)
+ "="
+ #:concat ((number->string count) ")")))
+ #{
+ \set Score.metronomeMarkFormatter = #$format-movement-markup
+ \set Score.tempoWholesPerMinute = #$(ly:moment-mul (ly:make-moment count 1)
+ (ly:duration-length
+ (string->duration duration)))
+ \set Score.tempoUnitDuration = #$(string->duration duration)
+ \set Score.tempoUnitCount = $count
+ $music
+ \set Score.metronomeMarkFormatter = #format-metronome-markup
+ #})
-#(define (tempoChangeStencil label noteValue tempo)
- (lambda (grob)
- (tempoChangeMarkupFactory grob label noteValue tempo)
- ))
+\layout { ragged-right = ##f }
-tempoChangeMarkup = #(define-music-function (parser location label noteValue tempo) (string? string? string?)
- #{
- \once \override Score.MetronomeMark #'stencil = #(tempoChangeStencil $label $noteValue $tempo)
- #})
-
-\relative c' {
- \time 4/4
- \clef treble
- % initialize the override
- \tempoChangeMarkup #"Moderato" #"4" #"63"
- % markup is printed
- \tempo 4 = 63
- c4 d e f
- g a b c
- \time 6/4
- \mark \default
- \tempoChangeMarkup #"presto" #"2." #"90"
- \tempo 2. = 90
- c2. g \break
- e \tempoChangeMarkup #"handling collision with RehearsalMark" #"4" #"120" \tempo 4 = 120 c
- \time 4/4
- \mark \default
- c1
+\relative c' {
+ \time 3/4
+ \movement "Allegro" "2." #92
+ c2 e4
+ g2.
+ \movement "Moderato" "4" #104
+ f4 e d
+ \tempo 4 = 92
+ c2.
}
--- /dev/null
+\version "2.11.46"\r
+\header {\r
+ lsrtags = "expressive-marks"\r
+ texidoc = "If the note which ends a hairpin falls on a downbeat,\r
+the hairpin stops at the bar line immediately preceding. This behavior\r
+can be controlled by overriding the @code{'to-barline} property.\r
+"\r
+ doctitle = "Setting hairpin behavior at bar lines"\r
+}\r
+\r
+\relative c'' {\r
+ e4\< e2.\r
+ e1\!\r
+ \override Hairpin #'to-barline = ##f\r
+ e4\< e2.\r
+ e1\!\r
+}\r
\header {
- texidoc ="If a hairpin ends on the first note of a new stave, we
-don't print that ending. But on the previous line, this hairpin
-should not be left open, and should end at the barline. "
+ texidoc = "If a hairpin ends on the first note of a new stave, we
+do not print that ending. But on the previous line, this hairpin
+should not be left open, and should end at the bar line. "
}
-\version "2.10.0"
-\layout { ragged-right = ##t }
+\version "2.11.46"
+
\relative c' {
- \set hairpinToBarline = ##t
c1\>
\break
c1\!
-\version "2.11.12"
-\paper { ragged-right = ##t }
+\version "2.11.46"
+
\header {
- texidoc = "hairpinToBarline is not confused by very long marks."
+ texidoc = "'to-barline is not confused by very long marks."
}
\new Staff \relative c' {
- c1\< |
+ c1\<
\mark "Very long mark"
- c4\> c c c\! |
+ c4\> c c c\!
}
\header {
- texidoc = "By setting @code{hairpinToBarline}, hairpins will stop at
-the barline preceding the ending note."
+ texidoc = "Hairpins whose end note is preceded by a bar line
+should end at that bar line. "
}
-\version "2.10.0"
-
-\paper {
- ragged-right = ##t
-}
+\version "2.11.46"
\relative c'' {
- \set hairpinToBarline = ##t
\override Hairpin #'bound-padding = #1.0
c4\< c2. c4\!
}
}
finished_cresc_ = cresc_;
-
- /* backwards compatibility with hairpinToBarline */
- if (finished_cresc_->get_property ("to-barline") == SCM_EOL)
- {
- bool use_bar = to_boolean (get_property ("hairpinToBarline"))
- && scm_is_string (get_property ("whichBar"));
-
- finished_cresc_->set_property ("to-barline", scm_from_bool (use_bar));
- }
-
announce_end_grob (finished_cresc_, SCM_EOL);
cresc_ = 0;
current_cresc_ev_ = 0;
conversions.append (((2, 11, 38), conv, """\\setEasyHeads -> \\easyHeadsOn, \\fatText -> \\textLengthOn,
\\emptyText -> \\textLengthOff"""))
+
+def conv (str):
+ str = re.sub (r"\\set\s+([a-zA-Z]+)\s*.\s*hairpinToBarline\s*=\s*##([tf]+)",
+ r"\\override \1.Hairpin #'to-barline = ##\2", str)
+ str = re.sub (r"\\set\s+hairpinToBarline\s*=\s*##([tf]+)",
+ r"\\override Hairpin #'to-barline = ##\1", str)
+ str = re.sub (r"\\unset\s+([a-zA-Z]+)\s*.\s*hairpinToBarline",
+ r"\\revert \1.Hairpin #'to-barline", str)
+ str = re.sub (r"\\unset\s+hairpinToBarline",
+ r"\\revert Hairpin #'to-barline", str)
+ str = re.sub (r"hairpinToBarline\s*=\s*##([tf]+)",
+ r"\\override Hairpin #'to-barline = ##\1", str)
+ return str
+
+conversions.append (((2, 11, 46), conv, """\\set hairpinToBarline -> \\override Hairpin #'to-barline"""))
@code{GridPoint}s.")
- (hairpinToBarline ,boolean? "If set, end a hairpin at the barline
-before the ending note.")
(harmonicAccidentals ,boolean? "If set, harmonic notes in chords
get accidentals.")
(highStringOne ,boolean? "Whether the first string is the string
0 to@tie{}6 and @var{alter} a fraction, denoting alteration. For
alterations, use symbols, e.g. @code{keySignature = #`((6 . ,FLAT))}.")
+
(lyricMelismaAlignment ,ly:dir? "Alignment to use for a melisma syllable.")
+
(majorSevenSymbol ,markup? "How should the major 7th be formatted
in a chord name?")
(markFormatter ,procedure? "A procedure taking as arguments the