]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.86
authorfred <fred>
Tue, 26 Mar 2002 23:55:37 +0000 (23:55 +0000)
committerfred <fred>
Tue, 26 Mar 2002 23:55:37 +0000 (23:55 +0000)
20 files changed:
Documentation/faq.texi
Documentation/user/properties.itely
Documentation/user/refman.itely
input/bugs/broken-cresc.ly [new file with mode: 0644]
input/test/tab-staff.ly [new file with mode: 0644]
lily/include/molecule.hh
lily/include/rest-collision.hh
lily/include/translator-def.hh
lily/local-key-engraver.cc
lily/molecule.cc
lily/multi-measure-rest-engraver.cc
lily/multi-measure-rest.cc
lily/note-head.cc
lily/pitch-squash-engraver.cc
lily/score-element.cc
lily/translator-def.cc
lily/translator-group.cc
ly/engraver.ly
ly/legal.ly [new file with mode: 0644]
scripts/ly2dvi.py

index 298e69af76abb68b43b4b4c0773932e50c2a3c06..ad43f36b353e6f45bbc0d19bf400178f1537b049 100644 (file)
@@ -34,11 +34,31 @@ Note: relative paths are meant to be relative to the source directory
 
 @subsubsection I've got a simple question, but this FAQ doesn't help!
 
-Please have a look in the searchable mail achives of
-@uref{http://www.mail-archive.com/gnu-music-discuss@@gnu.org/,
-gnu-music-discuss} and
-@uref{http://www.mail-archive.com/help-gnu-music@@gnu.org/, help-gnu-music}.
-Your question may well have been answered before.
+Please have a look in the searchable mail archives of gnu-music-discuss
+and help-gnu-music (see next FAQ entry).  Your question may well have
+been answered before.
+
+@subsubsection Are there archives of the mailing list?
+
+Yes. Currently, all information on the mailing lists is available at
+gnu.org:
+
+@itemize
+@item @uref{http://mail.gnu.org/mailman/listinfo/gnu-music-discuss}
+@item @uref{http://mail.gnu.org/mailman/listinfo/info-gnu-music}
+@item @uref{http://mail.gnu.org/mailman/listinfo/bug-gnu-music}
+@item @uref{http://mail.gnu.org/mailman/listinfo/help-gnu-music}
+@end itemize
+
+Archives of mail before September 12, 2000 are at
+@code{mail-archive.com}:
+
+@itemize
+@item @uref{http://www.mail-archive.com/info-gnu-music@@gnu.org}
+@item @uref{http://www.mail-archive.com/help-gnu-music@@gnu.org}
+@item @uref{http://www.mail-archive.com/bug-gnu-music@@gnu.org})
+@item @uref{http://www.mail-archive.com/gnu-music-discuss@@gnu.org}
+@end itemize
 
 @node Installing,, ,top
 @section Installing
@@ -277,6 +297,25 @@ This also works for crescendi, eg,
  
 @end example 
 
+@subsubsection How do I get a fermata on a barline
+
+The trick is to specify the fermata as a \mark.  Use the following macro
+before the bar line where you want the fermata:
+
+@example
+barFermata = \mark "\\font\\fetafont=feta20\\fetafont\\char40";
+@end example
+
+The problem is that marks that occur at a line break are typeset only at
+the beginning of the next line, opposite to what you want for the
+fermata. This can be corrected by the following code
+
+@example
+        \property basicMarkProperties \push #'visibility-lambda  = #begin-of-line-i\nvisible
+@end example
+
+You can use a similar trick to put coda signs and comma's on barline.
+
 @subsubsection How do I combine multiple pieces into one document?
 
 There are several solutions:
index 670b0add0300c7c896d9741f1158a7a9940a4008..63b40860eb377d330ed4cf355f1cccd7f4a73820 100644 (file)
@@ -102,7 +102,7 @@ c'8 \property Voice.flagStyle = "grace" c'8
 
 @cindex properties!Voice
 
-@table @samp  
+@table @samp
   @item @code{abbrev}@indexcode{abbrev} @propertytype{integer}
     Set length for tremolo to be used if no length is explicitly
     specified. 
index c606b6cb5b900ad829fee2fd197f97c3e39e2358..71f569c6fa58e26e71ee5c6a565e3d615e31ae1d 100644 (file)
@@ -2732,6 +2732,9 @@ The engravers for paper output are:
     Note that the notes move, but the locations of accidentals stay
     the same.
 
+       Vertical position of squashing can be controlled through
+@indexcode{squashedPosition}.
+
   @item @code{Priority_horizontal_align_engraver}
     @indexcode{Priority_horizontal_align_engraver}
 
diff --git a/input/bugs/broken-cresc.ly b/input/bugs/broken-cresc.ly
new file mode 100644 (file)
index 0000000..3580a23
--- /dev/null
@@ -0,0 +1,5 @@
+\score {
+       \notes \context Thread {
+       c1 \< c1 \break c1 c1 \! c1
+        }
+}
diff --git a/input/test/tab-staff.ly b/input/test/tab-staff.ly
new file mode 100644 (file)
index 0000000..d7751a8
--- /dev/null
@@ -0,0 +1,35 @@
+%{
+
+Kludge for half-assed tab notation (you need to fill the numbers
+yourself.)
+
+%}
+
+bla = \notes \relative c' { <c4 e g>  <c4. e g> <c8 f a> <c4 f a> <c1 e g> } 
+
+\score { \notes
+<
+  \context Voice = BLA \bla
+  \context TabStaff \context Thread \bla
+>
+
+\paper {
+ \translator {
+  \StaffContext
+  \name TabStaff;
+  basicStaffSymbolProperties \push #'line-count = #6
+  \remove "Clef_engraver";
+  \remove "Time_signature_engraver";
+  \consists "Pitch_squash_engraver";
+   basicNoteHeadProperties \push #'transparent = ##t
+   basicNoteHeadProperties \push #'staff-position = #-6
+   basicDotsProperties \push #'transparent = ##t
+   squashedPosition = #-4
+   basicStemProperties \push #'length = #12
+}
+\translator {
+\ScoreContext
+\accepts TabStaff;
+}
+}
+}
index 898cb6373219e7b98c53c189532ef8265311040e..e61a64c8b9c89de83bd13a0d66d5fa6cc8461a17 100644 (file)
@@ -73,6 +73,7 @@ public:
   void translate_axis (Real,Axis);
   
   Interval extent (Axis) const;
+  Box extent_box () const;
   /**
      codify THIS into a Scheme expression.
    */
index 79b7b8aa72876bcbbd85d77f5da2be0c1273a41b..f7a547a94b5e889f6c6c22c149f3a12f267943a2 100644 (file)
 
 #include "lily-proto.hh"
 #include "lily-guile.hh"
+/*
+  properties:
+
+  elements -- list of elts (both rests and notes) participating in the
+    collision.
+
+*/
 
 class Rest_collision           // interface
 {
index c985222a40281e5318dc72251b8bcee6208ee5c4..1fcfc37ab5f28cdb9c31744fc0144a119e85477a 100644 (file)
 #include "smobs.hh"
 #include "input.hh"
 
+/*
+  The definition of a interpretation context as given in the
+  input. The lists are stored in order of definition.
+*/
 struct Translator_def : public Input
 {
+private:
+  /*
+    these lists store the definition, in opposite order of entry
+  */
+  
   SCM consists_name_list_;
   SCM end_consists_name_list_;
   SCM accepts_name_list_;
   SCM property_ops_;
+public:
   SCM type_name_;
   SCM translator_group_type_;
 
   SCM modify_definition (SCM, SCM, bool);
+  SCM default_child_context_name ();
   
   void set_acceptor (SCM accepts, bool add);
   void add_element (SCM name);
@@ -40,9 +51,10 @@ struct Translator_def : public Input
   static void apply_pushpop_property (Translator_group*, SCM syms, SCM eprop, SCM val);
 
   SCM clone_scm ()const;
-  DECLARE_SMOBS(Translator_def,foo);
-private:
+  void apply_property_operations (Translator_group*);
 
+private:
+  DECLARE_SMOBS(Translator_def,foo);
   Translator_def ();
   Translator_def (Translator_def const&);
 
index 07fd651e14d01defb6b9d8f163dba769f0d34b44..052f3a92341cb2afb6a55e625934afa6ecb3f050 100644 (file)
    events.  Due to interaction with ties (which don't come together
    with note heads), this needs to be in a context higher than Tie_engraver.
    (FIXME).
- */
+
+   FIXME: should not compute vertical positioning of accidentals, but
+   get them from the noteheads
+
+*/
+
+
 struct Local_key_engraver : Engraver {
   Item *key_item_p_;
 protected:
@@ -117,7 +123,15 @@ Local_key_engraver::process_acknowledged ()
              Side_position::add_support (key_item_p_,support_l);
            }
          
-         if (!forget)
+         /*
+           We should not record the accidental if it is the first
+           note and it is tied from the previous measure.
+
+           Checking whether it is tied also works mostly, but will it
+           always do the correct thing?
+
+          */
+         if (!forget && !tie_changes)
            {
              /*
                not really really correct if there are more than one
@@ -127,19 +141,6 @@ Local_key_engraver::process_acknowledged ()
                                                             gh_int2scm (n)),
                                          gh_int2scm (a)); 
 
-#if 0
-             /*
-               TESTME!
-              */
-             if (!tied_l_arr_.find_l (support_l))
-               {
-                 local_key_.clear_internal_forceacc (note_l->pitch_);
-               }
-             else if (tie_changes)
-               {
-                 local_key_.set_internal_forceacc (note_l->pitch_);
-               }
-#endif
            }
         }
 
index 079a829d8a78b5b9c0d051ebe1e46ee4ecb5e84e..c0d1b48748395ae967df0f8d02be4bc26c238e9c 100644 (file)
@@ -160,3 +160,9 @@ Molecule::create_scheme () const
                  gh_cons (ly_interval2scm (dim_[X_AXIS]),
                           ly_interval2scm (dim_[Y_AXIS])));
 }
+
+Box
+Molecule::extent_box () const
+{
+  return dim_;
+}
index c5d75d3a9f5ddc279748da445227d80d85effde1..3729344c06448cd434d021043bffdba3f4c26d2e 100644 (file)
@@ -153,8 +153,6 @@ Multi_measure_rest_engraver::do_pre_move_processing ()
 void
 Multi_measure_rest_engraver::do_post_move_processing ()
 {
-  Moment now (now_mom ());
-  
   SCM smp = get_property ("measurePosition");
   Moment mp =  (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
   
index bd177cea04372a8b1b9f8d639f7bdf2a09c7c723..5f86f849c14b2ea23226e52ebc26e2b9c810573c 100644 (file)
 void
 Multi_measure_rest::set_interface (Score_element*me)
 {
-  me->set_elt_property ("columns", SCM_EOL);
+  me->set_interface (ly_symbol2scm ("multi-measure-rest-interface"));
 }
 
-/*
+bool
+Multi_measure_rest::has_interface (Score_element*me)
+{
+  return me->has_interface (ly_symbol2scm ("multi-measure-rest-interface"));
+}
+
+  /*
    [TODO]                                      17
  * variable-sized multi-measure rest symbol: |====| ??
 */
index 71c7889a95685c83fca9150194dfe7d29190c9f5..b0b97cb9a7b10b1200e3ae7ff116fc174523077a 100644 (file)
@@ -68,9 +68,8 @@ Note_head::brew_molecule (SCM smob)
   SCM style  = me->get_elt_property ("style");
   if (!gh_symbol_p (style))
     {
-      style = ly_symbol2scm("default");
+      return SCM_EOL;
     }
-  
 
   // ugh: use gh_call ()
   Molecule out = me->lookup_l()->afm_find (String ("noteheads-") + 
index 027e73f37e055107819d3f61a13181865198da02..543ca8959468cffb2117def8849cb82bbd5fc505 100644 (file)
 void
 Pitch_squash_engraver::acknowledge_element (Score_element_info i)
 {
+  SCM newpos = get_property ("squashedPosition");
   if (Note_head::has_interface (i.elem_l_))
     {
-      Staff_symbol_referencer::set_position (i.elem_l_,0);
+      i.elem_l_->set_elt_property ("staff-position", newpos);
     }
 }
 
index 06a9cf70fc012540aadb6d01d01570626e8b7c37..2e75fd9a0ece2dccf4a1e347be5f8f9705c4f461 100644 (file)
@@ -59,10 +59,6 @@ Score_element::Score_element(SCM basicprops)
   mutable_property_alist_ = SCM_EOL;
 
   smobify_self ();
-  set_elt_property ("dependencies", SCM_EOL);
-
-  if (get_elt_property ("interfaces") == SCM_UNDEFINED)
-    set_elt_property ("interfaces", SCM_EOL);
 }
 
 
@@ -257,7 +253,7 @@ Score_element::get_molecule ()  const
   if (gh_procedure_p (proc)) 
     mol = gh_apply (proc, gh_list (this->self_scm (), SCM_UNDEFINED));
 
-
+    
   SCM origin =get_elt_property ("origin");
   if (!unsmob_input (origin))
     origin =ly_symbol2scm ("no-origin");
@@ -268,8 +264,17 @@ Score_element::get_molecule ()  const
        mol = gh_cons (gh_list (origin, gh_car (mol), SCM_UNDEFINED), gh_cdr (mol));
     }
 
-  
-  return create_molecule (mol);
+
+  Molecule m (create_molecule (mol));
+
+  /*
+    This is almost the same as setting molecule-callback to #f, but
+    this retains the dimensions of this element, which means that you
+    can erase elements individually.  */
+  if (to_boolean (get_elt_property ("transparent")))
+    m = Molecule (m.extent_box (), SCM_EOL);
+
+  return m;
 }
 
 
index 558d0786a2f3ea819490d8dab33e2958bbe1094a..83ae6ac0452a5dbb865ec0c65962638094772288 100644 (file)
@@ -82,7 +82,7 @@ void
 Translator_def::set_acceptor (SCM name, bool add)
 {
   if (add)
-    this->accepts_name_list_ = gh_append2 (this->accepts_name_list_, gh_cons (name, SCM_EOL));
+    this->accepts_name_list_ = gh_cons (name, this->accepts_name_list_);
   else
     this->accepts_name_list_ = scm_delete_x (name, this->accepts_name_list_);
 }
@@ -136,14 +136,14 @@ void
 Translator_def::add_push_property (SCM props, SCM syms,  SCM vals)
 {
   this->property_ops_ = gh_cons (gh_list (push_sym, props, syms, vals, SCM_UNDEFINED),
-                                   this->property_ops_);
+                                this->property_ops_);
 }
 
 void
 Translator_def::add_pop_property (SCM props, SCM syms)
 {
   this->property_ops_ = gh_cons (gh_list (push_sym, props, syms, SCM_UNDEFINED),
-                                 this->property_ops_);
+                                this->property_ops_);
 }
 
 /*
@@ -175,7 +175,6 @@ Translator_def::path_to_acceptable_translator (SCM type_str, Music_output_def* o
       accepted_arr.push (t);
     }
 
-
   Link_array<Translator_def> best_result;
   for (int i=0; i < accepted_arr.size (); i++)
     if (scm_equal_p (accepted_arr[i]->type_name_, type_str) == SCM_BOOL_T)
@@ -240,6 +239,19 @@ Translator_def::instantiate (Music_output_def* md)
   tg->output_def_l_ = md;
   tg->definition_ = self_scm ();
   tg->type_str_ = ly_scm2string (type_name_);
+  SCM l1 = trans_list (consists_name_list_, tg);
+  SCM l2 =trans_list (end_consists_name_list_,tg);
+  l1 = scm_reverse_x (l1, l2);
+  
+  tg->simple_trans_list_ = l1;
+  
+  return tg;
+}
+
+
+void
+Translator_def::apply_property_operations (Translator_group*tg)
+{
   SCM correct_order = scm_reverse (property_ops_); // pity of the mem.
   for (SCM s = correct_order; gh_pair_p (s); s = gh_cdr (s))
     {
@@ -259,14 +271,6 @@ Translator_def::instantiate (Music_output_def* md)
          tg->set_property (gh_car(entry), gh_cadr (entry));
        }
     }
-
-  SCM l1 = trans_list (consists_name_list_, tg);
-  SCM l2 =trans_list (end_consists_name_list_,tg);
-  l1 = scm_reverse_x (l1, l2);
-  
-  tg->simple_trans_list_ = l1;
-  
-  return tg;
 }
 
 SCM
@@ -290,3 +294,13 @@ Translator_def::add_property_assign (SCM nm, SCM val)
                                 this->property_ops_);
 }
 
+/*
+  Default child context as a SCM string, or something else if there is
+  none.
+*/
+SCM
+Translator_def::default_child_context_name ()
+{
+  SCM d = accepts_name_list_;
+  return gh_pair_p (d) ? gh_car (scm_last_pair (d)) : SCM_EOL;
+}
index 02eb4c7fb95e42b23b417e6f3133e2330ae61890..19b54bb2aab51f4525d78951cde98d455e70ce45 100644 (file)
@@ -115,7 +115,7 @@ Translator_group::find_create_translator_l (String n, String id)
     return existing;
 
   Link_array<Translator_def> path
-    = unsmob_translator_def (definition_)->path_to_acceptable_translator (gh_str02scm (n.ch_C()), output_def_l ());
+    = unsmob_translator_def (definition_)->path_to_acceptable_translator (ly_str02scm ((char*)n.ch_C()), output_def_l ());
 
   if (path.size ())
     {
@@ -227,7 +227,8 @@ Translator_group::get_simple_translator (String type) const
 bool
 Translator_group::is_bottom_translator_b () const
 {
-  return unsmob_translator_def (definition_)->accepts_name_list_ == SCM_EOL;
+  return !gh_string_p (unsmob_translator_def (definition_)->default_child_context_name ());
+
 }
 
 Translator_group*
@@ -235,8 +236,8 @@ Translator_group::get_default_interpreter()
 {
   if (!is_bottom_translator_b ())
     {
-      SCM nm = unsmob_translator_def (definition_)->accepts_name_list_;
-      SCM st = output_def_l ()->find_translator_l (gh_car (nm));
+      SCM nm = unsmob_translator_def (definition_)->default_child_context_name ();
+      SCM st = output_def_l ()->find_translator_l (nm);
 
       Translator_def *t = unsmob_translator_def (st);
       if (!t)
@@ -280,6 +281,7 @@ Translator_group::do_print() const
 void
 Translator_group::do_add_processing ()
 {
+  unsmob_translator_def (definition_)->apply_property_operations (this);
   for (SCM s = simple_trans_list_; gh_pair_p (s) ; s = gh_cdr (s))
     {
       Translator * t = unsmob_translator (gh_car (s));
index c34e936bcbd19a921848dd6e55b41f1afd470968..5ba0d7f4f610193680282a14b2d995c5f46b0347 100644 (file)
@@ -533,7 +533,7 @@ ScoreContext = \translator {
        )
        
        basicDynamicLineSpannerProperties = #`(
-               (interfaces . (dynamic-interface axis-group-interface))
+               (interfaces . (dynamic-interface axis-group-interface side-position-interface))
                (axes . ( 1))
                (padding . 3)
                (minimum-space . 6)
@@ -606,7 +606,7 @@ ScoreContext = \translator {
                (name . "lyric syllable") 
        )
        basicMarkProperties = #`(
-         (interfaces . (mark-interface))
+         (interfaces . (mark-interface side-position-interface))
          (molecule-callback . ,Text_item::brew_molecule)       
          (breakable . #t)
          (visibility-lambda . ,end-of-line-invisible)
@@ -626,6 +626,7 @@ ScoreContext = \translator {
        )
        basicNoteHeadProperties = #`(
                (interfaces . (note-head-interface rhythmic-head-interface))
+               (style . default)
                (molecule-callback . ,Note_head::brew_molecule)
                (name . "note head")
        )
@@ -661,7 +662,7 @@ ScoreContext = \translator {
        )
        basicScriptProperties = #`(
                (molecule-callback . ,Script::brew_molecule)
-               (interfaces . (script-interface))
+               (interfaces . (script-interface side-position-interface))
                (name . "script")
        )
        basicScriptColumnProperties = #`(
@@ -734,7 +735,7 @@ ScoreContext = \translator {
        basicTextScriptProperties = #`(
                (molecule-callback . ,Text_item::brew_molecule)
                (no-spacing-rods . #t)
-               (interfaces . (text-script-interface text-item-interface))
+               (interfaces . (text-script-interface text-item-interface side-position-interface))
                (padding .      3.0)
                (name . "text script") 
        )
@@ -800,7 +801,7 @@ ScoreContext = \translator {
                (name . "separation spanner")
        )
        basicSustainPedalProperties = #`(
-               (interfaces . (sustain-pedal-interface))
+               (interfaces . (sustain-pedal-interface  side-position-interface))
                (no-spacing-rods . #t)
                (molecule-callback . ,Sustain_pedal::brew_molecule)
                (self-alignment-X . 0)
@@ -813,7 +814,7 @@ ScoreContext = \translator {
                (self-alignment-X . 0)
                (name . "una chorda pedal")
        )
-       
+
        basicVoltaSpannerProperties = #`(
                (molecule-callback . ,Volta_spanner::brew_molecule)
                (interfaces . (volta-spanner-interface side-position-interface))
diff --git a/ly/legal.ly b/ly/legal.ly
new file mode 100644 (file)
index 0000000..8ec3c9a
--- /dev/null
@@ -0,0 +1,4 @@
+% legal.ly
+
+hsize = 8.5 \in;
+vsize = 14.0 \in;
index 0147f1da292b511fa51ae8cdcce67a24ec6eed91..54e93d7e921786662648331a6b237909f1ea9739 100644 (file)
@@ -1,11 +1,12 @@
 #!@PYTHON@
 
 
-# TODO: Rewrite this.  The control structure is too hairy.
-#
-
 # TODO:
-# Should use files in /tmp/ only.  This potentially messes with
+#
+# * Rewrite this.  The control structure is too hairy.
+# * (c) on page 1
+# * more helpful info on lily crashes
+# * Should use files in /tmp/ only.  This potentially messes with
 # usergenerated files in the CWD