--- /dev/null
+\version "2.11.38"\r
+\r
+\header {\r
+ doctitle = "Broken crescendo hairpin"\r
+ lsrtags = "expressive-marks"\r
+ texidoc = "\r
+In order to make parts of a crescendo hairpin invisible, the following\r
+method is used: A white rectangle is drawn on top of the respective\r
+part of the crescendo hairpin, making it invisible. The rectangle is\r
+defined as postscript code within a text markup.\r
+\r
+To fine-tune the position and size of the markup, the number\r
+preceding @code{setgray} in the postscript definition can be set to a\r
+value <1 making it grey. The two numbers before @code{scale} in the\r
+postscript code are responsible for the width and height of the\r
+rectangle, the two numbers before @code{translate} change the x- and\r
+y-origin of the rectangle. \r
+\r
+Make sure to put the hairpin in a lower layer than the text markup to\r
+actually draw the rectangle above the hairpin. \r
+" }\r
+\r
+\score {\r
+ \relative c' {\r
+ << {\r
+ \dynamicUp\r
+ \override DynamicLineSpanner #'staff-padding = #4\r
+ r2 r16 c'8.\pp r4\r
+ } \\ {\r
+ \override DynamicLineSpanner #'layer = #0\r
+ des,2\mf\< ~\r
+ \override TextScript #'layer = #2\r
+ des16_\markup {\r
+ \postscript #"1.9 -8 translate 5 4 scale 1 setgray 0 0 moveto 0 1\r
+ lineto 1 1 lineto 1 0 lineto 0 0 lineto fill"\r
+ }\r
+ r8. des4 ~ des16->\sff\r
+ } >>\r
+ }\r
+ \layout { ragged-right = ##t }\r
+}\r
doctitle = "Changing form of multi-measure rests"
lsrtags = "rhythms,tweaks-and-overrides"
texidoc = "
-If there are 10 or fewer measures of rest, LilyPond prints
+If there are ten or fewer measures of rests, LilyPond prints
a series of longa and breve rests (called in German
-Kirchenpausen - church rests) within the staff and
-prints a simple line otherwise. This default number of 10
+\"Kirchenpausen\" - church rests) within the staff and
+prints a simple line otherwise. This default number of ten
may be changed by an override:
"}
\relative c'' {
-\compressFullBarRests
-R1*2 | R1*5 | R1*9
-\override MultiMeasureRest #'expand-limit = 3
-R1*2 | R1*5 | R1*9
+ \compressFullBarRests
+ R1*2 | R1*5 | R1*9
+ \override MultiMeasureRest #'expand-limit = 3
+ R1*2 | R1*5 | R1*9
}
-
\version "2.11.6"
-\layout { ragged-right= ##t }
+\layout { ragged-right = ##t }
\header {
doctitle = "Makam"
lsrtags = "pitches"
- texidoc = "Makam is Turkish type of melody that uses 1/9 tone
+ texidoc = "Makam is a type of melody from Turkey using 1/9th-tone
microtonal alterations."
}
(gc . ,(ly:make-pitch -1 4 KOMA))
(ac . ,(ly:make-pitch -1 5 KOMA))
(bc . ,(ly:make-pitch -1 6 KOMA))
-
+
(cb . ,(ly:make-pitch -1 0 BAKIYE))
(db . ,(ly:make-pitch -1 1 BAKIYE))
(eb . ,(ly:make-pitch -1 2 BAKIYE))
(gb . ,(ly:make-pitch -1 4 BAKIYE))
(ab . ,(ly:make-pitch -1 5 BAKIYE))
(bb . ,(ly:make-pitch -1 6 BAKIYE))
-
+
(ck . ,(ly:make-pitch -1 0 KUCUK))
(dk . ,(ly:make-pitch -1 1 KUCUK))
(ek . ,(ly:make-pitch -1 2 KUCUK))
(gk . ,(ly:make-pitch -1 4 KUCUK))
(ak . ,(ly:make-pitch -1 5 KUCUK))
(bk . ,(ly:make-pitch -1 6 KUCUK))
-
+
(cbm . ,(ly:make-pitch -1 0 BUYUKMUCENNEB))
(dbm . ,(ly:make-pitch -1 1 BUYUKMUCENNEB))
(ebm . ,(ly:make-pitch -1 2 BUYUKMUCENNEB))
(gbm . ,(ly:make-pitch -1 4 BUYUKMUCENNEB))
(abm . ,(ly:make-pitch -1 5 BUYUKMUCENNEB))
(bbm . ,(ly:make-pitch -1 6 BUYUKMUCENNEB))
-
+
;; f for flat.
(cfc . ,(ly:make-pitch -1 0 (- KOMA)))
(dfc . ,(ly:make-pitch -1 1 (- KOMA)))
(gfb . ,(ly:make-pitch -1 4 (- BAKIYE)))
(afb . ,(ly:make-pitch -1 5 (- BAKIYE)))
(bfb . ,(ly:make-pitch -1 6 (- BAKIYE)))
-
+
(cfk . ,(ly:make-pitch -1 0 (- KUCUK)))
(dfk . ,(ly:make-pitch -1 1 (- KUCUK)))
(efk . ,(ly:make-pitch -1 2 (- KUCUK)))
(gfk . ,(ly:make-pitch -1 4 (- KUCUK)))
(afk . ,(ly:make-pitch -1 5 (- KUCUK)))
(bfk . ,(ly:make-pitch -1 6 (- KUCUK)))
-
+
(cfbm . ,(ly:make-pitch -1 0 (- BUYUKMUCENNEB)))
(dfbm . ,(ly:make-pitch -1 1 (- BUYUKMUCENNEB)))
(efbm . ,(ly:make-pitch -1 2 (- BUYUKMUCENNEB)))
(gfbm . ,(ly:make-pitch -1 4 (- BUYUKMUCENNEB)))
(afbm . ,(ly:make-pitch -1 5 (- BUYUKMUCENNEB)))
(bfbm . ,(ly:make-pitch -1 6 (- BUYUKMUCENNEB)))
-
)
-%% set pitch names.
-pitchnames = \makamPitchNames
+% Set pitch names.
+pitchnames = \makamPitchNames
#(ly:parser-set-note-names parser makamPitchNames)
-makamGlyphs = #'((1 . "accidentals.doublesharp")
+makamGlyphs = #'(
+ (1 . "accidentals.doublesharp")
(8/9 . "accidentals.sharp.slashslashslash.stemstem")
(5/9 . "accidentals.sharp.slashslashslash.stem")
(4/9 . "accidentals.sharp")
)
\relative {
-
+
%{ define alteration <-> symbol mapping. The following glyphs are available.
accidentals.sharp
accidentals.sharp.slashslash.stem
accidentals.flatflat.slash
accidentals.doublesharp
%}
-
- \override Accidental #'glyph-name-alist = \makamGlyphs
+ \override Accidental #'glyph-name-alist = \makamGlyphs
\override Staff.KeySignature #'glyph-name-alist = \makamGlyphs
- \set Staff.keySignature = #'(
- (3 . 4/9)
- (6 . -1/9))
+ \set Staff.keySignature = #'((3 . 4/9) (6 . -1/9))
- c cc db fk gbm gfc gfb efk dfbm
+ c cc db fk
+ gbm gfc gfb efk
+ fk db cc c
}
-\version "2.11.23"
-\layout { ragged-right= ##t }
-\header {
- doctitle = "Making an object invisible with the transparent property"
- lsrtags = "rhythms,tweaks-and-overrides"
- texidoc = "
-Setting the @code{transparent} property will cause an object to be
-printed in `invisible ink': the object is not printed, but all its
-other behavior is retained. The object still takes up space, it takes
-part in collisions, and slurs, and ties and beams can be attached to it.
-
-
-The snippet demonstrates how to connect different voices using ties.
-Normally, ties only connect two notes in the same voice. By
-introducing a tie in a different voice, and blanking the first up-stem
-in that voice, the tie appears to cross voices.
-" }
-
-\relative c'' <<
- {
- \once \override Stem #'transparent = ##t
- b8~ b8\noBeam
- } \\ {
- b[ g8]
- }
->>
+\version "2.11.23"\r
+\layout { ragged-right = ##t }\r
+\header {\r
+ doctitle = "Making an object invisible with the transparent property"\r
+ lsrtags = "rhythms,tweaks-and-overrides"\r
+ texidoc = "\r
+Setting the @code{transparent} property will cause an object to be\r
+printed in \"invisible ink\": the object is not printed, but all its\r
+other behavior is retained. The object still takes up space, it takes\r
+part in collisions, and slurs, ties and beams can be attached to it.\r
+\r
+\r
+The snippet demonstrates how to connect different voices using ties. \r
+Normally, ties only connect two notes in the same voice. By\r
+introducing a tie in a different voice, and blanking the first up-stem\r
+in that voice, the tie appears to cross voices. To prevent the blanked stem's\r
+flag from interfering with tie positioning, the stem is extended.\r
+" }\r
+\r
+\relative c'' {\r
+ \time 2/4\r
+ << {\r
+ \once \override Stem #'transparent = ##t\r
+ \once \override Stem #'length = #8\r
+ b8 ~ b\noBeam\r
+ \once \override Stem #'transparent = ##t\r
+ \once \override Stem #'length = #8\r
+ g ~ g\noBeam\r
+ } \\ {\r
+ b g g e\r
+ } >>\r
+}\r
\version "2.11.42"
-\layout { ragged-right= ##t }
+\layout { ragged-right = ##t }
\header {
doctitle = "Positioning multi-measure rests"
lsrtags = "rhythms,tweaks-and-overrides"
"}
\relative c'' {
-% Multi-measure rests by default are set under the 2nd line
-R1
-% They can be moved with an override
-\override MultiMeasureRest #'staff-position = #-2
-R1
-% A value of 0 is the default position;
-% the following trick moves the rest to the center line
-\override MultiMeasureRest #'staff-position = #-0.01
-R1
-% Multimeasure rests in odd-numbered voices are under the top line
-<< {R1} \\ {a1} >>
-% Multi-measure rests in even-numbered voices are under the bottom line
-<< {c1} \\ {R1} >>
-% They remain separated even in empty bars
-<< {R1} \\ {R1} >>
-% This brings them together even though there are two voices
-\compressFullBarRests
-<<
- \revert MultiMeasureRest #'staff-position
- {R1*3}
-\\
- \revert MultiMeasureRest #'staff-position
- {R1*3}
->>
+ % Multi-measure rests by default are set under the second line
+ R1
+ % They can be moved with an override
+ \override MultiMeasureRest #'staff-position = #-2
+ R1
+ % A value of 0 is the default position;
+ % the following trick moves the rest to the center line
+ \override MultiMeasureRest #'staff-position = #-0.01
+ R1
+ % Multi-measure rests in odd-numbered voices are under the top line
+ << { R1 } \\ { a1 } >>
+ % Multi-measure rests in even-numbered voices are under the bottom line
+ << { c1 } \\ { R1 } >>
+ % They remain separated even in empty bars
+ << { R1 } \\ { R1 } >>
+ % This brings them together even though there are two voices
+ \compressFullBarRests
+ <<
+ \revert MultiMeasureRest #'staff-position
+ { R1*3 }
+ \\
+ \revert MultiMeasureRest #'staff-position
+ { R1*3 }
+ >>
}
-
doctitle = "Quoting another voice with transposition"
lsrtags = "pitches,staff-notation"
texidoc = "Quotations take into account the transposition of both
-source and target. In this example, all instruments play sounding
-central C, the target is a instrument in F. The target part may be
-@code{\\transpose}d. In this case, all the pitches (including the
-quoted ones) will transposed as well."
+source and target. In this example, all instruments play sounding
+middle C; the target is an instrument in F. The target part may be
+transposed using @code{\\transpose}. In this case, all the pitches (including the
+quoted ones) are transposed."
}
-\addQuote clarinet {
- \transposition bes
- d'16 d'16 d'8
- d'16 d'16 d'8
- d'16 d'16 d'8
- d'16 d'16 d'8
+\addQuote clarinet {
+ \transposition bes
+ \repeat unfold 8 { d'16 d'16 d'8 }
}
-\addQuote sax {
- \transposition es'
- a8 a a a a a a a
+\addQuote sax {
+ \transposition es'
+ \repeat unfold 16 { a8 }
}
quoteTest = {
- \transposition f % french horn
-
- g'4
- << \quoteDuring #"clarinet" { \skip 4 } s4^"clar" >>
- << \quoteDuring #"sax" { \skip 4 } s4^"sax" >>
+ % french horn
+ \transposition f
+ g'4
+ << \quoteDuring #"clarinet" { \skip 4 } s4^"clar." >>
+ << \quoteDuring #"sax" { \skip 4 } s4^"sax." >>
+ g'4
}
-<< \quoteTest
- \new Staff
- << \transpose c' d' \quoteTest
- s4_"up 1 tone"
- >>
->>
+{
+ \set Staff.instrumentName = \markup \center-align { "Horn" "in F" }
+ \quoteTest
+ \transpose c' d' << \quoteTest s4_"up a tone" >>
+}
doctitle = "Transposing music with minimum accidentals"
lsrtags = "pitches"
texidoc = "There is a way to enforce enharmonic modifications for
-notes in order to have the minimum number of accidentals. In that
-case, ``Double accidentals should be removed, as well as E-sharp
-(-> F), bC (-> B), bF (-> E), B-sharp (-> C).'', as proposed by a
-request for a new feature. In this manner, the most natural
-enharmonic notes are chosen in this example. "
-}
+notes in order to have the minimum number of accidentals. In this
+case, the following rules apply:
+
+\"Double accidentals should be removed, as well as E sharp (-> F),
+C flat (-> B), F flat (-> E) and B sharp (-> C)\".
-#(define (naturalise-pitch p)
+In this manner, the most natural enharmonic notes are chosen.
+"}
+
+#(define (naturalize-pitch p)
(let* ((o (ly:pitch-octave p))
(a (* 4 (ly:pitch-alteration p)))
; alteration, a, in quarter tone steps, for historical reasons
(n (ly:pitch-notename p)))
-
(cond
((and (> a 1) (or (eq? n 6) (eq? n 2)))
(set! a (- a 2))
((and (< a -1) (or (eq? n 0) (eq? n 3)))
(set! a (+ a 2))
(set! n (- n 1))))
-
(cond
((> a 2) (set! a (- a 4)) (set! n (+ n 1)))
((< a -2) (set! a (+ a 4)) (set! n (- n 1))))
-
(if (< n 0) (begin (set! o (- o 1)) (set! n (+ n 7))))
(if (> n 6) (begin (set! o (+ o 1)) (set! n (- n 7))))
-
(ly:make-pitch o n (/ a 4))))
-#(define (naturalise music)
+#(define (naturalize music)
(let* ((es (ly:music-property music 'elements))
(e (ly:music-property music 'element))
(p (ly:music-property music 'pitch)))
-
(if (pair? es)
(ly:music-set-property!
music 'elements
- (map (lambda (x) (naturalise x)) es)))
-
+ (map (lambda (x) (naturalize x)) es)))
(if (ly:music? e)
(ly:music-set-property!
music 'element
- (naturalise e)))
-
+ (naturalize e)))
(if (ly:pitch? p)
(begin
- (set! p (naturalise-pitch p))
+ (set! p (naturalize-pitch p))
(ly:music-set-property! music 'pitch p)))
-
music))
-music = \relative c' { c4 d e f g a b c }
-
-naturaliseMusic =
+naturalizeMusic =
#(define-music-function (parser location m)
(ly:music?)
- (naturalise m))
+ (naturalize m))
+
+music = \relative c' { c4 d e g }
\score {
- \new Staff {
- \transpose c ais \music
- \naturaliseMusic \transpose c ais \music
- \break
+ \new Staff {
+ \transpose c ais \music
+ \naturalizeMusic \transpose c ais \music
\transpose c deses \music
- \naturaliseMusic \transpose c deses \music
+ \naturalizeMusic \transpose c deses \music
}
- \layout { ragged-right = ##t}
+ \layout { ragged-right = ##t }
}
-
-