[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Change chord name separator and inversion separator, separately
From: |
Arnout Engelen |
Subject: |
Change chord name separator and inversion separator, separately |
Date: |
Mon, 14 Mar 2011 23:19:32 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
> I'm not top posting.
Hi. This is more of a feature request: I noticed I can change the 'chord name
separator', but this also changes the symbol used to separate the chord from
its
root in case of for example "c:/g".
A naive way of allowing some more control might be:
diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly
index 0720893..f9702bb 100644
--- a/ly/engraver-init.ly
+++ b/ly/engraver-init.ly
@@ -646,6 +646,7 @@ automatically when an output definition (a @code{\score} or
majorSevenSymbol = #whiteTriangleMarkup
chordNameLowercaseMinor = ##f
chordNameSeparator = #(make-simple-markup "/")
+ chordInversionSeparator = #(make-simple-markup "/")
chordNameExceptions = #ignatzekExceptions
chordNoteNamer = #'()
chordRootNamer = #note-name->markup
diff --git a/scm/chord-ignatzek-names.scm b/scm/chord-ignatzek-names.scm
index 696d02f..38ef219 100644
--- a/scm/chord-ignatzek-names.scm
+++ b/scm/chord-ignatzek-names.scm
@@ -168,6 +168,7 @@ work than classifying the pitches."
(make-line-markup total)))
(let* ((sep (ly:context-property context 'chordNameSeparator))
+ (invSep (ly:context-property context 'chordInversionSeparator))
(root-markup (name-root root lowercase-root?))
(add-markups (map (lambda (x) (glue-word-to-step "add" x))
addition-pitches))
@@ -183,7 +184,7 @@ work than classifying the pitches."
suffixes
add-markups) sep))
(base-stuff (if (ly:pitch? bass-pitch)
- (list sep (name-note bass-pitch #f))
+ (list invSep (name-note bass-pitch #f))
'())))
(set! base-stuff
diff --git a/scm/define-context-properties.scm b/scm/define-context-
properties.scm
index 439f68a..e3accb7 100644
--- a/scm/define-context-properties.scm
+++ b/scm/define-context-properties.scm
@@ -148,6 +148,8 @@ of pitches to chord names.")
(chordNameLowercaseMinor ,boolean? "Downcase roots of minor chords?")
(chordNameSeparator ,markup? "The markup object used to
separate parts of a chord name.")
+ (chordInversionSeparator ,markup? "The markup object used to
+separate a chord name from its root note in case of inversions.")
(chordNoteNamer ,procedure? "A function that converts from a pitch
object to a text markup. Used for single pitches.")
(chordPrefixSpacer ,number? "The space added between the root
Example lilypond code:
\new ChordNames {
\chordmode {
% default behavior:
c c:7.11 c:/a c:7.11/a \break
% change the seperator for 'c:7/add11' and for 'c:/a'
independently
\set chordNameSeparator = \markup { "|" }
\set chordInversionSeparator = \markup { ":" }
c c:7.11 c:/a c:7.11/a \break
}
}
- Change chord name separator and inversion separator, separately,
Arnout Engelen <=