]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 1503 - add additionalPitchPrefix to allow choice of prefix for additional pitch...
authorAdam Spiers <lilypond@adamspiers.org>
Mon, 7 Nov 2011 11:45:18 +0000 (11:45 +0000)
committerAdam Spiers <lilypond@adamspiers.org>
Tue, 29 Nov 2011 11:04:44 +0000 (11:04 +0000)
This was previously "add", e.g. "Cmaj7 add6add9",
but this results in too much clutter and
is rarely used.

Documentation/notation/chords.itely
input/regression/chord-additional-pitch-prefix.ly [new file with mode: 0644]
ly/engraver-init.ly
scm/chord-ignatzek-names.scm
scm/define-context-properties.scm

index a8884d28668e472654520499830a9787f661fbfd..2d2975bc9ec9a7e452d7d7ac2fca569d1e4804a4 100644 (file)
@@ -616,6 +616,23 @@ of @code{chordRootNamer} to identify a major 7 chord.  Predefined
 options are @code{whiteTriangleMarkup} and
 @code{blackTriangleMarkup}.
 
+@funindex additionalPitchPrefix
+
+@item additionalPitchPrefix
+
+When the chord name contains additional pitches, they can optionally
+be prefixed with some text.  The default is no prefix, in order to
+avoid too much visual clutter, but for small numbers of additional
+pitches this can be visually effective.
+
+@lilypond[verbatim,quote,ragged-right]
+\new ChordNames {
+  <c e g d'>    % add9
+  \set additionalPitchPrefix = #"add"
+  <c e g d'>    % add9
+}
+@end lilypond
+
 @funindex chordNoteNamer
 
 @item chordNoteNamer
diff --git a/input/regression/chord-additional-pitch-prefix.ly b/input/regression/chord-additional-pitch-prefix.ly
new file mode 100644 (file)
index 0000000..0afc6a0
--- /dev/null
@@ -0,0 +1,11 @@
+\version "2.15.17"
+\header {
+    texidoc = "The prefix of additional chord pitches can be tuned with
+@code{additionalPitchPrefix}."
+}
+
+\new ChordNames {
+    <c e g d'> % add9
+    \set additionalPitchPrefix = #"add"
+    <c e g d'> % add9
+}
index f88705e300ef438023ce4a81cbbf3585d16dd23e..8c7209b22752d75e1e08d9186baf0b36b0c11559 100644 (file)
@@ -646,6 +646,7 @@ automatically when an output definition (a @code{\score} or
 %% chord names:
   chordNameFunction = #ignatzek-chord-names
   minorChordModifier = #(make-simple-markup "m")
+  additionalPitchPrefix = #"" % was "add"
   majorSevenSymbol = #whiteTriangleMarkup
   chordNameLowercaseMinor = ##f
   chordNameSeparator = #(make-hspace-markup 0.5)
index aaf9703985e233ac49b59b129557a2b937ba7025..b20d32947dd75096f363447608d33ce640916851 100644 (file)
@@ -172,7 +172,8 @@ work than classifying the pitches."
     (let* ((sep (ly:context-property context 'chordNameSeparator))
            (slashsep (ly:context-property context 'slashChordSeparator))
            (root-markup (name-root root lowercase-root?))
-           (add-markups (map (lambda (x) (glue-word-to-step "add" x))
+           (add-pitch-prefix (ly:context-property context 'additionalPitchPrefix))
+           (add-markups (map (lambda (x) (glue-word-to-step add-pitch-prefix x))
                              addition-pitches))
            (filtered-alterations (filter-alterations alteration-pitches))
            (alterations (map name-step filtered-alterations))
index ecf50fba82cc8124e0615dc705deeabc01520c98..6c79bbdb95b22091c03807a9529bbc605571b843 100644 (file)
@@ -45,6 +45,8 @@
      ;; TODO FIXME
 
      (aDueText ,markup? "Text to print at a unisono passage.")
+     (additionalPitchPrefix ,string? "Text with which to prefix
+additional pitches within a chord name.")
      (alignAboveContext ,string? "Where to insert newly created context in
 vertical alignment.")
      (alignBassFigureAccidentals ,boolean? "If true, then the accidentals