-\version "2.17.19"
+\version "2.19.35"
\header {
texidoc = "@code{\\note-by-number} and @code{\\note} support
-all note head styles and straight flags."
+all note head styles and all flag styles (default, straight, flat, mensural)."
}
#(define styles-list
'(default altdefault
baroque neomensural
mensural petrucci
+ semipetrucci blackpetrucci
harmonic harmonic-black
harmonic-mixed diamond
cross xcircle
'(-3 -2 -1 0 1 2 3 4 5 6))))))))
styles))))
+%% Testing all combinations of note-head/flag-styles would be too much
+%% Thus, limited examples
\markup {
\column {
\combine \null \vspace #1
\combine \null \vspace #1
\underline "Modern-straight-flag:"
\override #'(flag-style . modern-straight-flag)
- \show-note-styles #'(default)
+ \show-note-styles #'(default mensural)
}
}
\show-note-styles #'(default)
}
}
+
+\markup {
+ \column {
+ \combine \null \vspace #1
+ \underline "default-flag:"
+ \override #'(flag-style . default)
+ \show-note-styles #'(default mensural)
+ }
+}
Construct a note symbol, with stem and flag. By using fractional values for
@var{dir}, longer or shorter stems can be obtained.
-Supports all note-head-styles.
+Supports all note-head-styles. Ancient note-head-styles will get
+mensural-style-flags. @code{flag-style} may be overridden independently.
Supported flag-styles are @code{default}, @code{old-straight-flag},
-@code{modern-straight-flag} and @code{flat-flag}.
+@code{modern-straight-flag}, @code{flat-flag}, @code{mensural} and
+@code{neomensural}. The latter two flag-styles will both result in
+mensural-flags. Both are supplied for convenience.
@lilypond[verbatim,quote]
\\markup {
@end lilypond"
(define (get-glyph-name-candidates dir log style)
(map (lambda (dir-name)
- (format #f "noteheads.~a~a" dir-name
+ (format #f "noteheads.~a~a"
+ dir-name
(if (and (symbol? style)
(not (equal? 'default style)))
(select-head-glyph style (min log 2))
(sign dir) log 'default))
result)))
(head-glyph (ly:font-get-glyph font head-glyph-name))
- (ancient-flags? (or (eq? style 'mensural) (eq? style 'neomensural)))
+ (ancient-flags?
+ (member style
+ '(mensural neomensural petrucci semipetrucci blackpetrucci)))
(attach-indices (ly:note-head::stem-attachment font head-glyph-name))
(stem-length (* size-factor (max 3 (- log 1))))
;; With ancient-flags we want a tighter stem
(cdr attach-indices)))))
;; For a tighter stem (with ancient-flags) the stem-width has to be
;; adjusted.
- (stem-X-corr (if ancient-flags? (* 0.5 dir stem-thickness) 0))
+ (stem-X-corr
+ (if (or ancient-flags?
+ (member flag-style '(mensural neomensural)))
+ (* 0.5 dir stem-thickness) 0))
(stem-glyph (and (> log 0)
(ly:round-filled-box
(ordered-cons (+ stem-X-corr (car attach-off))
flat-flag)
(else
(ly:font-get-glyph font
- (format #f (if ancient-flags?
- "flags.mensural~a2~a"
- "flags.~a~a")
- (if (> dir 0) "u" "d")
- log))))
+ (format #f
+ (if (or (member flag-style
+ '(mensural neomensural))
+ (and ancient-flags?
+ (null? flag-style)))
+ "flags.mensural~a2~a"
+ "flags.~a~a")
+ (if (> dir 0) "u" "d")
+ log))))
(cons (+ (car attach-off)
;; For tighter stems (with ancient-flags) the
;; flag has to be adjusted different.