From 7e8468d05ccd082a86e55c186da5f52e173a1f7e Mon Sep 17 00:00:00 2001 From: fred Date: Mon, 14 Oct 1996 20:48:06 +0000 Subject: [PATCH] lilypond-0.0.4 --- main.hh | 3 +++ misc.cc | 4 ++-- misc.hh | 7 +++---- paper.cc | 8 ++++++++ paper.hh | 13 +++++++++++++ 5 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 paper.cc create mode 100644 paper.hh diff --git a/main.hh b/main.hh index 264ac3aa78..58928f5142 100644 --- a/main.hh +++ b/main.hh @@ -1,8 +1,11 @@ #ifndef MAIN_HH #define MAIN_HH #include "proto.hh" + void debug_init(); void do_scores(); void add_score(Score * s); void set_default_output(String s); +const char *get_version(); + #endif diff --git a/misc.cc b/misc.cc index effab35896..2be0f81dd6 100644 --- a/misc.cc +++ b/misc.cc @@ -26,10 +26,10 @@ const double WHOLE_SPACE = 5.0; // should be settable from input Real -duration_to_idealspace(Mtime d) +duration_to_idealspace(Mtime d, Real w) { // see Roelofs, p. 57 - return WHOLE_SPACE * pow(ENGRAVERS_SPACE, log2(d)); + return w * pow(ENGRAVERS_SPACE, log2(d)); } diff --git a/misc.hh b/misc.hh index fb8889f551..a22304267f 100644 --- a/misc.hh +++ b/misc.hh @@ -1,8 +1,7 @@ #ifndef MISC_HH #define MISC_HH #include "mtime.hh" -int intlog2(int d); -Real duration_to_idealspace(Mtime d); -class String; -const char *get_version(); +int intlog2(int d); +Real duration_to_idealspace(Mtime d,Real w); + #endif diff --git a/paper.cc b/paper.cc new file mode 100644 index 0000000000..5afee7d56f --- /dev/null +++ b/paper.cc @@ -0,0 +1,8 @@ +#include "paper.hh" +#include "dimen.hh" + +Paperdef::Paperdef() +{ + width = convert_dimen(15,"cm"); // in cm for now + whole_width= convert_dimen(5,"cm"); +} diff --git a/paper.hh b/paper.hh new file mode 100644 index 0000000000..b48391a4b9 --- /dev/null +++ b/paper.hh @@ -0,0 +1,13 @@ + + +#include "real.hh" +#include "string.hh" +struct Paperdef { + Paperdef(); + String outfile; + Real width; + /// how much space does a whole note take (ideally?) + Real whole_width; + // maybe add pointsize? + // symbol init? +}; -- 2.39.5