Anklang 0.3.0-460-gc4ef46ba
ASE — Anklang Sound Engine (C++)

« « « Anklang Documentation
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Ase::ClipImpl Class Reference
Inheritance diagram for Ase::ClipImpl:
[legend]

Classes

struct  CmpNoteIds
 
struct  CmpNoteTicks
 
class  Generator
 Generator for MIDI events. More...
 

Public Types

using EventsById = EventList< ClipNote, CmpNoteIds >
 
using OrderedEventsP = OrderedEventsV::ConstP
 
- Public Types inherited from Ase::GadgetImpl
using MemberAccessF = std::function< bool(GadgetImpl *, const Value *, Value *)>
 
using MemberInfosP = const StringS &(*)()
 
using MemberClassT = bool(*)(const SharedBase &)
 

Public Member Functions

OrderedEventsP tick_events () const
 Retrieve const vector with all notes ordered by tick.
 
ProjectImplproject () const
 
void push_undo (const ClipNoteS &clipnotes, const String &undogroup)
 
UndoScope undo_scope (const String &scopename)
 
int64 start_tick () const override
 Get the first tick intended for playback (this is >= 0), changes on notify:start_tick.
 
int64 stop_tick () const override
 Get the tick to stop playback, not events should be played after this, changes on notify:stop_tick.
 
void assign_range (int64 starttick, int64 stoptick) override
 
ClipNoteS list_all_notes () override
 
bool needs_serialize () const
 
int32 change_batch (const ClipNoteS &notes, const String &undogroup) override
 Change note id according to the arguments or add a new note if id < 0; emits notify:notes.
 
 ASE_DEFINE_MAKE_SHARED (ClipImpl)
 
- Public Member Functions inherited from Ase::GadgetImpl
String get_name () const override
 
void set_name (const std::string &n) override
 
void _set_parent (GadgetImpl *parent) override
 Assign parent container.
 
GadgetImpl_parent () const override
 Retrieve parent container.
 
String type_nick () const override
 
PropertyS access_properties () override
 Retrieve handles for all properties.
 
bool set_data (const String &key, const Value &v) override
 Assign session data, prefix ephemerals with '_'.
 
Value get_data (const String &key) const override
 Retrieve session data.
 
template<class O , class M >
void _register_parameter (O *, M *, const Param::ExtraVals &) const
 
- Public Member Functions inherited from Ase::EmittableImpl
ASE_USE_RESULT Connection on_event (const String &eventselector, const EventHandler &eventhandler) override
 
void emit_event (const String &type, const String &detail, const ValueR fields={}) override
 
void emit_notify (const String &detail) override
 Emit notify:detail, multiple notifications maybe coalesced if a CoalesceNotifies instance exists.
 
- Public Member Functions inherited from Ase::Emittable
void js_trigger (const String &eventselector, JsTrigger callback)
 
- Public Member Functions inherited from std::enable_shared_from_this< SharedBase >
enable_shared_from_this (T... args)
 
operator= (T... args)
 
shared_from_this (T... args)
 
weak_from_this (T... args)
 
~enable_shared_from_this (T... args)
 
- Public Member Functions inherited from Ase::CustomDataContainer
template<class T >
void set_custom_data (CustomDataKey< T > *key, T data)
 Assign data to the custom keyed data member, deletes any previously set data.
 
template<class T >
get_custom_data (CustomDataKey< T > *key) const
 Retrieve contents of the custom keyed data member, returns DataKey::fallback if nothing was set.
 
template<class T >
bool has_custom_data (CustomDataKey< T > *key) const
 Retrieve wether contents of the custom keyed data member exists.
 
template<class T >
bool del_custom_data (CustomDataKey< T > *key)
 Delete the current contents of the custom keyed data member, invokes DataKey::destroy.
 
- Public Member Functions inherited from Ase::Gadget
ProjectImpl_project () const
 Find Project in parent ancestry.
 
virtual StringS list_properties ()
 List all property identifiers.
 
virtual PropertyP access_property (String ident)
 Retrieve handle for a Property.
 
Value get_value (String ident)
 Get native property value.
 
bool set_value (String ident, const Value &v)
 

Protected Member Functions

 ClipImpl (TrackImpl &parent)
 
void serialize (WritNode &xs) override
 Serialize members and childern.
 
ssize_t clip_index () const
 
ClipNoteS get_all_notes () const override
 
void set_all_notes (const ClipNoteS &notes) override
 
int64 get_end_tick () const override
 
void set_end_tick (int64 etick) override
 
- Protected Member Functions inherited from Ase::GadgetImpl
uint64_t gadget_flags () const
 
uint64_t gadget_flags (uint64_t setbits, uint64_t mask=~uint64_t(0))
 
virtual String fallback_name () const
 
void serialize (WritNode &xs) override
 Serialize members and childern.
 
virtual void create_properties ()
 
- Protected Member Functions inherited from Ase::CustomDataContainer
void custom_data_destroy ()
 

Protected Attributes

TrackImpltrack_
 
Connection ontrackchange_
 
- Protected Attributes inherited from Ase::GadgetImpl
PropertyImplS props_
 

Additional Inherited Members

- Public Attributes inherited from Ase::Emittable
const EventHandlereventhandler
 
- Public Attributes inherited from Ase::Gadget
Member<&Gadget::get_name,&Gadget::set_name > name
 
- Public Attributes inherited from Ase::Clip
Member<&Clip::get_all_notes,&Clip::set_all_notes > all_notes
 Access all notes of this clip, changes on notify:all_notes.
 
Member<&Clip::get_end_tick,&Clip::set_end_tick > end_tick
 The end tick is past any event ticks, changes on notify:end_tick.
 
- Protected Types inherited from Ase::GadgetImpl
enum  : uint64_t { GADGET_DESTROYED , DEVICE_ACTIVE , MASTER_TRACK }
 
- Static Protected Member Functions inherited from Ase::GadgetImpl
static String canonify_key (const String &input)
 

Detailed Description

Definition at line 16 of file clip.hh.

Member Typedef Documentation

◆ EventsById

Definition at line 20 of file clip.hh.

◆ OrderedEventsP

Definition at line 49 of file clip.hh.

Constructor & Destructor Documentation

◆ ClipImpl()

Ase::ClipImpl::ClipImpl ( TrackImpl parent)
explicitprotected

Definition at line 39 of file clip.cc.

◆ ~ClipImpl()

Ase::ClipImpl::~ClipImpl ( )
protectedvirtual

Definition at line 48 of file clip.cc.

Member Function Documentation

◆ assign_range()

void Ase::ClipImpl::assign_range ( int64  starttick,
int64  stoptick 
)
overridevirtual

Change start_tick() and stop_tick(); emits notify:start_tick, notify:stop_tick.

Implements Ase::Clip.

Definition at line 116 of file clip.cc.

References assert_return, and std::max().

◆ change_batch()

int32 Ase::ClipImpl::change_batch ( const ClipNoteS &  notes,
const String undogroup 
)
overridevirtual

Change note id according to the arguments or add a new note if id < 0; emits notify:notes.

Insert, change, delete in a batch.

Implements Ase::Clip.

Definition at line 247 of file clip.cc.

References assert_warn, std::string::empty(), Ase::MIDI_NOTE_ID_FIRST, Ase::MIDI_NOTE_ID_LAST, and Ase::ClipNote::selected.

◆ clip_index()

ssize_t Ase::ClipImpl::clip_index ( ) const
protected

Definition at line 110 of file clip.cc.

◆ get_all_notes()

ClipNoteS Ase::ClipImpl::get_all_notes ( ) const
overrideprotectedvirtual

Implements Ase::Clip.

Definition at line 151 of file clip.cc.

◆ get_end_tick()

int64 Ase::ClipImpl::get_end_tick ( ) const
overrideprotectedvirtual

Implements Ase::Clip.

Definition at line 160 of file clip.cc.

◆ list_all_notes()

ClipNoteS Ase::ClipImpl::list_all_notes ( )
overridevirtual

List all notes of this Clip; changes on notify:notes.

Implements Ase::Clip.

Definition at line 135 of file clip.cc.

◆ needs_serialize()

bool Ase::ClipImpl::needs_serialize ( ) const

Definition at line 58 of file clip.cc.

◆ project()

ProjectImpl * Ase::ClipImpl::project ( ) const

Definition at line 52 of file clip.cc.

◆ push_undo()

void Ase::ClipImpl::push_undo ( const ClipNoteS &  clipnotes,
const String undogroup 
)

Definition at line 196 of file clip.cc.

◆ serialize()

void Ase::ClipImpl::serialize ( WritNode xs)
overrideprotectedvirtual

◆ set_all_notes()

void Ase::ClipImpl::set_all_notes ( const ClipNoteS &  notes)
overrideprotectedvirtual

Implements Ase::Clip.

Definition at line 144 of file clip.cc.

◆ set_end_tick()

void Ase::ClipImpl::set_end_tick ( int64  etick)
overrideprotectedvirtual

Implements Ase::Clip.

Definition at line 166 of file clip.cc.

◆ start_tick()

int64 Ase::ClipImpl::start_tick ( ) const
overridevirtual

Get the first tick intended for playback (this is >= 0), changes on notify:start_tick.

Implements Ase::Clip.

Definition at line 54 of file clip.hh.

◆ stop_tick()

int64 Ase::ClipImpl::stop_tick ( ) const
overridevirtual

Get the tick to stop playback, not events should be played after this, changes on notify:stop_tick.

Implements Ase::Clip.

Definition at line 55 of file clip.hh.

◆ tick_events()

ClipImpl::OrderedEventsP Ase::ClipImpl::tick_events ( ) const

Retrieve const vector with all notes ordered by tick.

Definition at line 174 of file clip.cc.

Referenced by Ase::ClipImpl::Generator::setup().

◆ undo_scope()

UndoScope Ase::ClipImpl::undo_scope ( const String scopename)

Definition at line 53 of file clip.hh.

Member Data Documentation

◆ ontrackchange_

Connection Ase::ClipImpl::ontrackchange_
protected

Definition at line 39 of file clip.hh.

◆ track_

TrackImpl* Ase::ClipImpl::track_
protected

Definition at line 38 of file clip.hh.


The documentation for this class was generated from the following files: