--- /dev/null
+\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
+ }
+ }
+}
\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''
{
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''
{
c,4 d e f
a8 a a a b b b b
a4 a a a
+ c2 e2
}
>
\paper {
soloIIText = #""
aDueText = #""
splitInterval = #'(1 . 0)
+ changeMoment = #`(,(make-moment 1 1) . ,(make-moment 1 1))
}
\translator {
}
void
-Grace_iterator::process (Moment m)
+Grace_iterator::process (Moment)
{
Global_translator * t = dynamic_cast<Global_translator*>(report_to_l ());
if (t)
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 ();
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.
*/
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
virtual Moment pending_moment () const;
virtual bool ok () const;
virtual SCM get_music (Moment)const;
+ virtual void skip (Moment);
protected:
virtual void process (Moment);
virtual void construct_children ();
virtual Moment pending_moment () const;
virtual bool ok () const;
+ virtual void skip (Moment);
virtual SCM get_music (Moment)const;
protected:
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
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 */
// clone_i_ = src.clone_i_ + 1;
handle_ = *src.handle_.clone ();
music_l_ = src.music_l_;
+ music_length_ = src.music_length_;
}
Music_iterator::~Music_iterator ()
return false;
}
+void
+Music_iterator::skip (Moment )
+{
+}
+
SCM
Music_iterator::get_music (Moment)const
{
}
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)
{
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_)
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 ();
mus->origin ()->warning (_f ("Huh? Not a Request: `%s'",
classname (mus)));
}
-
- music_l_ =0;
}
+ skip (m);
}
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
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
classname (music_l_)));
}
#endif
- music_l_ = 0;
- last_processed_mom_ = m;
+ skip (m);
}
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"
staffspace = (\staffheight - 1.0 ) / 4.0;
stafflinethickness = \staffspace / 2.0;
+% deprecated
+interline = \staffspace;
+
%{
The space taken by a note is determined by the formula
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
\paper{
+ \paper_sixteen
textheight = 295.0\mm;
linewidth = 180.0\mm;
soloIIText = #""
aDueText = #""
splitInterval = #'(1 . 0)
+ changeMoment = #`(,(make-moment 1 1) . ,(make-moment 1 1))
}
\translator {
\StaffGroupContext
soloIIText = #""
aDueText = #""
splitInterval = #'(1 . 0)
+ changeMoment = #`(,(make-moment 1 1) . ,(make-moment 1 1))
}
\translator {
\StaffGroupContext