a highly automated and intuitive digital audio workstation
No Matches

Data Structures

struct  AudioFunctionOpts
struct  AutomationPointDrawSettings
 Used for caching. More...
struct  AutomationPoint
 An automation point inside an AutomationTrack. More...
struct  AutomationTrack
struct  AutomationTracklist
 Each track has an automation tracklist with automation tracks to be generated at runtime, and filled in with automation points/curves when loading projects. More...
struct  Channel
 A Channel is part of a Track (excluding Tracks that don't have Channels) and contains information related to routing and the Mixer. More...
struct  ChannelSendTarget
 Send target (used in list views). More...
struct  ChannelSend
 Channel send. More...
struct  ChordDescriptor
 A ChordDescriptor describes a chord and is not linked to any specific object by itself. More...
struct  ChordObject
 A ChordObject to be shown in the TimelineArrangerWidget. More...
struct  AudioClip
 Audio clips for the pool. More...
struct  ControlRoom
 The control room allows to specify how Listen will work on each Channel and to set overall volume after the Master Channel so you can change the volume without touching the Master Fader. More...
struct  CurveOptions
 Curve options. More...
struct  CurveFadePreset
struct  Ditherer
 Ditherer. More...
struct  AudioEngineEvent
 Audio engine event. More...
struct  AudioEnginePositionInfo
struct  AudioEngine
 The audio engine. More...
struct  EngineState
struct  ExportSettings
 Export settings to be passed to the exporter to use. More...
struct  ExtPort
 External port. More...
struct  Fader
 A Fader is a processor that is used for volume controls and pan. More...
struct  Graph
 Graph. More...
struct  GraphNode
 A node in the processing graph. More...
struct  GraphThread
struct  HardwareProcessor
 Hardware processor. More...
struct  Marker
 Marker for the MarkerTrack. More...
struct  Meter
 A Meter used by a single GUI element. More...
struct  Metronome
 Metronome settings. More...
struct  MidiEvent
 Timed MIDI event. More...
struct  MidiEvents
 Container for passing midi events through ports. More...
struct  MidiEventHeader
 Used by Windows MME and RtMidi when adding events to the ring. More...
struct  MidiFunctionOpts
struct  MidiMapping
 A mapping from a MIDI value to a destination. More...
struct  MidiMappings
 All MIDI mappings in Zrythm. More...
struct  MidiNote
 A MIDI note inside a ZRegion shown in the piano roll. More...
struct  ModulatorMacroProcessor
 Modulator macro button processor. More...
struct  AudioPool
 An audio pool is a pool of audio files and their corresponding float arrays in memory that are referenced by regions. More...
struct  PortScalePoint
 Scale point. More...
struct  Port
 Must ONLY be created via port_new() More...
struct  StereoPorts
 L & R port, for convenience. More...
struct  PortConnection
 A connection between two ports. More...
struct  PortConnectionsManager
 Port connections manager. More...
struct  PortIdentifier
 Struct used to identify Ports in the project. More...
struct  Position
 A Position is made up of bars.beats.sixteenths.ticks. More...
struct  QuantizeOptions
struct  RecordingEvent
 A recording event. More...
struct  RecordingManager
struct  ZRegion
 A region (clip) is an object on the timeline that contains either MidiNote's or AudioClip's. More...
struct  RegionIdentifier
 Index/identifier for a Region, so we can get Region objects quickly with it without searching by name. More...
struct  RegionLinkGroup
 A group of linked regions. More...
struct  RegionLinkGroupManager
 Manager of region link groups. More...
struct  Router
struct  SamplePlayback
 A sample playback handle to be used by the engine. More...
struct  SampleProcessor
 A processor to be used in the routing graph for playing samples independent of the timeline. More...
struct  MusicalScale
 Musical scale descriptor. More...
struct  ScaleObject
 A ScaleObject to be shown in the TimelineArrangerWidget. More...
struct  SnapGrid
struct  Stretcher
 Stretcher interface. More...
struct  InstrumentTrack
 Track to be inserted into the Project's Tracklist. More...
struct  TrackLane
 A TrackLane belongs to a Track (can have many TrackLanes in a Track) and contains Regions. More...
struct  TrackProcessor
 A TrackProcessor is a processor that is used as the first entry point when processing a track. More...
struct  Tracklist
 The Tracklist contains all the tracks in the Project. More...
struct  Transport
 The transport. More...
struct  Velocity
 The MidiNote velocity. More...


#define audio_function_get_detailed_action_for_type_default(type)    audio_function_get_detailed_action_for_type (type, "app.editor-function")
 Number of frames for built-in fade (additional to object fades).
#define automation_point_is_selected(r)    arranger_object_is_selected ((ArrangerObject *) r)
 Release time in ms when in touch record mode.
#define CHANNEL_MAGIC   8431676
 Magic number to identify channels.
#define IS_CHANNEL(x)   (((Channel *) x)->magic == CHANNEL_MAGIC)
#define IS_CHANNEL_AND_NONNULL(x)   (x && IS_CHANNEL (x))
#define FOREACH_STRIP   for (int i = 0; i < STRIP_SIZE; i++)
#define FOREACH_AUTOMATABLE(ch)   for (int i = 0; i < ch->num_automatables; i++)
#define MAX_FADER_AMP   1.42f
#define channel_is_in_active_project(self)    (self->track && track_is_in_active_project (self->track))
 The slot where post-fader sends begin (starting from 0).
#define channel_send_is_prefader(x)    (x->slot < CHANNEL_SEND_POST_FADER_START_SLOT)
#define channel_send_is_in_active_project(self)    (self->track && track_is_in_active_project (self->track))
#define channel_send_is_empty(x)   (!channel_send_is_enabled (x))
#define CHORD_OBJECT_MAGIC   4181694
#define IS_CHORD_OBJECT(x)   (((ChordObject *) x)->magic == CHORD_OBJECT_MAGIC)
#define chord_object_is_selected(r)    arranger_object_is_selected ((ArrangerObject *) r)
#define P_CHORD_TRACK   (TRACKLIST->chord_track)
#define chord_track_get_chord_at_playhead(ct)    chord_track_get_chord_at_pos (ct, PLAYHEAD)
 Returns the current chord.
#define chord_track_get_scale_at_playhead(ct)    chord_track_get_scale_at_pos (ct, PLAYHEAD)
 Returns the current scale.
#define control_port_is_val_toggled(val)   (val > 0.001f)
 Checks if the given value is toggled.
#define control_port_is_toggled(self)    (control_port_is_val_toggled (self->control))
 Returns if the control port is toggled.
#define CONTROL_ROOM   (AUDIO_ENGINE->control_room)
#define control_room_is_in_active_project(self)    (self->audio_engine && engine_is_in_active_project (self->audio_engine))
 Bounds for each algorithm.
#define BLOCK_LENGTH   4096
#define MIDI_BUF_SIZE   1024
#define MIDI_IN_NUM_EVENTS   AUDIO_ENGINE->midi_in->midi_events->num_events
#define AUDIO_ENGINE   (PROJECT->audio_engine)
#define MANUAL_PRESS_EVENTS    (AUDIO_ENGINE->midi_editor_manual_press->midi_events)
#define DENORMAL_PREVENTION_VAL   (AUDIO_ENGINE->denormal_prevention_val)
#define engine_is_in_active_project(self)   (self->project == PROJECT)
#define engine_set_run(engine, _run)   g_atomic_int_set (&(engine)->run, _run)
 Set whether engine should process (true) or skip (false).
#define engine_get_run(engine)   g_atomic_int_get (&(engine)->run)
#define engine_has_handled_buffer_size_change(engine)
#define ENGINE_MAX_EVENTS   100
#define engine_queue_push_back_event(q, x)   mpmc_queue_push_back (q, (void *) x)
#define engine_queue_dequeue_event(q, x)   mpmc_queue_dequeue (q, (void *) x)
#define ENGINE_EVENTS_PUSH(et, _arg, _uint_arg, _float_arg)
 Push events.
#define engine_is_port_own(self, port)
 Returns 1 if the port is an engine port or control room port, otherwise 0.
#define EXT_PORTS_MAX   1024
 Maximum external ports.
#define ext_port_is_in_active_project(self)
#define MONITOR_FADER   (CONTROL_ROOM->monitor_fader)
#define FADER_MAGIC   32548791
#define IS_FADER(f)   (f->magic == FADER_MAGIC)
#define IS_FADER_AND_NONNULL(f)   (f && f->magic == FADER_MAGIC)
 Causes loud volume in when < 1k.
#define fader_is_in_active_project(self)
#define fader_get_listened(self)   (control_port_is_toggled (self->listen))
 Returns whether the fader is listened.
#define mpmc_queue_push_back_node(q, x)   mpmc_queue_push_back (q, (void *) x)
#define mpmc_queue_dequeue_node(q, x)   mpmc_queue_dequeue (q, (void *) x)
#define MAX_GRAPH_THREADS   128
#define HW_IN_PROCESSOR   (AUDIO_ENGINE->hw_in_processor)
#define HW_OUT_PROCESSOR   (AUDIO_ENGINE->hw_out_processor)
#define hw_processor_is_in_active_project(self)    (self->engine && engine_is_in_active_project ((self)->engine))
#define marker_is_selected(r)   arranger_object_is_selected ((ArrangerObject *) r)
#define marker_is_deletable(m)    ((m)->type != MARKER_TYPE_START && (m)->type != MARKER_TYPE_END)
#define P_MARKER_TRACK   (TRACKLIST->marker_track)
#define P_MASTER_TRACK   (TRACKLIST->master_track)
#define METRONOME   (AUDIO_ENGINE->metronome)
#define MAX_MIDI_EVENTS   2560
 Max events to hold in queues.
#define MIDI_MAPPINGS   (PROJECT->midi_mappings)
#define midi_mappings_bind_device(self, buf, dev_port, dest_port, fire_events)
#define midi_mappings_bind_track(self, buf, dest_port, fire_events)
#define MIDI_NOTE_MAGIC   3588791
#define IS_MIDI_NOTE(tr)    ((MidiNote *) tr && ((MidiNote *) tr)->magic == MIDI_NOTE_MAGIC)
#define midi_note_is_selected(r)    arranger_object_is_selected ((ArrangerObject *) r)
#define midi_region_add_midi_note(region, midi_note, pub_events)
 Adds the MidiNote to the given ZRegion.
#define modulator_macro_processor_is_in_active_project(self)    (self->track && track_is_in_active_project (self->track))
#define P_MODULATOR_TRACK   (TRACKLIST->modulator_track)
#define AUDIO_POOL   (AUDIO_ENGINE->pool)
#define PORT_MAGIC   456861194
#define IS_PORT(_p)   (((Port *) (_p))->magic == PORT_MAGIC)
#define IS_PORT_AND_NONNULL(x)   ((x) && IS_PORT (x))
#define TIME_TO_RESET_PEAK   4800000
#define PORT_NOT_OWNED   -1
 Special ID for owner_pl, owner_ch, etc.
#define port_is_owner_active(self, _owner_type, owner)
#define port_is_in_active_project(self)
#define port_connect(a, b, locked)
 Connects a and b with default settings:
#define port_disconnect(a, b)
 Removes the connection between the given ports.
#define ports_connected(a, b)
#define port_clear_buffer(_port)
 Clears the port buffer.
#define PORT_CONNECTIONS_MGR   (PROJECT->port_connections_manager)
#define port_connections_manager_ensure_connect_from_connection(self, conn)
#define PORT_IDENTIFIER_MAGIC   3411841
#define IS_PORT_IDENTIFIER(tr)    (tr && ((PortIdentifier *) tr)->magic == PORT_IDENTIFIER_MAGIC)
#define position_add_sixteenths(_pos, _s)    position_add_ticks ((_pos), (_s) * TICKS_PER_SIXTEENTH_NOTE)
#define position_add_beats(_pos, _b)
#define position_add_bars(_pos, _b)
#define position_snap_simple(pos, sg)   position_snap (NULL, pos, NULL, NULL, sg)
#define POSITION_MAX_BAR   160000
#define position_between_frames_excl2(pos, f1, f2)    ((pos)->frames >= f1 && (pos)->frames < f2)
 Whether the position starts on or after f1 and before f2.
#define position_compare_frames(p1, p2)   ((p1)->frames - (p2)->frames)
 Compares 2 positions based on their frames.
#define position_is_before(_pos, _cmp)    (position_compare_frames (_pos, _cmp) < 0)
 Checks if _pos is before _cmp.
#define position_is_before_or_equal(_pos, _cmp)    (position_compare_frames (_pos, _cmp) <= 0)
 Checks if _pos is before or equal to _cmp.
#define position_is_equal(_pos, _cmp)    (position_compare_frames (_pos, _cmp) == 0)
 Checks if _pos is equal to _cmp.
#define position_is_after(_pos, _cmp)   (position_compare_frames (_pos, _cmp) > 0)
 Checks if _pos is after _cmp.
#define position_is_after_or_equal(_pos, _cmp)    (position_compare_frames (_pos, _cmp) >= 0)
 Checks if _pos is after or equal to _cmp.
#define position_is_positive(pos)   ((pos)->frames >= 0 && (pos)->ticks >= 0)
#define position_compare_ticks(p1, p2)   ((p1)->ticks - (p2)->ticks)
 Compares 2 positions based on their total ticks.
#define position_is_equal_ticks(p1, p2)    (fabs (position_compare_ticks (p1, p2)) <= DBL_EPSILON)
#define position_is_between(_pos, _start, _end)    (position_is_after_or_equal (_pos, _start) && position_is_before (_pos, _end))
 Returns if _pos is after or equal to _start and before _end.
#define position_is_between_excl_start(_pos, _start, _end)    (position_is_after (_pos, _start) && position_is_before (_pos, _end))
 Returns if _pos is after _start and before _end.
#define position_min(p1, p2)   (position_compare_frames (p1, p2) < 0 ? p1 : p2)
 Returns minimum of p1 and p2.
#define position_max(p1, p2)   (position_compare_frames (p1, p2) > 0 ? p1 : p2)
 Returns maximum of p1 and p2.
#define POSITION_INIT_ON_STACK(name)   Position name = POSITION_START;
 Inits the default position on the stack.
#define position_init(__pos)   *(__pos) = POSITION_START
 Initializes given position.
#define position_set_to_pos(_pos, _target)   *(_pos) = *(_target)
 Sets position to target position.
#define position_to_frames(x)   ((x)->frames)
 Deprecated - added for compatibility.
#define position_to_ticks(x)   ((x)->ticks)
#define QUANTIZE_OPTIONS_IS_EDITOR(qo)   (PROJECT->quantize_opts_editor == qo)
#define QUANTIZE_OPTIONS_IS_TIMELINE(qo)   (PROJECT->quantize_opts_timeline == qo)
#define QUANTIZE_OPTIONS_TIMELINE   (PROJECT->quantize_opts_timeline)
#define QUANTIZE_OPTIONS_EDITOR   (PROJECT->quantize_opts_editor)
#define MAX_SNAP_POINTS   120096
#define recording_event_queue_push_back_event(q, x)    mpmc_queue_push_back (q, (void *) x)
#define recording_event_queue_dequeue_event(q, x)    mpmc_queue_dequeue (q, (void *) x)
 Push events.
#define recording_event_init(re)
 Inits an already allocated recording event.
#define RECORDING_MANAGER   (ZRYTHM->recording_manager)
#define REGION_MAGIC   93075327
#define IS_REGION(x)   (((ZRegion *) x)->magic == REGION_MAGIC)
#define IS_REGION_AND_NONNULL(x)   (x && IS_REGION (x))
#define REGION_PRINTF_FILENAME   "%s_%s.mid"
#define region_is_selected(r)   arranger_object_is_selected ((ArrangerObject *) r)
#define region_type_can_fade(rtype)   (rtype == REGION_TYPE_AUDIO)
 Returns if the given ZRegion type can have fades.
#define REGION_LINK_GROUP_MAGIC   1222013
#define IS_REGION_LINK_GROUP(x)    (((RegionLinkGroup *) (x))->magic == REGION_LINK_GROUP_MAGIC)
#define REGION_LINK_GROUP_MANAGER   (PROJECT->region_link_group_manager)
#define ROUTER   (AUDIO_ENGINE->router)
#define sample_playback_init(self, _buf, _buf_size, _channels, _vol, _start_offset)
 Initializes a SamplePlayback with a sample to play back.
#define SAMPLE_PROCESSOR   (AUDIO_ENGINE->sample_processor)
#define sample_processor_is_in_active_project(self)    (self->audio_engine && engine_is_in_active_project (self->audio_engine))
#define scale_object_is_selected(r)    arranger_object_is_selected ((ArrangerObject *) r)
#define SCALE_OBJECT_MAGIC   13187994
#define IS_SCALE_OBJECT(tr)   (tr && tr->magic == SCALE_OBJECT_MAGIC)
#define SNAP_GRID_TIMELINE   (PROJECT->snap_grid_timeline)
#define SNAP_GRID_EDITOR   (PROJECT->snap_grid_editor)
#define SNAP_GRID_ANY_SNAP(sg)   (sg->snap_to_grid || sg->snap_to_events)
#define TEMPO_TRACK_MAX_BPM   420.f
#define TEMPO_TRACK_MIN_BPM   40.f
#define P_TEMPO_TRACK   (TRACKLIST->tempo_track)
#define TRACK_MIN_HEIGHT   24
#define TRACK_DEF_HEIGHT   48
#define TRACK_MAGIC   21890135
#define IS_TRACK(x)   (((Track *) x)->magic == TRACK_MAGIC)
#define IS_TRACK_AND_NONNULL(x)   (x && IS_TRACK (x))
#define track_is_in_active_project(self)    (self->tracklist && tracklist_is_in_active_project (self->tracklist))
#define track_is_auditioner(self)    (self->tracklist && tracklist_is_auditioner (self->tracklist))
 Whether this track is part of the SampleProcessor auditioner tracklist.
#define track_get_name_hash(self)   g_str_hash (self->name)
#define track_is_pinned(x)   (x->pos < TRACKLIST->pinned_tracks_cutoff)
 Returns whether the track is pinned.
#define track_add_region(self, region, at, lane_pos, gen_name, fire_events, error)
 Adds a ZRegion to the given lane or AutomationTrack of the track.
#define track_type_is_audio_group   track_type_has_mono_compat_switch
#define track_create_empty_with_action(type, error)    track_create_empty_at_idx_with_action (type, TRACKLIST->num_tracks, error)
 Creates a new empty track at the end of the tracklist.
#define track_lane_is_auditioner(self)    (self->track && track_is_auditioner (self->track))
#define track_lane_is_in_active_project(self)    (self->track && track_is_in_active_project (self->track))
#define TRACK_PROCESSOR_MAGIC   81213128
#define IS_TRACK_PROCESSOR(tr)   ((tr) && (tr)->magic == TRACK_PROCESSOR_MAGIC)
#define track_processor_is_in_active_project(self)    (self->track && track_is_in_active_project (self->track))
#define TRACKLIST   (PROJECT->tracklist)
#define MAX_TRACKS   3000
#define tracklist_is_in_active_project(self)
#define tracklist_is_auditioner(self)    (self->sample_processor && tracklist_is_in_active_project (self))
#define TRANSPORT   (AUDIO_ENGINE->transport)
#define PLAYHEAD   (&TRANSPORT->playhead_pos)
#define velocity_is_selected(r)    arranger_object_is_selected ((ArrangerObject *) r)
 Default velocity.
#define MIDI_CH1_NOTE_ON   0x90
#define MIDI_CH1_NOTE_OFF   0x80
 Also known as Polyphonic Key Pressure.
#define MIDI_CH1_CTRL_CHANGE   0xB0
#define MIDI_CH1_PROG_CHANGE   0xC0
 Also known as Channel Pressure.
#define MIDI_ALL_NOTES_OFF   0x7B
#define MIDI_ALL_SOUND_OFF   0x78
#define MIDI_CLOCK_BEAT   0xF8
#define MIDI_CLOCK_STOP   0xFC
#define MIDI_META_EVENT   0xFF


typedef struct _ChordTrackWidget ChordTrackWidget
typedef struct _MarkerTrackWidget MarkerTrackWidget
typedef void(* TracksReadyCallback) (const FileImportInfo *, const GError *)
 Called when track(s) are actually imported into the project.


enum  AudioFunctionType {
enum  BalanceControlAlgorithm { BALANCE_CONTROL_ALGORITHM_LINEAR }
 See https://www.harmonycentral.com/articles/the-truth-about-panning-laws. More...
 Target type. More...
enum  MusicalNote {
enum  ChordType {
 Chord type. More...
enum  ChordAccent {
 Chord accents. More...
enum  CurveAlgorithm {
 The algorithm to use for curves. More...
 Audio engine event type. More...
enum  AudioEngineBufferSize {
 Buffer sizes to be used in combo boxes. More...
enum  AudioEngineSamplerate {
 Samplerates to be used in comboboxes. More...
enum  AudioBackend {
 Mode used when bouncing, either during exporting or when bouncing tracks or regions to audio. More...
enum  MidiBackend {
enum  ExportFormat {
 Export format. More...
 Time range to export. More...
 Export mode. More...
enum  ExtPortType {
 External port type. More...
enum  FaderType {
 Fader type. More...
enum  GraphExportType { NUM_GRAPH_EXPORT_TYPES }
 Export type. More...
enum  GraphNodeType {
 Graph nodes can be either ports or processors. More...
 Marker type. More...
enum  MeterAlgorithm {
 The type of the metronome sound. More...
enum  MidiFunctionType {
enum  PortInternalType {
 What the internal data is. More...
 Direction of the signal. More...
enum  PortType {
 Type of signals the Port handles. More...
enum  PortUnit {
 Port unit to be displayed in the UI. More...
enum  PortOwnerType {
 Type of owner. More...
enum  PortFlags {
  PORT_FLAG_PLUGIN_GAIN = 1 << 24 , PORT_FLAG_TP_MONO = 1 << 25 , PORT_FLAG_TP_INPUT_GAIN = 1 << 26 , PORT_FLAG_HW = 1 << 27 ,
 Port flags. More...
enum  PortFlags2 {
enum  RecordingEventType {
 Musical mode setting for audio regions. More...
enum  RegionType { REGION_TYPE_MIDI = 1 << 0 , REGION_TYPE_AUDIO = 1 << 1 , REGION_TYPE_AUTOMATION = 1 << 2 , REGION_TYPE_CHORD = 1 << 3 }
 Type of Region. More...
enum  MusicalScaleType {
 Scale type (name) eg Aeolian. More...
enum  NoteLength {
 Snap grid type. More...
enum  BeatUnit { BEAT_UNIT_2 , BEAT_UNIT_4 , BEAT_UNIT_8 , BEAT_UNIT_16 }
 Beat unit. More...
enum  TrackType {
 The Track's type. More...
 Used in track search functions. More...
 Corrseponts to "transport-display" in the gsettings. More...
 Recording mode for MIDI and audio. More...


char * audio_function_get_action_target_for_type (AudioFunctionType type)
char * audio_function_get_detailed_action_for_type (AudioFunctionType type, const char *base_action)
 Returns a detailed action name to be used for actionable widgets or menus.
const char * audio_function_get_icon_name_for_type (AudioFunctionType type)
bool audio_function_apply (ArrangerSelections *sel, AudioFunctionType type, AudioFunctionOpts opts, const char *uri, GError **error)
 Applies the given action to the given selections.
ZRegionaudio_region_new (const int pool_id, const char *filename, bool read_from_pool, const float *frames, const unsigned_frame_t nframes, const char *clip_name, const channels_t channels, BitDepth bit_depth, const Position *start_pos, unsigned int track_name_hash, int lane_pos, int idx_inside_lane, GError **error)
 Creates a region for audio data.
AudioClipaudio_region_get_clip (const ZRegion *self)
 Returns the audio clip associated with the Region.
void audio_region_set_clip_id (ZRegion *self, int clip_id)
 Sets the clip ID on the region and updates any references.
WARN_UNUSED_RESULT bool audio_region_replace_frames (ZRegion *self, float *frames, unsigned_frame_t start_frame, unsigned_frame_t num_frames, bool duplicate_clip, GError **error)
 Replaces the region's frames from start_frames with frames.
REALTIME HOT NONNULL void audio_region_fill_stereo_ports (ZRegion *self, const EngineProcessTimeInfo *const time_nfo, StereoPorts *stereo_ports)
 Fills audio data from the region.
float audio_region_detect_bpm (ZRegion *self, GArray *candidates)
bool audio_region_validate (ZRegion *self, double frames_per_tick)
 Sanity checking.
bool audio_region_fix_positions (ZRegion *self, double frames_per_tick)
 Fixes off-by-one rounding errors when changing BPM or sample rate which result in the looped part being longer than there are actual frames in the clip.
void audio_region_free_members (ZRegion *self)
 Frees members only but not the audio region itself.
int automation_function_apply (ArrangerSelections *sel, AutomationFunctionType type, GError **error)
 Applies the given action to the given selections.
AutomationPointautomation_point_new_float (const float value, const float normalized_val, const Position *pos)
 Creates an AutomationPoint in the given AutomationTrack at the given Position.
void automation_point_set_fvalue (AutomationPoint *self, float real_val, bool is_normalized, bool pub_events)
 Sets the value from given real or normalized value and notifies interested parties.
const char * automation_point_get_fvalue_as_string (AutomationPoint *self)
void automation_point_set_fvalue_with_action (AutomationPoint *self, const char *fval_str)
void automation_point_set_region_and_index (AutomationPoint *_ap, ZRegion *region, int index)
 Sets the ZRegion and the index in the region that the AutomationPoint belongs to, in all its counterparts.
HOT double automation_point_get_normalized_value_in_curve (AutomationPoint *self, ZRegion *region, double x)
 The function to return a point on the curve.
void automation_point_set_curviness (AutomationPoint *ap, const curviness_t curviness)
 Sets the curviness of the AutomationPoint.
Portautomation_point_get_port (const AutomationPoint *const self)
 Convenience function to return the control port that this AutomationPoint is for.
AutomationTrackautomation_point_get_automation_track (const AutomationPoint *const self)
 Convenience function to return the AutomationTrack that this AutomationPoint is in.
PURE int automation_point_is_equal (AutomationPoint *a, AutomationPoint *b)
NONNULL bool automation_point_curves_up (AutomationPoint *self)
 Returns if the curve of the AutomationPoint curves upwards as you move right on the x axis.
ZRegionautomation_region_new (const Position *start_pos, const Position *end_pos, unsigned int track_name_hash, int at_idx, int idx_inside_at)
 Creates a new ZRegion for automation.
void automation_region_print_automation (ZRegion *self)
 Prints the automation in this Region.
PURE int automation_region_sort_func (const void *_a, const void *_b)
void automation_region_force_sort (ZRegion *self)
 Forces sort of the automation points.
void automation_region_add_ap (ZRegion *self, AutomationPoint *ap, int pub_events)
 Adds an AutomationPoint to the Region.
NONNULL PURE AutomationPointautomation_region_get_prev_ap (ZRegion *self, AutomationPoint *ap)
 Returns the AutomationPoint before the given one.
HOT AutomationPointautomation_region_get_next_ap (ZRegion *self, AutomationPoint *ap, bool check_positions, bool check_transients)
 Returns the AutomationPoint after the given one.
void automation_region_remove_ap (ZRegion *self, AutomationPoint *ap, bool freeing_region, int free)
 Removes the AutomationPoint from the ZRegion, optionally freeing it.
void automation_region_get_aps_since_last_recorded (ZRegion *self, Position *pos, GPtrArray *aps)
 Returns the automation points since the last recorded automation point (if the last recorded automation point was before the current pos).
AutomationPointautomation_region_get_ap_around (ZRegion *self, Position *_pos, double delta_ticks, bool before_only, bool use_snapshots)
 Returns an automation point found within +/- delta_ticks from the position, or NULL.
NONNULL bool automation_region_validate (ZRegion *self)
NONNULL void automation_region_free_members (ZRegion *self)
 Frees members only but not the ZRegion itself.
COLD NONNULL_ARGS (1) void automation_tracklist_init_loaded(AutomationTracklist *self
 Inits a loaded AutomationTracklist.
NONNULL AutomationTrackautomation_track_new (Port *port)
 Creates an automation track for the given Port.
NONNULL bool automation_track_validate (AutomationTrack *self)
void automation_mode_get_localized (AutomationMode mode, char *buf)
 Gets the automation mode as a localized string.
void automation_record_mode_get_localized (AutomationRecordMode mode, char *buf)
 Gets the automation mode as a localized string.
NONNULL AutomationTrackautomation_track_find_from_port_id (PortIdentifier *id, bool basic_search)
HOT AutomationTrackautomation_track_find_from_port (Port *port, Track *track, bool basic_search)
 Finds the AutomationTrack associated with port.
void automation_track_set_automation_mode (AutomationTrack *self, AutomationMode mode, bool fire_events)
NONNULL AutomationTracklistautomation_track_get_automation_tracklist (AutomationTrack *self)
HOT NONNULL bool automation_track_should_read_automation (AutomationTrack *at, gint64 cur_time)
 Returns whether the automation in the automation track should be read.
HOT NONNULL bool automation_track_should_be_recording (const AutomationTrack *const at, const gint64 cur_time, const bool record_aps)
 Returns if the automation track should currently be recording data.
NONNULL void automation_track_add_region (AutomationTrack *self, ZRegion *region)
 Adds an automation ZRegion to the AutomationTrack.
NONNULL void automation_track_insert_region (AutomationTrack *self, ZRegion *region, int idx)
 Inserts an automation ZRegion to the AutomationTrack at the given index.
NONNULL void automation_track_update_positions (AutomationTrack *self, bool from_ticks, bool bpm_change)
 Returns the visible y offset from the top of the track widget.
NONNULL void automation_track_set_index (AutomationTrack *self, int index)
 Sets the index of the AutomationTrack in the AutomationTracklist.
NONNULL AutomationTrackautomation_track_clone (AutomationTrack *src)
 Clones the AutomationTrack.
NONNULL Trackautomation_track_get_track (AutomationTrack *self)
NONNULL AutomationPointautomation_track_get_ap_before_pos (const AutomationTrack *self, const Position *pos, bool ends_after, bool use_snapshots)
 Returns the automation point before the Position on the timeline.
ZRegionautomation_track_get_region_before_pos (const AutomationTrack *self, const Position *pos, bool ends_after, bool use_snapshots)
 Returns the ZRegion that starts before given Position, if any.
NONNULL void automation_track_unselect_all (AutomationTrack *self)
 Unselects all arranger objects.
NONNULL void automation_track_remove_region (AutomationTrack *self, ZRegion *region)
 Removes a region from the automation track.
NONNULL void automation_track_clear (AutomationTrack *self)
 Removes and frees all arranger objects recursively.
NONNULL float automation_track_get_val_at_pos (AutomationTrack *self, Position *pos, bool normalized, bool ends_after, bool use_snapshots)
 Returns the actual parameter value at the given position.
NONNULL int automation_track_get_y_px_from_normalized_val (AutomationTrack *self, float normalized_val)
 Returns the y pixels from the value based on the allocation of the automation track.
NONNULL ZRegionautomation_track_get_last_region (AutomationTrack *self)
 Gets the last ZRegion in the AutomationTrack.
NONNULL void automation_track_set_caches (AutomationTrack *self, CacheTypes types)
NONNULL bool automation_track_contains_automation (const AutomationTrack *self)
NONNULL bool automation_track_verify (AutomationTrack *self)
NONNULL void automation_track_free (AutomationTrack *at)
 Frees the automation track.
void automation_tracklist_init (AutomationTracklist *self, Track *track)
Trackautomation_tracklist_get_track (AutomationTracklist *self)
void automation_tracklist_add_at (AutomationTracklist *self, AutomationTrack *at)
void automation_tracklist_print_ats (AutomationTracklist *self)
 Prints info about all the automation tracks.
void automation_tracklist_update_positions (AutomationTracklist *self, bool from_ticks, bool bpm_change)
 Updates the frames of each position in each child of the automation tracklist recursively.
AutomationTrackautomation_tracklist_get_prev_visible_at (AutomationTracklist *self, AutomationTrack *at)
AutomationTrackautomation_tracklist_get_next_visible_at (AutomationTracklist *self, AutomationTrack *at)
NONNULL void automation_tracklist_set_at_visible (AutomationTracklist *self, AutomationTrack *at, bool visible)
AutomationTrackautomation_tracklist_get_visible_at_after_delta (AutomationTracklist *self, AutomationTrack *at, int delta)
 Returns the AutomationTrack after delta visible AutomationTrack's.
int automation_tracklist_get_visible_at_diff (AutomationTracklist *self, const AutomationTrack *src, const AutomationTrack *dest)
void automation_tracklist_update_track_name_hash (AutomationTracklist *self, Track *track)
 Updates the Track position of the Automatable's and AutomationTrack's.
void automation_tracklist_remove_at (AutomationTracklist *self, AutomationTrack *at, bool free, bool fire_events)
 Removes the AutomationTrack from the AutomationTracklist, optionally freeing it.
void automation_tracklist_remove_channel_ats (AutomationTracklist *self, Channel *ch)
 Removes the AutomationTrack's associated with this channel from the AutomationTracklist in the corresponding Track.
void automation_tracklist_clone (AutomationTracklist *src, AutomationTracklist *dest)
 Clones the automation tracklist elements from src to dest.
AutomationTrackautomation_tracklist_get_at_from_port (AutomationTracklist *self, Port *port)
 Returns the AutomationTrack corresponding to the given Port.
void automation_tracklist_unselect_all (AutomationTracklist *self)
 Unselects all arranger objects.
void automation_tracklist_clear (AutomationTracklist *self)
 Removes all objects recursively.
void automation_tracklist_set_at_index (AutomationTracklist *self, AutomationTrack *at, int index, bool push_down)
 Sets the index of the AutomationTrack and swaps it with the AutomationTrack at that index or pushes the other AutomationTrack's down.
AutomationTrackautomation_tracklist_get_plugin_at (AutomationTracklist *self, PluginSlotType slot_type, const int plugin_slot, const int port_index, const char *symbol)
 Gets the automation track matching the given arguments.
WARN_UNUSED_RESULT NONNULL AutomationTrackautomation_tracklist_get_first_invisible_at (AutomationTracklist *self)
NONNULL int automation_tracklist_get_num_visible (AutomationTracklist *self)
 Returns the number of visible AutomationTrack's.
NONNULL bool automation_tracklist_validate (AutomationTracklist *self)
 Verifies the identifiers on a live automation tracklist (in the project, not a clone).
WARN_UNUSED_RESULT NONNULL int automation_tracklist_get_num_regions (AutomationTracklist *self)
 Counts the total number of regions in the automation tracklist.
NONNULL void automation_tracklist_print_regions (AutomationTracklist *self)
NONNULL void automation_tracklist_set_caches (AutomationTracklist *self, CacheTypes types)
NONNULL void automation_tracklist_free_members (AutomationTracklist *self)
void balance_control_get_calc_lr (BalanceControlAlgorithm algo, float pan, float *calc_l, float *calc_r)
 Returns the coefficients to multiply the L and R signal with.
NONNULL void channel_init_loaded (Channel *channel, Track *track)
NONNULL void channel_handle_recording (Channel *self, const long g_frames_start, const nframes_t nframes)
 Handles the recording logic inside the process cycle.
void channel_append_ports (Channel *self, GPtrArray *ports, bool include_plugins)
 Appends all channel ports and optionally plugin ports to the array.
NONNULL void channel_set_magic (Channel *self)
NONNULL void channel_expose_ports_to_backend (Channel *ch)
 Exposes the channel's ports to the backend.
void channel_connect (Channel *ch)
 Connects the channel's ports.
NONNULL void channel_set_phase (void *channel, float phase)
NONNULL float channel_get_phase (void *channel)
NONNULL void channel_set_balance_control (void *_channel, float pan)
NONNULL void channel_add_balance_control (void *_channel, float pan)
 Adds to (or subtracts from) the pan.
NONNULL float channel_get_balance_control (void *_channel)
NONNULL void channel_reset_fader (Channel *self, bool fire_events)
 Sets fader to 0.0.
void channel_handle_plugin_import (Channel *self, const Plugin *pl, const MixerSelections *sel, const PluginDescriptor *descr, int slot, PluginSlotType slot_type, bool copy, bool ask_if_overwrite)
 Handles import (paste/drop) of plugins or plugin descriptors or mixer selections.
NONNULL void channel_prepare_process (Channel *channel)
 Prepares the channel for processing.
NONNULL Channelchannel_new (Track *track)
 Creates a channel of the given type with the given label.
NONNULL void channel_process (Channel *channel)
 The process function prototype.
NONNULL bool channel_add_plugin (Channel *channel, PluginSlotType slot_type, int pos, Plugin *plugin, bool confirm, bool moving_plugin, bool gen_automatables, bool recalc_graph, bool pub_events)
 Adds given plugin to given position in the strip.
NONNULL Trackchannel_get_track (Channel *self)
NONNULL Trackchannel_get_output_track (Channel *self)
NONNULL void channel_reconnect_ext_input_ports (Channel *ch)
 Called when the input has changed for Midi, Instrument or Audio tracks.
NONNULL AutomationTrackchannel_get_automation_track (Channel *channel, PortFlags port_flags)
 Convenience function to get the automation track of the given type for the channel.
NONNULL void channel_remove_plugin (Channel *channel, PluginSlotType slot_type, int slot, bool moving_plugin, bool deleting_plugin, bool deleting_channel, bool recalc_graph)
 Removes a plugin at pos from the channel.
NONNULL void channel_update_track_name_hash (Channel *self, unsigned int old_name_hash, unsigned int new_name_hash)
 Updates the track name hash in the channel and all related ports and identifiers.
NONNULL int channel_get_plugins (Channel *self, Plugin **pls)
NONNULL bool channel_get_mono_compat_enabled (Channel *self)
 Gets whether mono compatibility is enabled.
NONNULL void channel_set_mono_compat_enabled (Channel *self, bool enabled, bool fire_events)
 Sets whether mono compatibility is enabled.
NONNULL bool channel_get_swap_phase (Channel *self)
 Gets whether mono compatibility is enabled.
NONNULL void channel_set_swap_phase (Channel *self, bool enabled, bool fire_events)
 Sets whether mono compatibility is enabled.
void channel_select_all (Channel *self, PluginSlotType type, bool select)
 Selects/deselects all plugins in the given slot type.
NONNULL void channel_set_caches (Channel *self)
 Sets caches for processing.
Channelchannel_clone (Channel *ch, Track *track, GError **error)
 Clones the channel recursively.
NONNULL void channel_disconnect (Channel *channel, bool remove_pl)
 Disconnects the channel from the processing chain.
NONNULL void channel_free (Channel *channel)
 Frees the channel.
char * channel_send_target_describe (const ChannelSendTarget *self)
 Returns a string describing self (track/plugin name/etc.).
char * channel_send_target_get_icon (const ChannelSendTarget *self)
void channel_send_target_free (ChannelSendTarget *self)
void channel_send_init_loaded (ChannelSend *self, Track *track)
ChannelSendchannel_send_new (unsigned int track_name_hash, int slot, Track *track)
 Creates a channel send instance.
NONNULL Trackchannel_send_get_track (const ChannelSend *self)
 Gets the owner track.
NONNULL bool channel_send_is_enabled (const ChannelSend *self)
NONNULL bool channel_send_is_target_sidechain (ChannelSend *self)
 Returns whether the channel send target is a sidechain port (rather than a target track).
Trackchannel_send_get_target_track (ChannelSend *self, Track *owner)
 Gets the target track.
NONNULL StereoPortschannel_send_get_target_sidechain (ChannelSend *self)
 Gets the target sidechain port.
NONNULL float channel_send_get_amount_for_widgets (ChannelSend *self)
 Gets the amount to be used in widgets (0.0-1.0).
NONNULL void channel_send_set_amount_from_widget (ChannelSend *self, float val)
 Sets the amount from a widget amount (0.0-1.0).
bool channel_send_connect_stereo (ChannelSend *self, StereoPorts *stereo, Port *l, Port *r, bool sidechain, bool recalc_graph, bool validate, GError **error)
 Connects a send to stereo ports.
NONNULL bool channel_send_connect_midi (ChannelSend *self, Port *port, bool recalc_graph, bool validate, GError **error)
 Connects a send to a midi port.
NONNULL void channel_send_disconnect (ChannelSend *self, bool recalc_graph)
 Removes the connection at the given send.
NONNULL void channel_send_set_amount (ChannelSend *self, float amount)
NONNULL void channel_send_get_dest_name (ChannelSend *self, char *buf)
 Get the name of the destination, or a placeholder text if empty.
NONNULL void channel_send_copy_values (ChannelSend *dest, const ChannelSend *src)
NONNULL ChannelSendchannel_send_clone (const ChannelSend *src)
NONNULL ChannelSendWidgetchannel_send_find_widget (ChannelSend *self)
void channel_send_connect_to_owner (ChannelSend *self)
 Connects the ports to the owner track if not connected.
void channel_send_append_ports (ChannelSend *self, GPtrArray *ports)
int channel_send_append_connection (const ChannelSend *self, const PortConnectionsManager *mgr, GPtrArray *arr)
 Appends the connection(s), if non-empty, to the given array (if not NULL) and returns the number of connections added.
void channel_send_prepare_process (ChannelSend *self)
void channel_send_process (ChannelSend *self, const nframes_t local_offset, const nframes_t nframes)
bool channel_send_is_connected_to (const ChannelSend *self, const StereoPorts *stereo, const Port *midi)
 Returns whether the send is connected to the given ports.
NONNULL ChannelSendchannel_send_find (ChannelSend *self)
 Finds the project send from a given send instance.
NONNULL bool channel_send_validate (ChannelSend *self)
NONNULL void channel_send_free (ChannelSend *self)
ChordDescriptorchord_descriptor_new (MusicalNote root, int has_bass, MusicalNote bass, ChordType type, ChordAccent accent, int inversion)
 Creates a ChordDescriptor.
bool chord_descriptor_is_key_in_chord (ChordDescriptor *chord, MusicalNote key)
 Returns if the given key is in the chord represented by the given ChordDescriptor.
bool chord_descriptor_is_key_bass (ChordDescriptor *chord, MusicalNote key)
 Returns if key is the bass or root note of chord.
ChordDescriptorchord_descriptor_clone (const ChordDescriptor *src)
 Clones the given ChordDescriptor.
void chord_descriptor_copy (ChordDescriptor *dest, const ChordDescriptor *src)
const char * chord_descriptor_chord_type_to_string (ChordType type)
 Returns the chord type as a string (eg.
const char * chord_descriptor_chord_accent_to_string (ChordAccent accent)
 Returns the chord accent as a string (eg.
const char * chord_descriptor_note_to_string (MusicalNote note)
 Returns the musical note as a string (eg.
char * chord_descriptor_to_new_string (const ChordDescriptor *chord)
 Returns the chord in human readable string.
NONNULL void chord_descriptor_to_string (const ChordDescriptor *chord, char *str)
 Returns the chord in human readable string.
NONNULL void chord_descriptor_update_notes (ChordDescriptor *self)
 Updates the notes array based on the current settings.
NONNULL void chord_descriptor_free (ChordDescriptor *self)
 Frees the ChordDescriptor.
ChordObjectchord_object_new (RegionIdentifier *region_id, int chord_index, int index)
 Creates a ChordObject.
int chord_object_is_equal (ChordObject *a, ChordObject *b)
void chord_object_set_region_and_index (ChordObject *self, ZRegion *region, int idx)
 Sets the region and index of the chord.
ChordDescriptorchord_object_get_chord_descriptor (const ChordObject *self)
 Returns the ChordDescriptor associated with this ChordObject.
ChordObjectchord_object_find_by_pos (ChordObject *clone)
 Finds the ChordObject in the project corresponding to the given one's position.
ZRegionchord_object_get_region (ChordObject *self)
NONNULL ZRegionchord_region_new (const Position *start_pos, const Position *end_pos, int idx)
 Creates a new ZRegion for chords.
NONNULL void chord_region_insert_chord_object (ZRegion *self, ChordObject *chord, int pos, bool fire_events)
 Inserts a ChordObject to the Region.
NONNULL void chord_region_add_chord_object (ZRegion *self, ChordObject *chord, bool fire_events)
 Adds a ChordObject to the Region.
NONNULL void chord_region_remove_chord_object (ZRegion *self, ChordObject *chord, int free, bool fire_events)
 Removes a ChordObject from the Region.
NONNULL bool chord_region_validate (ZRegion *self)
NONNULL void chord_region_free_members (ZRegion *self)
 Frees members only but not the ZRegion itself.
ChordTrack * chord_track_new (int track_pos)
 Creates a new chord Track.
void chord_track_init (Track *track)
 Inits a chord track (e.g.
void chord_track_insert_chord_region (ChordTrack *track, ZRegion *region, int idx)
 Inserts a chord region to the Track at the given index.
void chord_track_insert_scale (ChordTrack *track, ScaleObject *scale, int pos)
 Inserts a scale to the track.
void chord_track_add_scale (ChordTrack *track, ScaleObject *scale)
 Adds a scale to the track.
void chord_track_remove_scale (ChordTrack *self, ScaleObject *scale, bool free)
 Removes a scale from the chord Track.
void chord_track_remove_region (ChordTrack *self, ZRegion *region)
 Removes a region from the chord track.
bool chord_track_validate (Track *self)
ChordObjectchord_track_get_chord_at_pos (const Track *ct, const Position *pos)
 Returns the ChordObject at the given Position in the TimelineArranger.
ScaleObjectchord_track_get_scale_at_pos (const Track *ct, const Position *pos)
 Returns the ScaleObject at the given Position in the TimelineArranger.
void chord_track_clear (ChordTrack *self)
 Removes all objects from the chord track.
COLD NONNULL bool audio_clip_init_loaded (AudioClip *self, GError **error)
 Inits after loading a Project.
AudioClipaudio_clip_new_from_file (const char *full_path, GError **error)
 Creates an audio clip from a file.
AudioClipaudio_clip_new_from_float_array (const float *arr, const unsigned_frame_t nframes, const channels_t channels, BitDepth bit_depth, const char *name)
 Creates an audio clip by copying the given float array.
AudioClipaudio_clip_new_recording (const channels_t channels, const unsigned_frame_t nframes, const char *name)
 Create an audio clip while recording.
NONNULL void audio_clip_update_channel_caches (AudioClip *self, size_t start_from)
 Updates the channel caches.
NONNULL AudioClipaudio_clip_edit_in_ext_program (AudioClip *self, GError **error)
 Shows a dialog with info on how to edit a file, with an option to open an app launcher.
WARN_UNUSED_RESULT NONNULL bool audio_clip_write_to_file (AudioClip *self, const char *filepath, bool parts, GError **error)
 Writes the given audio clip data to a file.
WARN_UNUSED_RESULT NONNULL bool audio_clip_write_to_pool (AudioClip *self, bool parts, bool is_backup, GError **error)
 Writes the clip to the pool as a wav file.
NONNULL char * audio_clip_get_path_in_pool_from_name (const char *name, bool use_flac, bool is_backup)
 Gets the path of a clip matching name from the pool.
NONNULL char * audio_clip_get_path_in_pool (AudioClip *self, bool is_backup)
 Gets the path of the given clip from the pool.
NONNULL bool audio_clip_is_in_use (AudioClip *self, bool check_undo_stack)
 Returns whether the clip is used inside the project.
NONNULL void audio_clip_remove_and_free (AudioClip *self, bool backup)
 To be called by audio_pool_remove_clip().
NONNULL AudioClipaudio_clip_clone (AudioClip *src)
NONNULL void audio_clip_free (AudioClip *self)
 Frees the audio clip.
NONNULL PURE float control_port_normalized_val_to_real (const Port *const self, float normalized_val)
 Converts normalized value (0.0 to 1.0) to real value (eg.
NONNULL PURE float control_port_real_val_to_normalized (const Port *const self, float real_val)
 Converts real value (eg.
int control_port_get_int (Port *self)
 Gets the control value for an integer port.
PURE int control_port_get_int_from_val (float val)
 Gets the control value for an integer port.
float control_port_get_snapped_val (Port *self)
 Returns the snapped value (eg, if toggle, returns 0.f or 1.f).
float control_port_get_snapped_val_from_val (Port *self, float val)
 Returns the snapped value (eg, if toggle, returns 0.f or 1.f).
PURE float control_port_get_val (Port *self)
 Get the current real value of the control.
PURE float control_port_get_normalized_val (Port *self)
 Get the current normalized value of the control.
PURE float control_port_get_unsnapped_val (Port *self)
 Get the current real unsnapped value of the control.
PURE float control_port_get_default_val (Port *self)
 Get the default real value of the control.
void control_port_set_real_val (Port *self, float val)
 Get the default real value of the control.
void control_port_set_real_val_w_events (Port *self, float val)
 Get the default real value of the control and sends UI events.
void control_port_set_toggled (Port *self, bool toggled, bool forward_events)
 Wrapper over port_set_control_value() for toggles.
HOT NONNULL void control_port_set_val_from_normalized (Port *self, float val, bool automating)
 Updates the actual value.
COLD WARN_UNUSED_RESULT ControlRoomcontrol_room_new (AudioEngine *engine)
 Creates a new control room.
void control_room_set_dim_output (ControlRoom *self, int dim_output)
 Sets dim_output to on/off and notifies interested parties.
NONNULL ControlRoomcontrol_room_clone (const ControlRoom *src)
 Used during serialization.
void control_room_free (ControlRoom *self)
NONNULL void curve_opts_init (CurveOptions *opts)
RETURNS_NONNULL GPtrArray * curve_get_fade_presets (void)
 Returns an array of CurveFadePreset.
void curve_algorithm_get_localized_name (CurveAlgorithm algo, char *buf)
 Stores the localized name of the algorithm in buf.
gboolean curve_algorithm_get_g_settings_mapping (GValue *value, GVariant *variant, gpointer user_data)
GVariant * curve_algorithm_set_g_settings_mapping (const GValue *value, const GVariantType *expected_type, gpointer user_data)
HOT NONNULL double curve_get_normalized_y (double x, CurveOptions *opts, int start_higher)
 Returns the Y value on a curve specified by algo.
PURE bool curve_options_are_equal (const CurveOptions *a, const CurveOptions *b)
void ditherer_reset (Ditherer *self, int num_bits)
void ditherer_process (Ditherer *self, float *frames, size_t n_frames, channels_t channels)
 Dither given audio.
 __attribute__ ((unused)) static const char *audio_backend_str[]
void engine_realloc_port_buffers (AudioEngine *self, nframes_t buf_size)
COLD WARN_UNUSED_RESULT AudioEngineengine_new (Project *project)
 Create a new audio engine.
void engine_wait_for_pause (AudioEngine *self, EngineState *state, bool force_pause, bool with_fadeout)
void engine_resume (AudioEngine *self, EngineState *state)
void engine_wait_n_cycles (AudioEngine *self, int n)
 Waits for n processing cycles to finish.
void engine_append_ports (AudioEngine *self, GPtrArray *ports)
void engine_pre_setup (AudioEngine *self)
 Sets up the audio engine before the project is initialized/loaded.
void engine_setup (AudioEngine *self)
 Sets up the audio engine after the project is initialized/loaded.
COLD void engine_activate (AudioEngine *self, bool activate)
 Activates the audio engine to start processing and receiving events.
void engine_update_frames_per_tick (AudioEngine *self, const int beats_per_bar, const bpm_t bpm, const sample_rate_t sample_rate, bool thread_check, bool update_from_ticks, bool bpm_change)
 Updates frames per tick based on the time sig, the BPM, and the sample rate.
int engine_process_events (AudioEngine *self)
 GSourceFunc to be added using idle add.
NONNULL HOT bool engine_process_prepare (AudioEngine *self, nframes_t nframes)
 To be called by each implementation to prepare the structures before processing.
NONNULL HOT int engine_process (AudioEngine *self, const nframes_t total_frames_to_process)
 Processes current cycle.
NONNULL HOT void engine_post_process (AudioEngine *self, const nframes_t roll_nframes, const nframes_t nframes)
 To be called after processing for common logic.
NONNULL void engine_fill_out_bufs (AudioEngine *self, const nframes_t nframes)
 Called to fill in the external buffers at the end of the processing cycle.
int engine_buffer_size_enum_to_int (AudioEngineBufferSize buffer_size)
 Returns the int value corresponding to the given AudioEngineBufferSize.
int engine_samplerate_enum_to_int (AudioEngineSamplerate samplerate)
 Returns the int value corresponding to the given AudioEngineSamplerate.
void engine_set_buffer_size (AudioEngine *self, uint32_t buf_size)
 Request the backend to set the buffer size.
const char * engine_audio_backend_to_string (AudioBackend backend)
 Returns the audio backend as a string.
AudioBackend engine_audio_backend_from_string (const char *str)
MidiBackend engine_midi_backend_from_string (const char *str)
void engine_reset_bounce_mode (AudioEngine *self)
 Reset the bounce mode on the engine, all tracks and regions to OFF.
void engine_set_default_backends (bool reset_to_dummy)
 Detects the best backends on the system and sets them to GSettings.
COLD NONNULL AudioEngineengine_clone (const AudioEngine *src)
 Clones the audio engine.
COLD NONNULL void engine_free (AudioEngine *self)
 Closes any connections and free's data.
const char * export_format_to_pretty_str (ExportFormat format)
 Returns the format as a human friendly label.
const char * export_format_to_ext (ExportFormat format)
 Returns the audio format as a file extension.
ExportFormat export_format_from_pretty_str (const char *pretty_str)
ExportSettingsexport_settings_new (void)
 Returns an instance of default ExportSettings.
void export_settings_set_bounce_defaults (ExportSettings *self, ExportFormat format, const char *filepath, const char *bounce_name)
 Sets the defaults for bouncing.
void export_settings_print (const ExportSettings *self)
void export_settings_free (ExportSettings *self)
NONNULL GPtrArray * exporter_prepare_tracks_for_export (const ExportSettings *const settings, EngineState *engine_state)
 This must be called on the main thread after the intended tracks have been marked for bounce and before exporting.
void exporter_post_export (const ExportSettings *const settings, GPtrArray *connections, EngineState *engine_state)
 This must be called on the main thread after the export is completed.
void * exporter_generic_export_thread (void *data)
 Generic export thread to be used for simple exporting.
void exporter_generic_export_task_thread (GTask *task, gpointer source_obj, gpointer task_data, GCancellable *cancellable)
 Generic export task thread function to be used for simple exporting.
void exporter_create_audio_track_after_bounce (ExportSettings *settings, const Position *pos)
 To be called to create and perform an undoable action for creating an audio track with the bounced material.
int exporter_export (ExportSettings *info)
 Exports an audio file based on the given settings.
void ext_port_print (ExtPort *self)
 Prints the port info.
bool ext_port_matches_backend (ExtPort *self)
 Returns if the ext port matches the current backend.
NONNULL bool ext_ports_equal (const ExtPort *a, const ExtPort *b)
float * ext_port_get_buffer (ExtPort *ext_port, nframes_t nframes)
 Returns the buffer of the external port.
void ext_port_clear_buffer (ExtPort *ext_port, nframes_t nframes)
 Clears the buffer of the external port.
void ext_port_disconnect (ExtPort *ext_port, Port *port, int src)
 Disconnects the Port from the ExtPort.
int ext_port_activate (ExtPort *self, Port *port, bool activate)
 Activates the port (starts receiving data) or deactivates it.
bool ext_port_get_enabled (ExtPort *self)
 Checks in the GSettings whether this port is marked as enabled by the user.
void ext_ports_get (PortType type, PortFlow flow, bool hw, GPtrArray *ports)
 Collects external ports of the given type.
ExtPortext_port_clone (ExtPort *ext_port)
 Creates a shallow clone of the port.
void ext_ports_free (ExtPort **ext_port, int size)
 Frees an array of ExtPort pointers.
void ext_port_free (ExtPort *ext_port)
 Frees the ext_port.
double fade_get_y_normalized (double x, CurveOptions *opts, int fade_in)
 Gets the normalized Y for a normalized X.
COLD Faderfader_new (FaderType type, bool passthrough, Track *track, ControlRoom *control_room, SampleProcessor *sample_processor)
 Creates a new fader.
Faderfader_find_from_port_identifier (const PortIdentifier *id)
Portfader_create_swap_phase_port (Fader *self, bool passthrough)
NONNULL void fader_append_ports (const Fader *self, GPtrArray *ports)
 Appends the ports owned by fader to the given array.
void fader_set_amp (void *self, float amp)
 Sets the amplitude of the fader.
void fader_set_amp_with_action (Fader *self, float amp_from, float amp_to, bool skip_if_equal)
 Sets the amp value with an undoable action.
void fader_add_amp (void *self, float amp)
 Adds (or subtracts if negative) to the amplitude of the fader (clamped at 0.0 to 2.0).
NONNULL void fader_set_midi_mode (Fader *self, MidiFaderMode mode, bool with_action, bool fire_events)
void fader_set_muted (Fader *self, bool mute, bool fire_events)
 Sets track muted and optionally adds the action to the undo stack.
NONNULL PURE bool fader_get_muted (const Fader *const self)
 Returns if the fader is muted.
HOT NONNULL PURE bool fader_get_soloed (const Fader *const self)
 Returns if the track is soloed.
bool fader_get_implied_soloed (Fader *self)
 Returns whether the fader is not soloed on its own but its direct out (or its direct out's direct out, etc.) or its child (or its children's child, etc.) is soloed.
void fader_set_listened (Fader *self, bool listen, bool fire_events)
 Sets fader listen and optionally adds the action to the undo stack.
void fader_set_soloed (Fader *self, bool solo, bool fire_events)
 Sets track soloed and optionally adds the action to the undo stack.
NONNULL PURE float fader_get_amp (void *self)
 Gets the fader amplitude (not db) FIXME is void * necessary? do it in the caller.
bool fader_get_mono_compat_enabled (Fader *self)
 Gets whether mono compatibility is enabled.
void fader_set_mono_compat_enabled (Fader *self, bool enabled, bool fire_events)
 Sets whether mono compatibility is enabled.
bool fader_get_swap_phase (Fader *self)
 Gets whether mono compatibility is enabled.
void fader_set_swap_phase (Fader *self, bool enabled, bool fire_events)
 Sets whether mono compatibility is enabled.
float fader_get_fader_val (void *self)
float fader_get_default_fader_val (void *self)
void fader_db_string_getter (void *obj, char *buf)
Channelfader_get_channel (Fader *self)
NONNULL Trackfader_get_track (Fader *self)
void fader_update_volume_and_fader_val (Fader *self)
HOT NONNULL void fader_clear_buffers (Fader *self)
 Clears all buffers.
void fader_set_fader_val (Fader *self, float fader_val)
 Sets the fader levels from a normalized value 0.0-1.0 (such as in widgets).
void fader_disconnect_all (Fader *self)
 Disconnects all ports connected to the fader.
void fader_copy_values (Fader *src, Fader *dest)
 Copy the fader values from source to dest.
NONNULL HOT void fader_process (Fader *self, const EngineProcessTimeInfo *const time_nfo)
 Process the Fader.
Faderfader_clone (const Fader *src)
void fader_free (Fader *self)
 Frees the fader members.
void graph_print (Graph *graph)
void graph_destroy (Graph *graph)
GraphNodegraph_find_node_from_port (const Graph *self, const Port *port)
GraphNodegraph_find_node_from_plugin (const Graph *self, const Plugin *pl)
GraphNodegraph_find_node_from_track (const Graph *self, const Track *track, bool use_setup_nodes)
GraphNodegraph_find_node_from_fader (const Graph *self, const Fader *fader)
GraphNodegraph_find_node_from_prefader (const Graph *self, const Fader *prefader)
GraphNodegraph_find_node_from_sample_processor (const Graph *self, const SampleProcessor *sample_processor)
GraphNodegraph_find_node_from_monitor_fader (const Graph *self, const Fader *fader)
GraphNodegraph_find_node_from_modulator_macro_processor (const Graph *self, const ModulatorMacroProcessor *processor)
GraphNodegraph_find_node_from_channel_send (const Graph *self, const ChannelSend *send)
GraphNodegraph_find_initial_processor_node (const Graph *self)
GraphNodegraph_find_hw_processor_node (const Graph *self, const HardwareProcessor *processor)
NONNULL GraphNodegraph_create_node (Graph *self, GraphNodeType type, void *data)
 Creates a new node, adds it to the graph and returns it.
nframes_t graph_get_max_route_playback_latency (Graph *graph, bool use_setup_nodes)
 Returns the max playback latency of the trigger nodes.
HOT void graph_on_reached_terminal_node (Graph *self)
 Called from a terminal node (from the Graph worked-thread) to indicate it has completed processing.
void graph_update_latencies (Graph *self, bool use_setup_nodes)
void graph_setup (Graph *self, const int drop_unnecessary_ports, const int rechain)
bool graph_validate_with_connection (Graph *self, const Port *src, const Port *dest)
 Adds a new connection for the given src and dest ports and validates the graph.
int graph_start (Graph *graph)
 Starts as many threads as there are cores.
Graphgraph_new_full (Router *router, SampleProcessor *sample_processor)
 Returns a new graph.
Graphgraph_new (Router *router)
void graph_terminate (Graph *self)
 Tell all threads to terminate.
void graph_free (Graph *self)
 Frees the graph and its members.
void graph_export_as_simple (GraphExportType type, const char *export_path)
void graph_export_as (Graph *graph, GraphExportType type, const char *path)
 Exports the graph at the given path.
char * graph_node_get_name (GraphNode *node)
 Returns a human friendly name of the node.
void * graph_node_get_pointer (GraphNode *self)
void graph_node_print_to_str (GraphNode *node, char *buf, size_t buf_sz)
void graph_node_print (GraphNode *node)
HOT void graph_node_process (GraphNode *node, EngineProcessTimeInfo time_nfo)
 Processes the GraphNode.
HOT nframes_t graph_node_get_single_playback_latency (GraphNode *node)
 Returns the latency of only the given port, without adding the previous/next latencies.
void graph_node_set_route_playback_latency (GraphNode *node, nframes_t dest_latency)
 Sets the playback latency of the given node recursively.
HOT void graph_node_trigger (GraphNode *self)
 Called by an upstream node when it has completed processing.
void graph_node_connect (GraphNode *from, GraphNode *to)
GraphNodegraph_node_new (Graph *graph, GraphNodeType type, void *data)
void graph_node_free (GraphNode *node)
GraphThreadgraph_thread_new (const int id, const bool is_main, Graph *graph)
 Creates a thread.
COLD WARN_UNUSED_RESULT HardwareProcessorhardware_processor_new (bool input, AudioEngine *engine)
 Returns a new empty instance.
bool hardware_processor_rescan_ext_ports (HardwareProcessor *self)
 Rescans the hardware ports and appends any missing ones.
ExtPorthardware_processor_find_ext_port (HardwareProcessor *self, const char *id)
 Finds an ext port from its ID (type + full name).
Porthardware_processor_find_port (HardwareProcessor *self, const char *id)
 Finds a port from its ID (type + full name).
int hardware_processor_setup (HardwareProcessor *self)
 Sets up the ports but does not start them.
void hardware_processor_activate (HardwareProcessor *self, bool activate)
 Starts or stops the ports.
REALTIME void hardware_processor_process (HardwareProcessor *self, nframes_t nframes)
 Processes the data.
HardwareProcessorhardware_processor_clone (const HardwareProcessor *src)
 To be used during serialization.
void hardware_processor_free (HardwareProcessor *self)
void instrument_track_init (Track *track)
 Initializes an instrument track.
void instrument_track_setup (Track *self)
Plugininstrument_track_get_instrument (Track *self)
int instrument_track_is_plugin_visible (Track *self)
 Returns if the first plugin's UI in the instrument track is visible.
void instrument_track_toggle_plugin_visible (Track *self)
 Toggles whether the first plugin's UI in the instrument Track is visible.
Markermarker_new (const char *name)
 Creates a Marker.
int marker_is_equal (Marker *a, Marker *b)
 Returns if the two Marker's are equal.
void marker_set_index (Marker *self, int index)
void marker_set_track_name_hash (Marker *marker, unsigned int track_name_hash)
 Sets the Track of the Marker.
Markermarker_find_by_name (const char *name)
MarkerTrack * marker_track_default (int track_pos)
 Creates the default marker track.
void marker_track_init (Track *track)
 Inits the marker track.
void marker_track_insert_marker (MarkerTrack *self, Marker *marker, int pos)
 Inserts a marker to the track.
void marker_track_add_marker (MarkerTrack *self, Marker *marker)
 Adds a marker to the track.
void marker_track_clear (MarkerTrack *self)
 Removes all objects from the marker track.
void marker_track_remove_marker (MarkerTrack *self, Marker *marker, int free)
 Removes a marker, optionally freeing it.
bool marker_track_validate (MarkerTrack *self)
Markermarker_track_get_start_marker (const Track *track)
 Returns the start marker.
Markermarker_track_get_end_marker (const Track *track)
 Returns the end marker.
void master_track_init (Track *track)
void master_track_setup (Track *self)
Metermeter_new_for_port (Port *port)
void meter_get_value (Meter *self, AudioValueFormat format, float *val, float *max)
 Get the current meter value.
void meter_free (Meter *self)
Metronomemetronome_new (void)
 Initializes the Metronome by loading the samples into memory.
NONNULL void metronome_set_volume (Metronome *self, float volume)
NONNULL void metronome_queue_events (AudioEngine *self, const nframes_t loffset, const nframes_t nframes)
 Queues metronome events (if any) within the current processing cycle.
NONNULL void metronome_free (Metronome *self)
void midi_events_init (MidiEvents *self)
 Inits the MidiEvents struct.
MidiEventsmidi_events_new (void)
 Allocates and inits a MidiEvents struct.
NONNULL void midi_event_set_velocity (MidiEvent *ev, midi_byte_t vel)
void midi_event_print (const MidiEvent *ev)
void midi_events_print (MidiEvents *self, const int queued)
void midi_events_append (MidiEvents *dest, MidiEvents *src, const nframes_t local_offset, const nframes_t nframes, bool queued)
 Appends the events from src to dest.
void midi_events_transform_chord_and_append (MidiEvents *dest, MidiEvents *src, const nframes_t local_offset, const nframes_t nframes, bool queued)
 Transforms the given MIDI input to the MIDI notes of the corresponding chord.
OPTIMIZE_O3 void midi_events_append_w_filter (MidiEvents *dest, MidiEvents *src, int *channels, const nframes_t start_frame, const nframes_t nframes, bool queued)
 Appends the events from src to dest.
void midi_events_add_note_on (MidiEvents *self, midi_byte_t channel, midi_byte_t note_pitch, midi_byte_t velocity, midi_time_t time, int queued)
 Adds a note on event to the given MidiEvents.
void midi_events_add_note_ons_from_chord_descr (MidiEvents *self, const ChordDescriptor *descr, midi_byte_t channel, midi_byte_t velocity, midi_time_t time, bool queued)
 Adds a note on for each note in the chord.
void midi_events_add_note_offs_from_chord_descr (MidiEvents *self, const ChordDescriptor *descr, midi_byte_t channel, midi_time_t time, bool queued)
 Adds a note off for each note in the chord.
void midi_events_add_cc_volume (MidiEvents *self, midi_byte_t channel, midi_byte_t volume, midi_time_t time, bool queued)
 Add CC volume event.
int midi_events_has_note_on (MidiEvents *self, int check_main, int check_queued)
 Returrns if the MidiEvents have any note on events.
void midi_events_add_event_from_buf (MidiEvents *self, midi_time_t time, midi_byte_t *buf, int buf_size, int queued)
 Parses a MidiEvent from a raw MIDI buffer.
void midi_events_add_note_off (MidiEvents *self, midi_byte_t channel, midi_byte_t note_pitch, midi_time_t time, int queued)
 Adds a note off event to the given MidiEvents.
void midi_events_add_control_change (MidiEvents *self, midi_byte_t channel, midi_byte_t controller, midi_byte_t control, midi_time_t time, int queued)
 Adds a control event to the given MidiEvents.
void midi_events_add_song_pos (MidiEvents *self, int64_t total_sixteenths, midi_time_t time, bool queued)
 Adds a song position event to the queue.
void midi_events_add_raw (MidiEvents *self, uint8_t *buf, size_t buf_sz, midi_time_t time, bool queued)
void midi_events_add_pitchbend (MidiEvents *self, midi_byte_t channel, uint32_t pitchbend, midi_time_t time, bool queued)
 Adds a control event to the given MidiEvents.
void midi_events_add_channel_pressure (MidiEvents *self, midi_byte_t channel, midi_byte_t value, midi_time_t time, bool queued)
void midi_events_add_all_notes_off (MidiEvents *self, midi_byte_t channel, midi_time_t time, bool queued)
 Queues MIDI note off to event queue.
NONNULL void midi_events_panic_without_lock (MidiEvents *self, bool queued)
 Adds a note off message to every MIDI channel.
NONNULL void midi_events_panic (MidiEvents *self, bool queued)
 Must only be called from the UI thread.
NONNULL void midi_events_write_to_midi_file (const MidiEvents *self, MIDI_FILE *mf, int midi_track)
void midi_events_clear (MidiEvents *midi_events, int queued)
 Clears midi events.
void midi_events_clear_duplicates (MidiEvents *midi_events, const int queued)
 Clears duplicates.
void midi_events_dequeue (MidiEvents *midi_events)
 Copies the queue contents to the original struct.
int midi_events_check_for_note_on (MidiEvents *midi_events, int note, int queued)
 Returns if a note on event for the given note exists in the given events.
int midi_events_delete_note_on (MidiEvents *midi_events, int note, int queued)
 Deletes the midi event with a note on signal from the queue, and returns if it deleted or not.
void midi_events_sort (MidiEvents *self, const bool queued)
 Sorts the MidiEvents by time.
void midi_events_set_channel (MidiEvents *self, const int queued, const midi_byte_t channel)
 Sets the given MIDI channel on all applicable MIDI events.
void midi_events_delete_event (MidiEvents *events, const MidiEvent *ev, const bool queued)
void midi_events_panic_all (const bool queued)
 Queues MIDI note off to event queues.
void midi_events_free (MidiEvents *self)
 Frees the MIDI events.
char * midi_function_type_to_string_id (MidiFunctionType type)
 Returns a string identifier for the type.
MidiFunctionType midi_function_string_id_to_type (const char *id)
 Returns a string identifier for the type.
int midi_function_apply (ArrangerSelections *sel, MidiFunctionType type, MidiFunctionOpts opts, GError **error)
 Applies the given action to the given selections.
void midi_mappings_init_loaded (MidiMappings *self)
 Initializes the MidiMappings after a Project is loaded.
MidiMappingsmidi_mappings_new (void)
 Returns a newly allocated MidiMappings.
void midi_mappings_bind_at (MidiMappings *self, midi_byte_t *buf, ExtPort *device_port, Port *dest_port, int idx, bool fire_events)
 Binds the CC represented by the given raw buffer (must be size 3) to the given Port.
void midi_mappings_unbind (MidiMappings *self, int idx, bool fire_events)
 Unbinds the given binding.
MidiMappingmidi_mapping_new (void)
void midi_mapping_set_enabled (MidiMapping *self, bool enabled)
int midi_mapping_get_index (MidiMappings *self, MidiMapping *mapping)
NONNULL MidiMappingmidi_mapping_clone (const MidiMapping *src)
void midi_mapping_free (MidiMapping *self)
void midi_mappings_apply_from_cc_events (MidiMappings *self, MidiEvents *events, bool queued)
 Applies the events to the appropriate mapping.
void midi_mappings_apply (MidiMappings *self, midi_byte_t *buf)
 Applies the given buffer to the matching ports.
int midi_mappings_get_for_port (MidiMappings *self, Port *dest_port, GPtrArray *arr)
 Get MIDI mappings for the given port.
MidiMappingsmidi_mappings_clone (const MidiMappings *src)
void midi_mappings_free (MidiMappings *self)
void midi_note_get_global_start_pos (MidiNote *self, Position *pos)
 Gets the global Position of the MidiNote's start_pos.
MidiNotemidi_note_new (RegionIdentifier *region_id, Position *start_pos, Position *end_pos, uint8_t val, uint8_t vel)
 Creates a new MidiNote.
void midi_note_set_region_and_index (MidiNote *self, ZRegion *region, int idx)
 Sets the region the MidiNote belongs to.
void midi_note_set_cache_val (MidiNote *self, const uint8_t val)
NONNULL PURE int midi_note_is_equal (MidiNote *src, MidiNote *dest)
 Returns 1 if the MidiNotes match, 0 if not.
void midi_note_get_val_as_string (const MidiNote *self, char *buf, PianoRollNoteNotation notation, const int use_markup)
 Gets the MIDI note's value as a string (eg "C#4").
void midi_note_print (MidiNote *mn)
 For debugging.
void midi_note_listen (MidiNote *mn, bool listen)
 Listen to the given MidiNote.
void midi_note_shift_pitch (MidiNote *self, const int delta)
 Shifts MidiNote's position and/or value.
int midi_note_hit (MidiNote *self, const signed_frame_t gframes)
 Returns if the MIDI note is hit at given pos (in the timeline).
void midi_note_notes_to_events (MidiNote **midi_notes, int num_notes, Position *pos, MidiEvents *events)
 Converts an array of MIDI notes to MidiEvents.
void midi_note_set_val (MidiNote *midi_note, const uint8_t val)
 Sends a note off if currently playing and sets the pitch of the MidiNote.
ZRegionmidi_note_get_region (MidiNote *self)
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.
void midi_track_init (Track *track)
 Initializes an midi track.
void midi_track_setup (Track *self)
REALTIME void midi_track_fill_midi_events (Track *track, const long g_start_frames, const nframes_t local_start_frame, nframes_t nframes, MidiEvents *midi_events)
 Fills MIDI event queue from track.
void midi_track_free (Track *track)
 Frees the track.
COLD void modulator_macro_processor_init_loaded (ModulatorMacroProcessor *self, Track *track)
void modulator_macro_processor_set_name (ModulatorMacroProcessor *self, const char *name)
Trackmodulator_macro_processor_get_track (ModulatorMacroProcessor *self)
void modulator_macro_processor_process (ModulatorMacroProcessor *self, const EngineProcessTimeInfo *const time_nfo)
ModulatorMacroProcessormodulator_macro_processor_new (Track *track, int idx)
void modulator_macro_processor_free (ModulatorMacroProcessor *self)
void modulator_track_insert_modulator (Track *self, int slot, Plugin *modulator, bool replace_mode, bool confirm, bool gen_automatables, bool recalc_graph, bool pub_events)
 Inserts and connects a Modulator to the Track.
void modulator_track_remove_modulator (Track *self, int slot, bool replacing, bool deleting_modulator, bool deleting_track, bool recalc_graph)
 Removes a plugin at pos from the track.
Trackmodulator_track_default (int track_pos)
 Creates the default modulator track.
void modulator_track_init (Track *track)
 Inits the modulator track.
bool audio_pool_init_loaded (AudioPool *self, GError **error)
 Inits after loading a project.
AudioPoolaudio_pool_new (void)
 Creates a new audio pool.
int audio_pool_add_clip (AudioPool *self, AudioClip *clip)
 Adds an audio clip to the pool.
int audio_pool_duplicate_clip (AudioPool *self, int clip_id, bool write_file, GError **error)
 Duplicates the clip with the given ID and returns the duplicate.
AudioClipaudio_pool_get_clip (AudioPool *self, int clip_id)
 Returns the clip for the given ID.
void audio_pool_remove_clip (AudioPool *self, int clip_id, bool free_and_remove_file, bool backup)
 Removes the clip with the given ID from the pool and optionally frees it (and removes the file).
void audio_pool_remove_unused (AudioPool *self, bool backup)
 Removes and frees (and removes the files for) all clips not used by the project or undo stacks.
void audio_pool_ensure_unique_clip_name (AudioPool *pool, AudioClip *clip)
 Ensures that the name of the clip is unique.
MALLOC char * audio_pool_gen_name_for_recording_clip (AudioPool *pool, Track *track, int lane)
 Generates a name for a recording clip.
bool audio_pool_reload_clip_frame_bufs (AudioPool *self, GError **error)
 Loads the frame buffers of clips currently in use in the project from their files and frees the buffers of clips not currently in use.
bool audio_pool_write_to_disk (AudioPool *self, bool is_backup, GError **error)
 Writes all the clips to disk.
AudioPoolaudio_pool_clone (const AudioPool *src)
 To be used during serialization.
void audio_pool_print (const AudioPool *const self)
void audio_pool_free (AudioPool *self)
PURE int port_scale_point_cmp (const void *_a, const void *_b)
NONNULL PortScalePointport_scale_point_new (const float val, const char *label)
NONNULL void port_scale_point_free (PortScalePoint *self)
NONNULL void port_init_loaded (Port *self, void *owner)
 This function finds the Ports corresponding to the PortIdentifiers for srcs and dests.
void port_set_owner (Port *self, PortOwnerType owner_type, void *owner)
NONNULL Portport_find_from_identifier (const PortIdentifier *const id)
WARN_UNUSED_RESULT NONNULL Portport_new_with_type (PortType type, PortFlow flow, const char *label)
 Creates port.
WARN_UNUSED_RESULT NONNULL Portport_new_with_type_and_owner (PortType type, PortFlow flow, const char *label, PortOwnerType owner_type, void *owner)
NONNULL void port_allocate_bufs (Port *self)
 Allocates buffers used during DSP.
NONNULL void port_free_bufs (Port *self)
 Frees buffers.
NONNULL StereoPortsstereo_ports_new_from_existing (Port *l, Port *r)
 Creates blank stereo ports.
StereoPortsstereo_ports_new_generic (int in, const char *name, const char *symbol, PortOwnerType owner_type, void *owner)
 Creates stereo ports for generic use.
NONNULL void stereo_ports_connect (StereoPorts *src, StereoPorts *dest, int locked)
 Connects the internal ports using port_connect().
NONNULL void stereo_ports_disconnect (StereoPorts *self)
StereoPortsstereo_ports_clone (const StereoPorts *src)
NONNULL void stereo_ports_free (StereoPorts *self)
const void * port_get_value_from_symbol (const char *port_sym, void *user_data, uint32_t *size, uint32_t *type)
 Function to get a port's value from its string symbol.
NONNULL bool port_has_sound (Port *self)
 If MIDI port, returns if there are any events, if audio port, returns if there is sound in the buffer.
NONNULL void port_get_full_designation (Port *const self, char *buf)
 Copies a full designation of self in the format "Track/Port" or "Track/Plugin/Port" in buf.
NONNULL void port_print_full_designation (Port *const self)
void port_get_all (GPtrArray *ports)
 Gathers all ports in the project and appends them in the given array.
NONNULL Trackport_get_track (const Port *const self, int warn_if_fail)
NONNULL Pluginport_get_plugin (Port *const self, const bool warn_if_fail)
void port_update_identifier (Port *self, const PortIdentifier *prev_id, Track *track, bool update_automation_track)
 To be called when the port's identifier changes to update corresponding identifiers.
NONNULL void port_disconnect_hw_inputs (Port *self)
 Disconnects all hardware inputs from the port.
NONNULL void port_set_expose_to_backend (Port *self, int expose)
 Sets whether to expose the port to the backend and exposes it or removes it.
NONNULL void port_rename_backend (Port *self)
 Renames the port on the backend side.
NONNULL void port_set_control_value (Port *self, const float val, const bool is_normalized, const bool forward_event)
 Sets the given control value to the corresponding underlying structure in the Port.
NONNULL HOT float port_get_control_value (Port *self, const bool normalize)
 Gets the given control value from the corresponding underlying structure in the Port.
NONNULL int port_get_num_unlocked_srcs (const Port *self)
 Returns the number of unlocked (user-editable) sources.
NONNULL int port_get_num_unlocked_dests (const Port *self)
 Returns the number of unlocked (user-editable) destinations.
void port_update_track_name_hash (Port *self, Track *track, unsigned int new_hash)
 Updates the track name hash on a track port and all its source/destination identifiers.
HOT NONNULL void port_process (Port *port, const EngineProcessTimeInfo time_nfo, const bool noroll)
 First sets port buf to 0, then sums the given port signal from its inputs.
NONNULL bool ports_can_be_connected (const Port *src, const Port *dest)
 Returns whether the Port's can be connected (if the connection will be valid and won't break the acyclicity of the graph).
NONNULL void ports_disconnect (Port **ports, int num_ports, int deleting)
 Disconnects all the given ports.
NONNULL void port_copy_metadata_from_project (Port *self, Port *project_port)
 Copies the metadata from a project port to the given port.
NONNULL void port_copy_values (Port *self, const Port *other)
 Copies the port values from other to self.
NONNULL void port_restore_from_non_project (Port *self, Port *non_project)
 Reverts the data on the corresponding project port for the given non-project port.
HOT NONNULL OPTIMIZE_O3 void port_clear_external_buffer (Port *port)
 Clears the backend's port buffer.
NONNULL int port_disconnect_all (Port *port)
 Disconnects all srcs and dests from port.
NONNULL void port_apply_pan_stereo (Port *l, Port *r, float pan, PanLaw pan_law, PanAlgorithm pan_algo)
 Applies the pan to the given L/R ports.
NONNULL void port_apply_pan (Port *port, float pan, PanLaw pan_law, PanAlgorithm pan_algo, nframes_t start_frame, const nframes_t nframes)
 Applies the pan to the given port.
NONNULL uint32_t port_get_hash (const void *ptr)
 Generates a hash for a given port.
Portport_clone (const Port *src)
 To be used during serialization.
NONNULL void port_free (Port *port)
 Deletes port, doing required cleanup and updating counters.
PortConnectionport_connection_new (const PortIdentifier *src, const PortIdentifier *dest, float multiplier, bool locked, bool enabled)
NONNULL void port_connection_update (PortConnection *self, float multiplier, bool locked, bool enabled)
NONNULL PURE bool port_connection_is_send (const PortConnection *self)
NONNULL void port_connection_print_to_str (const PortConnection *self, char *buf, size_t buf_sz)
NONNULL void port_connection_print (const PortConnection *self)
NONNULL PortConnectionport_connection_clone (const PortConnection *src)
 To be used during serialization.
NONNULL void port_connection_free (PortConnection *self)
 Deletes port, doing required cleanup and updating counters.
NONNULL void port_connections_manager_init_loaded (PortConnectionsManager *self)
PortConnectionsManagerport_connections_manager_new (void)
void port_connections_manager_regenerate_hashtables (PortConnectionsManager *self)
 Regenerates the hash tables.
int port_connections_manager_get_sources_or_dests (const PortConnectionsManager *self, GPtrArray *arr, const PortIdentifier *id, bool sources)
 Adds the sources/destinations of id in the given array.
int port_connections_manager_get_unlocked_sources_or_dests (const PortConnectionsManager *self, GPtrArray *arr, const PortIdentifier *id, bool sources)
 Adds the sources/destinations of id in the given array.
PortConnectionport_connections_manager_get_source_or_dest (const PortConnectionsManager *self, const PortIdentifier *id, bool sources)
 Wrapper over port_connections_manager_get_sources_or_dests() that returns the first connection.
PortConnectionport_connections_manager_find_connection (const PortConnectionsManager *self, const PortIdentifier *src, const PortIdentifier *dest)
bool port_connections_manager_predicate_is_send_of (const void *obj, const void *user_data)
 Returns whether the given connection is for the given send.
int port_connections_manager_find (const PortConnectionsManager *self, GPtrArray *arr, GenericPredicateFunc predicate)
 Adds the connections matching the given predicate to the given array (if given).
const PortConnectionport_connections_manager_ensure_connect (PortConnectionsManager *self, const PortIdentifier *src, const PortIdentifier *dest, float multiplier, bool locked, bool enabled)
 Stores the connection for the given ports if it doesn't exist, otherwise updates the existing connection.
bool port_connections_manager_ensure_disconnect (PortConnectionsManager *self, const PortIdentifier *src, const PortIdentifier *dest)
 Removes the connection for the given ports if it exists.
void port_connections_manager_ensure_disconnect_all (PortConnectionsManager *self, const PortIdentifier *pi)
 Disconnect all sources and dests of the given port identifier.
void port_connections_manager_reset (PortConnectionsManager *self, const PortConnectionsManager *src)
 Removes all connections from self.
bool port_connections_manager_contains_connection (const PortConnectionsManager *self, const PortConnection *const conn)
void port_connections_manager_print_ht (GHashTable *ht)
void port_connections_manager_print (const PortConnectionsManager *self)
NONNULL PortConnectionsManagerport_connections_manager_clone (const PortConnectionsManager *src)
 To be used during serialization.
NONNULL void port_connections_manager_free (PortConnectionsManager *self)
 Deletes port, doing required cleanup and updating counters.
void port_identifier_init (PortIdentifier *self)
int port_identifier_port_group_cmp (const void *p1, const void *p2)
 Port group comparator function where p1 and p2 are pointers to Port.
NONNULL void port_identifier_copy (PortIdentifier *dest, const PortIdentifier *src)
 Copy the identifier content from src to dest.
WARN_UNUSED_RESULT NONNULL bool port_identifier_is_equal (const PortIdentifier *src, const PortIdentifier *dest)
 Returns if the 2 PortIdentifier's are equal.
int port_identifier_is_equal_func (const void *a, const void *b)
 To be used as GEqualFunc.
NONNULL void port_identifier_print_to_str (const PortIdentifier *self, char *buf, size_t buf_sz)
NONNULL void port_identifier_print (const PortIdentifier *self)
NONNULL bool port_identifier_validate (PortIdentifier *self)
NONNULL uint32_t port_identifier_get_hash (const void *self)
NONNULL PortIdentifierport_identifier_clone (const PortIdentifier *src)
NONNULL void port_identifier_free_members (PortIdentifier *self)
NONNULL void port_identifier_free (PortIdentifier *self)
void port_identifier_free_func (void *self)
 Compatible with GDestroyNotify.
void position_set_to_bar (Position *self, int bar)
 Sets position to given bar.
void position_sort_array (Position *array, const size_t size)
 Sorts an array of Position's.
HOT void position_add_frames (Position *pos, const signed_frame_t frames)
 Adds the frames to the position and updates the rest of the fields, and makes sure the frames are still accurate.
void position_from_seconds (Position *position, double secs)
 Converts seconds to position and puts the result in the given Position.
HOT NONNULL void position_from_frames (Position *pos, const signed_frame_t frames)
HOT NONNULL void position_from_ticks (Position *pos, double ticks)
 Sets position to the given total tick count.
NONNULL void position_from_ms (Position *pos, const signed_ms_t ms)
NONNULL void position_from_bars (Position *pos, int bars)
HOT NONNULL void position_add_ticks (Position *self, double ticks)
signed_ms_t position_to_ms (const Position *pos)
 Returns the Position in milliseconds.
signed_frame_t position_ms_to_frames (const double ms)
double position_ms_to_ticks (const double ms)
void position_add_ms (Position *pos, const double ms)
void position_add_minutes (Position *pos, int mins)
void position_add_seconds (Position *pos, const signed_sec_t seconds)
void position_snap (const Position *start_pos, Position *pos, Track *track, ZRegion *region, const SnapGrid *sg)
 Snaps position using given options.
void position_set_min_size (const Position *start_pos, Position *end_pos, SnapGrid *snap)
 Sets the end position to be 1 snap point away from the start pos.
HOT NONNULL void position_update_ticks_from_frames (Position *position, double ticks_per_frame)
 Updates ticks.
signed_frame_t position_get_frames_from_ticks (double ticks, double frames_per_tick)
 Converts ticks to frames.
HOT NONNULL void position_update_frames_from_ticks (Position *self, double frames_per_tick)
 Updates frames.
void position_get_midway_pos (Position *start_pos, Position *end_pos, Position *pos)
 Calculates the midway point between the two Positions and sets it on pos.
double position_get_ticks_diff (const Position *end_pos, const Position *start_pos, const SnapGrid *sg)
 Returns the difference in ticks between the two Position's, snapped based on the given SnapGrid (if any).
NONNULL char * position_to_string_alloc (const Position *pos)
 Creates a string in the form of "" from the given position.
NONNULL void position_to_string_full (const Position *pos, char *buf, int decimal_places)
NONNULL void position_to_string (const Position *pos, char *buf)
 Creates a string in the form of "" from the given position.
NONNULL WARN_UNUSED_RESULT bool position_parse (Position *pos, const char *str)
 Parses a position from the given string.
NONNULL void position_print (const Position *pos)
 Prints the Position in the "" form.
NONNULL void position_print_range (const Position *pos, const Position *pos2)
NONNULL int position_get_total_bars (const Position *pos, bool include_current)
 Returns the total number of beats.
NONNULL int position_get_total_beats (const Position *pos, bool include_current)
 Returns the total number of beats.
NONNULL int position_get_total_sixteenths (const Position *pos, bool include_current)
 Returns the total number of sixteenths not including the current one.
NONNULL void position_change_sign (Position *pos)
 Changes the sign of the position.
NONNULL int position_get_bars (const Position *pos, bool start_at_one)
 Gets the bars of the position.
NONNULL int position_get_beats (const Position *pos, bool start_at_one)
 Gets the beats of the position.
NONNULL int position_get_sixteenths (const Position *pos, bool start_at_one)
 Gets the sixteenths of the position.
NONNULL double position_get_ticks (const Position *pos)
 Gets the ticks of the position.
NONNULL bool position_validate (const Position *pos)
void quantize_options_init (QuantizeOptions *self, NoteLength note_length)
void quantize_options_update_quantize_points (QuantizeOptions *self)
 Updates snap points.
float quantize_options_get_swing (QuantizeOptions *self)
float quantize_options_get_amount (QuantizeOptions *self)
float quantize_options_get_randomization (QuantizeOptions *self)
void quantize_options_set_swing (QuantizeOptions *self, float swing)
void quantize_options_set_amount (QuantizeOptions *self, float amount)
void quantize_options_set_randomization (QuantizeOptions *self, float randomization)
char * quantize_options_stringize (NoteLength note_length, NoteType note_type)
 Returns the grid intensity as a human-readable string.
double quantize_options_quantize_position (QuantizeOptions *self, Position *pos)
 Quantizes the given Position using the given QuantizeOptions.
QuantizeOptionsquantize_options_clone (const QuantizeOptions *src)
 Clones the QuantizeOptions.
QuantizeOptionsquantize_options_new (void)
void quantize_options_free (QuantizeOptions *self)
 Free's the QuantizeOptions.
COLD MALLOC RecordingEventrecording_event_new (void)
void recording_event_print (RecordingEvent *self)
void recording_event_free (RecordingEvent *self)
REALTIME void recording_manager_handle_recording (RecordingManager *self, const TrackProcessor *track_processor, const EngineProcessTimeInfo *const time_nfo)
 Handles the recording logic inside the process cycle.
int recording_manager_process_events (RecordingManager *self)
 GSourceFunc to be added using idle add.
RecordingManagerrecording_manager_new (void)
 Creates the event queue and starts the event loop.
void recording_manager_free (RecordingManager *self)
void region_init (ZRegion *region, const Position *start_pos, const Position *end_pos, unsigned int track_name_hash, int lane_pos, int idx_inside_lane)
 Only to be used by implementing structs.
HOT NONNULL ZRegionregion_find (const RegionIdentifier *const id)
 Looks for the ZRegion matching the identifier.
NONNULL void region_print_to_str (const ZRegion *self, char *buf, const size_t buf_size)
NONNULL bool region_has_link_group (ZRegion *region)
void region_copy (ZRegion *src, ZRegion *dest)
 Copies the data from src to dest.
PURE ZRegionregion_at_position (const Track *track, const AutomationTrack *at, const Position *pos)
 Returns the region at the given position in the given Track.
void region_get_type_as_string (RegionType type, char *buf)
void region_create_link_group_if_none (ZRegion *region)
void region_copy_children (ZRegion *dest, ZRegion *src)
 Clones and copies all children from src to dest.
NONNULL bool region_is_looped (const ZRegion *const self)
void region_identifier_init (RegionIdentifier *self)
bool region_identifier_validate (RegionIdentifier *self)
void region_identifier_free (RegionIdentifier *self)
NONNULL void region_link_group_init_loaded (RegionLinkGroup *self)
RegionLinkGroupregion_link_group_new (int idx)
NONNULL void region_link_group_add_region (RegionLinkGroup *self, ZRegion *region)
NONNULL void region_link_group_remove_region (RegionLinkGroup *self, ZRegion *region, bool autoremove_last_region_and_group, bool update_identifier)
 Remove the region from the link group.
NONNULL bool region_link_group_contains_region (RegionLinkGroup *self, ZRegion *region)
NONNULL void region_link_group_print (RegionLinkGroup *self)
NONNULL void region_link_group_update (RegionLinkGroup *self, ZRegion *region)
 Updates all other regions in the link group.
NONNULL bool region_link_group_validate (RegionLinkGroup *self)
RegionLinkGroupregion_link_group_clone (const RegionLinkGroup *src)
void region_link_group_free (RegionLinkGroup *self)
void region_link_group_manager_init_loaded (RegionLinkGroupManager *self)
RegionLinkGroupManagerregion_link_group_manager_new (void)
int region_link_group_manager_add_group (RegionLinkGroupManager *self)
 Adds a group and returns its index.
RegionLinkGroupregion_link_group_manager_get_group (RegionLinkGroupManager *self, int group_id)
void region_link_group_manager_remove_group (RegionLinkGroupManager *self, int group_id)
 Removes the group.
NONNULL bool region_link_group_manager_validate (RegionLinkGroupManager *self)
NONNULL void region_link_group_manager_print (RegionLinkGroupManager *self)
NONNULL RegionLinkGroupManagerregion_link_group_manager_clone (RegionLinkGroupManager *src)
NONNULL void region_link_group_manager_free (RegionLinkGroupManager *self)
Routerrouter_new (void)
void router_recalc_graph (Router *self, bool soft)
 Recalculates the process acyclic directed graph.
void router_start_cycle (Router *self, EngineProcessTimeInfo time_nfo)
 Starts a new cycle.
nframes_t router_get_max_route_playback_latency (Router *router)
 Returns the max playback latency of the trigger nodes.
WARN_UNUSED_RESULT HOT NONNULL ACCESS_READ_ONLY (1) static inline bool router_is_processing_kickoff_thread(const Router *const self)
 Returns whether this is the thread that kicks off processing (thread that calls router_start_cycle()).
NONNULL void router_queue_control_port_change (Router *self, const ControlPortChange *change)
 Queues a control port change to be applied when processing starts.
void router_free (Router *self)
COLD WARN_UNUSED_RESULT SampleProcessorsample_processor_new (AudioEngine *engine)
 Initializes a SamplePlayback with a sample to play back.
COLD void sample_processor_init_loaded (SampleProcessor *self, AudioEngine *engine)
void sample_processor_prepare_process (SampleProcessor *self, const nframes_t nframes)
 Clears the buffers.
void sample_processor_process (SampleProcessor *self, const nframes_t offset, const nframes_t nframes)
 Process the samples for the given number of frames.
void sample_processor_remove_sample_playback (SampleProcessor *self, SamplePlayback *sp)
 Removes a SamplePlayback from the array.
void sample_processor_queue_metronome_countin (SampleProcessor *self)
 Queues a metronomem tick at the given offset.
void sample_processor_queue_metronome (SampleProcessor *self, MetronomeType type, nframes_t offset)
 Queues a metronomem tick at the given local offset.
void sample_processor_queue_sample_from_file (SampleProcessor *self, const char *path)
 Adds a sample to play to the queue from a file path.
void sample_processor_queue_file (SampleProcessor *self, const SupportedFile *file)
 Adds a file (audio or MIDI) to the queue.
void sample_processor_queue_chord_preset (SampleProcessor *self, const ChordPreset *chord_pset)
 Adds a chord preset to the queue.
void sample_processor_stop_file_playback (SampleProcessor *self)
 Stops playback of files (auditioning).
void sample_processor_disconnect (SampleProcessor *self)
SampleProcessorsample_processor_clone (const SampleProcessor *src)
 To be used for serialization.
void sample_processor_free (SampleProcessor *self)
MusicalScalemusical_scale_new (MusicalScaleType type, MusicalNote root)
 Creates new scale using type and root note.
const bool * musical_scale_get_notes (MusicalScaleType scale_type, bool ascending)
 Returns the notes in the given scale.
RETURNS_NONNULL const ChordTypemusical_scale_get_triad_types (MusicalScaleType scale_type, bool ascending)
 Returns the triads in the given scale.
MusicalScalemusical_scale_clone (MusicalScale *src)
 Clones the scale.
const char * musical_scale_type_to_string (const MusicalScaleType type)
char * musical_scale_to_string (const MusicalScale *const self)
 Prints the MusicalScale to a string.
void musical_scale_strcpy (MusicalScale *scale, char *buf)
 Same as above but uses a buffer instead of allocating.
bool musical_scale_contains_chord (const MusicalScale *const scale, const ChordDescriptor *const chord)
 Returns if all of the chord's notes are in the scale.
int musical_scale_is_accent_in_scale (MusicalScale *scale, MusicalNote chord_root, ChordType type, ChordAccent chord_accent)
 Returns if the accent is in the scale.
bool musical_scale_contains_note (const MusicalScale *scale, MusicalNote note)
 Returns if the given key is in the given MusicalScale.
char * musical_scale_as_string (MusicalScale *scale)
 Returns the scale in human readable string.
void musical_scale_free (MusicalScale *scale)
 Frees the MusicalScale.
ScaleObjectscale_object_new (MusicalScale *descr)
 Creates a ScaleObject.
void scale_object_set_index (ScaleObject *self, int index)
int scale_object_is_equal (ScaleObject *a, ScaleObject *b)
void snap_grid_init (SnapGrid *self, SnapGridType type, NoteLength note_length, bool adaptive)
int snap_grid_get_ticks_from_length_and_type (NoteLength length, NoteType type)
NONNULL int snap_grid_get_snap_ticks (const SnapGrid *self)
 Gets a snap point's length in ticks.
NONNULL double snap_grid_get_snap_frames (const SnapGrid *self)
int snap_grid_get_default_ticks (SnapGrid *self)
 Gets a the default length in ticks.
char * snap_grid_stringize_length_and_type (NoteLength note_length, NoteType note_type)
 Returns the grid intensity as a human-readable string.
char * snap_grid_stringize (SnapGrid *self)
 Returns the grid intensity as a human-readable string.
NONNULL bool snap_grid_get_nearby_snap_point (Position *ret_pos, const SnapGrid *const self, const Position *pos, const bool return_prev)
 Returns the next or previous SnapGrid point.
SnapGridsnap_grid_clone (SnapGrid *src)
SnapGridsnap_grid_new (void)
void snap_grid_free (SnapGrid *self)
Stretcherstretcher_new_rubberband (unsigned int samplerate, unsigned int channels, double time_ratio, double pitch_ratio, bool realtime)
 Create a new Stretcher using the rubberband backend.
ssize_t stretcher_stretch (Stretcher *self, float *in_samples_l, float *in_samples_r, size_t in_samples_size, float *out_samples_l, float *out_samples_r, size_t out_samples_wanted)
 Perform stretching.
unsigned int stretcher_get_latency (Stretcher *self)
 Get latency in number of samples.
void stretcher_set_time_ratio (Stretcher *self, double ratio)
ssize_t stretcher_stretch_interleaved (Stretcher *self, float *in_samples, size_t in_samples_size, float **_out_samples)
 Perform stretching.
void stretcher_free (Stretcher *self)
 Frees the resampler.
Tracktempo_track_default (int track_pos)
 Creates the default tempo track.
void tempo_track_init (Track *track)
 Inits the tempo track.
void tempo_track_clear (Track *self)
 Removes all objects from the tempo track.
bpm_t tempo_track_get_bpm_at_pos (Track *track, Position *pos)
 Returns the BPM at the given pos.
bpm_t tempo_track_get_current_bpm (Track *self)
 Returns the current BPM.
const char * tempo_track_get_current_bpm_as_str (void *self)
void tempo_track_set_bpm (Track *self, bpm_t bpm, bpm_t start_bpm, bool temporary, bool fire_events)
 Sets the BPM.
void tempo_track_set_bpm_from_str (void *_self, const char *str)
int tempo_track_beat_unit_enum_to_int (BeatUnit ebeat_unit)
void tempo_track_set_beat_unit_from_enum (Track *self, BeatUnit ebeat_unit)
BeatUnit tempo_track_get_beat_unit_enum (Track *self)
BeatUnit tempo_track_beat_unit_to_enum (int beat_unit)
void tempo_track_set_beat_unit (Track *self, int beat_unit)
void tempo_track_set_beats_per_bar (Track *self, int beats_per_bar)
 Updates beat unit and anything depending on it.
int tempo_track_get_beats_per_bar (Track *self)
int tempo_track_get_beat_unit (Track *self)
void track_init (Track *self, const int add_lane)
 Inits the Track, optionally adding a single lane.
Tracktrack_new (TrackType type, int pos, const char *label, const int with_lane)
 Creates a track with the given label and returns it.
bool track_type_has_channel (TrackType type)
 Returns if the given TrackType is a type of Track that has a Channel.
NONNULL void track_set_magic (Track *self)
 Sets magic on objects recursively.
NONNULL void track_set_muted (Track *track, bool mute, bool trigger_undo, bool auto_select, bool fire_events)
 Sets track muted and optionally adds the action to the undo stack.
NONNULL void track_set_folded (Track *self, bool folded, bool trigger_undo, bool auto_select, bool fire_events)
 Sets track folded and optionally adds the action to the undo stack.
NONNULL TrackType track_get_type_from_plugin_descriptor (PluginDescriptor *descr)
NONNULL bool track_type_is_deletable (TrackType type)
 Returns whether the track type is deletable by the user.
NONNULL Tracklisttrack_get_tracklist (Track *self)
NONNULL bool track_get_should_be_visible (const Track *self)
 Returns whether the track should be visible.
bool track_multiply_heights (Track *self, double multiplier, bool visible_only, bool check_only)
HOT NONNULL bool track_get_soloed (Track *self)
 Returns if the track is soloed.
NONNULL bool track_get_implied_soloed (Track *self)
 Returns whether the track is not soloed on its own but its direct out (or its direct out's direct out, etc.) is soloed.
NONNULL bool track_get_muted (Track *self)
 Returns if the track is muted.
NONNULL bool track_get_listened (Track *self)
 Returns if the track is listened.
NONNULL bool track_get_monitor_audio (Track *self)
 Returns whether monitor audio is on.
NONNULL void track_set_monitor_audio (Track *self, bool monitor, bool auto_select, bool fire_events)
 Sets whether monitor audio is on.
NONNULL void track_set_listened (Track *self, bool listen, bool trigger_undo, bool auto_select, bool fire_events)
 Sets track soloed, updates UI and optionally adds the action to the undo stack.
HOT NONNULL bool track_get_recording (const Track *const track)
NONNULL void track_set_recording (Track *track, bool recording, bool fire_events)
 Sets recording and connects/disconnects the JACK ports.
NONNULL void track_set_soloed (Track *self, bool solo, bool trigger_undo, bool auto_select, bool fire_events)
 Sets track soloed, updates UI and optionally adds the action to the undo stack.
NONNULL bool track_has_soloed_lanes (const Track *const self)
 Returns whether the track has any soloed lanes.
NONNULL int track_is_selected (Track *self)
 Returns if Track is in TracklistSelections.
bool track_insert_region (Track *track, ZRegion *region, AutomationTrack *at, int lane_pos, int idx, int gen_name, int fire_events, GError **error)
 Inserts a ZRegion to the given lane or AutomationTrack of the track, at the given index.
void track_write_to_midi_file (const Track *self, MIDI_FILE *mf, MidiEvents *events, const Position *start, const Position *end, bool lanes_as_tracks, bool use_track_pos)
 Writes the track to the given MIDI file.
NONNULL void track_select (Track *self, bool select, bool exclusive, bool fire_events)
 Appends the Track to the selections.
NONNULL void track_unselect_all (Track *self)
 Unselects all arranger objects in the track.
NONNULL bool track_contains_uninstantiated_plugin (const Track *const self)
NONNULL void track_clear (Track *self)
 Removes all objects recursively from the track.
NONNULL void track_remove_region (Track *self, ZRegion *region, bool fire_events, bool free)
 Only removes the region from the track.
void track_fill_events (const Track *self, const EngineProcessTimeInfo *const time_nfo, MidiEvents *midi_events, StereoPorts *stereo_ports)
 Wrapper for audio and MIDI/instrument tracks to fill in MidiEvents or StereoPorts from the timeline data.
bool track_validate (Track *self)
 Verifies the identifiers on a live Track (in the project, not a clone).
void track_add_folder_parents (const Track *self, GPtrArray *parents, bool prepend)
 Adds the track's folder parents to the given array.
Tracktrack_get_direct_folder_parent (Track *track)
 Returns the closest foldable parent or NULL.
void track_remove_from_folder_parents (Track *self)
 Remove the track from all folders.
ZRegiontrack_get_region_at_pos (const Track *track, const Position *pos, bool include_region_end)
 Returns the region at the given position, or NULL.
ZRegiontrack_get_last_region (Track *track)
 Returns the last ZRegion in the track, or NULL.
void track_set_lanes_visible (Track *track, const int visible)
 Set track lanes visible and fire events.
void track_set_automation_visible (Track *track, const bool visible)
 Set automation visible and fire events.
int track_type_can_host_region_type (const TrackType tt, const RegionType rt)
 Returns if the given TrackType can host the given RegionType.
void track_generate_automation_tracks (Track *track)
 Generates automatables for the track.
void track_setup (Track *track)
void track_update_children (Track *self)
 Updates the track's children.
Tracktrack_find_by_name (const char *name)
void track_get_velocities_in_range (const Track *track, 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.
const char * track_get_name (Track *track)
 Getter for the track name.
NONNULL bool track_set_name_with_action_full (Track *track, const char *name)
 Internally called by track_set_name_with_action().
void track_set_name_with_action (Track *track, const char *name)
 Setter to be used by the UI to create an undoable action.
void track_set_name (Track *self, const char *name, bool pub_events)
 Setter for the track name.
char * track_get_unique_name (Track *track_to_skip, const char *name)
 Returns a unique name for a new track based on the given name.
Tracktrack_get_from_name (const char *name)
 Returns the Track from the Project matching name.
const char * track_stringize_type (TrackType type)
void track_update_positions (Track *self, bool from_ticks, bool bpm_change)
 Updates the frames/ticks of each position in each child of the track recursively.
Fadertrack_get_fader (Track *track, bool post_fader)
 Returns the Fader (if applicable).
FaderType track_get_fader_type (const Track *track)
 Returns the FaderType corresponding to the given Track.
FaderType track_type_get_prefader_type (TrackType type)
 Returns the prefader type corresponding to the given Track.
bool track_create_missing_lanes (Track *self, const int pos)
 Creates missing TrackLane's until pos.
void track_remove_empty_last_lanes (Track *self)
 Removes the empty last lanes of the Track (except the last one).
int track_get_regions_in_range (Track *self, Position *p1, Position *p2, ZRegion **regions)
 Returns all the regions inside the given range, or all the regions if both p1 and p2 are NULL.
int track_get_plugins (const Track *const self, GPtrArray *arr)
 Fills in the given array (if non-NULL) with all plugins in the track and returns the number of plugins.
void track_activate_all_plugins (Track *track, bool activate)
void track_comment_setter (void *track, const char *comment)
 Comment setter.
void track_set_comment (Track *self, const char *comment, bool undoable)
const char * track_get_comment (void *track)
 Comment getter.
void track_set_color (Track *self, const GdkRGBA *color, bool undoable, bool fire_events)
 Sets the track color.
void track_set_icon (Track *self, const char *icon_name, bool undoable, bool fire_events)
 Sets the track icon.
Plugintrack_get_plugin_at_slot (Track *track, PluginSlotType slot_type, int slot)
 Returns the plugin at the given slot, if any.
void track_mark_for_bounce (Track *self, bool bounce, bool mark_regions, bool mark_children, bool mark_parents)
 Marks the track for bouncing.
void track_append_ports (Track *self, GPtrArray *ports, bool include_plugins)
 Appends all channel ports and optionally plugin ports to the array.
bool track_freeze (Track *self, bool freeze, GError **error)
 Freezes or unfreezes the track.
void track_insert_plugin (Track *self, Plugin *pl, PluginSlotType slot_type, int slot, bool instantiate_plugin, bool replacing_plugin, bool moving_plugin, bool confirm, bool gen_automatables, bool recalc_graph, bool fire_events)
 Wrapper over channel_add_plugin() and modulator_track_insert_modulator().
void track_remove_plugin (Track *self, PluginSlotType slot_type, int slot, bool replacing_plugin, bool moving_plugin, bool deleting_plugin, bool deleting_track, bool recalc_graph)
 Wrapper over channel_remove_plugin() and modulator_track_remove_modulator().
void track_disconnect (Track *self, bool remove_pl, bool recalc_graph)
 Disconnects the track from the processing chain.
NONNULL bool track_is_enabled (Track *self)
NONNULL void track_set_enabled (Track *self, bool enabled, bool trigger_undo, bool auto_select, bool fire_events)
TrackType track_type_get_from_string (const char *str)
void track_get_total_bars (Track *self, int *total_bars)
void track_set_caches (Track *self, CacheTypes types)
 Set various caches (snapshots, track name hash, plugin input/output ports, etc).
bool track_create_with_action (TrackType type, const PluginSetting *pl_setting, const SupportedFile *file_descr, const Position *pos, int index, int num_tracks, int disable_track_idx, TracksReadyCallback ready_cb, GError **error)
Tracktrack_create_empty_at_idx_with_action (TrackType type, int index, GError **error)
Tracktrack_create_for_plugin_at_idx_w_action (TrackType type, const PluginSetting *pl_setting, int index, GError **error)
GMenu * track_generate_edit_context_menu (Track *track, int num_selected)
GMenu * track_generate_channel_context_menu (Track *track)
 Generates a menu to be used for channel-related items, eg, fader buttons, direct out, etc.
void track_free (Track *track)
 Wrapper for each track type.
void track_lane_init_loaded (TrackLane *self, Track *track)
TrackLanetrack_lane_new (Track *track, int pos)
 Creates a new TrackLane at the given pos in the given Track.
void track_lane_insert_region (TrackLane *self, ZRegion *region, int idx)
 Inserts a ZRegion to the given TrackLane at the given index.
void track_lane_add_region (TrackLane *self, ZRegion *region)
 Adds a ZRegion to the given TrackLane.
void track_lane_remove_region (TrackLane *self, ZRegion *region)
 Removes but does not free the region.
void track_lane_unselect_all (TrackLane *self)
 Unselects all arranger objects.
void track_lane_clear (TrackLane *self)
 Removes all objects recursively from the track lane.
void track_lane_rename (TrackLane *self, const char *new_name, bool with_action)
 Rename the lane.
void track_lane_rename_with_action (TrackLane *self, const char *new_name)
 Wrapper over track_lane_rename().
NONNULL void track_lane_set_soloed (TrackLane *self, bool solo, bool trigger_undo, bool fire_events)
 Sets track lane soloed, updates UI and optionally adds the action to the undo stack.
NONNULL bool track_lane_get_soloed (const TrackLane *const self)
NONNULL void track_lane_set_muted (TrackLane *self, bool mute, bool trigger_undo, bool fire_events)
 Sets track lane muted, updates UI and optionally adds the action to the undo stack.
NONNULL bool track_lane_get_muted (const TrackLane *const self)
const char * track_lane_get_name (TrackLane *self)
void track_lane_update_positions (TrackLane *self, bool from_ticks, bool bpm_change)
 Updates the positions in each child recursively.
void track_lane_update_track_name_hash (TrackLane *self)
 Sets the new track name hash to all the lane's objects recursively.
TrackLanetrack_lane_clone (const TrackLane *src, Track *track)
 Clones the TrackLane.
void track_lane_write_to_midi_file (TrackLane *self, MIDI_FILE *mf, MidiEvents *events, const Position *start, const Position *end, bool lanes_as_tracks, bool use_track_or_lane_pos)
 Writes the lane to the given MIDI file.
NONNULL Tracklisttrack_lane_get_tracklist (const TrackLane *self)
NONNULL Tracktrack_lane_get_track (const TrackLane *self)
NONNULL int track_lane_calculate_lane_idx (const TrackLane *self)
 Calculates a unique index for this lane.
TrackLanetrack_lane_gen_snapshot (const TrackLane *self)
 Generate a snapshot for playback.
NONNULL void track_lane_free (TrackLane *lane)
 Frees the TrackLane.
COLD WARN_UNUSED_RESULT TrackProcessortrack_processor_new (Track *track)
 Creates a new track processor for the given track.
void track_processor_copy_values (TrackProcessor *dest, TrackProcessor *src)
 Copy port values from src to dest.
void track_processor_clear_buffers (TrackProcessor *self)
 Clears all buffers.
void track_processor_disconnect_all (TrackProcessor *self)
 Disconnects all ports connected to the TrackProcessor.
void track_processor_process (TrackProcessor *self, const EngineProcessTimeInfo *const time_nfo)
 Process the TrackProcessor.
void track_processor_disconnect_from_prefader (TrackProcessor *self)
 Disconnect the TrackProcessor's stereo out ports from the prefader.
void track_processor_connect_to_prefader (TrackProcessor *self)
 Connects the TrackProcessor's stereo out ports to the Channel's prefader in ports.
void track_processor_disconnect_from_plugin (TrackProcessor *self, Plugin *pl)
 Disconnect the TrackProcessor's out ports from the Plugin's input ports.
void track_processor_connect_to_plugin (TrackProcessor *self, Plugin *pl)
 Connect the TrackProcessor's out ports to the Plugin's input ports.
void track_processor_append_ports (TrackProcessor *self, GPtrArray *ports)
void track_processor_free (TrackProcessor *self)
 Frees the TrackProcessor.
COLD Tracklisttracklist_new (Project *project, SampleProcessor *sample_processor)
NONNULL void tracklist_select_all (Tracklist *self, bool select, bool fire_events)
 Selects or deselects all tracks.
void tracklist_get_visible_tracks (Tracklist *self, Track **visible_tracks, int *num_visible)
 Finds visible tracks and puts them in given array.
Tracktracklist_find_track_by_name (Tracklist *self, const char *name)
 Returns the Track matching the given name, if any.
NONNULL OPTIMIZE_O3 Tracktracklist_find_track_by_name_hash (Tracklist *self, unsigned int hash)
 Returns the Track matching the given name, if any.
NONNULL int tracklist_contains_master_track (Tracklist *self)
NONNULL int tracklist_contains_chord_track (Tracklist *self)
NONNULL void tracklist_print_tracks (Tracklist *self)
 Prints the tracks (for debugging).
NONNULL void tracklist_insert_track (Tracklist *self, Track *track, int pos, int publish_events, int recalc_graph)
 Adds given track to given spot in tracklist.
NONNULL void tracklist_remove_track (Tracklist *self, Track *track, bool rm_pl, bool free_track, bool publish_events, bool recalc_graph)
 Removes a track from the Tracklist and the TracklistSelections.
void tracklist_move_track (Tracklist *self, Track *track, int pos, bool always_before_pos, bool publish_events, bool recalc_graph)
 Moves a track from its current position to the position given by pos.
void tracklist_append_track (Tracklist *self, Track *track, int publish_events, int recalc_graph)
 Calls tracklist_insert_track with the given options.
void tracklist_set_track_pinned (Tracklist *self, Track *track, const int pinned, int publish_events, int recalc_graph)
 Pins or unpins the Track.
NONNULL bool tracklist_validate (Tracklist *self)
NONNULL HOT Tracktracklist_get_track (Tracklist *self, int idx)
 Returns the track at the given index or NULL if the index is invalid.
int tracklist_get_track_pos (Tracklist *self, Track *track)
 Returns the index of the given Track.
Tracktracklist_get_track_by_type (Tracklist *self, TrackType type)
 Returns the first track found with the given type.
ChordTrack * tracklist_get_chord_track (const Tracklist *self)
Tracktracklist_get_first_visible_track (Tracklist *self, const int pinned)
 Returns the first visible Track.
Tracktracklist_get_prev_visible_track (Tracklist *self, Track *track)
 Returns the previous visible Track in the same Tracklist as the given one (ie, pinned or not).
int tracklist_get_last_pos (Tracklist *self, const TracklistPinOption pin_opt, const bool visible_only)
 Returns the index of the last Track.
Tracktracklist_get_last_track (Tracklist *self, const TracklistPinOption pin_opt, const int visible_only)
 Returns the last Track.
Tracktracklist_get_next_visible_track (Tracklist *self, Track *track)
 Returns the next visible Track in the same Tracklist as the given one (ie, pinned or not).
Tracktracklist_get_visible_track_after_delta (Tracklist *self, Track *track, int delta)
 Returns the Track after delta visible Track's.
int tracklist_get_visible_track_diff (Tracklist *self, const Track *src, const Track *dest)
 Returns the number of visible Tracks between src and dest (negative if dest is before src).
bool tracklist_multiply_track_heights (Tracklist *self, double multiplier, bool visible_only, bool check_only, bool fire_events)
 Multiplies all tracks' heights and returns if the operation was valid.
bool tracklist_import_regions (GPtrArray *region_arrays, const FileImportInfo *import_info, TracksReadyCallback ready_cb, GError **error)
bool tracklist_import_files (Tracklist *self, char **uri_list, const SupportedFile *orig_file, Track *track, TrackLane *lane, int index, const Position *pos, TracksReadyCallback ready_cb, GError **error)
 Begins file import Handles a file drop inside the timeline or in empty space in the tracklist.
void tracklist_handle_move_or_copy (Tracklist *self, Track *this_track, TrackWidgetHighlight location, GdkDragAction action)
 Handles a move or copy action based on a drag.
bool tracklist_track_name_is_unique (Tracklist *self, const char *name, Track *track_to_skip)
 Returns 1 if the track name is not taken.
NONNULL bool tracklist_has_soloed (const Tracklist *self)
 Returns if the tracklist has soloed tracks.
NONNULL bool tracklist_has_listened (const Tracklist *self)
 Returns if the tracklist has listened tracks.
NONNULL int tracklist_get_num_muted_tracks (const Tracklist *self)
NONNULL int tracklist_get_num_soloed_tracks (const Tracklist *self)
NONNULL int tracklist_get_num_listened_tracks (const Tracklist *self)
int tracklist_get_num_visible_tracks (Tracklist *self, int visible)
int tracklist_get_plugins (const Tracklist *const self, GPtrArray *arr)
 Fills in the given array (if non-NULL) with all plugins in the tracklist and returns the number of plugins.
void tracklist_activate_all_plugins (Tracklist *self, bool activate)
 Activate or deactivate all plugins.
void tracklist_expose_ports_to_backend (Tracklist *self)
 Exposes each track's ports that should be exposed to the backend.
void tracklist_mark_all_tracks_for_bounce (Tracklist *self, bool bounce)
 Marks or unmarks all tracks for bounce.
void tracklist_get_total_bars (Tracklist *self, int *total_bars)
NONNULL void tracklist_set_caches (Tracklist *self, CacheTypes types)
 Set various caches (snapshots, track name hashes, plugin input/output ports, etc).
Tracklisttracklist_clone (Tracklist *src)
 Only clones what is needed for project save.
void tracklist_free (Tracklist *self)
void guile_tracklist_define_module (void)
 Define guile module.
NONNULL Transporttransport_new (AudioEngine *engine)
 Initialize transport.
void transport_init_loaded (Transport *self, AudioEngine *engine, Track *tempo_track)
 Initialize loaded transport.
Transporttransport_clone (const Transport *src)
 Clones the transport values.
void transport_prepare_audio_regions_for_stretch (Transport *self, TimelineSelections *sel)
 Prepares audio regions for stretching (sets the ZRegion::before_length).
bool transport_stretch_regions (Transport *self, TimelineSelections *sel, bool with_fixed_ratio, double time_ratio, bool force, GError **error)
 Stretches regions.
void transport_set_punch_mode_enabled (Transport *self, bool enabled)
void transport_set_start_playback_on_midi_input (Transport *self, bool enabled)
void transport_set_recording_mode (Transport *self, TransportRecordingMode mode)
void transport_set_metronome_enabled (Transport *self, const int enabled)
 Sets whether metronome is enabled or not.
void transport_add_to_playhead (Transport *self, const signed_frame_t nframes)
 Moves the playhead by the time corresponding to given samples, taking into account the loop end point.
void transport_request_pause (Transport *self, bool with_wait)
 Request pause.
void transport_request_roll (Transport *self, bool with_wait)
 Request playback.
void transport_set_playhead_pos (Transport *self, Position *pos)
 Setter for playhead Position.
void transport_set_playhead_to_bar (Transport *self, int bar)
void transport_get_playhead_pos (Transport *self, Position *pos)
 Getter for playhead Position.
void transport_move_backward (Transport *self, bool with_wait)
 Move to the previous snap point on the timeline.
void transport_move_forward (Transport *self, bool with_wait)
 Move to the next snap point on the timeline.
bool transport_can_user_move_playhead (const Transport *self)
 Returns whether the user can currently move the playhead (eg, via the UI or via scripts).
void transport_move_playhead (Transport *self, const Position *target, bool panic, bool set_cue_point, bool fire_events)
 Moves playhead to given pos.
void transport_set_loop (Transport *self, bool enabled, bool with_wait)
 Enables or disables loop.
void transport_goto_start_marker (Transport *self)
 Moves the playhead to the start Marker.
void transport_goto_end_marker (Transport *self)
 Moves the playhead to the end Marker.
void transport_goto_prev_marker (Transport *self)
 Moves the playhead to the prev Marker.
void transport_goto_next_marker (Transport *self)
 Moves the playhead to the next Marker.
void transport_update_positions (Transport *self, bool update_from_ticks)
 Updates the frames in all transport positions.
void transport_position_add_frames (const Transport *self, Position *pos, const signed_frame_t frames)
 Adds frames to the given position similar to position_add_frames, except that it adjusts the new Position if the loop end point was crossed.
double transport_get_ppqn (Transport *self)
 Returns the PPQN (Parts/Ticks Per Quarter Note).
void transport_get_range_pos (Transport *self, bool first, Position *pos)
 Stores the position of the range in pos.
void transport_get_loop_range_pos (Transport *self, bool first, Position *pos)
 Stores the position of the range in pos.
void transport_set_has_range (Transport *self, bool has_range)
 Sets if the project has range and updates UI.
void transport_set_range (Transport *self, bool range1, const Position *start_pos, const Position *pos, bool snap)
 Set the range1 or range2 position.
void transport_set_loop_range (Transport *self, bool start, const Position *start_pos, const Position *pos, bool snap)
 Set the loop range.
bool transport_position_is_inside_punch_range (Transport *self, Position *pos)
void transport_recalculate_total_bars (Transport *self, ArrangerSelections *sel)
 Recalculates the total bars based on the last object's position.
void transport_update_total_bars (Transport *self, int total_bars, bool fire_events)
 Updates the total bars.
void transport_update_caches (Transport *self, int beats_per_bar, int beat_unit)
void transport_set_recording (Transport *self, bool record, bool with_wait, bool fire_events)
 Sets recording on/off.
void transport_free (Transport *self)
Velocityvelocity_new (MidiNote *midi_note, const uint8_t vel)
 Creates a new Velocity with the given value.
void velocity_set_midi_note (Velocity *velocity, MidiNote *midi_note)
 Sets the MidiNote the Velocity belongs to.
int velocity_is_equal (Velocity *src, Velocity *dest)
 Returns 1 if the Velocity's match, 0 if not.
void velocity_shift (Velocity *self, const int delta)
 Changes the Velocity by the given amount of values (delta).
void velocity_set_val (Velocity *self, const int val)
 Sets the velocity to the given value.
MidiNotevelocity_get_midi_note (const Velocity *const self)
 Returns the owner MidiNote.
const char * velocity_setting_enum_to_str (guint index)
guint velocity_setting_str_to_enum (const char *str)
CONST const char * midi_get_controller_name (const midi_byte_t cc)
 Return the name of the given cc (0-127).
void midi_get_bytes_from_combined (const uint32_t val, midi_byte_t *lsb, midi_byte_t *msb)
 Used for MIDI controls whose values are split between MSB/LSB.
int midi_ctrl_change_get_ch_and_description (midi_byte_t *ctrl_change, char *buf)
 Saves a string representation of the given control change event in the given buffer.
int midi_get_msg_length (const uint8_t status_byte)
 Returns the length of the MIDI message based on the status byte.
CONST const char * midi_get_note_name (const midi_byte_t note)
 Returns the note name (eg, "C") for a value between 0 and 127.
void midi_get_note_name_with_octave (const midi_byte_t short_msg[3], char *buf)
void midi_get_hex_str (const midi_byte_t *msg, const size_t msg_sz, char *buf)
void midi_print_to_str (const midi_byte_t *msg, const size_t msg_sz, char *buf)
void midi_print (const midi_byte_t *msg, const size_t msg_sz)
void midi_get_meta_event_type_name (char *buf, const midi_byte_t type)
PluginChannel::channel_get_plugin_at (const Channel *self, int slot, PluginSlotType slot_type)
MALLOC NONNULL char * ExtPort::ext_port_get_id (ExtPort *ext_port)
 Returns a unique identifier (full name prefixed with backend type).
NONNULL char * ExtPort::ext_port_get_friendly_name (ExtPort *self)
 Returns a user-friendly display name (eg, to be used in dropdowns).
NONNULL void ZRegion::region_print (const ZRegion *region)
 Print region info for debugging.
TrackLaneZRegion::region_get_lane (const ZRegion *region)
 Get lane.
RegionLinkGroupZRegion::region_get_link_group (ZRegion *self)
 Returns the region's link group.
void ZRegion::region_set_link_group (ZRegion *region, int group_idx, bool update_identifier)
 Sets the link group to the region.
MidiNoteZRegion::region_find_midi_note (ZRegion *r, MidiNote *_mn)
 Returns the MidiNote matching the properties of the given MidiNote.
NONNULL HOT signed_frame_t ZRegion::region_timeline_frames_to_local (const ZRegion *const self, const signed_frame_t timeline_frames, const bool normalize)
 Converts frames on the timeline (global) to local frames (in the clip).
NONNULL void ZRegion::region_get_frames_till_next_loop_or_end (const ZRegion *const self, const signed_frame_t timeline_frames, signed_frame_t *ret_frames, bool *is_loop)
 Returns the number of frames until the next loop end point or the end of the region.
NONNULL void ZRegion::region_set_lane (ZRegion *self, const TrackLane *const lane)
 Sets the track lane.
void ZRegion::region_gen_name (ZRegion *region, const char *base_name, AutomationTrack *at, Track *track)
 Generates a name for the ZRegion, either using the given AutomationTrack or Track, or appending to the given base name.
NONNULL WARN_UNUSED_RESULT bool ZRegion::region_stretch (ZRegion *self, double ratio, GError **error)
 Stretch the region's contents.
NONNULL void ZRegion::region_update_identifier (ZRegion *self)
 To be called every time the identifier changes to update the region's children.
NONNULL void ZRegion::region_update_link_group (ZRegion *self)
 Updates all other regions in the region link group, if any.
void ZRegion::region_move_to_track (ZRegion *region, Track *track, int lane_or_at_index, int index)
 Moves the ZRegion to the given Track, maintaining the selection status of the ZRegion.
void ZRegion::region_set_automation_track (ZRegion *region, AutomationTrack *at)
 Sets the automation track.
AutomationTrackZRegion::region_get_automation_track (const ZRegion *const region)
 Gets the AutomationTrack using the saved index.
NONNULL PURE int ZRegion::region_is_hit (const ZRegion *region, const signed_frame_t gframes, const bool inclusive)
 Returns if the position is inside the region or not.
int ZRegion::region_is_hit_by_range (const ZRegion *region, const signed_frame_t gframes_start, const signed_frame_t gframes_end, const bool end_inclusive)
 Returns if any part of the ZRegion is inside the given range, inclusive.
char * ZRegion::region_generate_filename (ZRegion *region)
 Generates the filename for this region.
bool ZRegion::region_is_recording (ZRegion *self)
 Returns if this region is currently being recorded onto.
bool ZRegion::region_get_musical_mode (ZRegion *self)
 Returns whether the region is effectively in musical mode.
void ZRegion::region_add_arranger_object (ZRegion *self, ArrangerObject *obj, bool fire_events)
 Wrapper for adding an arranger object.
void ZRegion::region_unlink (ZRegion *region)
 Removes the link group from the region, if any.
void ZRegion::region_remove_all_children (ZRegion *region)
 Removes all children objects from the region.
ArrangerSelectionsZRegion::region_get_arranger_selections (ZRegion *self)
 Returns the ArrangerSelections based on the given region type.
ArrangerWidgetZRegion::region_get_arranger_for_children (ZRegion *self)
 Returns the arranger for editing the region's children.
bool ZRegion::region_validate (ZRegion *self, bool is_project, double frames_per_tick)
 Sanity checking.
void ZRegion::region_disconnect (ZRegion *self)
 Disconnects the region and anything using it.
NONNULL double InstrumentTrack::track_get_full_visible_height (Track *const self)
 Returns the full visible height (main height + height of all visible automation tracks + height of all visible lanes).


int AutomationTrack::index
 Index in parent AutomationTracklist.
PortIdentifier AutomationTrack::port_id
 Identifier of the Port this AutomationTrack is for.
bool AutomationTrack::created
 Whether it has been created by the user yet or not.
ZRegion ** AutomationTrack::regions
 The automation Region's.
int AutomationTrack::num_regions
size_t AutomationTrack::regions_size
ZRegion ** AutomationTrack::region_snapshots
 Snapshots used during playback TODO unimplemented.
int AutomationTrack::num_region_snapshots
bool AutomationTrack::visible
 Whether visible or not.
int AutomationTrack::y
 Y local to track.
double AutomationTrack::height
 Position of multipane handle.
float AutomationTrack::last_recorded_value
 Last value recorded in this automation track.
AutomationMode AutomationTrack::automation_mode
 Automation mode.
AutomationRecordMode AutomationTrack::record_mode
 Automation record mode, when AutomationTrack::automation_mode is set to record.
bool AutomationTrack::recording_started
 To be set to true when recording starts (when the first change is received) and false when recording ends.
 Region currently recording to.
bool AutomationTrack::recording_start_sent
 This is a flag to let the recording manager know that a START signal was already sent for recording.
bool AutomationTrack::recording_paused
 This must only be set by the RecordingManager when temporarily pausing recording, eg when looping or leaving the punch range.
CustomButtonWidgetAutomationTrack::top_right_buttons [8]
 Buttons used by the track widget.
int AutomationTrack::num_top_right_buttons
CustomButtonWidgetAutomationTrack::top_left_buttons [8]
int AutomationTrack::num_top_left_buttons
CustomButtonWidgetAutomationTrack::bot_right_buttons [8]
int AutomationTrack::num_bot_right_buttons
 Automation mode button group.
CustomButtonWidgetAutomationTrack::bot_left_buttons [8]
int AutomationTrack::num_bot_left_buttons
 Pointer to owner automation tracklist, if any.
 Cache used during DSP.
COLD AutomationTracklistatl
COLD Tracktrack
COLD AudioEngineengine
COLD Projectproject
COLD Project GError ** error
COLD HardwareProcessorhw_processor
COLD Tracktrack
COLD Track ControlRoomcontrol_room
COLD Track ControlRoom SampleProcessorsample_processor
COLD AudioEngineengine
 Port associated with this meter.
 True peak processor.
float Meter::true_peak
 Current true peak.
float Meter::true_peak_max
 K RMS processor, if K meter.
MeterAlgorithm Meter::algorithm
 Algorithm to use.
float Meter::prev_max
 Previous max, used when holding the max value.
float Meter::last_amp
 Last meter value (in amplitude), used to show a falloff and avoid sudden dips.
gint64 Meter::last_draw_time
 Time the last val was taken at (last draw time).
gint64 Meter::last_midi_trigger_time
COLD Tracklisttracklist
COLD Tracklist TracklistSelectionsts
GError ** error
COLD Tracktrack
COLD Projectproject
COLD Project SampleProcessorsample_processor

Detailed Description

DSP (audio/MIDI signal processing) code.

Macro Definition Documentation



Definition at line 29 of file automation_point.h.



Definition at line 25 of file clip.h.


#define AUDIO_ENGINE   (PROJECT->audio_engine)

Definition at line 78 of file engine.h.

◆ audio_function_get_detailed_action_for_type_default

#define audio_function_get_detailed_action_for_type_default ( type)     audio_function_get_detailed_action_for_type (type, "app.editor-function")

Definition at line 92 of file audio_function.h.


#define AUDIO_POOL   (AUDIO_ENGINE->pool)

Definition at line 26 of file pool.h.



Definition at line 24 of file pool.h.



Number of frames for built-in fade (additional to object fades).

Definition at line 40 of file audio_region.h.

◆ automation_point_is_selected

#define automation_point_is_selected ( r)     arranger_object_is_selected ((ArrangerObject *) r)

Definition at line 31 of file automation_point.h.



Release time in ms when in touch record mode.

Definition at line 38 of file automation_track.h.


#define BLOCK_LENGTH   4096

Definition at line 73 of file engine.h.

◆ channel_is_in_active_project

#define channel_is_in_active_project ( self)     (self->track && track_is_in_active_project (self->track))

Definition at line 52 of file channel.h.


#define CHANNEL_MAGIC   8431676

Magic number to identify channels.

Definition at line 44 of file channel.h.



Definition at line 41 of file channel.h.

◆ channel_send_is_empty

#define channel_send_is_empty ( x)    (!channel_send_is_enabled (x))

Definition at line 194 of file channel_send.h.

◆ channel_send_is_in_active_project

#define channel_send_is_in_active_project ( self)     (self->track && track_is_in_active_project (self->track))

Definition at line 42 of file channel_send.h.

◆ channel_send_is_prefader

#define channel_send_is_prefader ( x)     (x->slot < CHANNEL_SEND_POST_FADER_START_SLOT)

Definition at line 39 of file channel_send.h.



The slot where post-fader sends begin (starting from 0).

Definition at line 37 of file channel_send.h.



Definition at line 31 of file channel_send.h.



Definition at line 26 of file chord_descriptor.h.



Definition at line 24 of file chord_descriptor.h.

◆ chord_object_is_selected

#define chord_object_is_selected ( r)     arranger_object_is_selected ((ArrangerObject *) r)

Definition at line 35 of file chord_object.h.


#define CHORD_OBJECT_MAGIC   4181694

Definition at line 29 of file chord_object.h.



Definition at line 33 of file chord_object.h.

◆ chord_track_get_chord_at_playhead

#define chord_track_get_chord_at_playhead ( ct)     chord_track_get_chord_at_pos (ct, PLAYHEAD)

Returns the current chord.

Definition at line 82 of file chord_track.h.

◆ chord_track_get_scale_at_playhead

#define chord_track_get_scale_at_playhead ( ct)     chord_track_get_scale_at_pos (ct, PLAYHEAD)

Returns the current scale.

Definition at line 95 of file chord_track.h.

◆ control_port_is_toggled

#define control_port_is_toggled ( self)     (control_port_is_val_toggled (self->control))

Returns if the control port is toggled.

Definition at line 94 of file control_port.h.

◆ control_port_is_val_toggled

#define control_port_is_val_toggled ( val)    (val > 0.001f)

Checks if the given value is toggled.

Definition at line 89 of file control_port.h.


#define CONTROL_ROOM   (AUDIO_ENGINE->control_room)

Definition at line 24 of file control_room.h.

◆ control_room_is_in_active_project

#define control_room_is_in_active_project ( self)     (self->audio_engine && engine_is_in_active_project (self->audio_engine))

Definition at line 26 of file control_room.h.



Definition at line 22 of file control_room.h.



Definition at line 31 of file curve.h.



Definition at line 27 of file curve.h.



Bounds for each algorithm.

Definition at line 30 of file curve.h.



Definition at line 32 of file curve.h.


#define DENORMAL_PREVENTION_VAL   (AUDIO_ENGINE->denormal_prevention_val)

Definition at line 82 of file engine.h.


#define ENGINE_EVENTS_PUSH ( et,
_float_arg )
if (true) \
{ \
AudioEngineEvent * _ev = \
(AudioEngineEvent *) object_pool_get (AUDIO_ENGINE->ev_pool); \
_ev->file = __FILE__; \
_ev->func = __func__; \
_ev->lineno = __LINE__; \
_ev->type = et; \
_ev->arg = (void *) _arg; \
_ev->uint_arg = _uint_arg; \
_ev->float_arg = _float_arg; \
if (zrythm_app->gtk_thread == g_thread_self ()) \
{ \
_ev->backtrace = backtrace_get ("", 40, false); \
g_debug ( \
"pushing engine event " #et " (%s:%d) uint: %u | float: %f", \
__func__, __LINE__, _uint_arg, _float_arg); \
} \
engine_queue_push_back_event (AUDIO_ENGINE->ev_queue, _ev); \
ZrythmApp * zrythm_app
Global variable, should be available to all files.
void * object_pool_get(ObjectPool *self)
Returns an available object.
Audio engine event.
Definition engine.h:140

Push events.

Definition at line 105 of file engine.h.

◆ engine_get_run

#define engine_get_run ( engine)    g_atomic_int_get (&(engine)->run)

Definition at line 89 of file engine.h.

◆ engine_has_handled_buffer_size_change

#define engine_has_handled_buffer_size_change ( engine)
((engine)->audio_backend != AUDIO_BACKEND_JACK || \
((engine)->audio_backend == AUDIO_BACKEND_JACK && \
g_atomic_int_get (&(engine)->handled_jack_buffer_size_change) == 1))

Definition at line 91 of file engine.h.

◆ engine_is_in_active_project

#define engine_is_in_active_project ( self)    (self->project == PROJECT)

Definition at line 84 of file engine.h.

◆ engine_is_port_own

#define engine_is_port_own ( self,
port )
(port == MONITOR_FADER->stereo_in->l || port == MONITOR_FADER->stereo_in->r \
|| port == MONITOR_FADER->stereo_out->l \
|| port == MONITOR_FADER->stereo_out->r)

Returns 1 if the port is an engine port or control room port, otherwise 0.

Definition at line 977 of file engine.h.


#define ENGINE_MAX_EVENTS   100

Definition at line 96 of file engine.h.

◆ engine_queue_dequeue_event

#define engine_queue_dequeue_event ( q,
x )   mpmc_queue_dequeue (q, (void *) x)

Definition at line 100 of file engine.h.

◆ engine_queue_push_back_event

#define engine_queue_push_back_event ( q,
x )   mpmc_queue_push_back (q, (void *) x)

Definition at line 98 of file engine.h.

◆ engine_set_run

#define engine_set_run ( engine,
_run )   g_atomic_int_set (&(engine)->run, _run)

Set whether engine should process (true) or skip (false).

Definition at line 88 of file engine.h.

◆ ext_port_is_in_active_project

#define ext_port_is_in_active_project ( self)
(self->hw_processor \
&& hw_processor_is_in_active_project ((self)->hw_processor))

Definition at line 49 of file ext_port.h.



Definition at line 40 of file ext_port.h.


#define EXT_PORTS_MAX   1024

Maximum external ports.

Used for fixed-size arrays.

Definition at line 47 of file ext_port.h.



Definition at line 41 of file fader.h.



Causes loud volume in when < 1k.

Definition at line 40 of file fader.h.


((f)->type == FADER_TYPE_MONITOR \
Causes loud volume in when < 1k.
Definition fader.h:40
Audio fader for the monitor.
Definition fader.h:71

Definition at line 44 of file fader.h.

◆ fader_get_listened

#define fader_get_listened ( self)    (control_port_is_toggled (self->listen))

Returns whether the fader is listened.

Definition at line 370 of file fader.h.

◆ fader_is_in_active_project

#define fader_is_in_active_project ( self)
((self->track != NULL \
&& track_is_in_active_project (self->track)) \
|| \
(self->sample_processor != NULL \
&& \
sample_processor_is_in_active_project ( \
self->sample_processor)) \
|| \
(self->control_room != NULL \
&& \
control_room_is_in_active_project ( \

Definition at line 49 of file fader.h.


#define FADER_MAGIC   32548791

Definition at line 35 of file fader.h.



Definition at line 31 of file fader.h.


#define FOREACH_AUTOMATABLE ( ch)    for (int i = 0; i < ch->num_automatables; i++)

Definition at line 49 of file channel.h.


#define FOREACH_STRIP   for (int i = 0; i < STRIP_SIZE; i++)

Definition at line 48 of file channel.h.


#define HW_IN_PROCESSOR   (AUDIO_ENGINE->hw_in_processor)

Definition at line 30 of file hardware_processor.h.


#define HW_OUT_PROCESSOR   (AUDIO_ENGINE->hw_out_processor)

Definition at line 31 of file hardware_processor.h.

◆ hw_processor_is_in_active_project

#define hw_processor_is_in_active_project ( self)     (self->engine && engine_is_in_active_project ((self)->engine))

Definition at line 33 of file hardware_processor.h.



Definition at line 28 of file hardware_processor.h.


#define IS_CHANNEL ( x)    (((Channel *) x)->magic == CHANNEL_MAGIC)

Definition at line 45 of file channel.h.


#define IS_CHANNEL_AND_NONNULL ( x)    (x && IS_CHANNEL (x))

Definition at line 46 of file channel.h.


#define IS_CHORD_OBJECT ( x)    (((ChordObject *) x)->magic == CHORD_OBJECT_MAGIC)

Definition at line 30 of file chord_object.h.



Definition at line 31 of file chord_object.h.


#define IS_FADER ( f)    (f->magic == FADER_MAGIC)

Definition at line 36 of file fader.h.


#define IS_FADER_AND_NONNULL ( f)    (f && f->magic == FADER_MAGIC)

Definition at line 37 of file fader.h.


#define IS_MIDI_NOTE ( tr)     ((MidiNote *) tr && ((MidiNote *) tr)->magic == MIDI_NOTE_MAGIC)

Definition at line 37 of file midi_note.h.


#define IS_PORT ( _p)    (((Port *) (_p))->magic == PORT_MAGIC)

Definition at line 71 of file port.h.


#define IS_PORT_AND_NONNULL ( x)    ((x) && IS_PORT (x))

Definition at line 72 of file port.h.


#define IS_PORT_IDENTIFIER ( tr)     (tr && ((PortIdentifier *) tr)->magic == PORT_IDENTIFIER_MAGIC)

Definition at line 32 of file port_identifier.h.


#define IS_REGION ( x)    (((ZRegion *) x)->magic == REGION_MAGIC)

Definition at line 39 of file region.h.


#define IS_REGION_AND_NONNULL ( x)    (x && IS_REGION (x))

Definition at line 40 of file region.h.


#define IS_REGION_LINK_GROUP ( x)     (((RegionLinkGroup *) (x))->magic == REGION_LINK_GROUP_MAGIC)

Definition at line 26 of file region_link_group.h.


#define IS_SCALE_OBJECT ( tr)    (tr && tr->magic == SCALE_OBJECT_MAGIC)

Definition at line 32 of file scale_object.h.


#define IS_TRACK ( x)    (((Track *) x)->magic == TRACK_MAGIC)

Definition at line 63 of file track.h.


#define IS_TRACK_AND_NONNULL ( x)    (x && IS_TRACK (x))

Definition at line 64 of file track.h.


#define IS_TRACK_PROCESSOR ( tr)    ((tr) && (tr)->magic == TRACK_PROCESSOR_MAGIC)

Definition at line 34 of file track_processor.h.


#define MANUAL_PRESS_EVENTS    (AUDIO_ENGINE->midi_editor_manual_press->midi_events)

Definition at line 79 of file engine.h.

◆ marker_is_deletable

#define marker_is_deletable ( m)     ((m)->type != MARKER_TYPE_START && (m)->type != MARKER_TYPE_END)

Definition at line 29 of file marker.h.

◆ marker_is_selected

#define marker_is_selected ( r)    arranger_object_is_selected ((ArrangerObject *) r)

Definition at line 27 of file marker.h.



Definition at line 25 of file marker.h.



Definition at line 35 of file automation_track.h.


#define MAX_FADER_AMP   1.42f

Definition at line 50 of file channel.h.


#define MAX_GRAPH_THREADS   128

Definition at line 65 of file graph.h.


#define MAX_MIDI_EVENTS   2560

Max events to hold in queues.

Definition at line 39 of file midi_event.h.


#define MAX_SNAP_POINTS   120096

Definition at line 30 of file quantize_options.h.


#define MAX_TRACKS   3000

Definition at line 31 of file tracklist.h.


#define METRONOME   (AUDIO_ENGINE->metronome)

Definition at line 25 of file metronome.h.


#define MIDI_ALL_NOTES_OFF   0x7B

Definition at line 59 of file midi.h.


#define MIDI_ALL_SOUND_OFF   0x78

Definition at line 60 of file midi.h.


#define MIDI_BUF_SIZE   1024

Definition at line 74 of file engine.h.



Also known as Channel Pressure.

Definition at line 57 of file midi.h.


#define MIDI_CH1_CTRL_CHANGE   0xB0

Definition at line 54 of file midi.h.


#define MIDI_CH1_NOTE_OFF   0x80

Definition at line 51 of file midi.h.


#define MIDI_CH1_NOTE_ON   0x90

Definition at line 50 of file midi.h.



Definition at line 58 of file midi.h.



Also known as Polyphonic Key Pressure.

Definition at line 53 of file midi.h.


#define MIDI_CH1_PROG_CHANGE   0xC0

Definition at line 55 of file midi.h.


#define MIDI_CLOCK_BEAT   0xF8

Definition at line 65 of file midi.h.



Definition at line 64 of file midi.h.



Definition at line 63 of file midi.h.


#define MIDI_CLOCK_STOP   0xFC

Definition at line 66 of file midi.h.


#define MIDI_IN_NUM_EVENTS   AUDIO_ENGINE->midi_in->midi_events->num_events

Definition at line 76 of file engine.h.


#define MIDI_MAPPINGS   (PROJECT->midi_mappings)

Definition at line 25 of file midi_mapping.h.

◆ midi_mappings_bind_device

#define midi_mappings_bind_device ( self,
fire_events )
self, buf, dev_port, dest_port, (self)->num_mappings, fire_events)
void midi_mappings_bind_at(MidiMappings *self, midi_byte_t *buf, ExtPort *device_port, Port *dest_port, int idx, bool fire_events)
Binds the CC represented by the given raw buffer (must be size 3) to the given Port.

Definition at line 78 of file midi_mapping.h.

◆ midi_mappings_bind_track

#define midi_mappings_bind_track ( self,
fire_events )
self, buf, NULL, dest_port, (self)->num_mappings, fire_events)

Definition at line 82 of file midi_mapping.h.


#define MIDI_META_EVENT   0xFF

Definition at line 67 of file midi.h.

◆ midi_note_is_selected

#define midi_note_is_selected ( r)     arranger_object_is_selected ((ArrangerObject *) r)

Definition at line 40 of file midi_note.h.


#define MIDI_NOTE_MAGIC   3588791

Definition at line 36 of file