file
midi_region.hAPI for Region's specific to instrument Track's.
Functions
- auto midi_region_new(const Position* start_pos, const Position* end_pos, unsigned int track_name_hash, int lane_pos, int idx_inside_lane) -> ZRegion*
- Creates a new ZRegion for MIDI notes.
- auto midi_region_new_from_midi_file(const Position* start_pos, const char* abs_path, unsigned int track_name_hash, int lane_pos, int idx_inside_lane, int idx) -> ZRegion*
- Creates a MIDI region from the given MIDI file path, starting at the given Position.
- auto midi_region_new_from_chord_descr(const Position* pos, ChordDescriptor* descr, unsigned int track_name_hash, int lane_pos, int idx_inside_lane) -> ZRegion*
- Create a region from the chord descriptor.
- void midi_region_insert_midi_note(ZRegion* region, MidiNote* midi_note, int idx, int pub_events)
- Inserts the MidiNote to the given ZRegion.
- void midi_region_start_unended_note(ZRegion* self, Position* start_pos, Position* end_pos, int pitch, int vel, int pub_events)
- Starts an unended note with the given pitch and velocity and adds it to ZRegion::
midi_notes. - auto midi_region_pop_unended_note(ZRegion* self, int pitch) -> MidiNote*
- Returns the midi note with the given pitch from the unended notes.
- auto midi_region_fill_midi_events(ZRegion* self, const EngineProcessTimeInfo*const time_nfo, bool note_off_at_end, MidiEvents* midi_events) -> OPTIMIZE_O3 REALTIME void
- Fills MIDI event queue from the region.
- void midi_region_print_midi_notes(ZRegion* self)
- Prints the MidiNotes in the Region.
- auto midi_region_get_first_midi_note(ZRegion* region) -> MidiNote*
- Gets first midi note.
- auto midi_region_get_last_midi_note(ZRegion* region) -> MidiNote*
- Gets last midi note.
- auto midi_region_get_highest_midi_note(ZRegion* region) -> MidiNote*
- Gets highest midi note.
- auto midi_region_get_lowest_midi_note(ZRegion* region) -> MidiNote*
- Gets lowest midi note.
- void midi_region_remove_midi_note(ZRegion* region, MidiNote* midi_note, int free, int pub_event)
- Removes the MIDI note from the Region.
- void midi_region_remove_all_midi_notes(ZRegion* region)
- Removes all MIDI ntoes and their components completely.
- void midi_region_write_to_midi_file(const ZRegion* self, MIDI_FILE* mf, const bool add_region_start, bool export_full)
- Returns the midi note at given position with the given pitch.
- auto midi_region_export_to_midi_file(const ZRegion* self, const char* full_path, int midi_version, const bool export_full) -> NONNULL void
- Exports the ZRegion to a specified MIDI file.
- auto midi_region_get_midi_ch(const ZRegion* self) -> uint8_t
- Returns the MIDI channel that this region should be played on, starting from 1.
- auto midi_region_is_note_playable(const ZRegion* self, const MidiNote* midi_note) -> bool
- Returns whether the given note is not muted and starts within any playable part of the region.
- void midi_region_add_events(const ZRegion* self, MidiEvents* events, const bool add_region_start, const bool full)
- Adds the contents of the region converted into events.
- void midi_region_get_velocities_in_range(const ZRegion* self, const Position* start_pos, const Position* end_pos, Velocity*** velocities, int* num_velocities, size_t* velocities_size, int inside)
- Fills in the array with all the velocities in the project that are within or outside the range given.
- void midi_region_free_members(ZRegion* self)
- Frees members only but not the midi region itself.
Defines
- #define midi_region_add_midi_note(region, midi_note, pub_events)
- Adds the MidiNote to the given ZRegion.