]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.33
authorfred <fred>
Tue, 26 Mar 2002 22:46:57 +0000 (22:46 +0000)
committerfred <fred>
Tue, 26 Mar 2002 22:46:57 +0000 (22:46 +0000)
14 files changed:
input/test/coriolan-margin.ly [new file with mode: 0644]
input/test/staff-bracket.ly [new file with mode: 0644]
lily/lookup.cc
lily/staff-margin-engraver.cc
ly/params.ly
mutopia/Coriolan/clarinetti.ly
mutopia/Coriolan/coriolan.ly
mutopia/Coriolan/corni.ly
mutopia/Coriolan/timpani.ly
mutopia/Coriolan/trombe.ly
mutopia/Coriolan/violoncello.ly
ps/lily.ps
scm/generic-property.scm
scm/lily.scm

diff --git a/input/test/coriolan-margin.ly b/input/test/coriolan-margin.ly
new file mode 100644 (file)
index 0000000..842b45b
--- /dev/null
@@ -0,0 +1,144 @@
+
+\header{
+%% URG
+Clarinetti ="\\vbox to0pt{\vss\\hbox to0pt{\\hss2 Clarinetti\\hss}\\hbox to0pt{\\hss (B\\textflat)\\hss}\vss}";
+Cl ="\\vbox to0pt{\vss\\hbox to0pt{\\hss Cl.\\hss}\\hbox to0pt{\\hss (B\\textflat)\\hss}\vss}";
+Corni ="\\vbox to0pt{\vss\\hbox to0pt{\\hss2 Corni\\hss}\\hbox to0pt{\\hss (E\\textflat)\\hss}\vss}";
+Cor ="\\vbox to0pt{\vss\\hbox to0pt{\\hss Cor.\\hss}\\hbox to0pt{\\hss (E\\textflat)\\hss}\vss}";
+Trombe ="\\vbox to0pt{\vss\\hbox to0pt{\\hss2 Trombe\\hss}\\hbox to0pt{\\hss (C)\\hss}\vss}";
+Tbe ="\\vbox to0pt{\vss\\hbox to0pt{\\hss Tbe.\\hss}\\hbox to0pt{\\hss (C)\\hss}\vss}";
+Timpani ="\\vbox to0pt{\vss\\hbox to0pt{\\hss Timpani\\hss}\\hbox to0pt{\\hss (C-G)\\hss}\vss}";
+VioloncelloContrabasso ="\\hss\\vbox to0pt{\vss\\hbox to0pt{\\hss Violoncello\\hss}\\hbox to0pt{\\hss e\\hss}\\hbox to0pt{\\hss Contrabasso\\hss}\vss}";
+VcCb ="\\hss\\vbox to0pt{\vss\\hbox to0pt{\\hss Vc.\\hss}\\hbox to0pt{\\hss Cb.\\hss}\vss}";
+}
+
+flauti = \notes \relative c' {
+  \property Staff.instrument   = #"2 Flauti"
+  \property Staff.instr                = #"Fl."
+  c1 \break c
+  \bar"|.";
+}
+
+oboi = \notes \relative c' {
+  \property Staff.instrument   = #"2 Oboi"
+  \property Staff.instr                = #"Ob."
+  c1 c
+}
+
+clarinetti = \notes \relative c' {
+  %%\property Staff.instrument = #"\\mudelaClarinetti         "
+  %%\property Staff.instr      = #"\\mudelaCl    "
+
+  \property Staff.instrument   = #"2 Clarinetti\n(B\\textflat)"
+  \property Staff.instr                = #"Cl.\n(B\\textflat)"
+
+  c1 c
+}
+
+fagotti = \notes \relative c' {
+  \property Staff.instrument   = #"2 Fagotti"
+  \property Staff.instr                = #"Fg."
+  c1 c
+}
+
+corni = \notes \relative c' {
+  %%\property Staff.instrument = #"\\mudelaCorni      "
+  %%\property Staff.instr      = #"\\mudelaCor    "
+
+  \property Staff.instrument   = #"2 Corni\n(E\\textflat)"
+  \property Staff.instr                = #"Cor.\n(E\\textflat)"
+
+  c1 c
+}
+
+trombe = \notes \relative c' {
+  %%\property Staff.instrument = #"\\mudelaTrombe        "
+  %%\property Staff.instr      = #"\\mudelaTbe    "
+
+  \property Staff.instrument   = #"2 Trombe\n(C)"
+  \property Staff.instr                = #"Tbe.\n(C)"
+
+  c1 c
+}
+
+timpani = \notes \relative c' {
+  %%\property Staff.instrument = #"\\mudelaTimpani         "
+  %%\property Staff.instr      = #"Timp."
+
+  \property Staff.instrument   = #"Timpani\n(C-G)"
+  \property Staff.instr                = #"Timp."
+
+  c1 c
+}
+
+violino1 = \notes \relative c' {
+  \property Staff.instrument   = #"Violino I"
+  \property Staff.instr                = #"Vl. I"
+  c1 c
+}
+
+violino2 = \notes \relative c' {
+  \property Staff.instrument   = #"Violino II"
+  \property Staff.instr                = #"Vl. II"
+  c1 c
+}
+
+viola = \notes \relative c' {
+  \property Staff.instrument   = #"Viola"
+  \property Staff.instr                = #"Vla."
+  c1 c
+}
+
+violoncello = \notes \relative c' {
+  %%\property Staff.instrument = #"\\mudelaVioloncelloContrabasso         "
+  %%\property Staff.instr      = #"\\mudelaVcCb    "
+
+  \property Staff.instrument   = #"Violoncello\ne\nContrabasso"
+  \property Staff.instr                = #"Vc.\nCb."
+  c1 c
+}
+
+\score {
+  < 
+    \context StaffGroup ="legni" < 
+      \context Staff ="flauti" \flauti
+      \context Staff ="oboi" \oboi
+      \context Staff ="clarinetti" \clarinetti 
+      \context Staff ="fagotti" \fagotti 
+    >
+    \context StaffGroup ="ottoni" <
+      \context Staff ="corni" \corni
+      \context Staff ="trombe" \trombe
+    >
+    \context StaffGroup ="timpani" <
+      \context Staff ="timpani" \timpani
+    >
+    \context StaffGroup ="archi" <
+      \context GrandStaff ="violini" <
+        \context Staff ="violino1" \violino1
+        \context Staff ="violino2" \violino2
+      >
+      \context Staff ="viola" \viola
+      \context Staff ="violoncello" \violoncello
+    >
+  >
+ \header{
+               title = "Coriolan";
+               subtitle = "Ouverture"; 
+               opus = "Opus 62";
+               composer = "Ludwig van Beethoven (1770-1827)";
+               enteredby = "JCN";
+               copyright = "public domain";
+       }
+
+  \paper {
+       indent=100.0\mm;
+       linewidth=150.0\mm;
+    \translator {
+      \StaffContext
+      \consists Staff_margin_engraver;
+      staffMarginHorizontalPadding = #-12
+    }
+  }
+}
+
diff --git a/input/test/staff-bracket.ly b/input/test/staff-bracket.ly
new file mode 100644 (file)
index 0000000..b3d5b58
--- /dev/null
@@ -0,0 +1,21 @@
+\score
+{
+  \context StaffGroup = a < 
+    \context PianoStaff = b <
+      \context Staff = "c" \notes\relative c'' { b1 }
+      \context Staff = "d" \notes\relative c'' { b1 }
+    >
+  >
+
+  \paper {
+       indent=100.0\mm;
+       linewidth=150.0\mm;
+    \translator
+    {
+      \StaffContext
+      \consists Staff_margin_engraver;
+       numberOfStaffLines  = #1
+      
+    }
+  }
+}
index 88bd9a753b68e612b91a7719ce21bdebd693e201..0f422458eea29ee76480df753352c08e08e63fa6 100644 (file)
 */
 #include <math.h>
 #include <ctype.h>
+
 #include "lookup.hh"
 #include "debug.hh"
 #include "dimensions.hh"
-
 #include "bezier.hh"
 #include "paper-def.hh"
 #include "string-convert.hh"
@@ -75,98 +75,8 @@ Lookup::afm_find (String s, bool warn) const
   return Molecule ( afm_bbox_to_box (cm->charBBox), at);
 }
 
-Molecule
-Lookup::simple_bar (String type, Real h, Paper_def* paper_l) const
-{
-  SCM thick = ly_symbol2scm (("barthick_" + type).ch_C());
-  Real w = 0.0;
-  
-  if (paper_l->scope_p_->elem_b (thick))
-    {
-      w = paper_l->get_realvar (thick);
-    }
-  else
-    {
-      programming_error ("No bar thickness set ! ");
-      w = 1 PT;
-    }
-  return filledbox (Box (Interval(0,w), Interval(-h/2, h/2)));
-}
-
-  
-Molecule
-Lookup::bar (String str, Real h, Paper_def *paper_l) const
-{
-  if (str == "bracket")
-    return staff_bracket (h, paper_l);
-  else if (str == "brace")
-    {
-      Real staffht  = paper_l->get_var ("staffheight");
-      return staff_brace (h,staffht);
-    }
-  Real kern = paper_l->get_var ("bar_kern");
-  Real thinkern = paper_l->get_var ("bar_thinkern");
-
-  Molecule thin = simple_bar ("thin", h, paper_l);
-  Molecule thick = simple_bar ("thick", h, paper_l);
-  Molecule colon = afm_find ("dots-repeatcolon", paper_l);  
-
-  Molecule m;
   
-  if (str == "")
-    {
-      return fill (Box (Interval(0, 0), Interval (-h/2, h/2)));
-    }
-  if (str == "scorepostbreak")
-    {
-      return simple_bar ("score", h, paper_l);
-    }
-  else if (str == "|")
-    {
-      return thin;
-    }
-  else if (str == "|.")
-    {
-      m.add_at_edge (X_AXIS, LEFT, thick, 0);      
-      m.add_at_edge (X_AXIS, LEFT, thin, kern);
-    }
-  else if (str == ".|")
-    {
-      m.add_at_edge (X_AXIS, RIGHT, thick, 0);
-      m.add_at_edge (X_AXIS, RIGHT, thin, kern);
-    }
-  else if (str == ":|")
-    {
-      m.add_at_edge (X_AXIS, LEFT, thick, 0);
-      m.add_at_edge (X_AXIS, LEFT, thin, kern);
-      m.add_at_edge (X_AXIS, LEFT, colon, kern);      
-    }
-  else if (str == "|:")
-    {
-      m.add_at_edge (X_AXIS, RIGHT, thick, 0);
-      m.add_at_edge (X_AXIS, RIGHT, thin, kern);
-      m.add_at_edge (X_AXIS, RIGHT, colon, kern);      
-    }
-  else if (str == ":|:")
-    {
-      m.add_at_edge (X_AXIS, LEFT, thick, thinkern);
-      m.add_at_edge (X_AXIS, LEFT, colon, kern);      
-      m.add_at_edge (X_AXIS, RIGHT, thick, kern);
-      m.add_at_edge (X_AXIS, RIGHT, colon, kern);      
-    }
-  else if (str == ".|.")
-    {
-      m.add_at_edge (X_AXIS, LEFT, thick, thinkern);
-      m.add_at_edge (X_AXIS, RIGHT, thick, kern);      
-    }
-  else if (str == "||")
-    {
-      m.add_at_edge (X_AXIS, RIGHT, thin, 0);
-      m.add_at_edge (X_AXIS, RIGHT, thin, thinkern);      
-    }
 
-  return m;
-}
 
 Molecule 
 Lookup::beam (Real slope, Real width, Real thick) 
@@ -215,7 +125,7 @@ Lookup::dashed_slur (Bezier b, Real thick, Real dash)
 
 
 Molecule
-Lookup::fill (Box b) 
+Lookup::blank (Box b) 
 {
   Molecule m;
   m.dim_ = b;
@@ -264,8 +174,11 @@ Lookup::frame (Box b, Real thick)
 
 
 /*
-   TODO: THIS IS UGLY.  Since the user has direct access to TeX
-   strings, we try some halfbaked attempt to detect TeX trickery.
+   TODO: THIS IS UGLY.
+   Since the user has direct access to TeX marcos,
+   that currently provide the  only way to do
+   font selection, accents etc,
+   we try some halfbaked attempt to detect this TeX trickery.
  */
 String
 sanitise_TeX_string (String text)
@@ -349,48 +262,45 @@ Lookup::text (String style, String text, Paper_def *paper_l)
     metric_l = all_fonts_global_p->find_font (style);
   
   
-  if (output_global_ch == "tex")
-    text = sanitise_TeX_string  (text);
-  else if (output_global_ch == "ps")
-    text = sanitise_PS_string (text);
     
 
+  int i = text.index_i ("\\n");
+  while (i >=0 )
+    {
+      text = text.left_str (i) + "\n" + text.right_str (text.length_i () - i - 2);
+      i = text.index_i ("\\n");
+    }
   
-  SCM at = (gh_list (ly_symbol2scm ("text"),
-                    ly_str02scm (text.ch_C()),
-                    SCM_UNDEFINED));
-  at = fontify_atom (metric_l,at);
-  return Molecule ( metric_l->text_dimension (text),
-                   at);
-}
+  Array<String> lines = String_convert::split_arr (text, '\n');
   
-
-
-Molecule
-Lookup::staff_brace (Real y, int staff_size) 
-{
-  // URG
-  Real step  = 1.0;
-  int minht  = 2 * staff_size;
-  int maxht = 7 *  minht;
-  int idx = int (((maxht - step) <? y - minht) / step);
-  idx = idx >? 0;
-
-  SCM l = ly_eval_str ("(style-to-cmr \"brace\")");
-  String nm = "feta-braces";
-  if (l != SCM_BOOL_F)
-    nm = ly_scm2string (gh_cdr (l));
-  nm += to_str (staff_size);
-  SCM e =gh_list (ly_symbol2scm ("char"), gh_int2scm (idx), SCM_UNDEFINED);
-  SCM at = (e);
-
-  at = fontify_atom (all_fonts_global_p->find_font (nm), at);
+  Molecule mol;
   
-  Box b ( Interval (-y/2,y/2),
-          Interval (0,0));
-  return Molecule(b, at);
+  Real kern = paper_l->get_var ("line_kern");
+  
+  for (i = 0; i< lines.size (); i++)
+    {
+      /*
+       Huh?  This way we'll still see \foo sequences in ps output.
+       */
+      String str = lines[i];
+      if (output_global_ch == "tex")
+       str = sanitise_TeX_string  (str);
+      else if (output_global_ch == "ps")
+       str = sanitise_PS_string (str);
+
+      SCM line = (gh_list (ly_symbol2scm ("text"),
+                          ly_str02scm (str.ch_C ()),
+                          SCM_UNDEFINED));
+      line = fontify_atom (metric_l, line);
+      mol.add_at_edge (Y_AXIS, DOWN,
+                      Molecule (metric_l->text_dimension (str), line),
+                      kern);
+    }
+
+  return mol;
 }
+  
+
 
 /*
   Make a smooth curve along the points 
@@ -432,27 +342,6 @@ Lookup::slur (Bezier curve, Real curvethick, Real linethick)
   return Molecule (b, at);
 }
 
-Molecule
-Lookup::staff_bracket (Real height, Paper_def* paper_l)
-{
-  SCM at = ( gh_list (ly_symbol2scm ("bracket"),
-                     gh_double2scm (paper_l->get_var("bracket_arch_angle")),
-                     gh_double2scm (paper_l->get_var("bracket_arch_width")),
-                     gh_double2scm (paper_l->get_var("bracket_arch_height")),
-                     gh_double2scm (paper_l->get_var("bracket_width")),
-                     gh_double2scm (height),
-                     gh_double2scm (paper_l->get_var("bracket_arch_thick")),
-                     gh_double2scm (paper_l->get_var("bracket_thick")),
-                     SCM_UNDEFINED));
-
-  Box b ( Interval (-height/2,height/2), Interval (0,4 PT));
-  Molecule m (b, at);
-
-  m.translate_axis (- 4. / 3. * m.dim_[X_AXIS].length (), X_AXIS);
-  return m;
-}
-
-
 Molecule
 Lookup::accordion (SCM s, Real staff_space) const
 {
index d581d513525f1abc0a5fcdaae9dd87cbbf8dea9c..8aecb00f3a45c941fa38577ea3b01eac08c05fbb 100644 (file)
@@ -11,6 +11,7 @@
 #include "timing-translator.hh"
 #include "text-item.hh"
 #include "side-position-interface.hh"
+#include "staff-symbol-referencer.hh"
 
 ADD_THIS_TRANSLATOR (Staff_margin_engraver);
 
@@ -58,6 +59,18 @@ Staff_margin_engraver::acknowledge_element (Score_element_info inf)
    */
       Interval iv(text_p_->extent (Y_AXIS));
       text_p_->translate_axis (- iv.center (),  Y_AXIS);
+
+      Real staff_space = Staff_symbol_referencer_interface (text_p_).staff_space ();
+      SCM s = get_property ("staffMarginHorizontalPadding");
+      if (gh_number_p (s))
+       {
+         text_p_->translate_axis (gh_scm2double (s) * staff_space, X_AXIS);
+       }
+      s = get_property ("staffMarginVerticalPadding");
+      if (gh_number_p (s))
+       {
+         text_p_->translate_axis (gh_scm2double (s) * staff_space, Y_AXIS);
+       }
     }
 }
 
index d02f17dd9782d5927e3fa855d02903e17b5b0aa0..0f3052930e15da759c4424db7e8490d44c81b597 100644 (file)
@@ -64,6 +64,9 @@ slur_ratio = 1.0 / 3.0;
 
 slur_thickness = 1.2 * \stafflinethickness;
 
+slur_force_blowfit = 0.5;
+slur_beautiful = 0.5;
+
 
 %{
 Horizontal space between centre of notehead and slur.
@@ -75,9 +78,6 @@ slur_y_free = 0.75 * \staffspace;
 slur_x_minimum = 1.5 * \staffspace;
 
 
-bezier_asymmetry = 1.0;
-bezier_beautiful = 2.0;
-
 % The constants that define the valid areas for the middle control points
 % Used in de_uglyfy.  Bit empirical.
 bezier_control1 = 1.5;
@@ -91,9 +91,6 @@ bezier_pct_out_max = 0.8;
 bezier_pct_in_max = 1.2;
 bezier_area_steps = 1.0;
 
-slur_force_blowfit = 0.5;
-slur_beautiful = 0.5;
-
 
 %{
   Tie parameters
@@ -126,6 +123,8 @@ method.
 gourlay_maxmeasures = 10.;
 
 
+line_kern = \staffspace;
+
 %{ Ross. page 151 lists these values, but we think that thick lines
 and kernings are too thick.
 
@@ -143,9 +142,9 @@ barthick_thick = 6.0* \stafflinethickness;
 barthick_thin = 1.6*\stafflinethickness;
 barthick_score = 1.6*\stafflinethickness;
 
-bracket_arch_thick = \staffspace / 3.0;
+bracket_arch_thick = \staffspace / 4.0;
 bracket_width = 2.0 * \staffspace;
-bracket_thick = 2.0 * \stafflinethickness;
+bracket_thick = \staffspace / 4.0;
 bracket_arch_height = 1.5 * \staffspace;
 bracket_arch_width = \bracket_arch_height;
 bracket_arch_angle = 50.0;
index 449279bdb9b20c2a8dd83eeec5a431de000edcf0..06535c7893153b9f7c814f27eac1eb6f564d9c96 100644 (file)
@@ -16,8 +16,8 @@ copyright =    "public domain";
 
 $clarinetti_staff = \context Staff = clarinetti <
        \property Staff.midiInstrument = #"clarinet"
-       \property Staff.instrument = #"2 Clarinetti (B\\textflat)"
-       \property Staff.instr = #"Cl. (B\\textflat)"
+       \property Staff.instrument = #"2 Clarinetti\n(B\\textflat)"
+       \property Staff.instr = #"Cl.\n(B\\textflat)"
        % urg: can't; only My_midi_lexer:<non-static> () parses pitch?
        %\property Staff.transposing = "bes"
        \property Staff.transposing = #-2
@@ -25,6 +25,7 @@ $clarinetti_staff = \context Staff = clarinetti <
        \notes \context Staff=clarinetti < 
                \time 4/4;
                \key F;
+               \skip 1*341; \bar "|.";
                \context VoiceOne=clarinettoi
                        \$clarinetto1
                \context VoiceTwo=clarinettoii
index 24f89ce987ce59596605d0947c588593f100b900..9273d71dab88e8b6fcdfd4c04f793f58dc8cbc81 100644 (file)
@@ -1,7 +1,8 @@
 \header{
 filename =      "coriolan.ly";
-% %title =      "Ouvert\\"ure zu Collins Trauerspiel \\"Coriolan\\" Opus 62";
-description =   "";
+title =         "Ouverture"; 
+subtitle = "Coriolan";
+opus = "Op. 62";
 composer =      "Ludwig van Beethoven (1770-1827)";
 enteredby =     "JCN";
 copyright =     "public domain";
@@ -41,20 +42,21 @@ ottoni = \context StaffGroup = otonni_group <
 
 $timpani_g = \context StaffGroup = timpani_group <
        \$timpani_staff
+       % HaraKiri mustn't work on first page
        \context Staff = urgtimpany \notes{ \skip 1*34; }
 >
 
-$violini = \context GrandStaff = violini_group <
+violini = \context GrandStaff = violini_group <
        \$violino1_staff
        \$violino2_staff
 >
 
-$violi = \context GrandStaff = violi_group <
+violi = \context GrandStaff = violi_group <
        \$viola1_staff
        \$viola2_staff
 >
 
-$bassi = \context GrandStaff = bassi_group <
+bassi = \context GrandStaff = bassi_group <
        \$violoncello_staff
        \$contrabasso_staff
 >
@@ -68,12 +70,19 @@ archi = \context StaffGroup = archi_group <
 
 \score{
        <
-               %%? \property Score . textStyle =  "italic"
-               \$legni
-               \$ottoni
+               \legni
+               \ottoni
                \$timpani_g
-               \$archi
+               \archi
        >
+       \header{
+               title = "Coriolan";
+               subtitle = "Ouverture"; 
+               opus = "Opus 62";
+               composer = "Ludwig van Beethoven (1770-1827)";
+               enteredby = "JCN";
+               copyright = "public domain";
+       }
        \include "coriolan-paper.ly"
        \include "coriolan-midi.ly"
 }
index f98f981fcf75970b16ec5965339977020f9f080a..165fb0af949b387c5de1b7f1b76d889ce3d0f531 100644 (file)
@@ -16,14 +16,15 @@ copyright =  "public domain";
 
 $corni_staff = \context Staff = corni <
        \property Staff.midiInstrument = #"french horn"
-       \property Staff.instrument = #"2 Corni (E\\textflat)"
-       \property Staff.instr = #"Cor. (E\\textflat)"
+       \property Staff.instrument = #"2 Corni\n(E\\textflat)"
+       \property Staff.instr = #"Cor.\n(E\\textflat)"
        % urg: can't; only My_midi_lexer:<non-static> () parses pitch?
        %\property Staff.transposing = "es"
        \property Staff.transposing = #3
        %\notes \context Voice=corni < 
        \notes \context Staff=corni < 
                \time 4/4;
+               \skip 1*341; \bar "|.";
                \context VoiceOne=cornoi
                        \$corno1
                \context VoiceTwo=cornoii
index 03d915813219057d87108a749c23b9eb9ae0758b..d000a5c929c5ec1a3397801cd11298f0f8f96a5e 100644 (file)
@@ -147,7 +147,7 @@ timpani = \notes \relative c {
 
 $timpani_staff = \context Staff = timpani <
        \property Staff.midiInstrument = #"timpani"
-       \property Staff.instrument = #"2 Timpani (C-G)"
+       \property Staff.instrument = #"2 Timpani\n(C-G)"
        \property Staff.instr = #"Timp."
        \clef "bass";
        \notes< 
index 64ce71f818c8210eb984226d96aea9b5cf91723f..1d6d6f2f7779202c1ce3f0fcdda851a9d8538f4e 100644 (file)
@@ -16,8 +16,8 @@ copyright =    "public domain";
 
 $trombe_staff = \context Staff = trombe <
        \property Staff.midiInstrument = #"trumpet"
-       \property Staff.instrument = #"2 Trombe (C)"
-       \property Staff.instr = #"Tbe."
+       \property Staff.instrument = #"2 Trombe\n(C)"
+       \property Staff.instr = #"Tbe.\n(C)"
        %\notes \context Voice=trombe < 
        \notes \context Staff=trombe < 
 %              \global
index d8071553e7e96f8818bcf413dfaf39457826e30d..27f80fbbc8967e026426a7b308c3ef29632c4892 100644 (file)
@@ -19,7 +19,7 @@ violoncello = \notes \relative c {
        c'1\ff ~ |
        c |
        f,4-. r r2 |
-       \property Staff.instr = #"Vc. \& Cb."
+       \property Staff.instr = #"Vc.\nCb."
        r1 |
        c'1\ff ~ |
        c |
@@ -486,7 +486,7 @@ violoncello = \notes \relative c {
 
 $violoncello_staff = \context Staff = violoncello <
        \property Staff.midiInstrument = #"cello"
-       \property Staff.instrument = #"Violoncello"
+       \property Staff.instrument = #"Violoncello\ne\nContrabasso"
        \property Staff.instr = #"Vc."
        \clef "bass";
        \notes \context Voice=one< 
index 72da29ec209cd9cc8f4f57e64fe1a6dc94d8541b..0926c8fc5a1d26d6edfc94ab55f39edb10bcf139 100644 (file)
 %6 
        0 0 
 %5a 
-       arch_thick arch_height add half_height bracket_thick sub arch_width add 
+       bracket_thick arch_height add half_height arch_thick sub arch_width add 
        arch_angle arch_height -0.15 mul bracket_traject 
 %5b 
        1 half_height 
 %5c 
        0 half_height 
 %4a 
-       arch_thick half_height bracket_thick sub 
+       bracket_thick half_height arch_thick sub 
        0 arch_height 0.4 mul bracket_traject 
 %4b 
-       arch_thick arch_height add half_height bracket_thick sub arch_width add 
+       bracket_thick arch_height add half_height arch_thick sub arch_width add 
        arch_angle arch_height -0.25 mul bracket_traject 
 %4c 
-       arch_thick arch_height add half_height bracket_thick sub arch_width add 
+       bracket_thick arch_height add half_height arch_thick sub arch_width add 
 %3 
-       arch_thick half_height bracket_thick sub 
+       bracket_thick half_height arch_thick sub 
 %2 
-       arch_thick 0 
+       bracket_thick 0 
 %1 
        0 0 
 } bind def 
        /arch_width exch def
        /arch_angle exch def
 %
-       bracket_height 2 div arch_thick add /half_height exch def 
+       bracket_height 2 div bracket_thick add /half_height exch def 
 % urg: the only Level-2 PS, check effect in print 
 %      true setstrokeadjust 
        1 setlinecap 
index 7ddd22dff28d05287c01bc82059184b4d424bbef..b105f312332a0bfc325f2a53ac795bd9028a28fe 100644 (file)
         (list 'tupletBracketVisibility symbol-or-boolean? 'tuplet-bracket-visibility)
        ))
 )
+
 (define generic-voice-properties
   (list
    generic-stem-properties
index 841ecade60b67b1467af676033133c908967886f..aef1ec55ccb4970797617fca71aac480252c7f8a 100644 (file)
@@ -5,6 +5,14 @@
 ; (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
 
 
+;
+; This file contains various routines in Scheme that are easier to 
+; do here than in C++.  At present it is a unorganised mess. Sorry. 
+;
+;
+
+
+
 ;(debug-enable 'backtrace)
 
 ;;; library funtions
          )
       )
 
-(define (glue-2-strings a b) 
-  (string-append a " " b))
 
 (define (numbers->string l)
-  (reduce glue-2-strings (map number->string l)))
+  (apply string-append (map ly-number->string l)))
 
-(define (chop-decimal x) (if (< (abs x) 0.001) 0.0 x))
+(define (chop-decimal x) (if (< (abs x) 0.001) 0.0 x))
 
 (define (number->octal-string x)
   (let* ((n (inexact->exact x))
     (number->string n radix)))
 
 
-(define
-  (control->string c)
-  (string-append
-   (string-append (number->string (car c)) " ")
-   (string-append (number->string (cdr c)) " ")))
+(define (control->string c)
+  (string-append (number->string (car c)) " "
+                (number->string (cdr c)) " "))
 
 
 (define (font i)
     (not (not (memq name (ly-get-elt-property elt 'interfaces))))))
 
        
-
-
-
-
-
-
-
-
-;;;;;;;;;;;;;;;;;;; generic output
-
-(define (translate-molecule offset)
-  "")
-
-
 ;;;;;;;;;;;;;;;;;;; TeX output
 (define (tex-scm action-name)
   (define (unknown) 
   (define (decrescendo thick w h cont)
     (embedded-ps ((ps-scm 'decrescendo) thick w h cont)))
 
-   ;This sets CTM so that you get to the currentpoint
-  ; by executing a 0 0 moveto
-
-  
-
   (define (font-load-command name-mag command)
     (string-append
      "\\font\\" command "="
      (number->string (magstep (cdr name-mag)))
      "\n"))
 
-
   (define (embedded-ps s)
     (string-append "\\embeddedps{" s "}"))
 
      ; fixed in 1.3.4
      ;(ly-gulp-file "lily.ps")
 
+     ;; URG: now we can't use scm output without Lily
      (regexp-substitute/global #f "\n" (ly-gulp-file "lily.ps") 'pre " %\n" 'post)
      "}"
      "\\input lilyponddefs \\turnOnPostScript"))
 
   (define (number->dim x)
     (string-append 
-     (number->string  (chop-decimal x)) " pt "))
+     (ly-number->string x) " pt "))
 
   (define (placebox x y s) 
     (string-append 
 ;;;;;;;;;;;; PS
 (define (ps-scm action-name)
 
-
   ;; alist containing fontname -> fontcommand assoc (both strings)
   (define font-alist '())
   (define font-count 0)
 
   (define (header-end)
     (string-append
+     ;; URG: now we can't use scm output without Lily
      (ly-gulp-file "lilyponddefs.ps")
      " {exch pop //systemdict /run get exec} "
      (ly-gulp-file "lily.ps")
        (close port)
        content))
 
+;; urg: Use when standalone, do:
+;; (define (ly-gulp-file name) (scm-gulp-file name))
 (define (scm-gulp-file name)
   (set! %load-path 
-       (cons (string-append 
-              (getenv 'LILYPONDPREFIX) "/ps") %load-path))
+       (cons (string-append (getenv 'LILYPONDPREFIX) "/ly")
+             (cons (string-append (getenv 'LILYPONDPREFIX) "/ps")
+                   %load-path)))
   (let ((path (%search-load-path name)))
        (if path
           (gulp-file path)