X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=score.h;h=c5d275de0bc4e7614f1effed1ff6ea5d5f42308a;hb=d38e3c6abf6d5aeb287ec1d1262015d8b4a81198;hp=d5391012bb428e26f901a8432535ce797f3c8700;hpb=e77d712bf9f99c3d95f909621ae177b9f8175163;p=scherzo diff --git a/score.h b/score.h index d539101..c5d275d 100644 --- a/score.h +++ b/score.h @@ -51,19 +51,6 @@ typedef enum score_duration typedef struct score score_t; typedef struct score_staff score_staff_t; -typedef struct score_note -{ - score_staff_t *staff; - pitch_t pitch; - score_duration_t duration; - - struct { - double r; - double g; - double b; - } color; -} score_note_t; - typedef struct score_chord { score_staff_t *staff; @@ -114,10 +101,15 @@ score_add_staff (score_t *score, score_clef_t clef); * _EIGHTH, etc.) or numerical as simply the denominator (WHOLE=1, * QUARTER=4, EIGHTH=8, etc.) */ -score_note_t * -score_add_note (score_staff_t *staff, - pitch_t pitch, - score_duration_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) */ +void +score_add_note (score_t *score, pitch_t pitch, score_duration_t duration); /* Add a chord symbol of 'name' to a staff. * @@ -134,22 +126,14 @@ score_add_chord (score_staff_t *staff, void score_remove_chord (score_chord_t *chord); -/* Remove the given note from its staff. */ + +/* Remove all notes from the given staff. */ void -score_remove_note (score_note_t *note); +score_staff_remove_notes (score_staff_t *staff); +/* Remove all notes from the score. */ void -score_set_note_color_rgb (score_note_t *note, - double r, - double g, - double b); - -/* Return the first note on the given staff with the given pitch, - * octave, and durations. Returns NULL if no match is found. */ -score_note_t * -score_staff_find_note (score_staff_t *staff, - pitch_t pitch, - score_duration_t duration); +score_remove_notes (score_t *score); /* Draw the given score_t onto the given cairo_t. *