bug-lilypond
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Convert-ly and default accidental style


From: Maximilian Albert
Subject: Convert-ly and default accidental style
Date: Sun, 28 Jan 2007 22:27:04 +0100
User-agent: IceDove 1.5.0.9 (X11/20061220)

Hi,

if I understand it correctly, in newer versions the style of accidentals
is supposed to be set by

  \override Accidental #'glyph-name-alist =
                       #alteration-...-glyph-name-alist

instead of

  \override Accidental #'style = ...

. At least, this is what the changes in python/convertrules.py suggest.
(BTW, what is the reason for this? The latter seems much easier and more
intuitive to me.) Currently, however, the default case is handled
incorrectly since the glyph-alist of the default accidentals is called

  standard-alteration-glyph-name-alist

instead of

  alteration-default-glyph-name-alist

, which is what the script produces. Attached is a patch which changes
all occurrences of the former to the latter. I hope this is the intended
solution.

Cheers
Max

>From a0877fcbe707a79c94789ad763c10e693a6d7611 Mon Sep 17 00:00:00 2001
From: Maximilian Albert <address@hidden>
Date: Sun, 28 Jan 2007 15:19:35 +0100
Subject: [PATCH] standardized naming of alteration alists (default case was 
handled incorrectly by python/convertrules.py)

---
 scm/chord-name.scm             |    2 +-
 scm/define-grobs.scm           |   12 ++++++------
 scm/define-markup-commands.scm |   18 +++++++++---------
 scm/output-lib.scm             |    2 +-
 4 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/scm/chord-name.scm b/scm/chord-name.scm
index 939ae7b..1625dd5 100644
--- a/scm/chord-name.scm
+++ b/scm/chord-name.scm
@@ -22,7 +22,7 @@
        0.3
        0.6)
     (make-musicglyph-markup
-     (assoc-get alteration standard-alteration-glyph-name-alist "")))))
+     (assoc-get alteration alteration-default-glyph-name-alist "")))))
   
 (define (accidental->markup alteration)
   "Return accidental markup for ALTERATION."
diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm
index b7d2513..ff6776f 100644
--- a/scm/define-grobs.scm
+++ b/scm/define-grobs.scm
@@ -20,7 +20,7 @@
     (Accidental
      . (
        (avoid-slur . inside)
-       (glyph-name-alist . ,standard-alteration-glyph-name-alist)
+       (glyph-name-alist . ,alteration-default-glyph-name-alist)
        (alteration . ,accidental-interface::calc-alteration) 
        (stencil . ,ly:accidental-interface::print)
        (Y-extent . ,ly:accidental-interface::height)
@@ -31,7 +31,7 @@
      . (
        (avoid-slur . inside)
        (parenthesized . #t)
-       (glyph-name-alist . ,standard-alteration-glyph-name-alist)
+       (glyph-name-alist . ,alteration-default-glyph-name-alist)
        (alteration . ,accidental-interface::calc-alteration) 
        (stencil . ,ly:accidental-interface::print)
        (Y-extent . ,ly:accidental-interface::height)
@@ -50,7 +50,7 @@
                        ,(ly:make-simple-closure (list 
ly:self-alignment-interface::x-aligned-on-self)))))
        (self-alignment-X . ,CENTER)
        (font-size . -2)
-       (glyph-name-alist . ,standard-alteration-glyph-name-alist)
+       (glyph-name-alist . ,alteration-default-glyph-name-alist)
        (alteration . ,accidental-interface::calc-alteration)
        (Y-offset . ,ly:side-position-interface::y-aligned-side)
        (direction . ,UP)
@@ -120,7 +120,7 @@
        (direction . ,LEFT)
        (stencil . ,ly:accidental-interface::print)
        (Y-extent . ,ly:accidental-interface::height)
-       (glyph-name-alist . ,standard-alteration-glyph-name-alist)      
+       (glyph-name-alist . ,alteration-default-glyph-name-alist)       
        (side-axis . ,X)
        (meta . ((class . Item)
                 (interfaces . (
@@ -846,7 +846,7 @@
      . (
        (stencil . ,ly:key-signature-interface::print)
        (avoid-slur . inside)
-       (glyph-name-alist . ,standard-alteration-glyph-name-alist)
+       (glyph-name-alist . ,alteration-default-glyph-name-alist)
        (space-alist . (
                        (time-signature . (extra-space . 1.15))
                        (staff-bar . (extra-space . 1.1))
@@ -1938,7 +1938,7 @@
        (side-axis . ,X)
        (stencil . ,ly:accidental-interface::print)
        (Y-extent . ,ly:accidental-interface::height)
-       (glyph-name-alist . ,standard-alteration-glyph-name-alist)
+       (glyph-name-alist . ,alteration-default-glyph-name-alist)
        (meta . ((class . Item)
                 (interfaces . (trill-pitch-accidental-interface
                                accidental-interface
diff --git a/scm/define-markup-commands.scm b/scm/define-markup-commands.scm
index 45833f0..42693e4 100644
--- a/scm/define-markup-commands.scm
+++ b/scm/define-markup-commands.scm
@@ -1029,40 +1029,40 @@ recommend font for this is bold and italic"
 (define-builtin-markup-command (doublesharp layout props) ()
   "Draw a double sharp symbol."
 
-  (interpret-markup layout props (markup #:musicglyph (assoc-get 1 
standard-alteration-glyph-name-alist ""))))
+  (interpret-markup layout props (markup #:musicglyph (assoc-get 1 
alteration-default-glyph-name-alist ""))))
 
 (define-builtin-markup-command (sesquisharp layout props) ()
   "Draw a 3/2 sharp symbol."
-  (interpret-markup layout props (markup #:musicglyph (assoc-get 3/4 
standard-alteration-glyph-name-alist ""))))
+  (interpret-markup layout props (markup #:musicglyph (assoc-get 3/4 
alteration-default-glyph-name-alist ""))))
                                         
 
 (define-builtin-markup-command (sharp layout props) ()
   "Draw a sharp symbol."
-  (interpret-markup layout props (markup #:musicglyph (assoc-get 1/2 
standard-alteration-glyph-name-alist ""))))
+  (interpret-markup layout props (markup #:musicglyph (assoc-get 1/2 
alteration-default-glyph-name-alist ""))))
 
 (define-builtin-markup-command (semisharp layout props) ()
   "Draw a semi sharp symbol."
-  (interpret-markup layout props (markup #:musicglyph (assoc-get 1/4 
standard-alteration-glyph-name-alist ""))))
+  (interpret-markup layout props (markup #:musicglyph (assoc-get 1/4 
alteration-default-glyph-name-alist ""))))
 
 (define-builtin-markup-command (natural layout props) ()
   "Draw a natural symbol."
-  (interpret-markup layout props (markup #:musicglyph (assoc-get 0 
standard-alteration-glyph-name-alist ""))))
+  (interpret-markup layout props (markup #:musicglyph (assoc-get 0 
alteration-default-glyph-name-alist ""))))
 
 (define-builtin-markup-command (semiflat layout props) ()
   "Draw a semiflat."
-  (interpret-markup layout props (markup #:musicglyph (assoc-get -1/4 
standard-alteration-glyph-name-alist ""))))
+  (interpret-markup layout props (markup #:musicglyph (assoc-get -1/4 
alteration-default-glyph-name-alist ""))))
 
 (define-builtin-markup-command (flat layout props) ()
   "Draw a flat symbol."
-  (interpret-markup layout props (markup #:musicglyph (assoc-get -1/2 
standard-alteration-glyph-name-alist ""))))
+  (interpret-markup layout props (markup #:musicglyph (assoc-get -1/2 
alteration-default-glyph-name-alist ""))))
 
 (define-builtin-markup-command (sesquiflat layout props) ()
   "Draw a 3/2 flat symbol."
-  (interpret-markup layout props (markup #:musicglyph (assoc-get -3/4 
standard-alteration-glyph-name-alist ""))))
+  (interpret-markup layout props (markup #:musicglyph (assoc-get -3/4 
alteration-default-glyph-name-alist ""))))
 
 (define-builtin-markup-command (doubleflat layout props) ()
   "Draw a double flat symbol."
-  (interpret-markup layout props (markup #:musicglyph (assoc-get -1 
standard-alteration-glyph-name-alist ""))))
+  (interpret-markup layout props (markup #:musicglyph (assoc-get -1 
alteration-default-glyph-name-alist ""))))
 
 (define-builtin-markup-command (with-color layout props color arg) (color? 
markup?)
   "Draw @var{arg} in color specified by @var{color}"
diff --git a/scm/output-lib.scm b/scm/output-lib.scm
index 3cfefc8..342085b 100644
--- a/scm/output-lib.scm
+++ b/scm/output-lib.scm
@@ -363,7 +363,7 @@ centered, X==1 is at the right, X == -1 is at the left."
 (define-public cancellation-glyph-name-alist
   '((0 . "accidentals.natural")))
 
-(define-public standard-alteration-glyph-name-alist
+(define-public alteration-default-glyph-name-alist
      '(
        ;; ordered for optimal performance.
        (0 . "accidentals.natural")
-- 
1.4.4.4


reply via email to

[Prev in Thread] Current Thread [Next in Thread]