29 explicit ClipImpl (tracktion::Clip &clip);
33 ClipNoteS all_notes ()
const override;
34 void all_notes (
const ClipNoteS ¬es)
override;
35 int64 end_tick ()
const override;
36 void end_tick (
int64 etick)
override;
45 bool needs_serialize()
const;
49 double volume ()
const override;
50 void volume (
double db)
override;
51 double pan ()
const override;
52 void pan (
double pan)
override;
53 void update_telemetry ();
54 TelemetryFieldS
telemetry ()
const override;
55 static ClipImplP from_trkn (tracktion::Clip&);
65 int64 start_offset_ = 0;
66 int64 loop_start_ = 0;
67 int64 loop_end_ = I63MAX;
79 bool muted ()
const {
return muted_; }
81 void muted (
bool b) { muted_ = b; }
102ClipImpl::CmpNoteTicks::operator() (
const ClipNote &a,
const ClipNote &b)
const
105 const int tcmp = Aux::compare_lesser (a.
tick, b.
tick);
108 const int kcmp = Aux::compare_lesser (a.
key, b.
key);
118 return Aux::compare_lesser (a.id, b.id);
121String stringify_clip_note (
const ClipNote &n);
Generator for MIDI events.
void setup(const ClipImpl &clip)
Create generator from clip.
bool muted() const
Mute MIDI note generation.
bool done() const
Check if playback is done.
int64 clip_position() const
Position within clip as tick.
int64 loop_start() const
Loop start in ticks.
int64 generate(int64 target_tick, const Receiver &receiver)
Advance tick and call receiver for generated events.
int64 start_offset() const
Initial offset in ticks.
void jumpto(int64 target_tick)
Assign new play_position() (and clip_position()), preserves all other state.
int64 play_position() const
Current playback position in ticks.
void muted(bool b)
Assign muted state.
int64 play_length() const
Maximum amount of ticks during playback.
int64 loop_end() const
Loop end in ticks.
void set_muted(bool muted) override
Set clip muted state, emits notify:muted.
void assign_range(int64 starttick, int64 stoptick) override
Change start_tick() and stop_tick(); emits notify:start_tick, notify:stop_tick.
int64 start_tick() const override
Get the first tick intended for playback (this is >= 0), changes on notify:start_tick.
ClipNoteS list_all_notes() override
List all notes of this Clip; changes on notify:notes.
int32 change_batch(const ClipNoteS ¬es, const String &undogroup) override
Change note id according to the arguments or add a new note if id < 0; emits notify:notes.
double volume() const override
Get clip volume in dB.
bool is_muted() const override
Check if clip is muted.
int64 stop_tick() const override
Get the tick to stop playback, not events should be played after this, changes on notify:stop_tick.
void serialize(WritNode &xs) override
Serialize members and childern.
TelemetryFieldS telemetry() const override
Retrieve clip telemetry locations.
double pan() const override
Get clip pan (-1.0 to 1.0).
OrderedEventsP tick_events() const
Retrieve const vector with all notes ordered by tick.
Container for MIDI note and control events.
Base type for classes that have a Property.
Mimick tracktion::engine::SafeSelectable<> for tracktion::Selectable descendants.
Ase::Track implementation.
One entry in a Writ serialization document.
#define ASE_DEFINE_MAKE_SHARED(CLASS)
Define a member function static shared_ptr<CLASS> make_shared(ctorargs...);.
#define ASE_UNLIKELY(expr)
Compiler hint to optimize for expr evaluating to false.
#define ASE_ISLIKELY(expr)
Compiler hint to optimize for expr evaluating to true.
The Anklang C++ API namespace.
int32_t int32
A 32-bit signed integer.
int64_t int64
A 64-bit unsigned integer, use PRI*64 in format strings.
constexpr const uint MIDI_NOTE_ID_LAST
Last valid (internal) MIDI note event ID.
constexpr const uint MIDI_NOTE_ID_FIRST
First (internal) MIDI note event ID (lower IDs are reserved for external notes).
std::string String
Convenience alias for std::string.
uint32_t uint
Provide 'uint' as convenience type.
Part specific note event representation.
int64 tick
UI selection flag.
bool selected
Musical note as MIDI key, 0 .. 127.
MidiEvent data structure.
Container for a sorted array of opaque Event structures with binary lookup.