]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.98
authorfred <fred>
Wed, 27 Mar 2002 00:01:29 +0000 (00:01 +0000)
committerfred <fred>
Wed, 27 Mar 2002 00:01:29 +0000 (00:01 +0000)
21 files changed:
input/test/instrument-name-grandstaff.ly [new file with mode: 0644]
input/test/instrument-name.ly [new file with mode: 0644]
input/test/staff-margin.ly
input/trip.ly
lily/clef-item.cc
lily/include/clef.hh
lily/instrument-name-engraver.cc
lily/lily-guile.cc
lily/property-engraver.cc
lily/slur.cc
lily/system-start-delimiter-engraver.cc
lily/system-start-delimiter.cc
lily/translator-group.cc
mutopia/J.S.Bach/Solo-Cello-Suites/allemande-urtext.ly
mutopia/J.S.Bach/Solo-Cello-Suites/courante-urtext.ly
mutopia/J.S.Bach/Solo-Cello-Suites/gigue-urtext.ly
mutopia/J.S.Bach/Solo-Cello-Suites/menuetto-cello.ly
mutopia/J.S.Bach/Solo-Cello-Suites/menuetto-urtext.ly
mutopia/J.S.Bach/Solo-Cello-Suites/menuetto-viola.ly
mutopia/J.S.Bach/Solo-Cello-Suites/sarabande-urtext.ly
scm/basic-properties.scm

diff --git a/input/test/instrument-name-grandstaff.ly b/input/test/instrument-name-grandstaff.ly
new file mode 100644 (file)
index 0000000..4e40174
--- /dev/null
@@ -0,0 +1,18 @@
+\version "1.3.96";
+
+\score {
+  \notes
+  \notes \context GrandStaff <
+    \context Staff = treble    {
+      \property GrandStaff.instrument = "Violini  "
+      \property Staff.instrument = " vn I" { c''4 }}
+    \context Staff = bass { \property Staff.instrument = " vn II" c''4 }>
+
+
+\paper {
+linewidth=-1.0;
+\translator { \StaffContext
+  \consists "Instrument_name_engraver";
+  }
+\translator { \GrandStaffContext \consists "Instrument_name_engraver"; }
+}}
diff --git a/input/test/instrument-name.ly b/input/test/instrument-name.ly
new file mode 100644 (file)
index 0000000..b9df662
--- /dev/null
@@ -0,0 +1,12 @@
+\version "1.3.96";
+
+\score {
+
+  \notes     \context Staff = treble    {
+      \property Staff.instrument = "instr " { c''4 }}
+
+\paper {
+linewidth=-1.0;
+\translator { \StaffContext \consists "Instrument_name_engraver"; }
+}}
+
index 981b2a598f5355151977a936573f0579b558bca0..315d115473299b9c99b9f158652d5b685ac97cad 100644 (file)
 \paper {
 linewidth=-1.0;
 \translator { \ScoreContext
-       %textVerticalAlignment = #0
+       
        }
-%\translator { \StaffContext \consists "Instrument_name_engraver"; }
-%\translator { \PianoStaffContext \consists "Instrument_name_engraver"; }
 \translator { \StaffContext \consists "Instrument_name_engraver"; }
 \translator { \PianoStaffContext \consists "Instrument_name_engraver"; }
 }}
index 071311620e41791aa46996ff71d46e4ca56ead34..f943744f35d2a91a8fd74398d159043b10126955 100644 (file)
@@ -205,7 +205,7 @@ fugaIIPedal = \notes \relative c {
       c2^^^-^\f 
  \time 3/4;
 
-  \fugaIIPedal }
+  \fugaIIPedal \bar "|." ; }
       
     >
   >
index faf226af33a920089606c7f9c850a90ebd43054f..44d716424eeca1ede25a824cd988489d7011fd1f 100644 (file)
 #include "string.hh"
 #include "molecule.hh"
 #include "item.hh"
+#include "lookup.hh"
 
 /*
 FIXME: should use symbol for #'style.
-
 */
 MAKE_SCHEME_CALLBACK(Clef,before_line_breaking,1);
 SCM
@@ -66,3 +66,20 @@ Clef::set_interface (Score_element* me)
 }
 
 
+
+
+MAKE_SCHEME_CALLBACK(Clef,brew_molecule,1)
+SCM
+Clef::brew_molecule (SCM smob) 
+{
+  Score_element * sc = unsmob_element (smob);
+  SCM glyph = sc->get_elt_property ("glyph");
+  if (gh_string_p (glyph))
+    {
+      return sc->lookup_l ()->afm_find (String (ly_scm2string (glyph))).create_scheme ();
+    }
+  else
+    {
+      return SCM_EOL;
+    }
+}
index e5308818df54e2e9f66db78169f3d06c0c962304..f5fabe24f112b4a9de5b734cc6ef1785709ae1e8 100644 (file)
@@ -15,6 +15,7 @@
 struct Clef 
 {
   DECLARE_SCHEME_CALLBACK(before_line_breaking, (SCM ));
+  DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM ));
   static bool has_interface (Score_element*);
   static void set_interface (Score_element*);
 };
index 131c67ad3bcd97d1fe3825e1e521825d68e5f83d..69f29134b7ce7baddf6d5407e219ccac3869a9b4 100644 (file)
@@ -1,4 +1,3 @@
-
 /*   
   new-staff-margin-engraver.cc --  implement Instrument_name_engraver
   
 #include "bar.hh"
 #include "system-start-delimiter.hh"
 #include "side-position-interface.hh"
+#include "align-interface.hh"
 
 class Instrument_name_engraver : public Engraver
 {
   Item *text_;
-  Spanner * delim_ ;
+  Score_element * delim_ ;
 
   void create_text (SCM s);
 public:
@@ -55,9 +55,6 @@ Instrument_name_engraver::create_text (SCM txt)
       text_ = new Item (get_property ("InstrumentName"));
       text_->set_elt_property ("text", txt);
 
-      /*
-       TODO: use more lispish names for break-align-symbols
-       */
       if (delim_)
        text_->set_parent (delim_, Y_AXIS);
 
@@ -81,10 +78,12 @@ Instrument_name_engraver::acknowledge_element (Score_element_info i)
        }
     }
 
-  if (System_start_delimiter::has_interface (i.elem_l_)
+  if (Align_interface::has_interface (i.elem_l_)
+      && Align_interface::axis  (i.elem_l_) == Y_AXIS      
+      //System_start_delimiter::has_interface (i.elem_l_)
       && i.origin_trans_l_->daddy_trans_l_ == daddy_trans_l_)
     {
-      delim_ = dynamic_cast<Spanner*> (i.elem_l_);
+      delim_ = i.elem_l_;
     }
 }
 
index 4a6e26d5d1ae1077af7dd7cf815c849bbb4eafce..7b722ba5116f926b5b5d9be92ae945bb80d64942 100644 (file)
@@ -396,11 +396,21 @@ undefd ()
   return SCM_UNDEFINED;
 }
 
+#include "version.hh"
+SCM
+ly_version ()
+{
+  char const* vs =  "\'(" MAJOR_VERSION " " MINOR_VERSION " "  PATCH_LEVEL " " MY_PATCH_LEVEL ")" ;
+
+  
+  return gh_eval_str (vs);
+}
 
 static void
 init_functions ()
 {
   scm_make_gsubr ("ly-warn", 1, 0, 0, (Scheme_function_unknown)ly_warning);
+  scm_make_gsubr ("ly-version", 0, 0, 0, (Scheme_function_unknown)ly_warning);  
   scm_make_gsubr ("ly-gulp-file", 1,0, 0, (Scheme_function_unknown)ly_gulp_file);
   scm_make_gsubr ("dir?", 1,0, 0, (Scheme_function_unknown)ly_isdir_p);
   scm_make_gsubr ("undefd", 0,0, 0, (Scheme_function_unknown)undefd);  
index 67b48089a33ac2528ec1fb1f88e2c3b0c3716890..bebdabbad502157415125ecaaa18ae0dd8859ba2 100644 (file)
@@ -153,8 +153,11 @@ Property_engraver::apply_properties (SCM p, Score_element *e, Translator_group*o
            SCM errport = scm_current_error_port ();
            warning (_("Wrong type for property"));
            scm_display (prop_sym, errport);
-           scm_puts (", type predicate: ", errport);
-           scm_display (type_p, errport);
+           scm_puts (", type: ", errport);
+
+           SCM typefunc = scm_eval2 (ly_symbol2scm ("type-name"), SCM_EOL);
+           
+           scm_display (gh_call1 (typefunc, type_p), errport);
            scm_puts (", value found: ", errport);
            scm_display (val, errport);
            scm_puts (" type: ", errport);
index 1ac4b5cf79513bcecd10db8476306770189b170d..f52240d327dbda2a8a39822ceb9aefe035c423de 100644 (file)
@@ -10,6 +10,7 @@
 /*
   [TODO]
     * fix broken interstaff slurs
+    * should avoid stafflines with horizontal part.
     * begin and end should be treated as a/acknowledge Scripts.
     * smart changing of endings
     * smart changing of (Y-?)offsets to avoid ugly beziers
index a6955147cbadc6e8af2ec8092ab860210025f295..e5abe9cdf400e83bf31945f13135258532f974fe 100644 (file)
@@ -66,18 +66,9 @@ void
 System_start_delimiter_engraver::do_creation_processing()
 {
   delim_ = new Spanner (get_property ("SystemStartDelimiter"));
-  System_start_delimiter::set_interface (delim_);
+
   delim_->set_bound (LEFT, unsmob_element (get_property ("currentCommandColumn")));
 
-  /*
-    You can't override the glyph using \property, you must do it in
-    the predefined context (ie. \translator { ... } )
-   */
-  SCM s = get_property ("systemStartDelimiterGlyph");
-  if (gh_symbol_p (s))
-    {
-      delim_->set_elt_property ("glyph", s);
-    }
 
   announce_element (delim_,0);
 }
@@ -85,11 +76,6 @@ System_start_delimiter_engraver::do_creation_processing()
 void
 System_start_delimiter_engraver::do_removal_processing ()
 {
-  // ugh, should have naming without bracket
-  SCM collapse = get_property ("bracketCollapseHeight");
-  if (gh_number_p (collapse))
-    delim_->set_elt_property ("collapse-height", collapse);
-      
   delim_->set_bound (RIGHT, unsmob_element (get_property ("currentCommandColumn")));
   typeset_element (delim_);
 }
index 957dd429ee3ff465cfa95c1a6a66ec2dcdeae8e6..d085267e113212884f25ee60e711a7980513ffd3 100644 (file)
@@ -44,7 +44,6 @@ System_start_delimiter::staff_bracket (Score_element*me,Real height)
 void
 System_start_delimiter::set_interface (Score_element*me)
 {
-  me->set_extent_callback (SCM_EOL, Y_AXIS);
   me->set_interface (ly_symbol2scm ("system-start-delimiter-interface"));
 }
 
index 6b735ad953232e7c317320ae2bd279c9013c6855..6e455d8e5c78227559b3b2104c19abd4ac31d37f 100644 (file)
@@ -371,8 +371,10 @@ Translator_group::execute_single_pushpop_property (SCM prop, SCM eltprop, SCM va
                      scm_display (eltprop,errport);
                      scm_puts ( _(", value ").ch_C (), errport);
                      scm_display (val, errport);
-                     scm_puts (_(" must satisfy ").ch_C (), errport);
-                     scm_display (predicate, errport);
+                     scm_puts (_(" must be of type ").ch_C (), errport);
+                     SCM typefunc = scm_eval2 (ly_symbol2scm ("type-name"), SCM_EOL);
+           
+                     scm_display (gh_call1 (typefunc, predicate), errport);
                      scm_puts ("\n", errport);               
                    }
                }
index fee7c2d782d005a342e62f7b507711c8eb482cce..480995effdbb4de6b87f537725b1b011ba101a22 100644 (file)
@@ -60,6 +60,7 @@ allemande_a = \context Staff \notes \relative c {
        cis(e g!)bes e()a, bes()g f()cis d()gis, a8 cis! |
        % knee
        \stemUp d,16 \stemBoth d''(c!)a bes!(g)e cis' d a f d d,8.
+       \bar "|.";
 }
 
 allemande_b = \notes \relative c {
index 8a35f8aafe45125f3ef00c556fc5b956d2e2a56b..ff7f05d526c0d9f16f5bea5ec69f0ffb6c77d204 100644 (file)
@@ -54,6 +54,7 @@ courante_a = \context Staff \notes \relative c {
        gis, d'(e f e d cis)d a d a cis |
        d a f a d, f a, d 
        d,8.
+       \bar "|.";              
 }
 
 courante_b = \notes \relative c {
index d31d4893e4d242fd13bc9e6c6f044600c271be71..d300e28aeb73d14b9ce26cdfdbb21974cabf992c 100644 (file)
@@ -66,6 +66,7 @@ gigue_notes = \context Staff \notes \relative c {
        %72
        cis'4 \stemBoth d16()c | bes(a g f e)d | cis(b a g f)e | d f a d f a |
        d4
+       \bar "|.";              
 }
 
 gigue_b = \context Staff \notes \relative c {
index 0cbaba1420d5206215c721d75c1f153bc7b41cce..6b4fcf1a643814e7ae11b051c7ce7edb38c29145 100644 (file)
@@ -95,6 +95,9 @@ menuetto_ii_cello_staff = \context Staff <
                }
        }
        \midi{ \tempo 4 = 130; }
-       \header{ piece = "Menuetto II"; }
+       \header{
+               piece = "Menuetto II";
+               opus = "";
+       }
 }
 
index 2c6fe350b47afc8e335551ec259bc076e3ece50d..a00f3c8a86c91625a4a7321f449f81b4a050fccb 100644 (file)
@@ -66,6 +66,7 @@ menuetto_i_b = \context Staff \notes \relative c {
        g4 \skip 4*1; f4 |
        cis8 \skip 8*3; d4 |
        s2.*2
+       \bar "|.";              
 }
 
 % UGH, fix this like in sarabande
@@ -146,6 +147,7 @@ menuetto_ii = \context Staff\notes \relative c {
        e( fis g )b a4 |
        g8()fis e()d e()cis |
        d2.
+       \bar "|.";      
 }
 
 \version "1.3.93";
index 633af16bb586724da9d534db61da8472a65d4536..c5bb69539263efdeff877947549cea80be35b44d 100644 (file)
@@ -58,8 +58,9 @@ menuetto_i_viola_staff = \context Staff <
        }
        \midi{ \tempo 4 = 110; }
        \header{
-       opus= "" ; 
-       piece ="Menuetto I"; }
+               opus= "" ; 
+               piece ="Menuetto I";
+       }
 }
 
 menuetto_ii_viola_global = \notes{
index 7344202daa1a9286e2d520e9c382e64285f5cee8..a2f8b2f4c6b94664925d93b97b9fa37999d7bd81 100644 (file)
@@ -81,6 +81,7 @@ sarabande_b = \context Staff \notes \relative c {
        f'4 fis4. s8 |
        <d4 g,> gis4. s8 |
        s2.*2
+       \bar "|.";      
 }
 
 
index ff3204e8e2dbda1a835e36fe1ce495b6c907252c..7955f6a630dbd1489a7aea1962596e0306b11d1c 100644 (file)
     (flag-width-function . ,default-beam-flag-width-function)
     (space-function . ,default-beam-space-function)
     (damping . 1)
-    (meta . ,(element-description "Beam" general-element-interface beam-interface))
+    (meta . ,(element-description "Beam" beam-interface))
     )
   )