]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.8
authorfred <fred>
Tue, 5 Nov 1996 14:18:45 +0000 (14:18 +0000)
committerfred <fred>
Tue, 5 Nov 1996 14:18:45 +0000 (14:18 +0000)
identifier.hh
misc.cc
voice.hh

index 0510f181d1d530eb19a41d2f5c9b002318124261..9cb80386c0a51ae15bff1b52a8177012419499ee 100644 (file)
@@ -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 174e4224bcec5e436aa84cb21830e77e14cb9a6e..54746fd836001b2d804e751b40a719ebeaf1e448 100644 (file)
--- 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));
-}
-
-
-
-
index 59b0dc831515a06cb05914a5a9e25012163c9a66..7180ece99ec6af9fd137fa51a291705ba7e11a2c 100644 (file)
--- 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;
 };