Audio module
DSP and audio related code.
Classes
- struct AutomationPoint
- An automation point inside an 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.
- 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.
- struct ChannelSend
- Channel send.
- struct ChordDescriptor
- A ChordDescriptor describes a chord and is not linked to any specific object by itself.
- struct ChordObject
- A ChordObject to be shown in the TimelineArrangerWidget.
- struct AudioClip
- Audio clips for the pool.
- 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.
- struct CurveOptions
- Curve options.
- struct Ditherer
- Ditherer.
- struct AudioEncoder
- Struct for holding info for encoding.
- struct AudioEngineEvent
- Audio engine event.
- struct EngineProcessTimeInfo
- Common struct to pass around during processing to avoid repeating the data in function arguments.
- struct AudioEngine
- The audio engine.
- struct ExportSettings
- Export settings to be passed to the exporter to use.
- struct ExtPort
- External port.
- struct Fader
- A Fader is a processor that is used for volume controls and pan.
- struct Graph
- Graph.
- struct GraphNode
- A node in the processing graph.
- struct HardwareProcessor
- Hardware processor.
- struct Marker
- Marker for the MarkerTrack.
- struct Meter
- A Meter used by a single GUI element.
- struct Metronome
- Metronome settings.
- struct MidiEvent
- Backend-agnostic MIDI event descriptor.
- struct MidiEvents
- Container for passing midi events through ports.
- struct MidiEventHeader
- Used by Windows MME and RtMidi when adding events to the ring.
- struct MidiMapping
- A mapping from a MIDI value to a destination.
- struct MidiMappings
- All MIDI mappings in Zrythm.
- struct MidiNote
- A MIDI note inside a ZRegion shown in the piano roll.
- struct ModulatorMacroProcessor
- Modulator macro button processor.
- struct AudioPool
- An audio pool is a pool of audio files and their corresponding float arrays in memory that are referenced by regions.
- struct PortScalePoint
- Scale point.
- struct Port
- Must ONLY be created via port_new()
- struct StereoPorts
- L & R port, for convenience.
- struct PortConnection
- A connection between two ports.
- struct PortConnectionsManager
- Port connections manager.
- struct PortIdentifier
- Struct used to identify Ports in the project.
- struct Position
- A Position is made up of bars.beats.sixteenths.ticks.
- struct RecordingEvent
- A recording event.
- struct ZRegion
- A region (clip) is an object on the timeline that contains either MidiNote's or AudioClip's.
- struct RegionIdentifier
- Index/identifier for a Region, so we can get Region objects quickly with it without searching by name.
- struct RegionLinkGroup
- A group of linked regions.
- struct RegionLinkGroupManager
- Manager of region link groups.
- struct SamplePlayback
- A sample playback handle to be used by the engine.
- struct SampleProcessor
- A processor to be used in the routing graph for playing samples independent of the timeline.
- struct MusicalScale
- To be generated at the beginning, and then copied and reused.
- struct ScaleObject
- A ScaleObject to be shown in the TimelineArrangerWidget.
- struct Stretcher
- Stretcher interface.
- struct Track
- Track to be inserted into the Project's Tracklist.
- struct TrackLane
- A TrackLane belongs to a Track (can have many TrackLanes in a Track) and contains Regions.
- struct TrackProcessor
- A TrackProcessor is a processor that is used as the first entry point when processing a track.
- struct Tracklist
- The Tracklist contains all the tracks in the Project.
- struct Transport
- The transport.
- struct Velocity
- The MidiNote velocity.
Enums
- 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_EXT_PROGRAM, AUDIO_FUNCTION_GUILE_SCRIPT, AUDIO_FUNCTION_CUSTOM_PLUGIN, AUDIO_FUNCTION_INVALID }
- enum BalanceControlAlgorithm { BALANCE_CONTROL_ALGORITHM_LINEAR }
- See https:/
/ www.harmonycentral.com/ articles/ the-truth-about-panning-laws. - enum ChordType { CHORD_TYPE_MAJ, CHORD_TYPE_MIN, CHORD_TYPE_DIM, CHORD_TYPE_SUS4, CHORD_TYPE_SUS2, CHORD_TYPE_AUG, NUM_CHORD_TYPES }
- Chord type.
- 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.
- 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.
- enum AudioEngineEventType { AUDIO_ENGINE_EVENT_BUFFER_SIZE_CHANGE, AUDIO_ENGINE_EVENT_SAMPLE_RATE_CHANGE }
- Audio engine event type.
- 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.
- 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.
- enum BounceMode { BOUNCE_OFF, BOUNCE_ON, BOUNCE_INHERIT }
- Mode used when bouncing, either during exporting or when bouncing tracks or regions to audio.
- enum AudioFormat { AUDIO_FORMAT_FLAC, AUDIO_FORMAT_OGG_VORBIS, AUDIO_FORMAT_OGG_OPUS, AUDIO_FORMAT_WAV, AUDIO_FORMAT_MP3, AUDIO_FORMAT_MIDI, AUDIO_FORMAT_RAW, NUM_AUDIO_FORMATS }
- Audio format.
- enum ExportTimeRange { TIME_RANGE_LOOP, TIME_RANGE_SONG, TIME_RANGE_CUSTOM }
- Time range to export.
- enum ExportMode { EXPORT_MODE_FULL, EXPORT_MODE_TRACKS, EXPORT_MODE_REGIONS }
- Export mode.
- 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.
- 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.
- enum MidiFaderMode { MIDI_FADER_MODE_VEL_MULTIPLIER, MIDI_FADER_MODE_CC_VOLUME }
- enum GraphExportType { NUM_GRAPH_EXPORT_TYPES }
- Export type.
- 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.
- enum MarkerType { MARKER_TYPE_START, MARKER_TYPE_END, MARKER_TYPE_CUSTOM }
- Marker type.
- 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.
- enum MidiEventType { MIDI_EVENT_TYPE_PITCHBEND, MIDI_EVENT_TYPE_CONTROLLER, MIDI_EVENT_TYPE_NOTE_OFF, MIDI_EVENT_TYPE_NOTE_ON, MIDI_EVENT_TYPE_ALL_NOTES_OFF, MIDI_EVENT_TYPE_RAW }
- Type of MIDI event.
- enum PortInternalType { INTERNAL_NONE, INTERNAL_LV2_PORT, INTERNAL_JACK_PORT, INTERNAL_PA_PORT, INTERNAL_ALSA_SEQ_PORT }
- What the internal data is.
- enum PortFlow { FLOW_UNKNOWN, FLOW_INPUT, FLOW_OUTPUT }
- Direction of the signal.
- enum PortType { TYPE_UNKNOWN, TYPE_CONTROL, TYPE_AUDIO, TYPE_EVENT, TYPE_CV }
- Type of signals the Port handles.
- 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 to be displayed in the UI.
- 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.
- 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.
- 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 }
- 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.
- 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.
- enum MusicalScaleType { SCALE_CHROMATIC, SCALE_IONIAN, SCALE_AEOLIAN, SCALE_HARMONIC_MINOR, SCALE_ACOUSTIC, SCALE_ALGERIAN, SCALE_ALTERED, SCALE_AUGMENTED, SCALE_BEBOP_DOMINANT, SCALE_BLUES, SCALE_CHINESE, SCALE_DIMINISHED, SCALE_DOMINANT_DIMINISHED, SCALE_DORIAN, SCALE_DOUBLE_HARMONIC, SCALE_EIGHT_TONE_SPANISH, SCALE_ENIGMATIC, SCALE_EGYPTIAN, SCALE_FLAMENCO, SCALE_GEEZ, SCALE_GYPSY, SCALE_HALF_DIMINISHED, SCALE_HARMONIC_MAJOR, SCALE_HINDU, SCALE_HIRAJOSHI, SCALE_HUNGARIAN_GYPSY, SCALE_HUNGARIAN_MINOR, SCALE_IN, SCALE_INSEN, SCALE_ISTRIAN, SCALE_IWATO, SCALE_LOCRIAN, SCALE_LYDIAN_AUGMENTED, SCALE_LYDIAN, SCALE_MAJOR_LOCRIAN, SCALE_MAJOR_PENTATONIC, SCALE_MAQAM, SCALE_MELODIC_MINOR, SCALE_MINOR_PENTATONIC, SCALE_MIXOLYDIAN, SCALE_NEAPOLITAN_MAJOR, SCALE_NEAPOLITAN_MINOR, SCALE_OCTATONIC_HALF_WHOLE, SCALE_OCTATONIC_WHOLE_HALF, SCALE_ORIENTAL, SCALE_PERSIAN, SCALE_PHRYGIAN_DOMINANT, SCALE_PHRYGIAN, SCALE_PROMETHEUS, SCALE_ROMANIAN_MINOR, SCALE_TRITONE, SCALE_UKRANIAN_DORIAN, SCALE_WHOLE_TONE, SCALE_YO }
- Scale type (name) eg Aeolian.
- enum NoteType { NOTE_TYPE_NORMAL, NOTE_TYPE_DOTTED, NOTE_TYPE_TRIPLET }
- enum NoteLengthType { NOTE_LENGTH_CUSTOM, NOTE_LENGTH_LINK, NOTE_LENGTH_LAST_OBJECT }
- enum SnapGridType { SNAP_GRID_TYPE_TIMELINE, SNAP_GRID_TYPE_EDITOR }
- Snap grid type.
- 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.
- 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.
- enum TracklistPinOption { TRACKLIST_PIN_OPTION_PINNED_ONLY, TRACKLIST_PIN_OPTION_UNPINNED_ONLY, TRACKLIST_PIN_OPTION_BOTH }
- Used in track search functions.
- enum TransportDisplay { TRANSPORT_DISPLAY_BBT, TRANSPORT_DISPLAY_TIME }
- Corrseponts to "transport-display" in the gsettings.
- enum TransportRecordingMode { RECORDING_MODE_OVERWRITE_EVENTS, RECORDING_MODE_MERGE_EVENTS, RECORDING_MODE_TAKES, RECORDING_MODE_TAKES_MUTED }
- Recording mode for MIDI and audio.
Typedefs
- using AutomationPoint = struct AutomationPoint
- An automation point inside an AutomationTrack.
- using AutomationTracklist = 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.
- using BalanceControlAlgorithm = enum BalanceControlAlgorithm
- See https:/
/ www.harmonycentral.com/ articles/ the-truth-about-panning-laws. - using Channel = 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.
- using ChannelSend = struct ChannelSend
- Channel send.
- using ChordType = enum ChordType
- Chord type.
- using ChordAccent = enum ChordAccent
- Chord accents.
- using ChordDescriptor = struct ChordDescriptor
- A ChordDescriptor describes a chord and is not linked to any specific object by itself.
- using ChordObject = struct ChordObject
- A ChordObject to be shown in the TimelineArrangerWidget.
- using AudioClip = struct AudioClip
- Audio clips for the pool.
- using ControlRoom = 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.
- using CurveAlgorithm = enum CurveAlgorithm
- The algorithm to use for curves.
- using CurveOptions = struct CurveOptions
- Curve options.
- using Ditherer = struct Ditherer
- Ditherer.
- using AudioEncoder = struct AudioEncoder
- Struct for holding info for encoding.
- using AudioEngineEventType = enum AudioEngineEventType
- Audio engine event type.
- using AudioEngineEvent = struct AudioEngineEvent
- Audio engine event.
- using AudioEngineBufferSize = enum AudioEngineBufferSize
- Buffer sizes to be used in combo boxes.
- using AudioEngineSamplerate = enum AudioEngineSamplerate
- Samplerates to be used in comboboxes.
- using BounceMode = enum BounceMode
- Mode used when bouncing, either during exporting or when bouncing tracks or regions to audio.
- using EngineProcessTimeInfo = struct EngineProcessTimeInfo
- Common struct to pass around during processing to avoid repeating the data in function arguments.
- using AudioEngine = struct AudioEngine
- The audio engine.
- using AudioFormat = enum AudioFormat
- Audio format.
- using ExportTimeRange = enum ExportTimeRange
- Time range to export.
- using ExportMode = enum ExportMode
- Export mode.
- using ExportSettings = struct ExportSettings
- Export settings to be passed to the exporter to use.
- using ExtPortType = enum ExtPortType
- External port type.
- using ExtPort = struct ExtPort
- External port.
- using FaderType = enum FaderType
- Fader type.
- using Fader = struct Fader
- A Fader is a processor that is used for volume controls and pan.
- using Graph = struct Graph
- Graph.
- using GraphExportType = enum GraphExportType
- Export type.
- using GraphNodeType = enum GraphNodeType
- Graph nodes can be either ports or processors.
- using GraphNode = struct GraphNode
- A node in the processing graph.
- using HardwareProcessor = struct HardwareProcessor
- Hardware processor.
- using MarkerType = enum MarkerType
- Marker type.
- using Marker = struct Marker
- Marker for the MarkerTrack.
- using MarkerTrack = struct Track
- MarkerTrack is just a Track.
- using Meter = struct Meter
- A Meter used by a single GUI element.
- using MetronomeType = enum MetronomeType
- The type of the metronome sound.
- using Metronome = struct Metronome
- Metronome settings.
- using MidiEventType = enum MidiEventType
- Type of MIDI event.
- using MidiEvent = struct MidiEvent
- Backend-agnostic MIDI event descriptor.
- using MidiEvents = struct MidiEvents
- Container for passing midi events through ports.
- using MidiEventHeader = struct MidiEventHeader
- Used by Windows MME and RtMidi when adding events to the ring.
- using MidiMapping = struct MidiMapping
- A mapping from a MIDI value to a destination.
- using MidiMappings = struct MidiMappings
- All MIDI mappings in Zrythm.
- using MidiNote = struct MidiNote
- A MIDI note inside a ZRegion shown in the piano roll.
- using ModulatorMacroProcessor = struct ModulatorMacroProcessor
- Modulator macro button processor.
- using AudioPool = struct AudioPool
- An audio pool is a pool of audio files and their corresponding float arrays in memory that are referenced by regions.
- using PortInternalType = enum PortInternalType
- What the internal data is.
- using PortScalePoint = struct PortScalePoint
- Scale point.
- using Port = struct Port
- Must ONLY be created via port_new()
- using StereoPorts = struct StereoPorts
- L & R port, for convenience.
- using PortConnection = struct PortConnection
- A connection between two ports.
- using PortConnectionsManager = struct PortConnectionsManager
- Port connections manager.
- using PortFlow = enum PortFlow
- Direction of the signal.
- using PortType = enum PortType
- Type of signals the Port handles.
- using PortUnit = enum PortUnit
- Port unit to be displayed in the UI.
- using PortOwnerType = enum PortOwnerType
- Type of owner.
- using PortFlags = enum PortFlags
- Port flags.
- using PortIdentifier = struct PortIdentifier
- Struct used to identify Ports in the project.
- using Position = struct Position
- A Position is made up of bars.beats.sixteenths.ticks.
- using RecordingEvent = struct RecordingEvent
- A recording event.
- using RegionMusicalMode = enum RegionMusicalMode
- Musical mode setting for audio regions.
- using ZRegion = struct ZRegion
- A region (clip) is an object on the timeline that contains either MidiNote's or AudioClip's.
- using RegionType = enum RegionType
- Type of Region.
- using RegionIdentifier = struct RegionIdentifier
- Index/identifier for a Region, so we can get Region objects quickly with it without searching by name.
- using RegionLinkGroup = struct RegionLinkGroup
- A group of linked regions.
- using RegionLinkGroupManager = struct RegionLinkGroupManager
- Manager of region link groups.
- using SamplePlayback = struct SamplePlayback
- A sample playback handle to be used by the engine.
- using SampleProcessor = struct SampleProcessor
- A processor to be used in the routing graph for playing samples independent of the timeline.
- using MusicalScaleType = enum MusicalScaleType
- Scale type (name) eg Aeolian.
- using MusicalScale = struct MusicalScale
- To be generated at the beginning, and then copied and reused.
- using ScaleObject = struct ScaleObject
- A ScaleObject to be shown in the TimelineArrangerWidget.
- using SnapGridType = enum SnapGridType
- Snap grid type.
- using Stretcher = struct Stretcher
- Stretcher interface.
- using BeatUnit = enum BeatUnit
- Beat unit.
- using TrackType = enum TrackType
- The Track's type.
- using Track = struct Track
- Track to be inserted into the Project's Tracklist.
- using TrackLane = struct TrackLane
- A TrackLane belongs to a Track (can have many TrackLanes in a Track) and contains Regions.
- using TrackProcessor = struct TrackProcessor
- A TrackProcessor is a processor that is used as the first entry point when processing a track.
- using TracklistPinOption = enum TracklistPinOption
- Used in track search functions.
- using Tracklist = struct Tracklist
- The Tracklist contains all the tracks in the Project.
- using TransportDisplay = enum TransportDisplay
- Corrseponts to "transport-display" in the gsettings.
- using TransportRecordingMode = enum TransportRecordingMode
- Recording mode for MIDI and audio.
- using Transport = struct Transport
- The transport.
- using Velocity = struct Velocity
- The MidiNote velocity.
- using GraphNode = struct GraphNode
- A node in the processing graph.
- using MidiEvents = struct MidiEvents
- Container for passing midi events through ports.
Functions
- auto audio_function_get_detailed_action_for_type(AudioFunctionType type, const char* base_action) -> char*
- Returns a detailed action name to be used for actionable widgets or menus.
- static auto audio_function_get_plugin_uri_for_type(AudioFunctionType type) -> const char*
- Returns the URI of the plugin responsible for handling the type, if any.
- auto audio_function_apply(ArrangerSelections* sel, AudioFunctionType type, const char* uri, GError** error) -> int
- Applies the given action to the given selections.
-
auto audio_region_new(const int pool_id,
const char* filename,
bool read_from_pool,
const float* frames,
const long 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) -> ZRegion* - Creates a region for audio data.
- auto audio_region_get_clip(const ZRegion* self) -> AudioClip*
- 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.
- void audio_region_replace_frames(ZRegion* self, float* frames, size_t start_frame, size_t num_frames, bool duplicate_clip)
- Replaces the region's frames from start_frames with frames.
-
auto audio_region_fill_stereo_ports(ZRegion* self,
long g_start_frames,
nframes_
t cycle_start_offset, nframes_ t nframes, StereoPorts* stereo_ports) -> REALTIME HOT NONNULL void - Fills audio data from the region.
- void audio_region_free_members(ZRegion* self)
- Frees members only but not the audio region itself.
- auto automation_function_apply(ArrangerSelections* sel, AutomationFunctionType type, GError** error) -> int
- Applies the given action to the given selections.
- auto automation_point_new_float(const float value, const float normalized_val, const Position* pos) -> AutomationPoint*
- 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.
- 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.
- auto automation_point_get_normalized_value_in_curve(AutomationPoint* ap, double x) -> HOT double
- 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.
- auto automation_point_get_port(const AutomationPoint*const self) -> Port*
- Convenience function to return the control port that this AutomationPoint is for.
- auto automation_point_get_automation_track(const AutomationPoint*const self) -> AutomationTrack*
- Convenience function to return the AutomationTrack that this AutomationPoint is in.
- auto automation_point_curves_up(AutomationPoint* self) -> NONNULL bool
- Returns if the curve of the AutomationPoint curves upwards as you move right on the x axis.
- auto automation_region_new(const Position* start_pos, const Position* end_pos, unsigned int track_name_hash, int at_idx, int idx_inside_at) -> ZRegion*
- Creates a new ZRegion for automation.
- void automation_region_print_automation(ZRegion* self)
- Prints the automation in this Region.
- 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.
- auto automation_region_get_prev_ap(ZRegion* self, AutomationPoint* ap) -> AutomationPoint*
- Returns the AutomationPoint before the given one.
- auto automation_region_get_next_ap(ZRegion* self, AutomationPoint* ap, bool check_positions, bool check_transients) -> HOT AutomationPoint*
- 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, AutomationPoint** aps, int* num_aps)
- Returns the automation points since the last recorded automation point (if the last recorded automation point was before the current pos).
- auto automation_region_get_ap_around(ZRegion* self, Position* _pos, double delta_ticks, bool before_only) -> AutomationPoint*
- Returns an automation point found within +/- delta_ticks from the position, or NULL.
- auto automation_region_free_members(ZRegion* self) -> NONNULL void
- Frees members only but not the ZRegion itself.
- auto automation_track_new(Port* port) -> NONNULL AutomationTrack*
- Creates an automation track for the given Port.
- 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.
- auto automation_track_find_from_port_id(PortIdentifier* id, bool basic_search) -> NONNULL AutomationTrack*
- auto automation_track_find_from_port(Port* port, Track* track, bool basic_search) -> HOT AutomationTrack*
- Finds the AutomationTrack associated with
port
. - auto automation_track_should_read_automation(AutomationTrack* at, gint64 cur_time) -> HOT NONNULL bool
- Returns whether the automation in the automation track should be read.
- auto automation_track_should_be_recording(AutomationTrack* at, gint64 cur_time, bool record_aps) -> HOT NONNULL bool
- Returns if the automation track should currently be recording data.
- auto automation_track_add_region(AutomationTrack* self, ZRegion* region) -> NONNULL void
- Adds an automation ZRegion to the AutomationTrack.
- auto automation_track_insert_region(AutomationTrack* self, ZRegion* region, int idx) -> NONNULL void
- Inserts an automation ZRegion to the AutomationTrack at the given index.
- auto automation_track_update_positions(AutomationTrack* self, bool from_ticks) -> NONNULL void
- Returns the visible y offset from the top of the track widget.
- auto automation_track_set_index(AutomationTrack* self, int index) -> NONNULL void
- Sets the index of the AutomationTrack in the AutomationTracklist.
- auto automation_track_clone(AutomationTrack* src) -> NONNULL AutomationTrack*
- Clones the AutomationTrack.
- auto automation_track_get_ap_before_pos(const AutomationTrack* self, const Position* pos, bool ends_after) -> NONNULL AutomationPoint*
- Returns the automation point before the Position on the timeline.
- auto automation_track_get_region_before_pos(const AutomationTrack* self, const Position* pos, bool ends_after) -> ZRegion*
- Returns the ZRegion that starts before given Position, if any.
- auto automation_track_unselect_all(AutomationTrack* self) -> NONNULL void
- Unselects all arranger objects.
- auto automation_track_remove_region(AutomationTrack* self, ZRegion* region) -> NONNULL void
- Removes a region from the automation track.
- auto automation_track_clear(AutomationTrack* self) -> NONNULL void
- Removes and frees all arranger objects recursively.
- auto automation_track_get_val_at_pos(AutomationTrack* at, Position* pos, bool normalized, bool ends_after) -> NONNULL float
- Returns the actual parameter value at the given position.
- auto automation_track_get_y_px_from_normalized_val(AutomationTrack* self, float normalized_val) -> NONNULL int
- Returns the y pixels from the value based on the allocation of the automation track.
- auto automation_track_get_last_region(AutomationTrack* self) -> NONNULL ZRegion*
- Gets the last ZRegion in the AutomationTrack.
- auto automation_track_free(AutomationTrack* at) -> NONNULL void
- Frees the automation track.
- auto automation_tracklist_init_loaded(AutomationTracklist* self, Track* track) -> COLD void
- Inits a loaded AutomationTracklist.
- void automation_tracklist_print_ats(AutomationTracklist* self)
- Prints info about all the automation tracks.
- void automation_tracklist_update_positions(AutomationTracklist* self, bool from_ticks)
- Updates the frames of each position in each child of the automation tracklist recursively.
- void automation_tracklist_get_visible_tracks(AutomationTracklist* self, AutomationTrack** visible_tracks, int* num_visible)
- Gets the currently visible AutomationTrack's (regardless of whether the automation tracklist is visible in the UI or not.
- 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.
- auto automation_tracklist_get_at_from_port(AutomationTracklist* self, Port* port) -> AutomationTrack*
- 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.
- auto automation_tracklist_get_plugin_at(AutomationTracklist* self, PluginSlotType slot_type, const int plugin_slot, const int port_index, const char* symbol) -> AutomationTrack*
- Gets the automation track matching the given arguments.
- auto automation_tracklist_get_num_visible(AutomationTracklist* self) -> NONNULL int
- Returns the number of visible AutomationTrack's.
- auto automation_tracklist_validate(AutomationTracklist* self) -> NONNULL bool
- Verifies the identifiers on a live automation tracklist (in the project, not a clone).
- auto automation_tracklist_get_num_regions(AutomationTracklist* self) -> WARN_UNUSED_RESULT NONNULL int
- Counts the total number of regions in the automation tracklist.
- 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.
-
auto channel_handle_recording(Channel* self,
const long g_frames_start,
const nframes_
t nframes) -> NONNULL void - 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.
- auto channel_expose_ports_to_backend(Channel* ch) -> NONNULL void
- Exposes the channel's ports to the backend.
- void channel_connect(Channel* ch)
- Connects the channel's ports.
- auto channel_add_balance_control(void* _channel, float pan) -> NONNULL void
- Adds to (or subtracts from) the pan.
- auto channel_reset_fader(Channel* self, bool fire_events) -> NONNULL void
- Sets fader to 0.0.
- auto channel_prepare_process(Channel* channel) -> NONNULL void
- Prepares the channel for processing.
- auto channel_new(Track* track) -> NONNULL Channel*
- Creates a channel of the given type with the given label.
- auto channel_process(Channel* channel) -> NONNULL void
- The process function prototype.
- auto 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) -> NONNULL bool
- Adds given plugin to given position in the strip.
- auto channel_reconnect_ext_input_ports(Channel* ch) -> NONNULL void
- Called when the input has changed for Midi, Instrument or Audio tracks.
- auto channel_get_automation_track(Channel* channel, PortFlags port_flags) -> NONNULL AutomationTrack*
- Convenience function to get the automation track of the given type for the channel.
- auto channel_remove_plugin(Channel* channel, PluginSlotType slot_type, int slot, bool moving_plugin, bool deleting_plugin, bool deleting_channel, bool recalc_graph) -> NONNULL void
- Removes a plugin at pos from the channel.
- auto channel_update_track_name_hash(Channel* self, unsigned int old_name_hash, unsigned int new_name_hash) -> NONNULL void
- Updates the track name hash in the channel and all related ports and identifiers.
- auto channel_get_mono_compat_enabled(Channel* self) -> NONNULL bool
- Gets whether mono compatibility is enabled.
- auto channel_set_mono_compat_enabled(Channel* self, bool enabled, bool fire_events) -> NONNULL void
- 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.
- auto channel_clone(Channel* ch, Track* track, GError** error) -> Channel*
- Clones the channel recursively.
- auto channel_disconnect(Channel* channel, bool remove_pl) -> NONNULL void
- Disconnects the channel from the processing chain.
- auto channel_widget_generate_context_menu_for_track(Track* track) -> GMenu*
- Generates a context menu for either ChannelWidget or FolderChannelWidget.
- auto channel_free(Channel* channel) -> NONNULL void
- Frees the channel.
- auto channel_send_new(unsigned int track_name_hash, int slot, Track* track) -> ChannelSend*
- Creates a channel send instance.
- auto channel_send_get_track(const ChannelSend* self) -> NONNULL Track*
- Gets the owner track.
- auto channel_send_is_target_sidechain(ChannelSend* self) -> NONNULL bool
- Returns whether the channel send target is a sidechain port (rather than a target track).
- auto channel_send_get_target_track(ChannelSend* self, Track* owner) -> Track*
- Gets the target track.
- auto channel_send_get_target_sidechain(ChannelSend* self) -> NONNULL StereoPorts*
- Gets the target sidechain port.
- auto channel_send_get_amount_for_widgets(ChannelSend* self) -> NONNULL float
- Gets the amount to be used in widgets (0.0-1.0).
- auto channel_send_set_amount_from_widget(ChannelSend* self, float val) -> NONNULL void
- Sets the amount from a widget amount (0.0-1.0).
- auto channel_send_connect_stereo(ChannelSend* self, StereoPorts* stereo, Port* l, Port* r, bool sidechain, bool recalc_graph, bool validate, GError** error) -> bool
- Connects a send to stereo ports.
- auto channel_send_connect_midi(ChannelSend* self, Port* port, bool recalc_graph, bool validate, GError** error) -> NONNULL bool
- Connects a send to a midi port.
- auto channel_send_disconnect(ChannelSend* self, bool recalc_graph) -> NONNULL void
- Removes the connection at the given send.
- auto channel_send_get_dest_name(ChannelSend* self, char* buf) -> NONNULL void
- Get the name of the destination, or a placeholder text if empty.
- void channel_send_connect_to_owner(ChannelSend* self)
- Connects the ports to the owner track if not connected.
- auto channel_send_append_connection(const ChannelSend* self, const PortConnectionsManager* mgr, GPtrArray* arr) -> int
- Appends the connection(s), if non-empty, to the given array (if not NULL) and returns the number of connections added.
- auto channel_send_is_connected_to(const ChannelSend* self, const StereoPorts* stereo, const Port* midi) -> bool
- Returns whether the send is connected to the given ports.
- auto channel_send_find(ChannelSend* self) -> NONNULL ChannelSend*
- Finds the project send from a given send instance.
- auto chord_descriptor_new(MusicalNote root, int has_bass, MusicalNote bass, ChordType type, ChordAccent accent, int inversion) -> ChordDescriptor*
- Creates a ChordDescriptor.
- auto chord_descriptor_is_key_in_chord(ChordDescriptor* chord, MusicalNote key) -> bool
- Returns if the given key is in the chord represented by the given ChordDescriptor.
- auto chord_descriptor_is_key_bass(ChordDescriptor* chord, MusicalNote key) -> bool
- Returns if key is the bass or root note of chord.
- auto chord_descriptor_clone(ChordDescriptor* src) -> ChordDescriptor*
- Clones the given ChordDescriptor.
- auto chord_descriptor_chord_type_to_string(ChordType type) -> const char*
- Returns the chord type as a string (eg.
- auto chord_descriptor_chord_accent_to_string(ChordAccent accent) -> const char*
- Returns the chord accent as a string (eg.
- auto chord_descriptor_note_to_string(MusicalNote note) -> const char*
- Returns the musical note as a string (eg.
- auto chord_descriptor_to_new_string(const ChordDescriptor* chord) -> char*
- Returns the chord in human readable string.
- void chord_descriptor_to_string(const ChordDescriptor* chord, char* str)
- Returns the chord in human readable string.
- void chord_descriptor_update_notes(ChordDescriptor* self)
- Updates the notes array based on the current settings.
- void chord_descriptor_free(ChordDescriptor* self)
- Frees the ChordDescriptor.
- auto chord_object_new(RegionIdentifier* region_id, int chord_index, int index) -> ChordObject*
- Creates a ChordObject.
- void chord_object_set_region_and_index(ChordObject* self, ZRegion* region, int idx)
- Sets the region and index of the chord.
- auto chord_object_get_chord_descriptor(ChordObject* self) -> ChordDescriptor*
- Returns the ChordDescriptor associated with this ChordObject.
- auto chord_object_find_by_pos(ChordObject* clone) -> ChordObject*
- Finds the ChordObject in the project corresponding to the given one's position.
- auto chord_region_new(const Position* start_pos, const Position* end_pos, int idx) -> NONNULL ZRegion*
- Creates a new ZRegion for chords.
- auto chord_region_insert_chord_object(ZRegion* self, ChordObject* chord, int pos, bool fire_events) -> NONNULL void
- Inserts a ChordObject to the Region.
- auto chord_region_add_chord_object(ZRegion* self, ChordObject* chord, bool fire_events) -> NONNULL void
- Adds a ChordObject to the Region.
- auto chord_region_remove_chord_object(ZRegion* self, ChordObject* chord, int free, bool fire_events) -> NONNULL void
- Removes a ChordObject from the Region.
- auto chord_region_free_members(ZRegion* self) -> NONNULL void
- Frees members only but not the ZRegion itself.
- auto chord_track_new(int track_pos) -> ChordTrack*
- 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.
- auto chord_track_get_chord_at_pos(const Track* ct, const Position* pos) -> ChordObject*
- Returns the ChordObject at the given Position in the TimelineArranger.
- auto chord_track_get_scale_at_pos(const Track* ct, const Position* pos) -> ScaleObject*
- Returns the ScaleObject at the given Position in the TimelineArranger.
- void chord_track_clear(ChordTrack* self)
- Removes all objects from the chord track.
- auto audio_clip_init_loaded(AudioClip* self) -> COLD NONNULL void
- Inits after loading a Project.
- auto audio_clip_new_from_file(const char* full_path) -> COLD NONNULL AudioClip*
- Creates an audio clip from a file.
-
auto audio_clip_new_from_float_array(const float* arr,
const long nframes,
const channels_
t channels, BitDepth bit_depth, const char* name) -> AudioClip* - Creates an audio clip by copying the given float array.
-
auto audio_clip_new_recording(const channels_
t channels, const long nframes, const char* name) -> AudioClip* - Create an audio clip while recording.
- auto audio_clip_update_channel_caches(AudioClip* self, size_t start_from) -> NONNULL void
- Updates the channel caches.
- auto audio_clip_edit_in_ext_program(AudioClip* self) -> NONNULL AudioClip*
- Shows a dialog with info on how to edit a file, with an option to open an app launcher.
- auto audio_clip_write_to_file(AudioClip* self, const char* filepath, bool parts) -> NONNULL int
- Writes the given audio clip data to a file.
- auto audio_clip_write_to_pool(AudioClip* self, bool parts, bool is_backup) -> NONNULL void
- Writes the clip to the pool as a wav file.
- auto audio_clip_get_path_in_pool_from_name(const char* name, bool use_flac, bool is_backup) -> NONNULL char*
- Gets the path of a clip matching name from the pool.
- auto audio_clip_get_path_in_pool(AudioClip* self, bool is_backup) -> NONNULL char*
- Gets the path of the given clip from the pool.
- auto audio_clip_is_in_use(AudioClip* self, bool check_undo_stack) -> NONNULL bool
- Returns whether the clip is used inside the project.
- auto audio_clip_remove_and_free(AudioClip* self, bool backup) -> NONNULL void
- To be called by audio_
pool_ remove_ clip(). - auto audio_clip_free(AudioClip* self) -> NONNULL void
- Frees the audio clip.
- auto control_port_normalized_val_to_real(const Port*const self, float normalized_val) -> NONNULL PURE float
- Converts normalized value (0.0 to 1.0) to real value (eg.
- auto control_port_real_val_to_normalized(const Port*const self, float real_val) -> NONNULL PURE float
- Converts real value (eg.
- auto control_port_get_int(Port* self) -> int
- Gets the control value for an integer port.
- auto control_port_get_int_from_val(float val) -> int
- Gets the control value for an integer port.
- auto control_port_get_snapped_val(Port* self) -> float
- Returns the snapped value (eg, if toggle, returns 0.f or 1.f).
- auto control_port_get_snapped_val_from_val(Port* self, float val) -> float
- Returns the snapped value (eg, if toggle, returns 0.f or 1.f).
- auto control_port_get_val(Port* self) -> float
- Get the current real value of the control.
- auto control_port_get_normalized_val(Port* self) -> float
- Get the current normalized value of the control.
- auto control_port_get_unsnapped_val(Port* self) -> float
- Get the current real unsnapped value of the control.
- auto control_port_get_default_val(Port* self) -> float
- 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. - auto control_port_set_val_from_normalized(Port* self, float val, bool automating) -> HOT NONNULL void
- Updates the actual value.
- auto control_room_init_loaded(ControlRoom* self, AudioEngine* engine) -> COLD void
- Inits the control room from a project.
- auto control_room_new(AudioEngine* engine) -> COLD WARN_UNUSED_RESULT ControlRoom*
- 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.
- auto control_room_clone(const ControlRoom* src) -> NONNULL ControlRoom*
- Used during serialization.
- auto curve_get_fade_presets(void) -> GPtrArray*
- Returns an array of CurveFadePreset.
- void curve_algorithm_get_localized_name(CurveAlgorithm algo, char* buf)
- Stores the localized name of the algorithm in buf.
- auto curve_get_normalized_y(double x, CurveOptions* opts, int start_higher) -> HOT double
- Returns the Y value on a curve spcified by algo.
-
void ditherer_process(Ditherer* self,
float* frames,
size_t n_frames,
channels_
t channels) - Dither given audio.
- auto audio_encoder_new_from_file(const char* filepath) -> AudioEncoder*
- Creates a new instance of an AudioEncoder from the given file, that can be used for encoding.
- auto audio_encoder_decode(AudioEncoder* self, int samplerate, bool show_progress) -> NONNULL void
- Decodes the information in the AudioEncoder instance and stores the results there.
- auto audio_encoder_free(AudioEncoder* self) -> NONNULL void
- Free's the AudioEncoder and its members.
- auto engine_new(Project* project) -> COLD WARN_UNUSED_RESULT AudioEngine*
- Create a new audio engine.
- void engine_wait_for_pause(AudioEngine* self, EngineState* state, bool force_pause)
- void engine_wait_n_cycles(AudioEngine* self, int n)
- Waits for n processing cycles to finish.
- 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.
- auto engine_activate(AudioEngine* self, bool activate) -> COLD void
- 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) - Updates frames per tick based on the time sig, the BPM, and the sample rate.
- auto engine_process_events(AudioEngine* self) -> int
- GSourceFunc to be added using idle add.
-
auto engine_process_prepare(AudioEngine* self,
nframes_
t nframes) -> NONNULL HOT bool - To be called by each implementation to prepare the structures before processing.
-
auto engine_process(AudioEngine* self,
const nframes_
t total_frames_to_process) -> NONNULL HOT int - Processes current cycle.
-
auto engine_post_process(AudioEngine* self,
const nframes_
t roll_nframes, const nframes_ t nframes) -> NONNULL HOT void - To be called after processing for common logic.
-
auto engine_fill_out_bufs(AudioEngine* self,
const nframes_
t nframes) -> NONNULL void - Called to fill in the external buffers at the end of the processing cycle.
- auto engine_buffer_size_enum_to_int(AudioEngineBufferSize buffer_size) -> int
- Returns the int value correesponding to the given AudioEngineBufferSize.
- auto engine_samplerate_enum_to_int(AudioEngineSamplerate samplerate) -> int
- Returns the int value correesponding to the given AudioEngineSamplerate.
- void engine_set_buffer_size(AudioEngine* self, uint32_t buf_size)
- Request the backend to set the buffer size.
- auto engine_audio_backend_to_string(AudioBackend backend) -> const char*
- Returns the audio backend as a string.
- static auto engine_midi_backend_to_string(MidiBackend backend) -> const char*
- Returns the MIDI backend as a string.
- void engine_reset_bounce_mode(AudioEngine* self)
- Reset the bounce mode on the engine, all tracks and regions to OFF.
- auto engine_clone(const AudioEngine* src) -> COLD NONNULL AudioEngine*
- Clones the audio engine.
- auto engine_free(AudioEngine* self) -> COLD NONNULL void
- Closes any connections and free's data.
- auto export_settings_default(void) -> ExportSettings*
- Returns an instance of default ExportSettings.
- void export_settings_set_bounce_defaults(ExportSettings* self, const char* filepath, const char* bounce_name)
- Sets the defaults for bouncing.
- auto exporter_generic_export_thread(void* data) -> void*
- Generic export thread 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.
- auto exporter_stringize_audio_format(AudioFormat format, bool extension) -> const char*
- Returns the audio format as string.
- auto exporter_export(ExportSettings* info) -> int
- Exports an audio file based on the given settings.
- auto ext_port_init_loaded(ExtPort* self, HardwareProcessor* hw_processor) -> COLD void
- Inits the ExtPort after loading a project.
- void ext_port_print(ExtPort* self)
- Prints the port info.
- auto ext_port_matches_backend(ExtPort* self) -> bool
- Returns if the ext port matches the current backend.
- auto ext_port_get_id(ExtPort* ext_port) -> char*
- Returns a unique identifier (full name prefixed with backend type).
-
auto ext_port_get_buffer(ExtPort* ext_port,
nframes_
t nframes) -> float* - 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_connect(ExtPort* ext_port, Port* port, int src)
- Exposes the given Port if not exposed and makes the connection from the Port to the ExtPort (eg in JACK) or backwards.
- void ext_port_disconnect(ExtPort* ext_port, Port* port, int src)
- Disconnects the Port from the ExtPort.
- void ext_port_activate(ExtPort* self, Port* port, bool activate)
- Activates the port (starts receiving data) or deactivates it.
- auto ext_port_get_enabled(ExtPort* self) -> bool
- 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.
- auto ext_port_clone(ExtPort* ext_port) -> ExtPort*
- 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.
- auto fade_get_y_normalized(double x, CurveOptions* opts, int fade_in) -> double
- Gets the normalized Y for a normalized X.
- auto fader_init_loaded(Fader* self, Track* track, ControlRoom* control_room, SampleProcessor* sample_processor) -> COLD void
- Inits fader after a project is loaded.
- auto fader_new(FaderType type, bool passthrough, Track* track, ControlRoom* control_room, SampleProcessor* sample_processor) -> COLD Fader*
- Creates a new fader.
- auto fader_append_ports(const Fader* self, GPtrArray* ports) -> NONNULL void
- 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).
- void fader_set_muted(Fader* self, bool mute, bool fire_events)
- Sets track muted and optionally adds the action to the undo stack.
- auto fader_get_muted(const Fader*const self) -> NONNULL PURE bool
- Returns if the fader is muted.
- auto fader_get_soloed(const Fader*const self) -> HOT NONNULL PURE bool
- Returns if the track is soloed.
- auto fader_get_implied_soloed(Fader* self) -> bool
- 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.
- auto fader_get_amp(void* self) -> float
- Gets the fader amplitude (not db) FIXME is void * necessary? do it in the caller.
- auto fader_get_mono_compat_enabled(Fader* self) -> bool
- 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.
- auto fader_clear_buffers(Fader* self) -> HOT NONNULL void
- 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.
-
auto fader_process(Fader* self,
long g_start_frames,
nframes_
t start_frame, const nframes_ t nframes) -> NONNULL HOT void - Process the Fader.
- void fader_free(Fader* self)
- Frees the fader members.
- auto graph_create_node(Graph* self, GraphNodeType type, void* data) -> NONNULL GraphNode*
- Creates a new node, adds it to the graph and returns it.
-
auto graph_get_max_route_playback_latency(Graph* graph,
bool use_setup_nodes) -> nframes_
t - Returns the max playback latency of the trigger nodes.
- auto graph_validate_with_connection(Graph* self, const Port* src, const Port* dest) -> bool
- Adds a new connection for the given src and dest ports and validates the graph.
- auto graph_start(Graph* graph) -> int
- Starts as many threads as there are cores.
- auto graph_new(Router* router) -> Graph*
- Returns a new graph.
- 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(Graph* graph, GraphExportType type, const char* path)
- Exports the graph at the given path.
- auto graph_node_get_name(GraphNode* node) -> char*
- Returns a human friendly name of the node.
- auto graph_node_process(GraphNode* node, EngineProcessTimeInfo time_nfo) -> HOT void
- Processes the GraphNode.
-
auto graph_node_get_single_playback_latency(GraphNode* node) -> nframes_
t - 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.
- auto graph_node_trigger(GraphNode* self) -> HOT void
- Called by an upstream node when it has completed processing.
- auto graph_thread_new(const int id, const bool is_main, Graph* graph) -> GraphThread*
- Creates a thread.
- auto hardware_processor_new(bool input, AudioEngine* engine) -> COLD WARN_UNUSED_RESULT HardwareProcessor*
- Returns a new empty instance.
- auto hardware_processor_rescan_ext_ports(HardwareProcessor* self) -> bool
- Rescans the hardware ports and appends any missing ones.
- auto hardware_processor_find_ext_port(HardwareProcessor* self, const char* id) -> ExtPort*
- Finds an ext port from its ID (type + full name).
- auto hardware_processor_find_port(HardwareProcessor* self, const char* id) -> Port*
- Finds a port from its ID (type + full name).
- auto hardware_processor_setup(HardwareProcessor* self) -> int
- Sets up the ports but does not start them.
- void hardware_processor_activate(HardwareProcessor* self, bool activate)
- Starts or stops the ports.
-
auto hardware_processor_process(HardwareProcessor* self,
nframes_
t nframes) -> REALTIME void - Processes the data.
- auto hardware_processor_clone(const HardwareProcessor* src) -> HardwareProcessor*
- To be used during serialization.
- void instrument_track_init(Track* track)
- Initializes an instrument track.
- auto instrument_track_is_plugin_visible(Track* self) -> int
- 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.
- auto marker_new(const char* name) -> Marker*
- Creates a Marker.
- auto marker_is_equal(Marker* a, Marker* b) -> int
- Returns if the two Marker's are equal.
- void marker_set_track_name_hash(Marker* marker, unsigned int track_name_hash)
- Sets the Track of the Marker.
- auto marker_track_default(int track_pos) -> MarkerTrack*
- 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.
- auto marker_track_get_start_marker(const Track* track) -> Marker*
- Returns the start marker.
- auto marker_track_get_end_marker(const Track* track) -> Marker*
- Returns the end marker.
- void meter_get_value(Meter* self, AudioValueFormat format, float* val, float* max)
- Get the current meter value.
- auto metronome_new(void) -> Metronome*
- Initializes the Metronome by loading the samples into memory.
-
auto metronome_queue_events(AudioEngine* self,
const nframes_
t loffset, const nframes_ t nframes) -> NONNULL void - Queues metronome events (if any) within the current processing cycle.
- auto midi_get_cc_name(uint8_t cc) -> const char*
- Return the name of the given cc (0-127).
-
auto midi_combine_bytes_to_int(midi_
byte_ t lsb, midi_ byte_ t msb) -> int - Used for MIDI controls whose values are split between MSB/LSB.
-
void midi_get_bytes_from_int(int val,
midi_
byte_ t* lsb, midi_ byte_ t* msb) - Used for MIDI controls whose values are split between MSB/LSB.
-
auto midi_ctrl_change_get_ch_and_description(midi_
byte_ t* ctrl_change, char* buf) -> int - Saves a string representation of the given control change event in the given buffer.
- void midi_panic_all(int queued)
- Queues MIDI note off to event queues.
- auto midi_get_msg_length(uint8_t status_byte) -> int
- Returns the length of the MIDI message based on the status byte.
- void midi_events_init(MidiEvents* self)
- Inits the MidiEvents struct.
- auto midi_events_new(void) -> MidiEvents*
- Allocates and inits a MidiEvents struct.
- static void midi_event_copy(MidiEvent* dest, MidiEvent* src)
- Copies the members from one MidiEvent to another.
- void midi_events_sort_by_time(MidiEvents* self)
- Sorts the MIDI events by time ascendingly.
-
void midi_events_append(MidiEvents* src,
MidiEvents* dest,
const nframes_
t start_frame, const nframes_ t nframes, bool queued) - Appends the events from src to dest.
-
void midi_events_append_w_filter(MidiEvents* src,
MidiEvents* dest,
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,
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,
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.
- auto midi_events_has_note_on(MidiEvents* self, int check_main, int check_queued) -> int
- 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_pitchbend(MidiEvents* self,
midi_
byte_ t channel, int pitchbend, midi_ time_ t time, int queued) - Adds a control event to the given MidiEvents.
-
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.
- 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.
- auto midi_events_check_for_note_on(MidiEvents* midi_events, int note, int queued) -> int
- Returns if a note on event for the given note exists in the given events.
- auto midi_events_delete_note_on(MidiEvents* midi_events, int note, int queued) -> int
- 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_free(MidiEvents* self)
- Frees the MIDI events.
- auto midi_file_track_has_data(const char* abs_path, int track_idx) -> bool
- Returns whether the given track in the midi file has data.
- auto midi_file_get_num_tracks(const char* abs_path, bool non_empty_only) -> int
- Returns the number of tracks in the MIDI file.
- auto midi_function_apply(ArrangerSelections* sel, MidiFunctionType type, GError** error) -> int
- Applies the given action to the given selections.
- void midi_mappings_init_loaded(MidiMappings* self)
- Initializes the MidiMappings after a Project is loaded.
- auto midi_mappings_new(void) -> MidiMappings*
- 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.
- 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.
- auto midi_mappings_get_for_port(MidiMappings* self, Port* dest_port, int* size) -> MidiMapping**
- Get MIDI mappings for the given port.
- void midi_note_get_global_start_pos(MidiNote* self, Position* pos)
- Gets the global Position of the MidiNote's start_pos.
- auto midi_note_new(RegionIdentifier* region_id, Position* start_pos, Position* end_pos, uint8_t val, uint8_t vel) -> MidiNote*
- Creates a new MidiNote.
- void midi_note_set_region_and_index(MidiNote* self, ZRegion* region, int idx)
- Sets the region the MidiNote belongs to.
- auto midi_note_is_equal(MidiNote* src, MidiNote* dest) -> int
- Returns 1 if the MidiNotes match, 0 if not.
- void midi_note_get_val_as_string(MidiNote* self, char* buf, 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.
- auto midi_note_hit(MidiNote* midi_note, const long gframes) -> int
- 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.
- auto midi_region_new(const Position* start_pos, const Position* end_pos, unsigned int track_name_hash, int lane_pos, int idx_inside_lane) -> ZRegion*
- Creates a new ZRegion for MIDI notes.
- auto midi_region_new_from_midi_file(const Position* start_pos, const char* abs_path, unsigned int track_name_hash, int lane_pos, int idx_inside_lane, int idx) -> ZRegion*
- Creates a MIDI region from the given MIDI file path, starting at the given Position.
- auto midi_region_new_from_chord_descr(const Position* pos, ChordDescriptor* descr, unsigned int track_name_hash, int lane_pos, int idx_inside_lane) -> ZRegion*
- Create a region from the chord descriptor.
- void midi_region_insert_midi_note(ZRegion* region, MidiNote* midi_note, int idx, int pub_events)
- Inserts the MidiNote to the given ZRegion.
- void midi_region_start_unended_note(ZRegion* self, Position* start_pos, Position* end_pos, int pitch, int vel, int pub_events)
- Starts an unended note with the given pitch and velocity and adds it to ZRegion::
midi_notes. - auto midi_region_pop_unended_note(ZRegion* self, int pitch) -> MidiNote*
- Returns the midi note with the given pitch from the unended notes.
-
auto midi_region_fill_midi_events(ZRegion* self,
long g_start_frames,
nframes_
t local_start_frame, nframes_ t nframes, bool note_off_at_end, MidiEvents* midi_events) -> REALTIME void - Fills MIDI event queue from the region.
- void midi_region_print_midi_notes(ZRegion* self)
- Prints the MidiNotes in the Region.
- auto midi_region_get_first_midi_note(ZRegion* region) -> MidiNote*
- Gets first midi note.
- auto midi_region_get_last_midi_note(ZRegion* region) -> MidiNote*
- Gets last midi note.
- auto midi_region_get_highest_midi_note(ZRegion* region) -> MidiNote*
- Gets highest midi note.
- auto midi_region_get_lowest_midi_note(ZRegion* region) -> MidiNote*
- Gets lowest midi note.
- void midi_region_remove_midi_note(ZRegion* region, MidiNote* midi_note, int free, int pub_event)
- Removes the MIDI note from the Region.
- void midi_region_remove_all_midi_notes(ZRegion* region)
- Removes all MIDI ntoes and their components completely.
- void midi_region_write_to_midi_file(ZRegion* self, MIDI_FILE* mf, const int add_region_start, bool export_full, bool use_track_pos)
- Returns the midi note at given position with the given pitch.
- void midi_region_export_to_midi_file(ZRegion* self, const char* full_path, int midi_version, const int export_full)
- Exports the ZRegion to a specified MIDI file.
- auto midi_region_get_midi_ch(const ZRegion* self) -> uint8_t
- Returns the MIDI channel that this region should be played on, starting from 1.
- auto midi_region_get_as_events(const ZRegion* self, const int add_region_start, const int full) -> MidiEvents*
- Returns a newly initialized MidiEvents with the contents of the region converted into events.
- void midi_region_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.
-
auto midi_track_fill_midi_events(Track* track,
const long g_start_frames,
const nframes_
t local_start_frame, nframes_ t nframes, MidiEvents* midi_events) -> REALTIME void - Fills MIDI event queue from track.
- void midi_track_free(Track* track)
- Frees the track.
-
void modulator_macro_processor_process(ModulatorMacroProcessor* self,
long g_start_frames,
nframes_
t start_frame, const nframes_ t nframes) - Process.
- 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.
- auto modulator_track_default(int track_pos) -> Track*
- Creates the default modulator track.
- void modulator_track_init(Track* track)
- Inits the modulator track.
- void audio_pool_init_loaded(AudioPool* self)
- Inits after loading a project.
- auto audio_pool_new(void) -> AudioPool*
- Creates a new audio pool.
- auto audio_pool_add_clip(AudioPool* self, AudioClip* clip) -> int
- Adds an audio clip to the pool.
- auto audio_pool_duplicate_clip(AudioPool* self, int clip_id, bool write_file) -> int
- Duplicates the clip with the given ID and returns the duplicate.
- auto audio_pool_get_clip(AudioPool* self, int clip_id) -> AudioClip*
- 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.
- auto audio_pool_gen_name_for_recording_clip(AudioPool* pool, Track* track, int lane) -> char*
- Generates a name for a recording clip.
- void audio_pool_reload_clip_frame_bufs(AudioPool* self)
- 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.
- void audio_pool_write_to_disk(AudioPool* self, bool is_backup)
- Writes all the clips to disk.
- auto audio_pool_clone(const AudioPool* src) -> AudioPool*
- To be used during serialization.
- auto port_init_loaded(Port* self, void* owner) -> NONNULL void
- This function finds the Ports corresponding to the PortIdentifiers for srcs and dests.
- auto port_new_with_type(PortType type, PortFlow flow, const char* label) -> WARN_UNUSED_RESULT NONNULL Port*
- Creates port.
- auto port_allocate_bufs(Port* self) -> NONNULL void
- Allocates buffers used during DSP.
- auto port_free_bufs(Port* self) -> NONNULL void
- Frees buffers.
- auto stereo_ports_new_from_existing(Port* l, Port* r) -> NONNULL StereoPorts*
- Creates blank stereo ports.
- auto stereo_ports_new_generic(int in, const char* name, PortOwnerType owner_type, void* owner) -> StereoPorts*
- Creates stereo ports for generic use.
- auto stereo_ports_connect(StereoPorts* src, StereoPorts* dest, int locked) -> NONNULL void
- Connects the internal ports using port_
connect(). - auto port_get_value_from_symbol(const char* port_sym, void* user_data, uint32_t* size, uint32_t* type) -> const void*
- Function to get a port's value from its string symbol.
- auto port_has_sound(Port* self) -> NONNULL bool
- If MIDI port, returns if there are any events, if audio port, returns if there is sound in the buffer.
- auto port_get_full_designation(Port*const self, char* buf) -> NONNULL void
- Copies a full designation of
self
in the format "Track/Port" or "Track/Plugin/Port" inbuf
. - void port_get_all(GPtrArray* ports)
- Gathers all ports in the project and appends them in the given array.
- 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.
- auto port_disconnect_hw_inputs(Port* self) -> NONNULL void
- Disconnects all hardware inputs from the port.
- auto port_set_expose_to_backend(Port* self, int expose) -> NONNULL void
- Sets whether to expose the port to the backend and exposes it or removes it.
- auto port_is_exposed_to_backend(const Port* self) -> NONNULL int
- Returns if the port is exposed to the backend.
- auto port_rename_backend(Port* self) -> NONNULL void
- Renames the port on the backend side.
- auto port_set_control_value(Port* self, const float val, const bool is_normalized, const bool forward_event) -> NONNULL void
- Sets the given control value to the corresponding underlying structure in the Port.
- auto port_get_control_value(Port* self, const bool normalize) -> NONNULL HOT float
- Gets the given control value from the corresponding underlying structure in the Port.
- auto port_get_num_unlocked_srcs(const Port* self) -> NONNULL int
- Returns the number of unlocked (user-editable) sources.
- auto port_get_num_unlocked_dests(const Port* self) -> NONNULL int
- 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.
-
static auto port_apply_fader(Port* port,
float amp,
nframes_
t start_frame, const nframes_ t nframes) -> NONNULL void - Apply given fader value to port.
- auto port_process(Port* port, const EngineProcessTimeInfo*const time_nfo, const bool noroll) -> HOT NONNULL void
- First sets port buf to 0, then sums the given port signal from its inputs.
- auto ports_can_be_connected(const Port* src, const Port* dest) -> NONNULL bool
- Returns whether the Port's can be connected (if the connection will be valid and won't break the acyclicity of the graph).
- auto ports_disconnect(Port** ports, int num_ports, int deleting) -> NONNULL void
- Disconnects all the given ports.
- auto port_copy_metadata_from_project(Port* self, Port* project_port) -> NONNULL void
- Copies the metadata from a project port to the given port.
- auto port_copy_values(Port* self, const Port* other) -> NONNULL void
- Copies the port values from other to self.
- auto port_restore_from_non_project(Port* self, Port* non_project) -> NONNULL void
- Reverts the data on the corresponding project port for the given non-project port.
- auto port_clear_buffer(Port* port) -> HOT NONNULL void
- Clears the port buffer.
- auto port_disconnect_all(Port* port) -> NONNULL int
- Disconnects all srcs and dests from port.
- auto port_apply_pan_stereo(Port* l, Port* r, float pan, PanLaw pan_law, PanAlgorithm pan_algo) -> NONNULL void
- Applies the pan to the given L/R ports.
-
auto port_apply_pan(Port* port,
float pan,
PanLaw pan_law,
PanAlgorithm pan_algo,
nframes_
t start_frame, const nframes_ t nframes) -> NONNULL void - Applies the pan to the given port.
- auto port_get_hash(const void* ptr) -> NONNULL unsigned int
- Generates a hash for a given port.
- auto port_clone(const Port* src) -> Port*
- To be used during serialization.
- auto port_free(Port* port) -> NONNULL void
- Deletes port, doing required cleanup and updating counters.
- auto port_connection_clone(const PortConnection* src) -> NONNULL PortConnection*
- To be used during serialization.
- auto port_connection_free(PortConnection* self) -> NONNULL void
- Deletes port, doing required cleanup and updating counters.
- void port_connections_manager_regenerate_hashtables(PortConnectionsManager* self)
- Regenerates the hash tables.
- auto port_connections_manager_get_sources_or_dests(const PortConnectionsManager* self, GPtrArray* arr, const PortIdentifier* id, bool sources) -> int
- Adds the sources/destinations of id in the given array.
- auto port_connections_manager_get_source_or_dest(const PortConnectionsManager* self, const PortIdentifier* id, bool sources) -> PortConnection*
- Wrapper over port_
connections_ manager_ get_ sources_ or_ dests() that returns the first connection. - auto port_connections_manager_predicate_is_send_of(const void* obj, const void* user_data) -> bool
- Returns whether the given connection is for the given send.
- auto port_connections_manager_find(const PortConnectionsManager* self, GPtrArray* arr, GenericPredicateFunc predicate) -> int
- Adds the connections matching the given predicate to the given array (if given).
- auto port_connections_manager_ensure_connect(PortConnectionsManager* self, const PortIdentifier* src, const PortIdentifier* dest, float multiplier, bool locked, bool enabled) -> const PortConnection*
- Stores the connection for the given ports if it doesn't exist, otherwise updates the existing connection.
- auto port_connections_manager_ensure_disconnect(PortConnectionsManager* self, const PortIdentifier* src, const PortIdentifier* dest) -> bool
- 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.
- auto port_connections_manager_clone(const PortConnectionsManager* src) -> NONNULL PortConnectionsManager*
- To be used during serialization.
- auto port_connections_manager_free(PortConnectionsManager* self) -> NONNULL void
- Deletes port, doing required cleanup and updating counters.
- auto port_identifier_port_group_cmp(const void* p1, const void* p2) -> int
- Port group comparator function where p1 and p2 are pointers to Port.
- auto port_identifier_copy(PortIdentifier* dest, const PortIdentifier* src) -> NONNULL void
- Copy the identifier content from src to dest.
- auto port_identifier_is_equal(const PortIdentifier* src, const PortIdentifier* dest) -> WARN_UNUSED_RESULT HOT NONNULL bool
- Returns if the 2 PortIdentifier's are equal.
- auto port_identifier_is_equal_func(const void* a, const void* b) -> int
- To be used as GEqualFunc.
- 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.
- auto position_add_frames(Position* pos, const long frames) -> HOT void
- 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.
- auto position_from_ticks(Position* pos, double ticks) -> HOT NONNULL void
- Sets position to the given total tick count.
- auto position_to_ms(const Position* pos) -> long
- Returns the Position in milliseconds.
- 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.
- auto position_update_ticks_from_frames(Position* position) -> HOT NONNULL void
- Updates ticks.
- auto position_get_frames_from_ticks(double ticks) -> long
- Converts ticks to frames.
- auto position_update_frames_from_ticks(Position* position) -> HOT NONNULL void
- Updates frames.
- static void position_update(Position* self, bool from_ticks)
- Updates the position from ticks or 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.
- auto position_get_ticks_diff(const Position* end_pos, const Position* start_pos, const SnapGrid* sg) -> double
- Returns the difference in ticks between the two Position's, snapped based on the given SnapGrid (if any).
- auto position_to_string_alloc(const Position* pos) -> NONNULL char*
- Creates a string in the form of "0.0.0.0" from the given position.
- auto position_to_string(const Position* pos, char* buf) -> NONNULL void
- Creates a string in the form of "0.0.0.0" from the given position.
- auto position_print(const Position* pos) -> NONNULL void
- Prints the Position in the "0.0.0.0" form.
- auto position_get_total_bars(const Position* pos, bool include_current) -> NONNULL int
- Returns the total number of beats.
- auto position_get_total_beats(const Position* pos, bool include_current) -> NONNULL int
- Returns the total number of beats.
- auto position_get_total_sixteenths(const Position* pos, bool include_current) -> NONNULL int
- Returns the total number of sixteenths not including the current one.
- auto position_change_sign(Position* pos) -> NONNULL void
- Changes the sign of the position.
- auto position_get_bars(const Position* pos, bool start_at_one) -> NONNULL int
- Gets the bars of the position.
- auto position_get_beats(const Position* pos, bool start_at_one) -> NONNULL int
- Gets the beats of the position.
- auto position_get_sixteenths(const Position* pos, bool start_at_one) -> NONNULL int
- Gets the sixteenths of the position.
- auto position_get_ticks(const Position* pos) -> NONNULL double
- Gets the ticks of the position.
- void quantize_options_update_quantize_points(QuantizeOptions* self)
- Updates snap points.
- auto quantize_options_stringize(NoteLength note_length, NoteType note_type) -> char*
- Returns the grid intensity as a human-readable string.
- auto quantize_options_quantize_position(QuantizeOptions* self, Position* pos) -> double
- Quantizes the given Position using the given QuantizeOptions.
- auto quantize_options_clone(const QuantizeOptions* src) -> QuantizeOptions*
- Clones the QuantizeOptions.
- void quantize_options_free(QuantizeOptions* self)
- Free's the QuantizeOptions.
- auto recording_manager_handle_recording(RecordingManager* self, const TrackProcessor* track_processor, const EngineProcessTimeInfo*const time_nfo) -> REALTIME void
- Handles the recording logic inside the process cycle.
- auto recording_manager_process_events(RecordingManager* self) -> int
- GSourceFunc to be added using idle add.
- auto recording_manager_new(void) -> RecordingManager*
- Creates the event queue and starts the event loop.
- 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.
- auto region_find(const RegionIdentifier*const id) -> HOT NONNULL ZRegion*
- Looks for the ZRegion matching the identifier.
- auto region_print(const ZRegion* region) -> NONNULL void
- Print region info for debugging.
- auto region_get_link_group(ZRegion* self) -> RegionLinkGroup*
- Returns the region's link group.
- void region_set_link_group(ZRegion* region, int group_idx, bool update_identifier)
- Sets the link group to the region.
- auto region_find_midi_note(ZRegion* r, MidiNote* _mn) -> MidiNote*
- Returns the MidiNote matching the properties of the given MidiNote.
- auto region_timeline_frames_to_local(const ZRegion*const self, const long timeline_frames, const bool normalize) -> NONNULL HOT long
- Converts frames on the timeline (global) to local frames (in the clip).
- auto region_get_frames_till_next_loop_or_end(const ZRegion*const self, const long timeline_frames, long* ret_frames, bool* is_loop) -> NONNULL void
- Returns the number of frames until the next loop end point or the end of the region.
- auto region_set_lane(ZRegion* self, const TrackLane*const lane) -> NONNULL void
- Sets the track lane.
- void 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.
- auto region_stretch(ZRegion* self, double ratio) -> NONNULL void
- Stretch the region's contents.
- auto region_update_identifier(ZRegion* self) -> NONNULL void
- To be called every time the identifier changes to update the region's children.
- auto region_update_link_group(ZRegion* self) -> NONNULL void
- Updates all other regions in the region link group, if any.
- void region_move_to_lane(ZRegion* region, TrackLane* lane, int index_in_lane)
- Moves the given ZRegion to the given TrackLane.
- void region_move_to_track(ZRegion* region, Track* track, int index_in_lane)
- Moves the ZRegion to the given Track, maintaining the selection status of the ZRegion and the TrackLane position.
- static auto region_type_has_lane(const RegionType type) -> CONST int
- Returns if the given ZRegion type can exist in TrackLane's.
- void region_set_automation_track(ZRegion* region, AutomationTrack* at)
- Sets the automation track.
- auto region_get_automation_track(const ZRegion*const region) -> AutomationTrack*
- Gets the AutomationTrack using the saved index.
- void region_copy(ZRegion* src, ZRegion* dest)
- Copies the data from src to dest.
- auto region_is_hit(const ZRegion* region, const long gframes, const int inclusive) -> int
- Returns if the position is inside the region or not.
- auto region_is_hit_by_range(const ZRegion* region, const long gframes_start, const long gframes_end, const bool end_inclusive) -> int
- Returns if any part of the ZRegion is inside the given range, inclusive.
- auto region_at_position(Track* track, AutomationTrack* at, Position* pos) -> ZRegion*
- Returns the region at the given position in the given Track.
- auto region_generate_filename(ZRegion* region) -> char*
- Generates the filename for this region.
- auto region_is_recording(ZRegion* self) -> bool
- Returns if this region is currently being recorded onto.
- auto region_get_musical_mode(ZRegion* self) -> bool
- Returns whether the region is effectively in musical mode.
- void region_add_arranger_object(ZRegion* self, ArrangerObject* obj, bool fire_events)
- Wrapper for adding an arranger object.
- void region_unlink(ZRegion* region)
- Removes the link group from the region, if any.
- void region_remove_all_children(ZRegion* region)
- Removes all children objects from the region.
- void region_copy_children(ZRegion* dest, ZRegion* src)
- Clones and copies all children from src to dest.
- auto region_get_arranger_selections(ZRegion* self) -> ArrangerSelections*
- Returns the ArrangerSelections based on the given region type.
- auto region_validate(ZRegion* self, bool is_project) -> bool
- Sanity checking.
- void region_disconnect(ZRegion* self)
- Disconnects the region and anything using it.
- auto region_link_group_remove_region(RegionLinkGroup* self, ZRegion* region, bool autoremove_last_region_and_group, bool update_identifier) -> NONNULL void
- Remove the region from the link group.
- auto region_link_group_update(RegionLinkGroup* self, ZRegion* region) -> NONNULL void
- Updates all other regions in the link group.
- auto region_link_group_manager_add_group(RegionLinkGroupManager* self) -> int
- Adds a group and returns its index.
- void region_link_group_manager_remove_group(RegionLinkGroupManager* self, int group_id)
- Removes the group.
- 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.
-
auto router_get_max_route_playback_latency(Router* router) -> nframes_
t - Returns the max playback latency of the trigger nodes.
- auto router_is_processing_thread(const Router*const router) -> WARN_UNUSED_RESULT HOT NONNULL bool
- Returns if the current thread is a processing thread.
- auto router_is_processing_kickoff_thread(const Router*const self) -> WARN_UNUSED_RESULT HOT NONNULL bool
- Returns whether this is the thread that kicks off processing (thread that calls router_
start_ cycle()). - auto router_queue_control_port_change(Router* self, const ControlPortChange* change) -> NONNULL void
- Queues a control port change to be applied when processing starts.
- auto sample_processor_new(AudioEngine* engine) -> COLD WARN_UNUSED_RESULT SampleProcessor*
- Initializes a SamplePlayback with a sample to play back.
-
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_stop_file_playback(SampleProcessor* self)
- Stops playback of files (auditioning).
- auto sample_processor_clone(const SampleProcessor* src) -> SampleProcessor*
- To be used for serialization.
- auto musical_scale_new(MusicalScaleType type, MusicalNote root) -> MusicalScale*
- Creates new scale using type and root note.
- auto musical_scale_clone(MusicalScale* src) -> MusicalScale*
- Clones the scale.
- auto musical_scale_to_string(MusicalScale* scale) -> char*
- Prints the MusicalScale to a string.
- void musical_scale_strcpy(MusicalScale* scale, char* buf)
- Same as above but uses a buffer instead of allocating.
- static auto musical_scale_is_equal(MusicalScale* a, MusicalScale* b) -> int
- Returns 1 if the scales are equal.
- auto musical_scale_is_chord_in_scale(MusicalScale* scale, ChordDescriptor* chord) -> int
- Returns if all of the chord's notes are in the scale.
- auto musical_scale_is_accent_in_scale(MusicalScale* scale, MusicalNote chord_root, ChordType type, ChordAccent chord_accent) -> int
- Returns if the accent is in the scale.
- auto musical_scale_is_key_in_scale(MusicalScale* scale, MusicalNote key) -> int
- Returns if the given key is in the given MusicalScale.
- auto musical_scale_as_string(MusicalScale* scale) -> char*
- Returns the scale in human readable string.
- void musical_scale_free(MusicalScale* scale)
- Frees the MusicalScale.
- auto scale_object_new(MusicalScale* descr) -> ScaleObject*
- Creates a ScaleObject.
- void snap_grid_update_snap_points(SnapGrid* self, int max_bars)
- Updates snap points.
- auto snap_grid_get_snap_ticks(SnapGrid* self) -> int
- Gets a snap point's length in ticks.
- auto snap_grid_get_default_ticks(SnapGrid* self) -> int
- Gets a the default length in ticks.
- auto snap_grid_stringize(NoteLength note_length, NoteType note_type) -> char*
- Returns the grid intensity as a human-readable string.
- auto snap_grid_get_nearby_snap_point(const SnapGrid*const self, const Position* pos, const int return_prev) -> PURE NONNULL Position*
- Returns the next or previous SnapGrid point.
- auto stretcher_new_rubberband(unsigned int samplerate, unsigned int channels, double time_ratio, double pitch_ratio, bool realtime) -> Stretcher*
- Create a new Stretcher using the rubberband backend.
- auto 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) -> ssize_t
- Perform stretching.
- auto stretcher_get_latency(Stretcher* self) -> unsigned int
- Get latency in number of samples.
- auto stretcher_stretch_interleaved(Stretcher* self, float* in_samples, size_t in_samples_size, float** _out_samples) -> ssize_t
- Perform stretching.
- void stretcher_free(Stretcher* self)
- Frees the resampler.
- auto tempo_track_default(int track_pos) -> Track*
- 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.
-
auto tempo_track_get_bpm_at_pos(Track* track,
Position* pos) -> bpm_
t - Returns the BPM at the given pos.
-
auto tempo_track_get_current_bpm(Track* self) -> bpm_
t - Returns the current BPM.
-
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_beats_per_bar(Track* self, int beats_per_bar)
- Updates beat unit and anything depending on it.
- void track_init(Track* self, const int add_lane)
- Inits the Track, optionally adding a single lane.
- auto track_new(TrackType type, int pos, const char* label, const int with_lane) -> Track*
- Creates a track with the given label and returns it.
- auto track_clone(Track* track, GError** error) -> Track*
- Clones the track and returns the clone.
- auto track_type_has_channel(TrackType type) -> bool
- Returns if the given TrackType is a type of Track that has a Channel.
- auto track_set_magic(Track* self) -> NONNULL void
- Sets magic on objects recursively.
- auto track_set_muted(Track* track, bool mute, bool trigger_undo, bool auto_select, bool fire_events) -> NONNULL void
- Sets track muted and optionally adds the action to the undo stack.
- auto track_set_folded(Track* self, bool folded, bool trigger_undo, bool auto_select, bool fire_events) -> NONNULL void
- Sets track folded and optionally adds the action to the undo stack.
- auto track_type_is_deletable(TrackType type) -> NONNULL bool
- Returns whether the track type is deletable by the user.
- auto track_get_should_be_visible(Track* self) -> NONNULL bool
- Returns whether the track should be visible.
- auto track_get_full_visible_height(Track*const self) -> NONNULL double
- Returns the full visible height (main height + height of all visible automation tracks + height of all visible lanes).
- auto track_get_soloed(Track* self) -> HOT NONNULL bool
- Returns if the track is soloed.
- auto track_get_implied_soloed(Track* self) -> NONNULL bool
- Returns whether the track is not soloed on its own but its direct out (or its direct out's direct out, etc.) is soloed.
- auto track_get_muted(Track* self) -> NONNULL bool
- Returns if the track is muted.
- auto track_get_listened(Track* self) -> NONNULL bool
- Returns if the track is listened.
- auto track_get_monitor_audio(Track* self) -> NONNULL bool
- Returns whether monitor audio is on.
- auto track_set_monitor_audio(Track* self, bool monitor, bool auto_select, bool fire_events) -> NONNULL void
- Sets whether monitor audio is on.
- auto track_set_listened(Track* self, bool listen, bool trigger_undo, bool auto_select, bool fire_events) -> NONNULL void
- Sets track soloed, updates UI and optionally adds the action to the undo stack.
- auto track_set_recording(Track* track, bool recording, bool fire_events) -> NONNULL void
- Sets recording and connects/disconnects the JACK ports.
- auto track_set_soloed(Track* self, bool solo, bool trigger_undo, bool auto_select, bool fire_events) -> NONNULL void
- Sets track soloed, updates UI and optionally adds the action to the undo stack.
- auto track_is_selected(Track* self) -> NONNULL int
- Returns if Track is in TracklistSelections.
- void track_add_region(Track* track, ZRegion* region, AutomationTrack* at, int lane_pos, int gen_name, int fire_events)
- Adds a ZRegion to the given lane or AutomationTrack of the track.
- void track_insert_region(Track* track, ZRegion* region, AutomationTrack* at, int lane_pos, int idx, int gen_name, int fire_events)
- Inserts a ZRegion to the given lane or AutomationTrack of the track, at the given index.
- auto track_write_to_midi_file(Track* self, MIDI_FILE* mf) -> NONNULL void
- Writes the track to the given MIDI file.
- auto track_select(Track* self, bool select, bool exclusive, bool fire_events) -> NONNULL void
- Appends the Track to the selections.
- auto track_unselect_all(Track* self) -> NONNULL void
- Unselects all arranger objects in the track.
- auto track_clear(Track* self) -> NONNULL void
- Removes all objects recursively from the track.
- auto track_remove_region(Track* self, ZRegion* region, bool fire_events, bool free) -> NONNULL void
- 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.
- auto track_validate(Track* self) -> bool
- Verifies the identifiers on a live Track (in the project, not a clone).
- void track_add_folder_parents(Track* self, GPtrArray* parents, bool prepend)
- Adds the track's folder parents to the given array.
- auto track_get_direct_folder_parent(Track* track) -> Track*
- Returns the closest foldable parent or NULL.
- void track_remove_from_folder_parents(Track* self)
- Remove the track from all folders.
- auto track_get_region_at_pos(const Track* track, const Position* pos, bool include_region_end) -> ZRegion*
- Returns the region at the given position, or NULL.
- auto track_get_last_region(Track* track) -> ZRegion*
- 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.
- auto track_type_can_host_region_type(const TrackType tt, const RegionType rt) -> int
- Returns if the given TrackType can host the given RegionType.
- static auto track_type_can_record(const TrackType type) -> int
- Returns if the Track can record.
- void track_generate_automation_tracks(Track* track)
- Generates automatables for the track.
- void track_setup(Track* track)
- Wrapper.
- auto track_get_automation_tracklist(Track*const track) -> AutomationTracklist*
- Returns the automation tracklist if the track type has one, or NULL if it doesn't (like chord tracks).
- static auto track_get_channel(const Track*const track) -> NONNULL Channel*
- Returns the channel of the track, if the track type has a channel, or NULL if it doesn't.
- void track_update_children(Track* self)
- Updates the track's children.
- auto track_type_has_piano_roll(const TrackType type) -> bool
- Returns if the Track should have a piano roll.
- static auto track_has_inputs(const Track* track) -> int
- Returns if the Track should have an inputs selector.
- 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.
- auto track_get_name(Track* track) -> const char*
- Getter for the track name.
- auto track_set_name_with_action_full(Track* track, const char* name) -> NONNULL bool
- 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.
- auto track_get_unique_name(Track* track_to_skip, const char* name) -> char*
- Returns a unique name for a new track based on the given name.
- auto track_get_from_name(const char* name) -> Track*
- Returns the Track from the Project matching
name
. - static auto track_type_is_compatible_for_moving(const TrackType type1, const TrackType type2) -> int
- Returns if regions in tracks from type1 can be moved to type2.
- void track_update_positions(Track* self, bool from_ticks)
- Updates the frames/ticks of each position in each child of the track recursively.
- auto track_get_fader(Track* track, bool post_fader) -> Fader*
- Returns the Fader (if applicable).
- auto track_get_fader_type(const Track* track) -> FaderType
- Returns the FaderType corresponding to the given Track.
- auto track_type_get_prefader_type(TrackType type) -> FaderType
- Returns the prefader type corresponding to the given Track.
- void track_create_missing_lanes(Track* track, const int pos)
- Creates missing TrackLane's until pos.
- void track_remove_empty_last_lanes(Track* track)
- Removes the empty last lanes of the Track (except the last one).
- auto track_get_regions_in_range(Track* self, Position* p1, Position* p2, ZRegion** regions) -> int
- Returns all the regions inside the given range, or all the regions if both p1 and p2 are NULL.
- void track_comment_setter(void* track, const char* comment)
- Comment setter.
- void track_set_comment(Track* self, const char* comment, bool undoable)
- auto track_get_comment(void* track) -> const char*
- 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.
- auto track_get_plugin_at_slot(Track* track, PluginSlotType slot_type, int slot) -> Plugin*
- 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.
- void track_freeze(Track* self, bool freeze)
- 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.
- void track_free(Track* track)
- Wrapper for each track type.
- auto track_lane_new(Track* track, int pos) -> TrackLane*
- 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(). - void track_lane_update_positions(TrackLane* self, bool from_ticks)
- 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.
- auto track_lane_clone(const TrackLane* src, Track* track) -> TrackLane*
- Clones the TrackLane.
- void track_lane_write_to_midi_file(TrackLane* self, MIDI_FILE* mf)
- Writes the lane to the given MIDI file.
- auto track_lane_free(TrackLane* lane) -> NONNULL void
- Frees the TrackLane.
- auto track_processor_init_loaded(TrackProcessor* self, Track* track) -> COLD void
- Inits a TrackProcessor after a project is loaded.
- auto track_processor_new(Track* track) -> COLD WARN_UNUSED_RESULT TrackProcessor*
- 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(const 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_free(TrackProcessor* self)
- Frees the TrackProcessor.
- auto tracklist_init_loaded(Tracklist* self, Project* project, SampleProcessor* sample_processor) -> COLD void
- Initializes the tracklist when loading a project.
- auto tracklist_select_all(Tracklist* self, bool select, bool fire_events) -> NONNULL void
- 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.
- auto tracklist_find_track_by_name(Tracklist* self, const char* name) -> Track*
- Returns the Track matching the given name, if any.
- auto tracklist_find_track_by_name_hash(Tracklist* self, unsigned int hash) -> NONNULL Track*
- Returns the Track matching the given name, if any.
- auto tracklist_print_tracks(Tracklist* self) -> NONNULL void
- Prints the tracks (for debugging).
- auto tracklist_insert_track(Tracklist* self, Track* track, int pos, int publish_events, int recalc_graph) -> NONNULL void
- Adds given track to given spot in tracklist.
- auto tracklist_remove_track(Tracklist* self, Track* track, bool rm_pl, bool free_track, bool publish_events, bool recalc_graph) -> NONNULL void
- 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.
- auto tracklist_get_track(Tracklist* self, int idx) -> NONNULL HOT Track*
- Returns the track at the given index or NULL if the index is invalid.
- auto tracklist_get_track_pos(Tracklist* self, Track* track) -> int
- Returns the index of the given Track.
- auto tracklist_get_track_by_type(Tracklist* self, TrackType type) -> Track*
- Returns the first track found with the given type.
- auto tracklist_get_first_visible_track(Tracklist* self, const int pinned) -> Track*
- Returns the first visible Track.
- auto tracklist_get_prev_visible_track(Tracklist* self, Track* track) -> Track*
- Returns the previous visible Track in the same Tracklist as the given one (ie, pinned or not).
- auto tracklist_get_last_pos(Tracklist* self, const TracklistPinOption pin_opt, const bool visible_only) -> int
- Returns the index of the last Track.
- auto tracklist_get_last_track(Tracklist* self, const TracklistPinOption pin_opt, const int visible_only) -> Track*
- Returns the last Track.
- auto tracklist_get_next_visible_track(Tracklist* self, Track* track) -> Track*
- Returns the next visible Track in the same Tracklist as the given one (ie, pinned or not).
- auto tracklist_get_visible_track_after_delta(Tracklist* self, Track* track, int delta) -> Track*
- Returns the Track after delta visible Track's.
- auto tracklist_get_visible_track_diff(Tracklist* self, const Track* src, const Track* dest) -> int
- Returns the number of visible Tracks between src and dest (negative if dest is before src).
- auto tracklist_multiply_track_heights(Tracklist* self, double multiplier, bool visible_only, bool check_only, bool fire_events) -> bool
- Multiplies all tracks' heights and returns if the operation was valid.
- void tracklist_handle_file_drop(Tracklist* self, char** uri_list, SupportedFile* orig_file, Track* track, TrackLane* lane, Position* pos, bool perform_actions)
- 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 paction based on a drag.
- auto tracklist_track_name_is_unique(Tracklist* self, const char* name, Track* track_to_skip) -> bool
- Returns 1 if the track name is not taken.
- auto tracklist_has_soloed(const Tracklist* self) -> NONNULL bool
- Returns if the tracklist has soloed tracks.
- auto tracklist_has_listened(const Tracklist* self) -> NONNULL bool
- Returns if the tracklist has listened tracks.
- auto tracklist_get_num_visible_tracks(Tracklist* self, int visible) -> int
- 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.
- auto tracklist_clone(Tracklist* src) -> Tracklist*
- Only clones what is needed for project save.
- void guile_tracklist_define_module(void)
- Define guile module.
- auto transport_new(AudioEngine* engine) -> Transport*
- Initialize transport.
- void transport_init_loaded(Transport* self, AudioEngine* engine, Track* tempo_track)
- Initialize loaded transport.
- auto transport_clone(const Transport* src) -> Transport*
- 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). - void transport_stretch_audio_regions(Transport* self, TimelineSelections* sel, bool with_fixed_ratio, double time_ratio)
- Stretches audio regions.
- 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 long nframes)
- Moves the playhead by the time corresponding to given samples, taking into account the loop end point.
- void transport_set_playhead_pos(Transport* self, Position* pos)
- Setter for playhead Position.
- void transport_get_playhead_pos(Transport* self, Position* pos)
- Getter for playhead Position.
- void transport_move_backward(Transport* self)
- Move to the previous snap point on the timeline.
- void transport_move_forward(Transport* self)
- Move to the next snap point on the timeline.
- void transport_move_playhead(Transport* self, Position* target, bool panic, bool set_cue_point, bool fire_events)
- Moves playhead to given pos.
- void transport_set_loop(Transport* self, bool enabled)
- Enables or disables loop.
- 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 long 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.
- auto transport_get_ppqn(Transport* self) -> double
- 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_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.
-
static auto transport_is_loop_point_met(const Transport* self,
const long g_start_frames,
const nframes_
t nframes) -> HOT NONNULL static WARN_UNUSED_RESULT nframes_ t - Returns the number of processable frames until and excluding the loop end point as a positive number (>= 1) if the loop point was met between g_start_frames and (g_start_frames + nframes), otherwise returns 0;.
- 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_set_recording(Transport* self, bool record, bool fire_events)
- Sets recording on/off.
- auto velocity_new(MidiNote* midi_note, const uint8_t vel) -> Velocity*
- 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.
- auto velocity_is_equal(Velocity* src, Velocity* dest) -> int
- 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.
- auto velocity_get_midi_note(const Velocity*const self) -> MidiNote*
- Returns the owner MidiNote.
Variables
- int index
- Index in parent AutomationTracklist.
- PortIdentifier port_id
- Identifier of the Port this AutomationTrack is for.
- bool created
- Whether it has been created by the user yet or not.
- ZRegion** regions
- The automation Region's.
- bool visible
- Whether visible or not.
- int y
- Y local to track.
- double height
- Position of multipane handle.
- float last_recorded_value
- Last value recorded in this automation track.
- AutomationMode automation_mode
- Automation mode.
- AutomationRecordMode record_mode
- Automation record mode, when AutomationTrack::
automation_mode is set to record. - bool recording_started
- To be set to true when recording starts (when the first change is received) and false when recording ends.
- ZRegion* recording_region
- Region currently recording to.
- bool recording_start_sent
- This is a flag to let the recording manager know that a START signal was already sent for recording.
- bool recording_paused
- This must only be set by the RecordingManager when temporarily pausing recording, eg when looping or leaving the punch range.
- CustomButtonWidget* top_right_buttons
- Buttons used by the track widget.
- AutomationModeWidget* am_widget
- Automation mode button group.
- AutomationTracklist* atl
- Pointer to owner automation tracklist, if any.
- Port* port
- Cache used during DSP.
- Port* port
- Port associated with this meter.
- TruePeakDsp* true_peak_processor
- True peak processor.
- float true_peak
- Current true peak.
- KMeterDsp* kmeter_processor
- K RMS processor, if K meter.
- MeterAlgorithm algorithm
- Algorithm to use.
- float prev_max
- Previous max, used when holding the max value.
- float last_amp
- Last meter value (in amplitude), used to show a falloff and avoid sudden dips.
- gint64 last_draw_time
- Time the last val was taken at (last draw time).
- static const Position POSITION_START
- Start Position to be used in calculations.
- static const cyaml_strval_t note_type_short_strings
- These are not meant to be serialized, they are only used for convenience.
Defines
- #define AUDIO_REGION_DEFAULT_FADE_MS
- Default fade to inject when playing back.
- #define AUTOMATION_RECORDING_TOUCH_REL_MS
- Relase time in ms when in touch record mode.
- #define CHANNEL_MAGIC
- Magic number to identify channels.
- #define CHANNEL_SEND_POST_FADER_START_SLOT
- The slot where post-fader sends begin (starting from 0).
- #define chord_track_get_chord_at_playhead(ct)
- Returns the current chord.
- #define chord_track_get_scale_at_playhead(ct)
- Returns the current scale.
- #define control_port_is_val_toggled(val)
- Checks if the given value is toggled.
- #define control_port_is_toggled(self)
- Returns if the control port is toggled.
- #define CURVE_SUPERELLIPSE_CURVINESS_BOUND
- Bounds for each algorithm.
- #define engine_set_run(engine, _run)
- Set whether engine should process (true) or skip (false).
- #define ENGINE_EVENTS_PUSH(et, _arg, _uint_arg, _float_arg)
- Push events.
- #define engine_is_port_own(self, port)
- Returns 1 if the port is an engine port or control room port, otherwise 0.
- #define EXT_PORTS_MAX
- Maximum external ports.
- #define fader_get_listened(self)
- Returns whether the fader is listened.
- #define MAX_MIDI_EVENTS
- Max events to hold in queues.
- #define midi_region_add_midi_note(region, midi_note, pub_events)
- Adds the MidiNote to the given ZRegion.
- #define PORT_NOT_OWNED
- Special ID for owner_pl, owner_ch, etc.
- #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 position_between_frames_excl2(pos, f1, f2)
- Whether the position starts on or after f1 and before f2.
- #define position_compare(p1, p2)
- Compares 2 positions based on their frames.
- #define position_is_before(_pos, _cmp)
- Checks if _pos is before _cmp.
- #define position_is_before_or_equal(_pos, _cmp)
- Checks if _pos is before or equal to _cmp.
- #define position_is_equal(_pos, _cmp)
- Checks if _pos is equal to _cmp.
- #define position_is_after(_pos, _cmp)
- Checks if _pos is after _cmp.
- #define position_is_after_or_equal(_pos, _cmp)
- Checks if _pos is after or equal to _cmp.
- #define position_compare_ticks(p1, p2)
- Compares 2 positions based on their total ticks.
- #define position_is_between(_pos, _start, _end)
- Returns if _pos is after or equal to _start and before _end.
- #define position_is_between_excl_start(_pos, _start, _end)
- Returns if _pos is after _start and before _end.
- #define POSITION_INIT_ON_STACK(name)
- Inits the default position on the stack.
- #define position_init(__pos)
- Initializes given position.
- #define position_set_to_pos(_pos, _target)
- Sets position to target position.
- #define position_to_frames(x)
- Deprecated - added for compatibility.
- #define RECORDING_EVENTS_PUSH_AUDIO(et, _arg)
- Push events.
- #define recording_event_init(re)
- Inits an already allocated recording event.
- #define region_type_can_fade(rtype)
- Returns if the given ZRegion type can have fades.
- #define sample_playback_init(self, _buf, _buf_size, _channels, _vol, _start_offset)
- Initializes a SamplePlayback with a sample to play back.
- #define track_is_auditioner(self)
- Whether this track is part of the SampleProcessor auditioner tracklist.
- #define track_is_pinned(x)
- Returns whether the track is pinned.
- #define track_create_for_plugin_at_idx_w_action(type, pl_setting, idx, error)
- Create track at index for plugin with action.
- #define track_create_empty_with_action(type, error)
- Creates a new empty track at the end of the tracklist.
- #define VELOCITY_DEFAULT
- Default velocity.
Enum documentation
enum AudioFunctionType
#include <audio/audio_function.h>
enum BalanceControlAlgorithm
#include <audio/balance_control.h>
See https:/
Enumerators | |
---|---|
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. |
enum ChordAccent
Chord accents.
Enumerators | |
---|---|
CHORD_ACC_NONE | |
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. |
NUM_CHORD_ACCENTS |
enum CurveAlgorithm
The algorithm to use for curves.
See https:/
Enumerators | |
---|---|
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:/ |
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:/ Taken from Vital synth. |
CURVE_ALGORITHM_PULSE |
Pulse (square). |
CURVE_ALGORITHM_LOGARITHMIC |
a = log (n) b = 1 / (log (1 + (1 / n))) smaller numbers tilt upy1 = (log (x + n) - a) * b smaller numbers tilt downy2 = (a - log (x + n)) * b where 0 < n <= 10 See https:/ Taken from Ardour. |
NUM_CURVE_ALGORITHMS |
enum BounceMode
Mode used when bouncing, either during exporting or when bouncing tracks or regions to audio.
Enumerators | |
---|---|
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. |
enum AudioFormat
Audio format.
Enumerators | |
---|---|
AUDIO_FORMAT_FLAC | |
AUDIO_FORMAT_OGG_VORBIS | |
AUDIO_FORMAT_OGG_OPUS | |
AUDIO_FORMAT_WAV | |
AUDIO_FORMAT_MP3 | |
AUDIO_FORMAT_MIDI | |
AUDIO_FORMAT_RAW |
Raw audio data. |
NUM_AUDIO_FORMATS |
enum ExportMode
Export mode.
If this is anything other than EXPORT_
Enumerators | |
---|---|
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. |
enum FaderType
Fader type.
Enumerators | |
---|---|
FADER_TYPE_NONE | |
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_MIDI_CHANNEL | |
FADER_TYPE_GENERIC |
For generic uses. |
enum MidiFaderMode
Enumerators | |
---|---|
MIDI_FADER_MODE_VEL_MULTIPLIER |
Multiply velocity of all MIDI note ons. |
MIDI_FADER_MODE_CC_VOLUME |
Send CC volume event on change TODO. |
enum GraphExportType
#include <audio/graph_export.h>
Export type.
enum GraphNodeType
#include <audio/graph_node.h>
Graph nodes can be either ports or processors.
Processors can be plugins, faders, etc.
Enumerators | |
---|---|
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_MODULATOR_MACRO_PROCESOR | |
ROUTE_NODE_TYPE_CHANNEL_SEND |
Channel send. |
enum MarkerType
Marker type.
Enumerators | |
---|---|
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. |
enum MeterAlgorithm
#include <audio/meter.h>
Enumerators | |
---|---|
METER_ALGORITHM_AUTO |
Use default algorithm for the port. |
METER_ALGORITHM_DIGITAL_PEAK | |
METER_ALGORITHM_TRUE_PEAK | |
METER_ALGORITHM_RMS | |
METER_ALGORITHM_K |
enum MetronomeType
#include <audio/metronome.h>
The type of the metronome sound.
enum MidiEventType
#include <audio/midi_event.h>
Type of MIDI event.
These are in order of precedence.
Enumerators | |
---|---|
MIDI_EVENT_TYPE_PITCHBEND | |
MIDI_EVENT_TYPE_CONTROLLER | |
MIDI_EVENT_TYPE_NOTE_OFF | |
MIDI_EVENT_TYPE_NOTE_ON | |
MIDI_EVENT_TYPE_ALL_NOTES_OFF | |
MIDI_EVENT_TYPE_RAW |
Unknown type. |
enum PortInternalType
What the internal data is.
Enumerators | |
---|---|
INTERNAL_NONE | |
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. |
enum PortUnit
Port unit to be displayed in the UI.
Enumerators | |
---|---|
PORT_UNIT_NONE | |
PORT_UNIT_HZ | |
PORT_UNIT_MHZ | |
PORT_UNIT_DB | |
PORT_UNIT_DEGREES | |
PORT_UNIT_SECONDS | |
PORT_UNIT_MS |
Milliseconds. |
enum PortOwnerType
Type of owner.
Enumerators | |
---|---|
PORT_OWNER_TYPE_AUDIO_ENGINE | |
PORT_OWNER_TYPE_PLUGIN |
Plugin owner. |
PORT_OWNER_TYPE_TRACK |
Track owner. |
PORT_OWNER_TYPE_CHANNEL |
Channel owner. |
PORT_OWNER_TYPE_FADER | |
PORT_OWNER_TYPE_CHANNEL_SEND |
Channel send. PortIdentifier.port_ |
PORT_OWNER_TYPE_TRACK_PROCESSOR | |
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. |
enum PortFlags
Port flags.
Enumerators | |
---|---|
PORT_FLAG_STEREO_L | |
PORT_FLAG_STEREO_R | |
PORT_FLAG_PIANO_ROLL | |
PORT_FLAG_SIDECHAIN |
See http:/ |
PORT_FLAG_MAIN_PORT |
See http:/ |
PORT_FLAG_MANUAL_PRESS | |
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_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 procesor 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). @seealso http:/ |
enum PortFlags2
enum RecordingEventType
#include <audio/recording_event.h>
Enumerators | |
---|---|
RECORDING_EVENT_TYPE_START_TRACK_RECORDING | |
RECORDING_EVENT_TYPE_START_AUTOMATION_RECORDING | |
RECORDING_EVENT_TYPE_MIDI |
These events are for processing any range. |
RECORDING_EVENT_TYPE_AUDIO | |
RECORDING_EVENT_TYPE_AUTOMATION | |
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. |
RECORDING_EVENT_TYPE_PAUSE_AUTOMATION_RECORDING | |
RECORDING_EVENT_TYPE_STOP_TRACK_RECORDING | |
RECORDING_EVENT_TYPE_STOP_AUTOMATION_RECORDING |
enum RegionMusicalMode
Musical mode setting for audio regions.
Enumerators | |
---|---|
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. |
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).
enum MusicalScaleType
Scale type (name) eg Aeolian.
enum NoteType
Enumerators | |
---|---|
NOTE_TYPE_NORMAL | |
NOTE_TYPE_DOTTED |
2/3 of its original size |
NOTE_TYPE_TRIPLET |
3/2 of its original size |
enum NoteLengthType
Enumerators | |
---|---|
NOTE_LENGTH_CUSTOM |
Custom length. |
NOTE_LENGTH_LINK |
Link length with snap setting. |
NOTE_LENGTH_LAST_OBJECT |
Use last created object's length. |
enum StretcherBackend
#include <audio/stretcher.h>
Enumerators | |
---|---|
STRETCHER_BACKEND_RUBBERBAND |
Lib rubberband. |
STRETCHER_BACKEND_PAULSTRETCH |
Paulstretch. |
STRETCHER_BACKEND_SBSMS |
SBSMS - Subband Sinusoidal Modeling Synthesis. |
enum BeatUnit
#include <audio/tempo_track.h>
Beat unit.
enum TrackType
The Track's type.
Enumerators | |
---|---|
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. |
enum 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.
Enumerators | |
---|---|
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_ |
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_ |
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_ |
Typedef documentation
typedef struct ChannelSend ChannelSend
Channel send.
The actual connection is tracked separately by PortConnectionsManager.
typedef struct ChordDescriptor ChordDescriptor
A ChordDescriptor describes a chord and is not linked to any specific object by itself.
Chord objects should include a ChordDescriptor.
typedef enum CurveAlgorithm CurveAlgorithm
The algorithm to use for curves.
typedef struct Ditherer Ditherer
#include <audio/ditherer.h>
typedef struct AudioEncoder AudioEncoder
#include <audio/encoder.h>
Struct for holding info for encoding.
typedef enum ExportMode ExportMode
Export mode.
If this is anything other than EXPORT_
typedef struct Graph Graph
#include <audio/graph.h>
typedef enum GraphExportType GraphExportType
#include <audio/graph_export.h>
Export type.
typedef enum GraphNodeType GraphNodeType
#include <audio/graph_node.h>
Graph nodes can be either ports or processors.
Processors can be plugins, faders, etc.
typedef struct GraphNode GraphNode
#include <audio/graph_node.h>
A node in the processing graph.
typedef struct Track MarkerTrack
#include <audio/marker_track.h>
MarkerTrack is just a Track.
typedef struct Meter Meter
#include <audio/meter.h>
A Meter used by a single GUI element.
typedef enum MetronomeType MetronomeType
#include <audio/metronome.h>
The type of the metronome sound.
typedef struct Metronome Metronome
#include <audio/metronome.h>
Metronome settings.
typedef enum MidiEventType MidiEventType
#include <audio/midi_event.h>
Type of MIDI event.
These are in order of precedence.
typedef struct MidiEvent MidiEvent
#include <audio/midi_event.h>
Backend-agnostic MIDI event descriptor.
typedef struct MidiEvents MidiEvents
#include <audio/midi_event.h>
Container for passing midi events through ports.
This should be passed in the data field of MIDI Ports
typedef struct MidiEventHeader MidiEventHeader
#include <audio/midi_event.h>
Used by Windows MME and RtMidi when adding events to the ring.
typedef struct ModulatorMacroProcessor ModulatorMacroProcessor
Modulator macro button processor.
Has 1 control input, many CV inputs and 1 CV output.
Can only belong to modulator track.
typedef struct AudioPool AudioPool
An audio pool is a pool of audio files and their corresponding float arrays in memory that are referenced by regions.
Instead of associating audio files with regions, all audio files (and their edited counterparts after some hard editing like stretching) are saved in the pool.
typedef struct StereoPorts StereoPorts
L & R port, for convenience.
Must ONLY be created via stereo_ports_new()
typedef struct PortConnection PortConnection
#include <audio/port_connection.h>
A connection between two ports.
typedef struct PortConnectionsManager PortConnectionsManager
#include <audio/port_connections_manager.h>
Port connections manager.
typedef struct PortIdentifier PortIdentifier
Struct used to identify Ports in the project.
This should include some members of the original struct enough to identify the port. To be used for sources and dests.
This must be filled in before saving and read from while loading to fill in the srcs/dests.
typedef struct RecordingEvent RecordingEvent
#include <audio/recording_event.h>
A recording event.
During recording, a recording event must be sent in each cycle for all record-enabled tracks.
typedef enum RegionType 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).
typedef struct SamplePlayback SamplePlayback
#include <audio/sample_playback.h>
A sample playback handle to be used by the engine.
typedef struct SampleProcessor SampleProcessor
A processor to be used in the routing graph for playing samples independent of the timeline.
Also used for auditioning files.
typedef struct Stretcher Stretcher
#include <audio/stretcher.h>
Stretcher interface.
typedef enum BeatUnit BeatUnit
#include <audio/tempo_track.h>
Beat unit.
typedef struct Tracklist Tracklist
The Tracklist contains all the tracks in the Project.
There should be a clear separation between the Tracklist and the Mixer. The Tracklist should be concerned with Tracks in the arranger, and the Mixer should be concerned with Channels, routing and Port connections.
typedef enum TransportRecordingMode 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.
typedef struct GraphNode GraphNode
#include <audio/graph.h>
A node in the processing graph.
typedef struct MidiEvents MidiEvents
#include <audio/instrument_track.h>
Container for passing midi events through ports.
This should be passed in the data field of MIDI Ports
Function documentation
char* audio_function_get_detailed_action_for_type(AudioFunctionType type,
const char* base_action)
#include <audio/audio_function.h>
Returns a detailed action name to be used for actionable widgets or menus.
Parameters | |
---|---|
type | |
base_action | Base action to use. |
static const char* audio_function_get_plugin_uri_for_type(AudioFunctionType type)
#include <audio/audio_function.h>
Returns the URI of the plugin responsible for handling the type, if any.
int audio_function_apply(ArrangerSelections* sel,
AudioFunctionType type,
const char* uri,
GError** error)
#include <audio/audio_function.h>
Applies the given action to the given selections.
Parameters | |
---|---|
sel | Selections to edit. |
type | Function 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). |
uri | |
error | |
Returns | Non-zero if error. |
This will save a file in the pool and store the pool ID in the selections.
ZRegion* audio_region_new(const int pool_id,
const char* filename,
bool read_from_pool,
const float* frames,
const long 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)
#include <audio/audio_region.h>
Creates a region for audio data.
Parameters | |
---|---|
pool_id | The pool ID. This is used when creating clone regions (non-main) and must be -1 when creating a new clip. |
filename | Filename, if loading from file, otherwise NULL. |
read_from_pool | Whether to save the given filename or frames to pool and read the data from the pool. Only used if filename or frames is given. |
frames | Float array, if loading from float array, otherwise NULL. |
nframes | Number of frames per channel. |
clip_name | Name of audio clip, if not loading from file. |
channels | |
bit_depth | Bit depth, if using frames. |
start_pos | |
track_name_hash | |
lane_pos | |
idx_inside_lane |
AudioClip* audio_region_get_clip(const ZRegion* self)
#include <audio/audio_region.h>
Returns the audio clip associated with the Region.
void audio_region_set_clip_id(ZRegion* self,
int clip_id)
#include <audio/audio_region.h>
Sets the clip ID on the region and updates any references.
void audio_region_replace_frames(ZRegion* self,
float* frames,
size_t start_frame,
size_t num_frames,
bool duplicate_clip)
#include <audio/audio_region.h>
Replaces the region's frames from start_frames with frames.
Parameters | |
---|---|
self | |
frames | Frames, interleaved. |
start_frame | |
num_frames | |
duplicate_clip | Whether to duplicate the clip (eg, when other regions refer to it). |
REALTIME HOT NONNULL void audio_region_fill_stereo_ports(ZRegion* self,
long g_start_frames,
nframes_ t cycle_start_offset,
nframes_ t nframes,
StereoPorts* stereo_ports)
#include <audio/audio_region.h>
Fills audio data from the region.
Parameters | |
---|---|
self | |
g_start_frames | Global start frame. |
cycle_start_offset | The start frame offset from 0 in this cycle. |
nframes | Number of frames at start Position. |
stereo_ports | StereoPorts to fill. |
void audio_region_free_members(ZRegion* self)
#include <audio/audio_region.h>
Frees members only but not the audio region itself.
Regions should be free'd using region_free.
int automation_function_apply(ArrangerSelections* sel,
AutomationFunctionType type,
GError** error)
#include <audio/automation_function.h>
Applies the given action to the given selections.
Parameters | |
---|---|
sel | Selections to edit. |
type | Function type. |
error |
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 | |
---|---|
self | |
real_val | |
is_normalized | Whether the given value is normalized. |
pub_events |
HOT double automation_point_get_normalized_value_in_curve(AutomationPoint* ap, double x)
The function to return a point on the curve.
Parameters | |
---|---|
ap | The start point (0, 0). |
x | Normalized x. |
See https:/
ZRegion* automation_region_new(const Position* start_pos,
const Position* end_pos,
unsigned int track_name_hash,
int at_idx,
int idx_inside_at)
#include <audio/automation_region.h>
Creates a new ZRegion for automation.
void automation_region_print_automation(ZRegion* self)
#include <audio/automation_region.h>
Prints the automation in this Region.
void automation_region_force_sort(ZRegion* self)
#include <audio/automation_region.h>
Forces sort of the automation points.
void automation_region_add_ap(ZRegion* self,
AutomationPoint* ap,
int pub_events)
#include <audio/automation_region.h>
Adds an AutomationPoint to the Region.
AutomationPoint* automation_region_get_prev_ap(ZRegion* self,
AutomationPoint* ap)
#include <audio/automation_region.h>
Returns the AutomationPoint before the given one.
HOT AutomationPoint* automation_region_get_next_ap(ZRegion* self,
AutomationPoint* ap,
bool check_positions,
bool check_transients)
#include <audio/automation_region.h>
Returns the AutomationPoint after the given one.
Parameters | |
---|---|
self | |
ap | |
check_positions | Compare positions instead of just getting the next index. |
check_transients | Also check the transient of each object. This only matters if check_positions is true. |
void automation_region_remove_ap(ZRegion* self,
AutomationPoint* ap,
bool freeing_region,
int free)
#include <audio/automation_region.h>
Removes the AutomationPoint from the ZRegion, optionally freeing it.
Parameters | |
---|---|
self | |
ap | |
freeing_region | |
free | Free the AutomationPoint after removing it. |
void automation_region_get_aps_since_last_recorded(ZRegion* self,
Position* pos,
AutomationPoint** aps,
int* num_aps)
#include <audio/automation_region.h>
Returns the automation points since the last recorded automation point (if the last recorded automation point was before the current pos).
AutomationPoint* automation_region_get_ap_around(ZRegion* self,
Position* _pos,
double delta_ticks,
bool before_only)
#include <audio/automation_region.h>
Returns an automation point found within +/- delta_ticks from the position, or NULL.
Parameters | |
---|---|
self | |
_pos | |
delta_ticks | |
before_only | Only check previous automation points. |
NONNULL void automation_region_free_members(ZRegion* self)
#include <audio/automation_region.h>
Frees members only but not the ZRegion itself.
Regions should be free'd using region_free.
NONNULL AutomationTrack* automation_track_find_from_port_id(PortIdentifier* id, bool basic_search)
Parameters | |
---|---|
id | |
basic_search | If true, only basic port identifier members are checked. |
HOT AutomationTrack* automation_track_find_from_port(Port* port, Track* track, bool basic_search)
Finds the AutomationTrack associated with port
.
Parameters | |
---|---|
port | |
track | The track that owns the port, if known. |
basic_search |
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 | |
---|---|
at | |
cur_time | Current time from g_get_monotonic_time() passed here to ensure the same timestamp is used in sequential calls. |
HOT NONNULL bool automation_track_should_be_recording(AutomationTrack* at, gint64 cur_time, bool record_aps)
Returns if the automation track should currently be recording data.
Parameters | |
---|---|
at | |
cur_time | Current time from g_get_monotonic_time() passed here to ensure the same timestamp is used in sequential calls. |
record_aps | If 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. |
Returns false if in touch mode after the release time has passed.
This function assumes that the transport will be rolling.
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)
Returns the visible y offset from the top of the track widget.
Parameters | |
---|---|
self | |
from_ticks | Whether to update the positions based on ticks (true) or frames (false). |
Updates each position in each child of the automation track recursively.
NONNULL AutomationPoint* automation_track_get_ap_before_pos(const AutomationTrack* self, const Position* pos, bool ends_after)
Returns the automation point before the Position on the timeline.
Parameters | |
---|---|
self | |
pos | |
ends_after | Whether to only check in regions that also end after pos (ie, the region surrounds pos), otherwise check in the region that ends last. |
ZRegion* automation_track_get_region_before_pos(const AutomationTrack* self, const Position* pos, bool ends_after)
Returns the ZRegion that starts before given Position, if any.
Parameters | |
---|---|
self | |
pos | |
ends_after | Whether to only check for regions that also end after pos (ie, the region surrounds pos), otherwise get the region that ends last. |
NONNULL float automation_track_get_val_at_pos(AutomationTrack* at, Position* pos, bool normalized, bool ends_after)
Returns the actual parameter value at the given position.
Parameters | |
---|---|
at | |
pos | |
normalized | Whether to return the value normalized. |
ends_after | Whether to only check in regions that also end after pos (ie, the region surrounds pos), otherwise check in the region that ends last. |
If there is no automation point/curve during the position, it returns the current value of the parameter it is automating.
void automation_tracklist_print_ats(AutomationTracklist* self)
Prints info about all the automation tracks.
Used for debugging.
void automation_tracklist_update_positions(AutomationTracklist* self, bool from_ticks)
Updates the frames of each position in each child of the automation tracklist recursively.
Parameters | |
---|---|
self | |
from_ticks | Whether to update the positions based on ticks (true) or frames (false). |
void automation_tracklist_update_track_name_hash(AutomationTracklist* self, Track* track)
Updates the Track position of the Automatable's and AutomationTrack's.
Parameters | |
---|---|
self | |
track | The Track to update to. |
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.
Parameters | |
---|---|
self | |
at | |
index | |
push_down | False to swap positions with the current AutomationTrack, or true to push down all the tracks below. |
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.
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.
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. |
---|
void balance_control_get_calc_lr(BalanceControlAlgorithm algo,
float pan,
float* calc_l,
float* calc_r)
#include <audio/balance_control.h>
Returns the coefficients to multiply the L and R signal with.
NONNULL void channel_handle_recording(Channel* self,
const long g_frames_start,
const nframes_ t nframes)
Handles the recording logic inside the process cycle.
Parameters | |
---|---|
self | |
g_frames_start | Global start frames. |
nframes | Number of frames to process. |
The MidiEvents are already dequeued at this point.
void channel_connect(Channel* ch)
Connects the channel's ports.
This should only be called on project tracks.
NONNULL void channel_prepare_process(Channel* channel)
Prepares the channel for processing.
To be called before the main cycle each time on all channels.
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.
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.
Parameters | |
---|---|
channel | The Channel. |
slot_type | |
pos | The position in the strip starting from 0. |
plugin | The plugin to add. |
confirm | Confirm if an existing plugin will be overwritten. |
moving_plugin | Whether or not we are moving the plugin. |
gen_automatables | Generatate plugin automatables. To be used when creating a new plugin only. |
recalc_graph | Recalculate mixer graph. |
pub_events | Publish events. |
Returns | true if plugin added, false if not. |
The plugin must be already instantiated at this point.
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.
Parameters | |
---|---|
channel | |
slot_type | |
slot | |
moving_plugin | Whether or not we are moving the plugin. |
deleting_plugin | Whether or not we are deleting the plugin. |
deleting_channel | If true, the automation tracks associated with the plugin are not deleted at this time. |
recalc_graph | Recalculate mixer graph. |
FIXME this is the same as modulator_
Channel* channel_clone(Channel* ch, Track* track, GError** error)
Clones the channel recursively.
Parameters | |
---|---|
ch | |
track | The track to use for getting the name. @bool src_is_project Whether ch is a project channel. |
error | To be filled if an error occurred. |
NONNULL void channel_disconnect(Channel* channel, bool remove_pl)
Disconnects the channel from the processing chain.
Parameters | |
---|---|
channel | |
remove_pl | Remove the Plugin from the Channel. Useful when deleting the channel. |
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.
NONNULL void channel_free(Channel* channel)
Frees the channel.
Track* channel_send_get_target_track(ChannelSend* self, Track* owner)
Gets the target track.
Parameters | |
---|---|
self | |
owner | The owner track of the send (optional). |
NONNULL StereoPorts* channel_send_get_target_sidechain(ChannelSend* self)
Gets the target sidechain port.
Returned StereoPorts instance must be free'd.
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.
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.
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 | |
---|---|
chord | |
key | A note inside a single octave (0-11). |
bool chord_descriptor_is_key_bass(ChordDescriptor* chord, MusicalNote key)
Returns if key is the bass or root note of chord.
Parameters | |
---|---|
chord | |
key | A note inside a single octave (0-11). |
const char* chord_descriptor_chord_type_to_string(ChordType type)
Returns the chord type as a string (eg.
"aug").
const char* chord_descriptor_chord_accent_to_string(ChordAccent accent)
Returns the chord accent as a string (eg.
"j7").
const char* chord_descriptor_note_to_string(MusicalNote note)
Returns the musical note as a string (eg.
"C3").
char* chord_descriptor_to_new_string(const ChordDescriptor* chord)
Returns the chord in human readable string.
MUST be free'd by caller.
NONNULL ZRegion* chord_region_new(const Position* start_pos,
const Position* end_pos,
int idx)
#include <audio/chord_region.h>
Creates a new ZRegion for chords.
Parameters | |
---|---|
start_pos | |
end_pos | |
idx | Index inside chord track. |
NONNULL void chord_region_insert_chord_object(ZRegion* self,
ChordObject* chord,
int pos,
bool fire_events)
#include <audio/chord_region.h>
Inserts a ChordObject to the Region.
NONNULL void chord_region_add_chord_object(ZRegion* self,
ChordObject* chord,
bool fire_events)
#include <audio/chord_region.h>
Adds a ChordObject to the Region.
NONNULL void chord_region_remove_chord_object(ZRegion* self,
ChordObject* chord,
int free,
bool fire_events)
#include <audio/chord_region.h>
Removes a ChordObject from the Region.
Parameters | |
---|---|
self | |
chord | |
free | Optionally free the ChordObject. |
fire_events |
NONNULL void chord_region_free_members(ZRegion* self)
#include <audio/chord_region.h>
Frees members only but not the ZRegion itself.
Regions should be free'd using region_free.
ChordTrack* chord_track_new(int track_pos)
#include <audio/chord_track.h>
Creates a new chord Track.
void chord_track_init(Track* track)
#include <audio/chord_track.h>
Inits a chord track (e.g.
when cloning).
void chord_track_insert_chord_region(ChordTrack* track,
ZRegion* region,
int idx)
#include <audio/chord_track.h>
Inserts a chord region to the Track at the given index.
void chord_track_insert_scale(ChordTrack* track,
ScaleObject* scale,
int pos)
#include <audio/chord_track.h>
Inserts a scale to the track.
void chord_track_add_scale(ChordTrack* track,
ScaleObject* scale)
#include <audio/chord_track.h>
Adds a scale to the track.
void chord_track_remove_scale(ChordTrack* self,
ScaleObject* scale,
bool free)
#include <audio/chord_track.h>
Removes a scale from the chord Track.
void chord_track_remove_region(ChordTrack* self,
ZRegion* region)
#include <audio/chord_track.h>
Removes a region from the chord track.
ChordObject* chord_track_get_chord_at_pos(const Track* ct,
const Position* pos)
#include <audio/chord_track.h>
Returns the ChordObject at the given Position in the TimelineArranger.
ScaleObject* chord_track_get_scale_at_pos(const Track* ct,
const Position* pos)
#include <audio/chord_track.h>
Returns the ScaleObject at the given Position in the TimelineArranger.
void chord_track_clear(ChordTrack* self)
#include <audio/chord_track.h>
Removes all objects from the chord track.
Mainly used in testing.
COLD NONNULL AudioClip* audio_clip_new_from_file(const char* full_path)
Creates an audio clip from a file.
The name used is the basename of the file.
AudioClip* audio_clip_new_from_float_array(const float* arr,
const long nframes,
const channels_ t channels,
BitDepth bit_depth,
const char* name)
Creates an audio clip by copying the given float array.
Parameters | |
---|---|
arr | Interleaved array. |
nframes | |
channels | |
bit_depth | |
name | A name for this clip. |
AudioClip* audio_clip_new_recording(const channels_ t channels,
const long nframes,
const char* name)
Create an audio clip while recording.
Parameters | |
---|---|
channels | |
nframes | Number of frames to allocate. This should be the current cycle's frames when called during recording. |
name |
The frames will keep getting reallocated until the recording is finished.
NONNULL void audio_clip_update_channel_caches(AudioClip* self, size_t start_from)
Updates the channel caches.
Parameters | |
---|---|
self | |
start_from | Frames to start from (per channel. The previous frames will be kept. |
See AudioClip::
NONNULL AudioClip* audio_clip_edit_in_ext_program(AudioClip* self)
Shows a dialog with info on how to edit a file, with an option to open an app launcher.
Returns | A new instance of AudioClip if successful, NULL, if not. |
---|
When the user closes the dialog, the clip is assumed to have been edited.
The given audio clip will be free'd.
NONNULL int audio_clip_write_to_file(AudioClip* self, const char* filepath, bool parts)
Writes the given audio clip data to a file.
Parameters | |
---|---|
self | |
filepath | |
parts | If true, only write new data. |
Returns | Non-zero if fail. |
NONNULL void audio_clip_write_to_pool(AudioClip* self, bool parts, bool is_backup)
Writes the clip to the pool as a wav file.
Parameters | |
---|---|
self | |
parts | If true, only write new data. |
is_backup | Whether writing to a backup project. |
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 | |
---|---|
name | |
use_flac | Whether to look for a FLAC file instead of a wav file. |
is_backup | Whether writing to a backup project. |
NONNULL char* audio_clip_get_path_in_pool(AudioClip* self, bool is_backup)
Gets the path of the given clip from the pool.
Parameters | |
---|---|
self | |
is_backup | Whether writing to a backup project. |
NONNULL bool audio_clip_is_in_use(AudioClip* self, bool check_undo_stack)
Returns whether the clip is used inside the project.
Parameters | |
---|---|
self | |
check_undo_stack | If true, this checks both project regions and the undo stack. If false, this only checks actual project regions only. |
NONNULL void audio_clip_remove_and_free(AudioClip* self, bool backup)
To be called by audio_
Parameters | |
---|---|
self | |
backup | Whether to remove from backup directory. |
Removes the file associated with the clip and frees the instance.
NONNULL PURE float control_port_normalized_val_to_real(const Port*const self,
float normalized_val)
#include <audio/control_port.h>
Converts normalized value (0.0 to 1.0) to real value (eg.
-10.0 to 100.0).
NONNULL PURE float control_port_real_val_to_normalized(const Port*const self,
float real_val)
#include <audio/control_port.h>
Converts real value (eg.
-10.0 to 100.0) to normalized value (0.0 to 1.0).
int control_port_get_int(Port* self)
#include <audio/control_port.h>
Gets the control value for an integer port.
int control_port_get_int_from_val(float val)
#include <audio/control_port.h>
Gets the control value for an integer port.
float control_port_get_snapped_val(Port* self)
#include <audio/control_port.h>
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)
#include <audio/control_port.h>
Returns the snapped value (eg, if toggle, returns 0.f or 1.f).
float control_port_get_val(Port* self)
#include <audio/control_port.h>
Get the current real value of the control.
TODO "normalize" parameter.
float control_port_get_normalized_val(Port* self)
#include <audio/control_port.h>
Get the current normalized value of the control.
float control_port_get_unsnapped_val(Port* self)
#include <audio/control_port.h>
Get the current real unsnapped value of the control.
float control_port_get_default_val(Port* self)
#include <audio/control_port.h>
Get the default real value of the control.
void control_port_set_real_val(Port* self,
float val)
#include <audio/control_port.h>
Get the default real value of the control.
void control_port_set_real_val_w_events(Port* self,
float val)
#include <audio/control_port.h>
Get the default real value of the control and sends UI events.
void control_port_set_toggled(Port* self,
bool toggled,
bool forward_events)
#include <audio/control_port.h>
Wrapper over port_
HOT NONNULL void control_port_set_val_from_normalized(Port* self,
float val,
bool automating)
#include <audio/control_port.h>
Updates the actual value.
Parameters | |
---|---|
self | |
val | |
automating | Whether 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. |
The given value is always a normalized 0.0-1.0 value and must be translated to the actual value before setting it.
HOT double curve_get_normalized_y(double x, CurveOptions* opts, int start_higher)
Returns the Y value on a curve spcified by algo.
Parameters | |
---|---|
x | X-coordinate, normalized. |
opts | Curve options. |
start_higher | Start at higher point. |
void ditherer_process(Ditherer* self,
float* frames,
size_t n_frames,
channels_ t channels)
#include <audio/ditherer.h>
Dither given audio.
Parameters | |
---|---|
self | |
frames | Interleaved frames. |
n_frames | Number of frames per channel. |
channels | Number of channels. |
Taken from tracktion_Ditherer.h.
AudioEncoder* audio_encoder_new_from_file(const char* filepath)
#include <audio/encoder.h>
Creates a new instance of an AudioEncoder from the given file, that can be used for encoding.
It converts the file into a float array in its original sample rate and prepares the instance for decoding it into the project's sample rate.
NONNULL void audio_encoder_decode(AudioEncoder* self,
int samplerate,
bool show_progress)
#include <audio/encoder.h>
Decodes the information in the AudioEncoder instance and stores the results there.
Parameters | |
---|---|
self | |
samplerate | |
show_progress | Display a progress dialog. |
Resamples the input float array to match the project's sample rate.
Assumes that the input array is already filled in.
NONNULL void audio_encoder_free(AudioEncoder* self)
#include <audio/encoder.h>
Free's the AudioEncoder and its members.
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.
void engine_wait_for_pause(AudioEngine* self, EngineState* state, bool force_pause)
Parameters | |
---|---|
self | |
state | |
force_pause | Whether to force transport pause, otherwise for engine to process and handle the pause request. |
void engine_wait_n_cycles(AudioEngine* self, int n)
Waits for n processing cycles to finish.
Used during tests.
COLD void engine_activate(AudioEngine* self, bool activate)
Activates the audio engine to start processing and receiving events.
Parameters | |
---|---|
self | |
activate | Activate or deactivate. |
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)
Updates frames per tick based on the time sig, the BPM, and the sample rate.
Parameters | |
---|---|
self | |
beats_per_bar | |
bpm | |
sample_rate | |
thread_check | Whether to throw a warning if not called from GTK thread. |
update_from_ticks | Whether to update the positions based on ticks (true) or frames (false). |
int engine_process_events(AudioEngine* self)
GSourceFunc to be added using idle add.
This will loop indefinintely.
NONNULL HOT bool engine_process_prepare(AudioEngine* self,
nframes_ t nframes)
To be called by each implementation to prepare the structures before processing.
Returns | Whether the cycle should be skipped. |
---|
Clears buffers, marks all as unprocessed, etc.
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.
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 | |
---|---|
self | |
roll_nframes | Frames to roll (add to the playhead - if transport rolling). |
nframes | Total frames for this processing cycle. |
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.
@seealso jack_set_buffer_size().
COLD NONNULL AudioEngine* engine_clone(const AudioEngine* src)
Clones the audio engine.
To be used for serialization.
ExportSettings* export_settings_default(void)
Returns an instance of default ExportSettings.
It must be free'd with export_settings_free().
void export_settings_set_bounce_defaults(ExportSettings* self, const char* filepath, const char* bounce_name)
Sets the defaults for bouncing.
Parameters | |
---|---|
self | |
filepath | Path to bounce to. If NULL, this will generate a temporary filepath. |
bounce_name | Name used for the file if filepath is NULL. |
void* exporter_generic_export_thread(void* data)
Generic export thread to be used for simple exporting.
See bounce_dialog for an example.
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 | |
---|---|
settings | |
pos | Position to place the audio region at. |
const char* exporter_stringize_audio_format(AudioFormat format, bool extension)
Returns the audio format as string.
Parameters | |
---|---|
format | |
extension | Whether to return the extension for this format, or a human friendly label. |
int exporter_export(ExportSettings* info)
Exports an audio file based on the given settings.
Returns | Non-zero if fail. |
---|
void ext_port_disconnect(ExtPort* ext_port, Port* port, int src)
Disconnects the Port from the ExtPort.
Parameters | |
---|---|
ext_port | |
port | |
src | 1 if the ext_port is the source, 0 if it is the destination. |
void ext_port_activate(ExtPort* self, Port* port, bool activate)
Activates the port (starts receiving data) or deactivates it.
Parameters | |
---|---|
self | |
port | Port to send the output to. |
activate |
bool ext_port_get_enabled(ExtPort* self)
Checks in the GSettings whether this port is marked as enabled by the user.
Returns | Whether the port is enabled. |
---|
void ext_ports_get(PortType type, PortFlow flow, bool hw, GPtrArray* ports)
Collects external ports of the given type.
Parameters | |
---|---|
type | |
flow | The signal flow. Note that this is inverse to what Zrythm sees. E.g., to get MIDI inputs like MIDI keyboards, pass FLOW_OUTPUT here. |
hw | Hardware or not. |
ports |
double fade_get_y_normalized(double x,
CurveOptions* opts,
int fade_in)
#include <audio/fade.h>
Gets the normalized Y for a normalized X.
Parameters | |
---|---|
x | Normalized x. |
opts | |
fade_in | 1 for in, 0 for out. |
COLD Fader* fader_new(FaderType type, bool passthrough, Track* track, ControlRoom* control_room, SampleProcessor* sample_processor)
Creates a new fader.
Parameters | |
---|---|
type | The FaderType. |
passthrough | |
track | |
control_room | |
sample_processor |
This assumes that the channel has no plugins.
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 | |
---|---|
self | |
amp_from | |
amp_to | |
skip_if_equal | Whether to skip the action if the amp hasn't changed. |
void fader_copy_values(Fader* src, Fader* dest)
Copy the fader values from source to dest.
Used when cloning channels.
NONNULL HOT void fader_process(Fader* self,
long g_start_frames,
nframes_ t start_frame,
const nframes_ t nframes)
Process the Fader.
Parameters | |
---|---|
self | |
g_start_frames | Global frames. |
start_frame | The local offset in this cycle. |
nframes | The number of frames to process. |
NONNULL GraphNode* graph_create_node(Graph* self,
GraphNodeType type,
void* data)
#include <audio/graph.h>
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)
#include <audio/graph.h>
Returns the max playback latency of the trigger nodes.
bool graph_validate_with_connection(Graph* self,
const Port* src,
const Port* dest)
#include <audio/graph.h>
Adds a new connection for the given src and dest ports and validates the graph.
Returns | True if ok, false if invalid. |
---|
This is a low level function. Better used via ports_
int graph_start(Graph* graph)
#include <audio/graph.h>
Starts as many threads as there are cores.
Returns | 1 if graph started, 0 otherwise. |
---|
Graph* graph_new(Router* router)
#include <audio/graph.h>
Returns a new graph.
void graph_terminate(Graph* self)
#include <audio/graph.h>
Tell all threads to terminate.
void graph_free(Graph* self)
#include <audio/graph.h>
Frees the graph and its members.
void graph_export_as(Graph* graph,
GraphExportType type,
const char* path)
#include <audio/graph_export.h>
Exports the graph at the given path.
Engine must be paused before calling this.
char* graph_node_get_name(GraphNode* node)
#include <audio/graph_node.h>
Returns a human friendly name of the node.
Must be free'd.
HOT void graph_node_process(GraphNode* node,
EngineProcessTimeInfo time_nfo)
#include <audio/graph_node.h>
Processes the GraphNode.
nframes_ t graph_node_get_single_playback_latency(GraphNode* node)
#include <audio/graph_node.h>
Returns the latency of only the given port, without adding the previous/next latencies.
It returns the plugin's latency if plugin, otherwise 0.
void graph_node_set_route_playback_latency(GraphNode* node,
nframes_ t dest_latency)
#include <audio/graph_node.h>
Sets the playback latency of the given node recursively.
Parameters | |
---|---|
node | |
dest_latency | The total destination latency so far. |
Used only when (re)creating the graph.
HOT void graph_node_trigger(GraphNode* self)
#include <audio/graph_node.h>
Called by an upstream node when it has completed processing.
GraphThread* graph_thread_new(const int id,
const bool is_main,
Graph* graph)
#include <audio/graph_thread.h>
Creates a thread.
Parameters | |
---|---|
id | The index of the thread. |
is_main | 1 if main thread. |
graph | The graph to set to the thread. |
ExtPort* hardware_processor_find_ext_port(HardwareProcessor* self, const char* id)
Finds an ext port from its ID (type + full name).
Port* hardware_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.
Returns | Non-zero on fail. |
---|
void hardware_processor_activate(HardwareProcessor* self, bool activate)
Starts or stops the ports.
Parameters | |
---|---|
self | |
activate | True to activate, false to deactivate |
void instrument_track_init(Track* track)
#include <audio/instrument_track.h>
Initializes an instrument track.
int instrument_track_is_plugin_visible(Track* self)
#include <audio/instrument_track.h>
Returns if the first plugin's UI in the instrument track is visible.
void instrument_track_toggle_plugin_visible(Track* self)
#include <audio/instrument_track.h>
Toggles whether the first plugin's UI in the instrument Track is visible.
MarkerTrack* marker_track_default(int track_pos)
#include <audio/marker_track.h>
Creates the default marker track.
void marker_track_init(Track* track)
#include <audio/marker_track.h>
Inits the marker track.
void marker_track_insert_marker(MarkerTrack* self,
Marker* marker,
int pos)
#include <audio/marker_track.h>
Inserts a marker to the track.
void marker_track_add_marker(MarkerTrack* self,
Marker* marker)
#include <audio/marker_track.h>
Adds a marker to the track.
void marker_track_clear(MarkerTrack* self)
#include <audio/marker_track.h>
Removes all objects from the marker track.
Mainly used in testing.
void marker_track_remove_marker(MarkerTrack* self,
Marker* marker,
int free)
#include <audio/marker_track.h>
Removes a marker, optionally freeing it.
Marker* marker_track_get_start_marker(const Track* track)
#include <audio/marker_track.h>
Returns the start marker.
Marker* marker_track_get_end_marker(const Track* track)
#include <audio/marker_track.h>
Returns the end marker.
void meter_get_value(Meter* self,
AudioValueFormat format,
float* val,
float* max)
#include <audio/meter.h>
Get the current meter value.
This should only be called once in a draw cycle.
Metronome* metronome_new(void)
#include <audio/metronome.h>
Initializes the Metronome by loading the samples into memory.
NONNULL void metronome_queue_events(AudioEngine* self,
const nframes_ t loffset,
const nframes_ t nframes)
#include <audio/metronome.h>
Queues metronome events (if any) within the current processing cycle.
Parameters | |
---|---|
self | |
loffset | Local offset in this cycle. |
nframes |
const char* midi_get_cc_name(uint8_t cc)
#include <audio/midi.h>
Return the name of the given cc (0-127).
int midi_combine_bytes_to_int(midi_ byte_ t lsb,
midi_ byte_ t msb)
#include <audio/midi.h>
Used for MIDI controls whose values are split between MSB/LSB.
Parameters | |
---|---|
lsb | First byte (pos 1). |
msb | Second byte (pos 2). |
void midi_get_bytes_from_int(int val,
midi_ byte_ t* lsb,
midi_ byte_ t* msb)
#include <audio/midi.h>
Used for MIDI controls whose values are split between MSB/LSB.
Parameters | |
---|---|
val | |
lsb | First byte (pos 1). |
msb | Second byte (pos 2). |
int midi_ctrl_change_get_ch_and_description(midi_ byte_ t* ctrl_change,
char* buf)
#include <audio/midi.h>
Saves a string representation of the given control change event in the given buffer.
Returns | The MIDI channel |
---|
void midi_panic_all(int queued)
#include <audio/midi.h>
Queues MIDI note off to event queues.
Parameters | |
---|---|
queued | Send the event to queues instead of main events. |
int midi_get_msg_length(uint8_t status_byte)
#include <audio/midi.h>
Returns the length of the MIDI message based on the status byte.
void midi_events_init(MidiEvents* self)
#include <audio/midi_event.h>
Inits the MidiEvents struct.
MidiEvents* midi_events_new(void)
#include <audio/midi_event.h>
Allocates and inits a MidiEvents struct.
static void midi_event_copy(MidiEvent* dest,
MidiEvent* src)
#include <audio/midi_event.h>
Copies the members from one MidiEvent to another.
void midi_events_sort_by_time(MidiEvents* self)
#include <audio/midi_event.h>
Sorts the MIDI events by time ascendingly.
void midi_events_append(MidiEvents* src,
MidiEvents* dest,
const nframes_ t start_frame,
const nframes_ t nframes,
bool queued)
#include <audio/midi_event.h>
Appends the events from src to dest.
Parameters | |
---|---|
src | |
dest | |
start_frame | The start frame offset from 0 in this cycle. |
nframes | Number of frames to process. |
queued | Append queued events instead of main events. |
void midi_events_append_w_filter(MidiEvents* src,
MidiEvents* dest,
int* channels,
const nframes_ t start_frame,
const nframes_ t nframes,
bool queued)
#include <audio/midi_event.h>
Appends the events from src to dest.
Parameters | |
---|---|
src | |
dest | |
channels | Allowed channels (array of 16 booleans). |
start_frame | The start frame offset from 0 in this cycle. |
nframes | Number of frames to process. |
queued | Append queued events instead of main events. |
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)
#include <audio/midi_event.h>
Adds a note on event to the given MidiEvents.
Parameters | |
---|---|
self | |
channel | MIDI channel starting from 1. |
note_pitch | |
velocity | |
time | |
queued | Add to queued events instead. |
void midi_events_add_note_ons_from_chord_descr(MidiEvents* self,
ChordDescriptor* descr,
midi_ byte_ t channel,
midi_ byte_ t velocity,
midi_ time_ t time,
bool queued)
#include <audio/midi_event.h>
Adds a note on for each note in the chord.
void midi_events_add_note_offs_from_chord_descr(MidiEvents* self,
ChordDescriptor* descr,
midi_ byte_ t channel,
midi_ time_ t time,
bool queued)
#include <audio/midi_event.h>
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)
#include <audio/midi_event.h>
Add CC volume event.
TODO
int midi_events_has_note_on(MidiEvents* self,
int check_main,
int check_queued)
#include <audio/midi_event.h>
Returrns if the MidiEvents have any note on events.
Parameters | |
---|---|
self | |
check_main | Check the main events. |
check_queued | Check the queued events. |
void midi_events_add_event_from_buf(MidiEvents* self,
midi_ time_ t time,
midi_ byte_ t* buf,
int buf_size,
int queued)
#include <audio/midi_event.h>
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.
void midi_events_add_note_off(MidiEvents* self,
midi_ byte_ t channel,
midi_ byte_ t note_pitch,
midi_ time_ t time,
int queued)
#include <audio/midi_event.h>
Adds a note off event to the given MidiEvents.
Parameters | |
---|---|
self | |
channel | MIDI channel starting from 1. |
note_pitch | |
time | |
queued | Add to queued events instead. |
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)
#include <audio/midi_event.h>
Adds a control event to the given MidiEvents.
Parameters | |
---|---|
self | |
channel | MIDI channel starting from 1. |
controller | |
control | |
time | |
queued | Add to queued events instead. |
void midi_events_add_pitchbend(MidiEvents* self,
midi_ byte_ t channel,
int pitchbend,
midi_ time_ t time,
int queued)
#include <audio/midi_event.h>
Adds a control event to the given MidiEvents.
Parameters | |
---|---|
self | |
channel | MIDI channel starting from 1. |
pitchbend | -8192 to 8191 |
time | |
queued | Add to queued events instead. |
void midi_events_add_all_notes_off(MidiEvents* self,
midi_ byte_ t channel,
midi_ time_ t time,
bool queued)
#include <audio/midi_event.h>
Queues MIDI note off to event queue.
void midi_events_clear(MidiEvents* midi_events,
int queued)
#include <audio/midi_event.h>
Clears midi events.
Parameters | |
---|---|
midi_events | |
queued | Clear queued events instead. |
void midi_events_clear_duplicates(MidiEvents* midi_events,
const int queued)
#include <audio/midi_event.h>
Clears duplicates.
Parameters | |
---|---|
midi_events | |
queued | Clear duplicates from queued events instead. |
void midi_events_dequeue(MidiEvents* midi_events)
#include <audio/midi_event.h>
Copies the queue contents to the original struct.
int midi_events_check_for_note_on(MidiEvents* midi_events,
int note,
int queued)
#include <audio/midi_event.h>
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)
#include <audio/midi_event.h>
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)
#include <audio/midi_event.h>
Sorts the MidiEvents by time.
void midi_events_set_channel(MidiEvents* self,
const int queued,
const midi_ byte_ t channel)
#include <audio/midi_event.h>
Sets the given MIDI channel on all applicable MIDI events.
void midi_events_free(MidiEvents* self)
#include <audio/midi_event.h>
Frees the MIDI events.
bool midi_file_track_has_data(const char* abs_path,
int track_idx)
#include <audio/midi_file.h>
Returns whether the given track in the midi file has data.
int midi_file_get_num_tracks(const char* abs_path,
bool non_empty_only)
#include <audio/midi_file.h>
Returns the number of tracks in the MIDI file.
int midi_function_apply(ArrangerSelections* sel,
MidiFunctionType type,
GError** error)
#include <audio/midi_function.h>
Applies the given action to the given selections.
Parameters | |
---|---|
sel | Selections to edit. |
type | Function type. |
error |
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 | |
---|---|
self | |
buf | The buffer used for matching at [0] and [1]. |
device_port | Device port, if custom mapping. |
dest_port | |
idx | Index to insert at. |
fire_events |
void midi_mappings_unbind(MidiMappings* self, int idx, bool fire_events)
Unbinds the given binding.
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_
MidiMapping** midi_mappings_get_for_port(MidiMappings* self, Port* dest_port, int* size)
Get MIDI mappings for the given port.
Parameters | |
---|---|
self | |
dest_port | |
size | Size to set. |
Returns | a newly allocated array that must be free'd with free(). |
void midi_note_get_val_as_string(MidiNote* self, char* buf, const int use_markup)
Gets the MIDI note's value as a string (eg "C#4").
Parameters | |
---|---|
self | |
buf | |
use_markup | Use markup to show the octave as a superscript. |
void midi_note_listen(MidiNote* mn, bool listen)
Listen to the given MidiNote.
Parameters | |
---|---|
mn | |
listen | Turn note on if 1, or turn it off if 0. |
void midi_note_shift_pitch(MidiNote* self, const int delta)
Shifts MidiNote's position and/or value.
Parameters | |
---|---|
self | |
delta | Y (0-127) |
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_notes | Array of MidiNote's. |
num_notes | Number of notes in array. |
pos | Position to offset time from. |
events | Preallocated struct to fill. |
ZRegion* midi_region_new(const Position* start_pos,
const Position* end_pos,
unsigned int track_name_hash,
int lane_pos,
int idx_inside_lane)
#include <audio/midi_region.h>
Creates a new ZRegion for MIDI notes.
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)
#include <audio/midi_region.h>
Creates a MIDI region from the given MIDI file path, starting at the given Position.
Parameters | |
---|---|
start_pos | |
abs_path | |
track_name_hash | |
lane_pos | |
idx_inside_lane | |
idx | The 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. |
ZRegion* midi_region_new_from_chord_descr(const Position* pos,
ChordDescriptor* descr,
unsigned int track_name_hash,
int lane_pos,
int idx_inside_lane)
#include <audio/midi_region.h>
Create a region from the chord descriptor.
Default size will be timeline snap and default notes size will be editor snap.
void midi_region_insert_midi_note(ZRegion* region,
MidiNote* midi_note,
int idx,
int pub_events)
#include <audio/midi_region.h>
Inserts the MidiNote to the given ZRegion.
Parameters | |
---|---|
region | |
midi_note | |
idx | Index to insert at. |
pub_events | Publish UI events or not. |
void midi_region_start_unended_note(ZRegion* self,
Position* start_pos,
Position* end_pos,
int pitch,
int vel,
int pub_events)
#include <audio/midi_region.h>
Starts an unended note with the given pitch and velocity and adds it to ZRegion::
Parameters | |
---|---|
self | |
start_pos | |
end_pos | If this is NULL, it will be set to 1 tick after the start_pos. |
pitch | |
vel | |
pub_events |
MidiNote* midi_region_pop_unended_note(ZRegion* self,
int pitch)
#include <audio/midi_region.h>
Returns the midi note with the given pitch from the unended notes.
Parameters | |
---|---|
self | |
pitch | The pitch. If -1, it returns any unended note. This is useful when the loop point is met and we want to end them all. |
Used when recording.
REALTIME void midi_region_fill_midi_events(ZRegion* self,
long g_start_frames,
nframes_ t local_start_frame,
nframes_ t nframes,
bool note_off_at_end,
MidiEvents* midi_events)
#include <audio/midi_region.h>
Fills MIDI event queue from the region.
Parameters | |
---|---|
self | |
g_start_frames | Global start frame. |
local_start_frame | The start frame offset from 0 in this cycle. |
nframes | Number of frames at start Position. |
note_off_at_end | Whether a note off should be added at the end frame (eg, when the caller knows there is a region loop or the region ends). |
midi_events | MidiEvents to fill (from Piano Roll Port for example). |
The events are dequeued right after the call to this function.
void midi_region_print_midi_notes(ZRegion* self)
#include <audio/midi_region.h>
Prints the MidiNotes in the Region.
Used for debugging.
MidiNote* midi_region_get_first_midi_note(ZRegion* region)
#include <audio/midi_region.h>
Gets first midi note.
MidiNote* midi_region_get_last_midi_note(ZRegion* region)
#include <audio/midi_region.h>
Gets last midi note.
MidiNote* midi_region_get_highest_midi_note(ZRegion* region)
#include <audio/midi_region.h>
Gets highest midi note.
MidiNote* midi_region_get_lowest_midi_note(ZRegion* region)
#include <audio/midi_region.h>
Gets lowest midi note.
void midi_region_remove_midi_note(ZRegion* region,
MidiNote* midi_note,
int free,
int pub_event)
#include <audio/midi_region.h>
Removes the MIDI note from the Region.
Parameters | |
---|---|
region | |
midi_note | |
free | Also free the MidiNote. |
pub_event | Publish an event. |
void midi_region_remove_all_midi_notes(ZRegion* region)
#include <audio/midi_region.h>
Removes all MIDI ntoes and their components completely.
void midi_region_write_to_midi_file(ZRegion* self,
MIDI_FILE* mf,
const int add_region_start,
bool export_full,
bool use_track_pos)
#include <audio/midi_region.h>
Returns the midi note at given position with the given pitch.
Parameters | |
---|---|
self | |
mf | |
add_region_start | Add the region start offset to the positions. |
export_full | Traverse 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. |
use_track_pos | Whether to use the track position in the MIDI data. The track will be set to 1 if false. |
Used when recording. Exports the ZRegion to an existing MIDI file instance.
void midi_region_export_to_midi_file(ZRegion* self,
const char* full_path,
int midi_version,
const int export_full)
#include <audio/midi_region.h>
Exports the ZRegion to a specified MIDI file.
Parameters | |
---|---|
self | |
full_path | Absolute path to the MIDI file. |
midi_version | |
export_full | Traverse 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. |
uint8_t midi_region_get_midi_ch(const ZRegion* self)
#include <audio/midi_region.h>
Returns the MIDI channel that this region should be played on, starting from 1.
MidiEvents* midi_region_get_as_events(const ZRegion* self,
const int add_region_start,
const int full)
#include <audio/midi_region.h>
Returns a newly initialized MidiEvents with the contents of the region converted into events.
Parameters | |
---|---|
self | |
add_region_start | Add the region start offset to the positions. |
full |
Must be free'd with midi_events_free ().
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)
#include <audio/midi_region.h>
Fills in the array with all the velocities in the project that are within or outside the range given.
Parameters | |
---|---|
self | |
start_pos | |
end_pos | |
velocities | |
num_velocities | |
velocities_size | |
inside | Whether to find velocities inside the range (1) or outside (0). |
void midi_region_free_members(ZRegion* self)
#include <audio/midi_region.h>
Frees members only but not the midi region itself.
Regions should be free'd using region_free.
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.
Parameters | |
---|---|
track | |
g_start_frames | Global start frame. |
local_start_frame | The start frame offset from 0 in this cycle. |
nframes | Number of frames at start Position. |
midi_events | MidiEvents to fill (from Piano Roll Port for example). |
The events are dequeued right after the call to this function.
Caveats:
- This will not work properly if the loop sizes (region or transport) are smaller than nframes, so small sizes should not be allowed.
void modulator_macro_processor_process(ModulatorMacroProcessor* self,
long g_start_frames,
nframes_ t start_frame,
const nframes_ t nframes)
Process.
Parameters | |
---|---|
self | |
g_start_frames | Global frames. |
start_frame | The local offset in this cycle. |
nframes | The number of frames to process. |
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)
#include <audio/modulator_track.h>
Inserts and connects a Modulator to the Track.
Parameters | |
---|---|
self | |
slot | |
modulator | |
replace_mode | Whether to perform the operation in replace mode (replace current modulator if true, not touching other modulators, or push other modulators forward if false). |
confirm | |
gen_automatables | |
recalc_graph | |
pub_events |
void modulator_track_remove_modulator(Track* self,
int slot,
bool replacing,
bool deleting_modulator,
bool deleting_track,
bool recalc_graph)
#include <audio/modulator_track.h>
Removes a plugin at pos from the track.
Parameters | |
---|---|
self | |
slot | |
replacing | Whether replacing the modulator. If this is false, modulators after this slot will be pushed back. |
deleting_modulator | |
deleting_track | If true, the automation tracks associated with the plugin are not deleted at this time. |
recalc_graph | Recalculate mixer graph. |
Track* modulator_track_default(int track_pos)
#include <audio/modulator_track.h>
Creates the default modulator track.
void modulator_track_init(Track* track)
#include <audio/modulator_track.h>
Inits the modulator track.
int audio_pool_add_clip(AudioPool* self, AudioClip* clip)
Adds an audio clip to the pool.
Returns | The ID in the pool. |
---|
Changes the name of the clip if another clip with the same name already exists.
int audio_pool_duplicate_clip(AudioPool* self, int clip_id, bool write_file)
Duplicates the clip with the given ID and returns the duplicate.
Parameters | |
---|---|
self | |
clip_id | |
write_file | Whether to also write the file. |
Returns | The ID in the pool. |
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 | |
---|---|
self | |
clip_id | |
free_and_remove_file | |
backup | Whether to remove from backup directory. |
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 | |
---|---|
self | |
backup | Whether to remove from backup directory. |
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.
void audio_pool_reload_clip_frame_bufs(AudioPool* self)
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).
void audio_pool_write_to_disk(AudioPool* self, bool is_backup)
Writes all the clips to disk.
Parameters | |
---|---|
self | |
is_backup | Whether this is a backup project. |
Used when saving a project elsewhere.
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.
NONNULL void port_allocate_bufs(Port* self)
Allocates buffers used during DSP.
To be called only where necessary to save RAM.
NONNULL void port_free_bufs(Port* self)
Frees buffers.
To be used when removing ports from the project/graph.
StereoPorts* stereo_ports_new_generic(int in, const char* name, PortOwnerType owner_type, void* owner)
Creates stereo ports for generic use.
Parameters | |
---|---|
in | 1 for in, 0 for out. |
name | |
owner_type | |
owner | Pointer to the owner. The type is determined by owner_type. |
NONNULL void stereo_ports_connect(StereoPorts* src, StereoPorts* dest, int locked)
Connects the internal ports using port_
Parameters | |
---|---|
src | |
dest | |
locked | Lock the connection. |
Returns | Non-zero if error. |
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.
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 | |
---|---|
self | |
prev_id | Previous identifier to be used for searching. |
track | The track that owns this port. |
update_automation_track | Whether to update the identifier in the corresponding automation track as well. This should be false when moving a plugin. |
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.
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.
Parameters | |
---|---|
self | |
val | |
is_normalized | Whether the given value is normalized between 0 and 1. |
forward_event | Whether 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. |
Note: this is only for setting the base values (eg when automating via an automation lane). For CV automations this should not be used.
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 | |
---|---|
self | |
normalize | Whether to get the value normalized or not. |
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 | |
---|---|
self | |
track | Owner track. |
new_hash |
static NONNULL void port_apply_fader(Port* port,
float amp,
nframes_ t start_frame,
const nframes_ t nframes)
Apply given fader value to port.
Parameters | |
---|---|
port | |
amp | |
start_frame | The start frame offset from 0 in this cycle. |
nframes | The number of frames to process. |
HOT NONNULL void port_process(Port* port, const EngineProcessTimeInfo*const time_nfo, const bool noroll)
First sets port buf to 0, then sums the given port signal from its inputs.
Parameters | |
---|---|
port | |
time_nfo | |
noroll | Clear the port buffer in this range. |
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.
NONNULL void port_copy_values(Port* self, const Port* other)
Copies the port values from other to self.
Parameters | |
---|---|
self | |
other |
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.
Parameters | |
---|---|
self | Project port. |
non_project | Non-project port. |
This restores src/dest connections and the control value.
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 | |
---|---|
port | |
pan | |
pan_law | |
pan_algo | |
start_frame | The start frame offset from 0 in this cycle. |
nframes | The number of frames to process. |
NONNULL PortConnection* port_connection_clone(const PortConnection* src)
#include <audio/port_connection.h>
To be used during serialization.
NONNULL void port_connection_free(PortConnection* self)
#include <audio/port_connection.h>
Deletes port, doing required cleanup and updating counters.
void port_connections_manager_regenerate_hashtables(PortConnectionsManager* self)
#include <audio/port_connections_manager.h>
Regenerates the hash tables.
Must be called when a change is made in the connections.
int port_connections_manager_get_sources_or_dests(const PortConnectionsManager* self,
GPtrArray* arr,
const PortIdentifier* id,
bool sources)
#include <audio/port_connections_manager.h>
Adds the sources/destinations of id in the given array.
Parameters | |
---|---|
self | |
arr | Optional array to fill. |
id | The identifier of the port to look for. |
sources | True to look for sources, false for destinations. |
Returns | The number of ports found. |
The returned instances of PortConnection are owned by self and must not be free'd.
PortConnection* port_connections_manager_get_source_or_dest(const PortConnectionsManager* self,
const PortIdentifier* id,
bool sources)
#include <audio/port_connections_manager.h>
Wrapper over port_
It is a programming error to call this for ports that are not expected to have exactly 1 matching connection.
bool port_connections_manager_predicate_is_send_of(const void* obj,
const void* user_data)
#include <audio/port_connections_manager.h>
Returns whether the given connection is for the given send.
int port_connections_manager_find(const PortConnectionsManager* self,
GPtrArray* arr,
GenericPredicateFunc predicate)
#include <audio/port_connections_manager.h>
Adds the connections matching the given predicate to the given array (if given).
Parameters | |
---|---|
self | |
arr | Optional array to fill. |
predicate | |
Returns | The number of connections found. |
const PortConnection* port_connections_manager_ensure_connect(PortConnectionsManager* self,
const PortIdentifier* src,
const PortIdentifier* dest,
float multiplier,
bool locked,
bool enabled)
#include <audio/port_connections_manager.h>
Stores the connection for the given ports if it doesn't exist, otherwise updates the existing connection.
Returns | The connection. |
---|
bool port_connections_manager_ensure_disconnect(PortConnectionsManager* self,
const PortIdentifier* src,
const PortIdentifier* dest)
#include <audio/port_connections_manager.h>
Removes the connection for the given ports if it exists.
Returns | Whether a connection was removed. |
---|
void port_connections_manager_ensure_disconnect_all(PortConnectionsManager* self,
const PortIdentifier* pi)
#include <audio/port_connections_manager.h>
Disconnect all sources and dests of the given port identifier.
void port_connections_manager_reset(PortConnectionsManager* self,
const PortConnectionsManager* src)
#include <audio/port_connections_manager.h>
Removes all connections from self.
Parameters | |
---|---|
self | |
src | If non-NULL, the connections are copied from this to self. |
NONNULL PortConnectionsManager* port_connections_manager_clone(const PortConnectionsManager* src)
#include <audio/port_connections_manager.h>
To be used during serialization.
NONNULL void port_connections_manager_free(PortConnectionsManager* self)
#include <audio/port_connections_manager.h>
Deletes port, doing required cleanup and updating counters.
NONNULL void port_identifier_copy(PortIdentifier* dest, const PortIdentifier* src)
Copy the identifier content from src to dest.
void position_snap(const Position* start_pos, Position* pos, Track* track, ZRegion* region, const SnapGrid* sg)
Snaps position using given options.
Parameters | |
---|---|
start_pos | The previous position (ie, the position the drag started at. This is only used when the "keep offset" setting is on. |
pos | Position to edit. |
track | Track, 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. |
region | Region, used when moving things in the editor. Same behavior as track. |
sg | SnapGrid options. |
static void position_update(Position* self, bool from_ticks)
Updates the position from ticks or frames.
Parameters | |
---|---|
self | |
from_ticks | Whether to update the position based on ticks (true) or frames (false). |
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 | |
---|---|
start_pos | |
end_pos | |
pos | Position to set to. |
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_pos | End position. |
start_pos | Start Position. |
sg | SnapGrid to snap with, or NULL to not snap. |
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.
NONNULL int position_get_total_bars(const Position* pos, bool include_current)
Returns the total number of beats.
Parameters | |
---|---|
pos | |
include_current | Whether to count the current beat if it is at the beat start. |
NONNULL int position_get_total_beats(const Position* pos, bool include_current)
Returns the total number of beats.
Parameters | |
---|---|
pos | |
include_current | Whether to count the current beat if it is at the beat start. |
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.
NONNULL int position_get_bars(const Position* pos, bool start_at_one)
Gets the bars of the position.
Parameters | |
---|---|
pos | |
start_at_one | Start at 1 or -1 instead of 0. |
Ie, if the position is equivalent to 4.1.2.42, this will return 4.
NONNULL int position_get_beats(const Position* pos, bool start_at_one)
Gets the beats of the position.
Parameters | |
---|---|
pos | |
start_at_one | Start at 1 or -1 instead of 0. |
Ie, if the position is equivalent to 4.1.2.42, this will return 1.
NONNULL int position_get_sixteenths(const Position* pos, bool start_at_one)
Gets the sixteenths of the position.
Parameters | |
---|---|
pos | |
start_at_one | Start at 1 or -1 instead of 0. |
Ie, if the position is equivalent to 4.1.2.42, this will return 2.
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.
char* quantize_options_stringize(NoteLength note_length, NoteType note_type)
Returns the grid intensity as a human-readable string.
Must be free'd.
double quantize_options_quantize_position(QuantizeOptions* self, Position* pos)
Quantizes the given Position using the given QuantizeOptions.
Returns | The amount of ticks moved (negative for backwards). |
---|
This assumes that the start/end check has been done already and it ignores the adjust_start and adjust_end options.
REALTIME void recording_manager_handle_recording(RecordingManager* self,
const TrackProcessor* track_processor,
const EngineProcessTimeInfo*const time_nfo)
#include <audio/recording_manager.h>
Handles the recording logic inside the process cycle.
The MidiEvents are already dequeued at this point.
int recording_manager_process_events(RecordingManager* self)
#include <audio/recording_manager.h>
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.
RecordingManager* recording_manager_new(void)
#include <audio/recording_manager.h>
Creates the event queue and starts the event loop.
Must be called from a GTK thread.
void region_set_link_group(ZRegion* region, int group_idx, bool update_identifier)
Sets the link group to the region.
Parameters | |
---|---|
region | |
group_idx | If -1, the region will be removed from its current link group, if any. |
update_identifier |
NONNULL HOT long region_timeline_frames_to_local(const ZRegion*const self, const long timeline_frames, const bool normalize)
Converts frames on the timeline (global) to local frames (in the clip).
Parameters | |
---|---|
self | |
timeline_frames | Timeline position in frames. |
normalize | |
Returns | The local frames. |
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.
NONNULL void region_get_frames_till_next_loop_or_end(const ZRegion*const self, const long timeline_frames, long* ret_frames, bool* is_loop)
Returns the number of frames until the next loop end point or the end of the region.
Parameters | |
---|---|
self | |
timeline_frames in | Global frames at start. |
ret_frames out | Return frames. |
is_loop out | Whether the return frames are for a loop (if false, the return frames are for the region's end). |
NONNULL void region_stretch(ZRegion* self, double ratio)
Stretch the region's contents.
Parameters | |
---|---|
self | |
ratio | The ratio to stretch by. |
This should be called right after changing the region's size.
void region_move_to_lane(ZRegion* region, TrackLane* lane, int index_in_lane)
Moves the given ZRegion to the given TrackLane.
Parameters | |
---|---|
region | |
lane | |
index_in_lane | Index in lane in the new track to insert the region to, or -1 to append. |
Works with TrackLane's of other Track's as well.
Maintains the selection status of the Region.
void region_move_to_track(ZRegion* region, Track* track, int index_in_lane)
Moves the ZRegion to the given Track, maintaining the selection status of the ZRegion and the TrackLane position.
Parameters | |
---|---|
region | |
track | |
index_in_lane | Index in lane in the new track to insert the region to, or -1 to append. |
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.
int region_is_hit(const ZRegion* region, const long gframes, const int inclusive)
Returns if the position is inside the region or not.
Parameters | |
---|---|
region | |
gframes | Global position in frames. |
inclusive | Whether the last frame should be counted as part of the region. |
FIXME move to arranger object
int region_is_hit_by_range(const ZRegion* region, const long gframes_start, const long gframes_end, const bool end_inclusive)
Returns if any part of the ZRegion is inside the given range, inclusive.
FIXME move to arranger object
ZRegion* region_at_position(Track* track, AutomationTrack* at, Position* pos)
Returns the region at the given position in the given Track.
Parameters | |
---|---|
track | The track to look in, if at is NULL. |
at | The automation track to look in. |
pos | The position. |
char* region_generate_filename(ZRegion* region)
Generates the filename for this region.
MUST be free'd.
bool region_get_musical_mode(ZRegion* self)
Returns whether the region is effectively in musical mode.
void region_disconnect(ZRegion* self)
Disconnects the region and anything using it.
Does not free the ZRegion or its children's resources.
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 | |
---|---|
self | |
region | |
autoremove_last_region_and_group | Automatically remove the last region left in the group, and the group itself when empty. |
update_identifier |
NONNULL void region_link_group_update(RegionLinkGroup* self, ZRegion* region)
Updates all other regions in the link group.
Parameters | |
---|---|
self | |
region | The region where the change happened. |
void router_recalc_graph(Router* self,
bool soft)
#include <audio/router.h>
Recalculates the process acyclic directed graph.
Parameters | |
---|---|
self | |
soft | If true, only readjusts latencies. |
void router_start_cycle(Router* self,
EngineProcessTimeInfo time_nfo)
#include <audio/router.h>
Starts a new cycle.
nframes_ t router_get_max_route_playback_latency(Router* router)
#include <audio/router.h>
Returns the max playback latency of the trigger nodes.
WARN_UNUSED_RESULT HOT NONNULL bool router_is_processing_thread(const Router*const router)
#include <audio/router.h>
Returns if the current thread is a processing thread.
WARN_UNUSED_RESULT HOT NONNULL bool router_is_processing_kickoff_thread(const Router*const self)
#include <audio/router.h>
Returns whether this is the thread that kicks off processing (thread that calls router_
NONNULL void router_queue_control_port_change(Router* self,
const ControlPortChange* change)
#include <audio/router.h>
Queues a control port change to be applied when processing starts.
Currently only applies to BPM/time signature changes.
void sample_processor_process(SampleProcessor* self,
const nframes_ t offset,
const nframes_ t nframes)
Process the samples for the given number of frames.
Parameters | |
---|---|
self | |
offset | The local offset in the processing cycle. |
nframes |
void sample_processor_queue_metronome_countin(SampleProcessor* self)
Queues a metronomem tick at the given offset.
Used for countin.
void sample_processor_queue_metronome(SampleProcessor* self,
MetronomeType type,
nframes_ t offset)
Queues a metronomem tick at the given local offset.
Realtime function.
char* musical_scale_to_string(MusicalScale* scale)
Prints the MusicalScale to a string.
MUST be free'd.
int musical_scale_is_key_in_scale(MusicalScale* scale, MusicalNote key)
Returns if the given key is in the given MusicalScale.
Parameters | |
---|---|
scale | |
key | A note inside a single octave (0-11). |
char* musical_scale_as_string(MusicalScale* scale)
Returns the scale in human readable string.
MUST be free'd by caller.
char* snap_grid_stringize(NoteLength note_length, NoteType note_type)
Returns the grid intensity as a human-readable string.
Must be free'd.
PURE NONNULL Position* snap_grid_get_nearby_snap_point(const SnapGrid*const self, const Position* pos, const int return_prev)
Returns the next or previous SnapGrid point.
Parameters | |
---|---|
self | Snap grid to search in. |
pos | Position to search for. |
return_prev | 1 to return the previous element or 0 to return the next. |
Must not be free'd.
Stretcher* stretcher_new_rubberband(unsigned int samplerate,
unsigned int channels,
double time_ratio,
double pitch_ratio,
bool realtime)
#include <audio/stretcher.h>
Create a new Stretcher using the rubberband backend.
Parameters | |
---|---|
samplerate | The new samplerate. |
channels | |
time_ratio | The ratio to multiply time by (eg if the BPM is doubled, this will be 0.5). |
pitch_ratio | The ratio to pitch by. This will normally be 1.0 when time-stretching). |
realtime | Whether to perform realtime stretching (lower quality but fast enough to be used real-time). |
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)
#include <audio/stretcher.h>
Perform stretching.
Parameters | |
---|---|
self | |
in_samples_l | The left samples. |
in_samples_r | The right channel samples. If this is NULL, the audio is assumed to be mono. |
in_samples_size | The number of input samples per channel. |
out_samples_l | |
out_samples_r | |
out_samples_wanted | |
Returns | The number of output samples generated per channel. |
unsigned int stretcher_get_latency(Stretcher* self)
#include <audio/stretcher.h>
Get latency in number of samples.
ssize_t stretcher_stretch_interleaved(Stretcher* self,
float* in_samples,
size_t in_samples_size,
float** _out_samples)
#include <audio/stretcher.h>
Perform stretching.
Parameters | |
---|---|
self | |
in_samples | |
in_samples_size | The number of input samples per channel. |
_out_samples | |
Returns | The number of output samples generated per channel. |
void stretcher_free(Stretcher* self)
#include <audio/stretcher.h>
Frees the resampler.
Track* tempo_track_default(int track_pos)
#include <audio/tempo_track.h>
Creates the default tempo track.
void tempo_track_init(Track* track)
#include <audio/tempo_track.h>
Inits the tempo track.
void tempo_track_clear(Track* self)
#include <audio/tempo_track.h>
Removes all objects from the tempo track.
Mainly used in testing.
bpm_ t tempo_track_get_bpm_at_pos(Track* track,
Position* pos)
#include <audio/tempo_track.h>
Returns the BPM at the given pos.
bpm_ t tempo_track_get_current_bpm(Track* self)
#include <audio/tempo_track.h>
Returns the current BPM.
void tempo_track_set_bpm(Track* self,
bpm_ t bpm,
bpm_ t start_bpm,
bool temporary,
bool fire_events)
#include <audio/tempo_track.h>
Sets the BPM.
Parameters | |
---|---|
self | |
bpm | |
start_bpm | The BPM at the start of the action, if not temporary. |
temporary | |
fire_events |
void tempo_track_set_beats_per_bar(Track* self,
int beats_per_bar)
#include <audio/tempo_track.h>
Updates beat unit and anything depending on it.
void track_init(Track* self, const int add_lane)
Inits the Track, optionally adding a single lane.
Parameters | |
---|---|
self | |
add_lane | Add a lane. This should be used for new Tracks. When cloning, the lanes should be cloned so this should be 0. |
Track* track_new(TrackType type, int pos, const char* label, const int with_lane)
Creates a track with the given label and returns it.
Parameters | |
---|---|
type | |
pos | Position in the Tracklist. |
label | |
with_lane | Init the Track with a lane. |
If the TrackType is one that needs a Channel, then a Channel is also created for the track.
Track* track_clone(Track* track, GError** error)
Clones the track and returns the clone.
Parameters | |
---|---|
track | |
error | To be filled if an error occurred. |
NONNULL bool track_get_should_be_visible(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.
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 | |
---|---|
self | |
listen | |
trigger_undo | Create and perform an undoable action. |
auto_select | Makes this track the only selection in the tracklist. Useful when listening to a single track. |
fire_events | Fire UI events. |
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 | |
---|---|
self | |
solo | |
trigger_undo | Create and perform an undoable action. |
auto_select | Makes this track the only selection in the tracklist. Useful when soloing a single track. |
fire_events | Fire UI events. |
void track_add_region(Track* track, ZRegion* region, AutomationTrack* at, int lane_pos, int gen_name, int fire_events)
Adds a ZRegion to the given lane or AutomationTrack of the track.
Parameters | |
---|---|
track | |
region | |
at | The AutomationTrack of this ZRegion, if automation region. |
lane_pos | The position of the lane to add to, if applicable. |
gen_name | Generate a unique region name or not. This will be 0 if the caller already generated a unique name. |
fire_events |
The ZRegion must be the main region (see ArrangerObjectInfo).
void track_insert_region(Track* track, ZRegion* region, AutomationTrack* at, int lane_pos, int idx, int gen_name, int fire_events)
Inserts a ZRegion to the given lane or AutomationTrack of the track, at the given index.
Parameters | |
---|---|
track | |
region | |
at | The AutomationTrack of this ZRegion, if automation region. |
lane_pos | The position of the lane to add to, if applicable. |
idx | The index to insert the region at inside its parent, or -1 to append. |
gen_name | Generate a unique region name or not. This will be 0 if the caller already generated a unique name. |
fire_events |
The ZRegion must be the main region (see ArrangerObjectInfo).
NONNULL void track_select(Track* self, bool select, bool exclusive, bool fire_events)
Appends the Track to the selections.
Parameters | |
---|---|
self | |
select | |
exclusive | Select only this track. |
fire_events | Fire events to update the UI. |
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.
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.
Parameters | |
---|---|
self | |
time_nfo | |
midi_events | MidiEvents to fill (from Piano Roll Port for example). |
stereo_ports | StereoPorts to fill. |
bool track_validate(Track* self)
Verifies the identifiers on a live Track (in the project, not a clone).
Returns | True if pass. |
---|
void track_add_folder_parents(Track* self, GPtrArray* parents, bool prepend)
Adds the track's folder parents to the given array.
Parameters | |
---|---|
self | |
parents | |
prepend | Whether to prepend instead of append. |
void track_remove_from_folder_parents(Track* self)
Remove the track from all folders.
Used when deleting tracks.
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 | |
---|---|
track | |
pos | |
include_region_end | Whether to include the region's end in the calculation. |
void track_generate_automation_tracks(Track* track)
Generates automatables for the track.
Should be called as soon as the track is created.
void track_update_children(Track* self)
Updates the track's children.
Used when changing track positions.
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 | |
---|---|
track | |
start_pos | |
end_pos | |
velocities | |
num_velocities | |
velocities_size | |
inside | Whether to find velocities inside the range (1) or outside (0). |
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* track_get_from_name(const char* name)
Returns the Track from the Project matching name
.
Parameters | |
---|---|
name | Name to search for. |
void track_update_positions(Track* self, bool from_ticks)
Updates the frames/ticks of each position in each child of the track recursively.
Parameters | |
---|---|
self | |
from_ticks | Whether to update the positions based on ticks (true) or frames (false). |
Fader* track_get_fader(Track* track, bool post_fader)
Returns the Fader (if applicable).
Parameters | |
---|---|
track | |
post_fader | True to get post fader, false to get pre fader. |
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. |
---|
void track_comment_setter(void* track, const char* comment)
Comment setter.
void track_set_comment(Track* self, const char* comment, bool undoable)
Parameters | |
---|---|
self | |
comment | |
undoable | Create an undable action. |
Plugin* track_get_plugin_at_slot(Track* track, PluginSlotType slot_type, int slot)
Returns the plugin at the given slot, if any.
Parameters | |
---|---|
track | |
slot_type | |
slot | The slot (ignored if instrument is selected. |
void track_mark_for_bounce(Track* self, bool bounce, bool mark_regions, bool mark_children, bool mark_parents)
Marks the track for bouncing.
Parameters | |
---|---|
self | |
bounce | |
mark_regions | |
mark_children | Whether to mark all children tracks as well. Used when exporting stems on the specific track stem only. |
mark_parents | Whether to mark all parent tracks as well. |
void track_freeze(Track* self, bool freeze)
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.
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_
Parameters | |
---|---|
self | |
pl | |
slot_type | |
slot | |
instantiate_plugin | Whether to attempt to instantiate the plugin. |
replacing_plugin | |
moving_plugin | |
confirm | |
gen_automatables | |
recalc_graph | |
fire_events |
void track_disconnect(Track* self, bool remove_pl, bool recalc_graph)
Disconnects the track from the processing chain.
Parameters | |
---|---|
self | |
remove_pl | Remove the Plugin from the Channel. Useful when deleting the channel. |
recalc_graph | Recalculate mixer graph. |
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.
void track_lane_rename(TrackLane* self, const char* new_name, bool with_action)
Rename the lane.
Parameters | |
---|---|
self | |
new_name | |
with_action | Whether to make this an undoable action. |
void track_lane_update_positions(TrackLane* self, bool from_ticks)
Updates the positions in each child recursively.
Parameters | |
---|---|
self | |
from_ticks | Whether to update the positions based on ticks (true) or frames (false). |
TrackLane* track_lane_clone(const TrackLane* src, Track* track)
Clones the TrackLane.
Parameters | |
---|---|
src | |
track | New owner track, if any. |
void track_processor_process(const 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, if has piano roll
- change MIDI CC control port values based on any MIDI input, if applicable — 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)
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.
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.
NONNULL void tracklist_select_all(Tracklist* self, bool select, bool fire_events)
Selects or deselects all tracks.
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 | |
---|---|
self | |
track | |
pos | |
publish_events | Publish UI events. |
recalc_graph | Recalculate routing graph. |
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.
Parameters | |
---|---|
self | |
track | |
rm_pl | Remove plugins or not. |
free_track | |
publish_events | Push a track deleted event to the UI. |
recalc_graph | Recalculate the mixer graph. |
Also disconnects the channel.
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 | |
---|---|
self | |
track | |
pos | Position to insert at, or -1 to insert at the end. |
always_before_pos | Whether 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_events | Push UI update events or not. |
recalc_graph | Recalculate routing graph. |
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.
Track* tracklist_get_first_visible_track(Tracklist* self, const int pinned)
Returns the first visible Track.
Parameters | |
---|---|
self | |
pinned | 1 to check the pinned tracklist, 0 to check the non-pinned tracklist. |
int tracklist_get_last_pos(Tracklist* self, const TracklistPinOption pin_opt, const bool visible_only)
Returns the index of the last Track.
Parameters | |
---|---|
self | |
pin_opt | Pin option. |
visible_only | Only consider visible Track's. |
Track* tracklist_get_last_track(Tracklist* self, const TracklistPinOption pin_opt, const int visible_only)
Returns the last Track.
Parameters | |
---|---|
self | |
pin_opt | Pin option. |
visible_only | Only consider 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).
The caller is responsible for checking that both tracks are in the same tracklist (ie, pinned or not).
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 | |
---|---|
self | |
multiplier | |
visible_only | Only apply to visible tracks. |
check_only | |
fire_events |
void tracklist_handle_file_drop(Tracklist* self, char** uri_list, SupportedFile* orig_file, Track* track, TrackLane* lane, Position* pos, bool perform_actions)
Handles a file drop inside the timeline or in empty space in the tracklist.
Parameters | |
---|---|
self | |
uri_list | URI list, if URI list was dropped. |
orig_file | |
track | Track, if any. |
lane | TrackLane, if any. |
pos | Position the file was dropped at, if inside track. |
perform_actions | Whether to perform undoable actions in addition to creating the regions/tracks. |
void tracklist_handle_move_or_copy(Tracklist* self, Track* this_track, TrackWidgetHighlight location, GdkDragAction action)
Handles a move or copy paction based on a drag.
Parameters | |
---|---|
self | |
this_track | The track at the cursor (where the selection was dropped to. |
location | Location relative to this_track. |
action |
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 | |
---|---|
self | |
name | |
track_to_skip | Track to skip when searching. |
int tracklist_get_num_visible_tracks(Tracklist* self, int visible)
Parameters | |
---|---|
self | |
visible | 1 for visible, 0 for invisible. |
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.
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* tracklist_clone(Tracklist* src)
Only clones what is needed for project save.
Parameters | |
---|---|
src | Source tracklist. Must be the tracklist of the project in use. |
void transport_init_loaded(Transport* self, AudioEngine* engine, Track* tempo_track)
Initialize loaded transport.
Parameters | |
---|---|
self | |
engine | Owner engine, if any. |
tempo_track | Tempo track, used to initialize the caches. Only needed on the active project transport. |
void transport_stretch_audio_regions(Transport* self, TimelineSelections* sel, bool with_fixed_ratio, double time_ratio)
Stretches audio regions.
Parameters | |
---|---|
self | |
sel | |
with_fixed_ratio | Stretch all regions with a fixed ratio. If this is off, the current region length and ZRegion:: |
time_ratio |
void transport_move_playhead(Transport* self, Position* target, bool panic, bool set_cue_point, bool fire_events)
Moves playhead to given pos.
Parameters | |
---|---|
self | |
target | Position to set to. |
panic | Send MIDI panic or not. |
set_cue_point | Also set the cue point at this position. |
fire_events |
This is only for moves other than while playing and for looping while playing.
void transport_update_positions(Transport* self, bool update_from_ticks)
Updates the frames in all transport positions.
Parameters | |
---|---|
self | |
update_from_ticks | Whether to update the positions based on ticks (true) or frames (false). |
void transport_set_range(Transport* self, bool range1, const Position* start_pos, const Position* pos, bool snap)
Set the range1 or range2 position.
Parameters | |
---|---|
self | |
range1 | True to set range1, false to set range2. |
start_pos | |
pos | |
snap |
void transport_recalculate_total_bars(Transport* self, ArrangerSelections* sel)
Recalculates the total bars based on the last object's position.
Parameters | |
---|---|
self | |
sel | If given, only these objects will be checked, otherwise every object in the project will be checked. |
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
bool 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::
bool 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.
Port* port
#include <audio/meter.h>
Port associated with this meter.
TruePeakDsp* true_peak_processor
#include <audio/meter.h>
True peak processor.
float true_peak
#include <audio/meter.h>
Current true peak.
KMeterDsp* kmeter_processor
#include <audio/meter.h>
K RMS processor, if K meter.
float prev_max
#include <audio/meter.h>
Previous max, used when holding the max value.
float last_amp
#include <audio/meter.h>
Last meter value (in amplitude), used to show a falloff and avoid sudden dips.
gint64 last_draw_time
#include <audio/meter.h>
Time the last val was taken at (last draw time).
Define documentation
#define AUDIO_REGION_DEFAULT_FADE_MS
#include <audio/audio_region.h>
Default fade to inject when playing back.
#define chord_track_get_chord_at_playhead(ct)
#include <audio/chord_track.h>
Returns the current chord.
#define chord_track_get_scale_at_playhead(ct)
#include <audio/chord_track.h>
Returns the current scale.
#define control_port_is_val_toggled(val)
#include <audio/control_port.h>
Checks if the given value is toggled.
#define control_port_is_toggled(self)
#include <audio/control_port.h>
Returns if the control port is toggled.
#define MAX_MIDI_EVENTS
#include <audio/midi_event.h>
Max events to hold in queues.
#define midi_region_add_midi_note(region,
midi_note,
pub_events)
#include <audio/midi_region.h>
Adds the MidiNote to the given ZRegion.
Parameters | |
---|---|
region | |
midi_note | |
pub_events | Publish UI events or not. |
#define PORT_NOT_OWNED
Special ID for owner_pl, owner_ch, etc.
to indicate that the port is not owned.
#define position_compare(p1, p2)
Compares 2 positions based on their frames.
negative = p1 is earlier 0 = equal positive = p2 is earlier