From 05120fd34f70f4a21966f62a1768cbe888a27cfe Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 19:30:13 +0000 Subject: [PATCH] lilypond-0.0.27 --- hdr/misc.hh | 5 ++++- src/beam.cc | 6 ++++-- src/inputcommand.cc | 14 ++++++++++---- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/hdr/misc.hh b/hdr/misc.hh index fa87876748..ae288151a2 100644 --- a/hdr/misc.hh +++ b/hdr/misc.hh @@ -1,11 +1,14 @@ #ifndef MISC_HH #define MISC_HH +#include "proto.hh" #include "real.hh" #include "moment.hh" +#include "scalar.hh" Moment wholes(int dur, int dots); - + +Rhythmic_grouping parse_grouping(const Array &a); double log_2(double x) ; int intlog2(int d); inline int diff --git a/src/beam.cc b/src/beam.cc index abf94d157b..52080a39ab 100644 --- a/src/beam.cc +++ b/src/beam.cc @@ -1,3 +1,5 @@ +#include "varray.hh" + #include "dimen.hh" #include "beam.hh" #include "misc.hh" @@ -72,8 +74,8 @@ Beam::set_default_dir() int dirs[2]; dirs[0]=0; dirs[1] =0; for (iter_top(stems,i); i.ok(); i++) { - i->set_default_dir(); - dirs[(i->dir+1)/2] ++; + int d = i->get_default_dir(); + dirs[(d+1)/2] ++; } dir = (dirs[0] > dirs[1]) ? -1 : 1; for (iter_top(stems,i); i.ok(); i++) { diff --git a/src/inputcommand.cc b/src/inputcommand.cc index 251adedc85..aab0ea4a8b 100644 --- a/src/inputcommand.cc +++ b/src/inputcommand.cc @@ -158,18 +158,24 @@ get_bar_command(String w) } Array -get_default_grouping(int count) +get_default_grouping(int count, int one_beat_note) { Array s; if (!(count % 3 )) { - for (int i=0; i < count/3; i++) + for (int i=0; i < count/3; i++) { s.push(3); + s.push(one_beat_note); + } } else if (!(count %2)) { - for (int i=0; i < count/2; i++) + for (int i=0; i < count/2; i++) { s.push(2); + s.push(one_beat_note); + } + }else { s.push(2); - s.concat(get_default_grouping(count-2)); + s.push(one_beat_note); + s.concat(get_default_grouping(count-2, one_beat_note)); } return s; } -- 2.39.5