#ifndef BEAM_HH
#define BEAM_HH
#include "proto.hh"
-#include "spanner.hh"
+#include "directionalspanner.hh"
#include "plist.hh"
/// a beam connects multiple stems
-struct Beam: public Spanner {
+struct Beam: public Directional_spanner {
PointerList<Stem*> stems;
Real slope;
Real left_pos;
- /// -1 below heads, +1 above heads.
- int dir;
+ /// dir: -1 below heads, +1 above heads.
+
Rhythmic_grouping *group;
/****************/
virtual Interval width()const;
-
+ Offset center() const;
Spanner *broken_at(PCol *, PCol *) const;
Beam();
void add(Stem*);
#ifndef SLUR_HH
#define SLUR_HH
-#include "spanner.hh"
+#include "directionalspanner.hh"
#include "fproto.hh"
#include "vray.hh"
-struct Slur : Spanner {
+struct Slur : Directional_spanner {
svec<Notehead*> encompass;
- int dir;
+ //int dir;
bool open_left,open_right;
/****************/
-
+ Offset center() const;
+ void calculate();
void print()const;
void preprocess();
void add(Notehead*);
#include "misc.hh"
#include "glob.hh"
+#include "moment.hh"
#include <math.h>
-Real
+Moment
wholes(int dur, int dots)
{
if (!dur)
return 0.0;
// stupid Intel: doesn't crash if !dur
- Real f = 1.0/Real(dur);
- Real delta = f;
+ Moment f = 1/Moment(dur);
+ Moment delta = f;
while (dots--) {
delta /= 2.0;