+2005-04-17 Mathieu Giraud <magiraud@free.fr>
+
+ * scm/chord-name.scm : support for italian and french
+ chords names.
+
+ * scm/chord-ignatzek-names.scm (ignatzek-chord-names): add
+ a space defined by chordPrefixSpacer when the root name is
+ direclty followed by a prefix.
+
+ * ly/engraver-init.ly : chordPrefixSpacer
+ * scm/define-context-properties.scm : chordPrefixSpacer
+ * ly/property-init.ly : italianChords, frenchChords
+
2005-04-17 Jan Nieuwenhuizen <janneke@gnu.org>
* SConstruct: Require pkg-config.
chordNameExceptions = #ignatzekExceptions
chordNoteNamer = #'()
chordRootNamer = #note-name->markup
+ chordPrefixSpacer = #0
chordNameExceptionsFull = #fullJazzExceptions
chordNameExceptionsPartial = #partialJazzExceptions
\set chordNoteNamer = #note-name->german-markup
}
+frenchChords = {
+ \set chordRootNamer = #(chord-name->italian-markup #t)
+ \set chordPrefixSpacer = #0.4
+}
+italianChords = {
+ \set chordRootNamer = #(chord-name->italian-markup #f)
+ \set chordPrefixSpacer = #0.4
+}
improvisationOn = {
\set squashedPosition = #0
(set! base-stuff
(append
(list root-markup
- (markup-join prefixes sep)
+ (conditional-kern-before (markup-join prefixes sep)
+ (and (not (null? prefixes))
+ (= (ly:pitch-alteration root) NATURAL))
+ (ly:context-property context 'chordPrefixSpacer))
(make-super-markup to-be-raised-stuff))
base-stuff))
(make-line-markup base-stuff)))
(alteration->text-accidental-markup alteration)
(= alteration FLAT) 0.2)))
+(define (accidental->markup-italian alteration)
+ "Return accidental markup for ALTERATION, for use after an italian chord root name."
+ (if (= alteration 0)
+ (make-hspace-markup 0.2)
+ (make-line-markup
+ (list
+ (make-hspace-markup (if (= alteration FLAT) 0.7 0.5))
+ (make-raise-markup 0.7 (alteration->text-accidental-markup alteration))
+ (make-hspace-markup (if (= alteration SHARP) 0.2 0.1))
+ ))))
+
(define-public (note-name->markup pitch)
"Return pitch markup for PITCH."
(make-line-markup
(list-ref '( "ses" "s" "" "is" "isis") (+ 2 (/ (cdr n-a) 2)))
(list-ref '("eses" "es" "" "is" "isis") (+ 2 (/ (cdr n-a) 2)))))))))
+(define-public ((chord-name->italian-markup re-with-eacute) pitch)
+ "Return pitch markup for PITCH, using italian/french note names.
+ If re-with-eacute is set to #t, french 'ré' is returned for D instead of 're'
+"
+ (let* ((name (ly:pitch-notename pitch))
+ (alt (ly:pitch-alteration pitch)))
+ (make-line-markup
+ (list
+ (make-simple-markup
+ (vector-ref
+ (if re-with-eacute
+ #("Do" "Ré" "Mi" "Fa" "Sol" "La" "Si")
+ #("Do" "Re" "Mi" "Fa" "Sol" "La" "Si"))
+ name))
+ (accidental->markup-italian alt)
+ ))))
+
;; fixme we should standardize on omit-root (or the other one.)
;; perhaps the default should also be reversed --hwn
(define-safe-public (sequential-music-to-chord-exceptions seq . rest)
(chordNameSeparator ,markup?
"The markup object used to separate
parts of a chord name.")
+ (chordPrefixSpacer ,number?
+ "The space added between the root symbol and the prefix
+ of a chord name")
(chordChanges ,boolean? "Only show changes in chords scheme?")
(clefGlyph ,string? "Name of the symbol within the music font.")
(clefOctavation ,integer? "Add