From 62b586b229457bdea9a5a9caa9a72338c5336a6d Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 5 Nov 1996 14:18:45 +0000 Subject: [PATCH] lilypond-0.0.8 --- identifier.hh | 8 ++++++-- misc.cc | 22 ---------------------- voice.hh | 2 +- 3 files changed, 7 insertions(+), 25 deletions(-) diff --git a/identifier.hh b/identifier.hh index 0510f181d1..9cb80386c0 100644 --- a/identifier.hh +++ b/identifier.hh @@ -18,6 +18,7 @@ struct Identifier Identifier(String n) ; virtual ~Identifier(); virtual Staff * staff() { assert(false); } + virtual Voice * voice() { assert(false); } }; struct Staff_id : Identifier { @@ -26,7 +27,10 @@ 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 diff --git a/misc.cc b/misc.cc index 174e4224bc..54746fd836 100644 --- a/misc.cc +++ b/misc.cc @@ -12,25 +12,3 @@ int intlog2(int d) { 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)); -} - - - - diff --git a/voice.hh b/voice.hh index 59b0dc8315..7180ece99e 100644 --- a/voice.hh +++ b/voice.hh @@ -14,7 +14,7 @@ struct Voice { Real when(const Voice_element*)const; Real last() const; Voice(); - Voice( Voice const&); + Voice(Voice const&); void add(Voice_element*); void print() const; }; -- 2.39.5