diff options
author | Robert Jonsson <spamatica@gmail.com> | 2010-10-13 19:34:22 +0000 |
---|---|---|
committer | Robert Jonsson <spamatica@gmail.com> | 2010-10-13 19:34:22 +0000 |
commit | 8a2c2824a59d7644e13bc52c9a0ecbd641f21f95 (patch) | |
tree | 064ad3f2bf8daab0ad27b128abd86a9bbdb1e496 /muse2/muse/key.cpp | |
parent | a27706d9629e8b592cca4659f865b70adef24e6d (diff) |
new branch muse2, first checkin
Diffstat (limited to 'muse2/muse/key.cpp')
-rw-r--r-- | muse2/muse/key.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/muse2/muse/key.cpp b/muse2/muse/key.cpp new file mode 100644 index 00000000..0f34f8ea --- /dev/null +++ b/muse2/muse/key.cpp @@ -0,0 +1,35 @@ +//========================================================= +// MusE +// Linux Music Editor +// $Id: key.cpp,v 1.1.1.1 2003/10/27 18:51:22 wschweer Exp $ +// +// (C) Copyright 1999/2000 Werner Schweer (ws@seh.de) +//========================================================= + +#include <stdio.h> +#include "key.h" +#include "globals.h" + +int NKey::offsets[14] = { + 0, 7, 14, -7, + -(12), + -19, -26, -10, -14, -2, -4, -6, -8, 0 + }; + +int NKey::width() const + { + return 25; + } + +//--------------------------------------------------------- +// Scale::width +//--------------------------------------------------------- + +int Scale::width() const + { + int i = val; + if (i < 0) + i = -i; + return i * 7; + } + |