]> git.donarmstrong.com Git - lilypond.git/commitdiff
* input/mozart-hrn-3.ly: Mimic Breitkopf fonts and padding.
authorJan Nieuwenhuizen <janneke@gnu.org>
Mon, 1 Apr 2002 16:31:15 +0000 (16:31 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Mon, 1 Apr 2002 16:31:15 +0000 (16:31 +0000)
* scm/grob-property-description.scm (number-threshold): Add
description.

* lily/multi-measure-rest.cc (brew_molecule): Only put number over
rest if #measures > number-threshold.  Use padding (well, fake
using it, anyway).

* scm/font.scm (make-style-sheet): New styles: mark-number,
mark-letter.
(paper20-style-sheet-alist): Add bigger bold fonts.

* lily/mark-engraver.cc (process_music): Use style mark-number or
mark-letter.

.cvsignore
ChangeLog
input/mozart-hrn-3.ly
input/mozart-hrn3-allegro.ly
lily/beam.cc
lily/mark-engraver.cc
lily/multi-measure-rest.cc
scm/font.scm
scm/grob-description.scm
scm/grob-property-description.scm

index 4345ae36306149deb5c6e7e265d634d531d884d5..773081c5e178fb7159f78f1c73c4660b19200021 100644 (file)
@@ -25,6 +25,7 @@ configure
 *.tex
 *.txt
 *[0-9]pk
+ly2dvi.dir
 out
 out-www
 afm
index 056ee9a85fa69faafd46a22ff3e2df48c157b458..b455b24401d39baa681b2e14d1b7eb229e6404a0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
        
 2002-04-01  Jan Nieuwenhuizen  <janneke@gnu.org>
 
+       * input/mozart-hrn-3.ly: Mimic Breitkopf fonts and padding.
+
+       * scm/grob-property-description.scm (number-threshold): Add
+       description.
+
+       * lily/multi-measure-rest.cc (brew_molecule): Only put number over
+       rest if #measures > number-threshold.  Use padding (well, fake
+       using it, anyway).
+
+       * scm/font.scm (make-style-sheet): New styles: mark-number,
+       mark-letter.
+       (paper20-style-sheet-alist): Add bigger bold fonts.
+
+       * lily/mark-engraver.cc (process_music): Use style mark-number or
+       mark-letter.
+
        * .cvsignore: Ignore all kinds of lilypond input and output.
 
        * lily/beam.cc (ADD_INTERFACE): Add concaveness-gap.
index 6543c0813d3d73c4737cd17653d1d6da948fb6b3..2e06c75424a8d6e0d9ac9670f94e68a0b1c7e032 100644 (file)
@@ -38,18 +38,45 @@ ritenuto = \textscript #'(italic  "rit.")
 
 \version "1.5.47"
 
+#(define italic-bf '((font-shape . italic) (font-series . bold)))
+
+%% burp
+%% the very idea of a style sheet, is that it's easy to override
+#(define (set-style! sheet name style)
+  (set-cdr! (assoc 'mark-letter (cdr (assoc 'style-alist sheet))) style))
+
+#(define my-sheet (make-style-sheet 'paper20))
+#(set-style! my-sheet 'mark-letter '((font-family . roman)
+                                    (font-series . bold)
+                                    (font-shape . upright)
+                                    (font-relative-size . 3)))
+  
+cresc = \notes {
+    \commandspanrequest \start "crescendo" 
+    \property Voice.crescendoText = #`(,italic-bf "cresc.")
+    \property Voice.crescendoSpanner = #'dashed-line
+}
+
 \paper{
- \translator { \ScoreContext
+    \stylesheet #my-sheet
+    \translator {
+       \ScoreContext
        skipBars = ##t
        midiInstrument = #"french horn"
-       RehearsalMark \override #'font-series = #'bold
+       %% try to mimic Breitkopf
+       RehearsalMark \override #'padding = #1
+       MultiMeasureRest \override #'padding = #0.5
+       MultiMeasureRest \override #'number-threshold = #1
        Stem \override #'thickness = #1.3
-  }
- \translator { \StaffContext
-              MinimumVerticalExtent = #'(-4.5 . 4.5)
-              }
-  indent = 10. \mm
-  linewidth = 189. \mm
+       Beam \override #'thickness = #0.6
+       Beam \override #'beam-space = #0.8
+    }
+    \translator {
+       \StaffContext
+       MinimumVerticalExtent = #'(-4.5 . 4.5)
+    }
+    indent = 10. \mm
+    linewidth = 189. \mm
 }
 
 \include "mozart-hrn3-allegro.ly"
index 2d7c95dc28413d3347a3d468e382c3a55a438bf2..1569568c01a78a09f349b804980d767cb254111c 100644 (file)
@@ -41,7 +41,7 @@ allegro =
        [ )fis8( e16 )d] d4-. r2 | 
        \mark "B"
        R1*3
-       r2 r4 [d8(_#'(italic "con espressione") )b ]
+       r2 r4 [d8(_#`(,italic-bf "con espressione") )b ]
        [a( )g d'( )b] [a( )g e'( )c ]
        [b8( )a] a4 r4 [a8-. a-.]
        [a( \< b c \!cis\> ]  d4 \! )c
@@ -120,7 +120,7 @@ allegro =
        [dis()e] r e-. [e()f] r f-. |
        g4-.-\f e-. c-. bes-. |
        g-.\ff e-. c-. r |
-       a'2 ~ [a8_#'((font-shape . italic) "sempre " (dynamic "f")) b16 c] [d( e d )e]%TODO
+       a'2 ~ [a8_#`(,italic-bf "sempre " (dynamic "f")) b16 c] [d( e d )e]%TODO
 
        f4. () d8 [f8 ()d f d]
        [c (e] )g2 \grace  { \longgrace f16(  \endlonggrace }  [)e8( d16 )c]
index a5453ac1aa447d102bf14bfa1acba9ab0720652b..f5ce479bbde423b21b88b91100cbb8bcba24e67c 100644 (file)
@@ -74,12 +74,21 @@ Beam::add_stem (Grob *me, Grob *s)
 Real
 Beam::get_interbeam (Grob *me)
 {
-  Real slt = me->paper_l ()->get_var ("linethickness");
+  int multiplicity = get_multiplicity (me);
   Real ss = Staff_symbol_referencer::staff_space (me);
-  Real thickness = gh_scm2double (me->get_grob_property ("thickness"))
-    * ss;
+  
+  SCM s = me->get_grob_property ("beam-space");
+  if (gh_number_p (s))
+    return gh_scm2double (s) * ss;
+  else if (gh_list_p (s))
+    return gh_scm2double (scm_list_ref (s,
+                                       gh_int2scm (multiplicity - 1
+                                                   <? scm_ilength (s) - 1)))
+      * ss;
+  
+  Real slt = me->paper_l ()->get_var ("linethickness");
+  Real thickness = gh_scm2double (me->get_grob_property ("thickness")) * ss;
 
-  int multiplicity = get_multiplicity (me);
   Real interbeam = multiplicity < 4
     ? (2*ss + slt - thickness) / 2.0
     : (3*ss + slt - thickness) / 3.0;
@@ -1382,5 +1391,5 @@ the ideal slope, how close the result is to the ideal stems, etc.). We
 take the best scoring combination.
 
 ",
-  "concaveness-gap concaveness-threshold dir-function quant-score auto-knee-gap gap chord-tremolo beamed-stem-shorten shorten least-squares-dy direction damping flag-width-function neutral-direction positions thickness");
+  "beam-space concaveness-gap concaveness-threshold dir-function quant-score auto-knee-gap gap chord-tremolo beamed-stem-shorten shorten least-squares-dy direction damping flag-width-function neutral-direction positions thickness");
 
index 4130dcbfd996bced7a949465434de500777d39f7..a3123f1168b796b6db8f6e734cc476c7238f8f8b 100644 (file)
@@ -174,12 +174,12 @@ Mark_engraver::process_music ()
          text_p_->set_grob_property ("text",
                                      ly_str02scm (t.ch_C ()));
 
-         String style = "mark";
+         String style = "mark-number";
          for (int i=0; i < t.length_i (); i++)
            {
              if (!isdigit (t[i])) 
                {
-                 style = "large";
+                 style = "mark-letter";
                  break;
                }
            }
index 0d0c3d6d2ee4d181900a2bc5416e9b661f838266..2659274f816605161cfbf9b9af7e0d7164971542 100644 (file)
@@ -117,15 +117,16 @@ Multi_measure_rest::brew_molecule (SCM smob)
       measures = gh_scm2int (m);
     }
 
-  if (measures > 1)
+  SCM s = me->get_grob_property ("number-threshold");
+  if (measures > gh_scm2int (s))
     {
       Molecule s = Text_item::text2molecule (me,
                                             ly_str02scm (to_str (measures).ch_C ()),
                                             alist_chain);
 
-      
       s.align_to (X_AXIS, CENTER);
-      s.translate_axis (3.0, Y_AXIS);
+      s.translate_axis (gh_scm2double (me->get_grob_property ("padding")) + 2,
+                       Y_AXIS);
 
       s.translate_axis (mol.extent (X_AXIS).center (),  X_AXIS);
       mol.add_molecule (s);
@@ -338,4 +339,4 @@ numbers, fields from font-interface may be used.
 
 
 ",
-  "thickness measure-count expand-limit");
+  "expand-limit measure-count number-threshold padding thickness");
index 93fd56addf7ede80a791d610d5524383aa77e35e..1adcf54c14bdd0776f29f578e4cd93b8cc994395 100644 (file)
@@ -90,7 +90,9 @@
     ((-2 medium italic roman 7) . "cmti7")
     ((-3 medium italic roman 7) . "cmti7")    
 
-    ((2 bold upright roman 12) . "cmbx12")
+    ((4 bold upright roman 17) . "cmbx17")
+    ((3 bold upright roman 17) . "cmbx17")
+    ((2 bold upright roman 14) . "cmbx14")
     ((1 bold upright roman 12) . "cmbx12")
     ((0 bold upright roman 10) . "cmbx10")
     ((-1 bold upright roman 8) . "cmbx8")
        (mmrest . ((font-family . number) ))
        (mmrest-symbol . ((font-family . music) ))
 
-       (mark . ((font-family . number) (font-relative-size . 1)))
+       (mark-number . ((font-family . number) (font-relative-size . 1)))
+       (mark-letter . ((font-family . roman)
+                       (font-series . bold)
+                       (font-shape . upright)
+                       (font-relative-size . 2)))
+       
        (script . ((font-family . roman) (font-relative-size . -1)))
        (large . ((font-family . roman) (font-relative-size . 1)))
        (Large . ((font-series . bold) (font-family . roman)
index f319e97de8d1efdfb913fbf308cc761c684d7cb5..d48295cd4e178eedf667d3b57dac51f3b9069632 100644 (file)
 
        (direction . 1)
        (breakable . #t)
-       (font-family . roman)
-       (font-shape . upright)
-       (font-relative-size . 1)
        (visibility-lambda . ,end-of-line-invisible)
        (padding . 0.8)
        (meta . ((interfaces . (text-interface font-interface mark-interface side-position-interface))))
        (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
        (staff-position . 0)
        (expand-limit . 10)
+       (number-threshold . 0)
+       (padding . 1)
        (thickness . 6.6)
        (font-family . number)
+       (padding . 1)
        (meta . ((interfaces . (multi-measure-rest-interface rest-interface font-interface staff-symbol-referencer-interface))))
        ))
 
index 3d64f306ffb8ff575504b730efe9fd40e7ae1574..7e6fca5c6151038ae94c4532025171dede34d07e 100644 (file)
@@ -68,6 +68,7 @@ In the case of alignment grobs, this should contain only one number.")
 (grob-property-description 'bass list? " musical-pitch, optional.")
 (grob-property-description 'beam ly-grob? "pointer to the beam, if applicable.")
 (grob-property-description 'beam-thickness number? "thickness, measured in staffspace.")
+(grob-property-description 'beam-space (or number? list?) "the vertical distance between two beams, indexed by multiplicity")
 (grob-property-description 'beam-width number? "width of the tremolo sign.")
 (grob-property-description 'beamed-lengths list? "list of stem lengths given beam multiplicity .")
 (grob-property-description 'beamed-minimum-lengths list? "list of minimum stem lengths given beam multiplicity.")
@@ -256,6 +257,8 @@ FIXME: also pair? (cons LEFT RIGHT)
 (grob-property-description 'non-default boolean? "not set because of existence of a bar?.")
 (grob-property-description 'note-width number? "unit for horizontal translation, measured in staff-space.")
 (grob-property-description 'note-heads list? "List of note head grobs")
+(grob-property-description 'number-gap number? "size of the gap for tohe number in a tuplet.")
+(grob-property-description 'number-threshold number? "only put numbers bigger than this threshold over multi measuer rest.")
 (grob-property-description 'old-accidentals list? "list of (pitch, accidental) pairs.")
 (grob-property-description 'padding number? "add this much extra space between objects that are next to each other.")
 (grob-property-description 'paren-cautionaries boolean? "Whether to add parenthesis around cautionary accidentals.")