Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::dsp::ITransport Class Referenceabstract

Interface for transport. More...

#include <src/dsp/itransport.h>

Inheritance diagram for zrythm::dsp::ITransport:

Public Types

enum class  PlayState : std::uint8_t { RollRequested , Rolling , PauseRequested , Paused }

Public Member Functions

virtual std::pair< units::sample_t, units::sample_t > get_loop_range_positions () const noexcept=0
 Returns the loop range positions in samples.
virtual std::pair< units::sample_t, units::sample_t > get_punch_range_positions () const noexcept=0
 Returns the punch recording range positions in samples.
virtual PlayState get_play_state () const noexcept=0
virtual units::sample_t get_playhead_position_in_audio_thread () const noexcept=0
 Get the playhead position.
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.
virtual bool loop_enabled () const noexcept=0
virtual bool punch_enabled () const noexcept=0
virtual bool recording_enabled () const noexcept=0
 Returns whether recording is enabled.
virtual units::sample_t recording_preroll_frames_remaining () const noexcept=0
 Frames remaining to preroll (playing back some time earlier before actually recording/rolling).
bool has_recording_preroll_frames_remaining () const noexcept
virtual units::sample_t metronome_countin_frames_remaining () const noexcept=0
 Frames remaining for metronome countin.
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;.

Detailed Description

Interface for transport.

Definition at line 16 of file itransport.h.

Member Enumeration Documentation

◆ PlayState

enum class zrythm::dsp::ITransport::PlayState : std::uint8_t
strong

Definition at line 19 of file itransport.h.

Member Function Documentation

◆ get_loop_range_positions()

virtual std::pair< units::sample_t, units::sample_t > zrythm::dsp::ITransport::get_loop_range_positions ( ) const
pure virtualnoexcept

Returns the loop range positions in samples.

Implemented in zrythm::dsp::Transport, and zrythm::dsp::Transport::TransportSnapshot.

◆ get_playhead_position_after_adding_frames_in_audio_thread()

units::sample_t zrythm::dsp::ITransport::get_playhead_position_after_adding_frames_in_audio_thread ( const units::sample_t current_playhead_position,
const units::sample_t frames_to_add ) const
inlinenoexcept

Gets the playhead position, similarly to get_playhead_position(), except that it adjusts the new position if the loop end point was crossed.

Returns
The position in samples.

Definition at line 59 of file itransport.h.

◆ get_playhead_position_in_audio_thread()

virtual units::sample_t zrythm::dsp::ITransport::get_playhead_position_in_audio_thread ( ) const
pure virtualnoexcept

Get the playhead position.

Returns
The position in samples.

Implemented in zrythm::dsp::Transport, and zrythm::dsp::Transport::TransportSnapshot.

◆ get_punch_range_positions()

virtual std::pair< units::sample_t, units::sample_t > zrythm::dsp::ITransport::get_punch_range_positions ( ) const
pure virtualnoexcept

Returns the punch recording range positions in samples.

Implemented in zrythm::dsp::Transport, and zrythm::dsp::Transport::TransportSnapshot.

◆ has_recording_preroll_frames_remaining()

bool zrythm::dsp::ITransport::has_recording_preroll_frames_remaining ( ) const
inlinenoexcept

Definition at line 102 of file itransport.h.

◆ is_loop_point_met_in_audio_thread()

units::sample_t zrythm::dsp::ITransport::is_loop_point_met_in_audio_thread ( units::sample_t g_start_frames,
units::sample_t nframes ) const
inlinenoexcept

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

Definition at line 120 of file itransport.h.

◆ metronome_countin_frames_remaining()

virtual units::sample_t zrythm::dsp::ITransport::metronome_countin_frames_remaining ( ) const
pure virtualnoexcept

Frames remaining for metronome countin.

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

Implemented in zrythm::dsp::Transport, and zrythm::dsp::Transport::TransportSnapshot.

◆ recording_enabled()

virtual bool zrythm::dsp::ITransport::recording_enabled ( ) const
pure virtualnoexcept

Returns whether recording is enabled.

Implemented in zrythm::dsp::Transport, and zrythm::dsp::Transport::TransportSnapshot.

◆ recording_preroll_frames_remaining()

virtual units::sample_t zrythm::dsp::ITransport::recording_preroll_frames_remaining ( ) const
pure virtualnoexcept

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.

Implemented in zrythm::dsp::Transport, and zrythm::dsp::Transport::TransportSnapshot.


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