From 4a4efa4b83206fc2048a271be6a93f27a15645bb Mon Sep 17 00:00:00 2001 From: Rune Zedeler Date: Thu, 5 Apr 2001 22:28:10 +0200 Subject: [PATCH] patch::: 1.3.146.rz1 --- VERSION | 2 +- input/test/Cc-chords.ly | 4 +++- input/test/test-german-chords.ly | 4 ++-- ly/german-chords.ly | 33 ++++++++++++++++---------------- scm/chord-name.scm | 20 +++++++------------ scm/drums.scm | 2 +- 6 files changed, 31 insertions(+), 34 deletions(-) diff --git a/VERSION b/VERSION index a4558c5f8a..3e0146b254 100644 --- a/VERSION +++ b/VERSION @@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 PATCH_LEVEL=146 -MY_PATCH_LEVEL=jcn1 +MY_PATCH_LEVEL=rz1 # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/input/test/Cc-chords.ly b/input/test/Cc-chords.ly index b92cb37198..b9a3d9dd3c 100644 --- a/input/test/Cc-chords.ly +++ b/input/test/Cc-chords.ly @@ -1,7 +1,9 @@ \header { - texidoc="Jazz chord names, but with lower case names for minor chords"; + texidoc="Jazz chord names, but with lower case names for minor chords" } +\version "1.3.146" + #(assoc-set! chord::names-alist-jazz '((0 . 0) (2 . -1)) '("")) diff --git a/input/test/test-german-chords.ly b/input/test/test-german-chords.ly index 3e574ee957..240b6641c9 100644 --- a/input/test/test-german-chords.ly +++ b/input/test/test-german-chords.ly @@ -3,12 +3,12 @@ % #(set! german-Bb #t) -ch = \chords { beses1/+beses bes/+bes b/+b bis/+bis ases/+ases as/+as a/+a ais/+ais fisis/+fisis} +ch = \chords { beses1/+beses bes/+bes b/+b bis/+bis ases/+ases as/+as a/+a ais/+ais fisis/+fisis } \score { < \context ChordNames=chn {\ch} - \context Staff=stf \chords {\ch} + \context Staff=stf {\clef "G_8" \ch } > \paper {} } diff --git a/ly/german-chords.ly b/ly/german-chords.ly index 856340d12e..eb0e026d6d 100644 --- a/ly/german-chords.ly +++ b/ly/german-chords.ly @@ -9,32 +9,33 @@ #(define german-Bb #f) -#(define (pitch->chord-name-text-banter pitch) - (if (equal? (cdr pitch) '(6 -1)) - (if german-Bb - (cons "B" (accidental->text -1)) - '("B") - ) +#(define (pitch->chord-name-text-banter pitch steps) + (let ((dopitch (if (member (cdr pitch) '((6 -1) (6 -2))) + (list 7 (+ (if german-Bb 0 1) (caddr pitch))) + (cdr pitch) + ))) (cons - (list-ref '("C" "D" "E" "F" "G" "A" "H") (cadr pitch)) - (accidental->text (caddr pitch)) + (list-ref '("C" "D" "E" "F" "G" "A" "H" "B") (car dopitch)) + (accidental->text-super (cadr dopitch)) ) ) ) #(define (pitch->note-name-text-banter pitch) - (if (equal? (cdr pitch) '(6 -1)) - '("b") - (cons + (let ((dopitch (if (member (cdr pitch) '((6 -1) (6 -2))) + (list 7 (+ 1 (caddr pitch))) + (cdr pitch) + ))) + (list (string-append - (list-ref '("c" "d" "e" "f" "g" "a" "h") (cadr pitch)) - (if (or (equal? (cadr pitch) 2) (equal? (cadr pitch) 5)) - (list-ref '( "ses" "s" "" "is" "isis") (+ 2 (caddr pitch))) - (list-ref '("eses" "es" "" "is" "isis") (+ 2 (caddr pitch))) + (list-ref '("c" "d" "e" "f" "g" "a" "h" "b") (car dopitch)) + (if (or (equal? (car dopitch) 2) (equal? (car dopitch) 5)) + (list-ref '( "ses" "s" "" "is" "isis") (+ 2 (cadr dopitch))) + (list-ref '("eses" "es" "" "is" "isis") (+ 2 (cadr dopitch))) ) ) - '() ) ) ) + diff --git a/scm/chord-name.scm b/scm/chord-name.scm index 87a5d543e8..01a3a1eb1e 100644 --- a/scm/chord-name.scm +++ b/scm/chord-name.scm @@ -60,21 +60,15 @@ ;;;;;;;;;; -(define (accidental->text acc) +(define (accidental->textp acc pos) (if (= acc 0) '() - (list '(music (font-relative-size . -2)) - (string-append "accidentals-" (number->string acc))))) + (list (list '(music (font-relative-size . -2)) + `(,pos ,(string-append "accidentals-" (number->string acc))))))) -(define (accidental->text-super acc) - (if (= acc 0) - '() - (cons 'super (list (accidental->text acc))))) - -(define (accidental->text-sub acc) - (if (= acc 0) - '() - (cons sub (list accidental->text acc)))) +(define (accidental->text acc) (accidental->textp acc 'rows)) +(define (accidental->text-super acc) (accidental->textp acc 'super)) +(define (accidental->text-sub acc) (accidental->textp acc 'sub)) (define (pitch->note-name pitch) @@ -87,7 +81,7 @@ ;;; Hooks to override chord names and note names, -;;; see input/tricks/german-chords.ly +;;; see ly/german-chords.ly (define (pitch->text-banter pitch) (pitch->text pitch)) diff --git a/scm/drums.scm b/scm/drums.scm index 187844cd5d..c6de3d7132 100644 --- a/scm/drums.scm +++ b/scm/drums.scm @@ -1,4 +1,4 @@ -;;;; drum-"hack". See input/tricks/drums.ly and ly/drumpitch.ly +;;;; drum-"hack". See input/test/drums.ly and ly/drumpitch.ly ;;;; 2001/03/25 Rune Zedeler ;;;; changed eval to ly-eval for guile 1.4/1.4.1 compatibility --jcn -- 2.39.2