Anklang-0.3.0.dev956+gd75ac925 anklang-0.3.0.dev956+gd75ac925
ASE — Anklang Sound Engine (C++)

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

Classes

struct  PStorage
 
class  TransportListener
 

Public Member Functions

void bpm (double bpm) override
 
double bpm () const override
 
void numerator (double num) override
 
double numerator () const override
 
void denominator (double den) override
 
double denominator () const override
 
String name () const override
 
void name (const std::string &n) override
 
void discard () override
 Discard project and associated resources.
 
DeviceInfo device_info () override
 Describe this Device type.
 
UndoScope undo_scope (const String &scopename)
 
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.
 
double length () const override
 Get the end time of the last clip in seconds.
 
double master_volume () const override
 Get master volume in dB.
 
void master_volume (double db) override
 Set master volume in dB.
 
void group_undo (const String &undoname) override
 Merge upcoming undo steps.
 
void ungroup_undo () override
 Stop merging undo steps.
 
void clear_undo ()
 
void start_playback (double autostop)
 
void start_playback () override
 Start playback of a project, requires active sound engine.
 
void pause_playback () override
 Pause playback at the current position.
 
void stop_playback () override
 Stop project playback.
 
bool is_playing () const override
 Check whether a project is currently playing (song sequencing).
 
void is_playing (bool play) override
 Set whether a project is currently playing (song sequencing).
 
TrackP create_track () override
 Create and append a new Track.
 
void remove_self () override
 Remove self from parent container.
 
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.
 
ssize_t track_index (const Track &child) const
 
int64_t bar_ticks () const
 
- Public Member Functions inherited from Ase::GadgetImpl
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)
 Set native property value.
 

Static Public Member Functions

static void force_shutdown_all ()
 
static ProjectImplP create (const String &projectname)
 
- Static Public Member Functions inherited from Ase::Project
static ProjectP last_project ()
 

Protected Member Functions

void foreach_track (const std::function< bool(Track &, int)> &cb)
 
Error snapshot_project (String &json)
 
String match_serialized (const String &regex, int group) override
 Match regex against the serialized project state.
 
void deactivate_edit ()
 
- 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 TrackImpl
 
class UndoScope
 
void test_audio_sample_load ()
 

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
 
- 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 303 of file project.cc.

◆ ~ProjectImpl()

Ase::ProjectImpl::~ProjectImpl ( )
protectedvirtual

Definition at line 344 of file project.cc.

Member Function Documentation

◆ all_tracks()

TrackS Ase::ProjectImpl::all_tracks ( )
overridevirtual

List all tracks of the project.

Implements Ase::Project.

Definition at line 975 of file project.cc.

◆ bar_ticks()

int64_t Ase::ProjectImpl::bar_ticks ( ) const

Definition at line 1007 of file project.cc.

◆ bpm() [1/2]

double Ase::ProjectImpl::bpm ( ) const
overridevirtual

Implements Ase::Project.

Definition at line 875 of file project.cc.

◆ bpm() [2/2]

void Ase::ProjectImpl::bpm ( double  bpm)
overridevirtual

Implements Ase::Project.

Definition at line 864 of file project.cc.

◆ can_redo()

bool Ase::ProjectImpl::can_redo ( )
overridevirtual

Check if any redo steps have been recorded.

Implements Ase::Project.

Definition at line 808 of file project.cc.

References juce::UndoManager::canRedo(), tracktion::engine::Edit::getUndoManager(), and return_unless.

◆ can_undo()

bool Ase::ProjectImpl::can_undo ( )
overridevirtual

Check if any undo steps have been recorded.

Implements Ase::Project.

Definition at line 791 of file project.cc.

References juce::UndoManager::canUndo(), tracktion::engine::Edit::getUndoManager(), and return_unless.

◆ clear_undo()

void Ase::ProjectImpl::clear_undo ( )

Definition at line 856 of file project.cc.

◆ create()

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

Definition at line 414 of file project.cc.

◆ create_track()

TrackP Ase::ProjectImpl::create_track ( )
overridevirtual

Create and append a new Track.

Implements Ase::Project.

Definition at line 963 of file project.cc.

References Ase::EmittableImpl::emit_notify(), tracktion::engine::Edit::insertNewAudioTrack(), and return_unless.

◆ deactivate_edit()

void Ase::ProjectImpl::deactivate_edit ( )
protected

Definition at line 333 of file project.cc.

◆ denominator() [1/2]

double Ase::ProjectImpl::denominator ( ) const
overridevirtual

Implements Ase::Project.

Definition at line 911 of file project.cc.

◆ denominator() [2/2]

void Ase::ProjectImpl::denominator ( double  den)
overridevirtual

Implements Ase::Project.

Definition at line 901 of file project.cc.

◆ device_info()

DeviceInfo Ase::ProjectImpl::device_info ( )
overridevirtual

Describe this Device type.

Implements Ase::Device.

Definition at line 1037 of file project.cc.

◆ discard()

void Ase::ProjectImpl::discard ( )
overridevirtual

Discard project and associated resources.

Implements Ase::Project.

Definition at line 424 of file project.cc.

References Ase::Aux::erase_first(), return_unless, and stop_playback().

◆ force_shutdown_all()

void Ase::ProjectImpl::force_shutdown_all ( )
static

Definition at line 354 of file project.cc.

◆ foreach_track()

void Ase::ProjectImpl::foreach_track ( const std::function< bool(Track &, int)> &  cb)
protected

Definition at line 396 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 842 of file project.cc.

References juce::UndoManager::beginNewTransaction(), tracktion::engine::Edit::getUndoManager(), and return_unless.

◆ is_playing() [1/2]

bool Ase::ProjectImpl::is_playing ( ) const
overridevirtual

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

Implements Ase::Project.

Definition at line 946 of file project.cc.

References tracktion::engine::Edit::getTransport(), and tracktion::engine::TransportControl::isPlaying().

Referenced by is_playing().

◆ is_playing() [2/2]

void Ase::ProjectImpl::is_playing ( bool  )
overridevirtual

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

Implements Ase::Project.

Definition at line 952 of file project.cc.

References is_playing(), pause_playback(), and start_playback().

◆ length()

double Ase::ProjectImpl::length ( ) const
overridevirtual

Get the end time of the last clip in seconds.

Implements Ase::Project.

Definition at line 815 of file project.cc.

References tracktion::engine::Edit::getLength(), and return_unless.

◆ load_blob()

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

Definition at line 720 of file project.cc.

◆ load_project()

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

◆ loader_resolve()

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

Find file from hash code, returns fspath.

Definition at line 729 of file project.cc.

References std::string::empty(), return_unless, and std::vector::size().

◆ master_track()

TrackP Ase::ProjectImpl::master_track ( )
overridevirtual

Retrieve the master track.

Implements Ase::Project.

Definition at line 1028 of file project.cc.

References tracktion::engine::Edit::getMasterTrack(), and return_unless.

◆ master_volume() [1/2]

double Ase::ProjectImpl::master_volume ( ) const
overridevirtual

Get master volume in dB.

Implements Ase::Project.

Definition at line 822 of file project.cc.

References tracktion::engine::Edit::getMasterVolumePlugin(), and return_unless.

◆ master_volume() [2/2]

void Ase::ProjectImpl::master_volume ( double  db)
overridevirtual

Set master volume in dB.

Implements Ase::Project.

Definition at line 831 of file project.cc.

References tracktion::engine::Edit::getMasterVolumePlugin(), and return_unless.

◆ 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 740 of file project.cc.

References Ase::ase_error_blurb(), and Ase::Re::grep().

◆ name() [1/2]

String Ase::ProjectImpl::name ( ) const
overridevirtual

Reimplemented from Ase::GadgetImpl.

Definition at line 365 of file project.cc.

◆ name() [2/2]

void Ase::ProjectImpl::name ( const std::string n)
overridevirtual

Reimplemented from Ase::GadgetImpl.

Definition at line 372 of file project.cc.

◆ numerator() [1/2]

double Ase::ProjectImpl::numerator ( ) const
overridevirtual

Implements Ase::Project.

Definition at line 893 of file project.cc.

◆ numerator() [2/2]

void Ase::ProjectImpl::numerator ( double  num)
overridevirtual

Implements Ase::Project.

Definition at line 883 of file project.cc.

◆ pause_playback()

void Ase::ProjectImpl::pause_playback ( )
overridevirtual

Pause playback at the current position.

Implements Ase::Project.

Definition at line 928 of file project.cc.

References tracktion::engine::Edit::getTransport(), tracktion::engine::TransportControl::isPlaying(), and tracktion::engine::TransportControl::stop().

Referenced by is_playing().

◆ redo()

void Ase::ProjectImpl::redo ( )
overridevirtual

◆ remove_self()

void Ase::ProjectImpl::remove_self ( )
overridevirtual

Remove self from parent container.

Reimplemented from Ase::GadgetImpl.

Definition at line 435 of file project.cc.

References Ase::GadgetImpl::remove_self().

◆ 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 664 of file project.cc.

References Ase::encodefs().

◆ snapshot_project()

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

Definition at line 563 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 65 of file project.hh.

References start_playback().

Referenced by is_playing(), and start_playback().

◆ start_playback() [2/2]

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

Definition at line 919 of file project.cc.

◆ stop_playback()

void Ase::ProjectImpl::stop_playback ( )
overridevirtual

Stop project playback.

Implements Ase::Project.

Definition at line 935 of file project.cc.

References tracktion::engine::Edit::getTransport(), and tracktion::engine::TransportControl::stop().

Referenced by discard().

◆ telemetry()

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

Retrieve project telemetry locations.

Implements Ase::Project.

Definition at line 380 of file project.cc.

◆ track_index()

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

Definition at line 988 of file project.cc.

◆ undo()

void Ase::ProjectImpl::undo ( )
overridevirtual

◆ undo_scope()

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

Definition at line 768 of file project.cc.

◆ ungroup_undo()

void Ase::ProjectImpl::ungroup_undo ( )
overridevirtual

Stop merging undo steps.

Implements Ase::Project.

Definition at line 849 of file project.cc.

References juce::UndoManager::beginNewTransaction(), tracktion::engine::Edit::getUndoManager(), and return_unless.

◆ writer_add_file()

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

Definition at line 589 of file project.cc.

◆ writer_collect()

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

Definition at line 602 of file project.cc.

◆ writer_file_name()

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

Definition at line 581 of file project.cc.

Friends And Related Symbol Documentation

◆ test_audio_sample_load

void test_audio_sample_load ( )
friend

Definition at line 39 of file test-setup.cc.

◆ TrackImpl

friend class TrackImpl
friend

Definition at line 31 of file project.hh.

◆ UndoScope

friend class UndoScope
friend

Definition at line 32 of file project.hh.


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