- /* Make new notes in score for all pressed notes. */
- for (i = 0; i < scherzo->notes_pressed.num_notes; i++) {
- note = scherzo->notes_pressed.notes[i];
- new_note = score_add_note (note->staff, note->pitch, note->duration);
- scherzo->notes_pressed.notes[i] = new_note;
- }
-
- /* Then remove all previously pedaled notes from the score. */
- for (i = scherzo->notes_pedaled.num_notes - 1; i >=0; i--) {
- note = scherzo->notes_pedaled.notes[i];
- score_remove_note (note);
- note_group_remove_note_at (&scherzo->notes_pedaled, i);
- }
+ /* Remove all previously pedaled notes. */
+ for (i = scherzo->notes_pedaled.num_pitches - 1; i >=0; i--)
+ pitch_group_remove_pitch_at (&scherzo->notes_pedaled, i);