;;;
-;;; chord-name.scm -- chord name utility functions
+;;; chord-ignatzek-names.scm -- chord name utility functions
;;;
;;; source file of the GNU LilyPond music typesetter
;;;
-;;; (c) 2000--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+;;; (c) 2000--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ps)
))
- (define name-root (ly:get-context-property context 'chordRootNamer))
+ (define name-root (ly:context-property context 'chordRootNamer))
(define name-note
- (let ((nn (ly:get-context-property context 'chordNoteNamer)))
+ (let ((nn (ly:context-property context 'chordNoteNamer)))
(if (eq? nn '())
; replacing the next line with name-root gives guile-error...? -rz
;; apparently sequence of defines is equivalent to let, not let* ? -hwn
- (ly:get-context-property context 'chordRootNamer)
+ (ly:context-property context 'chordRootNamer)
;; name-root
nn)))
(define (prefix-modifier->markup mod)
(if (and (= 3 (pitch-step mod))
- (= -1 (ly:pitch-alteration mod)))
+ (= FLAT (ly:pitch-alteration mod)))
(make-simple-markup "m")
(make-simple-markup "huh")
))
(args (list num-markup))
(total (if (= (ly:pitch-alteration pitch) 0)
(if (= (pitch-step pitch) 7)
- (list (ly:get-context-property context 'majorSevenSymbol))
+ (list (ly:context-property context 'majorSevenSymbol))
args)
(cons (accidental->markup (step-alteration pitch)) args)
))
(let*
(
- (sep (ly:get-context-property context 'chordNameSeparator))
+ (sep (ly:context-property context 'chordNameSeparator))
(root-markup (name-root root))
(add-markups (map (lambda (x)
(glue-word-to-step "add" x))
alterations
suffixes
add-markups) sep))
- (base-stuff (if bass-pitch
+ (base-stuff (if (ly:pitch? bass-pitch)
(list sep (name-note bass-pitch))
'()))
)
(markup-join prefixes sep)
(make-super-markup to-be-raised-stuff))
base-stuff))
- (make-line-markup base-stuff)
+ (make-line-markup base-stuff)
))
+ (define (ignatzek-format-exception
+ root
+ exception-markup
+ bass-pitch)
+
+ (make-line-markup
+ `(
+ ,(name-root root)
+ ,exception-markup
+ .
+ ,(if (ly:pitch? bass-pitch)
+ (list (ly:context-property context 'chordNameSeparator)
+ (name-note bass-pitch))
+ '()))))
+
(let*
(
(root (car in-pitches))
(pitches (map (lambda (x) (ly:pitch-diff x root)) (cdr in-pitches)))
- (exceptions (ly:get-context-property context 'chordNameExceptions))
+ (exceptions (ly:context-property context 'chordNameExceptions))
(exception (assoc-get-default pitches exceptions #f))
(prefixes '())
(suffixes '())
(add-steps '())
(main-name #f)
- (bass-note #f)
+ (bass-note
+ (if (ly:pitch? inversion)
+ inversion
+ bass))
(alterations '())
)
-
- (if
- exception
- (make-line-markup
- (list (name-root root) exception))
+
+ (if exception
+ (ignatzek-format-exception root exception bass-note)
(begin ; no exception.
;; do minor-3rd modifier.
(if (and (get-step 3 pitches)
- (= (ly:pitch-alteration (get-step 3 pitches)) -1))
- (set! prefixes (cons (get-step 3 pitches) prefixes))
- )
+ (= (ly:pitch-alteration (get-step 3 pitches)) FLAT))
+ (set! prefixes (cons (get-step 3 pitches) prefixes)))
;; lazy bum. Should write loop.
(cond
(set! alterations (delq main-name alterations))
(set! add-steps (delq main-name add-steps))
- (if (ly:pitch? inversion)
- (set! bass-note inversion)
- )
-
- (if (ly:pitch? bass)
- (set! bass-note bass)
- )
;; chords with natural (5 7 9 11 13) or leading subsequence.
;; etc. are named by the top pitch, without any further
(set! main-name (last alterations))
(set! alterations '())
))
-
+
(ignatzek-format-chord-name root prefixes main-name alterations add-steps suffixes bass-note)
- )
- ))))
+ )))
+ ))
+