- Simultaneous_music*v = new Request_chord;
- v->set_spot (here_input ());
-
- Note_req* n = new Note_req;
- n->pitch_ = tonic;
- n->duration_ = d;
- v->add_music (n);
-
- for (int i = 0; i < add_arr_p->size (); i++)
- {
- Musical_pitch p = tonic;
- Musical_pitch q = (*add_arr_p)[i];
- // duh, c7 should mean <c bes>
- if (q.notename_i_ == 6)
- q.accidental_i_--;
- p.transpose (q);
- (*add_arr_p)[i] = p;
- }
- add_arr_p->sort (Musical_pitch::compare);
- for (int i = 0; i < sub_arr_p->size (); i++)
- {
- Musical_pitch p = tonic;
- Musical_pitch q = (*add_arr_p)[i];
- // duh, c7 should mean <c bes>
- if (q.notename_i_ == 6)
- q.accidental_i_--;
- p.transpose (q);
- (*sub_arr_p)[i] = p;
- }
- sub_arr_p->sort (Musical_pitch::compare);
-
- Musical_pitch third (2);
- Musical_pitch mthird (2, -1);
- Musical_pitch missing;
- missing = tonic;
- missing.transpose (third);
-
- Musical_pitch p;
- p = tonic;
- p.transpose (third);
- p.transpose (mthird);
-
- /*
- must have minimum at 5 (3 is added automatically as missing)
- */
- if (!add_arr_p->size ())
- add_arr_p->push (p);
- else if ((add_arr_p->top () < p) && (add_arr_p->top ().notename_i_ != p.notename_i_))
- add_arr_p->push (p);
- add_arr_p->sort (Musical_pitch::compare);
-
- Array<Musical_pitch> triads;
- triads.push (third); // c e
- triads.push (mthird); // d f
- triads.push (mthird); // e g
- triads.push (third); // f a
- triads.push (third); // g b
- triads.push (mthird); // a c
- triads.push (mthird); // b d
-