CVSROOT:        /cvsroot/lilypond
Module name:    lilypond
Branch:         
Changes by:     Han-Wen Nienhuys <[EMAIL PROTECTED]>    05/04/17 20:59:43

Modified files:
        .              : ChangeLog 
        ly             : engraver-init.ly property-init.ly 
        scm            : chord-ignatzek-names.scm chord-name.scm 
                         define-context-properties.scm 

Log message:
        Mathieu Giraud's patch

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.3447&tr2=1.3448&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ly/engraver-init.ly.diff?tr1=1.224&tr2=1.225&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ly/property-init.ly.diff?tr1=1.68&tr2=1.69&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/chord-ignatzek-names.scm.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/chord-name.scm.diff?tr1=1.70&tr2=1.71&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/define-context-properties.scm.diff?tr1=1.36&tr2=1.37&r1=text&r2=text

Patches:
Index: lilypond/ChangeLog
diff -u lilypond/ChangeLog:1.3447 lilypond/ChangeLog:1.3448
--- lilypond/ChangeLog:1.3447   Sun Apr 17 09:55:44 2005
+++ lilypond/ChangeLog  Sun Apr 17 20:59:42 2005
@@ -1,3 +1,16 @@
+2005-04-17  Mathieu Giraud  <[EMAIL PROTECTED]>
+
+       * scm/chord-name.scm : support for italian and french
+       chords names.
+
+       * scm/chord-ignatzek-names.scm (ignatzek-chord-names): add
+       a space defined by chordPrefixSpacer when the root name is
+       direclty followed by a prefix.
+
+       * ly/engraver-init.ly : chordPrefixSpacer       
+       * scm/define-context-properties.scm : chordPrefixSpacer
+       * ly/property-init.ly : italianChords, frenchChords 
+
 2005-04-17  Jan Nieuwenhuizen  <[EMAIL PROTECTED]>
 
        * SConstruct: Require pkg-config.
Index: lilypond/ly/engraver-init.ly
diff -u lilypond/ly/engraver-init.ly:1.224 lilypond/ly/engraver-init.ly:1.225
--- lilypond/ly/engraver-init.ly:1.224  Sat Apr  9 14:31:55 2005
+++ lilypond/ly/engraver-init.ly        Sun Apr 17 20:59:43 2005
@@ -513,6 +513,7 @@
   chordNameExceptions = #ignatzekExceptions
   chordNoteNamer = #'()
   chordRootNamer = #note-name->markup
+  chordPrefixSpacer = #0
   chordNameExceptionsFull = #fullJazzExceptions
   chordNameExceptionsPartial = #partialJazzExceptions
   
Index: lilypond/ly/property-init.ly
diff -u lilypond/ly/property-init.ly:1.68 lilypond/ly/property-init.ly:1.69
--- lilypond/ly/property-init.ly:1.68   Mon Feb 14 23:01:41 2005
+++ lilypond/ly/property-init.ly        Sun Apr 17 20:59:43 2005
@@ -176,7 +176,15 @@
     \set chordNoteNamer = #note-name->german-markup
 }
 
+frenchChords = {
+    \set chordRootNamer = #(chord-name->italian-markup #t)
+    \set chordPrefixSpacer = #0.4
+}
 
+italianChords = {
+    \set chordRootNamer = #(chord-name->italian-markup #f)
+    \set chordPrefixSpacer = #0.4
+}
 
 improvisationOn =  {
     \set squashedPosition = #0
Index: lilypond/scm/chord-ignatzek-names.scm
diff -u lilypond/scm/chord-ignatzek-names.scm:1.13 
lilypond/scm/chord-ignatzek-names.scm:1.14
--- lilypond/scm/chord-ignatzek-names.scm:1.13  Fri Feb  4 13:48:10 2005
+++ lilypond/scm/chord-ignatzek-names.scm       Sun Apr 17 20:59:43 2005
@@ -177,7 +177,10 @@
       (set! base-stuff
            (append
             (list root-markup
-                  (markup-join prefixes sep)
+                  (conditional-kern-before (markup-join prefixes sep)
+                                           (and (not (null? prefixes))
+                                                (= (ly:pitch-alteration root) 
NATURAL))
+                                           (ly:context-property context 
'chordPrefixSpacer))
                   (make-super-markup to-be-raised-stuff))
             base-stuff))
       (make-line-markup base-stuff)))
Index: lilypond/scm/chord-name.scm
diff -u lilypond/scm/chord-name.scm:1.70 lilypond/scm/chord-name.scm:1.71
--- lilypond/scm/chord-name.scm:1.70    Sun Feb 13 13:39:02 2005
+++ lilypond/scm/chord-name.scm Sun Apr 17 20:59:43 2005
@@ -31,6 +31,17 @@
        (alteration->text-accidental-markup alteration)
        (= alteration FLAT) 0.2)))
 
+(define (accidental->markup-italian alteration)
+  "Return accidental markup for ALTERATION, for use after an italian chord 
root name."
+  (if (= alteration 0)
+      (make-hspace-markup 0.2)
+      (make-line-markup
+       (list
+        (make-hspace-markup (if (= alteration FLAT) 0.7 0.5))
+       (make-raise-markup 0.7 (alteration->text-accidental-markup alteration))
+       (make-hspace-markup (if (= alteration SHARP) 0.2 0.1))
+       ))))
+
 (define-public (note-name->markup pitch)
   "Return pitch markup for PITCH."
   (make-line-markup
@@ -70,6 +81,23 @@
           (list-ref '( "ses" "s" "" "is" "isis") (+ 2 (/ (cdr n-a) 2)))
           (list-ref '("eses" "es" "" "is" "isis") (+ 2 (/ (cdr n-a) 2)))))))))
 
+(define-public ((chord-name->italian-markup re-with-eacute) pitch)
+  "Return pitch markup for PITCH, using italian/french note names.
+   If re-with-eacute is set to #t, french 'ré' is returned for D instead of 
're'
+"
+  (let* ((name (ly:pitch-notename pitch))
+         (alt (ly:pitch-alteration pitch)))
+    (make-line-markup
+     (list
+      (make-simple-markup
+       (vector-ref
+        (if re-with-eacute
+            #("Do" "Ré" "Mi" "Fa" "Sol" "La" "Si")
+            #("Do" "Re" "Mi" "Fa" "Sol" "La" "Si"))
+        name))
+      (accidental->markup-italian alt)
+      ))))
+
 ;; fixme we should standardize on omit-root (or the other one.)
 ;; perhaps the default should also be reversed --hwn
 (define-safe-public (sequential-music-to-chord-exceptions seq . rest)
Index: lilypond/scm/define-context-properties.scm
diff -u lilypond/scm/define-context-properties.scm:1.36 
lilypond/scm/define-context-properties.scm:1.37
--- lilypond/scm/define-context-properties.scm:1.36     Thu Apr 14 06:36:43 2005
+++ lilypond/scm/define-context-properties.scm  Sun Apr 17 20:59:43 2005
@@ -132,6 +132,9 @@
      (chordNameSeparator ,markup?
                         "The markup object used to separate
  parts of a chord name.")
+     (chordPrefixSpacer ,number?
+                       "The space added between the root symbol and the prefix
+ of a chord name")
      (chordChanges ,boolean? "Only show changes in chords scheme?")
      (clefGlyph ,string? "Name of the symbol within the music font.")
      (clefOctavation ,integer? "Add


_______________________________________________
Lilypond-cvs mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/lilypond-cvs

Reply via email to