Zrythm
v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
transport_controller.h
1
// SPDX-FileCopyrightText: © 2026 Alexandros Theodotou <alex@zrythm.org>
2
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
4
#pragma once
5
6
#include "dsp/snap_grid.h"
7
#include "dsp/transport.h"
8
9
#include <QtQmlIntegration>
10
11
namespace
zrythm::controllers
12
{
13
19
class
TransportController :
public
QObject
20
{
21
Q_OBJECT
22
QML_ELEMENT
23
QML_UNCREATABLE (
""
)
24
25
public
:
26
explicit
TransportController (
27
dsp::Transport
&transport,
28
dsp::SnapGrid
&snap_grid,
29
QObject * parent =
nullptr
)
30
: QObject (parent), transport_ (transport), snap_grid_ (snap_grid)
31
{
32
}
33
37
Q_INVOKABLE
void
moveBackward
() [[clang::blocking]];
38
42
Q_INVOKABLE
void
moveForward
() [[clang::blocking]];
43
44
private
:
47
static
constexpr
auto
REPEATED_BACKWARD_MS = au::milli (units::seconds) (240);
48
49
dsp::Transport
&transport_;
50
dsp::SnapGrid
&snap_grid_;
51
};
52
53
}
// namespace zrythm::controllers
zrythm::controllers::TransportController::moveForward
Q_INVOKABLE void moveForward()
Moves the playhead forward to the next snap point.
zrythm::controllers::TransportController::moveBackward
Q_INVOKABLE void moveBackward()
Moves the playhead backward to the previous snap point.
zrythm::dsp::SnapGrid
Snap/grid information.
Definition
snap_grid.h:22
zrythm::dsp::Transport
The Transport class represents the transport controls and state for an audio engine.
Definition
transport.h:44
src
controllers
transport_controller.h
Generated by
1.15.0