X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=score.c;h=0c9d5f37cb37e20d9913e0601ef4b66246ccf777;hb=4000561216687a173abf597a0fd26d2c336954fc;hp=965d127b2b645d89d08ca1d6b51831c68f9117d3;hpb=16d07286a5344861bd26ad97e97612d3806d1da7;p=scherzo diff --git a/score.c b/score.c index 965d127..0c9d5f3 100644 --- a/score.c +++ b/score.c @@ -366,10 +366,10 @@ score_add_staff (score_t *score, score_clef_t clef) } score_note_t * -score_staff_add_note (score_staff_t *staff, - score_pitch_t pitch, - int octave, - score_duration_t duration) +score_add_note (score_staff_t *staff, + score_pitch_t pitch, + int octave, + score_duration_t duration) { score_note_t *note; @@ -377,6 +377,7 @@ score_staff_add_note (score_staff_t *staff, if (note == NULL) return NULL; + note->staff = staff; note->pitch = pitch; note->octave = octave; note->duration = duration; @@ -397,8 +398,9 @@ score_staff_add_note (score_staff_t *staff, } void -score_staff_remove_note (score_staff_t *staff, score_note_t *note) +score_remove_note (score_note_t *note) { + score_staff_t *staff = note->staff; int i; for (i = 0; i < staff->num_notes; i++)