Identifier(String n) ;
virtual ~Identifier();
virtual Staff * staff() { assert(false); }
+ virtual Voice * voice() { assert(false); }
};
struct Staff_id : Identifier {
~Staff_id();
};
-
-
+struct Voice_id : Identifier {
+ Voice_id(String s, Voice*st):Identifier(s) { data = st; }
+ virtual Voice * voice() { return (Voice*)data; }
+ ~Voice_id();
+};
#endif // IDENTIFIER_HH
return i;
}
-double log2(double x) {
- return log(x) /log(2.0);
-}
-
-
-// golden ratio
- const Real PHI = (1+sqrt(5))/2;
-const double ENGRAVERS_SPACE = PHI;
-
-
-
-
-Real
-duration_to_idealspace(Real d, Real w)
-{
- // see Roelofs, p. 57
- return w * pow(ENGRAVERS_SPACE, log2(d));
-}
-
-
-
-
Real when(const Voice_element*)const;
Real last() const;
Voice();
- Voice( Voice const&);
+ Voice(Voice const&);
void add(Voice_element*);
void print() const;
};