#include #include "string.hh" #include "real.hh" #include "debug.hh" #include "request.hh" #include "voice.hh" #include "notename.hh" int default_duration = 4; void parse_duration(const char *a, int &j, int &intdur, int &dots) { String durstr; while (isdigit(a[j])) { durstr += a[j++]; } dots=0; while (a[j] == '.') { j++; dots++; } intdur = (durstr.len()) ? durstr.value():default_duration; mtor << "dur " << intdur << "dots " << dots<octave = oct; rq->accidental = acc; rq->forceacc = forceacc; rq->balltype = dur; rq->dots = dots; v->add(rq); return v; } Voice_element * get_rest_element(String, String durstr) { Voice_element*v = new Voice_element; int i=0; int dur, dots; parse_duration(durstr, i, dur, dots); i=0; Rest_req * rq = new Rest_req(v); rq->balltype = dur; rq->dots = dots; v->add(rq); return v; }