]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.3.97.jcn1
authorJan Nieuwenhuizen <janneke@gnu.org>
Sun, 22 Oct 2000 19:24:11 +0000 (21:24 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sun, 22 Oct 2000 19:24:11 +0000 (21:24 +0200)
1.3.97.jcn1
===========

* Added some interface documentation.

* Added raise and kern to markup.  This should make Chord names usable.

CHANGES
VERSION
input/test/jazz-chords.ly
input/test/markup.ly
lily/text-item.cc
scm/chord-names.scm
scm/font.scm
scm/interface.scm
scm/slur.scm

diff --git a/CHANGES b/CHANGES
index 8c6ace17ad53388e54fc7e66d401238f40991b94..27c4ba3001f116684973544c46ff85908286c300 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,11 @@
+1.3.97.jcn1
+===========
+
+* Added some interface documentation.
+
+* Added raise and kern to markup.  This should make Chord names usable.
+
+
 1.3.96.jcn10
 ============
 
diff --git a/VERSION b/VERSION
index 23c4d593267f2eff88c5bc9b311a8cea795a4fc2..cb9848fbc4596b5c0cbdf3ac76aa19e6b76874ba 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
 PATCH_LEVEL=97
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=jcn1
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 44d35bc00849ce7fc270dcd1d78432a608af2e99..8bcafc2aea2a6fbf9b6e90cc3e1579c8c9ec8c77 100644 (file)
 
         ;(((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . (super "o7"))
         ;jazz: the delta, see jazz-chords.ly
-        (((0 . 0) (2 . -1) (4 . -1) (6 . -2)) .  (super ((family . "math") "N")))
+        (((0 . 0) (2 . -1) (4 . -1) (6 . -2)) .  (super ((font-family . "math") "N")))
+        (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (rows ((raise . 1) "o") ((raise . 0.5) ((kern . -0.5) ((font-size . "-3") "/"))) "7")) ; slashed o
 
         ;(((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (super "x7"))
         ; slashed o
-        (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (rows (super "o") ((kern . -0.5) ((size . "-3") "/")) "7"))
        )
       chord::names-alist-american))
 
index ccd03f18a921bf79d8ae9d0bf69da66d2cc23bb6..9d7703fdf043929be8076db94e1de9cca661e036 100644 (file)
@@ -11,7 +11,7 @@
 
                d-\textscript #'(lines "one" "two" "three")
                e-\textscript #'(lines (bold "one") 
-                 (rows "and" "there" "is" ((family . "number") "2"))
+                 (rows "and" "there" "is" ((font-family . "number") "2"))
                  (italic "three"))
                f-\textscript #'(finger "3")
                g-\textscript #'(music (named "noteheads-2"))
@@ -20,7 +20,7 @@
                linewidth = -1.\mm;
                \translator{
                        \ScoreContext
-                       TextScript \push #'font-family = #'roman
+                       TextScript \push #'font-family = #"roman"
                        TextScript \pop #'no-spacing-rods
                        TextScript \push #'direction = #1
                }
index 2d8f9bbe22d334a348c4d7018f65c731e2989f2f..420e2b17a60474b64b04af55aaed95f0ea10541a 100644 (file)
@@ -157,19 +157,36 @@ Text_item::markup_sentence2molecule (Score_element *me, SCM markup_sentence,
   SCM markup = gh_car (markup_sentence);
   SCM sentence = gh_cdr (markup_sentence);
   SCM f = get_elt_property (me, "markup-to-properties");
-  SCM p = gh_cons (gh_call1 (f, markup), properties);
+  SCM p = gh_append2 (gh_call1 (f, markup), properties);
 
   Axis align = X_AXIS;
   SCM a = scm_assoc (ly_symbol2scm ("align"), p);
   if (gh_pair_p (a) && gh_number_p (gh_cdr (a)))
     align = (Axis)gh_scm2int (gh_cdr (a));
 
+  Real staff_space = Staff_symbol_referencer::staff_space (me);
+  Real kern = 0;
+  SCM k = scm_assoc (ly_symbol2scm ("kern"), p);
+  if (gh_pair_p (k) && gh_number_p (gh_cdr (k)))
+    kern = gh_scm2double (gh_cdr (k)) * staff_space;
+                            
+  Real raise = 0;
+  SCM r = scm_assoc (ly_symbol2scm ("raise"), p);
+  if (gh_pair_p (r) && gh_number_p (gh_cdr (r)))
+    raise = gh_scm2double (gh_cdr (r)) * staff_space;
+
+  Offset o (align == X_AXIS ? kern : 0,
+           (align == Y_AXIS ? - kern : 0) + raise);
+
   Molecule mol;
   while (gh_pair_p (sentence))
     {
       Molecule m = text2molecule (me, gh_car (sentence), p);
       if (!m.empty_b ())
-       mol.add_at_edge (align, align == X_AXIS ? RIGHT : DOWN, m, 0);
+       {
+         m.translate (o);
+         mol.add_at_edge (align, align == X_AXIS ? RIGHT : DOWN, m, 0);
+       }
       sentence = gh_cdr (sentence);
     }
   return mol;
index 99400b03ab0bab20e176c3ac605fcd3d7e032fef..a0cd520bf98b98bf0ee32428738cdbf6d06b1560 100644 (file)
@@ -87,8 +87,9 @@
         (((0 . 0) (2 . 0) (4 . 0) (6 . -1)) . ("7"))
         (((0 . 0) (2 . -1) (4 . 0) (6 . 0)) . ("m(maj7)"))
         ;jazz: the delta, see jazz-chords.ly
-        ;(((0 . 0) (2 . -1) (4 . -1) (6 . -2)) .  (super ((family . "math") "N"))
-        (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (rows (super "o") ((kern . -0.5) ((size . "-3") "/")) "7")) ; slashed o
+        ;;(((0 . 0) (2 . -1) (4 . -1) (6 . -2)) .  (super ((font-family . "math") "N"))
+        ;; slashed o
+        (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (rows ((raise . 1) "o") ((raise . 0.5) ((kern . -0.5) ((font-size . "-3") "/"))) "7")) ; slashed o
         (((0 . 0) (2 . 0) (4 . 1) (6 . -1)) . ("aug7"))
         (((0 . 0) (2 . 0) (4 . -1) (6 . 0)) . (rows "maj7" (music (named ("accidentals--1"))) "5"))
         (((0 . 0) (3 . 0) (4 . 0) (6 . -1)) . ("7sus4"))
               (list
                (append '(named)
                        (list
-                        (string-append "accidentals-" 
-                                       (number->string (caddr pitch)))))))))))
+                         (append '((font-size . "-2"))
+                                 (list
+                                  (string-append "accidentals-" 
+                                                 (number->string (caddr pitch)))))))))))))
 
 
 (define (step->text pitch)
index 1c641c854e68eced36b650a9f8d0d9868196cc51..2f9a88fb45349cb1f79f036410f84fbb44bba002 100644 (file)
              '(font-series font-shape font-family font-name font-point font-size)))))
     (font-regexp-to-font-name paper font-regexp)))
 
-(define markup-to-properties-alist
-  '(
-    (style . font-style)
-    (series . font-series)
-    (shape . font-shape)
-    (family . font-family)
-    (name . font-name)
-    (size . font-size)
-    (point . font-point)
-    (kern . kern)
-    ))
-    
 (define markup-abbrev-to-properties-alist
   (append
    '(
-     (rows . (align . 0))
-     (lines . (align . 1))
-     (roman . (font-family . "roman"))
-     (music . (font-family . "music"))
-     (bold . (font-series . "bold"))
-     (italic . (font-shape . "italic"))
-     (named . (lookup . name))
-     (text . (lookup . value))
-     ;; super needs some work
-     (super . (font-size . "-1")))
+     (rows . ((align . 0)))
+     (lines . ((align . 1)))
+     (roman . ((font-family . "roman")))
+     (music . ((font-family . "music")))
+     (bold . ((font-series . "bold")))
+     (italic . ((font-shape . "italic")))
+     (named . ((lookup . name)))
+     (super . ((raise . 1) (font-size . "-1")))
+     (sub . ((raise . -1) (font-size . "-1")))
+     (text . ((lookup . value)))
+     )
    (map (lambda (x) (cons (car x) (cons 'font-style (car x))))
        style-to-font-alist)))
   
 (define (markup-to-properties markup)
+  ;;  (display "markup: `")
+  ;;(display markup)
+  ;;(display "'\n")
   (if (pair? markup)
-      (cons (cdr (assoc (car markup) markup-to-properties-alist)) (cdr markup))
-      (cdr (assoc markup markup-abbrev-to-properties-alist))))
+      (list markup)
+      (let ((entry (assoc markup markup-abbrev-to-properties-alist)))
+       (if entry (cdr entry)
+           (list (cons markup #t))))))
        
 (define (style-to-font-name paper style)
   (let* ((entry (assoc style style-to-font-alist))
index d44e4cc729d9677216e182ae3233fa9e13fbc1c0..fa95a240680ae83dda2350550a726e09072b406d 100644 (file)
@@ -145,13 +145,15 @@ more than this (in staffspace)")
     (property-description 'de-uglify-parameters list? "list of 3 real constants. They define the valid areas for the middle control points. Used in de_uglyfy. They are a bit empirical.")
     (property-description 'details list? "alist containing contaning a few magic constants.")
     (property-description 'attachment pair? "cons of symbols, '(LEFT-TYPE . RIGHT-TYPE), where both types may be alongside-stem, stem, head or loose-end")
+    (property-description 'attachment-offset pair? "cons of offsets, '(LEFT-offset . RIGHT-offset).  This offset is added to the attachments to prevent ugly slurs.")
     (property-description 'direction dir? "up or down?")
-    (property-description 'y-free number? "? ")
-    (property-description 'control-points list? "")
-    (property-description 'extremity-rules  list? "")
-    (property-description 'extremity-offset-alist list? "")
-    (property-description 'thickness list? "")
-    (property-description 'dash number? "number representing the length of the dashes.")
+    (property-description 'beautiful number? "number that dictates when a slur should be de-uglyfied.  It correlates with the enclosed area between noteheads and slurs.  A value of 0.1 yields only undisturbed slurs, a value of 5 will tolerate quite high blown slurs.")
+    (property-description 'y-free number? "minimal vertical gap between slur and noteheads or stems")
+    (property-description 'control-points list? "[internal] control points of bezier curve")
+    (property-description 'extremity-rules  list? "an alist (procedure slur dir) -> attachment to determine the attachment (see above).  If procedure returns #t, attachment is used.  Otherwise, the next procedure is tried.")
+    (property-description 'extremity-offset-alist list? "an alist (attachment stem-dir*dir slur-dir*dir) -> offset.  The offset adds to the centre of the notehead, or stem.")
+    (property-description 'thickness list? "The thickness[stafflinethickness] of slur in the centre.")
+    (property-description 'dashed number? "[FIXME: use dash-period/dash length; see text-spanner] number representing the length of the dashes.")
     )
    )
   )
@@ -299,22 +301,6 @@ this object as a reference point.")
 
 
 
-
-(define text-spanner-interface
-  (lily-interface
-   'text-spanner-interface
-   "generic text spanner"
-   (list
-    (property-description 'dash-period  number? "")
-    (property-description 'dash-length number? "")
-    (property-description 'line-thickness number? "")
-    (property-description 'edge-height pair? "(leftheight . rightheight)")
-    (property-description 'edge-text pair? "(lefttext . righttext)")
-    (property-description 'text-style string? "") ; SYMBOL!!?
-    (property-description 'type string? "line, dashed-line or dotted-line") ; SYMBOL!!?    
-    )
-))
-
 (define hairpin-interface
   (lily-interface
    'hairpin-interface
@@ -355,10 +341,21 @@ this object as a reference point.")
 (define text-interface
   (lily-interface
    'text-interface
-   "A text"
-   (list
-    (property-description 'text string? "")
-    (property-description 'style string? "")
+   "A scheme markup text"
+   (list
+    (property-description 'text (lambda (x) (or (string? x) (list? x))) "the scheme markup text.  Either a string, or a list of which the CAR is a markup '(MARKUP text text ...).  MARKUP is either a CONS: an element property '(key . value) or a symbol: an abbreviation for a list of element properties.  These abbreviations are currently defined: rows lines roman music bold italic named super sub text, as well as all font-style's.")
+    (property-description 'font-style string? "font definition for a special purpose, one of: finger volta timesig mark script large Large dynamic")
+    (property-description 'font-series string? "partial font definition: medium, bold")
+    (property-description 'font-shape string?  "partial font definition: upright or italic")
+    (property-description 'font-family string? "partial font definition: music roman braces dynamic math ...")
+    (property-description 'font-name string? "partial font definition: base name of font file FIXME: should override other partials")
+    (property-description 'font-point string? "partial font definition: exact font size in points FIXME: should override font-size")
+    (property-description 'font-size string? "partial font definition: the relative size, 0 is style-sheet's normal size, -1 is smaller, +1 is bigger")
+    (property-description 'align number? "the alignment of the text, 0 is horizontal, 1 is vertical")
+    (property-description 'lookup symbol? "lookup method: 'value for plain text, 'name for character-name")
+    (property-description 'raise number? "height for text to be raised (a negative value lowers the text")
+    (property-description 'kern number? "amount of extra white space to add before text.  This is `relative'(?) to the current alignment.")
+    (property-description 'magnify number? "the magnification factor.  FIXME: doesn't work for feta fonts")
     )))
 
 
@@ -589,6 +586,20 @@ position 0."
     
     )))
 
+(define text-spanner-interface
+  (lily-interface
+   'text-spanner-interface
+   "generic text spanner"
+   (list
+    (property-description 'dash-period  number? "the length of one dash + white space")
+    (property-description 'dash-length number? "the length of a dash")
+    (property-description 'line-thickness number? "the thickness[stafflinethickness] of the line")
+    (property-description 'edge-height pair? "a cons that specifies the heights of the vertical egdes '(LEFT-height . RIGHT-height)")
+    (property-description 'edge-text pair? "a cons that specifies the texts to be set at the edges '(LEFT-text . RIGHT-text)")
+    (property-description 'type string? "one of: line, dashed-line or dotted-line") ; SYMBOL!!?    
+    )
+))
+
 (define tie-interface
   (lily-interface
    'tie-interface
index 2c10991f077dd4bf21e3b273a1b91ebe24b7eb9d..630dc82cc918621fa0b405502401155be166b2de 100644 (file)
@@ -77,7 +77,7 @@
 
 ;; This list defines the offsets for each type of attachment.
 ;; The format of each element is
-;; (stem-dir * dir . slur-dir * dir)
+;; (attachment stem-dir*dir slur-dir*dir)
 ;; Different attachments have different default points:
 ;;
 ;; head: Default position is centered in X, on outer side of head Y