gui/backend/piano_roll.h file

Piano roll backend.

Contents

Classes

struct MidiNoteDescriptor
A descriptor for a MidiNote, used by the piano roll.
struct PianoRoll
Piano roll serializable backend.

Enums

enum MidiModifier { MIDI_MODIFIER_VELOCITY, MIDI_MODIFIER_PITCH_WHEEL, MIDI_MODIFIER_MOD_WHEEL, MIDI_MODIFIER_AFTERTOUCH }
A MIDI modifier to use to display data for.
enum PianoRollHighlighting { PR_HIGHLIGHT_NONE, PR_HIGHLIGHT_CHORD, PR_HIGHLIGHT_SCALE, PR_HIGHLIGHT_BOTH }
Highlighting for the piano roll.

Typedefs

using MidiModifier = enum MidiModifier
A MIDI modifier to use to display data for.
using PianoRollHighlighting = enum PianoRollHighlighting
Highlighting for the piano roll.
using MidiNoteDescriptor = struct MidiNoteDescriptor
A descriptor for a MidiNote, used by the piano roll.
using PianoRoll = struct PianoRoll
Piano roll serializable backend.

Functions

void piano_roll_add_current_note(PianoRoll* self, MidiNoteDescriptor* descr)
Adds the note if it doesn't exist in the array.
void piano_roll_remove_current_note(PianoRoll* self, MidiNoteDescriptor* descr)
Removes the note if it exists in the array.
auto piano_roll_contains_current_note(PianoRoll* self, MidiNoteDescriptor* descr) -> int
Returns 1 if it contains the given note, 0 otherwise.
auto piano_roll_get_current_track(const PianoRoll* self) -> Track*
Returns the current track whose regions are being shown in the piano roll.
void piano_roll_init_loaded(PianoRoll* self)
Inits the PianoRoll after a Project has been loaded.
auto piano_roll_find_midi_note_descriptor_by_val(PianoRoll* self, int val) -> const MidiNoteDescriptor*
Returns the MidiNoteDescriptor matching the value (0-127).
void piano_roll_set_highlighting(PianoRoll* self, PianoRollHighlighting highlighting)
Updates the highlighting and notifies the UI.
void piano_roll_set_midi_modifier(PianoRoll* self, MidiModifier modifier)
Sets the MIDI modifier.
static void piano_roll_get_visible_notes(PianoRoll* self, MidiNoteDescriptor* arr, int* num)
Gets the visible notes.
void piano_roll_init(PianoRoll* self)
Initializes the PianoRoll.