]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.27
authorfred <fred>
Sun, 24 Mar 2002 19:30:22 +0000 (19:30 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:30:22 +0000 (19:30 +0000)
configure
input/error.ly [new file with mode: 0644]
src/simplewalker.cc

index b10d46123512b12913a13e21accfc82331039a18..000f31cdc139a4cb995f7323a8e996e6ecc987e6 100755 (executable)
--- 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 (file)
index 0000000..49dd246
--- /dev/null
@@ -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
+       }
+}
index 05bc76c9b6d6534b75cee1170efc5b7772bfa368..f99d9f52136445d3b3699854f4910de549daf2c2 100644 (file)
 #include "slur.hh"
 #include "localkeyitem.hh"
 #include "textitem.hh"
-
+#include "misc.hh"
 
 Rhythmic_grouping
-parse_grouping(Array<Scalar> a, Moment one_beat)
+parse_grouping(Array<Scalar> const &a)
 {
     Array<int> r;
-    for (int i= 0 ; i < a.size(); i++)
-       r.push(a[i]);
-    Moment here =0.0;
+    Array<Moment> 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<Rhythmic_grouping*> 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<Scalar> 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_);