- if (scherzo->challenge.note) {
- staff = scherzo->challenge.staff;
- } else if (octave >= 4) {
- staff = scherzo->treble;
- } else {
- staff = scherzo->bass;
- }
-
- /* Do nothing if this note is already pressed. */
- for (i = 0; i < scherzo->notes_pressed.num_notes; i++) {
- if (scherzo->notes_pressed.notes[i]->pitch == pitch &&
- scherzo->notes_pressed.notes[i]->octave == octave)
- {
- return scherzo->notes_pressed.notes[i];
- }
- }
-
- note = score_add_note (staff, pitch, octave, SCORE_DURATION_WHOLE);
-
- note_group_add_note (&scherzo->notes_pressed, note);
+ for (i = 0; i < group->num_pitches; i++)
+ if (group->pitches[i] == pitch)
+ pitch_group_remove_pitch_at (group, i);
+}