]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.9
authorfred <fred>
Thu, 7 Nov 1996 23:19:21 +0000 (23:19 +0000)
committerfred <fred>
Thu, 7 Nov 1996 23:19:21 +0000 (23:19 +0000)
hdr/rest.hh [new file with mode: 0644]
hdr/sccol.hh [new file with mode: 0644]
src/notename.cc [new file with mode: 0644]

diff --git a/hdr/rest.hh b/hdr/rest.hh
new file mode 100644 (file)
index 0000000..c5d0d7f
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+  rest.hh -- part of LilyPond
+
+  (c) 1996 Han-Wen Nienhuys
+*/
+
+#ifndef REST_HH
+#define REST_HH
+#include "item.hh"
+
+/// ball at the end of the stem
+struct Rest : public Item
+{
+    int dots;
+    int balltype;
+
+    /****************/
+
+    void preprocess();
+    Rest(int dur,int dots);
+    void print()const;
+private:
+    void brew_molecole();
+};
+/**
+  takes care of:
+
+  * help lines  
+  * proper placing of dots 
+
+  */
+#endif 
+
diff --git a/hdr/sccol.hh b/hdr/sccol.hh
new file mode 100644 (file)
index 0000000..f18b659
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+  sccol.hh -- part of LilyPond
+
+  (c) 1996 Han-Wen Nienhuys
+*/
+
+#ifndef SCCOL_HH
+#define SCCOL_HH
+#include "pcol.hh"
+
+
+struct Score_column {
+
+    /// indirection to column
+    PCol * pcol;
+    /// length of notes/rests in this column
+    svec<Real> durations;
+    
+    Real when;
+
+    /// 
+    bool musical;
+    
+    /****************/
+    
+    Score_column(Real when);       
+    static int compare(Score_column & c1, Score_column &c2) {
+       return sgn(c1.when - c2.when);
+    }
+    void set_breakable() {
+        pcol->set_breakable();
+    }
+    bool used();
+    void print() const;
+};
+/**
+
+    When typesetting hasn't started on PScore yet, the columns which
+    contain data have a rhythmical position. Score_column is the type
+    with a rhythmical time attached to it. The calculation of
+    idealspacing is done with data in these columns. (notably: the
+    #durations# field)
+
+    */
+
+instantiate_compare(Score_column&, Score_column::compare);
+
+#endif // SCCOL_HH
+
diff --git a/src/notename.cc b/src/notename.cc
new file mode 100644 (file)
index 0000000..8ebc4df
--- /dev/null
@@ -0,0 +1,30 @@
+#include "glob.hh"
+#include "string.hh"
+
+
+/// change this along with lex file for other notenames.
+const char *notetab[] = 
+{
+"ceses", "ces", "c", "cis", "cisis",
+"deses", "des", "d", "dis", "disis",
+"eses", "es", "e", "eis", "eisis",
+"feses", "fes", "f", "fis", "fisis",
+"geses", "ges", "g", "gis", "gisis",
+"ases", "as", "a", "ais", "aisis",
+"beses", "bes", "b", "bis", "bisis",
+0
+};
+
+void
+lookup_notename(int &large, int &small, String s)
+{
+    int i;
+    for (i =0; notetab[i]; i++)
+       if (s == notetab[i]) 
+           {
+           large = i /5;
+           small = i %5 - 2;
+           return;         
+           }
+    assert(false);    
+}