|
Zrythm v2.0.0-alpha.1
a highly automated and intuitive digital audio workstation
|
AudioClip-specific waveform canvas. More...
#include <src/gui/qquick/audio_clip_waveform_canvas_item.h>


Signals | |
| void | audioClipChanged () |
| void | tempoMapChanged () |
| Signals inherited from zrythm::gui::qquick::WaveformCanvasItem | |
| void | waveformColorChanged () |
| void | outlineColorChanged () |
| Signals inherited from zrythm::gui::qquick::ClipCanvasItemBase | |
| void | referenceWidthChanged () |
| void | referenceXChanged () |
| void | loopPreviewChanged () |
Public Member Functions | |
| AudioClipWaveformCanvasItem (QQuickItem *parent=nullptr) | |
| structure::arrangement::AudioClip * | audioClip () const |
| void | setAudioClip (structure::arrangement::AudioClip *clip) |
| QObject * | tempoMap () const |
| void | setTempoMap (QObject *tempoMap) |
| bool | hasLoop () const |
| Only wrap when the clip is actually looped. | |
| int64_t | loopStartFrame () const |
| Sample-space offset of the loop-start position relative to clip start (content-space, not buffer-space). | |
| int64_t | loopEndFrame () const |
| int64_t | clipStartFrame () const |
| int64_t | loopRegionBufferStart () const |
| Where the loop region begins in the serialized buffer. | |
| std::vector< int64_t > | computeTimelineFrameMapping (int canvas_width, qreal reference_width, qreal reference_x) const |
| Computes a per-pixel frame mapping that accounts for the tempo map's non-linear tick-to-sample conversion. | |
| Public Member Functions inherited from zrythm::gui::qquick::WaveformCanvasItem | |
| WaveformCanvasItem (QQuickItem *parent=nullptr) | |
| QCanvasPainterItemRenderer * | createItemRenderer () const override |
| QColor | waveformColor () const |
| void | setWaveformColor (const QColor &color) |
| QColor | outlineColor () const |
| void | setOutlineColor (const QColor &color) |
| const juce::AudioSampleBuffer * | audioBuffer () const |
| uint64_t | bufferGeneration () const |
| Monotonically increasing counter bumped on each buffer change. | |
| Public Member Functions inherited from zrythm::gui::qquick::ClipCanvasItemBase | |
| ClipCanvasItemBase (QQuickItem *parent=nullptr) | |
| qreal | referenceWidth () const |
| void | setReferenceWidth (qreal w) |
| qreal | referenceX () const |
| void | setReferenceX (qreal x) |
| qreal | effectiveReferenceWidth () const |
| Returns referenceWidth if set (> 0), otherwise the actual width(). | |
| bool | loopPreview () const |
| When true, the renderer wraps content into the loop region even if the clip is not currently looped. | |
| void | setLoopPreview (bool preview) |
Properties | |
| zrythm::structure::arrangement::AudioClip * | audioClip |
| QObject * | tempoMap |
| Properties inherited from zrythm::gui::qquick::WaveformCanvasItem | |
| QColor | waveformColor |
| QColor | outlineColor |
| Properties inherited from zrythm::gui::qquick::ClipCanvasItemBase | |
| qreal | referenceWidth |
| qreal | referenceX |
| bool | loopPreview |
Additional Inherited Members | |
| Protected Member Functions inherited from zrythm::gui::qquick::WaveformCanvasItem | |
| void | notifyBufferChanged () |
| Bumps the generation counter and schedules a repaint. | |
| Protected Attributes inherited from zrythm::gui::qquick::WaveformCanvasItem | |
| juce::AudioSampleBuffer | audio_buffer_ |
AudioClip-specific waveform canvas.
Handles AudioClip buffer serialization and re-serialization on clip property changes (loop, bounds, fades).
Uses a cached snapshot of clip properties to avoid redundant re-serializations when multiple signals fire for the same change.
Definition at line 33 of file audio_clip_waveform_canvas_item.h.
|
inline |
Definition at line 44 of file audio_clip_waveform_canvas_item.h.
|
inline |
Definition at line 62 of file audio_clip_waveform_canvas_item.h.
| std::vector< int64_t > zrythm::gui::qquick::AudioClipWaveformCanvasItem::computeTimelineFrameMapping | ( | int | canvas_width, |
| qreal | reference_width, | ||
| qreal | reference_x ) const |
Computes a per-pixel frame mapping that accounts for the tempo map's non-linear tick-to-sample conversion.
Called by the renderer during synchronize() so the waveform visually aligns with what plays at each timeline position.
|
inline |
Only wrap when the clip is actually looped.
Non-looped clips may still have default loop positions, which would cause false wrapping.
Definition at line 52 of file audio_clip_waveform_canvas_item.h.
|
inline |
Definition at line 61 of file audio_clip_waveform_canvas_item.h.
|
inline |
Where the loop region begins in the serialized buffer.
The buffer layout is: [intro: clip_start→loop_end] [loop: loop_start→loop_end] repeated. So the loop region starts at frame (loop_end - clip_start).
Definition at line 67 of file audio_clip_waveform_canvas_item.h.
|
inline |
Sample-space offset of the loop-start position relative to clip start (content-space, not buffer-space).
Definition at line 60 of file audio_clip_waveform_canvas_item.h.
|
inline |
Definition at line 47 of file audio_clip_waveform_canvas_item.h.
|
readwrite |
Definition at line 38 of file audio_clip_waveform_canvas_item.h.
|
readwrite |
Definition at line 39 of file audio_clip_waveform_canvas_item.h.