From: Han-Wen Nienhuys Date: Wed, 4 Sep 2002 21:57:27 +0000 (+0000) Subject: 2002-09-04 Han-Wen Nienhuys X-Git-Tag: release/1.6.2~9 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=32a71f7129b30d3f999499364fa4470b2d050dbb;p=lilypond.git 2002-09-04 Han-Wen Nienhuys * 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 --- diff --git a/ChangeLog b/ChangeLog index 1af96a0d54..c058e4ffba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2002-09-04 Han-Wen Nienhuys + + * 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 * input/test/ancient-font.ly, input/test/ancient-time.ly, diff --git a/Documentation/user/appendices.itely b/Documentation/user/appendices.itely index 444219144d..fc1e7726f5 100644 --- a/Documentation/user/appendices.itely +++ b/Documentation/user/appendices.itely @@ -210,6 +210,7 @@ accessed directly using text markup such as @lilypondfile{feta16list.ly} +@c parmesan is too big. Apparently pythons re's choke on this. +@c @lil ypondfile{parmesan16list.ly} -@lilypondfile{parmesan16list.ly} diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index e0acc8c558..cce9320f13 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -2019,6 +2019,8 @@ is to put the grace notes before a phantom ``space note'', e.g. @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. @@ -2033,14 +2035,7 @@ expressions. Nesting, juxtaposing, or ending sequential music with a 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 diff --git a/THANKS b/THANKS index aa960dff5a..6ef18f9bb0 100644 --- a/THANKS +++ b/THANKS @@ -9,5 +9,5 @@ BUG HUNTERS Karl-Johan Karlsson Karl Berry Jeremie Lumbroso - +Erik Sandberg diff --git a/input/test/clef-end-of-line.ly b/input/test/clef-end-of-line.ly new file mode 100644 index 0000000000..d0245f7816 --- /dev/null +++ b/input/test/clef-end-of-line.ly @@ -0,0 +1,32 @@ +\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 +} } diff --git a/input/trip.ly b/input/trip.ly index 8f49d5babd..5d9d2047ed 100644 --- a/input/trip.ly +++ b/input/trip.ly @@ -198,7 +198,6 @@ fugaIIPedal = \notes \relative c { %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 @@ -219,20 +218,7 @@ fis8-\rtoe fis4-\rtoe [e8-\ltoe a-\rtoe] | > > - - \paper { - - \translator { - \OrchestralScoreContext - } - \translator { \PianoStaffContext - \consists "Instrument_name_engraver" - } - \translator { \StaffContext - \consists "Instrument_name_engraver" - } - } - +\paper {} \midi { \tempo 4 =96 } } diff --git a/lily/grob-pq-engraver.cc b/lily/grob-pq-engraver.cc index 0dfe3f7828..3d1d350e0a 100644 --- a/lily/grob-pq-engraver.cc +++ b/lily/grob-pq-engraver.cc @@ -28,6 +28,7 @@ int compare (Grob_mom const &a, Grob_mom const &b) return Moment::compare (a.end_, b.end_); } + class Grob_pq_engraver: public Engraver { public: @@ -76,59 +77,41 @@ Grob_pq_engraver::acknowledge_grob (Grob_info gi) } } +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 @@ -140,7 +123,11 @@ Grob_pq_engraver::start_translation_timestep () 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); } @@ -152,7 +139,8 @@ Grob_pq_engraver::start_translation_timestep () 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", diff --git a/lily/staff-spacing.cc b/lily/staff-spacing.cc index cf931c2f23..bc95433a78 100644 --- a/lily/staff-spacing.cc +++ b/lily/staff-spacing.cc @@ -203,6 +203,13 @@ Staff_spacing::get_spacing_params (Grob *me, Real * space, Real * fixed) &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. diff --git a/lily/stem-engraver.cc b/lily/stem-engraver.cc index 07ff23e07e..25c5f01954 100644 --- a/lily/stem-engraver.cc +++ b/lily/stem-engraver.cc @@ -79,7 +79,11 @@ Stem_engraver::acknowledge_grob (Grob_info i) 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); diff --git a/scm/grob-description.scm b/scm/grob-description.scm index 542c52141e..9b412c4df5 100644 --- a/scm/grob-description.scm +++ b/scm/grob-description.scm @@ -330,7 +330,7 @@ (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 ))))