]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.89
authorfred <fred>
Tue, 26 Mar 2002 23:55:53 +0000 (23:55 +0000)
committerfred <fred>
Tue, 26 Mar 2002 23:55:53 +0000 (23:55 +0000)
14 files changed:
input/test/part-combine-moments.ly [new file with mode: 0644]
input/test/part-combine-staff.ly
lily/grace-iterator.cc
lily/include/music-iterator.hh
lily/include/music-wrapper-iterator.hh
lily/include/sequential-music-iterator.hh
lily/include/simple-music-iterator.hh
lily/music-iterator.cc
lily/request-chord-iterator.cc
lily/simple-music-iterator.cc
ly/declarations-as.ly
ly/params-as.ly
mutopia/Coriolan/coriolan-paper.ly
mutopia/Coriolan/coriolan-part-combine-paper.ly

diff --git a/input/test/part-combine-moments.ly b/input/test/part-combine-moments.ly
new file mode 100644 (file)
index 0000000..79c8ff4
--- /dev/null
@@ -0,0 +1,99 @@
+\score{
+       \context PianoStaff <
+               \context StaffCombineStaff=one \skip 1*2;
+               \context StaffCombineStaff=two \skip 1*2;
+               \context StaffCombineStaff=one \partcombine StaffCombineStaff
+                       \context StaffCombineVoice=one \notes\relative c''
+                               {
+                                       c4 d e f\break
+                                       c2 e4 f\break
+                               }
+                       \context StaffCombineVoice=two \notes\relative c''
+                               {
+                                       c4 d e f
+                                       c2 e2
+                               }
+               >
+       \paper {
+
+               textheight = 295.0\mm;
+               linewidth = 180.0\mm;
+
+               \translator{ \HaraKiriStaffContext }
+               %
+               % The Voice combine hierarchy
+               %
+               \translator{
+                       \ThreadContext
+                       \name "VoiceCombineThread";
+                       \consists "Rest_engraver";
+               }
+               \translator{
+                       \VoiceContext
+                       \name "VoiceCombineVoice";
+                       soloText = #"I."
+                       soloIIText = #"II."
+                       \remove "Rest_engraver";
+                       \accepts "VoiceCombineThread";
+               }
+               \translator{
+                       \HaraKiriStaffContext
+                       \consists "Mark_engraver";
+                       \name "VoiceCombineStaff";
+                       \accepts "VoiceCombineVoice";
+               }
+
+               %
+               % The Staff combine hierarchy
+               %
+               \translator{
+                       \ThreadContext
+                       \name "StaffCombineThread";
+               }
+               \translator{
+                       \VoiceContext
+                       \name "StaffCombineVoice";
+                       \accepts "StaffCombineThread";
+                       \consists "Thread_devnull_engraver";
+               }
+               \translator {
+                       \HaraKiriStaffContext
+                       \name "StaffCombineStaff";
+                       \accepts "StaffCombineVoice";
+
+                       soloADue = ##t
+                       soloText = #""
+                       soloIIText = #""
+                       aDueText = #""
+                       splitInterval = #'(1 . 0)
+                       changeMoment = #`(,(make-moment 1 1) . ,(make-moment 1 1))
+
+               }
+               \translator {
+                       \StaffGroupContext
+                       \accepts "VoiceCombineStaff";
+                       \accepts "StaffCombineStaff";
+               }
+               \translator{ \HaraKiriStaffContext }
+
+               \translator {
+                       \ScoreContext
+                       \accepts "VoiceCombineStaff";
+                       \accepts "StaffCombineStaff";
+                       skipBars = ##t 
+
+                       barScriptPadding = #2.0 % dimension \pt
+                       markScriptPadding = #4.0
+
+                       %% urg: in pt?
+                       barNumberScriptPadding = #15
+                       %% URG: this changes dynamics too
+                       %%textStyle = #"italic"
+                       timeSignatureStyle = #"C"
+                       instrumentScriptPadding = #60  %% urg, this is in pt
+                       instrScriptPadding = #40 %% urg, this is in pt
+                       marginScriptHorizontalAlignment = #1
+                       maximumRestCount = #1
+               }
+       }
+}
index 0446b20bd044c49bc7be0d2c4264f02cf924b020..7590a333e0a46b6be4c3a70a4d03c883ce23be72 100644 (file)
@@ -1,7 +1,7 @@
 \score{
        \context PianoStaff <
-               \context StaffCombineStaff=one \skip 1*6;
-               \context StaffCombineStaff=two \skip 1*6;
+               \context StaffCombineStaff=one \skip 1*7;
+               \context StaffCombineStaff=two \skip 1*7;
                \context StaffCombineStaff=one \partcombine StaffCombineStaff
                        \context StaffCombineVoice=one \notes\relative c''
                                {
@@ -10,7 +10,8 @@
                                        c d e f
                                        c4 d e f\break
                                        a8 a a a b b b b
-                                       a,4 a a a
+                                       a,4 a a a\break
+                                       c2 e4 f\break
                                }
                        \context StaffCombineVoice=two \notes\relative c''
                                {
@@ -20,6 +21,7 @@
                                        c,4 d e f
                                        a8 a a a b b b b
                                        a4 a a a
+                                       c2 e2
                                }
                >
        \paper {
@@ -74,6 +76,7 @@
                        soloIIText = #""
                        aDueText = #""
                        splitInterval = #'(1 . 0)
+                       changeMoment = #`(,(make-moment 1 1) . ,(make-moment 1 1))
 
                }
                \translator {
index ddcd3a401b34a33eb764f8a1c1c0fbca42463e11..c2459b310ec0975c6ab03e11bc30c2a9645355b7 100644 (file)
@@ -27,7 +27,7 @@ Grace_iterator::construct_children ()
 }
 
 void
-Grace_iterator::process (Moment m)
+Grace_iterator::process (Moment)
 {
   Global_translator * t = dynamic_cast<Global_translator*>(report_to_l ());
   if (t)
index 2f9c6cf7cc887f3109c0b8353a75972315dbc396..1709a5d8e81bec1c212171f594cd8b45438904fd 100644 (file)
     thus changing the state of the interpretation context.
 
   get_music (M) -- return all events starting at M (pre: no events
-    before M).  Side effects:
+    before M). No side-effects
 
-    * This removes all events at M from the pending queue.
+  skip (M) -- remove all events starting before M (leave the ones that
+    start M).  no side-effects on interpretation context
 
-  Because next (M) is rolled into process () as a side effect,
-  we need to roll next (M) into get_music too.  Urg.
-    
+
+  TODO:
+
+  merge pending_moment and process.
+  
 */
 class Music_iterator
 {
+protected:
+  Moment music_length_;
+
 public:
   VIRTUAL_COPY_CONS (Music_iterator);
 
+  Moment music_length_mom () const;
+
+  
   Music_iterator ();
   Music_iterator (Music_iterator const&);
   virtual ~Music_iterator ();
@@ -57,7 +66,7 @@ public:
      then its children. Returns the iterator that succeeded
   */
   Music_iterator *  try_music (Music  *) const;
-
+  
   /**
     The translation unit that we this iterator is reporting  to now.
    */
@@ -75,6 +84,7 @@ public:
   virtual bool ok () const;
   virtual SCM get_music (Moment until)const;
   virtual void process (Moment until);
+  virtual void skip (Moment until);
 
   /**
     Construct sub-iterators, and set the translator to 
index cbe4fa382715944a173161b5a9c088ebd4a0d47a..d7a346a56632ddc1361afa8eab60d6d425d5fa70 100644 (file)
@@ -30,6 +30,7 @@ public:
   virtual Moment pending_moment () const;
   virtual bool ok () const;
   virtual SCM get_music (Moment)const;
+  virtual void skip (Moment);
 
 protected:
   virtual void process (Moment);
index 5661f260bd6bd58579af7fe6e2e7f636ebc8a645..d4f83c4585bd32a8125ec2b3416b3e8faaeb6d41 100644 (file)
@@ -26,6 +26,7 @@ public:
   virtual void construct_children ();
   virtual Moment pending_moment () const;
   virtual bool ok () const;
+  virtual void skip (Moment);
   virtual SCM get_music (Moment)const;
 
 protected:
@@ -38,12 +39,7 @@ private:
   SCM cursor_;
   Music_iterator * iter_p_;
 
-  /*
-    perhaps these can be virtual and protected iso. private?  
-   */
-  void start_next_element();
-  void leave_element();
-  void set_sequential_music_translator();
+  void descend_to_child ();
 };
 
 #endif // SEQUENTIAL_MUSIC_ITERATOR_HH
index 6d86c1c35cddb93f57bca56ce245bf6165512d46..963eb0c616e5cbaddbc26b32f624d29e5872aef5 100644 (file)
 class Simple_music_iterator : public Music_iterator
 {
 protected:
-  Moment length_mom_;
+
   Moment last_processed_mom_;
 public:
   VIRTUAL_COPY_CONS (Music_iterator);
   Simple_music_iterator ();
   Simple_music_iterator (Simple_music_iterator const &);
   virtual void process (Moment);
-  virtual bool ok()const;
+  virtual bool ok ()const;
   virtual Moment pending_moment ()const;
-  virtual void construct_children ();
+  virtual void skip (Moment);
 };
 
 #endif /* SIMPLE_MUSIC_ITERATOR_HH */
index 51ae61f1ce333ff0c6bd46d767dfb3492989f3e0..8c3c2fe3a68822abbf0aa33f859717a69d9f24c2 100644 (file)
@@ -51,6 +51,7 @@ Music_iterator::Music_iterator (Music_iterator const& src)
   //  clone_i_ = src.clone_i_ + 1;
   handle_ = *src.handle_.clone ();
   music_l_ = src.music_l_;
+  music_length_ = src.music_length_;
 }
 
 Music_iterator::~Music_iterator ()
@@ -96,6 +97,11 @@ Music_iterator::ok () const
   return false;
 }
 
+void
+Music_iterator::skip (Moment )
+{
+}
+
 SCM
 Music_iterator::get_music (Moment)const
 {
@@ -150,9 +156,18 @@ Music_iterator::static_get_iterator_p (Music *m)
     }
 
   p->music_l_ = m;
+  p->music_length_ = m->length_mom ();
+  
   return p;
 }
 
+
+Moment
+Music_iterator::music_length_mom() const
+{
+  return music_length_;
+}
+
 void
 Music_iterator::init_translator (Music *m, Translator_group *report_l)
 {
index f463190a342dc3223c4939a5cdf54c902aba8516..080240a8b519b726b25d9dc6d8e1e3fe58d0009c 100644 (file)
@@ -45,9 +45,8 @@ Request_chord_iterator::elt_l () const
   return (Request_chord*) music_l_;
 }
 
-
 SCM
-Request_chord_iterator::get_music (Moment)const
+Request_chord_iterator::get_music (Moment) const
 {
   SCM s = SCM_EOL;
   if (music_l_)
@@ -65,7 +64,6 @@ Request_chord_iterator::get_music (Moment)const
 void
 Request_chord_iterator::process (Moment m)
 {
-  last_processed_mom_ = m;
   if (music_l_)
     {
       for (SCM s = dynamic_cast<Music_sequence *> (music_l_)->music_list ();
@@ -83,7 +81,6 @@ Request_chord_iterator::process (Moment m)
            mus->origin ()->warning (_f ("Huh?  Not a Request: `%s'",
                                         classname (mus)));
        }
-
-     music_l_ =0;
     }
+  skip (m);
 }
index a25147d4e9e7f6a0a806c40733cd8baf830dcd22..c4a78e9583a8f9048b2ba200a233ad4d1a7959f4 100644 (file)
@@ -20,19 +20,13 @@ Simple_music_iterator::Simple_music_iterator ()
 Simple_music_iterator::Simple_music_iterator (Simple_music_iterator const &src)
   : Music_iterator (src)
 {
-  last_processed_mom_ = -1;
-}
-
-void
-Simple_music_iterator::construct_children ()
-{
-  length_mom_ = music_l_->length_mom ();
+  last_processed_mom_ = src.last_processed_mom_;
 }
 
 bool
 Simple_music_iterator::ok ()const
 {
-  return last_processed_mom_ < length_mom_;
+  return last_processed_mom_ < music_length_mom ();
 }
 
 Moment
@@ -41,7 +35,14 @@ Simple_music_iterator::pending_moment ()const
   if (music_l_)
     return Moment (0);
   else
-    return length_mom_;
+    return music_length_mom ();
+}
+
+void
+Simple_music_iterator::skip (Moment m)
+{
+  music_l_ = 0;
+  last_processed_mom_ = m;
 }
 
 void
@@ -59,6 +60,5 @@ Simple_music_iterator::process (Moment m)
                                          classname (music_l_)));
     }
 #endif
-  music_l_ = 0;
-  last_processed_mom_ = m;
+  skip (m);
 }
index ceae9b08aa8fd78a82fb62e9d8721422baa3ec14..d0caa74ac3c6679de2c9bbfc3794539593e3fbff 100644 (file)
@@ -6,10 +6,11 @@ breve = \duration #'( -1 0)
 longa = \duration #'( -2 0 )
 maxima = \duration #'( -3 0 )
 
-#(eval-string (ly-gulp-file "generic-property.scm"))
-
-% urg, move to basic property?
-#(eval-string (ly-gulp-file "slur.scm"))
+#(begin
+  (eval-string (ly-gulp-file "slur.scm"))
+  (eval-string (ly-gulp-file "generic-property.scm"))
+  (eval-string (ly-gulp-file "basic-properties.scm"))
+ )
 
 \include "nederlands.ly"               % dutch
 \include "chord-modifiers.ly"
index 58ab2b6bd28bb7f41bb153c1eedc53f5c0f8f566..f805540d6973a8796b34d4442e29e5612018dcf4 100644 (file)
@@ -15,6 +15,9 @@ indent = 8.0\char;
 staffspace = (\staffheight - 1.0 ) / 4.0;
 stafflinethickness = \staffspace / 2.0;
 
+% deprecated
+interline = \staffspace;
+
 %{
 The space taken by a note is determined by the formula 
 
@@ -26,8 +29,10 @@ arithmetic_basicspace.  The smallest space is the one following the
 shortest note in the measure.  Typically arithmetic_basicspace is set
 to the width of a quarter note head.
 %}
+% quartwidth == 1.32 * staffspace
 arithmetic_basicspace = 2.;
-arithmetic_multiplier = 0.9 * \quartwidth ;
+%arithmetic_multiplier = 0.9 * \quartwidth ;
+arithmetic_multiplier = 0.9 * 1.32 * \staffspace;
 
 
 % catch suspect beam slopes, set slope to zero if
index 08cc643ca32eef9a7e2b19554cab39d8e16f710f..e8d1a3358c3473b30f0270dc9fb9101311a1b3ca 100644 (file)
@@ -1,4 +1,5 @@
 \paper{
+       \paper_sixteen
 
        textheight = 295.0\mm;
        linewidth = 180.0\mm;
@@ -50,6 +51,7 @@
                soloIIText = #""
                aDueText = #""
                splitInterval = #'(1 . 0)
+               changeMoment = #`(,(make-moment 1 1) . ,(make-moment 1 1))
        }
        \translator {
                \StaffGroupContext
index b78365c2a89f8e8ecb1927b3c01e354c647f3452..844bf454e3ebe602bef00871b4363437a48bf0d0 100644 (file)
@@ -50,6 +50,7 @@
                soloIIText = #""
                aDueText = #""
                splitInterval = #'(1 . 0)
+               changeMoment = #`(,(make-moment 1 1) . ,(make-moment 1 1))
        }
        \translator {
                \StaffGroupContext