audio/transport.h file

Contents

Transport API.

Classes

struct Transport
The transport.

Enums

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

Functions

auto transport_new(AudioEngine* engine) -> Transport*
Initialize transport.
auto transport_clone(Transport* self) -> 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_beat_unit(Transport* self, int beat_unit)
Updates beat unit and anything depending on it.
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 nframes_t 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_playhead(Transport* self, Position* target, bool panic, bool set_cue_point)
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_position_frames(Transport* self)
Updates the frames in all transport positions.
void transport_position_add_frames(const Transport* self, Position* pos, const nframes_t frames)
Adds frames to the given position similar to position_add_frames, except that it adjusts the new Position if the loop end point was crossed.
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.
auto transport_is_loop_point_met(const Transport* self, const long g_start_frames, const nframes_t nframes) -> 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;.