|
Zrythm v2.0.0-alpha.1
a highly automated and intuitive digital audio workstation
|
The Transport class represents the transport controls and state for an audio engine. More...
#include <src/dsp/transport.h>


Data Structures | |
| struct | ConfigProvider |
| class | TransportSnapshot |
Public Types | |
| enum class | Display { BBT , Time } |
| Corrseponts to "transport-display" in the gsettings. More... | |
| enum class | RecordingMode { OverwriteEvents , MergeEvents , Takes , TakesMuted } |
| Recording mode for MIDI and audio. More... | |
| using | PlayState = dsp::ITransport::PlayState |
Public Member Functions | |
| Transport (const dsp::TempoMapWrapper &tempo_map_wrapper, ConfigProvider config_provider, QObject *parent=nullptr) | |
| bool | loopEnabled () const |
| void | setLoopEnabled (bool enabled) |
| Q_SIGNAL void | loopEnabledChanged (bool enabled) |
| bool | recordEnabled () const |
| void | setRecordEnabled (bool enabled) |
| Q_SIGNAL void | recordEnabledChanged (bool enabled) |
| bool | punchEnabled () const |
| void | setPunchEnabled (bool enabled) |
| Q_SIGNAL void | punchEnabledChanged (bool enabled) |
| PlayState | getPlayState () const |
| void | setPlayState (PlayState state) |
| Q_SIGNAL void | playStateChanged (PlayState state) |
| dsp::PlayheadQmlWrapper * | playhead () const |
| dsp::TimelinePosition * | cuePosition () const |
| dsp::TimelinePosition * | loopStartPosition () const |
| dsp::TimelinePosition * | loopEndPosition () const |
| dsp::TimelinePosition * | punchInPosition () const |
| dsp::TimelinePosition * | punchOutPosition () const |
| Q_INVOKABLE void | requestPause () |
| Request pause. | |
| Q_INVOKABLE void | requestRoll () |
| Request playback. | |
| Q_INVOKABLE void | movePlayhead (double ticks, bool setCuePoint) |
| Moves the playhead to the given tick position. | |
| units::sample_t | get_playhead_position_in_audio_thread () const noexcept |
| Q_INVOKABLE bool | isRolling () const |
| Q_INVOKABLE bool | isPaused () const |
| void | add_to_playhead_in_audio_thread (const dsp::Transport::TransportSnapshot &transport_snapshot, units::sample_t nframes) noexcept |
| Moves the playhead by the time corresponding to given samples, taking into account the loop end point. | |
| void | set_play_state_rt_safe (PlayState state) |
| void | move_playhead (units::precise_tick_t target_ticks, bool set_cue_point) |
| Moves playhead to given pos. | |
| void | goto_prev_or_next_marker (bool prev, utils::RangeOf< units::precise_tick_t > auto &&extra_markers) |
| Moves the playhead to the previous or next marker. | |
| bool | position_is_inside_punch_range (units::sample_t pos) const |
| auto | playhead_ticks_before_pause () const |
| void | consume_metronome_countin_samples (units::sample_t samples) |
| For engine use only. | |
| void | consume_recording_preroll_samples (units::sample_t samples) |
| For engine use only. | |
| auto | get_snapshot () const noexcept |
Properties | |
| QML_ELEMENT bool | loopEnabled |
| bool | recordEnabled |
| bool | punchEnabled |
| zrythm::dsp::ITransport::PlayState | playState |
| zrythm::dsp::PlayheadQmlWrapper * | playhead |
| zrythm::dsp::TimelinePosition * | cuePosition |
| zrythm::dsp::TimelinePosition * | loopStartPosition |
| zrythm::dsp::TimelinePosition * | loopEndPosition |
| zrythm::dsp::TimelinePosition * | punchInPosition |
| zrythm::dsp::TimelinePosition * | punchOutPosition |
Friends | |
| void | init_from (Transport &obj, const Transport &other, utils::ObjectCloneType clone_type) |
| void | to_json (nlohmann::json &j, const Transport &transport) |
| void | from_json (const nlohmann::json &j, Transport &transport) |
The Transport class represents the transport controls and state for an audio engine.
It manages playback, recording, and other transport-related functionality.
Definition at line 47 of file transport.h.
| using zrythm::dsp::Transport::PlayState = dsp::ITransport::PlayState |
Definition at line 70 of file transport.h.
|
strong |
Corrseponts to "transport-display" in the gsettings.
Definition at line 77 of file transport.h.
|
strong |
Recording mode for MIDI and audio.
In all cases, only objects created during the current recording cycle can be changed. Previous objects shall not be touched.
Definition at line 90 of file transport.h.
|
inline |
For engine use only.
| samples | Samples to consume. |
Definition at line 418 of file transport.h.
|
inline |
For engine use only.
| samples | Samples to consume. |
Definition at line 429 of file transport.h.
|
inline |
Definition at line 263 of file transport.h.
|
inlinenoexcept |
Definition at line 309 of file transport.h.
|
inlinenoexcept |
Definition at line 435 of file transport.h.
|
inline |
Definition at line 255 of file transport.h.
|
inline |
Moves the playhead to the previous or next marker.
| prev | True for previous, false for next. |
Definition at line 355 of file transport.h.
|
inline |
Definition at line 321 of file transport.h.
|
inline |
Definition at line 316 of file transport.h.
|
inline |
Definition at line 243 of file transport.h.
|
inline |
Definition at line 268 of file transport.h.
|
inline |
Definition at line 264 of file transport.h.
| void zrythm::dsp::Transport::move_playhead | ( | units::precise_tick_t | target_ticks, |
| bool | set_cue_point ) |
Moves playhead to given pos.
This is only for moves other than while playing and for looping while playing. For example it should be used for moves when the user clicks on a position in the ruler.
Should not be used during exporting.
| target_ticks | Position to set to. |
| set_cue_point | Also set the cue point at this position. |
| Q_INVOKABLE void zrythm::dsp::Transport::movePlayhead | ( | double | ticks, |
| bool | setCuePoint ) |
Moves the playhead to the given tick position.
This is intended for user-initiated playhead moves (e.g., clicking on the ruler).
| ticks | The target position in ticks. |
| setCuePoint | If true, also sets the cue position to this position. |
|
inline |
Definition at line 259 of file transport.h.
|
inline |
Definition at line 408 of file transport.h.
|
inline |
Definition at line 251 of file transport.h.
|
inline |
Definition at line 272 of file transport.h.
|
inline |
Definition at line 276 of file transport.h.
|
inline |
Definition at line 247 of file transport.h.
|
read |
Definition at line 56 of file transport.h.
|
readwrite |
Definition at line 51 of file transport.h.
|
read |
Definition at line 59 of file transport.h.
|
read |
Definition at line 57 of file transport.h.
|
read |
Definition at line 55 of file transport.h.
|
readwrite |
Definition at line 54 of file transport.h.
|
readwrite |
Definition at line 53 of file transport.h.
|
read |
Definition at line 60 of file transport.h.
|
read |
Definition at line 61 of file transport.h.
|
readwrite |
Definition at line 52 of file transport.h.