From 64633a3eaa744f21cc82933f0622abed9683a284 Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 19:30:22 +0000 Subject: [PATCH] lilypond-0.0.27 --- configure | 2 +- input/error.ly | 29 +++++++++++++++++++++++++++++ src/simplewalker.cc | 32 +++++++++++++++++--------------- 3 files changed, 47 insertions(+), 16 deletions(-) create mode 100644 input/error.ly diff --git a/configure b/configure index b10d461235..000f31cdc1 100755 --- a/configure +++ b/configure @@ -3,7 +3,7 @@ PREFIX=${PREFIX:-.} echo using PREFIX=$PREFIX -NEEDFLOWERVER=1.0.22 +NEEDFLOWERVER=1.0.2 flowertar=flower-$NEEDFLOWERVER here=`pwd` cd .. diff --git a/input/error.ly b/input/error.ly new file mode 100644 index 0000000000..49dd24665b --- /dev/null +++ b/input/error.ly @@ -0,0 +1,29 @@ +mwa = music { + $ + ab % ok, warning, still output? +% \bla % ok, fatal +% & % ok, fatal +% c d ) ] % ok, fatal + c [ d +% c ) d ] e % no location :-( + + $ +} + +bla = music { + @ + These Gates will open just like windows. + @ +} + +score { + staff { + lyric music { bla } + } + staff { + melodic music { mwa } + } + commands { + meter 2*4 + } +} diff --git a/src/simplewalker.cc b/src/simplewalker.cc index 05bc76c9b6..f99d9f5213 100644 --- a/src/simplewalker.cc +++ b/src/simplewalker.cc @@ -20,36 +20,39 @@ #include "slur.hh" #include "localkeyitem.hh" #include "textitem.hh" - +#include "misc.hh" Rhythmic_grouping -parse_grouping(Array a, Moment one_beat) +parse_grouping(Array const &a) { Array r; - for (int i= 0 ; i < a.size(); i++) - r.push(a[i]); - Moment here =0.0; + Array grouplen_arr; + for (int i= 0 ; i < a.size()/2; ) { + r.push(a[i++]); + grouplen_arr.push(Moment(1,(int) a[i++])); + } + Moment here =0; Array children; for (int i=0; i < r.size(); i++) { Moment last = here; - here += one_beat * r[i]; + here += grouplen_arr[i] * Rational(r[i]); children.push( - new Rhythmic_grouping(MInterval(last, here), r[i] ) - ); + new Rhythmic_grouping(MInterval(last, here), r[i] )); } return Rhythmic_grouping(children); } + + void Simple_walker::do_INTERPRET_command(Command*com) { Array args(com->args); args.del(0); if (com->args[0] == "GROUPING") { - default_grouping = parse_grouping(args, - col()->tdescription_->one_beat); + default_grouping = parse_grouping(args); }else if (com->args[0] == "NEWMEASURE") { local_key_.reset(key_); @@ -178,8 +181,7 @@ Simple_walker::process_requests() if (c->beam_ && c->beam_->spantype == Span_req::START) { if (beam_) - error("Too many beams (t = " - +String(c->when())+")"); + error("Too many beams (t = " +String(c->when())+")"); beam_ = new Beam; assert(!current_grouping); current_grouping = new Rhythmic_grouping; @@ -190,7 +192,7 @@ Simple_walker::process_requests() if (sl->spantype == Span_req::START) { if (find_slur(sl->elt_l_->voice_l_)>=0) - error_t("Too many slurs in voice", *col()->tdescription_); + error( "Too many slurs in voice", sl->defined_ch_c_l_m ); pending_slur_reqs.push(sl); pending_slurs.push(new Slur); } @@ -225,7 +227,7 @@ Simple_walker::process_requests() if (c->beam_&& c->beam_->spantype == Span_req::STOP) { if (!beam_) { - error_t("No beam to end", *col()->tdescription_); + error( "No beam to end", c->beam_->defined_ch_c_l_m ); } default_grouping.extend(current_grouping->interval()); beam_->set_grouping(default_grouping, *current_grouping); @@ -261,7 +263,7 @@ Simple_walker::process_requests() if (sl->spantype == Span_req::STOP) { int idx = find_slur(sl->elt_l_->voice_l_); if (idx < 0) - error_t("can't find slur to end; ", *c->tdescription_); + error( "can't find slur end", sl->defined_ch_c_l_m ); pscore_l_->typeset_spanner(pending_slurs[idx], s->theline_l_); -- 2.39.5