Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
DSP

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...
 

Macros

#define audio_function_get_detailed_action_for_type_default(type)    audio_function_get_detailed_action_for_type (type, "app.editor-function")
 
#define AUDIO_REGION_BUILTIN_FADE_FRAMES   10
 Number of frames for built-in fade (additional to object fades).
 
#define AP_WIDGET_POINT_SIZE   6
 
#define automation_point_is_selected(r)    arranger_object_is_selected ((ArrangerObject *) r)
 
#define MAX_AUTOMATION_POINTS   1200
 
#define AUTOMATION_RECORDING_TOUCH_REL_MS   800
 Release time in ms when in touch record mode.
 
#define CHANNEL_SCHEMA_VERSION   2
 
#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))
 
#define CHANNEL_SEND_SCHEMA_VERSION   1
 
#define CHANNEL_SEND_POST_FADER_START_SLOT   6
 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_DESCRIPTOR_SCHEMA_VERSION   2
 
#define CHORD_DESCRIPTOR_MAX_NOTES   48
 
#define CHORD_OBJECT_MAGIC   4181694
 
#define IS_CHORD_OBJECT(x)   (((ChordObject *) x)->magic == CHORD_OBJECT_MAGIC)
 
#define IS_CHORD_OBJECT_AND_NONNULL(x)   (x && IS_CHORD_OBJECT (x))
 
#define CHORD_OBJECT_WIDGET_TRIANGLE_W   10
 
#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 AUDIO_CLIP_SCHEMA_VERSION   1
 
#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_SCHEMA_VERSION   2
 
#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))
 
#define CURVE_OPTIONS_SCHEMA_VERSION   1
 
#define CURVE_SUPERELLIPSE_CURVINESS_BOUND   0.82
 Bounds for each algorithm.
 
#define CURVE_EXPONENT_CURVINESS_BOUND   0.95
 
#define CURVE_VITAL_CURVINESS_BOUND   1.00
 
#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_PORT_SCHEMA_VERSION   1
 
#define EXT_PORTS_MAX   1024
 Maximum external ports.
 
#define ext_port_is_in_active_project(self)
 
#define FADER_SCHEMA_VERSION   2
 
#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)
 
#define FADER_DEFAULT_FADE_FRAMES_SHORT   1024
 Causes loud volume in when < 1k.
 
#define FADER_DEFAULT_FADE_FRAMES    (ZRYTHM_TESTING ? FADER_DEFAULT_FADE_FRAMES_SHORT : 8192)
 
#define FADER_FADE_FRAMES_FOR_TYPE(f)
 
#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_PROCESSOR_SCHEMA_VERSION   1
 
#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_WIDGET_TRIANGLE_W   10
 
#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_SCHEMA_VERSION   1
 
#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_SCHEMA_VERSION   1
 
#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_SCHEMA_VERSION   1
 
#define AUDIO_POOL   (AUDIO_ENGINE->pool)
 
#define PORT_SCHEMA_VERSION   1
 
#define STEREO_PORTS_SCHEMA_VERSION   1
 
#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_CONNECTION_SCHEMA_VERSION   1
 
#define PORT_CONNECTIONS_MANAGER_SCHEMA_VERSION   1
 
#define PORT_CONNECTIONS_MGR   (PROJECT->port_connections_manager)
 
#define port_connections_manager_ensure_connect_from_connection(self, conn)
 
#define PORT_IDENTIFIER_SCHEMA_VERSION   1
 
#define PORT_IDENTIFIER_MAGIC   3411841
 
#define IS_PORT_IDENTIFIER(tr)    (tr && ((PortIdentifier *) tr)->magic == PORT_IDENTIFIER_MAGIC)
 
#define POSITION_SCHEMA_VERSION   1
 
#define TICKS_PER_QUARTER_NOTE   960
 
#define TICKS_PER_SIXTEENTH_NOTE   240
 
#define TICKS_PER_QUARTER_NOTE_DBL   960.0
 
#define TICKS_PER_SIXTEENTH_NOTE_DBL   240.0
 
#define TICKS_PER_NINETYSIXTH_NOTE_DBL   40.0
 
#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_SCHEMA_VERSION   1
 
#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)
 
#define RECORDING_EVENTS_PUSH_AUDIO(et, _arg)
 Push events.
 
#define recording_event_init(re)
 Inits an already allocated recording event.
 
#define RECORDING_MANAGER   (ZRYTHM->recording_manager)
 
#define REGION_SCHEMA_VERSION   1
 
#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_IDENTIFIER_SCHEMA_VERSION   1
 
#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_SCHEMA_VERSION   2
 
#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_SCHEMA_VERSION   1
 
#define SNAP_GRID_TIMELINE   (PROJECT->snap_grid_timeline)
 
#define SNAP_GRID_EDITOR   (PROJECT->snap_grid_editor)
 
#define SNAP_GRID_IS_EDITOR(sg)   (SNAP_GRID_EDITOR == sg)
 
#define SNAP_GRID_IS_TIMELINE(sg)   (SNAP_GRID_TIMELINE == sg)
 
#define SNAP_GRID_ANY_SNAP(sg)   (sg->snap_to_grid || sg->snap_to_events)
 
#define SNAP_GRID_DEFAULT_MAX_BAR   10000
 
#define TEMPO_TRACK_MAX_BPM   420.f
 
#define TEMPO_TRACK_MIN_BPM   40.f
 
#define TEMPO_TRACK_DEFAULT_BPM   140.f
 
#define TEMPO_TRACK_DEFAULT_BEATS_PER_BAR   4
 
#define TEMPO_TRACK_MIN_BEATS_PER_BAR   1
 
#define TEMPO_TRACK_MAX_BEATS_PER_BAR   16
 
#define TEMPO_TRACK_DEFAULT_BEAT_UNIT   BEAT_UNIT_4
 
#define TEMPO_TRACK_MIN_BEAT_UNIT   BEAT_UNIT_2
 
#define TEMPO_TRACK_MAX_BEAT_UNIT   BEAT_UNIT_16
 
#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_MAX_MODULATOR_MACROS   128
 
#define TRACK_DND_PREFIX   Z_DND_STRING_PREFIX "Track::"
 
#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_SCHEMA_VERSION   1
 
#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 TIME_SIGNATURE_SCHEMA_VERSION   1
 
#define TRANSPORT_SCHEMA_VERSION   1
 
#define TRANSPORT   (AUDIO_ENGINE->transport)
 
#define TRANSPORT_DEFAULT_TOTAL_BARS   128
 
#define PLAYHEAD   (&TRANSPORT->playhead_pos)
 
#define TRANSPORT_IS_ROLLING   (TRANSPORT->play_state == PLAYSTATE_ROLLING)
 
#define TRANSPORT_IS_PAUSED   (TRANSPORT->play_state == PLAYSTATE_PAUSED)
 
#define TRANSPORT_IS_LOOPING   (TRANSPORT->loop)
 
#define TRANSPORT_IS_RECORDING   (TRANSPORT->recording)
 
#define velocity_is_selected(r)    arranger_object_is_selected ((ArrangerObject *) r)
 
#define VELOCITY_DEFAULT   90
 Default velocity.
 
#define MIDI_CH1_NOTE_ON   0x90
 
#define MIDI_CH1_NOTE_OFF   0x80
 
#define MIDI_CH1_POLY_AFTERTOUCH   0xA0
 Also known as Polyphonic Key Pressure.
 
#define MIDI_CH1_CTRL_CHANGE   0xB0
 
#define MIDI_CH1_PROG_CHANGE   0xC0
 
#define MIDI_CH1_CHAN_AFTERTOUCH   0xD0
 Also known as Channel Pressure.
 
#define MIDI_CH1_PITCH_WHEEL_RANGE   0xE0
 
#define MIDI_ALL_NOTES_OFF   0x7B
 
#define MIDI_ALL_SOUND_OFF   0x78
 
#define MIDI_SYSTEM_MESSAGE   0xF0
 
#define MIDI_SONG_POSITION   0xF2
 
#define MIDI_CLOCK_START   0xFA
 
#define MIDI_CLOCK_CONTINUE   0xFB
 
#define MIDI_CLOCK_BEAT   0xF8
 
#define MIDI_CLOCK_STOP   0xFC
 
#define MIDI_META_EVENT   0xFF
 

Typedefs

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.
 

Enumerations

enum  AudioFunctionType {
  AUDIO_FUNCTION_INVERT , AUDIO_FUNCTION_NORMALIZE_PEAK , AUDIO_FUNCTION_NORMALIZE_RMS , AUDIO_FUNCTION_NORMALIZE_LUFS ,
  AUDIO_FUNCTION_LINEAR_FADE_IN , AUDIO_FUNCTION_LINEAR_FADE_OUT , AUDIO_FUNCTION_NUDGE_LEFT , AUDIO_FUNCTION_NUDGE_RIGHT ,
  AUDIO_FUNCTION_REVERSE , AUDIO_FUNCTION_PITCH_SHIFT , AUDIO_FUNCTION_COPY_L_TO_R , AUDIO_FUNCTION_EXT_PROGRAM ,
  AUDIO_FUNCTION_GUILE_SCRIPT , AUDIO_FUNCTION_CUSTOM_PLUGIN , AUDIO_FUNCTION_INVALID
}
 
enum  AutomationFunctionType { AUTOMATION_FUNCTION_FLIP_HORIZONTAL , AUTOMATION_FUNCTION_FLIP_VERTICAL , AUTOMATION_FUNCTION_FLATTEN }
 
enum  AutomationMode { AUTOMATION_MODE_READ , AUTOMATION_MODE_RECORD , AUTOMATION_MODE_OFF , NUM_AUTOMATION_MODES }
 
enum  AutomationRecordMode { AUTOMATION_RECORD_MODE_TOUCH , AUTOMATION_RECORD_MODE_LATCH , NUM_AUTOMATION_RECORD_MODES }
 
enum  BalanceControlAlgorithm { BALANCE_CONTROL_ALGORITHM_LINEAR }
 See https://www.harmonycentral.com/articles/the-truth-about-panning-laws. More...
 
enum  ChannelSendTargetType { CHANNEL_SEND_TARGET_TYPE_NONE , CHANNEL_SEND_TARGET_TYPE_TRACK , CHANNEL_SEND_TARGET_TYPE_PLUGIN_SIDECHAIN }
 Target type. More...
 
enum  MusicalNote {
  NOTE_C = 0 , NOTE_CS , NOTE_D , NOTE_DS ,
  NOTE_E , NOTE_F , NOTE_FS , NOTE_G ,
  NOTE_GS , NOTE_A , NOTE_AS , NOTE_B
}
 
enum  ChordType {
  CHORD_TYPE_NONE , CHORD_TYPE_MAJ , CHORD_TYPE_MIN , CHORD_TYPE_DIM ,
  CHORD_TYPE_SUS4 , CHORD_TYPE_SUS2 , CHORD_TYPE_AUG , CHORD_TYPE_CUSTOM ,
  NUM_CHORD_TYPES
}
 Chord type. More...
 
enum  ChordAccent {
  CHORD_ACC_NONE , CHORD_ACC_7 , CHORD_ACC_j7 , CHORD_ACC_b9 ,
  CHORD_ACC_9 , CHORD_ACC_S9 , CHORD_ACC_11 , CHORD_ACC_b5_S11 ,
  CHORD_ACC_S5_b13 , CHORD_ACC_6_13 , NUM_CHORD_ACCENTS
}
 Chord accents. More...
 
enum  CurveAlgorithm {
  CURVE_ALGORITHM_EXPONENT , CURVE_ALGORITHM_SUPERELLIPSE , CURVE_ALGORITHM_VITAL , CURVE_ALGORITHM_PULSE ,
  CURVE_ALGORITHM_LOGARITHMIC , NUM_CURVE_ALGORITHMS
}
 The algorithm to use for curves. More...
 
enum  AudioEngineEventType { AUDIO_ENGINE_EVENT_BUFFER_SIZE_CHANGE , AUDIO_ENGINE_EVENT_SAMPLE_RATE_CHANGE }
 Audio engine event type. More...
 
enum  AudioEngineBufferSize {
  AUDIO_ENGINE_BUFFER_SIZE_16 , AUDIO_ENGINE_BUFFER_SIZE_32 , AUDIO_ENGINE_BUFFER_SIZE_64 , AUDIO_ENGINE_BUFFER_SIZE_128 ,
  AUDIO_ENGINE_BUFFER_SIZE_256 , AUDIO_ENGINE_BUFFER_SIZE_512 , AUDIO_ENGINE_BUFFER_SIZE_1024 , AUDIO_ENGINE_BUFFER_SIZE_2048 ,
  AUDIO_ENGINE_BUFFER_SIZE_4096 , NUM_AUDIO_ENGINE_BUFFER_SIZES
}
 Buffer sizes to be used in combo boxes. More...
 
enum  AudioEngineSamplerate {
  AUDIO_ENGINE_SAMPLERATE_22050 , AUDIO_ENGINE_SAMPLERATE_32000 , AUDIO_ENGINE_SAMPLERATE_44100 , AUDIO_ENGINE_SAMPLERATE_48000 ,
  AUDIO_ENGINE_SAMPLERATE_88200 , AUDIO_ENGINE_SAMPLERATE_96000 , AUDIO_ENGINE_SAMPLERATE_192000 , NUM_AUDIO_ENGINE_SAMPLERATES
}
 Samplerates to be used in comboboxes. More...
 
enum  AudioBackend {
  AUDIO_BACKEND_DUMMY , AUDIO_BACKEND_DUMMY_LIBSOUNDIO , AUDIO_BACKEND_ALSA , AUDIO_BACKEND_ALSA_LIBSOUNDIO ,
  AUDIO_BACKEND_ALSA_RTAUDIO , AUDIO_BACKEND_JACK , AUDIO_BACKEND_JACK_LIBSOUNDIO , AUDIO_BACKEND_JACK_RTAUDIO ,
  AUDIO_BACKEND_PULSEAUDIO , AUDIO_BACKEND_PULSEAUDIO_LIBSOUNDIO , AUDIO_BACKEND_PULSEAUDIO_RTAUDIO , AUDIO_BACKEND_COREAUDIO_LIBSOUNDIO ,
  AUDIO_BACKEND_COREAUDIO_RTAUDIO , AUDIO_BACKEND_SDL , AUDIO_BACKEND_WASAPI_LIBSOUNDIO , AUDIO_BACKEND_WASAPI_RTAUDIO ,
  AUDIO_BACKEND_ASIO_RTAUDIO , NUM_AUDIO_BACKENDS
}
 
enum  BounceMode { BOUNCE_OFF , BOUNCE_ON , BOUNCE_INHERIT }
 Mode used when bouncing, either during exporting or when bouncing tracks or regions to audio. More...
 
enum  MidiBackend {
  MIDI_BACKEND_DUMMY , MIDI_BACKEND_ALSA , MIDI_BACKEND_ALSA_RTMIDI , MIDI_BACKEND_JACK ,
  MIDI_BACKEND_JACK_RTMIDI , MIDI_BACKEND_WINDOWS_MME , MIDI_BACKEND_WINDOWS_MME_RTMIDI , MIDI_BACKEND_COREMIDI_RTMIDI ,
  MIDI_BACKEND_WINDOWS_UWP_RTMIDI , NUM_MIDI_BACKENDS
}
 
enum  AudioEngineJackTransportType { AUDIO_ENGINE_JACK_TIMEBASE_MASTER , AUDIO_ENGINE_JACK_TRANSPORT_CLIENT , AUDIO_ENGINE_NO_JACK_TRANSPORT }
 
enum  ExportFormat {
  EXPORT_FORMAT_AIFF , EXPORT_FORMAT_AU , EXPORT_FORMAT_CAF , EXPORT_FORMAT_FLAC ,
  EXPORT_FORMAT_MP3 , EXPORT_FORMAT_OGG_VORBIS , EXPORT_FORMAT_OGG_OPUS , EXPORT_FORMAT_RAW ,
  EXPORT_FORMAT_WAV , EXPORT_FORMAT_W64 , EXPORT_FORMAT_MIDI0 , EXPORT_FORMAT_MIDI1 ,
  NUM_EXPORT_FORMATS
}
 Export format. More...
 
enum  ExportTimeRange { TIME_RANGE_LOOP , TIME_RANGE_SONG , TIME_RANGE_CUSTOM }
 Time range to export. More...
 
enum  ExportMode { EXPORT_MODE_FULL , EXPORT_MODE_TRACKS , EXPORT_MODE_REGIONS }
 Export mode. More...
 
enum  BounceStep { BOUNCE_STEP_BEFORE_INSERTS , BOUNCE_STEP_PRE_FADER , BOUNCE_STEP_POST_FADER }
 
enum  ExtPortType {
  EXT_PORT_TYPE_JACK , EXT_PORT_TYPE_ALSA , EXT_PORT_TYPE_WINDOWS_MME , EXT_PORT_TYPE_RTMIDI ,
  EXT_PORT_TYPE_RTAUDIO
}
 External port type. More...
 
enum  FaderType {
  FADER_TYPE_NONE , FADER_TYPE_MONITOR , FADER_TYPE_SAMPLE_PROCESSOR , FADER_TYPE_AUDIO_CHANNEL ,
  FADER_TYPE_MIDI_CHANNEL , FADER_TYPE_GENERIC
}
 Fader type. More...
 
enum  MidiFaderMode { MIDI_FADER_MODE_VEL_MULTIPLIER , MIDI_FADER_MODE_CC_VOLUME }
 
enum  GraphExportType { NUM_GRAPH_EXPORT_TYPES }
 Export type. More...
 
enum  GraphNodeType {
  ROUTE_NODE_TYPE_PORT , ROUTE_NODE_TYPE_PLUGIN , ROUTE_NODE_TYPE_TRACK , ROUTE_NODE_TYPE_FADER ,
  ROUTE_NODE_TYPE_MONITOR_FADER , ROUTE_NODE_TYPE_PREFADER , ROUTE_NODE_TYPE_SAMPLE_PROCESSOR , ROUTE_NODE_TYPE_INITIAL_PROCESSOR ,
  ROUTE_NODE_TYPE_HW_PROCESSOR , ROUTE_NODE_TYPE_MODULATOR_MACRO_PROCESOR , ROUTE_NODE_TYPE_CHANNEL_SEND
}
 Graph nodes can be either ports or processors. More...
 
enum  MarkerType { MARKER_TYPE_START , MARKER_TYPE_END , MARKER_TYPE_CUSTOM }
 Marker type. More...
 
enum  MeterAlgorithm {
  METER_ALGORITHM_AUTO , METER_ALGORITHM_DIGITAL_PEAK , METER_ALGORITHM_TRUE_PEAK , METER_ALGORITHM_RMS ,
  METER_ALGORITHM_K
}
 
enum  MetronomeType { METRONOME_TYPE_NONE , METRONOME_TYPE_EMPHASIS , METRONOME_TYPE_NORMAL }
 The type of the metronome sound. More...
 
enum  MidiFunctionType {
  MIDI_FUNCTION_CRESCENDO , MIDI_FUNCTION_FLAM , MIDI_FUNCTION_FLIP_HORIZONTAL , MIDI_FUNCTION_FLIP_VERTICAL ,
  MIDI_FUNCTION_LEGATO , MIDI_FUNCTION_PORTATO , MIDI_FUNCTION_STACCATO , MIDI_FUNCTION_STRUM
}
 
enum  PortInternalType {
  INTERNAL_NONE , INTERNAL_LV2_PORT , INTERNAL_JACK_PORT , INTERNAL_PA_PORT ,
  INTERNAL_ALSA_SEQ_PORT
}
 What the internal data is. More...
 
enum  PortFlow { FLOW_UNKNOWN , FLOW_INPUT , FLOW_OUTPUT }
 Direction of the signal. More...
 
enum  PortType {
  TYPE_UNKNOWN , TYPE_CONTROL , TYPE_AUDIO , TYPE_EVENT ,
  TYPE_CV
}
 Type of signals the Port handles. More...
 
enum  PortUnit {
  PORT_UNIT_NONE , PORT_UNIT_HZ , PORT_UNIT_MHZ , PORT_UNIT_DB ,
  PORT_UNIT_DEGREES , PORT_UNIT_SECONDS , PORT_UNIT_MS , PORT_UNIT_US
}
 Port unit to be displayed in the UI. More...
 
enum  PortOwnerType {
  PORT_OWNER_TYPE_AUDIO_ENGINE , PORT_OWNER_TYPE_PLUGIN , PORT_OWNER_TYPE_TRACK , PORT_OWNER_TYPE_CHANNEL ,
  PORT_OWNER_TYPE_FADER , PORT_OWNER_TYPE_CHANNEL_SEND , PORT_OWNER_TYPE_TRACK_PROCESSOR , PORT_OWNER_TYPE_HW ,
  PORT_OWNER_TYPE_TRANSPORT , PORT_OWNER_TYPE_MODULATOR_MACRO_PROCESSOR
}
 Type of owner. More...
 
enum  PortFlags {
  PORT_FLAG_STEREO_L = 1 << 0 , PORT_FLAG_STEREO_R = 1 << 1 , PORT_FLAG_PIANO_ROLL = 1 << 2 , PORT_FLAG_SIDECHAIN = 1 << 3 ,
  PORT_FLAG_MAIN_PORT = 1 << 4 , PORT_FLAG_MANUAL_PRESS = 1 << 5 , PORT_FLAG_AMPLITUDE = 1 << 6 , PORT_FLAG_STEREO_BALANCE = 1 << 7 ,
  PORT_FLAG_WANT_POSITION = 1 << 8 , PORT_FLAG_TRIGGER = 1 << 9 , PORT_FLAG_TOGGLE = 1 << 10 , PORT_FLAG_INTEGER = 1 << 11 ,
  PORT_FLAG_FREEWHEEL = 1 << 12 , PORT_FLAG_REPORTS_LATENCY = 1 << 13 , PORT_FLAG_NOT_ON_GUI = 1 << 14 , PORT_FLAG_PLUGIN_ENABLED = 1 << 15 ,
  PORT_FLAG_PLUGIN_CONTROL = 1 << 16 , PORT_FLAG_FADER_MUTE = 1 << 17 , PORT_FLAG_CHANNEL_FADER = 1 << 18 , PORT_FLAG_AUTOMATABLE = 1 << 19 ,
  PORT_FLAG_MIDI_AUTOMATABLE = 1 << 20 , PORT_FLAG_SEND_RECEIVABLE = 1 << 21 , PORT_FLAG_BPM = 1 << 22 , PORT_FLAG_GENERIC_PLUGIN_PORT = 1 << 23 ,
  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_FLAG_MODULATOR_MACRO = 1 << 28 , PORT_FLAG_LOGARITHMIC = 1 << 29 , PORT_FLAG_IS_PROPERTY = 1 << 30
}
 Port flags. More...
 
enum  PortFlags2 {
  PORT_FLAG2_TRANSPORT_ROLL = 1 << 0 , PORT_FLAG2_TRANSPORT_STOP = 1 << 1 , PORT_FLAG2_TRANSPORT_BACKWARD = 1 << 2 , PORT_FLAG2_TRANSPORT_FORWARD = 1 << 3 ,
  PORT_FLAG2_TRANSPORT_LOOP_TOGGLE = 1 << 4 , PORT_FLAG2_TRANSPORT_REC_TOGGLE = 1 << 5 , PORT_FLAG2_SUPPORTS_PATCH_MESSAGE = 1 << 6 , PORT_FLAG2_ENUMERATION = 1 << 7 ,
  PORT_FLAG2_URI_PARAM = 1 << 8 , PORT_FLAG2_SEQUENCE = 1 << 9 , PORT_FLAG2_SUPPORTS_MIDI = 1 << 10 , PORT_FLAG2_TP_OUTPUT_GAIN = 1 << 11 ,
  PORT_FLAG2_MIDI_PITCH_BEND = 1 << 12 , PORT_FLAG2_MIDI_POLY_KEY_PRESSURE = 1 << 13 , PORT_FLAG2_MIDI_CHANNEL_PRESSURE = 1 << 14 , PORT_FLAG2_CHANNEL_SEND_ENABLED = 1 << 15 ,
  PORT_FLAG2_CHANNEL_SEND_AMOUNT = 1 << 16 , PORT_FLAG2_BEATS_PER_BAR = 1 << 17 , PORT_FLAG2_BEAT_UNIT = 1 << 18 , PORT_FLAG2_FADER_SOLO = 1 << 19 ,
  PORT_FLAG2_FADER_LISTEN = 1 << 20 , PORT_FLAG2_FADER_MONO_COMPAT = 1 << 21 , PORT_FLAG2_TRACK_RECORDING = 1 << 22 , PORT_FLAG2_TP_MONITOR_AUDIO = 1 << 23 ,
  PORT_FLAG2_PREFADER = 1 << 24 , PORT_FLAG2_POSTFADER = 1 << 25 , PORT_FLAG2_MONITOR_FADER = 1 << 26 , PORT_FLAG2_SAMPLE_PROCESSOR_FADER = 1 << 27 ,
  PORT_FLAG2_SAMPLE_PROCESSOR_TRACK = 1 << 28 , PORT_FLAG2_FADER_SWAP_PHASE = 1 << 29 , PORT_FLAG2_MIDI_CLOCK = 1 << 30
}
 
enum  RecordingEventType {
  RECORDING_EVENT_TYPE_START_TRACK_RECORDING , RECORDING_EVENT_TYPE_START_AUTOMATION_RECORDING , RECORDING_EVENT_TYPE_MIDI , RECORDING_EVENT_TYPE_AUDIO ,
  RECORDING_EVENT_TYPE_AUTOMATION , RECORDING_EVENT_TYPE_PAUSE_TRACK_RECORDING , RECORDING_EVENT_TYPE_PAUSE_AUTOMATION_RECORDING , RECORDING_EVENT_TYPE_STOP_TRACK_RECORDING ,
  RECORDING_EVENT_TYPE_STOP_AUTOMATION_RECORDING
}
 
enum  RegionMusicalMode { REGION_MUSICAL_MODE_INHERIT , REGION_MUSICAL_MODE_OFF , REGION_MUSICAL_MODE_ON }
 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_CHROMATIC , SCALE_MAJOR , SCALE_MINOR , SCALE_IONIAN ,
  SCALE_DORIAN , SCALE_PHRYGIAN , SCALE_LYDIAN , SCALE_MIXOLYDIAN ,
  SCALE_AEOLIAN , SCALE_LOCRIAN , SCALE_MELODIC_MINOR , SCALE_HARMONIC_MINOR ,
  SCALE_WHOLE_TONE , SCALE_MAJOR_PENTATONIC , SCALE_MINOR_PENTATONIC , SCALE_OCTATONIC_HALF_WHOLE ,
  SCALE_OCTATONIC_WHOLE_HALF , SCALE_ACOUSTIC , SCALE_HARMONIC_MAJOR , SCALE_PHRYGIAN_DOMINANT ,
  SCALE_MAJOR_LOCRIAN , SCALE_ALGERIAN , SCALE_AUGMENTED , SCALE_DOUBLE_HARMONIC ,
  SCALE_CHINESE , SCALE_DIMINISHED , SCALE_DOMINANT_DIMINISHED , SCALE_EGYPTIAN ,
  SCALE_EIGHT_TONE_SPANISH , SCALE_ENIGMATIC , SCALE_GEEZ , SCALE_HINDU ,
  SCALE_HIRAJOSHI , SCALE_HUNGARIAN_GYPSY , SCALE_INSEN , SCALE_NEAPOLITAN_MAJOR ,
  SCALE_NEAPOLITAN_MINOR , SCALE_ORIENTAL , SCALE_ROMANIAN_MINOR , SCALE_ALTERED ,
  SCALE_MAQAM , SCALE_YO , SCALE_BEBOP_LOCRIAN , SCALE_BEBOP_DOMINANT ,
  SCALE_BEBOP_MAJOR , SCALE_SUPER_LOCRIAN , SCALE_ENIGMATIC_MINOR , SCALE_COMPOSITE ,
  SCALE_BHAIRAV , SCALE_HUNGARIAN_MINOR , SCALE_PERSIAN , SCALE_IWATO ,
  SCALE_KUMOI , SCALE_PELOG , SCALE_PROMETHEUS , SCALE_PROMETHEUS_NEAPOLITAN ,
  SCALE_PROMETHEUS_LISZT , SCALE_BALINESE , SCALE_RAGATODI , SCALE_JAPANESE1 ,
  SCALE_JAPANESE2 , SCALE_BLUES , SCALE_FLAMENCO , SCALE_GYPSY ,
  SCALE_HALF_DIMINISHED , SCALE_IN , SCALE_ISTRIAN , SCALE_LYDIAN_AUGMENTED ,
  SCALE_TRITONE , SCALE_UKRANIAN_DORIAN , NUM_SCALES
}
 Scale type (name) eg Aeolian. More...
 
enum  NoteLength {
  NOTE_LENGTH_BAR , NOTE_LENGTH_BEAT , NOTE_LENGTH_2_1 , NOTE_LENGTH_1_1 ,
  NOTE_LENGTH_1_2 , NOTE_LENGTH_1_4 , NOTE_LENGTH_1_8 , NOTE_LENGTH_1_16 ,
  NOTE_LENGTH_1_32 , NOTE_LENGTH_1_64 , NOTE_LENGTH_1_128
}
 
enum  NoteType { NOTE_TYPE_NORMAL , NOTE_TYPE_DOTTED , NOTE_TYPE_TRIPLET }
 
enum  NoteLengthType { NOTE_LENGTH_LINK , NOTE_LENGTH_LAST_OBJECT , NOTE_LENGTH_CUSTOM }
 
enum  SnapGridType { SNAP_GRID_TYPE_TIMELINE , SNAP_GRID_TYPE_EDITOR }
 Snap grid type. More...
 
enum  StretcherBackend { STRETCHER_BACKEND_RUBBERBAND , STRETCHER_BACKEND_PAULSTRETCH , STRETCHER_BACKEND_SBSMS }
 
enum  BeatUnit { BEAT_UNIT_2 , BEAT_UNIT_4 , BEAT_UNIT_8 , BEAT_UNIT_16 }
 Beat unit. More...
 
enum  TrackType {
  TRACK_TYPE_INSTRUMENT , TRACK_TYPE_AUDIO , TRACK_TYPE_MASTER , TRACK_TYPE_CHORD ,
  TRACK_TYPE_MARKER , TRACK_TYPE_TEMPO , TRACK_TYPE_MODULATOR , TRACK_TYPE_AUDIO_BUS ,
  TRACK_TYPE_AUDIO_GROUP , TRACK_TYPE_MIDI , TRACK_TYPE_MIDI_BUS , TRACK_TYPE_MIDI_GROUP ,
  TRACK_TYPE_FOLDER
}
 The Track's type. More...
 
enum  TracklistPinOption { TRACKLIST_PIN_OPTION_PINNED_ONLY , TRACKLIST_PIN_OPTION_UNPINNED_ONLY , TRACKLIST_PIN_OPTION_BOTH }
 Used in track search functions. More...
 
enum  PrerollCountBars { PREROLL_COUNT_BARS_NONE , PREROLL_COUNT_BARS_ONE , PREROLL_COUNT_BARS_TWO , PREROLL_COUNT_BARS_FOUR }
 
enum  PlayState { PLAYSTATE_ROLL_REQUESTED , PLAYSTATE_ROLLING , PLAYSTATE_PAUSE_REQUESTED , PLAYSTATE_PAUSED }
 
enum  TransportDisplay { TRANSPORT_DISPLAY_BBT , TRANSPORT_DISPLAY_TIME }
 Corrseponts to "transport-display" in the gsettings. More...
 
enum  TransportRecordingMode { RECORDING_MODE_OVERWRITE_EVENTS , RECORDING_MODE_MERGE_EVENTS , RECORDING_MODE_TAKES , RECORDING_MODE_TAKES_MUTED }
 Recording mode for MIDI and audio. More...
 

Functions

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)
 Process.
 
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 "0.0.0.0" 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 "0.0.0.0" 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 "0.0.0.0" 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)
 Wrapper.
 
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).
 

Variables

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.
 
ZRegionAutomationTrack::recording_region
 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
 
AutomationModeWidgetAutomationTrack::am_widget
 Automation mode button group.
 
CustomButtonWidgetAutomationTrack::bot_left_buttons [8]
 
int AutomationTrack::num_bot_left_buttons
 
AutomationTracklistAutomationTrack::atl
 Pointer to owner automation tracklist, if any.
 
PortAutomationTrack::port
 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
 
PortMeter::port
 Port associated with this meter.
 
TruePeakDspMeter::true_peak_processor
 True peak processor.
 
TruePeakDspMeter::true_peak_max_processor
 
float Meter::true_peak
 Current true peak.
 
float Meter::true_peak_max
 
KMeterDspMeter::kmeter_processor
 K RMS processor, if K meter.
 
PeakDspMeter::peak_processor
 
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

◆ AP_WIDGET_POINT_SIZE

#define AP_WIDGET_POINT_SIZE   6

Definition at line 29 of file automation_point.h.

◆ AUDIO_CLIP_SCHEMA_VERSION

#define AUDIO_CLIP_SCHEMA_VERSION   1

Definition at line 25 of file clip.h.

◆ AUDIO_ENGINE

#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.

◆ AUDIO_POOL

#define AUDIO_POOL   (AUDIO_ENGINE->pool)

Definition at line 26 of file pool.h.

◆ AUDIO_POOL_SCHEMA_VERSION

#define AUDIO_POOL_SCHEMA_VERSION   1

Definition at line 24 of file pool.h.

◆ AUDIO_REGION_BUILTIN_FADE_FRAMES

#define AUDIO_REGION_BUILTIN_FADE_FRAMES   10

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.

◆ AUTOMATION_RECORDING_TOUCH_REL_MS

#define AUTOMATION_RECORDING_TOUCH_REL_MS   800

Release time in ms when in touch record mode.

Definition at line 38 of file automation_track.h.

◆ BLOCK_LENGTH

#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.

◆ CHANNEL_MAGIC

#define CHANNEL_MAGIC   8431676

Magic number to identify channels.

Definition at line 44 of file channel.h.

◆ CHANNEL_SCHEMA_VERSION

#define CHANNEL_SCHEMA_VERSION   2

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.

◆ CHANNEL_SEND_POST_FADER_START_SLOT

#define CHANNEL_SEND_POST_FADER_START_SLOT   6

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

Definition at line 37 of file channel_send.h.

◆ CHANNEL_SEND_SCHEMA_VERSION

#define CHANNEL_SEND_SCHEMA_VERSION   1

Definition at line 31 of file channel_send.h.

◆ CHORD_DESCRIPTOR_MAX_NOTES

#define CHORD_DESCRIPTOR_MAX_NOTES   48

Definition at line 26 of file chord_descriptor.h.

◆ CHORD_DESCRIPTOR_SCHEMA_VERSION

#define CHORD_DESCRIPTOR_SCHEMA_VERSION   2

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.

◆ CHORD_OBJECT_MAGIC

#define CHORD_OBJECT_MAGIC   4181694

Definition at line 29 of file chord_object.h.

◆ CHORD_OBJECT_WIDGET_TRIANGLE_W

#define CHORD_OBJECT_WIDGET_TRIANGLE_W   10

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.

◆ CONTROL_ROOM

#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.

◆ CONTROL_ROOM_SCHEMA_VERSION

#define CONTROL_ROOM_SCHEMA_VERSION   2

Definition at line 22 of file control_room.h.

◆ CURVE_EXPONENT_CURVINESS_BOUND

#define CURVE_EXPONENT_CURVINESS_BOUND   0.95

Definition at line 31 of file curve.h.

◆ CURVE_OPTIONS_SCHEMA_VERSION

#define CURVE_OPTIONS_SCHEMA_VERSION   1

Definition at line 27 of file curve.h.

◆ CURVE_SUPERELLIPSE_CURVINESS_BOUND

#define CURVE_SUPERELLIPSE_CURVINESS_BOUND   0.82

Bounds for each algorithm.

Definition at line 30 of file curve.h.

◆ CURVE_VITAL_CURVINESS_BOUND

#define CURVE_VITAL_CURVINESS_BOUND   1.00

Definition at line 32 of file curve.h.

◆ DENORMAL_PREVENTION_VAL

#define DENORMAL_PREVENTION_VAL   (AUDIO_ENGINE->denormal_prevention_val)

Definition at line 82 of file engine.h.

◆ ENGINE_EVENTS_PUSH

#define ENGINE_EVENTS_PUSH ( et,
_arg,
_uint_arg,
_float_arg )
Value:
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)
Value:
((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 )
Value:
(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 980 of file engine.h.

◆ ENGINE_MAX_EVENTS

#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)
Value:
(self->hw_processor \
&& hw_processor_is_in_active_project ((self)->hw_processor))

Definition at line 49 of file ext_port.h.

◆ EXT_PORT_SCHEMA_VERSION

#define EXT_PORT_SCHEMA_VERSION   1

Definition at line 40 of file ext_port.h.

◆ EXT_PORTS_MAX

#define EXT_PORTS_MAX   1024

Maximum external ports.

Used for fixed-size arrays.

Definition at line 47 of file ext_port.h.

◆ FADER_DEFAULT_FADE_FRAMES

#define FADER_DEFAULT_FADE_FRAMES    (ZRYTHM_TESTING ? FADER_DEFAULT_FADE_FRAMES_SHORT : 8192)

Definition at line 41 of file fader.h.

◆ FADER_DEFAULT_FADE_FRAMES_SHORT

#define FADER_DEFAULT_FADE_FRAMES_SHORT   1024

Causes loud volume in when < 1k.

Definition at line 40 of file fader.h.

◆ FADER_FADE_FRAMES_FOR_TYPE

#define FADER_FADE_FRAMES_FOR_TYPE ( f)
Value:
((f)->type == FADER_TYPE_MONITOR \
? FADER_DEFAULT_FADE_FRAMES \
#define FADER_DEFAULT_FADE_FRAMES_SHORT
Causes loud volume in when < 1k.
Definition fader.h:40
@ FADER_TYPE_MONITOR
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)
Value:
((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 ( \
self->control_room)))

Definition at line 49 of file fader.h.

◆ FADER_MAGIC

#define FADER_MAGIC   32548791

Definition at line 35 of file fader.h.

◆ FADER_SCHEMA_VERSION

#define FADER_SCHEMA_VERSION   2

Definition at line 31 of file fader.h.

◆ FOREACH_AUTOMATABLE

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

Definition at line 49 of file channel.h.

◆ FOREACH_STRIP

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

Definition at line 48 of file channel.h.

◆ HW_IN_PROCESSOR

#define HW_IN_PROCESSOR   (AUDIO_ENGINE->hw_in_processor)

Definition at line 30 of file hardware_processor.h.

◆ HW_OUT_PROCESSOR

#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.

◆ HW_PROCESSOR_SCHEMA_VERSION

#define HW_PROCESSOR_SCHEMA_VERSION   1

Definition at line 28 of file hardware_processor.h.

◆ IS_CHANNEL

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

Definition at line 45 of file channel.h.

◆ IS_CHANNEL_AND_NONNULL

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

Definition at line 46 of file channel.h.

◆ IS_CHORD_OBJECT

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

Definition at line 30 of file chord_object.h.

◆ IS_CHORD_OBJECT_AND_NONNULL

#define IS_CHORD_OBJECT_AND_NONNULL ( x)    (x && IS_CHORD_OBJECT (x))

Definition at line 31 of file chord_object.h.

◆ IS_FADER

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

Definition at line 36 of file fader.h.

◆ IS_FADER_AND_NONNULL

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

Definition at line 37 of file fader.h.

◆ IS_MIDI_NOTE

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

Definition at line 37 of file midi_note.h.

◆ IS_PORT

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

Definition at line 69 of file port.h.

◆ IS_PORT_AND_NONNULL

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

Definition at line 70 of file port.h.

◆ IS_PORT_IDENTIFIER

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

Definition at line 32 of file port_identifier.h.

◆ IS_REGION

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

Definition at line 39 of file region.h.

◆ IS_REGION_AND_NONNULL

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

Definition at line 40 of file region.h.

◆ IS_REGION_LINK_GROUP

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

Definition at line 26 of file region_link_group.h.

◆ IS_SCALE_OBJECT

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

Definition at line 32 of file scale_object.h.

◆ IS_TRACK

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

Definition at line 63 of file track.h.

◆ IS_TRACK_AND_NONNULL

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

Definition at line 64 of file track.h.

◆ IS_TRACK_PROCESSOR

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

Definition at line 34 of file track_processor.h.

◆ MANUAL_PRESS_EVENTS

#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.

◆ MARKER_WIDGET_TRIANGLE_W

#define MARKER_WIDGET_TRIANGLE_W   10

Definition at line 25 of file marker.h.

◆ MAX_AUTOMATION_POINTS

#define MAX_AUTOMATION_POINTS   1200

Definition at line 35 of file automation_track.h.

◆ MAX_FADER_AMP

#define MAX_FADER_AMP   1.42f

Definition at line 50 of file channel.h.

◆ MAX_GRAPH_THREADS

#define MAX_GRAPH_THREADS   128

Definition at line 65 of file graph.h.

◆ MAX_MIDI_EVENTS

#define MAX_MIDI_EVENTS   2560

Max events to hold in queues.

Definition at line 39 of file midi_event.h.

◆ MAX_SNAP_POINTS

#define MAX_SNAP_POINTS   120096

Definition at line 30 of file quantize_options.h.

◆ MAX_TRACKS

#define MAX_TRACKS   3000

Definition at line 31 of file tracklist.h.

◆ METRONOME

#define METRONOME   (AUDIO_ENGINE->metronome)

Definition at line 25 of file metronome.h.

◆ MIDI_ALL_NOTES_OFF

#define MIDI_ALL_NOTES_OFF   0x7B

Definition at line 59 of file midi.h.

◆ MIDI_ALL_SOUND_OFF

#define MIDI_ALL_SOUND_OFF   0x78

Definition at line 60 of file midi.h.

◆ MIDI_BUF_SIZE

#define MIDI_BUF_SIZE   1024

Definition at line 74 of file engine.h.

◆ MIDI_CH1_CHAN_AFTERTOUCH

#define MIDI_CH1_CHAN_AFTERTOUCH   0xD0

Also known as Channel Pressure.

Definition at line 57 of file midi.h.

◆ MIDI_CH1_CTRL_CHANGE

#define MIDI_CH1_CTRL_CHANGE   0xB0

Definition at line 54 of file midi.h.

◆ MIDI_CH1_NOTE_OFF

#define MIDI_CH1_NOTE_OFF   0x80

Definition at line 51 of file midi.h.

◆ MIDI_CH1_NOTE_ON

#define MIDI_CH1_NOTE_ON   0x90

Definition at line 50 of file midi.h.

◆ MIDI_CH1_PITCH_WHEEL_RANGE

#define MIDI_CH1_PITCH_WHEEL_RANGE   0xE0

Definition at line 58 of file midi.h.

◆ MIDI_CH1_POLY_AFTERTOUCH

#define MIDI_CH1_POLY_AFTERTOUCH   0xA0

Also known as Polyphonic Key Pressure.

Definition at line 53 of file midi.h.

◆ MIDI_CH1_PROG_CHANGE

#define MIDI_CH1_PROG_CHANGE   0xC0

Definition at line 55 of file midi.h.

◆ MIDI_CLOCK_BEAT

#define MIDI_CLOCK_BEAT   0xF8

Definition at line 65 of file midi.h.

◆ MIDI_CLOCK_CONTINUE

#define MIDI_CLOCK_CONTINUE   0xFB

Definition at line 64 of file midi.h.

◆ MIDI_CLOCK_START

#define MIDI_CLOCK_START   0xFA

Definition at line 63 of file midi.h.

◆ MIDI_CLOCK_STOP

#define MIDI_CLOCK_STOP   0xFC

Definition at line 66 of file midi.h.

◆ MIDI_IN_NUM_EVENTS

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

Definition at line 76 of file engine.h.

◆ MIDI_MAPPINGS

#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,
buf,
dev_port,
dest_port,
fire_events )
Value:
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,
buf,
dest_port,
fire_events )
Value:
self, buf, NULL, dest_port, (self)->num_mappings, fire_events)

Definition at line 82 of file midi_mapping.h.

◆ MIDI_META_EVENT

#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.

◆ MIDI_NOTE_MAGIC

#define MIDI_NOTE_MAGIC   3588791

Definition at line 36 of file midi_note.h.

◆ MIDI_NOTE_SCHEMA_VERSION

#define MIDI_NOTE_SCHEMA_VERSION   1

Definition at line 34 of file midi_note.h.

◆ midi_region_add_midi_note

#define midi_region_add_midi_note ( region,
midi_note,
pub_events )
Value:
region, midi_note, ((ZRegion *) (region))->num_midi_notes, pub_events)
void midi_region_insert_midi_note(ZRegion *region, MidiNote *midi_note, int idx, int pub_events)
Inserts the MidiNote to the given ZRegion.
A region (clip) is an object on the timeline that contains either MidiNote's or AudioClip's.
Definition region.h:77

Adds the MidiNote to the given ZRegion.

Parameters
pub_eventsPublish UI events or not.

Definition at line 82 of file midi_region.h.

◆ MIDI_SONG_POSITION

#define MIDI_SONG_POSITION   0xF2

Definition at line 62 of file midi.h.

◆ MIDI_SYSTEM_MESSAGE

#define MIDI_SYSTEM_MESSAGE   0xF0

Definition at line 61 of file midi.h.

◆ modulator_macro_processor_is_in_active_project

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

Definition at line 26 of file modulator_macro_processor.h.

◆ MODULATOR_MACRO_PROCESSOR_SCHEMA_VERSION

#define MODULATOR_MACRO_PROCESSOR_SCHEMA_VERSION   1

Definition at line 24 of file modulator_macro_processor.h.

◆ MONITOR_FADER

#define MONITOR_FADER   (CONTROL_ROOM->monitor_fader)

Definition at line 33 of file fader.h.

◆ mpmc_queue_dequeue_node

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

Definition at line 63 of file graph.h.

◆ mpmc_queue_push_back_node

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

Definition at line 61 of file graph.h.

◆ P_CHORD_TRACK

#define P_CHORD_TRACK   (TRACKLIST->chord_track)

Definition at line 25 of file chord_track.h.

◆ P_MARKER_TRACK

#define P_MARKER_TRACK   (TRACKLIST->marker_track)

Definition at line 23 of file marker_track.h.

◆ P_MASTER_TRACK

#define P_MASTER_TRACK   (TRACKLIST->master_track)

Definition at line 29 of file master_track.h.

◆ P_MODULATOR_TRACK

#define P_MODULATOR_TRACK   (TRACKLIST->modulator_track)

Definition at line 27 of file modulator_track.h.

◆ P_TEMPO_TRACK

#define P_TEMPO_TRACK   (TRACKLIST->tempo_track)

Definition at line 34 of file tempo_track.h.

◆ PLAYHEAD

#define PLAYHEAD   (&TRANSPORT->playhead_pos)

Definition at line 36 of file transport.h.

◆ port_clear_buffer

#define port_clear_buffer ( _port)
Value:
{ \
if (_port->id.type == TYPE_AUDIO || _port->id.type == TYPE_CV) \
{ \
if (_port->buf) \
{ \
dsp_fill ( \
_port->buf, DENORMAL_PREVENTION_VAL, AUDIO_ENGINE->block_length); \
} \
} \
else if (_port->id.type == TYPE_EVENT) \
{ \
if (_port->midi_events) \
_port->midi_events->num_events = 0; \
} \
}

Clears the port buffer.

Note
Only the Zrythm buffer is cleared. Use port_clear_external_buffer() to clear backend buffers.

Definition at line 981 of file port.h.

◆ port_connect

#define port_connect ( a,
b,
locked )
Value:
PORT_CONNECTIONS_MGR, &((a)->id), &((b)->id), 1.f, locked, true)
const PortConnection * port_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 connect...

Connects a and b with default settings:

  • enabled
  • multiplier 1.0

Definition at line 856 of file port.h.

◆ PORT_CONNECTION_SCHEMA_VERSION

#define PORT_CONNECTION_SCHEMA_VERSION   1

Definition at line 26 of file port_connection.h.

◆ port_connections_manager_ensure_connect_from_connection

#define port_connections_manager_ensure_connect_from_connection ( self,
conn )
Value:
self, conn->src_id, conn->dest_id, conn->multiplier, conn->locked, \
conn->enabled)

Definition at line 183 of file port_connections_manager.h.

◆ PORT_CONNECTIONS_MANAGER_SCHEMA_VERSION

#define PORT_CONNECTIONS_MANAGER_SCHEMA_VERSION   1

Definition at line 33 of file port_connections_manager.h.

◆ PORT_CONNECTIONS_MGR

#define PORT_CONNECTIONS_MGR   (PROJECT->port_connections_manager)

Definition at line 35 of file port_connections_manager.h.

◆ port_disconnect

#define port_disconnect ( a,
b )
Value:
PORT_CONNECTIONS_MGR, &((a)->id), &((b)->id))
bool port_connections_manager_ensure_disconnect(PortConnectionsManager *self, const PortIdentifier *src, const PortIdentifier *dest)
Removes the connection for the given ports if it exists.

Removes the connection between the given ports.

Definition at line 863 of file port.h.

◆ PORT_IDENTIFIER_MAGIC

#define PORT_IDENTIFIER_MAGIC   3411841

Definition at line 31 of file port_identifier.h.

◆ PORT_IDENTIFIER_SCHEMA_VERSION

#define PORT_IDENTIFIER_SCHEMA_VERSION   1

Definition at line 29 of file port_identifier.h.

◆ port_is_in_active_project

#define port_is_in_active_project ( self)
Value:
(port_is_owner_active (self, PORT_OWNER_TYPE_AUDIO_ENGINE, engine) \
|| port_is_owner_active (self, PORT_OWNER_TYPE_PLUGIN, plugin) \
|| port_is_owner_active (self, PORT_OWNER_TYPE_TRACK, track) \
|| port_is_owner_active (self, PORT_OWNER_TYPE_CHANNEL, track) \
|| port_is_owner_active (self, PORT_OWNER_TYPE_FADER, fader) \
|| port_is_owner_active (self, PORT_OWNER_TYPE_CHANNEL_SEND, channel_send) \
|| port_is_owner_active (self, PORT_OWNER_TYPE_TRACK_PROCESSOR, track) \
|| port_is_owner_active ( \
self, PORT_OWNER_TYPE_MODULATOR_MACRO_PROCESSOR, modulator_macro_processor) \
|| port_is_owner_active (self, PORT_OWNER_TYPE_HW, ext_port))
@ PORT_OWNER_TYPE_TRACK
Track owner.
@ PORT_OWNER_TYPE_HW
Port is part of a HardwareProcessor.
@ PORT_OWNER_TYPE_PLUGIN
Plugin owner.
@ PORT_OWNER_TYPE_MODULATOR_MACRO_PROCESSOR
Modulator macro processor owner.
@ PORT_OWNER_TYPE_CHANNEL
Channel owner.
@ PORT_OWNER_TYPE_CHANNEL_SEND
Channel send.
@ PORT_OWNER_TYPE_FADER
Fader.

Definition at line 84 of file port.h.

◆ port_is_owner_active

#define port_is_owner_active ( self,
_owner_type,
owner )
Value:
((self->id.owner_type == _owner_type) && (self->owner != NULL) \
&& owner##_is_in_active_project (self->owner))

Definition at line 80 of file port.h.

◆ PORT_MAGIC

#define PORT_MAGIC   456861194

Definition at line 68 of file port.h.

◆ PORT_NOT_OWNED

#define PORT_NOT_OWNED   -1

Special ID for owner_pl, owner_ch, etc.

to indicate that the port is not owned.

Definition at line 78 of file port.h.

◆ PORT_SCHEMA_VERSION

#define PORT_SCHEMA_VERSION   1

Definition at line 65 of file port.h.

◆ ports_connected

#define ports_connected ( a,
b )
Value:
(port_connections_manager_find_connection ( \
PORT_CONNECTIONS_MGR, &(a)->id, &(b)->id) \
!= NULL)

Definition at line 923 of file port.h.

◆ position_add_bars

#define position_add_bars ( _pos,
_b )
Value:
g_warn_if_fail (TRANSPORT->ticks_per_bar > 0); \
position_add_ticks ((_pos), (_b) * TRANSPORT->ticks_per_bar)

Definition at line 38 of file position.h.

◆ position_add_beats

#define position_add_beats ( _pos,
_b )
Value:
g_warn_if_fail (TRANSPORT->ticks_per_beat > 0); \
position_add_ticks ((_pos), (_b) * TRANSPORT->ticks_per_beat)

Definition at line 35 of file position.h.

◆ position_add_sixteenths

#define position_add_sixteenths ( _pos,
_s )    position_add_ticks ((_pos), (_s) * TICKS_PER_SIXTEENTH_NOTE)

Definition at line 33 of file position.h.

◆ position_between_frames_excl2

#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.

Definition at line 49 of file position.h.

◆ position_compare_frames

#define position_compare_frames ( p1,
p2 )   ((p1)->frames - (p2)->frames)

Compares 2 positions based on their frames.

negative = p1 is earlier 0 = equal positive = p2 is earlier

Definition at line 59 of file position.h.

◆ position_compare_ticks

#define position_compare_ticks ( p1,
p2 )   ((p1)->ticks - (p2)->ticks)

Compares 2 positions based on their total ticks.

negative = p1 is earlier 0 = equal positive = p2 is earlier

Definition at line 89 of file position.h.

◆ position_init

#define position_init ( __pos)    *(__pos) = POSITION_START

Initializes given position.

Assumes the given argument is a Pointer *.

Definition at line 118 of file position.h.

◆ POSITION_INIT_ON_STACK

#define POSITION_INIT_ON_STACK ( name)    Position name = POSITION_START;

Inits the default position on the stack.

Definition at line 111 of file position.h.

◆ position_is_after

#define position_is_after ( _pos,
_cmp )   (position_compare_frames (_pos, _cmp) > 0)

Checks if _pos is after _cmp.

Definition at line 74 of file position.h.

◆ position_is_after_or_equal

#define position_is_after_or_equal ( _pos,
_cmp )    (position_compare_frames (_pos, _cmp) >= 0)

Checks if _pos is after or equal to _cmp.

Definition at line 77 of file position.h.

◆ position_is_before

#define position_is_before ( _pos,
_cmp )    (position_compare_frames (_pos, _cmp) < 0)

Checks if _pos is before _cmp.

Definition at line 62 of file position.h.

◆ position_is_before_or_equal

#define position_is_before_or_equal ( _pos,
_cmp )    (position_compare_frames (_pos, _cmp) <= 0)

Checks if _pos is before or equal to _cmp.

Definition at line 66 of file position.h.

◆ position_is_between

#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.

Definition at line 96 of file position.h.

◆ position_is_between_excl_start

#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.

Definition at line 101 of file position.h.

◆ position_is_equal

#define position_is_equal ( _pos,
_cmp )    (position_compare_frames (_pos, _cmp) == 0)

Checks if _pos is equal to _cmp.

Definition at line 70 of file position.h.

◆ position_is_equal_ticks

#define position_is_equal_ticks ( p1,
p2 )    (fabs (position_compare_ticks (p1, p2)) <= DBL_EPSILON)

Definition at line 91 of file position.h.

◆ position_is_positive

#define position_is_positive ( pos)    ((pos)->frames >= 0 && (pos)->ticks >= 0)

Definition at line 80 of file position.h.

◆ position_max

#define position_max ( p1,
p2 )   (position_compare_frames (p1, p2) > 0 ? p1 : p2)

Returns maximum of p1 and p2.

Definition at line 108 of file position.h.

◆ POSITION_MAX_BAR

#define POSITION_MAX_BAR   160000

Definition at line 43 of file position.h.

◆ position_min

#define position_min ( p1,
p2 )   (position_compare_frames (p1, p2) < 0 ? p1 : p2)

Returns minimum of p1 and p2.

Definition at line 105 of file position.h.

◆ POSITION_SCHEMA_VERSION

#define POSITION_SCHEMA_VERSION   1

Definition at line 26 of file position.h.

◆ position_set_to_pos

#define position_set_to_pos ( _pos,
_target )   *(_pos) = *(_target)

Sets position to target position.

Assumes each position is Position *.

Definition at line 205 of file position.h.

◆ position_snap_simple

#define position_snap_simple ( pos,
sg )   position_snap (NULL, pos, NULL, NULL, sg)

Definition at line 41 of file position.h.

◆ position_to_frames

#define position_to_frames ( x)    ((x)->frames)

Deprecated - added for compatibility.

Definition at line 216 of file position.h.

◆ position_to_ticks

#define position_to_ticks ( x)    ((x)->ticks)

Definition at line 217 of file position.h.

◆ QUANTIZE_OPTIONS_EDITOR

#define QUANTIZE_OPTIONS_EDITOR   (PROJECT->quantize_opts_editor)

Definition at line 28 of file quantize_options.h.

◆ QUANTIZE_OPTIONS_IS_EDITOR

#define QUANTIZE_OPTIONS_IS_EDITOR ( qo)    (PROJECT->quantize_opts_editor == qo)

Definition at line 25 of file quantize_options.h.

◆ QUANTIZE_OPTIONS_IS_TIMELINE

#define QUANTIZE_OPTIONS_IS_TIMELINE ( qo)    (PROJECT->quantize_opts_timeline == qo)

Definition at line 26 of file quantize_options.h.

◆ QUANTIZE_OPTIONS_SCHEMA_VERSION

#define QUANTIZE_OPTIONS_SCHEMA_VERSION   1

Definition at line 23 of file quantize_options.h.

◆ QUANTIZE_OPTIONS_TIMELINE

#define QUANTIZE_OPTIONS_TIMELINE   (PROJECT->quantize_opts_timeline)

Definition at line 27 of file quantize_options.h.

◆ recording_event_init

#define recording_event_init ( re)
Value:
re->type = 0; \
re->track_name_hash = 0; \
re->region_name[0] = '\0'; \
re->g_start_frame_w_offset = 0; \
re->local_offset = 0; \
re->has_midi_event = 0; \
memset (&re->midi_event, 0, sizeof (MidiEvent)); \
re->automation_track_idx = 0; \
re->nframes = 0; \
re->file = __FILE__; \
re->func = __func__; \
re->lineno = __LINE__
Timed MIDI event.
Definition midi_event.h:45

Inits an already allocated recording event.

Definition at line 123 of file recording_event.h.

◆ recording_event_queue_dequeue_event

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

Definition at line 27 of file recording_event.h.

◆ recording_event_queue_push_back_event

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

Definition at line 24 of file recording_event.h.

◆ RECORDING_EVENTS_PUSH_AUDIO

#define RECORDING_EVENTS_PUSH_AUDIO ( et,
_arg )
Value:
if (RECORDING_MANAGER->event_queue) \
{ \
RECORDING_MANAGER->event_obj_pool); \
ev->type = et; \
ev->arg = (void *) _arg; \
event_queue_push_back_event (RECORDING_MANAGER->event_queue, _ev); \
}
A recording event.

Push events.

Definition at line 33 of file recording_event.h.

◆ RECORDING_MANAGER

#define RECORDING_MANAGER   (ZRYTHM->recording_manager)

Definition at line 27 of file recording_manager.h.

◆ REGION_IDENTIFIER_SCHEMA_VERSION

#define REGION_IDENTIFIER_SCHEMA_VERSION   1

Definition at line 27 of file region_identifier.h.

◆ region_is_selected

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

Definition at line 44 of file region.h.

◆ REGION_LINK_GROUP_MAGIC

#define REGION_LINK_GROUP_MAGIC   1222013

Definition at line 25 of file region_link_group.h.

◆ REGION_LINK_GROUP_MANAGER

#define REGION_LINK_GROUP_MANAGER   (PROJECT->region_link_group_manager)

Definition at line 21 of file region_link_group_manager.h.

◆ REGION_MAGIC

#define REGION_MAGIC   93075327

Definition at line 38 of file region.h.

◆ REGION_PRINTF_FILENAME

#define REGION_PRINTF_FILENAME   "%s_%s.mid"

Definition at line 42 of file region.h.

◆ REGION_SCHEMA_VERSION

#define REGION_SCHEMA_VERSION   1

Definition at line 36 of file region.h.

◆ region_type_can_fade

#define region_type_can_fade ( rtype)    (rtype == REGION_TYPE_AUDIO)

Returns if the given ZRegion type can have fades.

Definition at line 284 of file region.h.

◆ ROUTER

#define ROUTER   (AUDIO_ENGINE->router)

Definition at line 75 of file router.h.

◆ sample_playback_init

#define sample_playback_init ( self,
_buf,
_buf_size,
_channels,
_vol,
_start_offset )
Value:
if (_channels <= 0) \
{ \
g_critical ("channels: %u", _channels); \
} \
(self)->buf = _buf; \
(self)->buf_size = _buf_size; \
(self)->volume = _vol; \
(self)->offset = 0; \
(self)->channels = _channels; \
(self)->start_offset = _start_offset; \
(self)->file = __FILE__; \
(self)->func = __func__; \
(self)->lineno = __LINE__

Initializes a SamplePlayback with a sample to play back.

Definition at line 62 of file sample_playback.h.

◆ SAMPLE_PROCESSOR

#define SAMPLE_PROCESSOR   (AUDIO_ENGINE->sample_processor)

Definition at line 35 of file sample_processor.h.

◆ sample_processor_is_in_active_project

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

Definition at line 37 of file sample_processor.h.

◆ scale_object_is_selected

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

Definition at line 28 of file scale_object.h.

◆ SCALE_OBJECT_MAGIC

#define SCALE_OBJECT_MAGIC   13187994

Definition at line 31 of file scale_object.h.

◆ SCALE_SCHEMA_VERSION

#define SCALE_SCHEMA_VERSION   2

Definition at line 27 of file scale.h.

◆ SNAP_GRID_ANY_SNAP

#define SNAP_GRID_ANY_SNAP ( sg)    (sg->snap_to_grid || sg->snap_to_events)

Definition at line 33 of file snap_grid.h.

◆ SNAP_GRID_DEFAULT_MAX_BAR

#define SNAP_GRID_DEFAULT_MAX_BAR   10000

Definition at line 34 of file snap_grid.h.

◆ SNAP_GRID_EDITOR

#define SNAP_GRID_EDITOR   (PROJECT->snap_grid_editor)

Definition at line 28 of file snap_grid.h.

◆ SNAP_GRID_IS_EDITOR

#define SNAP_GRID_IS_EDITOR ( sg)    (SNAP_GRID_EDITOR == sg)

Definition at line 30 of file snap_grid.h.

◆ SNAP_GRID_IS_TIMELINE

#define SNAP_GRID_IS_TIMELINE ( sg)    (SNAP_GRID_TIMELINE == sg)

Definition at line 31 of file snap_grid.h.

◆ SNAP_GRID_SCHEMA_VERSION

#define SNAP_GRID_SCHEMA_VERSION   1

Definition at line 25 of file snap_grid.h.

◆ SNAP_GRID_TIMELINE

#define SNAP_GRID_TIMELINE   (PROJECT->snap_grid_timeline)

Definition at line 27 of file snap_grid.h.

◆ STEREO_PORTS_SCHEMA_VERSION

#define STEREO_PORTS_SCHEMA_VERSION   1

Definition at line 66 of file port.h.

◆ TEMPO_TRACK_DEFAULT_BEAT_UNIT

#define TEMPO_TRACK_DEFAULT_BEAT_UNIT   BEAT_UNIT_4

Definition at line 30 of file tempo_track.h.

◆ TEMPO_TRACK_DEFAULT_BEATS_PER_BAR

#define TEMPO_TRACK_DEFAULT_BEATS_PER_BAR   4

Definition at line 27 of file tempo_track.h.

◆ TEMPO_TRACK_DEFAULT_BPM

#define TEMPO_TRACK_DEFAULT_BPM   140.f

Definition at line 26 of file tempo_track.h.

◆ TEMPO_TRACK_MAX_BEAT_UNIT

#define TEMPO_TRACK_MAX_BEAT_UNIT   BEAT_UNIT_16

Definition at line 32 of file tempo_track.h.

◆ TEMPO_TRACK_MAX_BEATS_PER_BAR

#define TEMPO_TRACK_MAX_BEATS_PER_BAR   16

Definition at line 29 of file tempo_track.h.

◆ TEMPO_TRACK_MAX_BPM

#define TEMPO_TRACK_MAX_BPM   420.f

Definition at line 24 of file tempo_track.h.

◆ TEMPO_TRACK_MIN_BEAT_UNIT

#define TEMPO_TRACK_MIN_BEAT_UNIT   BEAT_UNIT_2

Definition at line 31 of file tempo_track.h.

◆ TEMPO_TRACK_MIN_BEATS_PER_BAR

#define TEMPO_TRACK_MIN_BEATS_PER_BAR   1

Definition at line 28 of file tempo_track.h.

◆ TEMPO_TRACK_MIN_BPM

#define TEMPO_TRACK_MIN_BPM   40.f

Definition at line 25 of file tempo_track.h.

◆ TICKS_PER_NINETYSIXTH_NOTE_DBL

#define TICKS_PER_NINETYSIXTH_NOTE_DBL   40.0

Definition at line 32 of file position.h.

◆ TICKS_PER_QUARTER_NOTE

#define TICKS_PER_QUARTER_NOTE   960

Definition at line 28 of file position.h.

◆ TICKS_PER_QUARTER_NOTE_DBL

#define TICKS_PER_QUARTER_NOTE_DBL   960.0

Definition at line 30 of file position.h.

◆ TICKS_PER_SIXTEENTH_NOTE

#define TICKS_PER_SIXTEENTH_NOTE   240

Definition at line 29 of file position.h.

◆ TICKS_PER_SIXTEENTH_NOTE_DBL

#define TICKS_PER_SIXTEENTH_NOTE_DBL   240.0

Definition at line 31 of file position.h.

◆ TIME_SIGNATURE_SCHEMA_VERSION

#define TIME_SIGNATURE_SCHEMA_VERSION   1

Definition at line 30 of file transport.h.

◆ TIME_TO_RESET_PEAK

#define TIME_TO_RESET_PEAK   4800000

Definition at line 72 of file port.h.

◆ track_add_region

#define track_add_region ( self,
region,
at,
lane_pos,
gen_name,
fire_events,
error )
Value:
self, region, at, lane_pos, -1, gen_name, fire_events, error)
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.

Adds a ZRegion to the given lane or AutomationTrack of the track.

The ZRegion must be the main region (see ArrangerObjectInfo).

Parameters
atThe AutomationTrack of this ZRegion, if automation region.
lane_posThe position of the lane to add to, if applicable.
gen_nameGenerate a unique region name or not. This will be 0 if the caller already generated a unique name.

Definition at line 806 of file track.h.

◆ track_create_empty_with_action

#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.

Definition at line 1475 of file track.h.

◆ TRACK_DEF_HEIGHT

#define TRACK_DEF_HEIGHT   48

Definition at line 60 of file track.h.

◆ TRACK_DND_PREFIX

#define TRACK_DND_PREFIX   Z_DND_STRING_PREFIX "Track::"

Definition at line 68 of file track.h.

◆ track_get_name_hash

#define track_get_name_hash ( self)    g_str_hash (self->name)

Definition at line 619 of file track.h.

◆ track_is_auditioner

#define track_is_auditioner ( self)     (self->tracklist && tracklist_is_auditioner (self->tracklist))

Whether this track is part of the SampleProcessor auditioner tracklist.

Definition at line 75 of file track.h.

◆ track_is_in_active_project

#define track_is_in_active_project ( self)     (self->tracklist && tracklist_is_in_active_project (self->tracklist))

Definition at line 70 of file track.h.

◆ track_is_pinned

#define track_is_pinned ( x)    (x->pos < TRACKLIST->pinned_tracks_cutoff)

Returns whether the track is pinned.

Definition at line 789 of file track.h.

◆ track_lane_is_auditioner

#define track_lane_is_auditioner ( self)     (self->track && track_is_auditioner (self->track))

Definition at line 27 of file track_lane.h.

◆ track_lane_is_in_active_project

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

Definition at line 30 of file track_lane.h.

◆ TRACK_MAGIC

#define TRACK_MAGIC   21890135

Definition at line 62 of file track.h.

◆ TRACK_MAX_MODULATOR_MACROS

#define TRACK_MAX_MODULATOR_MACROS   128

Definition at line 66 of file track.h.

◆ TRACK_MIN_HEIGHT

#define TRACK_MIN_HEIGHT   24

Definition at line 59 of file track.h.

◆ track_processor_is_in_active_project

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

Definition at line 36 of file track_processor.h.

◆ TRACK_PROCESSOR_MAGIC

#define TRACK_PROCESSOR_MAGIC   81213128

Definition at line 33 of file track_processor.h.

◆ TRACK_PROCESSOR_SCHEMA_VERSION

#define TRACK_PROCESSOR_SCHEMA_VERSION   1

Definition at line 31 of file track_processor.h.

◆ track_type_is_audio_group

#define track_type_is_audio_group   track_type_has_mono_compat_switch

Definition at line 991 of file track.h.

◆ TRACKLIST

#define TRACKLIST   (PROJECT->tracklist)

Definition at line 30 of file tracklist.h.

◆ tracklist_is_auditioner

#define tracklist_is_auditioner ( self)     (self->sample_processor && tracklist_is_in_active_project (self))

Definition at line 37 of file tracklist.h.

◆ tracklist_is_in_active_project

#define tracklist_is_in_active_project ( self)
Value:
(self->project == PROJECT \
|| (self->sample_processor && sample_processor_is_in_active_project (self->sample_processor)))

Definition at line 33 of file tracklist.h.

◆ TRANSPORT

#define TRANSPORT   (AUDIO_ENGINE->transport)

Definition at line 33 of file transport.h.

◆ TRANSPORT_DEFAULT_TOTAL_BARS

#define TRANSPORT_DEFAULT_TOTAL_BARS   128

Definition at line 34 of file transport.h.

◆ TRANSPORT_IS_LOOPING

#define TRANSPORT_IS_LOOPING   (TRANSPORT->loop)

Definition at line 39 of file transport.h.

◆ TRANSPORT_IS_PAUSED

#define TRANSPORT_IS_PAUSED   (TRANSPORT->play_state == PLAYSTATE_PAUSED)

Definition at line 38 of file transport.h.

◆ TRANSPORT_IS_RECORDING

#define TRANSPORT_IS_RECORDING   (TRANSPORT->recording)

Definition at line 40 of file transport.h.

◆ TRANSPORT_IS_ROLLING

#define TRANSPORT_IS_ROLLING   (TRANSPORT->play_state == PLAYSTATE_ROLLING)

Definition at line 37 of file transport.h.

◆ TRANSPORT_SCHEMA_VERSION

#define TRANSPORT_SCHEMA_VERSION   1

Definition at line 31 of file transport.h.

◆ VELOCITY_DEFAULT

#define VELOCITY_DEFAULT   90

Default velocity.

Definition at line 35 of file velocity.h.

◆ velocity_is_selected

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

Definition at line 29 of file velocity.h.

Typedef Documentation

◆ ChordTrackWidget

typedef struct _ChordTrackWidget ChordTrackWidget

Definition at line 28 of file chord_track.h.

◆ MarkerTrackWidget

typedef struct _MarkerTrackWidget MarkerTrackWidget

Definition at line 26 of file marker_track.h.

◆ TracksReadyCallback

typedef void(* TracksReadyCallback) (const FileImportInfo *, const GError *)

Called when track(s) are actually imported into the project.

Definition at line 1442 of file track.h.

Enumeration Type Documentation

◆ AudioBackend

enum AudioBackend

Definition at line 205 of file engine.h.

◆ AudioEngineBufferSize

Buffer sizes to be used in combo boxes.

Definition at line 154 of file engine.h.

◆ AudioEngineEventType

Audio engine event type.

Definition at line 130 of file engine.h.

◆ AudioEngineJackTransportType

enum AudioEngineJackTransportType

Definition at line 308 of file engine.h.

◆ AudioEngineSamplerate

Samplerates to be used in comboboxes.

Definition at line 182 of file engine.h.

◆ AudioFunctionType

Enumerator
AUDIO_FUNCTION_EXT_PROGRAM 

External program.

AUDIO_FUNCTION_GUILE_SCRIPT 

Guile script.

AUDIO_FUNCTION_CUSTOM_PLUGIN 

Custom plugin.

Definition at line 28 of file audio_function.h.

◆ AutomationFunctionType

enum AutomationFunctionType

Definition at line 27 of file automation_function.h.

◆ AutomationMode

enum AutomationMode

Definition at line 40 of file automation_track.h.

◆ AutomationRecordMode

enum AutomationRecordMode

Definition at line 48 of file automation_track.h.

◆ BalanceControlAlgorithm

See https://www.harmonycentral.com/articles/the-truth-about-panning-laws.

Enumerator
BALANCE_CONTROL_ALGORITHM_LINEAR 

Classic "Balance" mode.

Attennuates one channel only with no positive gain.

Examples: hard left: mute right channel, left channel untouched. mid left: attenuate right channel by (signal * pan - 0.5), left channel untouched.

Definition at line 23 of file balance_control.h.

◆ BeatUnit

enum BeatUnit

Beat unit.

Definition at line 39 of file tempo_track.h.

◆ BounceMode

enum BounceMode

Mode used when bouncing, either during exporting or when bouncing tracks or regions to audio.

Enumerator
BOUNCE_OFF 

Don't bounce.

BOUNCE_ON 

Bounce.

BOUNCE_INHERIT 

Bounce if parent is bouncing.

To be used on regions to bounce if their track is bouncing.

Definition at line 255 of file engine.h.

◆ BounceStep

enum BounceStep

Definition at line 119 of file exporter.h.

◆ ChannelSendTargetType

Target type.

Enumerator
CHANNEL_SEND_TARGET_TYPE_NONE 

Remove send.

CHANNEL_SEND_TARGET_TYPE_TRACK 

Send to track inputs.

CHANNEL_SEND_TARGET_TYPE_PLUGIN_SIDECHAIN 

Send to plugin sidechain inputs.

Definition at line 48 of file channel_send.h.

◆ ChordAccent

Chord accents.

Enumerator
CHORD_ACC_7 

b7 is 10 semitones from chord root, or 9 if the chord is diminished.

CHORD_ACC_j7 

Maj7 is 11 semitones from the root.

CHORD_ACC_b9 

13 semitones.

CHORD_ACC_9 

14 semitones.

CHORD_ACC_S9 

15 semitones.

CHORD_ACC_11 

17 semitones.

CHORD_ACC_b5_S11 

6 and 18 semitones.

CHORD_ACC_S5_b13 

8 and 16 semitones.

CHORD_ACC_6_13 

9 and 21 semitones.

Definition at line 89 of file chord_descriptor.h.

◆ ChordType

enum ChordType

Chord type.

Definition at line 62 of file chord_descriptor.h.

◆ CurveAlgorithm

The algorithm to use for curves.

See https://www.desmos.com/calculator/typjsyykvb

Enumerator
CURVE_ALGORITHM_EXPONENT 

y = x^n 0 < n <= 1, where the whole thing is tilting up and 0 is full tilt and 1 is straight line (when starting at lower point).

CURVE_ALGORITHM_SUPERELLIPSE 

y = 1 - (1 - x^n)^(1/n) 0 < n <= 1, where the whole thing is tilting up and 0 is full tilt and 1 is straight line (when starting at lower point).

See https://stackoverflow.com/questions/17623152/how-map-tween-a-number-based-on-a-dynamic-curve

CURVE_ALGORITHM_VITAL 

(e^(nx) - 1) / (e^n - 1) -10 <= n <= 10 where positive tilts down and negative tilts up (when starting at lower point).

See https://www.desmos.com/calculator/2dnuiptiqc.

Taken from Vital synth.

CURVE_ALGORITHM_PULSE 

Pulse (square).

CURVE_ALGORITHM_LOGARITHMIC 

a = log (n) b = 1 / (log (1 + (1 / n)))

smaller numbers tilt up

y1 = (log (x + n) - a) * b

smaller numbers tilt down

y2 = (a - log (x + n)) * b where 0 < n <= 10

See https://www.desmos.com/calculator/tdedahsdz8.

Taken from Ardour.

Definition at line 39 of file curve.h.

◆ ExportFormat

Export format.

Enumerator
EXPORT_FORMAT_RAW 

Raw audio data.

EXPORT_FORMAT_MIDI0 

MIDI type 0.

EXPORT_FORMAT_MIDI1 

MIDI type 1.

Definition at line 24 of file exporter.h.

◆ ExportMode

enum ExportMode

Export mode.

If this is anything other than EXPORT_MODE_FULL, the Track::bounce or ZRegion.bounce_mode should be set.

Enumerator
EXPORT_MODE_FULL 

Export everything within the range normally.

EXPORT_MODE_TRACKS 

Export selected tracks within the range only.

EXPORT_MODE_REGIONS 

Export selected regions within the range only.

Definition at line 93 of file exporter.h.

◆ ExportTimeRange

Time range to export.

Definition at line 67 of file exporter.h.

◆ ExtPortType

External port type.

Definition at line 56 of file ext_port.h.

◆ FaderType

enum FaderType

Fader type.

Enumerator
FADER_TYPE_MONITOR 

Audio fader for the monitor.

FADER_TYPE_SAMPLE_PROCESSOR 

Audio fader for the sample processor.

FADER_TYPE_AUDIO_CHANNEL 

Audio fader for Channel's.

FADER_TYPE_GENERIC 

For generic uses.

Definition at line 66 of file fader.h.

◆ GraphExportType

Export type.

Definition at line 26 of file graph_export.h.

◆ GraphNodeType

Graph nodes can be either ports or processors.

Processors can be plugins, faders, etc.

Enumerator
ROUTE_NODE_TYPE_PORT 

Port.

ROUTE_NODE_TYPE_PLUGIN 

Plugin processor.

ROUTE_NODE_TYPE_TRACK 

Track processor.

ROUTE_NODE_TYPE_FADER 

Fader/pan processor.

ROUTE_NODE_TYPE_MONITOR_FADER 

Fader/pan processor for monitor.

ROUTE_NODE_TYPE_PREFADER 

Pre-Fader passthrough processor.

ROUTE_NODE_TYPE_SAMPLE_PROCESSOR 

Sample processor.

ROUTE_NODE_TYPE_INITIAL_PROCESSOR 

Initial processor.

The initial processor is a dummy processor in the chain processed before anything else.

ROUTE_NODE_TYPE_HW_PROCESSOR 

Hardware processor.

ROUTE_NODE_TYPE_CHANNEL_SEND 

Channel send.

Definition at line 68 of file graph_node.h.

◆ MarkerType

enum MarkerType

Marker type.

Enumerator
MARKER_TYPE_START 

Song start Marker that cannot be deleted.

MARKER_TYPE_END 

Song end Marker that cannot be deleted.

MARKER_TYPE_CUSTOM 

Custom Marker.

Definition at line 35 of file marker.h.

◆ MeterAlgorithm

Enumerator
METER_ALGORITHM_AUTO 

Use default algorithm for the port.

METER_ALGORITHM_TRUE_PEAK 
Note
True peak is intensive, only use it where needed (mixer).

Definition at line 30 of file meter.h.

◆ MetronomeType

The type of the metronome sound.

Definition at line 30 of file metronome.h.

◆ MidiBackend

enum MidiBackend

Definition at line 272 of file engine.h.

◆ MidiFaderMode

Enumerator
MIDI_FADER_MODE_VEL_MULTIPLIER 

Multiply velocity of all MIDI note ons.

MIDI_FADER_MODE_CC_VOLUME 

Send CC volume event on change TODO.

Definition at line 95 of file fader.h.

◆ MidiFunctionType

enum MidiFunctionType

Definition at line 29 of file midi_function.h.

◆ MusicalNote

enum MusicalNote

Definition at line 28 of file chord_descriptor.h.

◆ MusicalScaleType

Scale type (name) eg Aeolian.

Enumerator
SCALE_CHROMATIC 

All keys.

SCALE_MINOR 

Natural minor.

SCALE_IONIAN 

Major (same as SCALE_MAJOR).

SCALE_AEOLIAN 

Natural minor (same as SCALE_MINOR).

SCALE_ACOUSTIC 

Lydian dominant.

Definition at line 32 of file scale.h.

◆ NoteLength

enum NoteLength

Definition at line 36 of file snap_grid.h.

◆ NoteLengthType

Enumerator
NOTE_LENGTH_LINK 

Link length with snap setting.

NOTE_LENGTH_LAST_OBJECT 

Use last created object's length.

NOTE_LENGTH_CUSTOM 

Custom length.

Definition at line 88 of file snap_grid.h.

◆ NoteType

enum NoteType
Enumerator
NOTE_TYPE_DOTTED 

2/3 of its original size

NOTE_TYPE_TRIPLET 

3/2 of its original size

Definition at line 65 of file snap_grid.h.

◆ PlayState

enum PlayState

Definition at line 80 of file transport.h.

◆ PortFlags

enum PortFlags

Port flags.

Enumerator
PORT_FLAG_SIDECHAIN 

See http://lv2plug.in/ns/ext/port-groups/port-groups.html#sideChainOf.

PORT_FLAG_MAIN_PORT 

See http://lv2plug.in/ns/ext/port-groups/port-groups.html#mainInput and http://lv2plug.in/ns/ext/port-groups/port-groups.html#mainOutput.

PORT_FLAG_AMPLITUDE 

Amplitude port.

PORT_FLAG_STEREO_BALANCE 

Port controls the stereo balance.

This is used in channels for the balance control.

PORT_FLAG_WANT_POSITION 

Whether the port wants to receive position events.

This is only applicable for LV2 Atom ports.

PORT_FLAG_TRIGGER 

Trigger ports will be set to 0 at the end of each cycle.

This mostly applies to LV2 Control Input ports.

PORT_FLAG_TOGGLE 

Whether the port is a toggle (on/off).

PORT_FLAG_INTEGER 

Whether the port is an integer.

PORT_FLAG_FREEWHEEL 

Whether port is for letting the plugin know that we are in freewheeling (export) mode.

PORT_FLAG_REPORTS_LATENCY 

Used for plugin ports.

PORT_FLAG_NOT_ON_GUI 

Port should not be visible to users.

PORT_FLAG_PLUGIN_ENABLED 

Port is a switch for plugin enabled.

PORT_FLAG_PLUGIN_CONTROL 

Port is a plugin control.

PORT_FLAG_FADER_MUTE 

Port is for fader mute.

PORT_FLAG_CHANNEL_FADER 

Port is for channel fader.

PORT_FLAG_AUTOMATABLE 

Port has an automation track.

If this is set, it is assumed that the automation track at PortIdentifier::port_index is for this port.

PORT_FLAG_MIDI_AUTOMATABLE 

MIDI automatable control, such as modwheel or pitch bend.

PORT_FLAG_SEND_RECEIVABLE 

Channels can send to this port (ie, this port is a track processor midi/stereo in or a plugin sidechain in).

PORT_FLAG_BPM 

This is a BPM port.

PORT_FLAG_GENERIC_PLUGIN_PORT 

Generic plugin port not belonging to the underlying plugin.

This is for ports that are added by Zrythm such as Enabled and Gain.

PORT_FLAG_PLUGIN_GAIN 

This is the plugin gain.

PORT_FLAG_TP_MONO 

Track processor input mono switch.

PORT_FLAG_TP_INPUT_GAIN 

Track processor input gain.

PORT_FLAG_HW 

Port is a hardware port.

PORT_FLAG_MODULATOR_MACRO 

Port is part of a modulator macro processor.

Which of the ports it is can be determined by checking flow/type.

PORT_FLAG_LOGARITHMIC 

Logarithmic.

PORT_FLAG_IS_PROPERTY 

Plugin control is a property (changes are set via atom message on the plugin's control port), as opposed to conventional float control ports.

An input Port is created for each parameter declared as either writable or readable (or both).

See also
http://lv2plug.in/ns/lv2core#Parameter.

Definition at line 158 of file port_identifier.h.

◆ PortFlags2

enum PortFlags2
Enumerator
PORT_FLAG2_TRANSPORT_ROLL 

Transport ports.

PORT_FLAG2_SUPPORTS_PATCH_MESSAGE 

LV2 control atom port supports patch messages.

PORT_FLAG2_ENUMERATION 

Port's only reasonable values are its scale points.

PORT_FLAG2_URI_PARAM 

Parameter port's value type is URI.

PORT_FLAG2_SEQUENCE 

Atom port buffer type is sequence.

PORT_FLAG2_SUPPORTS_MIDI 

Atom or event port supports MIDI.

PORT_FLAG2_TP_OUTPUT_GAIN 

Track processor output gain.

PORT_FLAG2_MIDI_PITCH_BEND 

MIDI pitch bend.

PORT_FLAG2_MIDI_POLY_KEY_PRESSURE 

MIDI poly key pressure.

PORT_FLAG2_MIDI_CHANNEL_PRESSURE 

MIDI channel pressure.

PORT_FLAG2_CHANNEL_SEND_ENABLED 

Channel send enabled.

PORT_FLAG2_CHANNEL_SEND_AMOUNT 

Channel send amount.

PORT_FLAG2_BEATS_PER_BAR 

Beats per bar.

PORT_FLAG2_BEAT_UNIT 

Beat unit.

PORT_FLAG2_FADER_SOLO 

Fader solo.

PORT_FLAG2_FADER_LISTEN 

Fader listen.

PORT_FLAG2_FADER_MONO_COMPAT 

Fader mono compat.

PORT_FLAG2_TRACK_RECORDING 

Track recording.

PORT_FLAG2_TP_MONITOR_AUDIO 

Track processor monitor audio.

PORT_FLAG2_PREFADER 

Port is owned by prefader.

PORT_FLAG2_POSTFADER 

Port is owned by postfader.

PORT_FLAG2_MONITOR_FADER 

Port is owned by monitor fader.

PORT_FLAG2_SAMPLE_PROCESSOR_FADER 

Port is owned by the sample processor fader.

PORT_FLAG2_SAMPLE_PROCESSOR_TRACK 

Port is owned by sample processor track/channel (including faders owned by those tracks/channels).

PORT_FLAG2_FADER_SWAP_PHASE 

Fader swap phase.

PORT_FLAG2_MIDI_CLOCK 

MIDI clock.

Definition at line 325 of file port_identifier.h.

◆ PortFlow

enum PortFlow

Direction of the signal.

Definition at line 38 of file port_identifier.h.

◆ PortInternalType

What the internal data is.

Enumerator
INTERNAL_LV2_PORT 

Pointer to Lv2Port.

INTERNAL_JACK_PORT 

Pointer to jack_port_t.

INTERNAL_PA_PORT 

TODO.

INTERNAL_ALSA_SEQ_PORT 

Pointer to snd_seq_port_info_t.

Definition at line 99 of file port.h.

◆ PortOwnerType

Type of owner.

Enumerator
PORT_OWNER_TYPE_PLUGIN 

Plugin owner.

PORT_OWNER_TYPE_TRACK 

Track owner.

PORT_OWNER_TYPE_CHANNEL 

Channel owner.

PORT_OWNER_TYPE_FADER 

Fader.

PORT_OWNER_TYPE_CHANNEL_SEND 

Channel send.

PortIdentifier.port_index will contain the send index on the port's track's channel.

PORT_OWNER_TYPE_HW 

Port is part of a HardwareProcessor.

PORT_OWNER_TYPE_TRANSPORT 

Port is owned by engine transport.

PORT_OWNER_TYPE_MODULATOR_MACRO_PROCESSOR 

Modulator macro processor owner.

Definition at line 104 of file port_identifier.h.

◆ PortType

enum PortType

Type of signals the Port handles.

Definition at line 54 of file port_identifier.h.

◆ PortUnit

enum PortUnit

Port unit to be displayed in the UI.

Enumerator
PORT_UNIT_MS 

Milliseconds.

PORT_UNIT_US 

Microseconds.

Definition at line 74 of file port_identifier.h.

◆ PrerollCountBars

enum PrerollCountBars

Definition at line 42 of file transport.h.

◆ RecordingEventType

Enumerator
RECORDING_EVENT_TYPE_MIDI 

These events are for processing any range.

RECORDING_EVENT_TYPE_PAUSE_TRACK_RECORDING 

These events are for temporarily stopping recording (eg, when outside the punch range or when looping).

The nframes must always be 0 for these events.

Definition at line 43 of file recording_event.h.

◆ RegionMusicalMode

Musical mode setting for audio regions.

Enumerator
REGION_MUSICAL_MODE_INHERIT 

Inherit from global musical mode setting.

REGION_MUSICAL_MODE_OFF 

Musical mode off - don't auto-stretch when BPM changes.

REGION_MUSICAL_MODE_ON 

Musical mode on - auto-stretch when BPM changes.

Definition at line 49 of file region.h.

◆ RegionType

enum RegionType

Type of Region.

Bitfield instead of plain enum so multiple values can be passed to some functions (eg to collect all Regions of the given types in a Track).

Definition at line 35 of file region_identifier.h.

◆ SnapGridType

Snap grid type.

Definition at line 109 of file snap_grid.h.

◆ StretcherBackend

Enumerator
STRETCHER_BACKEND_RUBBERBAND 

Lib rubberband.

STRETCHER_BACKEND_PAULSTRETCH 

Paulstretch.

STRETCHER_BACKEND_SBSMS 

SBSMS - Subband Sinusoidal Modeling Synthesis.

Definition at line 27 of file stretcher.h.

◆ TracklistPinOption

Used in track search functions.

Definition at line 43 of file tracklist.h.

◆ TrackType

enum TrackType

The Track's type.

Enumerator
TRACK_TYPE_INSTRUMENT 

Instrument tracks must have an Instrument plugin at the first slot and they produce audio output.

TRACK_TYPE_AUDIO 

Audio tracks can record and contain audio clips.

Other than that their channel strips are similar to buses.

TRACK_TYPE_MASTER 

The master track is a special type of group track.

TRACK_TYPE_CHORD 

The chord track contains chords that can be used to modify midi in real time or to color the piano roll.

TRACK_TYPE_MARKER 

Marker Track's contain named markers at specific Position's in the song.

TRACK_TYPE_TEMPO 

Special track for BPM (tempo) and time signature events.

TRACK_TYPE_MODULATOR 

Special track to contain global Modulator's.

TRACK_TYPE_AUDIO_BUS 

Buses are channels that receive audio input and have effects on their channel strip.

They are similar to Group Tracks, except that they cannot be routed to directly. Buses are used for send effects.

TRACK_TYPE_AUDIO_GROUP 

Group Tracks are used for grouping audio signals, for example routing multiple drum tracks to a "Drums" group track.

Like buses, they only contain effects but unlike buses they can be routed to.

TRACK_TYPE_MIDI 

Midi tracks can only have MIDI effects in the strip and produce MIDI output that can be routed to instrument channels or hardware.

TRACK_TYPE_MIDI_BUS 

Same with audio bus but for MIDI signals.

TRACK_TYPE_MIDI_GROUP 

Same with audio group but for MIDI signals.

TRACK_TYPE_FOLDER 

Foldable track used for visual grouping.

Definition at line 81 of file track.h.

◆ TransportDisplay

Corrseponts to "transport-display" in the gsettings.

Definition at line 92 of file transport.h.

◆ TransportRecordingMode

Recording mode for MIDI and audio.

In all cases, only objects created during the current recording cycle can be changed. Previous objects shall not be touched.

Enumerator
RECORDING_MODE_OVERWRITE_EVENTS 

Overwrite events in first recorded region.

In the case of MIDI, this will remove existing MIDI notes during recording.

In the case of audio, this will act exactly the same as RECORDING_MODE_TAKES_MUTED.

RECORDING_MODE_MERGE_EVENTS 

Merge events in existing region.

In the case of MIDI, this will append MIDI notes.

In the case of audio, this will act exactly the same as RECORDING_MODE_TAKES.

RECORDING_MODE_TAKES 

Events get put in new lanes each time recording starts/resumes (eg, when looping or entering/leaving the punch range).

RECORDING_MODE_TAKES_MUTED 

Same as RECORDING_MODE_TAKES, except previous takes (since recording started) are muted.

Definition at line 105 of file transport.h.

Function Documentation

◆ ACCESS_READ_ONLY()

WARN_UNUSED_RESULT HOT NONNULL ACCESS_READ_ONLY ( 1 ) const

Returns whether this is the thread that kicks off processing (thread that calls router_start_cycle()).

Returns if the current thread is a processing thread.

Definition at line 139 of file router.h.

◆ audio_clip_edit_in_ext_program()

NONNULL AudioClip * audio_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.

When the user closes the dialog, the clip is assumed to have been edited.

The given audio clip will be free'd.

Note
This must not be used on pool clips.
Returns
A new instance of AudioClip if successful, NULL, if not.

◆ audio_clip_get_path_in_pool()

NONNULL char * audio_clip_get_path_in_pool ( AudioClip * self,
bool is_backup )

Gets the path of the given clip from the pool.

Parameters
is_backupWhether writing to a backup project.

◆ audio_clip_get_path_in_pool_from_name()

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.

Parameters
use_flacWhether to look for a FLAC file instead of a wav file.
is_backupWhether writing to a backup project.

◆ audio_clip_is_in_use()

NONNULL bool audio_clip_is_in_use ( AudioClip * self,
bool check_undo_stack )

Returns whether the clip is used inside the project.

Parameters
check_undo_stackIf true, this checks both project regions and the undo stack. If false, this only checks actual project regions only.

◆ audio_clip_new_from_file()

AudioClip * audio_clip_new_from_file ( const char * full_path,
GError ** error )

Creates an audio clip from a file.

The name used is the basename of the file.

◆ audio_clip_new_from_float_array()

AudioClip * audio_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.

Parameters
arrInterleaved array.
nameA name for this clip.

◆ audio_clip_new_recording()

AudioClip * audio_clip_new_recording ( const channels_t channels,
const unsigned_frame_t nframes,
const char * name )

Create an audio clip while recording.

The frames will keep getting reallocated until the recording is finished.

Parameters
nframesNumber of frames to allocate. This should be the current cycle's frames when called during recording.

◆ audio_clip_remove_and_free()

NONNULL void audio_clip_remove_and_free ( AudioClip * self,
bool backup )

To be called by audio_pool_remove_clip().

Removes the file associated with the clip and frees the instance.

Parameters
backupWhether to remove from backup directory.

◆ audio_clip_update_channel_caches()

NONNULL void audio_clip_update_channel_caches ( AudioClip * self,
size_t start_from )

Updates the channel caches.

See AudioClip::ch_frames.

Parameters
start_fromFrames to start from (per channel. The previous frames will be kept.

◆ audio_clip_write_to_file()

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.

Parameters
partsIf true, only write new data.
See also
AudioClip.frames_written.
Returns
Whether successful.

◆ audio_clip_write_to_pool()

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.

Parameters
partsIf true, only write new data.
See also
AudioClip.frames_written.
Parameters
is_backupWhether writing to a backup project.
Returns
Whether successful.

◆ audio_function_apply()

bool audio_function_apply ( ArrangerSelections * sel,
AudioFunctionType type,
AudioFunctionOpts opts,
const char * uri,
GError ** error )

Applies the given action to the given selections.

This will save a file in the pool and store the pool ID in the selections.

Parameters
selSelections to edit.
typeFunction type. If invalid is passed, this will simply add the audio file in the pool for the unchanged audio material (used in audio selection actions for the selections before the change).
Returns
Whether successful.

◆ audio_function_get_detailed_action_for_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.

Parameters
base_actionBase action to use.

◆ audio_pool_add_clip()

int audio_pool_add_clip ( AudioPool * self,
AudioClip * clip )

Adds an audio clip to the pool.

Changes the name of the clip if another clip with the same name already exists.

Returns
The ID in the pool.

◆ audio_pool_duplicate_clip()

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.

Parameters
write_fileWhether to also write the file.
Returns
The ID in the pool, or -1 if an error occurred.

◆ audio_pool_ensure_unique_clip_name()

void audio_pool_ensure_unique_clip_name ( AudioPool * pool,
AudioClip * clip )

Ensures that the name of the clip is unique.

The clip must not be part of the pool yet.

If the clip name is not unique, it will be replaced by a unique name.

◆ audio_pool_reload_clip_frame_bufs()

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.

This should be called whenever there is a relevant change in the project (eg, object added/removed).

◆ audio_pool_remove_clip()

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).

Parameters
backupWhether to remove from backup directory.

◆ audio_pool_remove_unused()

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.

Parameters
backupWhether to remove from backup directory.

◆ audio_pool_write_to_disk()

bool audio_pool_write_to_disk ( AudioPool * self,
bool is_backup,
GError ** error )

Writes all the clips to disk.

Used when saving a project elsewhere.

Parameters
is_backupWhether this is a backup project.
Returns
Whether successful.

◆ audio_region_fill_stereo_ports()

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.

Note
The caller already splits calls to this function at each sub-loop inside the region, so region loop related logic is not needed.
Parameters
stereo_portsStereoPorts to fill.

◆ audio_region_fix_positions()

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.

Parameters
frames_per_tickFrames per tick used when validating audio regions. Passing 0 will use the value from the current engine.
Returns
Whether positions were adjusted.

◆ audio_region_free_members()

void audio_region_free_members ( ZRegion * self)

Frees members only but not the audio region itself.

Regions should be free'd using region_free.

◆ audio_region_new()

ZRegion * audio_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.

Parameters
pool_idThe pool ID. This is used when creating clone regions (non-main) and must be -1 when creating a new clip.
filenameFilename, if loading from file, otherwise NULL.
read_from_poolWhether to save the given filename or frames to pool and read the data from the pool. Only used if filename or frames is given.
framesFloat array, if loading from float array, otherwise NULL.
nframesNumber of frames per channel. Only used if frames is non-NULL.
clip_nameName of audio clip, if not loading from file.
bit_depthBit depth, if using frames.

◆ audio_region_replace_frames()

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.

Parameters
duplicate_clipWhether to duplicate the clip (eg, when other regions refer to it).
framesFrames, interleaved.
Returns
Whether successful.

◆ audio_region_validate()

bool audio_region_validate ( ZRegion * self,
double frames_per_tick )

Sanity checking.

Parameters
frames_per_tickFrames per tick used when validating audio regions. Passing 0 will use the value from the current engine.

◆ automation_function_apply()

int automation_function_apply ( ArrangerSelections * sel,
AutomationFunctionType type,
GError ** error )

Applies the given action to the given selections.

Parameters
selSelections to edit.
typeFunction type.

◆ automation_point_get_normalized_value_in_curve()

HOT double automation_point_get_normalized_value_in_curve ( AutomationPoint * self,
ZRegion * region,
double x )

The function to return a point on the curve.

See https://stackoverflow.com/questions/17623152/how-map-tween-a-number-based-on-a-dynamic-curve

Parameters
apThe start point (0, 0).
regionregion The automation region (if known), otherwise the non-cached region will be used.
xNormalized x.

◆ automation_point_set_fvalue()

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.

Parameters
is_normalizedWhether the given value is normalized.

◆ automation_region_free_members()

NONNULL void automation_region_free_members ( ZRegion * self)

Frees members only but not the ZRegion itself.

Regions should be free'd using region_free.

◆ automation_region_get_ap_around()

AutomationPoint * automation_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.

Parameters
before_onlyOnly check previous automation points.

◆ automation_region_get_next_ap()

HOT AutomationPoint * automation_region_get_next_ap ( ZRegion * self,
AutomationPoint * ap,
bool check_positions,
bool check_transients )

Returns the AutomationPoint after the given one.

Parameters
check_positionsCompare positions instead of just getting the next index.
check_transientsAlso check the transient of each object. This only matters if check_positions is true.

◆ automation_region_remove_ap()

void automation_region_remove_ap ( ZRegion * self,
AutomationPoint * ap,
bool freeing_region,
int free )

Removes the AutomationPoint from the ZRegion, optionally freeing it.

Parameters
freeFree the AutomationPoint after removing it.

◆ automation_track_add_region()

NONNULL void automation_track_add_region ( AutomationTrack * self,
ZRegion * region )

Adds an automation ZRegion to the AutomationTrack.

Note
This must not be used directly. Use track_add_region() instead.

◆ automation_track_find_from_port()

HOT AutomationTrack * automation_track_find_from_port ( Port * port,
Track * track,
bool basic_search )

Finds the AutomationTrack associated with port.

Parameters
trackThe track that owns the port, if known.

◆ automation_track_find_from_port_id()

NONNULL AutomationTrack * automation_track_find_from_port_id ( PortIdentifier * id,
bool basic_search )
Note
This is expensive and should only be used if PortIdentifier.at_idx is not set. Use port_get_automation_track() instead.
Parameters
basic_searchIf true, only basic port identifier members are checked.

◆ automation_track_get_ap_before_pos()

NONNULL AutomationPoint * automation_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.

Parameters
ends_afterWhether to only check in regions that also end after pos (ie, the region surrounds pos), otherwise check in the region that ends last.

◆ automation_track_get_region_before_pos()

ZRegion * automation_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.

Parameters
ends_afterWhether to only check for regions that also end after pos (ie, the region surrounds pos), otherwise get the region that ends last.

◆ automation_track_get_val_at_pos()

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.

If there is no automation point/curve during the position, it returns the current value of the parameter it is automating.

Parameters
normalizedWhether to return the value normalized.
ends_afterWhether to only check in regions that also end after pos (ie, the region surrounds pos), otherwise check in the region that ends last.
use_snapshotsWhether to get the value from the snapshotted (cached) regions. This should be set to true when called during dsp playback. TODO unimplemented

◆ automation_track_insert_region()

NONNULL void automation_track_insert_region ( AutomationTrack * self,
ZRegion * region,
int idx )

Inserts an automation ZRegion to the AutomationTrack at the given index.

Note
This must not be used directly. Use track_insert_region() instead.

◆ automation_track_should_be_recording()

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.

Returns false if in touch mode after the release time has passed.

This function assumes that the transport will be rolling.

Parameters
cur_timeCurrent time from g_get_monotonic_time() passed here to ensure the same timestamp is used in sequential calls.
record_apsIf set to true, this function will return whether we should be recording automation point data. If set to false, this function will return whether we should be recording a region (eg, if an automation point was already created before and we are still recording inside a region regardless of whether we should create/edit automation points or not.

◆ automation_track_should_read_automation()

HOT NONNULL bool automation_track_should_read_automation ( AutomationTrack * at,
gint64 cur_time )

Returns whether the automation in the automation track should be read.

Parameters
cur_timeCurrent time from g_get_monotonic_time() passed here to ensure the same timestamp is used in sequential calls.

◆ automation_track_update_positions()

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.

Updates each position in each child of the automation track recursively.

Parameters
from_ticksWhether to update the positions based on ticks (true) or frames (false).

◆ automation_tracklist_get_plugin_at()

AutomationTrack * automation_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.

Currently only used in mixer selections action.

◆ automation_tracklist_get_visible_at_after_delta()

AutomationTrack * automation_tracklist_get_visible_at_after_delta ( AutomationTracklist * self,
AutomationTrack * at,
int delta )

Returns the AutomationTrack after delta visible AutomationTrack's.

Negative delta searches backwards.

This function searches tracks only in the same Tracklist as the given one (ie, pinned or not).

◆ automation_tracklist_print_ats()

void automation_tracklist_print_ats ( AutomationTracklist * self)

Prints info about all the automation tracks.

Used for debugging.

◆ automation_tracklist_set_at_index()

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.

A special case is when Documentation == AutomationTracklist.num_ats. In this case, the given automation track is set last and all the other automation tracks are pushed upwards.

Parameters
push_downFalse to swap positions with the current AutomationTrack, or true to push down all the tracks below.

◆ automation_tracklist_update_positions()

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.

Parameters
from_ticksWhether to update the positions based on ticks (true) or frames (false).

◆ automation_tracklist_update_track_name_hash()

void automation_tracklist_update_track_name_hash ( AutomationTracklist * self,
Track * track )

Updates the Track position of the Automatable's and AutomationTrack's.

Parameters
trackThe Track to update to.

◆ automation_tracklist_validate()

NONNULL bool automation_tracklist_validate ( AutomationTracklist * self)

Verifies the identifiers on a live automation tracklist (in the project, not a clone).

Returns
True if pass.

◆ channel_add_plugin()

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.

The plugin must be already instantiated at this point.

Parameters
channelThe Channel.
posThe position in the strip starting from 0.
pluginThe plugin to add.
confirmConfirm if an existing plugin will be overwritten.
moving_pluginWhether or not we are moving the plugin.
gen_automatablesGeneratate plugin automatables. To be used when creating a new plugin only.
recalc_graphRecalculate mixer graph.
pub_eventsPublish events.
Returns
true if plugin added, false if not.

◆ channel_clone()

Channel * channel_clone ( Channel * ch,
Track * track,
GError ** error )

Clones the channel recursively.

Note
The given track is not cloned.
Parameters
errorTo be filled if an error occurred.
trackThe track to use for getting the name. @bool src_is_project Whether ch is a project channel.

◆ channel_connect()

void channel_connect ( Channel * ch)

Connects the channel's ports.

This should only be called on project tracks.

◆ channel_disconnect()

NONNULL void channel_disconnect ( Channel * channel,
bool remove_pl )

Disconnects the channel from the processing chain.

This should be called immediately when the channel is getting deleted, and channel_free should be designed to be called later after an arbitrary delay.

Parameters
remove_plRemove the Plugin from the Channel. Useful when deleting the channel.
recalc_graphRecalculate mixer graph.

◆ channel_free()

NONNULL void channel_free ( Channel * channel)

Frees the channel.

Note
Channels should never be free'd by themselves in normal circumstances. Use track_free() to free them.

◆ channel_handle_plugin_import()

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.

Parameters
plPassed when passing sel to be used for validation.
selPlugins to import.
copyWhether to copy instead of move, when copying plugins.
ask_if_overwriteWhether to ask for permission if the import overwrites existing plugins.

◆ channel_handle_recording()

NONNULL void channel_handle_recording ( Channel * self,
const long g_frames_start,
const nframes_t nframes )

Handles the recording logic inside the process cycle.

The MidiEvents are already dequeued at this point.

Parameters
g_frames_startGlobal start frames.
nframesNumber of frames to process.

◆ channel_prepare_process()

NONNULL void channel_prepare_process ( Channel * channel)

Prepares the channel for processing.

To be called before the main cycle each time on all channels.

◆ channel_process()

NONNULL void channel_process ( Channel * channel)

The process function prototype.

Channels must implement this. It is used to perform processing of the audio signal at every cycle.

Normally, the channel will call the process func on each of its plugins in order.

◆ channel_remove_plugin()

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.

FIXME this is the same as modulator_track_remove_modulator(). TODO refactor into track_remove_plugin().

Parameters
moving_pluginWhether or not we are moving the plugin.
deleting_pluginWhether or not we are deleting the plugin.
deleting_channelIf true, the automation tracks associated with the plugin are not deleted at this time.
recalc_graphRecalculate mixer graph.

◆ channel_send_connect_stereo()

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.

This function takes either stereo or both l and r.

◆ channel_send_connect_to_owner()

void channel_send_connect_to_owner ( ChannelSend * self)

Connects the ports to the owner track if not connected.

Only to be called on project sends.

◆ channel_send_get_target_sidechain()

NONNULL StereoPorts * channel_send_get_target_sidechain ( ChannelSend * self)

Gets the target sidechain port.

Returned StereoPorts instance must be free'd.

◆ channel_send_get_target_track()

Track * channel_send_get_target_track ( ChannelSend * self,
Track * owner )

Gets the target track.

Parameters
ownerThe owner track of the send (optional).

◆ chord_descriptor_chord_accent_to_string()

const char * chord_descriptor_chord_accent_to_string ( ChordAccent accent)

Returns the chord accent as a string (eg.

"j7").

◆ chord_descriptor_chord_type_to_string()

const char * chord_descriptor_chord_type_to_string ( ChordType type)

Returns the chord type as a string (eg.

"aug").

◆ chord_descriptor_is_key_bass()

bool chord_descriptor_is_key_bass ( ChordDescriptor * chord,
MusicalNote key )

Returns if key is the bass or root note of chord.

Parameters
keyA note inside a single octave (0-11).

◆ chord_descriptor_is_key_in_chord()

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.

Parameters
keyA note inside a single octave (0-11).

◆ chord_descriptor_note_to_string()

const char * chord_descriptor_note_to_string ( MusicalNote note)

Returns the musical note as a string (eg.

"C3").

◆ chord_descriptor_to_new_string()

char * chord_descriptor_to_new_string ( const ChordDescriptor * chord)

Returns the chord in human readable string.

MUST be free'd by caller.

◆ chord_region_free_members()

NONNULL void chord_region_free_members ( ZRegion * self)

Frees members only but not the ZRegion itself.

Regions should be free'd using region_free.

◆ chord_region_new()

NONNULL ZRegion * chord_region_new ( const Position * start_pos,
const Position * end_pos,
int idx )

Creates a new ZRegion for chords.

Parameters
idxIndex inside chord track.

◆ chord_region_remove_chord_object()

NONNULL void chord_region_remove_chord_object ( ZRegion * self,
ChordObject * chord,
int free,
bool fire_events )

Removes a ChordObject from the Region.

Parameters
freeOptionally free the ChordObject.

◆ chord_track_clear()

void chord_track_clear ( ChordTrack * self)

Removes all objects from the chord track.

Mainly used in testing.

◆ chord_track_init()

void chord_track_init ( Track * track)

Inits a chord track (e.g.

when cloning).

◆ control_port_get_val()

PURE float control_port_get_val ( Port * self)

Get the current real value of the control.

TODO "normalize" parameter.

◆ control_port_normalized_val_to_real()

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.

-10.0 to 100.0).

Note
This behaves differently from port_set_control_value() and port_get_control_value() and should be used in widgets.

◆ control_port_real_val_to_normalized()

NONNULL PURE float control_port_real_val_to_normalized ( const Port *const self,
float real_val )

Converts real value (eg.

-10.0 to 100.0) to normalized value (0.0 to 1.0).

Note
This behaves differently from port_set_control_value() and port_get_control_value() and should be used in widgets.

◆ control_port_set_val_from_normalized()

HOT NONNULL void control_port_set_val_from_normalized ( Port * self,
float val,
bool automating )

Updates the actual value.

The given value is always a normalized 0.0-1.0 value and must be translated to the actual value before setting it.

Parameters
automatingWhether this is from an automation event. This will set Lv2Port's automating field to true, which will cause the plugin to receive a UI event for this change.

◆ curve_get_normalized_y()

HOT NONNULL double curve_get_normalized_y ( double x,
CurveOptions * opts,
int start_higher )

Returns the Y value on a curve specified by algo.

Parameters
xX-coordinate, normalized.
optsCurve options.
start_higherStart at higher point.

◆ ditherer_process()

void ditherer_process ( Ditherer * self,
float * frames,
size_t n_frames,
channels_t channels )

Dither given audio.

Taken from tracktion_Ditherer.h.

Parameters
framesInterleaved frames.
n_framesNumber of frames per channel.
channelsNumber of channels.

◆ engine_activate()

COLD void engine_activate ( AudioEngine * self,
bool activate )

Activates the audio engine to start processing and receiving events.

Parameters
activateActivate or deactivate.

◆ engine_clone()

COLD NONNULL AudioEngine * engine_clone ( const AudioEngine * src)

Clones the audio engine.

To be used for serialization.

◆ engine_new()

COLD WARN_UNUSED_RESULT AudioEngine * engine_new ( Project * project)

Create a new audio engine.

This only initializes the engine and doe snot connect to the backend.

◆ engine_post_process()

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.

Parameters
roll_nframesFrames to roll (add to the playhead - if transport rolling).
nframesTotal frames for this processing cycle.

◆ engine_process()

NONNULL HOT int engine_process ( AudioEngine * self,
const nframes_t total_frames_to_process )

Processes current cycle.

To be called by each implementation in its callback.

◆ engine_process_events()

int engine_process_events ( AudioEngine * self)

GSourceFunc to be added using idle add.

This will loop indefinintely.

◆ engine_process_prepare()

NONNULL HOT bool engine_process_prepare ( AudioEngine * self,
nframes_t nframes )

To be called by each implementation to prepare the structures before processing.

Clears buffers, marks all as unprocessed, etc.

Returns
Whether the cycle should be skipped.

◆ engine_set_buffer_size()

void engine_set_buffer_size ( AudioEngine * self,
uint32_t buf_size )

Request the backend to set the buffer size.

The backend is expected to call the buffer size change callbacks.

See also
jack_set_buffer_size().

◆ engine_set_default_backends()

void engine_set_default_backends ( bool reset_to_dummy)

Detects the best backends on the system and sets them to GSettings.

Parameters
reset_to_dummyWhether to reset the backends to dummy before attempting to set defaults.

◆ engine_update_frames_per_tick()

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.

Parameters
thread_checkWhether to throw a warning if not called from GTK thread.
update_from_ticksWhether to update the positions based on ticks (true) or frames (false).
bpm_changeWhether this is a BPM change.

◆ engine_wait_for_pause()

void engine_wait_for_pause ( AudioEngine * self,
EngineState * state,
bool force_pause,
bool with_fadeout )
Parameters
force_pauseWhether to force transport pause, otherwise for engine to process and handle the pause request.

◆ engine_wait_n_cycles()

void engine_wait_n_cycles ( AudioEngine * self,
int n )

Waits for n processing cycles to finish.

Used during tests.

◆ export_settings_new()

ExportSettings * export_settings_new ( void )

Returns an instance of default ExportSettings.

It must be free'd with export_settings_free().

◆ export_settings_set_bounce_defaults()

void export_settings_set_bounce_defaults ( ExportSettings * self,
ExportFormat format,
const char * filepath,
const char * bounce_name )

Sets the defaults for bouncing.

Note
ExportSettings::mode must already be set at this point.
Parameters
filepathPath to bounce to. If NULL, this will generate a temporary filepath.
bounce_nameName used for the file if filepath is NULL.

◆ exporter_create_audio_track_after_bounce()

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.

Parameters
posPosition to place the audio region at.

◆ exporter_export()

int exporter_export ( ExportSettings * info)

Exports an audio file based on the given settings.

Returns
Non-zero if fail.

◆ exporter_generic_export_task_thread()

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.

To be used as a GTaskThreadFunc.

TODO.

◆ exporter_generic_export_thread()

void * exporter_generic_export_thread ( void * data)

Generic export thread to be used for simple exporting.

See bounce_dialog for an example.

To be used as a GThreadFunc.

◆ exporter_post_export()

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.

Parameters
connectionsThe array returned from exporter_prepare_tracks_for_export(). This function takes ownership of it and is responsible for freeing it.
engine_stateEngine state when export was started so that it can be re-set after exporting.

◆ exporter_prepare_tracks_for_export()

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.

Parameters
engine_stateEngine state when export was started so that it can be re-set after exporting.

◆ ext_port_activate()

int ext_port_activate ( ExtPort * self,
Port * port,
bool activate )

Activates the port (starts receiving data) or deactivates it.

Parameters
portPort to send the output to.
Returns
Non-zero if fail.

◆ ext_port_disconnect()

void ext_port_disconnect ( ExtPort * ext_port,
Port * port,
int src )

Disconnects the Port from the ExtPort.

Parameters
src1 if the ext_port is the source, 0 if it is the destination.

◆ ext_port_get_enabled()

bool ext_port_get_enabled ( ExtPort * self)

Checks in the GSettings whether this port is marked as enabled by the user.

Note
Not realtime safe.
Returns
Whether the port is enabled.

◆ ext_ports_get()

void ext_ports_get ( PortType type,
PortFlow flow,
bool hw,
GPtrArray * ports )

Collects external ports of the given type.

Parameters
flowThe signal flow. Note that this is inverse to what Zrythm sees. E.g., to get MIDI inputs like MIDI keyboards, pass FLOW_OUTPUT here.
hwHardware or not.

◆ fade_get_y_normalized()

double fade_get_y_normalized ( double x,
CurveOptions * opts,
int fade_in )

Gets the normalized Y for a normalized X.

Parameters
xNormalized x.
fade_in1 for in, 0 for out.

◆ fader_copy_values()

void fader_copy_values ( Fader * src,
Fader * dest )

Copy the fader values from source to dest.

Used when cloning channels.

◆ fader_new()

COLD Fader * fader_new ( FaderType type,
bool passthrough,
Track * track,
ControlRoom * control_room,
SampleProcessor * sample_processor )

Creates a new fader.

This assumes that the channel has no plugins.

Parameters
typeThe FaderType.
chChannel, if this is a channel Fader.

◆ fader_set_amp()

void fader_set_amp ( void * self,
float amp )

Sets the amplitude of the fader.

(0.0 to 2.0)

◆ fader_set_amp_with_action()

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.

Parameters
skip_if_equalWhether to skip the action if the amp hasn't changed.

◆ graph_export_as()

void graph_export_as ( Graph * graph,
GraphExportType type,
const char * path )

Exports the graph at the given path.

Engine must be paused before calling this.

◆ graph_node_get_name()

char * graph_node_get_name ( GraphNode * node)

Returns a human friendly name of the node.

Must be free'd.

◆ graph_node_get_single_playback_latency()

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.

It returns the plugin's latency if plugin, otherwise 0.

◆ graph_node_set_route_playback_latency()

void graph_node_set_route_playback_latency ( GraphNode * node,
nframes_t dest_latency )

Sets the playback latency of the given node recursively.

Used only when (re)creating the graph.

Parameters
dest_latencyThe total destination latency so far.

◆ graph_on_reached_terminal_node()

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.

The thread of the last terminal node that reaches here will inform the main-thread, wait, and kick off the next process cycle.

◆ graph_start()

int graph_start ( Graph * graph)

Starts as many threads as there are cores.

Returns
1 if graph started, 0 otherwise.

◆ graph_thread_new()

GraphThread * graph_thread_new ( const int id,
const bool is_main,
Graph * graph )

Creates a thread.

Parameters
idThe index of the thread.
graphThe graph to set to the thread.
is_main1 if main thread.

◆ graph_validate_with_connection()

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.

This is a low level function. Better used via ports_can_be_connected().

Note
The graph should be created before this call with graph_new() and free'd after this call with graph_free().
Returns
True if ok, false if invalid.

◆ hardware_processor_activate()

void hardware_processor_activate ( HardwareProcessor * self,
bool activate )

Starts or stops the ports.

Parameters
activateTrue to activate, false to deactivate

◆ hardware_processor_find_ext_port()

ExtPort * hardware_processor_find_ext_port ( HardwareProcessor * self,
const char * id )

Finds an ext port from its ID (type + full name).

See also
ext_port_get_id()

◆ hardware_processor_find_port()

Port * hardware_processor_find_port ( HardwareProcessor * self,
const char * id )

Finds a port from its ID (type + full name).

See also
ext_port_get_id()

◆ hardware_processor_rescan_ext_ports()

bool hardware_processor_rescan_ext_ports ( HardwareProcessor * self)

Rescans the hardware ports and appends any missing ones.

Note
This is a GSource callback.

◆ hardware_processor_setup()

int hardware_processor_setup ( HardwareProcessor * self)

Sets up the ports but does not start them.

Returns
Non-zero on fail.

◆ marker_track_clear()

void marker_track_clear ( MarkerTrack * self)

Removes all objects from the marker track.

Mainly used in testing.

◆ meter_get_value()

void meter_get_value ( Meter * self,
AudioValueFormat format,
float * val,
float * max )

Get the current meter value.

This should only be called once in a draw cycle.

◆ metronome_queue_events()

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.

Parameters
loffsetLocal offset in this cycle.

◆ midi_ctrl_change_get_ch_and_description()

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.

Returns
The MIDI channel

◆ midi_events_add_cc_volume()

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.

TODO

◆ midi_events_add_control_change()

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.

Parameters
channelMIDI channel starting from 1.
queuedAdd to queued events instead.

◆ midi_events_add_event_from_buf()

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.

This must be a full 3-byte message. If in 'running status' mode, the caller is responsible for prepending the status byte.

◆ midi_events_add_note_off()

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.

Parameters
channelMIDI channel starting from 1.
queuedAdd to queued events instead.

◆ midi_events_add_note_on()

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.

Parameters
channelMIDI channel starting from 1.
queuedAdd to queued events instead.

◆ midi_events_add_pitchbend()

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.

Parameters
channelMIDI channel starting from 1.
pitchbend0 to 16384.
queuedAdd to queued events instead.

◆ midi_events_add_song_pos()

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.

Parameters
total_sixteenthsTotal sixteenths.

◆ midi_events_append()

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.

Parameters
queuedAppend queued events instead of main events.
local_offsetThe start frame offset from 0 in this cycle.
nframesNumber of frames to process.

◆ midi_events_append_w_filter()

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.

Parameters
queuedAppend queued events instead of main events.
channelsAllowed channels (array of 16 booleans).
start_frameThe start frame offset from 0 in this cycle.
nframesNumber of frames to process.

◆ midi_events_clear()

void midi_events_clear ( MidiEvents * midi_events,
int queued )

Clears midi events.

Parameters
queuedClear queued events instead.

◆ midi_events_clear_duplicates()

void midi_events_clear_duplicates ( MidiEvents * midi_events,
const int queued )

Clears duplicates.

Parameters
queuedClear duplicates from queued events instead.

◆ midi_events_has_note_on()

int midi_events_has_note_on ( MidiEvents * self,
int check_main,
int check_queued )

Returrns if the MidiEvents have any note on events.

Parameters
check_mainCheck the main events.
check_queuedCheck the queued events.

◆ midi_events_panic_all()

void midi_events_panic_all ( const bool queued)

Queues MIDI note off to event queues.

Parameters
queuedSend the event to queues instead of main events.

◆ midi_events_transform_chord_and_append()

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.

Only C0~B0 are considered.

◆ midi_function_apply()

int midi_function_apply ( ArrangerSelections * sel,
MidiFunctionType type,
MidiFunctionOpts opts,
GError ** error )

Applies the given action to the given selections.

Parameters
selSelections to edit.
typeFunction type.

◆ midi_get_bytes_from_combined()

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.

Parameters
lsbFirst byte (pos 1).
msbSecond byte (pos 2).

◆ midi_mappings_apply_from_cc_events()

void midi_mappings_apply_from_cc_events ( MidiMappings * self,
MidiEvents * events,
bool queued )

Applies the events to the appropriate mapping.

This is used only for TrackProcessor.cc_mappings.

Note
Must only be called while transport is recording.

◆ midi_mappings_bind_at()

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.

Parameters
idxIndex to insert at.
bufThe buffer used for matching at [0] and [1].
device_portDevice port, if custom mapping.

◆ midi_mappings_get_for_port()

int midi_mappings_get_for_port ( MidiMappings * self,
Port * dest_port,
GPtrArray * arr )

Get MIDI mappings for the given port.

Parameters
arrOptional array to fill with the mappings.
Returns
The number of results.

◆ midi_mappings_unbind()

void midi_mappings_unbind ( MidiMappings * self,
int idx,
bool fire_events )

Unbinds the given binding.

Note
This must be called inside a port operation lock, such as inside an undoable action.

◆ midi_note_get_global_start_pos()

void midi_note_get_global_start_pos ( MidiNote * self,
Position * pos )

Gets the global Position of the MidiNote's start_pos.

Parameters
posPosition to fill in.

◆ midi_note_get_val_as_string()

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").

Parameters
use_markupUse markup to show the octave as a superscript.

◆ midi_note_listen()

void midi_note_listen ( MidiNote * mn,
bool listen )

Listen to the given MidiNote.

Parameters
listenTurn note on if 1, or turn it off if 0.

◆ midi_note_notes_to_events()

void midi_note_notes_to_events ( MidiNote ** midi_notes,
int num_notes,
Position * pos,
MidiEvents * events )

Converts an array of MIDI notes to MidiEvents.

Parameters
midi_notesArray of MidiNote's.
num_notesNumber of notes in array.
posPosition to offset time from.
eventsPreallocated struct to fill.

◆ midi_note_shift_pitch()

void midi_note_shift_pitch ( MidiNote * self,
const int delta )

Shifts MidiNote's position and/or value.

Parameters
deltaY (0-127)

◆ midi_region_add_events()

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.

Parameters
add_region_startAdd the region start offset to the positions.
export_fullTraverse loops and export the MIDI file as it would be played inside Zrythm. If this is 0, only the original region (from true start to true end) is exported.
startEvents before this (global) position will be skipped.
endEvents after this (global) position will be skipped.

◆ midi_region_export_to_midi_file()

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.

Parameters
full_pathAbsolute path to the MIDI file.
export_fullTraverse loops and export the MIDI file as it would be played inside Zrythm. If this is 0, only the original region (from true start to true end) is exported.

◆ midi_region_fill_midi_events()

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.

The events are dequeued right after the call to this function.

Note
The caller already splits calls to this function at each sub-loop inside the region, so region loop related logic is not needed.
Parameters
note_off_at_endWhether a note off should be added at the end frame (eg, when the caller knows there is a region loop or the region ends).
is_note_off_for_loop_or_region_endWhether note_off_at_end is for a region loop end or the region's end (in this case normal note offs will be sent, otherwise a single ALL NOTES OFF event will be sent).
midi_eventsMidiEvents to fill (from Piano Roll Port for example).

◆ midi_region_free_members()

void midi_region_free_members ( ZRegion * self)

Frees members only but not the midi region itself.

Regions should be free'd using region_free().

◆ midi_region_get_velocities_in_range()

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.

Parameters
insideWhether to find velocities inside the range (1) or outside (0).

◆ midi_region_insert_midi_note()

void midi_region_insert_midi_note ( ZRegion * region,
MidiNote * midi_note,
int idx,
int pub_events )

Inserts the MidiNote to the given ZRegion.

Parameters
idxIndex to insert at.
pub_eventsPublish UI events or not.

◆ midi_region_new_from_chord_descr()

ZRegion * midi_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.

Default size will be timeline snap and default notes size will be editor snap.

◆ midi_region_new_from_midi_file()

ZRegion * midi_region_new_from_midi_file ( const Position * start_pos,
const char * abs_path,
unsigned int track_name_hash,
int lane_pos,
int idx_inside_lane,
int idx )

Creates a MIDI region from the given MIDI file path, starting at the given Position.

Parameters
idxThe index of this track, starting from 0. This will be sequential, ie, if idx 1 is requested and the MIDI file only has tracks 5 and 7, it will use track 7.

◆ midi_region_pop_unended_note()

MidiNote * midi_region_pop_unended_note ( ZRegion * self,
int pitch )

Returns the midi note with the given pitch from the unended notes.

Used when recording.

Parameters
pitchThe pitch. If -1, it returns any unended note. This is useful when the loop point is met and we want to end them all.

◆ midi_region_print_midi_notes()

void midi_region_print_midi_notes ( ZRegion * self)

Prints the MidiNotes in the Region.

Used for debugging.

◆ midi_region_remove_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.

Parameters
freeAlso free the MidiNote.
pub_eventPublish an event.

◆ midi_region_start_unended_note()

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.

Parameters
end_posIf this is NULL, it will be set to 1 tick after the start_pos.

◆ midi_region_write_to_midi_file()

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.

This must only be called when exporting single regions.

Parameters
add_region_startAdd the region start offset to the positions.
export_fullTraverse loops and export the MIDI file as it would be played inside Zrythm. If this is 0, only the original region (from true start to true end) is exported.
lanes_as_tracksExport lanes as separate tracks (only possible with MIDI type 1). This will calculate a unique MIDI track number for the region's lane.
use_track_or_lane_posWhether to use the track/lane position in the MIDI data. The MIDI track will be set to 1 if false.

◆ midi_track_fill_midi_events()

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.

The events are dequeued right after the call to this function.

Note
The engine splits the cycle so transport loop related logic is not needed.

Caveats:

  • This will not work properly if the loop sizes (region or transport) are smaller than nframes, so small sizes should not be allowed.
Parameters
g_start_framesGlobal start frame.
local_start_frameThe start frame offset from 0 in this cycle.
nframesNumber of frames at start Position.
midi_eventsMidiEvents to fill (from Piano Roll Port for example).

◆ midi_track_free()

void midi_track_free ( Track * track)

Frees the track.

TODO

◆ modulator_track_insert_modulator()

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.

Parameters
replace_modeWhether to perform the operation in replace mode (replace current modulator if true, not touching other modulators, or push other modulators forward if false).

◆ modulator_track_remove_modulator()

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.

Parameters
replacingWhether replacing the modulator. If this is false, modulators after this slot will be pushed back.
deleting_modulator
deleting_trackIf true, the automation tracks associated with the plugin are not deleted at this time.
recalc_graphRecalculate mixer graph.

◆ musical_scale_as_string()

char * musical_scale_as_string ( MusicalScale * scale)

Returns the scale in human readable string.

MUST be free'd by caller.

◆ musical_scale_contains_note()

bool musical_scale_contains_note ( const MusicalScale * scale,
MusicalNote note )

Returns if the given key is in the given MusicalScale.

Parameters
noteA note inside a single octave (0-11).

◆ musical_scale_get_notes()

const bool * musical_scale_get_notes ( MusicalScaleType scale_type,
bool ascending )

Returns the notes in the given scale.

Parameters
ascendingWhether to get the notes when ascending or descending (some scales have different notes when rising/falling).

◆ musical_scale_get_triad_types()

RETURNS_NONNULL const ChordType * musical_scale_get_triad_types ( MusicalScaleType scale_type,
bool ascending )

Returns the triads in the given scale.

There will be as many chords are enabled notes in the scale, and the rest of the array will be filled with CHORD_TYPE_NONE.

Parameters
ascendingWhether to get the triads when ascending or descending (some scales have different triads when rising/falling).

◆ musical_scale_to_string()

char * musical_scale_to_string ( const MusicalScale *const self)

Prints the MusicalScale to a string.

MUST be free'd.

◆ NONNULL_ARGS()

COLD NONNULL_ARGS ( 1 )

Inits a loaded AutomationTracklist.

Initializes the tracklist when loading a project.

Inits a TrackProcessor after a project is loaded.

Clones the track and returns the clone.

Inits fader after a project is loaded.

Inits the ExtPort after loading a project.

Inits the control room from a project.

Parameters
errorTo be filled if an error occurred.

◆ port_allocate_bufs()

NONNULL void port_allocate_bufs ( Port * self)

Allocates buffers used during DSP.

To be called only where necessary to save RAM.

◆ port_apply_pan()

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.

Parameters
start_frameThe start frame offset from 0 in this cycle.
nframesThe number of frames to process.

◆ port_connections_manager_ensure_connect()

const PortConnection * port_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.

Returns
The connection.

◆ port_connections_manager_ensure_disconnect()

bool port_connections_manager_ensure_disconnect ( PortConnectionsManager * self,
const PortIdentifier * src,
const PortIdentifier * dest )

Removes the connection for the given ports if it exists.

Returns
Whether a connection was removed.

◆ port_connections_manager_find()

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).

Parameters
arrOptional array to fill.
Returns
The number of connections found.

◆ port_connections_manager_get_source_or_dest()

PortConnection * port_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.

It is a programming error to call this for ports that are not expected to have exactly 1 matching connection.

◆ port_connections_manager_get_sources_or_dests()

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.

The returned instances of PortConnection are owned by self and must not be free'd.

Parameters
idThe identifier of the port to look for.
arrOptional array to fill.
sourcesTrue to look for sources, false for destinations.
Returns
The number of ports found.

◆ port_connections_manager_get_unlocked_sources_or_dests()

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.

The returned instances of PortConnection are owned by self and must not be free'd.

Parameters
idThe identifier of the port to look for.
arrOptional array to fill.
sourcesTrue to look for sources, false for destinations.
Returns
The number of ports found.

◆ port_connections_manager_regenerate_hashtables()

void port_connections_manager_regenerate_hashtables ( PortConnectionsManager * self)

Regenerates the hash tables.

Must be called when a change is made in the connections.

◆ port_connections_manager_reset()

void port_connections_manager_reset ( PortConnectionsManager * self,
const PortConnectionsManager * src )

Removes all connections from self.

Parameters
srcIf non-NULL, the connections are copied from this to self.

◆ port_copy_metadata_from_project()

NONNULL void port_copy_metadata_from_project ( Port * self,
Port * project_port )

Copies the metadata from a project port to the given port.

Used when doing delete actions so that ports can be restored on undo.

◆ port_copy_values()

NONNULL void port_copy_values ( Port * self,
const Port * other )

Copies the port values from other to self.

Parameters
self
other

◆ port_free_bufs()

NONNULL void port_free_bufs ( Port * self)

Frees buffers.

To be used when removing ports from the project/graph.

◆ port_get_control_value()

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.

Parameters
normalizeWhether to get the value normalized or not.

◆ port_get_value_from_symbol()

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.

Used when saving the LV2 state. This function MUST set size and type appropriately.

◆ port_identifier_copy()

NONNULL void port_identifier_copy ( PortIdentifier * dest,
const PortIdentifier * src )

Copy the identifier content from src to dest.

Note
This frees/allocates memory on dest.

◆ port_identifier_is_equal()

WARN_UNUSED_RESULT NONNULL bool port_identifier_is_equal ( const PortIdentifier * src,
const PortIdentifier * dest )

Returns if the 2 PortIdentifier's are equal.

Note
Does not check insignificant data like comment.

◆ port_init_loaded()

NONNULL void port_init_loaded ( Port * self,
void * owner )

This function finds the Ports corresponding to the PortIdentifiers for srcs and dests.

Should be called after the ports are loaded from yml.

◆ port_process()

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.

Parameters
norollClear the port buffer in this range.

◆ port_restore_from_non_project()

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.

This restores src/dest connections and the control value.

Parameters
selfProject port.
non_projectNon-project port.

◆ port_set_control_value()

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.

Note: this is only for setting the base values (eg when automating via an automation lane). For CV automations this should not be used.

Parameters
is_normalizedWhether the given value is normalized between 0 and 1.
forward_eventWhether to forward a port control change event to the plugin UI. Only applicable for plugin control ports. If the control is being changed manually or from within Zrythm, this should be true to notify the plugin of the change.

◆ port_set_expose_to_backend()

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.

It checks what the backend is using the engine's audio backend or midi backend settings.

◆ port_update_identifier()

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.

Parameters
prev_idPrevious identifier to be used for searching.
trackThe track that owns this port.
update_automation_trackWhether to update the identifier in the corresponding automation track as well. This should be false when moving a plugin.

◆ port_update_track_name_hash()

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.

Parameters
trackOwner track.
hashThe new hash.

◆ position_change_sign()

NONNULL void position_change_sign ( Position * pos)

Changes the sign of the position.

For example, 4.2.1.21 would become -4.2.1.21.

◆ position_get_bars()

NONNULL int position_get_bars ( const Position * pos,
bool start_at_one )

Gets the bars of the position.

Ie, if the position is equivalent to 4.1.2.42, this will return 4.

Parameters
start_at_oneStart at 1 or -1 instead of 0.

◆ position_get_beats()

NONNULL int position_get_beats ( const Position * pos,
bool start_at_one )

Gets the beats of the position.

Ie, if the position is equivalent to 4.1.2.42, this will return 1.

Parameters
start_at_oneStart at 1 or -1 instead of 0.

◆ position_get_frames_from_ticks()

signed_frame_t position_get_frames_from_ticks ( double ticks,
double frames_per_tick )

Converts ticks to frames.

Parameters
frames_per_tickIf zero, AudioEngine.frames_per_tick will be used instead.

◆ position_get_midway_pos()

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.

Parameters
posPosition to set to.

◆ position_get_sixteenths()

NONNULL int position_get_sixteenths ( const Position * pos,
bool start_at_one )

Gets the sixteenths of the position.

Ie, if the position is equivalent to 4.1.2.42, this will return 2.

Parameters
start_at_oneStart at 1 or -1 instead of 0.

◆ position_get_ticks()

NONNULL double position_get_ticks ( const Position * pos)

Gets the ticks of the position.

Ie, if the position is equivalent to 4.1.2.42, this will return 42.

◆ position_get_ticks_diff()

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).

Parameters
end_posEnd position.
start_posStart Position.
sgSnapGrid to snap with, or NULL to not snap.

◆ position_get_total_bars()

NONNULL int position_get_total_bars ( const Position * pos,
bool include_current )

Returns the total number of beats.

Parameters
include_currentWhether to count the current beat if it is at the beat start.

◆ position_get_total_beats()

NONNULL int position_get_total_beats ( const Position * pos,
bool include_current )

Returns the total number of beats.

Parameters
include_currentWhether to count the current beat if it is at the beat start.

◆ position_parse()

NONNULL WARN_UNUSED_RESULT bool position_parse ( Position * pos,
const char * str )

Parses a position from the given string.

Returns
Whether successful.

◆ position_set_min_size()

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.

FIXME rename to something more meaningful.

Parameters
start_posStart Position.
end_posEnd Position.
snapSnapGrid.

◆ position_snap()

void position_snap ( const Position * start_pos,
Position * pos,
Track * track,
ZRegion * region,
const SnapGrid * sg )

Snaps position using given options.

Parameters
start_posThe previous position (ie, the position the drag started at. This is only used when the "keep offset" setting is on.
posPosition to edit.
trackTrack, used when moving things in the timeline. If keep offset is on and this is passed, the objects in the track will be taken into account. If keep offset is on and this is NULL, all applicable objects will be taken into account. Not used if keep offset is off.
regionRegion, used when moving things in the editor. Same behavior as track.
sgSnapGrid options.

◆ position_to_string_alloc()

NONNULL char * position_to_string_alloc ( const Position * pos)

Creates a string in the form of "0.0.0.0" from the given position.

Must be free'd by caller.

◆ position_update_frames_from_ticks()

HOT NONNULL void position_update_frames_from_ticks ( Position * self,
double frames_per_tick )

Updates frames.

Parameters
frames_per_tickIf zero, AudioEngine.frames_per_tick will be used instead.

◆ position_update_ticks_from_frames()

HOT NONNULL void position_update_ticks_from_frames ( Position * position,
double ticks_per_frame )

Updates ticks.

Parameters
ticks_per_frameIf zero, AudioEngine.ticks_per_frame will be used instead.

◆ quantize_options_quantize_position()

double quantize_options_quantize_position ( QuantizeOptions * self,
Position * pos )

Quantizes the given Position using the given QuantizeOptions.

This assumes that the start/end check has been done already and it ignores the adjust_start and adjust_end options.

Returns
The amount of ticks moved (negative for backwards).

◆ quantize_options_stringize()

char * quantize_options_stringize ( NoteLength note_length,
NoteType note_type )

Returns the grid intensity as a human-readable string.

Must be free'd.

◆ recording_manager_handle_recording()

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.

The MidiEvents are already dequeued at this point.

Parameters
g_frames_startGlobal start frames.
nframesNumber of frames to process. If this is zero, a pause will be added. See RECORDING_EVENT_TYPE_PAUSE_TRACK_RECORDING and RECORDING_EVENT_TYPE_PAUSE_AUTOMATION_RECORDING.

◆ recording_manager_new()

RecordingManager * recording_manager_new ( void )

Creates the event queue and starts the event loop.

Must be called from a GTK thread.

◆ recording_manager_process_events()

int recording_manager_process_events ( RecordingManager * self)

GSourceFunc to be added using idle add.

This will loop indefinintely.

It can also be called to process the events immediately. Should only be called from the GTK thread.

◆ region_at_position()

PURE ZRegion * region_at_position ( const Track * track,
const AutomationTrack * at,
const Position * pos )

Returns the region at the given position in the given Track.

Parameters
atThe automation track to look in.
trackThe track to look in, if at is NULL.
posThe position.

◆ region_copy()

void region_copy ( ZRegion * src,
ZRegion * dest )

Copies the data from src to dest.

Used when doing/undoing changes in name, clip start point, loop start point, etc.

◆ region_disconnect()

void region_disconnect ( ZRegion * self)

Disconnects the region and anything using it.

Does not free the ZRegion or its children's resources.

◆ region_find_midi_note()

MidiNote * region_find_midi_note ( ZRegion * r,
MidiNote * _mn )

Returns the MidiNote matching the properties of the given MidiNote.

Used to find the actual MidiNote in the region from a cloned MidiNote (e.g. when doing/undoing).

◆ region_generate_filename()

char * region_generate_filename ( ZRegion * region)

Generates the filename for this region.

MUST be free'd.

◆ region_get_frames_till_next_loop_or_end()

NONNULL void 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.

Parameters
[in]timeline_framesGlobal frames at start.
[out]ret_framesReturn frames.
[out]is_loopWhether the return frames are for a loop (if false, the return frames are for the region's end).

◆ region_get_musical_mode()

bool region_get_musical_mode ( ZRegion * self)

Returns whether the region is effectively in musical mode.

Note
Only applicable to audio regions.

◆ region_is_hit()

NONNULL PURE int region_is_hit ( const ZRegion * region,
const signed_frame_t gframes,
const bool inclusive )

Returns if the position is inside the region or not.

FIXME move to arranger object

Parameters
gframesGlobal position in frames.
inclusiveWhether the last frame should be counted as part of the region.

◆ region_is_hit_by_range()

int 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.

FIXME move to arranger object

◆ region_link_group_remove_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.

Parameters
autoremove_last_region_and_groupAutomatically remove the last region left in the group, and the group itself when empty.

◆ region_link_group_update()

NONNULL void region_link_group_update ( RegionLinkGroup * self,
ZRegion * region )

Updates all other regions in the link group.

Parameters
regionThe region where the change happened.

◆ region_move_to_track()

void 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.

Assumes that the ZRegion is already in a TrackLane or AutomationTrack.

Parameters
lane_or_at_indexIf MIDI or audio, lane position. If automation, automation track index in the automation tracklist. If -1, the track lane or automation track index will be inferred from the region.
indexIf MIDI or audio, index in lane in the new track to insert the region to, or -1 to append. If automation, index in the automation track.

◆ region_set_link_group()

void region_set_link_group ( ZRegion * region,
int group_idx,
bool update_identifier )

Sets the link group to the region.

Parameters
group_idxIf -1, the region will be removed from its current link group, if any.

◆ region_stretch()

NONNULL WARN_UNUSED_RESULT bool region_stretch ( ZRegion * self,
double ratio,
GError ** error )

Stretch the region's contents.

This should be called right after changing the region's size.

Parameters
ratioThe ratio to stretch by.
Returns
Whether successful.

◆ region_timeline_frames_to_local()

NONNULL HOT signed_frame_t 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).

If normalize is 1 it will only return a position from 0 to loop_end (it will traverse the loops to find the appropriate position), otherwise it may exceed loop_end.

Parameters
timeline_framesTimeline position in frames.
Returns
The local frames.

◆ region_validate()

bool region_validate ( ZRegion * self,
bool is_project,
double frames_per_tick )

Sanity checking.

Parameters
frames_per_tickFrames per tick used when validating audio regions. Passing 0 will use the value from the current engine.

◆ router_queue_control_port_change()

NONNULL void router_queue_control_port_change ( Router * self,
const ControlPortChange * change )

Queues a control port change to be applied when processing starts.

Currently only applies to BPM/time signature changes.

◆ router_recalc_graph()

void router_recalc_graph ( Router * self,
bool soft )

Recalculates the process acyclic directed graph.

Parameters
softIf true, only readjusts latencies.

◆ sample_processor_process()

void sample_processor_process ( SampleProcessor * self,
const nframes_t offset,
const nframes_t nframes )

Process the samples for the given number of frames.

Parameters
offsetThe local offset in the processing cycle.
nframesThe number of frames to process in this call.

◆ sample_processor_queue_metronome()

void sample_processor_queue_metronome ( SampleProcessor * self,
MetronomeType type,
nframes_t offset )

Queues a metronomem tick at the given local offset.

Realtime function.

◆ sample_processor_queue_metronome_countin()

void sample_processor_queue_metronome_countin ( SampleProcessor * self)

Queues a metronomem tick at the given offset.

Used for countin.

◆ snap_grid_get_nearby_snap_point()

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.

Must not be free'd.

Parameters
selfSnap grid to search in.
posPosition to search for.
return_prev1 to return the previous element or 0 to return the next.
Returns
Whether successful.

◆ snap_grid_stringize()

char * snap_grid_stringize ( SnapGrid * self)

Returns the grid intensity as a human-readable string.

Must be free'd.

◆ snap_grid_stringize_length_and_type()

char * snap_grid_stringize_length_and_type ( NoteLength note_length,
NoteType note_type )

Returns the grid intensity as a human-readable string.

Must be free'd.

◆ stereo_ports_connect()

NONNULL void stereo_ports_connect ( StereoPorts * src,
StereoPorts * dest,
int locked )

Connects the internal ports using port_connect().

Parameters
lockedLock the connection.
Returns
Non-zero if error.

◆ stereo_ports_new_generic()

StereoPorts * stereo_ports_new_generic ( int in,
const char * name,
const char * symbol,
PortOwnerType owner_type,
void * owner )

Creates stereo ports for generic use.

Parameters
in1 for in, 0 for out.
ownerPointer to the owner. The type is determined by owner_type.

◆ stretcher_new_rubberband()

Stretcher * stretcher_new_rubberband ( unsigned int samplerate,
unsigned int channels,
double time_ratio,
double pitch_ratio,
bool realtime )

Create a new Stretcher using the rubberband backend.

Parameters
samplerateThe new samplerate.
time_ratioThe ratio to multiply time by (eg if the BPM is doubled, this will be 0.5).
pitch_ratioThe ratio to pitch by. This will normally be 1.0 when time-stretching).
realtimeWhether to perform realtime stretching (lower quality but fast enough to be used real-time).

◆ stretcher_stretch()

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.

Parameters
in_samples_lThe left samples.
in_samples_rThe right channel samples. If this is NULL, the audio is assumed to be mono.
in_samples_sizeThe number of input samples per channel.
Returns
The number of output samples generated per channel.

◆ stretcher_stretch_interleaved()

ssize_t stretcher_stretch_interleaved ( Stretcher * self,
float * in_samples,
size_t in_samples_size,
float ** _out_samples )

Perform stretching.

Note
Not real-time safe, does allocations.
Parameters
in_samples_sizeThe number of input samples per channel.
Returns
The number of output samples generated per channel.

◆ tempo_track_clear()

void tempo_track_clear ( Track * self)

Removes all objects from the tempo track.

Mainly used in testing.

◆ tempo_track_set_bpm()

void tempo_track_set_bpm ( Track * self,
bpm_t bpm,
bpm_t start_bpm,
bool temporary,
bool fire_events )

Sets the BPM.

Parameters
update_snap_pointsWhether to update the snap points.
stretch_audio_regionWhether to stretch audio regions. This should only be true when the BPM change is final.
start_bpmThe BPM at the start of the action, if not temporary.

◆ track_add_folder_parents()

void track_add_folder_parents ( const Track * self,
GPtrArray * parents,
bool prepend )

Adds the track's folder parents to the given array.

Parameters
prependWhether to prepend instead of append.

◆ track_comment_setter()

void track_comment_setter ( void * track,
const char * comment )

Comment setter.

Note
This creates an undoable action.

◆ track_create_missing_lanes()

bool track_create_missing_lanes ( Track * self,
const int pos )

Creates missing TrackLane's until pos.

Returns
Whether a new lane was created.

◆ track_create_with_action()

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 )
Parameters
disable_track_idxTrack index to disable, or -1.
ready_cbCallback to be called when the tracks are ready (added to the project).

◆ track_disconnect()

void track_disconnect ( Track * self,
bool remove_pl,
bool recalc_graph )

Disconnects the track from the processing chain.

This should be called immediately when the track is getting deleted, and track_free should be designed to be called later after an arbitrary delay.

Parameters
remove_plRemove the Plugin from the Channel. Useful when deleting the channel.
recalc_graphRecalculate mixer graph.

◆ track_fill_events()

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.

Note
The engine splits the cycle so transport loop related logic is not needed.
Parameters
stereo_portsStereoPorts to fill.
midi_eventsMidiEvents to fill (from Piano Roll Port for example).

◆ track_freeze()

bool track_freeze ( Track * self,
bool freeze,
GError ** error )

Freezes or unfreezes the track.

When a track is frozen, it is bounced with effects to a temporary file in the pool, which is played back directly from disk.

When the track is unfrozen, this file will be removed from the pool and the track will be played normally again.

Returns
Whether successful.

◆ track_generate_automation_tracks()

void track_generate_automation_tracks ( Track * track)

Generates automatables for the track.

Should be called as soon as the track is created.

◆ track_get_fader()

Fader * track_get_fader ( Track * track,
bool post_fader )

Returns the Fader (if applicable).

Parameters
post_faderTrue to get post fader, false to get pre fader.

◆ track_get_from_name()

Track * track_get_from_name ( const char * name)

Returns the Track from the Project matching name.

Parameters
nameName to search for.

◆ track_get_plugin_at_slot()

Plugin * track_get_plugin_at_slot ( Track * track,
PluginSlotType slot_type,
int slot )

Returns the plugin at the given slot, if any.

Parameters
slotThe slot (ignored if instrument is selected.

◆ track_get_region_at_pos()

ZRegion * track_get_region_at_pos ( const Track * track,
const Position * pos,
bool include_region_end )

Returns the region at the given position, or NULL.

Parameters
include_region_endWhether to include the region's end in the calculation.

◆ track_get_regions_in_range()

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.

Returns
The number of regions returned.

◆ track_get_should_be_visible()

NONNULL bool track_get_should_be_visible ( const Track * self)

Returns whether the track should be visible.

Takes into account Track.visible and whether any of the track's foldable parents are folded.

◆ track_get_velocities_in_range()

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.

Parameters
insideWhether to find velocities inside the range (1) or outside (0).

◆ track_init()

void track_init ( Track * self,
const int add_lane )

Inits the Track, optionally adding a single lane.

Parameters
add_laneAdd a lane. This should be used for new Tracks. When cloning, the lanes should be cloned so this should be 0.

◆ track_insert_plugin()

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().

Parameters
instantiate_pluginWhether to attempt to instantiate the plugin.

◆ track_insert_region()

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.

The ZRegion must be the main region (see ArrangerObjectInfo).

Parameters
atThe AutomationTrack of this ZRegion, if automation region.
lane_posThe position of the lane to add to, if applicable.
idxThe index to insert the region at inside its parent, or -1 to append.
gen_nameGenerate a unique region name or not. This will be 0 if the caller already generated a unique name.
Returns
Whether successful.

◆ track_lane_clone()

TrackLane * track_lane_clone ( const TrackLane * src,
Track * track )

Clones the TrackLane.

Parameters
trackNew owner track, if any.

◆ track_lane_new()

TrackLane * track_lane_new ( Track * track,
int pos )

Creates a new TrackLane at the given pos in the given Track.

Parameters
trackThe Track to create the TrackLane for.
posThe position (index) in the Track that this lane will be placed in.

◆ track_lane_rename()

void track_lane_rename ( TrackLane * self,
const char * new_name,
bool with_action )

Rename the lane.

Parameters
with_actionWhether to make this an undoable action.

◆ track_lane_set_muted()

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.

Parameters
trigger_undoCreate and perform an undoable action.
fire_eventsFire UI events.

◆ track_lane_set_soloed()

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.

Parameters
trigger_undoCreate and perform an undoable action.
fire_eventsFire UI events.

◆ track_lane_update_positions()

void track_lane_update_positions ( TrackLane * self,
bool from_ticks,
bool bpm_change )

Updates the positions in each child recursively.

Parameters
from_ticksWhether to update the positions based on ticks (true) or frames (false).

◆ track_lane_write_to_midi_file()

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.

Parameters
lanes_as_tracksExport lanes as separate MIDI tracks.
use_track_or_lane_posWhether to use the track position (or lane position if lanes_as_tracks is true) in the MIDI data. The MIDI track will be set to 1 if false.
eventsTrack events, if not using lanes as tracks.
startEvents before this position will be skipped.
endEvents after this position will be skipped.

◆ track_mark_for_bounce()

void track_mark_for_bounce ( Track * self,
bool bounce,
bool mark_regions,
bool mark_children,
bool mark_parents )

Marks the track for bouncing.

Parameters
mark_childrenWhether to mark all children tracks as well. Used when exporting stems on the specific track stem only. IMPORTANT: Track.bounce_to_master must be set beforehand if this is true.
mark_parentsWhether to mark all parent tracks as well.

◆ track_new()

Track * track_new ( TrackType type,
int pos,
const char * label,
const int with_lane )

Creates a track with the given label and returns it.

If the TrackType is one that needs a Channel, then a Channel is also created for the track.

Parameters
posPosition in the Tracklist.
with_laneInit the Track with a lane.

◆ track_processor_connect_to_prefader()

void track_processor_connect_to_prefader ( TrackProcessor * self)

Connects the TrackProcessor's stereo out ports to the Channel's prefader in ports.

Used when deleting the only plugin left.

◆ track_processor_disconnect_from_prefader()

void track_processor_disconnect_from_prefader ( TrackProcessor * self)

Disconnect the TrackProcessor's stereo out ports from the prefader.

Used when there is no plugin in the channel.

◆ track_processor_process()

void track_processor_process ( TrackProcessor * self,
const EngineProcessTimeInfo *const time_nfo )

Process the TrackProcessor.

This function performs the following:

  • produce output audio/MIDI into stereo out or midi out, based on any audio/MIDI regions, if has piano roll or is audio track
  • produce additional output MIDI events based on any MIDI CC automation regions, if applicable
  • change MIDI CC control port values based on any MIDI input, if recording — at this point the output is ready —
  • handle recording (create events in regions and automation, including MIDI CC automation, based on the MIDI CC control ports)
Parameters
g_start_framesThe global start frames.
local_offsetThe local start frames.
nframesThe number of frames to process.

◆ track_remove_from_folder_parents()

void track_remove_from_folder_parents ( Track * self)

Remove the track from all folders.

Used when deleting tracks.

◆ track_remove_region()

NONNULL void track_remove_region ( Track * self,
ZRegion * region,
bool fire_events,
bool free )

Only removes the region from the track.

@pararm free Also free the Region.

◆ track_select()

NONNULL void track_select ( Track * self,
bool select,
bool exclusive,
bool fire_events )

Appends the Track to the selections.

Parameters
exclusiveSelect only this track.
fire_eventsFire events to update the UI.

◆ track_set_comment()

void track_set_comment ( Track * self,
const char * comment,
bool undoable )
Parameters
undoableCreate an undable action.

◆ track_set_listened()

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.

Parameters
auto_selectMakes this track the only selection in the tracklist. Useful when listening to a single track.
trigger_undoCreate and perform an undoable action.
fire_eventsFire UI events.

◆ track_set_name()

void track_set_name ( Track * self,
const char * name,
bool pub_events )

Setter for the track name.

If a track with that name already exists, it adds a number at the end.

Must only be called from the GTK thread.

◆ track_set_soloed()

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.

Parameters
auto_selectMakes this track the only selection in the tracklist. Useful when soloing a single track.
trigger_undoCreate and perform an undoable action.
fire_eventsFire UI events.

◆ track_update_children()

void track_update_children ( Track * self)

Updates the track's children.

Used when changing track positions.

◆ track_update_positions()

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.

Parameters
from_ticksWhether to update the positions based on ticks (true) or frames (false).

◆ track_validate()

bool track_validate ( Track * self)

Verifies the identifiers on a live Track (in the project, not a clone).

Returns
True if pass.

◆ track_write_to_midi_file()

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.

Parameters
use_track_posWhether to use the track position in the MIDI data. The track will be set to 1 if false.
eventsTrack events, if not using lanes as tracks or using track position.
startEvents before this position will be skipped.
endEvents after this position will be skipped.

◆ tracklist_activate_all_plugins()

void tracklist_activate_all_plugins ( Tracklist * self,
bool activate )

Activate or deactivate all plugins.

This is useful for exporting: deactivating and reactivating a plugin will reset its state.

◆ tracklist_clone()

Tracklist * tracklist_clone ( Tracklist * src)

Only clones what is needed for project save.

Parameters
srcSource tracklist. Must be the tracklist of the project in use.

◆ tracklist_expose_ports_to_backend()

void tracklist_expose_ports_to_backend ( Tracklist * self)

Exposes each track's ports that should be exposed to the backend.

This should be called after setting up the engine.

◆ tracklist_get_first_visible_track()

Track * tracklist_get_first_visible_track ( Tracklist * self,
const int pinned )

Returns the first visible Track.

Parameters
pinned1 to check the pinned tracklist, 0 to check the non-pinned tracklist.

◆ tracklist_get_last_pos()

int tracklist_get_last_pos ( Tracklist * self,
const TracklistPinOption pin_opt,
const bool visible_only )

Returns the index of the last Track.

Parameters
pin_optPin option.
visible_onlyOnly consider visible Track's.

◆ tracklist_get_last_track()

Track * tracklist_get_last_track ( Tracklist * self,
const TracklistPinOption pin_opt,
const int visible_only )

Returns the last Track.

Parameters
pin_optPin option.
visible_onlyOnly consider visible Track's.

◆ tracklist_get_num_visible_tracks()

int tracklist_get_num_visible_tracks ( Tracklist * self,
int visible )
Parameters
visible1 for visible, 0 for invisible.

◆ tracklist_get_track()

NONNULL HOT Track * tracklist_get_track ( Tracklist * self,
int idx )

Returns the track at the given index or NULL if the index is invalid.

Not to be used in real-time code.

◆ tracklist_get_visible_track_after_delta()

Track * tracklist_get_visible_track_after_delta ( Tracklist * self,
Track * track,
int delta )

Returns the Track after delta visible Track's.

Negative delta searches backwards.

This function searches tracks only in the same Tracklist as the given one (ie, pinned or not).

◆ tracklist_get_visible_track_diff()

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).

The caller is responsible for checking that both tracks are in the same tracklist (ie, pinned or not).

◆ tracklist_handle_move_or_copy()

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.

Parameters
this_trackThe track at the cursor (where the selection was dropped to.
locationLocation relative to this_track.

◆ tracklist_import_files()

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.

Parameters
uri_listURI list, if URI list was dropped.
fileFile, if SupportedFile was dropped.
trackTrack, if any.
laneTrackLane, if any.
indexIndex to insert new tracks at, or -1 to insert at end.
posPosition the file was dropped at, if inside track.

◆ tracklist_insert_track()

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.

Parameters
publish_eventsPublish UI events.
recalc_graphRecalculate routing graph.

◆ tracklist_move_track()

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.

Parameters
posPosition to insert at, or -1 to insert at the end.
always_before_posWhether the track should always be put before the track currently at pos. If this is true, when moving down, the resulting track position will be pos - 1.
publish_eventsPush UI update events or not.
recalc_graphRecalculate routing graph.

◆ tracklist_multiply_track_heights()

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.

Parameters
visible_onlyOnly apply to visible tracks.

◆ tracklist_remove_track()

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.

Also disconnects the channel.

Parameters
rm_plRemove plugins or not.
freeFree the track or not (free later).
publish_eventsPush a track deleted event to the UI.
recalc_graphRecalculate the mixer graph.

◆ tracklist_select_all()

NONNULL void tracklist_select_all ( Tracklist * self,
bool select,
bool fire_events )

Selects or deselects all tracks.

Note
When deselecting the last track will become selected (there must always be >= 1 tracks selected).

◆ tracklist_track_name_is_unique()

bool tracklist_track_name_is_unique ( Tracklist * self,
const char * name,
Track * track_to_skip )

Returns 1 if the track name is not taken.

Parameters
track_to_skipTrack to skip when searching.

◆ transport_init_loaded()

void transport_init_loaded ( Transport * self,
AudioEngine * engine,
Track * tempo_track )

Initialize loaded transport.

Parameters
engineOwner engine, if any.
tempo_trackTempo track, used to initialize the caches. Only needed on the active project transport.

◆ transport_move_playhead()

void transport_move_playhead ( Transport * self,
const Position * target,
bool panic,
bool set_cue_point,
bool fire_events )

Moves playhead to given pos.

This is only for moves other than while playing and for looping while playing.

Should not be used during exporting.

Parameters
targetPosition to set to.
panicSend MIDI panic or not FIXME unused.
set_cue_pointAlso set the cue point at this position.

◆ transport_prepare_audio_regions_for_stretch()

void transport_prepare_audio_regions_for_stretch ( Transport * self,
TimelineSelections * sel )

Prepares audio regions for stretching (sets the ZRegion::before_length).

Parameters
selectionsIf NULL, all audio regions are used. If non-NULL, only the regions in the selections are used.

◆ transport_recalculate_total_bars()

void transport_recalculate_total_bars ( Transport * self,
ArrangerSelections * sel )

Recalculates the total bars based on the last object's position.

Parameters
selIf given, only these objects will be checked, otherwise every object in the project will be checked.

◆ transport_request_pause()

void transport_request_pause ( Transport * self,
bool with_wait )

Request pause.

Must only be called in-between engine processing calls.

Parameters
with_waitWait for lock before requesting.

◆ transport_request_roll()

void transport_request_roll ( Transport * self,
bool with_wait )

Request playback.

Must only be called in-between engine processing calls.

Parameters
with_waitWait for lock before requesting.

◆ transport_set_loop_range()

void transport_set_loop_range ( Transport * self,
bool start,
const Position * start_pos,
const Position * pos,
bool snap )

Set the loop range.

Parameters
startTrue to set start pos, false to set end pos.

◆ transport_set_range()

void transport_set_range ( Transport * self,
bool range1,
const Position * start_pos,
const Position * pos,
bool snap )

Set the range1 or range2 position.

Parameters
range1True to set range1, false to set range2.

◆ transport_stretch_regions()

bool transport_stretch_regions ( Transport * self,
TimelineSelections * sel,
bool with_fixed_ratio,
double time_ratio,
bool force,
GError ** error )

Stretches regions.

Parameters
selectionsIf NULL, all regions are used. If non-NULL, only the regions in the selections are used.
with_fixed_ratioStretch all regions with a fixed ratio. If this is off, the current region length and ZRegion::before_length will be used to calculate the ratio.
forceForce stretching, regardless of musical mode.
Returns
Whether successful.

◆ transport_update_positions()

void transport_update_positions ( Transport * self,
bool update_from_ticks )

Updates the frames in all transport positions.

Parameters
update_from_ticksWhether to update the positions based on ticks (true) or frames (false).

◆ velocity_set_val()

void velocity_set_val ( Velocity * self,
const int val )

Sets the velocity to the given value.

The given value may exceed the bounds 0-127, and will be clamped.

Variable Documentation

◆ algorithm

MeterAlgorithm Meter::algorithm

Algorithm to use.

Auto by default.

Definition at line 70 of file meter.h.

◆ am_widget

AutomationModeWidget* AutomationTrack::am_widget

Automation mode button group.

Definition at line 136 of file automation_track.h.

◆ atl [1/2]

AutomationTracklist* AutomationTrack::atl

Pointer to owner automation tracklist, if any.

Definition at line 143 of file automation_track.h.

◆ atl [2/2]

Definition at line 151 of file automation_track.h.

◆ automation_mode

AutomationMode AutomationTrack::automation_mode

Automation mode.

Definition at line 96 of file automation_track.h.

◆ bot_left_buttons

CustomButtonWidget* AutomationTrack::bot_left_buttons[8]

Definition at line 138 of file automation_track.h.

◆ bot_right_buttons

CustomButtonWidget* AutomationTrack::bot_right_buttons[8]

Definition at line 132 of file automation_track.h.

◆ control_room

COLD Track ControlRoom* control_room

Definition at line 274 of file fader.h.

◆ created

bool AutomationTrack::created

Whether it has been created by the user yet or not.

Definition at line 64 of file automation_track.h.

◆ engine [1/2]

COLD AudioEngine* engine

Definition at line 97 of file control_room.h.

◆ engine [2/2]

COLD AudioEngine* engine

Definition at line 97 of file hardware_processor.h.

◆ error [1/2]

COLD Project GError** error

Definition at line 811 of file engine.h.

◆ error [2/2]

GError** error

Definition at line 565 of file track.h.

◆ height

double AutomationTrack::height

Position of multipane handle.

Definition at line 89 of file automation_track.h.

◆ hw_processor

COLD HardwareProcessor* hw_processor

Definition at line 177 of file ext_port.h.

◆ index

int AutomationTrack::index

Index in parent AutomationTracklist.

Definition at line 58 of file automation_track.h.

◆ kmeter_processor

KMeterDsp* Meter::kmeter_processor

K RMS processor, if K meter.

Definition at line 61 of file meter.h.

◆ last_amp

float Meter::last_amp

Last meter value (in amplitude), used to show a falloff and avoid sudden dips.

Definition at line 78 of file meter.h.

◆ last_draw_time

gint64 Meter::last_draw_time

Time the last val was taken at (last draw time).

Definition at line 82 of file meter.h.

◆ last_midi_trigger_time

gint64 Meter::last_midi_trigger_time

Definition at line 84 of file meter.h.

◆ last_recorded_value

float AutomationTrack::last_recorded_value

Last value recorded in this automation track.

Definition at line 93 of file automation_track.h.

◆ num_bot_left_buttons

int AutomationTrack::num_bot_left_buttons

Definition at line 139 of file automation_track.h.

◆ num_bot_right_buttons

int AutomationTrack::num_bot_right_buttons

Definition at line 133 of file automation_track.h.

◆ num_region_snapshots

int AutomationTrack::num_region_snapshots

Definition at line 73 of file automation_track.h.

◆ num_regions

int AutomationTrack::num_regions

Definition at line 68 of file automation_track.h.

◆ num_top_left_buttons

int AutomationTrack::num_top_left_buttons

Definition at line 131 of file automation_track.h.

◆ num_top_right_buttons

int AutomationTrack::num_top_right_buttons

Definition at line 129 of file automation_track.h.

◆ peak_processor

PeakDsp* Meter::peak_processor

Definition at line 63 of file meter.h.

◆ port [1/2]

Port* AutomationTrack::port

Cache used during DSP.

Definition at line 146 of file automation_track.h.

◆ port [2/2]

Port* Meter::port

Port associated with this meter.

Definition at line 50 of file meter.h.

◆ port_id

PortIdentifier AutomationTrack::port_id

Identifier of the Port this AutomationTrack is for.

Definition at line 61 of file automation_track.h.

◆ prev_max

float Meter::prev_max

Previous max, used when holding the max value.

Definition at line 74 of file meter.h.

◆ project [1/2]

COLD Project* project

Definition at line 810 of file engine.h.

◆ project [2/2]

COLD Project* project

Definition at line 131 of file tracklist.h.

◆ record_mode

AutomationRecordMode AutomationTrack::record_mode

Automation record mode, when AutomationTrack::automation_mode is set to record.

Definition at line 100 of file automation_track.h.

◆ recording_paused

bool AutomationTrack::recording_paused

This must only be set by the RecordingManager when temporarily pausing recording, eg when looping or leaving the punch range.

See RECORDING_EVENT_TYPE_PAUSE_AUTOMATION_RECORDING.

Definition at line 125 of file automation_track.h.

◆ recording_region

ZRegion* AutomationTrack::recording_region

Region currently recording to.

Definition at line 107 of file automation_track.h.

◆ recording_start_sent

bool AutomationTrack::recording_start_sent

This is a flag to let the recording manager know that a START signal was already sent for recording.

This is because AutomationTrack::recording_region takes a cycle or 2 to become non-NULL.

Definition at line 116 of file automation_track.h.

◆ recording_started

bool AutomationTrack::recording_started

To be set to true when recording starts (when the first change is received) and false when recording ends.

Definition at line 104 of file automation_track.h.

◆ region_snapshots

ZRegion** AutomationTrack::region_snapshots

Snapshots used during playback TODO unimplemented.

Definition at line 72 of file automation_track.h.

◆ regions

ZRegion** AutomationTrack::regions

The automation Region's.

Definition at line 67 of file automation_track.h.

◆ regions_size

size_t AutomationTrack::regions_size

Definition at line 69 of file automation_track.h.

◆ sample_processor [1/2]

COLD Track ControlRoom SampleProcessor* sample_processor

Definition at line 275 of file fader.h.

◆ sample_processor [2/2]

COLD Project SampleProcessor* sample_processor

Definition at line 132 of file tracklist.h.

◆ top_left_buttons

CustomButtonWidget* AutomationTrack::top_left_buttons[8]

Definition at line 130 of file automation_track.h.

◆ top_right_buttons

CustomButtonWidget* AutomationTrack::top_right_buttons[8]

Buttons used by the track widget.

Definition at line 128 of file automation_track.h.

◆ track [1/3]

COLD Track* track

Definition at line 86 of file automation_tracklist.h.

◆ track [2/3]

COLD Track* track

Definition at line 273 of file fader.h.

◆ track [3/3]

COLD Track* track

Definition at line 212 of file track_processor.h.

◆ tracklist

COLD Tracklist* tracklist

Definition at line 533 of file track.h.

◆ true_peak

float Meter::true_peak

Current true peak.

Definition at line 57 of file meter.h.

◆ true_peak_max

float Meter::true_peak_max

Definition at line 58 of file meter.h.

◆ true_peak_max_processor

TruePeakDsp* Meter::true_peak_max_processor

Definition at line 54 of file meter.h.

◆ true_peak_processor

TruePeakDsp* Meter::true_peak_processor

True peak processor.

Definition at line 53 of file meter.h.

◆ ts

Definition at line 534 of file track.h.

◆ visible

bool AutomationTrack::visible

Whether visible or not.

Being created is a precondition for this.

@important Must only be set with automation_tracklist_set_at_visible().

Definition at line 83 of file automation_track.h.

◆ y

int AutomationTrack::y

Y local to track.

Definition at line 86 of file automation_track.h.