audio/midi_region.h file

API for Region's specific to instrument Track's.

Contents

Functions

auto midi_region_new(const Position* start_pos, const Position* end_pos, int is_main) -> MidiRegion*
Creates a new Region for MIDI notes.
void midi_region_add_midi_note(MidiRegion* region, MidiNote* midi_note)
Adds midi note to region.
auto midi_region_pop_unended_note(MidiRegion* self, int pitch) -> MidiNote*
Returns the midi note with the given pitch from the unended notes.
void midi_region_print_midi_notes(Region* self)
Prints the MidiNotes in the Region.
auto midi_region_get_first_midi_note(MidiRegion* region) -> MidiNote*
Gets first midi note.
auto midi_region_get_last_midi_note(MidiRegion* region) -> MidiNote*
Gets last midi note.
auto midi_region_get_highest_midi_note(MidiRegion* region) -> MidiNote*
Gets highest midi note.
auto midi_region_get_lowest_midi_note(MidiRegion* region) -> MidiNote*
Gets lowest midi note.
void midi_region_remove_midi_note(Region* region, MidiNote* midi_note, int free, int pub_event)
Removes the MIDI note from the Region.
void midi_region_remove_all_midi_notes(MidiRegion* region)
Removes all MIDI ntoes and their components completely.
void midi_region_write_to_midi_file(const Region* self, MIDI_FILE* mf, const int add_region_start, const int export_full)
Returns the midi note at given position with the given pitch.
void midi_region_export_to_midi_file(const Region* self, const char* full_path, int midi_version, const int export_full)
Exports the Region to a specified MIDI file.
auto midi_region_get_midi_ch(const Region* self) -> uint8_t
Returns the MIDI channel that this region should be played on, starting from 1.
auto midi_region_get_as_events(const Region* self, const int add_region_start, const int full) -> MidiEvents*
Returns a newly initialized MidiEvents with the contents of the region converted into events.
void midi_region_free_members(MidiRegion* self)
Frees members only but not the midi region itself.