* input/test/clef-end-of-line.ly: new file.
* lily/stem-engraver.cc (acknowledge_grob): warn about too long
tremolos. Thanks to Erik Sandberg
* input/trip.ly (fugaIIPedal): small cleanups.
* lily/grob-pq-engraver.cc: more helpful message.
(stop_translation_timestep): use scm_merge_x for merging the lists.
* Documentation/user/appendices.itely: switch off parmesan listing
+2002-09-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ * input/test/clef-end-of-line.ly: new file.
+
+ * lily/stem-engraver.cc (acknowledge_grob): warn about too long
+ tremolos. Thanks to Erik Sandberg
+
+ * input/trip.ly (fugaIIPedal): small cleanups.
+
+ * lily/grob-pq-engraver.cc: more helpful message.
+ (stop_translation_timestep): use scm_merge_x for merging the lists.
+
+ * Documentation/user/appendices.itely: switch off parmesan listing
+
2002-09-01 Juergen Reuter <reuter@ipd.uka.de>
* input/test/ancient-font.ly, input/test/ancient-time.ly,
@lilypondfile{feta16list.ly}
+@c parmesan is too big. Apparently pythons re's choke on this.
+@c @lil ypondfile{parmesan16list.ly}
-@lilypondfile{parmesan16list.ly}
@refbugs
+Grace notes can not be used in the smallest size (@file{paper11.ly}).
+
Grace note synchronization can also lead to surprises. Staff notation,
such as key signatures, barlines, etc. are also synchronized. Take
care when you mix staffs with grace notes and staffs without.
grace section is not supported, and might produce crashes or other
errors.
-@menu
-* Glissando ::
-* Dynamics::
-@end menu
-
-
-@c . {Glissando}
@node Glissando
@subsection Glissando
@cindex Glissando
Karl-Johan Karlsson
Karl Berry
Jeremie Lumbroso
-
+Erik Sandberg
--- /dev/null
+\header {
+
+ texidoc = "Scales, but with clef and key signature at the end of the line."
+
+}
+
+\score {
+ \notes \transpose c'' {
+ \property Staff.Clef \set #'break-visibility = #end-of-line-visible
+ \property Staff.KeySignature \set #'break-visibility = #end-of-line-visible
+ \property Staff.explicitClefVisibility = #end-of-line-visible
+ \property Staff.explicitKeySignatureVisibility = #end-of-line-visible
+
+ % We want the time sig to take space, otherwise there is not
+ % enough white at the start of the line.
+ %
+
+ \property Staff.TimeSignature \set #'transparent = ##t
+ \property Score.defaultBarType = #"empty"
+
+ c1 d e f g a b c
+ \key d \major
+ \break
+
+ % see above.
+ \time 4/4
+
+ d e fis g a b cis d
+ \key g \major
+ \break
+ \time 4/4
+} }
%13
\property Staff.PhrasingSlur \override #'dashed = #5.0
c4 \( ( d ) e\) f
-
% r4 fis,4-\ltoe e4.-\lheel e'8-\rheel |
% tie accs: 2nd should get no acc
>
>
-
- \paper {
-
- \translator {
- \OrchestralScoreContext
- }
- \translator { \PianoStaffContext
- \consists "Instrument_name_engraver"
- }
- \translator { \StaffContext
- \consists "Instrument_name_engraver"
- }
- }
-
+\paper {}
\midi {
\tempo 4 =96 }
}
return Moment::compare (a.end_, b.end_);
}
+
class Grob_pq_engraver: public Engraver
{
public:
}
}
+LY_DEFINE(ly_grob_pq_less_p,
+ "ly-grob-pq-less?", 2 , 0 ,0, (SCM a, SCM b),
+ "Compare 2 Grob PQ entries. Internal")
+{
+ if ( Moment::compare (*unsmob_moment (gh_car (a)),
+ *unsmob_moment (gh_car (b))) < 0)
+ return SCM_BOOL_T;
+ else
+ return SCM_BOOL_F;
+}
+
+
void
Grob_pq_engraver::stop_translation_timestep ()
{
Moment now = now_mom();
current_grobs_.sort (&compare);
-
+ SCM current_list = SCM_EOL;
+ for (int i = current_grobs_.size(); i--;)
+ current_list = scm_cons (scm_cons (current_grobs_[i].end_.smobbed_copy(),
+ current_grobs_[i].grob_->self_scm ()), current_list);
+
+ /*
+ We generate some garbage here.
+ */
SCM busy = get_property ("busyGrobs");
while (gh_pair_p (busy) && *unsmob_moment (gh_caar (busy)) == now)
{
busy = gh_cdr (busy);
}
- SCM start = busy;
- SCM * current_cell = &start;
-
- int i = 0;
- while (i < current_grobs_.size ())
- {
- Moment stop;
- stop.set_infinite (1);
-
- if (gh_pair_p (busy))
- {
- SCM h = gh_car (busy);
- stop = *unsmob_moment (gh_car (h));
- }
-
- Moment current_stop = current_grobs_[i].end_;
- if (current_stop <= stop)
- {
- SCM new_entry = gh_cons (current_stop.smobbed_copy(),
- current_grobs_[i].grob_->self_scm ());
-
- /*
- Insert before BUSY.
- */
- i ++;
- *current_cell = gh_cons (new_entry, busy);
- current_cell = SCM_CDRLOC(*current_cell);
- }
- else
- {
- /*
- if current_stop > stop, then stop != infty, and we
- apparently have a next entry */
- busy = gh_cdr (busy);
- current_cell = SCM_CDRLOC(*current_cell);
- }
- }
-
+ busy = scm_merge_x (current_list, busy, ly_grob_pq_less_p_proc);
current_grobs_.clear ();
- daddy_trans_->set_property ("busyGrobs", start);
+ daddy_trans_->set_property ("busyGrobs", busy);
}
void
SCM busy = start_busy;
while (gh_pair_p (busy) && *unsmob_moment (gh_caar (busy)) < now)
{
- programming_error ("Skipped something ?!");
+ /*
+ Todo: do something sensible. The grob-pq-engraver is not water
+ tight, and stuff like tupletSpannerDuration confuses it.
+ */
+ programming_error (_f("Skipped something?\nGrob %s ended before I expected it to end.", unsmob_grob (gh_cdar (busy))->name().to_str0()));
busy = gh_cdr (busy);
}
ENTER_DESCRIPTION(Grob_pq_engraver,
-/* descr */ "Administrate when certain grobs (eg. note heads) stop playing.
+/* descr */ "Administrate when certain grobs (eg. note heads) stop playing; this
+engraver is a sort-of a failure, since it doesn't handle all sorts of borderline cases very well.
",
/* creats*/ "",
/* acks */ "grob-interface",
&last_ext);
if (!last_grob)
{
+ /*
+ TODO:
+
+ Should insert a adjustable space here? For excercises, you might want to
+ use a staff without a clef in the beginning.
+ */
+
/*
we used to have a warning here, but itgenerates a lot of
spurious error messages.
the first and last (quarter) note bothe get one tremolo flag.
*/
int requested_type = gh_scm2int (tremolo_req_->get_mus_property ("tremolo-type"));
-
+ if (requested_type <= 8)
+ {
+ tremolo_req_->origin()->warning (_("tremolo duration is too long"));
+ requested_type = 0;
+ }
SCM f = get_property ("tremoloFlags");
if (!requested_type && gh_number_p (f))
requested_type = gh_scm2int (f);
(staff-bar . (extra-space . 0.0))
(breathing-sign . (minimum-space . 0.0))
(clef . (extra-space . 1.0))
- (first-note . (extra-space . 0.0))
+ (first-note . (extra-space . 1.0))
(key-signature . (extra-space . 0.0))
))
(meta . ((interfaces . (break-aligned-interface item-interface ))))