Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::dsp::Transport::TransportSnapshot Class Reference
Inheritance diagram for zrythm::dsp::Transport::TransportSnapshot:
Collaboration diagram for zrythm::dsp::Transport::TransportSnapshot:

Public Member Functions

 TransportSnapshot (std::pair< units::sample_t, units::sample_t > loop_range, std::pair< units::sample_t, units::sample_t > punch_range, units::sample_t playhead_position, units::sample_t recording_preroll_frames_remaining, units::sample_t metronome_countin_frames_remaining, PlayState play_state, bool loop_enabled, bool punch_enabled, bool recording_enabled)
std::pair< units::sample_t, units::sample_t > get_loop_range_positions () const noexcept override
 Returns the loop range positions in samples.
std::pair< units::sample_t, units::sample_t > get_punch_range_positions () const noexcept override
 Returns the punch recording range positions in samples.
PlayState get_play_state () const noexcept override
units::sample_t get_playhead_position_in_audio_thread () const noexcept override
 Get the playhead position.
bool loop_enabled () const noexcept override
bool punch_enabled () const noexcept override
bool recording_enabled () const noexcept override
 Returns whether recording is enabled.
units::sample_t recording_preroll_frames_remaining () const noexcept override
 Frames remaining to preroll (playing back some time earlier before actually recording/rolling).
units::sample_t metronome_countin_frames_remaining () const noexcept override
 Frames remaining for metronome countin.
void set_play_state (dsp::ITransport::PlayState play_state)
void set_position (units::sample_t position)
void consume_metronome_countin_samples (units::sample_t samples)
void consume_recording_preroll_samples (units::sample_t samples)
Public Member Functions inherited from zrythm::dsp::ITransport
units::sample_t get_playhead_position_after_adding_frames_in_audio_thread (const units::sample_t current_playhead_position, const units::sample_t frames_to_add) const noexcept
 Gets the playhead position, similarly to get_playhead_position(), except that it adjusts the new position if the loop end point was crossed.
bool has_recording_preroll_frames_remaining () const noexcept
units::sample_t is_loop_point_met_in_audio_thread (units::sample_t g_start_frames, units::sample_t nframes) const noexcept
 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;.

Additional Inherited Members

Public Types inherited from zrythm::dsp::ITransport
enum class  PlayState : std::uint8_t { RollRequested , Rolling , PauseRequested , Paused }

Detailed Description

Definition at line 145 of file transport.h.

Constructor & Destructor Documentation

◆ TransportSnapshot()

zrythm::dsp::Transport::TransportSnapshot::TransportSnapshot ( std::pair< units::sample_t, units::sample_t > loop_range,
std::pair< units::sample_t, units::sample_t > punch_range,
units::sample_t playhead_position,
units::sample_t recording_preroll_frames_remaining,
units::sample_t metronome_countin_frames_remaining,
PlayState play_state,
bool loop_enabled,
bool punch_enabled,
bool recording_enabled )
inline

Definition at line 148 of file transport.h.

Member Function Documentation

◆ consume_metronome_countin_samples()

void zrythm::dsp::Transport::TransportSnapshot::consume_metronome_countin_samples ( units::sample_t samples)
inline

Definition at line 209 of file transport.h.

◆ consume_recording_preroll_samples()

void zrythm::dsp::Transport::TransportSnapshot::consume_recording_preroll_samples ( units::sample_t samples)
inline

Definition at line 213 of file transport.h.

◆ get_loop_range_positions()

std::pair< units::sample_t, units::sample_t > zrythm::dsp::Transport::TransportSnapshot::get_loop_range_positions ( ) const
inlineoverridevirtualnoexcept

Returns the loop range positions in samples.

Implements zrythm::dsp::ITransport.

Definition at line 168 of file transport.h.

◆ get_play_state()

PlayState zrythm::dsp::Transport::TransportSnapshot::get_play_state ( ) const
inlineoverridevirtualnoexcept

Implements zrythm::dsp::ITransport.

Definition at line 177 of file transport.h.

◆ get_playhead_position_in_audio_thread()

units::sample_t zrythm::dsp::Transport::TransportSnapshot::get_playhead_position_in_audio_thread ( ) const
inlineoverridevirtualnoexcept

Get the playhead position.

Returns
The position in samples.

Implements zrythm::dsp::ITransport.

Definition at line 179 of file transport.h.

◆ get_punch_range_positions()

std::pair< units::sample_t, units::sample_t > zrythm::dsp::Transport::TransportSnapshot::get_punch_range_positions ( ) const
inlineoverridevirtualnoexcept

Returns the punch recording range positions in samples.

Implements zrythm::dsp::ITransport.

Definition at line 173 of file transport.h.

◆ loop_enabled()

bool zrythm::dsp::Transport::TransportSnapshot::loop_enabled ( ) const
inlineoverridevirtualnoexcept

Implements zrythm::dsp::ITransport.

Definition at line 183 of file transport.h.

◆ metronome_countin_frames_remaining()

units::sample_t zrythm::dsp::Transport::TransportSnapshot::metronome_countin_frames_remaining ( ) const
inlineoverridevirtualnoexcept

Frames remaining for metronome countin.

Note
Count-in happens while the playhead is not moving.

Implements zrythm::dsp::ITransport.

Definition at line 196 of file transport.h.

◆ punch_enabled()

bool zrythm::dsp::Transport::TransportSnapshot::punch_enabled ( ) const
inlineoverridevirtualnoexcept

Implements zrythm::dsp::ITransport.

Definition at line 185 of file transport.h.

◆ recording_enabled()

bool zrythm::dsp::Transport::TransportSnapshot::recording_enabled ( ) const
inlineoverridevirtualnoexcept

Returns whether recording is enabled.

Implements zrythm::dsp::ITransport.

Definition at line 186 of file transport.h.

◆ recording_preroll_frames_remaining()

units::sample_t zrythm::dsp::Transport::TransportSnapshot::recording_preroll_frames_remaining ( ) const
inlineoverridevirtualnoexcept

Frames remaining to preroll (playing back some time earlier before actually recording/rolling).

Preroll is a number of frames earlier to start at before the punch in position during recording.

Implements zrythm::dsp::ITransport.

Definition at line 191 of file transport.h.

◆ set_play_state()

void zrythm::dsp::Transport::TransportSnapshot::set_play_state ( dsp::ITransport::PlayState play_state)
inline

Definition at line 201 of file transport.h.

◆ set_position()

void zrythm::dsp::Transport::TransportSnapshot::set_position ( units::sample_t position)
inline

Definition at line 205 of file transport.h.


The documentation for this class was generated from the following file: