|
Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
|
Transport action. More...
#include <src/gui/backend/backend/legacy_actions/transport_action.h>


Public Types | |
| enum class | Type { TempoChange , BeatsPerBarChange , BeatUnitChange } |
| Public Types inherited from zrythm::gui::actions::UndoableAction | |
| enum class | Type { TracklistSelections , ChannelSend , MixerSelections , ArrangerSelections , MidiMapping , PortConnection , Port , Range , Transport , Chord } |
| Type of UndoableAction. More... | |
| using | PortConnectionsManager = dsp::PortConnectionsManager |
Public Member Functions | |
| TransportAction (QObject *parent=nullptr) | |
| TransportAction (bpm_t bpm_before, bpm_t bpm_after, bool already_done, QObject *parent=nullptr) | |
| Construct a new Transport Action object for a BPM change. | |
| TransportAction (Type type, int before, int after, bool already_done, QObject *parent=nullptr) | |
| Construct a new Transport object for a beat unit/beats per bar change. | |
| QString | to_string () const override |
| Stringizes the action to be used in Undo/Redo buttons. | |
| Public Member Functions inherited from zrythm::gui::actions::UndoableAction | |
| UndoableAction (Type type) | |
| UndoableAction (Type type, dsp::FramesPerTick frames_per_tick, units::sample_rate_t sample_rate) | |
| void | init_loaded (sample_rate_t engine_sample_rate) |
| Non virtual function following the NVI pattern. | |
| virtual bool | needs_pause () const |
| Returns whether the action requires pausing the engine. | |
| virtual bool | needs_transport_total_bar_update (bool perform) const |
| Returns whether the total transport bars need to be recalculated. | |
| virtual bool | affects_audio_region_internal_positions () const |
| Whether audio region loop/fade/etc. | |
| virtual void | get_plugins (std::vector< plugins::Plugin * > &plugins) |
| Get the plugins referenced in this action. | |
| auto | get_frames_per_tick () const |
| auto | get_ticks_per_frame () const |
| void | set_num_actions (int num_actions) |
| Sets the number of actions for this action. | |
| void | save_or_load_port_connections (bool performing) |
| To be used by actions that save/load port connections. | |
| void | perform () |
| Performs the action. | |
| void | undo () |
| Undoes the action. | |
Data Fields | |
| Type | type_ = Type::TempoChange |
| bpm_t | bpm_before_ = 0.0 |
| bpm_t | bpm_after_ = 0.0 |
| int | int_before_ = 0 |
| int | int_after_ = 0 |
| bool | already_done_ = false |
| Flag whether the action was already performed the first time. | |
| bool | musical_mode_ = false |
| Whether musical mode was enabled when this action was made. | |
| Data Fields inherited from zrythm::gui::actions::UndoableAction | |
| Type | undoable_action_type_ {} |
| Undoable action type. | |
| dsp::FramesPerTick | frames_per_tick_ |
| A snapshot of AudioEngine.frames_per_tick when the action is executed. | |
| units::sample_rate_t | sample_rate_ = 0 |
| Sample rate of this action. | |
| int | num_actions_ = 1 |
| Number of actions to perform. | |
| std::unique_ptr< dsp::PortConnectionsManager > | port_connections_before_ |
| An (optional) clone of the port connections at the start of the action, used for reverting port connections when undoing. | |
| std::unique_ptr< dsp::PortConnectionsManager > | port_connections_after_ |
Friends | |
| void | init_from (TransportAction &obj, const TransportAction &other, utils::ObjectCloneType clone_type) |
Transport action.
Definition at line 17 of file transport_action.h.
|
strong |
Definition at line 24 of file transport_action.h.
| zrythm::gui::actions::TransportAction::TransportAction | ( | bpm_t | bpm_before, |
| bpm_t | bpm_after, | ||
| bool | already_done, | ||
| QObject * | parent = nullptr ) |
Construct a new Transport Action object for a BPM change.
| bpm_before | |
| bpm_after | |
| already_done |
| zrythm::gui::actions::TransportAction::TransportAction | ( | Type | type, |
| int | before, | ||
| int | after, | ||
| bool | already_done, | ||
| QObject * | parent = nullptr ) |
Construct a new Transport object for a beat unit/beats per bar change.
| type | |
| before | |
| after | |
| already_done |
|
overridevirtual |
Stringizes the action to be used in Undo/Redo buttons.
Implements zrythm::gui::actions::UndoableAction.
| bool zrythm::gui::actions::TransportAction::already_done_ = false |
Flag whether the action was already performed the first time.
Definition at line 91 of file transport_action.h.
| bpm_t zrythm::gui::actions::TransportAction::bpm_after_ = 0.0 |
Definition at line 85 of file transport_action.h.
| bpm_t zrythm::gui::actions::TransportAction::bpm_before_ = 0.0 |
Definition at line 84 of file transport_action.h.
| int zrythm::gui::actions::TransportAction::int_after_ = 0 |
Definition at line 88 of file transport_action.h.
| int zrythm::gui::actions::TransportAction::int_before_ = 0 |
Definition at line 87 of file transport_action.h.
| bool zrythm::gui::actions::TransportAction::musical_mode_ = false |
Whether musical mode was enabled when this action was made.
Definition at line 94 of file transport_action.h.
| Type zrythm::gui::actions::TransportAction::type_ = Type::TempoChange |
Definition at line 82 of file transport_action.h.