|
Zrythm v2.0.0-alpha.1
a highly automated and intuitive digital audio workstation
|
A Clip containing MIDI events. More...
#include <src/structure/arrangement/midi_clip.h>


Public Member Functions | |
| MidiClip (const dsp::TempoMapWrapper &tempo_map_wrapper, utils::IObjectRegistry &object_registry, QObject *parent=nullptr) | |
| units::bpm_t | source_bpm () const |
| Source tempo for Absolute-mode anchor (default 0 = no anchor). | |
| void | set_source_bpm (units::bpm_t bpm) |
| std::string | get_field_name_for_serialization (const MidiNote *) const override |
| std::string | get_field_name_for_serialization (const MidiControlEvent *) const override |
| std::vector< ArrangerObjectListModel * > | get_child_list_models () const override |
| void | shift_all_children (dsp::ContentTick delta) override |
Shifts all child objects by delta content ticks. | |
| std::optional< dsp::ContentTick > | first_child_position () const override |
| Returns the position of the first child, if any. | |
| Public Member Functions inherited from zrythm::structure::arrangement::Clip | |
| dsp::TimelinePosition * | position () const override |
| dsp::ContentTimeWarp * | contentWarp () const |
| dsp::TimebaseProvider * | timebaseProvider () const |
| Q_INVOKABLE void | setLengthTicks (double ticks) |
| Q_INVOKABLE QList< double > | loopPointTimelineTicks (double displayEndTicks) const |
| Timeline delta-tick positions of each loop wrap point. | |
| double | timelineLengthTicks () const |
| Warp-aware length of this clip in timeline ticks. | |
| Q_SIGNAL void | timelineLengthTicksChanged () |
| units::sample_t | get_end_position_samples (bool end_position_inclusive) const |
| Returns the end position of this clip in timeline samples. | |
| units::sample_t | get_sample_duration () const |
| Returns the duration of this clip in timeline samples (end minus start), warp-aware. | |
| bool | is_hit (const units::sample_t frames, bool object_end_pos_inclusive=false) const |
| Returns whether the clip is hit by the given timeline position. | |
| bool | is_hit_by_range (std::pair< units::sample_t, units::sample_t > global_frames, bool range_start_inclusive=true, bool range_end_inclusive=true, bool object_end_pos_inclusive=false) const |
| Whether the clip is hit by the given range. | |
| dsp::ContentPosition * | clipStartPosition () const |
| dsp::ContentPosition * | loopStartPosition () const |
| dsp::ContentPosition * | loopEndPosition () const |
| bool | trackBounds () const |
| void | setTrackBounds (bool track) |
| Q_SIGNAL void | trackBoundsChanged (bool track) |
| void | set_loop_range (dsp::ContentTick clip_start, dsp::ContentTick loop_start, dsp::ContentTick loop_end) |
| Set the three loop positions atomically, bypassing the per-position clamping constraints. | |
| bool | looped () const |
| Q_SIGNAL void | loopedChanged () |
| Q_SIGNAL void | contentChanged () |
| Emitted when the clip's content changes. | |
| Q_SIGNAL void | loopablePropertiesChanged () |
| Emitted when any loop-related property changes. | |
| int | get_num_loops (bool count_incomplete) const |
| Returns the number of loops, optionally including incomplete ones. | |
| dsp::ContentTick | get_loop_length_in_ticks () const |
| Returns the length of the loop in ticks. | |
| Public Member Functions inherited from zrythm::structure::arrangement::ArrangerObject | |
| auto | type () const |
| dsp::ContentPosition * | length () const |
| ArrangerObjectName * | name () const |
| ArrangerObjectColor * | color () const |
| ArrangerObjectMuteFunctionality * | mute () const |
| Q_SIGNAL void | propertiesChanged () |
| Emitted when any of the properties of the object changed. | |
| ArrangerObject * | parentObject () const |
| void | setParentObject (ArrangerObject *object) |
| Q_SIGNAL void | parentObjectChanged (QObject *parentObject) |
| const dsp::TempoMap & | get_tempo_map () const |
| const dsp::TempoMapWrapper & | get_tempo_map_wrapper () const |
| Public Member Functions inherited from zrythm::utils::UuidIdentifiableObject< ArrangerObject > | |
| UuidIdentifiableObject (QObject *parent=nullptr) | |
| auto | get_uuid () const |
| Public Member Functions inherited from zrythm::utils::UuidIdentifiableBase | |
| UuidIdentifiableBase (QObject *parent=nullptr) | |
| UuidIdentifiableBase (const QUuid &id, QObject *parent=nullptr) | |
| QUuid | raw_uuid () const |
| Public Member Functions inherited from zrythm::structure::arrangement::ArrangerObjectOwner< MidiNote > | |
| ArrangerObjectOwner (utils::IObjectRegistry ®istry, T &derived) | |
| auto & | get_children_vector () const |
| auto | get_children_view () const |
| auto | get_sorted_children_view () const |
| void | add_ticks_to_children (dsp::ContentTick ticks) |
| bool | contains_object (const ArrangerObject::Uuid &id) const |
| O(1) lookup if an object with the given ID exists. | |
| ArrangerObjectListModel * | get_model () const |
| ArrangerObjectUuidReference | remove_object (const ArrangerObject::Uuid &id) |
| void | insert_object (const ArrangerObjectUuidReference &obj_ref, int idx) |
| void | add_object (const ArrangerObjectUuidReference &obj_ref) |
| void | clear_objects () |
| virtual std::string | get_field_name_for_serialization (const ChildT *) const=0 |
| Get the children field name to be used during serialization/deserialization. | |
| Public Member Functions inherited from zrythm::structure::arrangement::ArrangerObjectOwner< MidiControlEvent > | |
| ArrangerObjectOwner (utils::IObjectRegistry ®istry, T &derived) | |
| auto & | get_children_vector () const |
| auto | get_children_view () const |
| auto | get_sorted_children_view () const |
| void | add_ticks_to_children (dsp::ContentTick ticks) |
| bool | contains_object (const ArrangerObject::Uuid &id) const |
| O(1) lookup if an object with the given ID exists. | |
| ArrangerObjectListModel * | get_model () const |
| ArrangerObjectUuidReference | remove_object (const ArrangerObject::Uuid &id) |
| void | insert_object (const ArrangerObjectUuidReference &obj_ref, int idx) |
| void | add_object (const ArrangerObjectUuidReference &obj_ref) |
| void | clear_objects () |
| virtual std::string | get_field_name_for_serialization (const ChildT *) const=0 |
| Get the children field name to be used during serialization/deserialization. | |
Friends | |
| void | init_from (MidiClip &obj, const MidiClip &other, utils::ObjectCloneType clone_type) |
| void | to_json (nlohmann::json &j, const MidiClip &clip) |
| void | from_json (const nlohmann::json &j, MidiClip &clip) |
A Clip containing MIDI events.
MidiClip represents a clip in the timeline that holds MIDI note and controller data. It is specific to instrument/MIDI tracks and can be constructed from a MIDI file or a chord descriptor.
Definition at line 22 of file midi_clip.h.
|
overridevirtual |
Returns the position of the first child, if any.
Used by undo commands to capture/restore child positions.
Implements zrythm::structure::arrangement::Clip.
|
inlineoverridevirtual |
Reimplemented from zrythm::structure::arrangement::ArrangerObject.
Definition at line 67 of file midi_clip.h.
|
inlineoverride |
Definition at line 62 of file midi_clip.h.
|
inlineoverride |
Definition at line 57 of file midi_clip.h.
|
overridevirtual |
Shifts all child objects by delta content ticks.
Implements zrythm::structure::arrangement::Clip.
|
inlinenodiscard |
Source tempo for Absolute-mode anchor (default 0 = no anchor).
Absolute mode is a no-op while this is 0.
Definition at line 52 of file midi_clip.h.
|
friend |
Definition at line 96 of file midi_clip.h.
|
friend |
Definition at line 88 of file midi_clip.h.