]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 1503 - Allow choice of minor chord modifier.
authorAdam Spiers <lilypond@adamspiers.org>
Mon, 7 Nov 2011 11:48:33 +0000 (11:48 +0000)
committerAdam Spiers <lilypond@adamspiers.org>
Tue, 29 Nov 2011 11:04:44 +0000 (11:04 +0000)
For example, often it is preferred to use a hyphen
instead of "m". This can now be achieved via:

  \set minorChordModifier = \markup { "-" }

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

index 92d01477f82c9f6f7c89db7fcb380e56bec286b5..a8884d28668e472654520499830a9787f661fbfd 100644 (file)
@@ -675,13 +675,32 @@ is a set of pitches used to identify the steps present in the chord.
 The second item is a markup that will follow the @code{chordRootNamer}
 output to create the chord name.
 
+@funindex minorChordModifier
+
+@item minorChordModifier
+
+Minor chords are often denoted via a @q{m} suffix to the right of the
+root of the chord.  However some idioms prefer other suffices, such as
+a minus sign.
+
+@lilypond[verbatim,quote,ragged-right]
+\chords {
+  c4:min f:min7
+  \set minorChordModifier = \markup { "-" }
+  \break
+  c4:min f:min7
+}
+@end lilypond
+
 @funindex chordPrefixSpacer
+
 @item chordPrefixSpacer
 
-The @q{m} for minor chords is usually printed immediately to the
-right of the root of the chord.  A spacer can be placed between
-the root and @q{m} by setting @code{chordPrefixSpacer}.
-The spacer is not used when the root is altered.
+The modifier for minor chords as determined by
+@code{minorChordModifier} is usually printed immediately to the right
+of the root of the chord.  A spacer can be placed between the root and
+the modifier by setting @code{chordPrefixSpacer}.  The spacer is not
+used when the root is altered.
 
 @end table
 
diff --git a/input/regression/chord-name-minor.ly b/input/regression/chord-name-minor.ly
new file mode 100644 (file)
index 0000000..0931409
--- /dev/null
@@ -0,0 +1,13 @@
+\version "2.15.16"
+\header {
+    texidoc = "The layout of the minor chord can be tuned with
+@code{minorChordModifier}."
+}
+
+\chords {
+    c:min
+    c:min7
+    \set minorChordModifier = \markup { "-" }
+    c:min
+    c:min7
+}
index 71a191d4b446cddfe0e2e9b1010d9c91eadb7a6f..f88705e300ef438023ce4a81cbbf3585d16dd23e 100644 (file)
@@ -645,6 +645,7 @@ automatically when an output definition (a @code{\score} or
 
 %% chord names:
   chordNameFunction = #ignatzek-chord-names
+  minorChordModifier = #(make-simple-markup "m")
   majorSevenSymbol = #whiteTriangleMarkup
   chordNameLowercaseMinor = ##f
   chordNameSeparator = #(make-hspace-markup 0.5)
index 6aad8967954add5d72f9ffe7a8948b397dd94d40..aaf9703985e233ac49b59b129557a2b937ba7025 100644 (file)
@@ -130,7 +130,9 @@ work than classifying the pitches."
     (define (prefix-modifier->markup mod)
       (if (and (= 3 (pitch-step mod))
                (= FLAT (ly:pitch-alteration mod)))
-          (make-simple-markup (if lowercase-root? "" "m"))
+          (if lowercase-root?
+              empty-markup
+              (ly:context-property context 'minorChordModifier))
           (make-simple-markup "huh")))
 
     (define (filter-alterations alters)
index 32595e759eb847748ed263a745be922d4d794ee4..ecf50fba82cc8124e0615dc705deeabc01520c98 100644 (file)
@@ -375,6 +375,8 @@ page turn to be allowed.")
      (minimumRepeatLengthForPageTurn ,ly:moment? "Minimum length of a
 repeated section for a page turn to be allowed within that section.")
 
+     (minorChordModifier ,markup? "Markup displayed following the root
+for a minor chord")
 
      (noChordSymbol ,markup? "Markup to be displayed for rests in a
 ChordNames context.")