a highly automated and intuitive digital audio workstation
No Matches
midi_region.h File Reference

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

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include "utils/types.h"
Include dependency graph for midi_region.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


#define midi_region_add_midi_note(region, midi_note, pub_events)
 Adds the MidiNote to the given ZRegion.


typedef void MIDI_FILE


ZRegionmidi_region_new (const Position *start_pos, const Position *end_pos, unsigned int track_name_hash, int lane_pos, int idx_inside_lane)
 Creates a new ZRegion for MIDI notes.
ZRegionmidi_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)
 Creates a MIDI region from the given MIDI file path, starting at the given Position.
ZRegionmidi_region_new_from_chord_descr (const Position *pos, ChordDescriptor *descr, unsigned int track_name_hash, int lane_pos, int idx_inside_lane)
 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.
MidiNotemidi_region_pop_unended_note (ZRegion *self, int pitch)
 Returns the midi note with the given pitch from the unended notes.
OPTIMIZE_O3 REALTIME void midi_region_fill_midi_events (ZRegion *self, const EngineProcessTimeInfo *const time_nfo, bool note_off_at_end, bool is_note_off_for_loop_or_region_end, MidiEvents *midi_events)
 Fills MIDI event queue from the region.
void midi_region_print_midi_notes (ZRegion *self)
 Prints the MidiNotes in the Region.
MidiNotemidi_region_get_first_midi_note (ZRegion *region)
 Gets first midi note.
MidiNotemidi_region_get_last_midi_note (ZRegion *region)
 Gets last midi note.
MidiNotemidi_region_get_highest_midi_note (ZRegion *region)
 Gets highest midi note.
MidiNotemidi_region_get_lowest_midi_note (ZRegion *region)
 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)
 Exports the ZRegion to an existing MIDI file instance.
NONNULL void midi_region_export_to_midi_file (const ZRegion *self, const char *full_path, int midi_version, const bool export_full)
 Exports the ZRegion to a specified MIDI file.
uint8_t midi_region_get_midi_ch (const ZRegion *self)
 Returns the MIDI channel that this region should be played on, starting from 1.
bool midi_region_is_note_playable (const ZRegion *self, const MidiNote *midi_note)
 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 Position *start, const Position *end, 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.

Detailed Description

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

Definition in file midi_region.h.

Typedef Documentation


typedef void MIDI_FILE

Definition at line 26 of file midi_region.h.