staff->num_chords -= 1;
}
-score_note_t *
+void
score_staff_add_note (score_staff_t *staff,
pitch_t pitch,
score_duration_t duration)
if (note->pitch == pitch &&
note->duration == duration)
{
- return note;
+ return;
}
}
note = talloc (staff, score_note_t);
if (note == NULL)
- return NULL;
+ return;
note->staff = staff;
note->pitch = pitch;
staff->num_notes);
if (staff->notes == NULL) {
staff->num_notes = 0;
- return NULL;
+ return;
}
staff->notes[staff->num_notes - 1] = note;
-
- return note;
}
-score_note_t *
+void
score_add_note (score_t *score, pitch_t pitch, score_duration_t duration)
{
score_staff_t *staff, *nearest_staff = NULL;
/* Nothing to do if we have no staff, (there's no place to add a note) . */
if (score->num_staves == 0)
- return NULL;
+ return;
/* Find the staff where the note will be closest to the center of
* the staff. */
}
}
- return score_staff_add_note (nearest_staff, pitch, duration);
+ score_staff_add_note (nearest_staff, pitch, duration);
}
void
* _EIGHTH, etc.) or numerical as simply the denominator (WHOLE=1,
* QUARTER=4, EIGHTH=8, etc.)
*/
-score_note_t *
+void
score_staff_add_note (score_staff_t *staff,
pitch_t pitch,
score_duration_t duration);
/* Add a note to the score, (automatically selecting the nearest
* staff) */
-score_note_t *
+void
score_add_note (score_t *score, pitch_t pitch, score_duration_t duration);
/* Add a chord symbol of 'name' to a staff.