Transport struct

The transport.

Contents

Public variables

int total_bars
Total bars in the song.
Position playhead_pos
Playhead position.
Position cue_pos
Cue point position.
Position loop_start_pos
Loop start position.
Position loop_end_pos
Loop end position.
Position punch_in_pos
Punch in position.
Position punch_out_pos
Punch out position.
Position range_1
Selected range.
int has_range
Whether range should be displayed or not.
int beats_per_bar
Start marker position.
int beat_unit
Bottom part of the time signature.
nframes_t position
Transport position in frames.
int rolling
Transport speed (0=stop, 1=play).
bool loop
Looping or not.
bool punch_mode
Whether punch in/out mode is enabled.
int recording
Recording or not.
bool metronome_enabled
Metronome enabled or not.
bool start_playback_on_midi_input
Whether to start playback on MIDI input.
ZixSem paused
This is set when record is toggled and is used to check if a new region should be created.
Play_State play_state
Play state.

Variable documentation

Position Transport::range_1

Selected range.

This is 2 points instead of start/end because the 2nd point can be dragged past the 1st point so the order gets swapped.

Should be compared each time to see which one is first.

int Transport::beats_per_bar

Start marker position.

This is where the song starts. Used when exporting, etc. End marker position.

This is where the song ends. Used when exporting, etc. The top part (beats_per_par) is the number of beat units (the bottom part) there will be per bar.

Example: 4/4 = 4 (top) 1/4th (bot) notes per bar. 2/8 = 2 (top) 1/8th (bot) notes per bar.

int Transport::beat_unit

Bottom part of the time signature.

Power of 2.

nframes_t Transport::position

Transport position in frames.

FIXME is this used?

ZixSem Transport::paused

This is set when record is toggled and is used to check if a new region should be created.

It should be set to off after the first cycle it is processed in in the audio engine post process. Paused signal from process thread.