From: fred Date: Mon, 4 Nov 1996 21:08:59 +0000 (+0000) Subject: lilypond-0.0.7 X-Git-Tag: release/1.5.59~6915 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=31b08b804f99dc278b34ee3f221af52eb5bf4272;p=lilypond.git lilypond-0.0.7 --- diff --git a/TODO b/TODO index d60c09dbb7..1f96a09b76 100644 --- 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 diff --git a/maartje.ly b/maartje.ly index 00d4ea8d5e..50ce2cb577 100644 --- a/maartje.ly +++ b/maartje.ly @@ -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 diff --git a/melodicstaff.cc b/melodicstaff.cc index 60d9a6fd2e..83e038652f 100644 --- a/melodicstaff.cc +++ b/melodicstaff.cc @@ -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 bb0702f143..b897ce0e66 100644 --- 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; }