From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Mon, 19 Feb 2001 20:23:24 +0000 (+0100)
Subject: patch::: 1.3.129.jcn1
X-Git-Tag: release/1.3.130~3
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b77784e3a832e3da683a2b0c9281d99ad88140bb;p=lilypond.git

patch::: 1.3.129.jcn1

1.3.129.jcn1
============

* More hooks for chord pitch name overrides, see
input/tricks/german-chords.ly.

1.3.129
=======
---

diff --git a/CHANGES b/CHANGES
index d8a5c2349a..93f614c23c 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,12 @@
+1.3.129.jcn1
+============
+
+* More hooks for chord pitch name overrides, see
+input/tricks/german-chords.ly.
+
+1.3.129
+=======
+
 1.3.128.jcn2
 ============
 
diff --git a/VERSION b/VERSION
index c43717a28e..b23a1bdeb1 100644
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
 PATCH_LEVEL=129
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=jcn1
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
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)))
 			'()))
 	     '())