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

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

Classes

struct  PStorage
 

Public Member Functions

void _activate () override
 Add AudioProcessor to the Engine and start processing.
 
void _deactivate () override
 Stop processing the corresponding AudioProcessor.
 
const TickSignaturesignature () const
 
void discard () override
 Discard project and associated resources.
 
AudioProcessorP _audio_processor () const override
 Retrieve the corresponding AudioProcessor.
 
void _set_event_source (AudioProcessorP esource) override
 
DeviceInfo device_info () override
 Describe this Device type.
 
UndoScope undo_scope (const String &scopename)
 
void push_undo (const VoidF &func)
 
void undo () override
 Undo the last project modification.
 
bool can_undo () override
 Check if any undo steps have been recorded.
 
void redo () override
 Redo the last undo modification.
 
bool can_redo () override
 Check if any redo steps have been recorded.
 
void group_undo (const String &undoname) override
 Merge upcoming undo steps.
 
void ungroup_undo () override
 Stop merging undo steps.
 
void clear_undo ()
 
size_t undo_size_guess () const
 
void start_playback (double autostop)
 
void start_playback () override
 Start playback of a project, requires active sound engine.
 
void stop_playback () override
 Stop project playback.
 
bool is_playing () override
 Check whether a project is currently playing (song sequencing).
 
TrackP create_track () override
 Create and append a new Track.
 
bool remove_track (Track &child) override
 Remove a track owned by this Project.
 
TrackS all_tracks () override
 List all tracks of the project.
 
TrackP master_track () override
 Retrieve the master track.
 
Error load_project (const String &utf8filename) override
 Load project from file filename.
 
StreamReaderP load_blob (const String &fspath)
 
String loader_resolve (const String &hexhash)
 Find file from hash code, returns fspath.
 
Error save_project (const String &utf8filename, bool collect) override
 Store Project and collect external files.
 
String saved_filename () override
 Retrieve UTF-8 filename for save or from load.
 
String writer_file_name (const String &fspath) const
 
Error writer_add_file (const String &fspath)
 
Error writer_collect (const String &fspath, String *hexhashp)
 
TelemetryFieldS telemetry () const override
 Retrieve project telemetry locations.
 
AudioProcessorP master_processor () const
 
ssize_t track_index (const Track &child) const
 
- Public Member Functions inherited from Ase::DeviceImpl
DeviceS get_devices () const override
 List devices in order of processing, notified via "devs".
 
void set_devices (const DeviceS &newdevices) override
 Set the list of devices.
 
bool is_active () override
 Check whether this is the active synthesis engine project.
 
bool gui_supported () override
 Has GUI display facilities.
 
bool gui_visible () override
 Is GUI currently visible.
 
void gui_toggle () override
 Toggle GUI display.
 
void _disconnect_remove () override
 Disconnect the device and remove all object references.
 
- 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)
 
- Public Member Functions inherited from Ase::Device
Track_track () const
 Find Track in parent ancestry.
 
void remove_self ()
 Remove device from its container.
 

Static Public Member Functions

static ProjectImplP create (const String &projectname)
 
- Static Public Member Functions inherited from Ase::DeviceImpl
static DeviceInfo extract_info (const String &aseid, const AudioProcessor::StaticInfo &static_info)
 
- Static Public Member Functions inherited from Ase::Project
static ProjectP last_project ()
 

Static Public Attributes

static size_t undo_mem_counter
 

Protected Member Functions

void set_bpm (double bpm) override
 
double get_bpm () const override
 
void set_numerator (double num) override
 
double get_numerator () const override
 
void set_denominator (double den) override
 
double get_denominator () const override
 
void serialize (WritNode &xs) override
 Serialize members and childern.
 
void update_tempo ()
 
Error snapshot_project (String &json)
 
String match_serialized (const String &regex, int group) override
 Match regex against the serialized project state.
 
- Protected Member Functions inherited from Ase::DeviceImpl
void _set_parent (GadgetImpl *parent) override
 Assign parent container.
 
virtual DeviceS list_devices ()
 
- 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
 
virtual void create_properties ()
 
- Protected Member Functions inherited from Ase::CustomDataContainer
void custom_data_destroy ()
 

Friends

class UndoScope
 

Additional Inherited Members

- 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 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::Device
Member<&Device::get_devices,&Device::set_devicesdevices
 
- Public Attributes inherited from Ase::Project
Member<&Project::get_bpm,&Project::set_bpm > bpm
 
Member<&Project::get_numerator,&Project::set_numerator > numerator
 
Member<&Project::get_denominator,&Project::set_denominator > denominator
 
- 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)
 
- Protected Attributes inherited from Ase::GadgetImpl
PropertyImplS props_
 

Detailed Description

Definition at line 22 of file project.hh.

Constructor & Destructor Documentation

◆ ProjectImpl()

Ase::ProjectImpl::ProjectImpl ( )
explicitprotected

Definition at line 65 of file project.cc.

◆ ~ProjectImpl()

Ase::ProjectImpl::~ProjectImpl ( )
protectedvirtual

Definition at line 93 of file project.cc.

Member Function Documentation

◆ _activate()

void Ase::ProjectImpl::_activate ( )
overridevirtual

Add AudioProcessor to the Engine and start processing.

Reimplemented from Ase::DeviceImpl.

Definition at line 120 of file project.cc.

References assert_return.

◆ _audio_processor()

AudioProcessorP Ase::ProjectImpl::_audio_processor ( ) const
overridevirtual

Retrieve the corresponding AudioProcessor.

Implements Ase::Device.

Definition at line 873 of file project.cc.

◆ _deactivate()

void Ase::ProjectImpl::_deactivate ( )
overridevirtual

Stop processing the corresponding AudioProcessor.

Reimplemented from Ase::DeviceImpl.

Definition at line 129 of file project.cc.

References assert_return.

◆ _set_event_source()

void Ase::ProjectImpl::_set_event_source ( AudioProcessorP  esource)
overridevirtual

Implements Ase::Device.

Definition at line 879 of file project.cc.

◆ all_tracks()

TrackS Ase::ProjectImpl::all_tracks ( )
overridevirtual

List all tracks of the project.

Implements Ase::Project.

Definition at line 843 of file project.cc.

References std::vector::begin(), std::copy(), std::vector::end(), and std::vector::size().

◆ can_redo()

bool Ase::ProjectImpl::can_redo ( )
overridevirtual

Check if any redo steps have been recorded.

Implements Ase::Project.

Definition at line 598 of file project.cc.

References std::vector::size().

◆ can_undo()

bool Ase::ProjectImpl::can_undo ( )
overridevirtual

Check if any undo steps have been recorded.

Implements Ase::Project.

Definition at line 566 of file project.cc.

References std::vector::size().

◆ clear_undo()

void Ase::ProjectImpl::clear_undo ( )

Definition at line 628 of file project.cc.

◆ create()

ProjectImplP Ase::ProjectImpl::create ( const String projectname)
static

Definition at line 100 of file project.cc.

◆ create_track()

TrackP Ase::ProjectImpl::create_track ( )
overridevirtual

Create and append a new Track.

Implements Ase::Project.

Definition at line 814 of file project.cc.

References assert_return, Ase::EmittableImpl::emit_notify(), std::vector::end(), std::vector::insert(), int, and std::vector::size().

◆ device_info()

DeviceInfo Ase::ProjectImpl::device_info ( )
overridevirtual

Describe this Device type.

Implements Ase::Device.

Definition at line 867 of file project.cc.

◆ discard()

void Ase::ProjectImpl::discard ( )
overridevirtual

Discard project and associated resources.

Implements Ase::Project.

Definition at line 109 of file project.cc.

References return_unless.

◆ get_bpm()

double Ase::ProjectImpl::get_bpm ( ) const
overrideprotectedvirtual

Implements Ase::Project.

Definition at line 692 of file project.cc.

◆ get_denominator()

double Ase::ProjectImpl::get_denominator ( ) const
overrideprotectedvirtual

Implements Ase::Project.

Definition at line 724 of file project.cc.

◆ get_numerator()

double Ase::ProjectImpl::get_numerator ( ) const
overrideprotectedvirtual

Implements Ase::Project.

Definition at line 708 of file project.cc.

◆ group_undo()

void Ase::ProjectImpl::group_undo ( const String undoname)
overridevirtual

Merge upcoming undo steps.

Implements Ase::Project.

Definition at line 604 of file project.cc.

References assert_return.

◆ is_playing()

bool Ase::ProjectImpl::is_playing ( )
overridevirtual

Check whether a project is currently playing (song sequencing).

Implements Ase::Project.

Definition at line 806 of file project.cc.

References return_unless.

◆ load_blob()

StreamReaderP Ase::ProjectImpl::load_blob ( const String fspath)

Definition at line 419 of file project.cc.

◆ load_project()

Error Ase::ProjectImpl::load_project ( const String utf8filename)
overridevirtual

Load project from file filename.

Implements Ase::Project.

Definition at line 368 of file project.cc.

References assert_return, Ase::decodefs(), dirname(), errno(), and Ase::json_parse().

◆ loader_resolve()

String Ase::ProjectImpl::loader_resolve ( const String hexhash)

Find file from hash code, returns fspath.

Definition at line 428 of file project.cc.

References return_unless.

◆ master_processor()

AudioProcessorP Ase::ProjectImpl::master_processor ( ) const

Definition at line 667 of file project.cc.

◆ master_track()

TrackP Ase::ProjectImpl::master_track ( )
overridevirtual

Retrieve the master track.

Implements Ase::Project.

Definition at line 860 of file project.cc.

References assert_return, std::vector::back(), and std::vector::empty().

◆ match_serialized()

String Ase::ProjectImpl::match_serialized ( const String regex,
int  group 
)
overrideprotectedvirtual

Match regex against the serialized project state.

Implements Ase::Project.

Definition at line 472 of file project.cc.

References Ase::ase_error_blurb(), and log().

◆ push_undo()

void Ase::ProjectImpl::push_undo ( const VoidF func)

Definition at line 530 of file project.cc.

◆ redo()

void Ase::ProjectImpl::redo ( )
overridevirtual

Redo the last undo modification.

Implements Ase::Project.

Definition at line 572 of file project.cc.

References assert_return, std::vector::back(), Ase::EmittableImpl::emit_notify(), std::vector::empty(), std::vector::pop_back(), and return_unless.

◆ remove_track()

bool Ase::ProjectImpl::remove_track ( Track )
overridevirtual

Remove a track owned by this Project.

Implements Ase::Project.

Definition at line 827 of file project.cc.

References assert_return, Ase::EmittableImpl::emit_notify(), Ase::Aux::erase_first(), and return_unless.

◆ save_project()

Error Ase::ProjectImpl::save_project ( const String utf8filename,
bool  collect 
)
overridevirtual

◆ saved_filename()

String Ase::ProjectImpl::saved_filename ( )
overridevirtual

Retrieve UTF-8 filename for save or from load.

Implements Ase::Project.

Definition at line 362 of file project.cc.

References Ase::encodefs().

◆ serialize()

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

Serialize members and childern.

Reimplemented from Ase::GadgetImpl.

Definition at line 439 of file project.cc.

◆ set_bpm()

void Ase::ProjectImpl::set_bpm ( double  bpm)
overrideprotectedvirtual

Implements Ase::Project.

Definition at line 680 of file project.cc.

◆ set_denominator()

void Ase::ProjectImpl::set_denominator ( double  den)
overrideprotectedvirtual

Implements Ase::Project.

Definition at line 714 of file project.cc.

◆ set_numerator()

void Ase::ProjectImpl::set_numerator ( double  num)
overrideprotectedvirtual

Implements Ase::Project.

Definition at line 698 of file project.cc.

◆ signature()

const TickSignature & Ase::ProjectImpl::signature ( ) const

Definition at line 55 of file project.hh.

◆ snapshot_project()

Error Ase::ProjectImpl::snapshot_project ( String json)
protected

Definition at line 261 of file project.cc.

◆ start_playback() [1/2]

void Ase::ProjectImpl::start_playback ( )
overridevirtual

Start playback of a project, requires active sound engine.

Implements Ase::Project.

Definition at line 71 of file project.hh.

References start_playback().

Referenced by start_playback().

◆ start_playback() [2/2]

void Ase::ProjectImpl::start_playback ( double  autostop)

Definition at line 743 of file project.cc.

◆ stop_playback()

void Ase::ProjectImpl::stop_playback ( )
overridevirtual

Stop project playback.

Implements Ase::Project.

Definition at line 783 of file project.cc.

References return_unless.

◆ telemetry()

TelemetryFieldS Ase::ProjectImpl::telemetry ( ) const
overridevirtual

◆ track_index()

ssize_t Ase::ProjectImpl::track_index ( const Track child) const

Definition at line 851 of file project.cc.

◆ undo()

void Ase::ProjectImpl::undo ( )
overridevirtual

◆ undo_scope()

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

Definition at line 503 of file project.cc.

◆ undo_size_guess()

size_t Ase::ProjectImpl::undo_size_guess ( ) const

Definition at line 639 of file project.cc.

◆ ungroup_undo()

void Ase::ProjectImpl::ungroup_undo ( )
overridevirtual

Stop merging undo steps.

Implements Ase::Project.

Definition at line 619 of file project.cc.

References assert_return.

◆ update_tempo()

void Ase::ProjectImpl::update_tempo ( )
protected

Definition at line 730 of file project.cc.

◆ writer_add_file()

Error Ase::ProjectImpl::writer_add_file ( const String fspath)

Definition at line 287 of file project.cc.

◆ writer_collect()

Error Ase::ProjectImpl::writer_collect ( const String fspath,
String hexhashp 
)

Definition at line 300 of file project.cc.

◆ writer_file_name()

String Ase::ProjectImpl::writer_file_name ( const String fspath) const

Definition at line 279 of file project.cc.

Friends And Related Symbol Documentation

◆ UndoScope

friend class UndoScope
friend

Definition at line 37 of file project.hh.

Member Data Documentation

◆ undo_mem_counter

size_t Ase::ProjectImpl::undo_mem_counter
static

Definition at line 90 of file project.hh.


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