6#include "gui/dsp/arranger_object_owner.h"
7#include "gui/dsp/chord_object.h"
8#include "gui/dsp/region.h"
18 public RegionImpl<ChordRegion>,
19 public ArrangerObjectOwner<ChordObject>,
20 public ICloneable<ChordRegion>
26 DEFINE_ARRANGER_OBJECT_OWNER_QML_PROPERTIES (
34 DECLARE_FINAL_ARRANGER_OBJECT_CONSTRUCTORS (
ChordRegion)
36 using RegionT = RegionImpl<ChordRegion>;
41 Location get_location (
const ChordObject &)
const override
43 return { .track_id_ =
track_id_, .owner_ = get_uuid () };
47 get_field_name_for_serialization (
const ChordObject *)
const override
49 return "chordObjects";
56 friend void to_json (nlohmann::json &j,
const ChordRegion &cr)
60 to_json (j,
static_cast<const LoopableObject &
> (cr));
61 to_json (j,
static_cast<const MuteableObject &
> (cr));
62 to_json (j,
static_cast<const NamedObject &
> (cr));
63 to_json (j,
static_cast<const ColoredObject &
> (cr));
64 to_json (j,
static_cast<const Region &
> (cr));
65 to_json (j,
static_cast<const ArrangerObjectOwner &
> (cr));
67 friend void from_json (
const nlohmann::json &j,
ChordRegion &cr)
75 from_json (j,
static_cast<Region &
> (cr));
82 "ChordRegion[id: {}, {}]", cr.get_uuid (),
static_cast<const Region &
> (cr));
Base class for all objects in the arranger.
std::optional< TrackUuid > track_id_
ID of the track this object belongs to.
Base class for all objects in the arranger that have a length.
The ChordObject class represents a chord inside a ChordRegion.
void init_after_cloning(const ChordRegion &other, ObjectCloneType clone_type) override
Initializes the cloned object.
bool validate(bool is_project, dsp::FramesPerTick frames_per_tick) const override
Validates the arranger object.
Base class for objects that have a name.
A region (clip) is an object on the timeline that contains either MidiNote's or AudioClip's.
#define DEFINE_OBJECT_FORMATTER(obj_type, function_prefix, formatter_func)
Defines a formatter for the given object type.