From e07ae54400182ccb5efc0f0dda6adaeba89a61d7 Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 27 Mar 2002 00:49:06 +0000 Subject: [PATCH] lilypond-1.3.130 --- input/bugs/slur-dots.ly | 10 ++++++++++ input/tricks/german-chords.ly | 36 +++++++++++++++++++++++++++++++++++ scm/chord-name.scm | 21 ++++++++++++++------ 3 files changed, 61 insertions(+), 6 deletions(-) create mode 100644 input/bugs/slur-dots.ly create mode 100644 input/tricks/german-chords.ly diff --git a/input/bugs/slur-dots.ly b/input/bugs/slur-dots.ly new file mode 100644 index 0000000000..3985fe3246 --- /dev/null +++ b/input/bugs/slur-dots.ly @@ -0,0 +1,10 @@ +% Placement of slur uses x-extent of note-head which includes dots + +\score { + \notes\relative c'' { + c4.............()c + } + \paper { + linewidth = -1.; + } +} \ No newline at end of file diff --git a/input/tricks/german-chords.ly b/input/tricks/german-chords.ly new file mode 100644 index 0000000000..c88b747fff --- /dev/null +++ b/input/tricks/german-chords.ly @@ -0,0 +1,36 @@ +% german-chords.ly: +% german/norwegian/danish? + + +#(define (pitch->chord-name-text-banter pitch) + (if (equal? (cdr pitch) '(6 0)) + '("H") + (if (equal? (cdr pitch) '(6 -1)) '("B") + (pitch->text pitch)))) + +#(define (pitch->note-name-text-banter pitch) + (if (equal? (cdr pitch) '(6 -1)) '("b") + (cons + (string-append + (if (equal? (cadr pitch) 6) "h" + (make-string 1 (integer->char (+ (modulo (+ (cadr pitch) 2) 7) 97)))) + (case (caddr pitch) + ((-1) "eses") + ((-1) "es") + ((0) "") + ((1) "is") + ((2) "isis"))) + '()))) + + + +\score { + < + \context ChordNames \chords { b1/+b bes/+bes bis/+bis } + \notes\transpose c'' \chords { b1/+b bes/+bes bis/+bis } + > + \paper { + linewidth = -1; + } +} + \ No newline at end of file diff --git a/scm/chord-name.scm b/scm/chord-name.scm index 900532aacc..933048f83b 100644 --- a/scm/chord-name.scm +++ b/scm/chord-name.scm @@ -271,6 +271,18 @@ (string-append "accidentals-" (number->string (caddr pitch))))))))))))))) +;;; Hooks to override chord names and note names, +;;; see input/tricks/german-chords.ly + +(define (pitch->text-banter pitch) + (pitch->text pitch)) + +(define (pitch->chord-name-text-banter pitch) + (pitch->text-banter)) + +(define (pitch->note-name-text-banter pitch) + (pitch->text-banter)) + (define (step->text pitch) (string-append (number->string (+ (cadr pitch) (if (= (car pitch) 0) 1 8))) @@ -280,9 +292,6 @@ ((0) "") ((1) "+") ((2) "++")))) - -(define (pitch->text-banter pitch) - (pitch->text pitch)) (define (step->text-banter pitch) (if (= (cadr pitch) 6) @@ -407,7 +416,7 @@ (define (chord::inner-name-banter tonic user-name additions subtractions base-and-inversion) (apply append '(rows) - (pitch->text-banter tonic) + (pitch->chord-name-text-banter tonic) (if user-name user-name '()) ;; why does list->string not work, format seems only hope... (if (and (string-match "super" (format "~s" user-name)) @@ -444,9 +453,9 @@ (cdr base-and-inversion))) (cons "/" (append (if (car base-and-inversion) - (pitch->text + (pitch->note-name-text-banter (car base-and-inversion)) - (pitch->text + (pitch->note-name-text-banter (cdr base-and-inversion))) '())) '()) -- 2.39.5