audio/transport.h file

Transport API.

Contents

Classes

struct Transport
The transport.

Typedefs

using Transport = struct Transport
The transport.

Functions

void transport_init(Transport* self, int loading)
Initialize transport.
void transport_set_bpm(Transport* self, float bpm)
Sets BPM and does any necessary processing (like notifying interested parties).
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(Position* target, int panic)
Moves playhead to given pos.
void transport_set_loop(Transport* self, int 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.
auto transport_frames_add_frames(const Transport* self, const long gframes, const nframes_t frames) -> long
Adds frames to the given global frames, while adjusting the new frames to loop back if the loop point was crossed.
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_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;.