assert (col_l);
- for (Cons<Mudela_note>** pp = &open_note_l_list_.head_cons_p_; *pp;)
+ for (PCursor<Mudela_note*> i (open_note_l_list_.top ()); i.ok (); )
{
- Cons<Mudela_note>* i = *pp;
- if ((i->car_p_->pitch_i_ == pitch_i) && (i->car_p_->channel_i_ == channel_i))
+ if ((i->pitch_i_ == pitch_i) && (i->channel_i_ == channel_i))
{
- i->car_p_->end_column_l_ = col_l;
- delete open_note_l_list_.remove_cons_p (pp);
+ i->end_column_l_ = col_l;
+ // LOGOUT(DEBUG_ver) << "Note: " << pitch_i;
+ // LOGOUT(DEBUG_ver) << "; " << i->mudela_column_l_->at_mom_;
+ // LOGOUT(DEBUG_ver) << ", " << i->end_column_l_->at_mom_ << '\n';
+ i.remove_p();
return;
}
else
- pp = &i->next_cons_p_;
+ i++;
}
warning (_f ("junking note-end event: channel = %d, pitch = %d",
channel_i, pitch_i));
{
// find
assert (col_l);
- for (Cons<Mudela_note>* i = open_note_l_list_.head_cons_p_; i; i = i->next_cons_p_)
+ for (PCursor<Mudela_note*> i (open_note_l_list_.top ()); i.ok (); )
{
- i->car_p_->end_column_l_ = col_l;
+ i->end_column_l_ = col_l;
+ i.remove_p ();
}
- open_note_l_list_.init ();
}
Mudela_staff*
{
Mudela_note* p = new Mudela_note (col_l, channel_i, pitch_i, dyn_i);
item_p = p;
- open_note_l_list_.append (new Cons<Mudela_note> (p, 0));
+ open_note_l_list_.bottom ().add (p);
}
else
{
note_end (col_l, channel_i, pitch_i, dyn_i);
}
}
-
// POLYPHONIC_AFTERTOUCH [\xa0-\xaf]
else if ((byte >= 0xa0) && (byte <= 0xaf))
{