Service for managing clip playback operations.
More...
#include <src/structure/scenes/clip_playback_service.h>
|
|
void | clipLaunched (tracks::Track *track, ClipSlot *clipSlot) |
| | Emitted when a clip is launched.
|
|
void | clipStopped (tracks::Track *track, ClipSlot *clipSlot) |
| | Emitted when a clip is stopped.
|
|
void | sceneLaunched (Scene *scene) |
| | Emitted when a scene is launched.
|
|
void | sceneStopped (Scene *scene) |
| | Emitted when a scene is stopped.
|
|
|
| ClipPlaybackService (arrangement::ArrangerObjectRegistry &object_registry, const tracks::TrackCollection &track_collection, QObject *parent=nullptr) |
| Q_INVOKABLE void | launchClip (tracks::Track *track, ClipSlot *clipSlot, structure::tracks::ClipQuantizeOption quantize=structure::tracks::ClipQuantizeOption::NextBar) |
| | Launch a clip with quantization.
|
| Q_INVOKABLE void | stopClip (tracks::Track *track, ClipSlot *clipSlot, structure::tracks::ClipQuantizeOption quantize=structure::tracks::ClipQuantizeOption::NextBar) |
| | Stop a clip with quantization.
|
| Q_INVOKABLE void | launchScene (Scene *scene, structure::tracks::ClipQuantizeOption quantize=structure::tracks::ClipQuantizeOption::NextBar) |
| | Launch all clips in a scene.
|
| Q_INVOKABLE void | stopScene (Scene *scene, structure::tracks::ClipQuantizeOption quantize=structure::tracks::ClipQuantizeOption::NextBar) |
| | Stop all clips in a scene.
|
| Q_INVOKABLE void | stopAllClips (structure::tracks::ClipQuantizeOption quantize=structure::tracks::ClipQuantizeOption::NextBar) |
| | Stop all playing clips across all tracks.
|
| Q_INVOKABLE bool | isClipPlaying (ClipSlot *clipSlot) const |
| | Check if a clip is currently playing.
|
| Q_INVOKABLE double | getClipPlaybackPosition (ClipSlot *clipSlot) const |
| | Get the current playback position of a clip, in.
|
| Q_INVOKABLE QList< ClipSlot * > | getPlayingClips () const |
| | Get all currently playing clips.
|
| void | setTrackToClipLauncherMode (tracks::Track *track) |
| | Set a track to use clip launcher mode.
|
| Q_INVOKABLE void | setTrackToTimelineMode (tracks::Track *track) |
| | Set a track to use timeline mode.
|
| void | cancelPendingClipOperations (tracks::Track *track) |
| | Cancel any pending clip operations for a track.
|
Service for managing clip playback operations.
This service handles launching and stopping clips with proper quantization, managing track processor states, and coordinating between the UI and audio engine.
Definition at line 22 of file clip_playback_service.h.
◆ cancelPendingClipOperations()
| void zrythm::structure::scenes::ClipPlaybackService::cancelPendingClipOperations |
( |
tracks::Track * | track | ) |
|
Cancel any pending clip operations for a track.
This is called when switching modes to ensure clips don't get stuck in queued state.
- Parameters
-
| track | The track to cancel operations for |
◆ getClipPlaybackPosition()
| Q_INVOKABLE double zrythm::structure::scenes::ClipPlaybackService::getClipPlaybackPosition |
( |
ClipSlot * | clipSlot | ) |
const |
Get the current playback position of a clip, in.
- Parameters
-
| clipSlot | The clip slot to get the position for |
- Returns
- Position in the clip as a percentage (0.0 to 1.0), or -1 if not playing
◆ getPlayingClips()
| Q_INVOKABLE QList< ClipSlot * > zrythm::structure::scenes::ClipPlaybackService::getPlayingClips |
( |
| ) |
const |
Get all currently playing clips.
- Returns
- List of playing clip slots
◆ isClipPlaying()
| Q_INVOKABLE bool zrythm::structure::scenes::ClipPlaybackService::isClipPlaying |
( |
ClipSlot * | clipSlot | ) |
const |
Check if a clip is currently playing.
- Parameters
-
| clipSlot | The clip slot to check |
- Returns
- true if the clip is playing
◆ launchClip()
| Q_INVOKABLE void zrythm::structure::scenes::ClipPlaybackService::launchClip |
( |
tracks::Track * | track, |
|
|
ClipSlot * | clipSlot, |
|
|
structure::tracks::ClipQuantizeOption | quantize = structure::tracks::ClipQuantizeOption::NextBar ) |
Launch a clip with quantization.
- Parameters
-
| track | The track to play the clip on |
| clipSlot | The clip slot containing the clip to launch |
| quantize | Quantization option for timing |
◆ launchScene()
| Q_INVOKABLE void zrythm::structure::scenes::ClipPlaybackService::launchScene |
( |
Scene * | scene, |
|
|
structure::tracks::ClipQuantizeOption | quantize = structure::tracks::ClipQuantizeOption::NextBar ) |
Launch all clips in a scene.
- Parameters
-
| scene | The scene to launch |
| quantize | Quantization option for timing |
◆ setTrackToClipLauncherMode()
| void zrythm::structure::scenes::ClipPlaybackService::setTrackToClipLauncherMode |
( |
tracks::Track * | track | ) |
|
Set a track to use clip launcher mode.
- Parameters
-
| track | The track to configure |
◆ setTrackToTimelineMode()
| Q_INVOKABLE void zrythm::structure::scenes::ClipPlaybackService::setTrackToTimelineMode |
( |
tracks::Track * | track | ) |
|
Set a track to use timeline mode.
- Parameters
-
| track | The track to configure |
◆ stopAllClips()
| Q_INVOKABLE void zrythm::structure::scenes::ClipPlaybackService::stopAllClips |
( |
structure::tracks::ClipQuantizeOption | quantize = structure::tracks::ClipQuantizeOption::NextBar | ) |
|
Stop all playing clips across all tracks.
- Parameters
-
| quantize | Quantization option for timing |
◆ stopClip()
| Q_INVOKABLE void zrythm::structure::scenes::ClipPlaybackService::stopClip |
( |
tracks::Track * | track, |
|
|
ClipSlot * | clipSlot, |
|
|
structure::tracks::ClipQuantizeOption | quantize = structure::tracks::ClipQuantizeOption::NextBar ) |
Stop a clip with quantization.
- Parameters
-
| track | The track containing the playing clip |
| clipSlot | The clip slot to stop |
| quantize | Quantization option for timing |
◆ stopScene()
| Q_INVOKABLE void zrythm::structure::scenes::ClipPlaybackService::stopScene |
( |
Scene * | scene, |
|
|
structure::tracks::ClipQuantizeOption | quantize = structure::tracks::ClipQuantizeOption::NextBar ) |
Stop all clips in a scene.
- Parameters
-
| scene | The scene to stop |
| quantize | Quantization option for timing |
The documentation for this class was generated from the following file: