audio/snap_grid.h file

Snap/grid information.

Contents

Enums

enum NoteType { NOTE_TYPE_NORMAL, NOTE_TYPE_DOTTED, NOTE_TYPE_TRIPLET }

Functions

void snap_grid_update_snap_points(SnapGrid* self)
Updates snap points.
auto snap_grid_get_note_ticks(NoteLength note_length, NoteType note_type) -> int
Sets note length and re-calculates snap points.
auto snap_grid_stringize(NoteLength note_length, NoteType note_type) -> char*
Sets note type and re-calculates snap points.
auto snap_grid_get_nearby_snap_point(SnapGrid* self, const Position* pos, const int return_prev) -> Position*
Returns the next or previous SnapGrid point.

Enum documentation

enum NoteType

Enumerators
NOTE_TYPE_NORMAL
NOTE_TYPE_DOTTED

2/3 of its original size

NOTE_TYPE_TRIPLET

3/2 of its original size

Function documentation

int snap_grid_get_note_ticks(NoteLength note_length, NoteType note_type)

Sets note length and re-calculates snap points.

Gets given note length and type in ticks.

Sets note length and re-calculates snap points.

char* snap_grid_stringize(NoteLength note_length, NoteType note_type)

Sets note type and re-calculates snap points.

Returns the grid intensity as a human-readable string.

Must be free'd.

Sets note type and re-calculates snap points.

Must be free'd.

Position* snap_grid_get_nearby_snap_point(SnapGrid* self, const Position* pos, const int return_prev)

Returns the next or previous SnapGrid point.

Parameters
self Snap grid to search in.
pos Position to search for.
return_prev 1 to return the previous element or 0 to return the next.

Must not be free'd.

Returns the next or previous SnapGrid point.