- Moment stop=note_l->duration() + ptr()->when();
- for(int i=0; i < stop_notes.size(); i++)
- if (stop_notes.value_arr_[i]->melodic()->pitch() ==
- note_l->pitch()) {
- if ( stop_notes.indices_arr_[i] < stop){
-
- stop_notes.del(i);
- return ; // removing this gives a feature ( ${c2 c4}$ output correctly)
- }
- else
- return; // skip the stop note
- break;// do the stop note
+ Audio_item *ptr = items_[index_];
+ assert (note->audio_ == ptr);
+ int stop_ticks = int (moment_to_real (note->audio_->length_mom_) * Real (384 * 4))
+ + ptr->audio_column_->ticks ();
+
+ bool play_start = true;
+ for (vsize i = 0; i < stop_note_queue.size (); i++)
+ {
+ /* if this pith already in queue */
+ if (stop_note_queue[i].val->get_semitone_pitch ()
+ == note->get_semitone_pitch ())
+ {
+ if (stop_note_queue[i].key < stop_ticks)
+ {
+ /* let stopnote in queue be ignored,
+ new stop note wins */
+ stop_note_queue[i].ignore_ = true;
+
+ /* don't replay start note, */
+ play_start = false;
+ break;
+ }
+ else
+ {
+ /* skip this stopnote,
+ don't play the start note */
+ note = 0;
+ break;
+ }