12constexpr const char GUIONLY[] =
":G:r:w:";
13constexpr const char STORAGE[] =
":S:r:w:";
39 INTERNAL = 0x30000000,
42 FILE_EOF = 0x30001000,
48 PARSE_ERROR = 0x30002000,
62 DEVICE_NOT_AVAILABLE = 0x30003000,
72 WAVE_NOT_FOUND = 0x30004000,
77ASE_DEFINE_ENUM_EQUALITY (
Error);
80Error ase_error_from_errno (
int sys_errno,
Error fallback = Error::IO);
85 OD_12_TET, OD_7_TET, OD_5_TET,
87 DIATONIC_SCALE, INDIAN_SCALE, PYTHAGOREAN_TUNING, PENTATONIC_5_LIMIT, PENTATONIC_BLUES, PENTATONIC_GOGO,
89 QUARTER_COMMA_MEANTONE, SILBERMANN_SORGE,
91 WERCKMEISTER_3, WERCKMEISTER_4, WERCKMEISTER_5, WERCKMEISTER_6, KIRNBERGER_3, YOUNG,
124 bool connected ()
const;
125 void disconnect ()
const;
127 virtual void emit_event (
const String &type,
const String &detail,
const ValueR fields = {}) = 0;
129 virtual Connection on_event (
const String &eventselector,
const EventHandler &eventhandler) = 0;
130 virtual void emit_notify (
const String &detail) = 0;
140 virtual String name ()
const;
141 virtual void name (
const String &n);
142 virtual StringS metadata ()
const = 0;
143 virtual void metadata (
const StringS &md);
183 virtual String name ()
const = 0;
185 virtual String type_nick ()
const = 0;
253 virtual double pan ()
const = 0;
255 virtual ClipNoteS all_notes ()
const = 0;
256 virtual void all_notes (
const ClipNoteS ¬es) = 0;
257 virtual int64 end_tick ()
const = 0;
258 virtual void end_tick (
int64 etick) = 0;
280 virtual double pan ()
const = 0;
284 virtual MonitorP create_monitor (
int32 ochannel) = 0;
313 virtual void bpm (
double bpm) = 0;
314 virtual double bpm ()
const = 0;
315 virtual void numerator (
double num) = 0;
316 virtual double numerator ()
const = 0;
317 virtual void denominator (
double den) = 0;
318 virtual double denominator ()
const = 0;
344 static ProjectP last_project ();
347enum class ResourceType {
369 virtual void entries (
const ResourceS &newentries) = 0;
372 bool existingfile =
false) = 0;
379 enum Flags { APPEND, CLEAR, TRANSIENT };
381 Flags flags = APPEND;
382 String channel, text, rest;
404 virtual String error_blurb (
Error error)
const = 0;
407 virtual uint64 user_note (
const String &text,
const String &channel =
"misc", UserNote::Flags flags = UserNote::TRANSIENT,
const String &rest =
"") = 0;
408 virtual bool user_reply (
uint64 noteid,
uint r) = 0;
410 int32 interval_ms) = 0;
424#define ASE_SERVER (::Ase::Server::instance())
Container for MIDI note and control events.
virtual int32 change_batch(const ClipNoteS ¬es, const String &undogroup="")=0
Change note id according to the arguments or add a new note if id < 0; emits notify:notes.
virtual bool is_muted() const =0
Check if clip is muted.
virtual void set_muted(bool muted)=0
Set clip muted state, emits notify:muted.
virtual void volume(double db)=0
Set clip volume in dB, emits notify:volume.
virtual void pan(double pan)=0
Set clip pan (-1.0 to 1.0), emits notify:pan.
virtual void assign_range(int64 starttick, int64 stoptick)=0
Change start_tick() and stop_tick(); emits notify:start_tick, notify:stop_tick.
virtual int64 start_tick() const =0
Get the first tick intended for playback (this is >= 0), changes on notify:start_tick.
virtual double volume() const =0
Get clip volume in dB.
virtual int64 stop_tick() const =0
Get the tick to stop playback, not events should be played after this, changes on notify:stop_tick.
virtual double pan() const =0
Get clip pan (-1.0 to 1.0).
virtual ClipNoteS list_all_notes()=0
List all notes of this Clip; changes on notify:notes.
virtual TelemetryFieldS telemetry() const =0
Retrieve clip telemetry locations.
Interface to access Device instances.
virtual bool gui_visible()=0
Is GUI currently visible.
virtual bool is_active()=0
Check whether this is the active synthesis engine project.
virtual void gui_toggle()=0
Toggle GUI display.
virtual void _disconnect_remove()=0
Disconnect the device and remove all object references.
void remove_self()
Remove device from its container.
Track * _track() const
Find Track in parent ancestry.
virtual void _deactivate()=0
Stop processing the corresponding AudioProcessor.
virtual bool gui_supported()=0
Has GUI display facilities.
virtual void _activate()=0
Add AudioProcessor to the Engine and start processing.
virtual void set_devices(const DeviceS &devices)=0
Set the list of devices.
virtual DeviceS get_devices() const =0
List devices in order of processing, notified via "devs".
virtual DeviceInfo device_info()=0
Describe this Device type.
Base type for classes with Event subscription.
Base type for classes that have a Property.
Base type for classes that have a Property.
virtual StringS list_properties()
List all property identifiers.
virtual Value get_data(const String &key) const =0
Retrieve session data.
virtual PropertyP access_property(String ident)
Retrieve handle for a Property.
virtual PropertyS access_properties()=0
Retrieve handles for all properties.
ProjectImpl * _project() const
Find Project in parent ancestry.
virtual void _set_parent(GadgetImpl *parent)=0
Assign parent container.
virtual GadgetImpl * _parent() const =0
Retrieve parent container.
virtual bool set_data(const String &key, const Value &v)=0
Assign session data, prefix ephemerals with '_'.
Value get_value(String ident)
Get native property value.
bool set_value(String ident, const Value &v)
Set native property value.
Callback mechanism for Jsonapi/Jsonipc.
Interface for monitoring output signals.
virtual int64 get_mix_freq()=0
Mix frequency at which monitor values are calculated.
virtual int64 get_frame_duration()=0
Frame duration in µseconds for the calculation of monitor values.
virtual int32 get_ochannel()=0
Retrieve output channel the Monitor is connected to.
virtual DeviceP get_output()=0
Retrieve output device the Monitor is connected to.
Base type for classes with Property interfaces.
Projects support loading, saving, playback and act as containers for all other sound objects.
virtual void undo()=0
Undo the last project modification.
virtual Error save_project(const String &utf8filename, bool collect)=0
Store Project and collect external files.
virtual TrackP create_track()=0
Create and append a new Track.
virtual TelemetryFieldS telemetry() const =0
Retrieve project telemetry locations.
virtual TrackP master_track()=0
Retrieve the master track.
virtual void ungroup_undo()=0
Stop merging undo steps.
virtual void start_playback()=0
Start playback of a project, requires active sound engine.
virtual void group_undo(const String &undoname)=0
Merge upcoming undo steps.
virtual void stop_playback()=0
Stop project playback.
virtual bool can_undo()=0
Check if any undo steps have been recorded.
virtual void pause_playback()=0
Pause playback at the current position.
virtual void is_playing(bool)=0
Set whether a project is currently playing (song sequencing).
virtual double master_volume() const =0
Get master volume in dB.
virtual void master_volume(double db)=0
Set master volume in dB.
virtual bool is_playing() const =0
Check whether a project is currently playing (song sequencing).
virtual void redo()=0
Redo the last undo modification.
virtual void discard()=0
Discard project and associated resources.
virtual String match_serialized(const String ®ex, int group=0)=0
Match regex against the serialized project state.
virtual Error load_project(const String &utf8filename)=0
Load project from file filename.
virtual bool remove_track(Track &)=0
Remove a track owned by this Project.
virtual double length() const =0
Get the end time of the last clip in seconds.
virtual String saved_filename()=0
Retrieve UTF-8 filename for save or from load.
virtual bool can_redo()=0
Check if any redo steps have been recorded.
virtual TrackS all_tracks()=0
List all tracks of the project.
A Property allows querying, setting and monitoring of an object property.
virtual double get_normalized() const =0
Get the normalized property value, converted to double.
String descr() const
Elaborate description, e.g. for help dialogs (metadata).
virtual String get_text() const =0
Get the current property value, converted to a text String.
String blurb() const
Short description for user interface tooltips (metadata).
virtual ChoiceS choices() const =0
Enumerate choices for choosable properties.
virtual double get_max() const =0
Get the maximum property value, converted to double.
virtual double get_step() const =0
Get the property value stepping, converted to double.
virtual bool set_normalized(double v)=0
Set the normalized property value as double.
virtual String label() const =0
Preferred user interface name.
virtual bool is_numeric() const =0
Whether the property settings can be represented as a floating point number.
virtual String nick() const =0
Abbreviated user interface name, usually not more than 6 characters.
virtual bool value(const Value &v)=0
Set the native property value.
String hints() const
Hints for parameter handling (metadata).
virtual String ident() const =0
Unique name (per owner) of this Property.
virtual Value value() const =0
Get the native property value.
String group() const
Group name for parameters of similar function (metadata).
virtual bool set_text(String v)=0
Set the current property value as a text String.
virtual double get_min() const =0
Get the minimum property value, converted to double.
virtual String unit() const =0
Units of the values within range.
virtual void reset()=0
Assign default as normalized property value.
Helper to crawl hierarchical resources.
virtual String2 assign(const String &utf8path, bool existingfile=false)=0
Move to a different path.
virtual Resource folder() const =0
Describe current folder.
virtual ResourceS entries() const =0
List entries of a folder.
virtual Resource canonify(const String &utf8cwd, const String &utf8fragment, bool constraindir, bool constrainfile)=0
Return absolute path, slash-terminated if directory, constrain to existing paths.
Central singleton, serves as API entry point.
virtual ProjectP create_project(String projectname)=0
Create a new project (name is modified to be unique if necessary.
virtual ProjectP last_project()=0
Retrieve the last created project.
virtual String get_version()=0
Retrieve ASE version.
static ServerP instancep()
Retrieve global Server instance as std::shared_ptr.
virtual void shutdown()=0
Shutdown ASE.
virtual PropertyP access_preference(const String &ident)=0
Retrieve property handle for a Preference identifier.
static Server & instance()
Retrieve global Server instance.
virtual String get_opus_version()=0
Retrieve Opus handler version.
virtual String get_build_id()=0
Retrieve ASE build id.
virtual String get_flac_version()=0
Retrieve FLAC handler version.
virtual String get_sndfile_version()=0
Retrieve libsndfile support version.
ResourceCrawlerP url_crawler(const String &url)
Create crawler to navigate URL contents.
ResourceCrawlerP dir_crawler(const String &cwd)
Create crawler to navigate directories.
virtual StringS list_preferences()=0
Retrieve a list of all preference identifiers.
String engine_stats()
Print engine state.
void exit_program(int status=0)
End program (without saving).
virtual bool broadcast_telemetry(const TelemetrySegmentS &segments, int32 interval_ms)=0
Broadcast telemetry memory segments to the current Jsonipc connection.
Common base type for polymorphic classes managed by std::shared_ptr<>.
Container for Clip objects and sequencing information.
virtual bool is_muted() const =0
Check if track is muted.
virtual bool is_master() const =0
Flag set on the main output track.
virtual ClipS launcher_clips()=0
Retrieve the list of clips that can be directly played.
virtual void pan(double pan)=0
Set track pan (-1.0 to 1.0).
virtual void set_muted(bool muted)=0
Set track muted state.
virtual bool is_solo() const =0
Check if track is soloed.
virtual void set_solo(bool solo)=0
Set track solo state.
virtual double pan() const =0
Get track pan (-1.0 to 1.0).
virtual int32 midi_channel() const =0
Midi channel assigned to this track, 0 uses internal per-track channel.
virtual DeviceP access_device()=0
Retrieve Device handle for this track.
virtual double volume() const =0
Get track volume in dB.
virtual void volume(double db)=0
Set track volume in dB.
virtual TelemetryFieldS telemetry() const =0
Create signal monitor for an output channel.
The Anklang C++ API namespace.
ResourceType type
Resource classification.
String creator_name
Name of the creator.
uint64_t uint64
A 64-bit unsigned integer, use PRI*64 in format strings.
bool probe_samples
Provide probe with bare sample values.
int32_t int32
A 32-bit signed integer.
bool probe_range
Provide sample range probes.
String type
Types like "i32", "f32", "f64".
String name
Preferred user interface name.
int64_t offset
Position in bytes.
String name
Names like "bpm", etc.
String creator_url
Internet contact of the creator.
uint8_t uint8
An 8-bit unsigned integer.
String uri
Unique identifier for de-/serialization.
int8_t int8
An 8-bit signed integer.
int64_t int64
A 64-bit unsigned integer, use PRI*64 in format strings.
Error
Enum representing Error states.
int32 offset
Position in bytes.
constexpr const char GUIONLY[]
GUI READABLE WRITABLE.
const char * ase_error_blurb(Error error)
Describe Error condition.
String description
Elaborate description for help dialogs.
int32 length
Length in bytes.
constexpr const char STORAGE[]
STORAGE READABLE WRITABLE.
int32 length
Length in bytes.
String uri
Unique resource identifier.
ChoiceS & operator+=(ChoiceS &choices, Choice &&newchoice)
Convenience ChoiceS construction helper.
bool probe_energy
Provide sample energy measurement.
bool probe_fft
Provide FFT analysis probe.
constexpr const char STANDARD[]
STORAGE GUI READABLE WRITABLE.
uint32_t uint
Provide 'uint' as convenience type.
String category
Category to allow grouping for processors of similar function.
String website_url
Website of/about this Processor.
int64 mtime
Modification time in milliseconds.
MusicalTuning
Musical tunings, see: http://en.wikipedia.org/wiki/Musical_tuning.
String label
UI display name.
Bits representing a selection of probe sample data features.
Description of a resource, possibly nested.
Telemetry segment location.
Telemetry segment location.
Representation of one possible choice for selection properties.
String warning
Potential problem indicator.
String ident
Identifier used for serialization (may be derived from untranslated label).
String icon
Icon (64x64 pixels) or unicode symbol (possibly wide).
String notice
Additional information of interest.
String blurb
Short description for overviews.
String label
Preferred user interface name.
Part specific note event representation.
int64 tick
UI selection flag.
bool selected
Musical note as MIDI key, 0 .. 127.
float velocity
Duration in number of ticks.
bool operator==(const ClipNote &) const
Fine Tune, -100 .. +100.
int64 duration
Position in ticks.
float fine_tune
Velocity, 0 .. +1.
Contents of user interface notifications.
Value type used to interface with various property types.
Common base type to allow casting between polymorphic classes.