From b43dcc12920ad8b26b33f0e1fc52de03e8cdb842 Mon Sep 17 00:00:00 2001 From: Adam Spiers Date: Thu, 28 Jul 2011 01:03:31 -0700 Subject: [PATCH 3/5] add chordInversionSeparator Issue 1572 and issue 1503 - Allow choice of chord modifier separator independently of chord inversion separator, since conventionally the latter is always a slash (hence the term "slash chords"), whereas the former seldom involves slashes. --- ly/engraver-init.ly | 3 ++- scm/chord-ignatzek-names.scm | 3 ++- scm/define-context-properties.scm | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly index a2ba655..013f41a 100644 --- a/ly/engraver-init.ly +++ b/ly/engraver-init.ly @@ -643,7 +643,8 @@ automatically when an output definition (a @code{\score} or chordNameFunction = #ignatzek-chord-names majorSevenSymbol = #whiteTriangleMarkup chordNameLowercaseMinor = ##f - chordNameSeparator = #(make-simple-markup "/") + chordNameSeparator = #(make-hspace-markup 0.5) + 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..08eb118 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 e9acd96..9df745d 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 -- 1.7.0.4