From: fred Date: Sun, 24 Mar 2002 19:52:26 +0000 (+0000) Subject: lilypond-0.1.0 X-Git-Tag: release/1.5.59~4197 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=99a6c98952802613a8530f95ff984b7635098a95;p=lilypond.git lilypond-0.1.0 --- diff --git a/VERSION b/VERSION index 85b19ba549..e014f462b8 100644 --- a/VERSION +++ b/VERSION @@ -1,7 +1,8 @@ TOPLEVEL_MAJOR_VERSION = 0 -TOPLEVEL_MINOR_VERSION = 0 -TOPLEVEL_PATCH_LEVEL = 78 -# use to send patches, always empty for released version: -# include separator: ".postfix", "-pl" makes rpm barf +TOPLEVEL_MINOR_VERSION = 1 +TOPLEVEL_PATCH_LEVEL = 0 +# use to send patches, always empty for released version: +# include separator: ".postfix", don't use -, +# it makes rpm barf TOPLEVEL_MY_PATCH_LEVEL = diff --git a/bin/conflily b/bin/conflily index 2a495a1308..f63f8e972f 100644 --- a/bin/conflily +++ b/bin/conflily @@ -31,5 +31,5 @@ if [ "x$LILYINCLUDE" = "x" ]; then echo "export PATH=$PATH:$lelie/current/bin/out/" fi -configure --prefix=$root --enable-debugging --enable-printing --enable-checking +configure --prefix=/usr --enable-debugging --enable-printing --enable-checking diff --git a/configure.in b/configure.in index f209a26110..4df3d11ff7 100644 --- a/configure.in +++ b/configure.in @@ -315,11 +315,13 @@ END if test $warn_b = "yes" ; then cat <default_solution(); delete sp; diff --git a/lily/colhpos.cc b/lily/colhpos.cc index e96b3f99ad..e87c22f3c5 100644 --- a/lily/colhpos.cc +++ b/lily/colhpos.cc @@ -6,7 +6,7 @@ Col_hpositions::Col_hpositions() { - energy = INFTY; + energy = INFTY_f; ugh_b_ = false; } diff --git a/lily/include/const.hh b/lily/include/const.hh index 80342a4450..4b45edc597 100644 --- a/lily/include/const.hh +++ b/lily/include/const.hh @@ -3,8 +3,11 @@ */ #ifndef CONST_HH #define CONST_HH +#include #include #include "real.hh" const Real INFTY=HUGE_VAL; +const Real INFTY_f=(Real)INT_MAX; + #endif diff --git a/lily/include/performer-group-performer.hh b/lily/include/performer-group-performer.hh index ae87b68b19..fdca52a576 100644 --- a/lily/include/performer-group-performer.hh +++ b/lily/include/performer-group-performer.hh @@ -32,6 +32,11 @@ public: virtual bool do_try_request( Request* req_l ); virtual bool try_request(Request*r) { return Performer::try_request(r) ; } + // + virtual void set_track( int& track_i_r ); + virtual int get_track_i() const; + // + protected: virtual Translator* find_get_translator_l( String name, String id ); @@ -46,8 +51,8 @@ protected: bool is_bottom_performer_b() const; virtual Performer_group_performer* find_performer_l( String name, String id ); - virtual void do_print()const; + private: Pointer_list perf_p_list_; diff --git a/lily/include/performer.hh b/lily/include/performer.hh index f9b47a6f84..35911605d9 100644 --- a/lily/include/performer.hh +++ b/lily/include/performer.hh @@ -28,6 +28,11 @@ public: virtual void process_requests(); virtual void set( Moment mom ); + // + virtual void set_track( int& track_i_r ); + virtual int get_track_i() const; + // + virtual bool try_request( Request* req_l ); virtual void do_removal_processing(); diff --git a/lily/include/staff-performer.hh b/lily/include/staff-performer.hh index 9161c63224..95c8721da8 100644 --- a/lily/include/staff-performer.hh +++ b/lily/include/staff-performer.hh @@ -24,12 +24,18 @@ protected: virtual void play_event( Midi_item* l ); virtual void do_removal_processing(); virtual void do_creation_processing(); + // + virtual void set_track( int& track_i_r ); + virtual int get_track_i() const; + // private: void header(); Moment midi_mom_; Midi_track* midi_track_p_; + + int track_i_; }; #endif // STAFF_PERFORMER_HH diff --git a/lily/ineq-constrained-qp.cc b/lily/ineq-constrained-qp.cc index 8fed514623..56d9a555ad 100644 --- a/lily/ineq-constrained-qp.cc +++ b/lily/ineq-constrained-qp.cc @@ -75,13 +75,14 @@ Ineq_constrained_qp::eval (Vector v) int min_elt_index(Vector v) { - Real m=INFTY; int idx=-1; + Real m=INFTY_f; + int idx=-1; for (int i = 0; i < v.dim(); i++){ if (v(i) < m) { idx = i; m = v(i); } - assert(v(i) <= INFTY); + assert(v(i) <= INFTY_f); } return idx; } @@ -130,7 +131,7 @@ Ineq_constrained_qp::solve(Vector start) const if (direction.norm() > EPS) { mtor << act.status() << '\n'; - Real minalf = INFTY; + Real minalf = INFTY_f; Inactive_iter minidx(act); diff --git a/lily/note-performer.cc b/lily/note-performer.cc index 9caa676231..430e33c7c7 100644 --- a/lily/note-performer.cc +++ b/lily/note-performer.cc @@ -47,7 +47,7 @@ Note_performer::process_requests() return; // ugh, need to know channel (===track===staff) too - int channel_i = 0; + int channel_i = get_track_i(); Moment mom = get_mom(); if ( !off_mom_ ) { // start note off_mom_ = mom + note_req_l_->duration(); diff --git a/lily/performer-group-performer.cc b/lily/performer-group-performer.cc index 3e3a745c22..66471128e2 100644 --- a/lily/performer-group-performer.cc +++ b/lily/performer-group-performer.cc @@ -132,6 +132,26 @@ Performer_group_performer::process_requests() i->process_requests(); } +// +int +Performer_group_performer::get_track_i() const +{ + int track_i = Performer::get_track_i(); + + for ( int i = 0; i < nongroup_l_arr_.size(); i++ ) + nongroup_l_arr_[ i ]->set_track( track_i ); + + return track_i; +} + +void +Performer_group_performer::set_track( int& track_i_r ) +{ + for ( PCursor i( perf_p_list_.top() ); i.ok(); i++ ) + i->set_track( track_i_r ); +} +// + bool Performer_group_performer::do_try_request( Request* req_l ) { diff --git a/lily/performer.cc b/lily/performer.cc index e26f2ef2da..5e15fc53d6 100644 --- a/lily/performer.cc +++ b/lily/performer.cc @@ -65,6 +65,19 @@ Performer::set( Moment ) { } +// +int +Performer::get_track_i() const +{ + return daddy_perf_l_->get_track_i(); +} + +void +Performer::set_track( int& ) +{ +} +// + bool Performer::do_try_request( Request* req_l ) { diff --git a/lily/score.cc b/lily/score.cc index 77324c3879..531c120f99 100644 --- a/lily/score.cc +++ b/lily/score.cc @@ -58,7 +58,7 @@ Score::run_translator(Global_translator * trans_l) trans_l->start(); while ( iter->ok() || trans_l->moments_left_i() ) { - Moment w = INFTY; + Moment w = INFTY_f; if (iter->ok() ) { w = iter->next_moment(); iter->print(); diff --git a/lily/spring-spacer.cc b/lily/spring-spacer.cc index 0804161edd..7684e5de5f 100644 --- a/lily/spring-spacer.cc +++ b/lily/spring-spacer.cc @@ -8,6 +8,7 @@ #include +#include #include "spring-spacer.hh" #include "p-col.hh" #include "debug.hh" @@ -95,8 +96,8 @@ Spring_spacer::position_loose_cols(Vector &sol_vec)const assert(sol_vec.dim()); Array fix_b_arr; fix_b_arr.set_size(cols.size() + loose_col_arr_.size()); - Real utter_right_f=-INFTY; - Real utter_left_f =INFTY; + Real utter_right_f=-INFTY_f; + Real utter_left_f =INFTY_f; for (int i=0; i < loose_col_arr_.size(); i++) { fix_b_arr[loose_col_arr_[i].rank_i_] = false; } @@ -444,7 +445,7 @@ Spring_spacer::calc_idealspacing() } if ( d_iter.ok() && now >= d_iter.when()) { Durations_iter d2 = d_iter; - Moment shortest = INFTY; + Moment shortest = (Real)INT_MAX; //ugh INFTY; while (d2.ok() && d2.when() <= now) { shortest = shortest add( Moment( 0 ), &instrument ); @@ -79,3 +79,18 @@ Staff_performer::play_event( Midi_item* l ) midi_track_p_->add( delta_t, l); } + +// +int +Staff_performer::get_track_i() const +{ + return track_i_; +} + +void +Staff_performer::set_track( int& track_i_r ) +{ + track_i_ = track_i_r++; +} +// + diff --git a/lily/template5.cc b/lily/template5.cc index 68e30479d9..bffae6d080 100644 --- a/lily/template5.cc +++ b/lily/template5.cc @@ -17,8 +17,9 @@ Interval__instantiate(Rational); Interval__instantiate(int); -#ifdef AIX -const Real INFTY = 1e8; // ARGh. AIX sucks +const Real INFTY_f = (Real)INT_MAX; +#if defined AIX || defined _WIN32 +const Real INFTY = 1e8; // ARGh. AIX sucks -- so does doze #else const Real INFTY = HUGE_VAL; #endif diff --git a/lily/wordwrap.cc b/lily/wordwrap.cc index 8653c071e9..7d25bb9e94 100644 --- a/lily/wordwrap.cc +++ b/lily/wordwrap.cc @@ -57,7 +57,7 @@ Word_wrap::do_solve()const current = stupid_solution(current.cols); current.energy = - 1; // make sure we break out. } else - current.energy = INFTY; // make sure we go back + current.energy = INFTY_f; // make sure we go back } else { current = solve_line(current.cols); current.print();