]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.7
authorfred <fred>
Mon, 4 Nov 1996 21:08:59 +0000 (21:08 +0000)
committerfred <fred>
Mon, 4 Nov 1996 21:08:59 +0000 (21:08 +0000)
TODO
maartje.ly
melodicstaff.cc
note.cc

diff --git a/TODO b/TODO
index d60c09dbb723301fdf14310a190418bab04184bb..1f96a09b767ffd26ae1c4566bfcd6385a2fad4ba 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,6 +1,13 @@
-fonttables -> fontdims
-clear IDENTIFIERs
-Paperdef -> fontsize .
-beam + stem
+       * clefs
 
+       * beam
 
+       * fonttables -> fontdims
+
+       * clear IDENTIFIERs
+
+       * Paperdef -> fontsize .
+
+       * merge Paper, Lookup, Outputfile, and Symtable.
+
+       * all places in the code marked TODO! and ugh/ARGH
index 00d4ea8d5ee334872a92def835aecf0fffacd7f1..50ce2cb577a1f630b5e94793349f15722be6e475 100644 (file)
@@ -1,12 +1,10 @@
-
-
 ritme = rhythmstaff {
        voice { $ c2 r32 r32 r16 r8 r4 c2 c2 c2 c2 c2
                c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 $ }
 }
 melody=
 melodicstaff {
-  voice { $ c2.. r8 r4 r8 r16 r32 r32 d8 e8 f8 g8 a8 b8 'c8 c8 r4 c4 c4 c4 c4 c4 c4 $ }
+  voice { $ c2.. r8 r4 r8 r16 r32 r32 d8 e8 f8 g8 ''fis1 a8 b8 'c8 c8 `c8 ``c8 c4 c4  c4 c4 $ }
 }
 score {
        paper {
@@ -14,6 +12,7 @@ score {
        }
        staff { ritme }
        staff { melody }
+%      staff { melody }
        commands {
                meter 4 4
                skip 3:0
index 60d9a6fd2e811cc5f5b2c47be7072f27183898b4..83e038652fff0918936d4356eaf6e392f16ba058 100644 (file)
@@ -1,36 +1,60 @@
 #include "melodicstaff.hh"
+#include "stem.hh"
+
 #include "paper.hh"
 #include "molecule.hh"
 #include "linestaff.hh"
 #include "rhythmstaff.hh"
 #include "sccol.hh" 
 
+const int NO_LINES=5;
+const int BOTTOM_POSITION=2;   // e is on bottom line of 5-staff...
+
 void
 Melodic_staff::set_output(PScore*ps)
 {
-    theline = new Linestaff(5,ps);
+    theline = new Linestaff(NO_LINES,ps);
     Simple_staff::set_output(ps);
 }
 
 void
 Melodic_column::typeset_command(Command *com, int breakst)
 {
-    Item *i = create_command_item(com);
+    Molecule*m=create_command_mol(com);
+    Item *i =new Item;
+    i->output = m;
     typeset_item(i, breakst);
 }
 
 void
 Melodic_column::typeset_req(Request *rq)
 {
-    Item *i = create_req_item(rq);
+    Item *i =new Item;
+    Molecule*m=create_req_mol(rq);
+
     if (rq->note()) {
        int h = rq->note()->height();
        Real dy = staff_->paper()->interline()/2;
-       i->output->translate(Offset(0,(h-2)*dy));
+       m->translate(Offset(0,(h-BOTTOM_POSITION)*dy));
     }
+    i->output = m;
     typeset_item(i);
 }
 
+
+void
+Melodic_column::typeset_stem(Stem_req*rq)
+{
+    Stem * s = new Stem(NO_LINES);
+    int n = the_note->note()->height()-BOTTOM_POSITION;
+    s->minnote =s->maxnote=n;
+    s->flag = rq->stem_number;
+    s->calculate();
+    typeset_item(s);
+    
+    s->brew_molecole();
+}
+
 /*
   creation
   */
diff --git a/note.cc b/note.cc
index bb0702f1433eff9c61459a0593f3969ed9e141ac..b897ce0e6647be29b67843c6a2e34fab8fdef257 100644 (file)
--- a/note.cc
+++ b/note.cc
@@ -32,6 +32,7 @@ parse_duration(const char *a, int &j, int &intdur, int &dots)
 }
 
 
+
 void 
 parse_pitch( const char *a, int &j, int &oct, bool & overide_acc,
             int & large, int & small)
@@ -94,6 +95,11 @@ get_note_element(String pitch, String durstr)
 
     Note_req * rq = new Note_req( v);
 
+    if (dur >= 2) {
+       Stem_req * st = new Stem_req(v, dur);
+       v->add(st);
+    }
+    
     int oct, pit, acc;
     bool forceacc;
     parse_pitch(pitch, i, oct, forceacc, pit, acc);
@@ -111,6 +117,7 @@ get_note_element(String pitch, String durstr)
     rq->print();
 
     v->add(rq);
+
     return v;
 }