From: fred Date: Tue, 5 Nov 1996 14:41:53 +0000 (+0000) Subject: lilypond-0.0.8 X-Git-Tag: release/1.5.59~6907 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e9ed760d93a15607cd2136adf9c00e18a8e5ca0a;p=lilypond.git lilypond-0.0.8 --- diff --git a/paper.cc b/paper.cc index a0e533f626..89f9a9fe5c 100644 --- a/paper.cc +++ b/paper.cc @@ -1,16 +1,33 @@ +#include + #include "paper.hh" #include "debug.hh" #include "lookupsyms.hh" #include "dimen.hh" #include "textdb.hh" +double log2(double x) { + return log(x) /log(2.0); +} + + +// golden ratio +const Real PHI = (1+sqrt(5))/2; + +// see Roelofs, p. 57 +Real +Paperdef::duration_to_dist(Real d) +{ + return whole_width * pow(geometric_, log2(d)); +} + Paperdef::Paperdef() { - linewidth = convert_dimen(15,"cm"); // in cm for now - whole_width= convert_dimen(2,"cm"); lookup_ = new Lookup(); parse(); - + linewidth = convert_dimen(15,"cm"); // in cm for now + whole_width= 6*note_width(); + geometric_ = PHI; } void