From: fred Date: Sat, 2 Nov 1996 15:04:44 +0000 (+0000) Subject: lilypond-0.0.6 X-Git-Tag: release/1.5.59~6946 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=187c8ef8104cf8cf49a187bb0b75f75bf9b837e9;p=lilypond.git lilypond-0.0.6 --- diff --git a/note.cc b/note.cc index 2307729a3c..bb0702f143 100644 --- a/note.cc +++ b/note.cc @@ -63,8 +63,6 @@ parse_pitch( const char *a, int &j, int &oct, bool & overide_acc, } - mtor << "ov " << overide_acc; - // notename. String nm; while (isalpha(a[j])) @@ -78,8 +76,9 @@ parse_pitch( const char *a, int &j, int &oct, bool & overide_acc, } - lookup_notename(large,small,nm); - mtor << "int "<< large <<" "< 'g') + nm += 'a' - 'h'; + rq->name =nm; + rq->octave = oct; rq->accidental = acc; rq->forceacc = forceacc; rq->balltype = dur; rq->dots = dots; + rq->print(); v->add(rq); return v; @@ -124,7 +128,7 @@ get_rest_element(String, String durstr) rq->balltype = dur; rq->dots = dots; - + rq->print(); v->add(rq); return v; } diff --git a/request.hh b/request.hh index f2dc5f7144..8ebb1468c0 100644 --- a/request.hh +++ b/request.hh @@ -5,14 +5,12 @@ #include "glob.hh" #include "string.hh" +/// a voice element wants something printed struct Request { Voice_element*elt; -#if 0 - enum { - UNKNOWN, NOTE, REST, LYRIC, SCRIPT, CHORD, BEAM, - BRACKET, STEM, SLUR, CRESC, DECRESC, ABSDYNAMIC - } tag; -#endif + + /****************/ + virtual void print()const ; virtual Note_req *note() {return 0;} virtual Rest_req *rest() {return 0;} @@ -53,12 +51,17 @@ struct Request { beams/stems to look up the balls it has to connect to. */ +/// a request with a duration struct Rhythmic_req : Request { int balltype; int dots; + + /****************/ + Real duration() const; Rhythmic_req(Voice_element*); - Rhythmic_req*rhythmic() { return this;} + Rhythmic_req*rhythmic() { return this;} + void print ()const; }; /// Put a note of specified type, height, and with accidental on the staff. @@ -67,8 +70,14 @@ struct Note_req : Rhythmic_req { int octave; int accidental; bool forceacc; + + /****************/ + + // return height from central c (in halflines) + int height()const; Note_req(Voice_element*v); Note_req*note() { return this;} + virtual void print() const; }; /** Staff has to decide if the ball should be hanging left or right. This @@ -83,7 +92,7 @@ based on ottava commands and the appropriate clef. ///Put a rest on the staff. struct Rest_req : Rhythmic_req { - + void print()const; Rest_req(Voice_element*v) : Rhythmic_req(v) { } Rest_req * rest() { return this;} };