Anklang 0.3.0-460-gc4ef46ba
ASE — Anklang Sound Engine (C++)
« « « Anklang Documentation |
Audio signal AudioProcessor base class, implemented by all effects and instruments. More...
#include "processor.hh"
Classes | |
struct | EventStreams |
class | FloatBuffer |
struct | IOBus |
union | IOBus.__unnamed27__ |
struct | IOBus.__unnamed27__.__unnamed29__ |
struct | IOBus.__unnamed27__.__unnamed31__ |
struct | ProcessorSetup |
struct | RenderContext |
Public Types | |
using | MakeProcessor = AudioProcessorP(*)(AudioEngine &) |
using | MaybeParamId = std::pair< ParamId, bool > |
using | StaticInfo = void(*)(AudioProcessorInfo &) |
using | MakeDeviceP = std::function< DeviceP(const String &, StaticInfo, AudioProcessorP)> |
using | MakeProcessorP = AudioProcessorP(*)(CString, AudioEngine &) |
Public Member Functions | |
AtomicBits::Iter | atomic_bits_iter (size_t pos=0) const |
Allow iterations over the atomic bits. | |
float | note_to_freq (int note) const |
Convert MIDI note to Hertz according to the current MusicalTuning. | |
String | debug_name () const |
AudioEngine & | engine () const |
Retrieve AudioEngine handle for this AudioProcessor. | |
const AudioTransport & | transport () const |
Sample rate mixing frequency in Hz as unsigned, used for render(). | |
uint | sample_rate () const |
double | nyquist () const |
Half the sample rate in Hz as double, used for render(). | |
double | inyquist () const |
Inverse Nyquist frequency, i.e. 1.0 / nyquist(). | |
double | get_param (Id32 paramid) |
Fetch value of parameter id . | |
bool | send_param (Id32 paramid, double value) |
Set parameter id to value within ParamInfo.get_minmax() . | |
ParameterC | parameter (Id32 paramid) const |
Retrieve supplemental information for parameters, usually to enhance the user interface. | |
MaybeParamId | find_param (const String &identifier) const |
Return the ParamId for parameter identifier or else 0. | |
MinMax | param_range (Id32 paramid) const |
Retrieve the minimum / maximum values for a parameter. | |
bool | check_dirty (Id32 paramid) const |
void | adjust_all_params () |
virtual String | param_value_to_text (uint32_t paramid, double value) const |
virtual double | param_value_from_text (uint32_t paramid, const String &text) const |
virtual double | value_to_normalized (Id32 paramid, double value) const |
virtual double | value_from_normalized (Id32 paramid, double normalized) const |
double | get_normalized (Id32 paramid) |
Get param value normalized into 0…1. | |
bool | set_normalized (Id32 paramid, double normalized) |
Set param value normalized into 0…1. | |
bool | is_initialized () const |
Check if AudioProcessor has been properly intiialized (so the parameter set is fixed). | |
uint | text_param_to_quark (uint32_t paramid, const String &text) |
Ase main-thread helper for temporary string<->uint conversions. | |
String | text_param_from_quark (uint32_t paramid, uint vint) |
Helper for temporary uint<->string conversions. | |
IBusId | find_ibus (const String &name) const |
Return the IBusId for input bus uilabel or else 0. | |
OBusId | find_obus (const String &name) const |
Return the OBusId for output bus uilabel or else 0. | |
uint | n_ibuses () const |
Number of input buses configured for this AudioProcessor. | |
uint | n_obuses () const |
Number of output buses configured for this AudioProcessor. | |
uint | n_ichannels (IBusId busid) const |
Number of channels of input bus busid configured for this AudioProcessor. | |
uint | n_ochannels (OBusId busid) const |
Number of channels of output bus busid configured for this AudioProcessor. | |
BusInfo | bus_info (IBusId busid) const |
Retrieve BusInfo for an input bus. | |
BusInfo | bus_info (OBusId busid) const |
Retrieve BusInfo for an output bus. | |
bool | connected (OBusId obusid) const |
const float * | ifloats (IBusId b, uint c) const |
Access readonly float buffer of input bus b , channel c , see also ofloats(). | |
const float * | ofloats (OBusId b, uint c) const |
Access readonly float buffer of output bus b , channel c , see also oblock(). | |
DeviceP | get_device () const |
Gain access to the Device handle of this AudioProcessor. | |
bool | has_event_input () const |
Returns true if this AudioProcessor has an event input stream. | |
bool | has_event_output () const |
Returns true if this AudioProcessor has an event output stream. | |
void | connect_event_input (AudioProcessor &oproc) |
Connect event input to event output of AudioProcessor oproc . | |
void | disconnect_event_input () |
Disconnect event input if a connection is present. | |
void | enable_engine_output (bool onoff) |
Configure if the main output of this module is mixed into the engine output. | |
![]() | |
T | enable_shared_from_this (T... args) |
T | operator= (T... args) |
T | shared_from_this (T... args) |
T | weak_from_this (T... args) |
T | ~enable_shared_from_this (T... args) |
![]() | |
void * | operator new (std::size_t sz) |
void * | operator new[] (std::size_t sz) |
void * | operator new (std::size_t sz, std::align_val_t al) |
void * | operator new[] (std::size_t sz, std::align_val_t al) |
void | operator delete (void *ptr, std::size_t sz) |
void | operator delete[] (void *ptr, std::size_t sz) |
void | operator delete (void *ptr, std::size_t sz, std::align_val_t al) |
void | operator delete[] (void *ptr, std::size_t sz, std::align_val_t al) |
Static Public Member Functions | |
static uint64 | timestamp () |
The current timestamp in sample frames. | |
static double | param_peek_mt (const AudioProcessorP proc, Id32 paramid) |
static void | registry_add (CString aseid, StaticInfo, MakeProcessorP) |
static DeviceP | registry_create (CString aseid, AudioEngine &engine, const MakeDeviceP &) |
static void | registry_foreach (const std::function< void(const String &aseid, StaticInfo)> &fun) |
Iterate over the known AudioProcessor types. | |
template<class AudioProc , class ... Args> | |
static std::shared_ptr< AudioProc > | create_processor (AudioEngine &engine, const Args &...args) |
Static Public Attributes | |
static const String | GUIONLY |
":G:r:w:" - GUI READABLE WRITABLE | |
static const String | STANDARD |
":G:S:r:w:" - GUI STORAGE READABLE WRITABLE | |
static const String | STORAGEONLY |
":S:r:w:" - STORAGE READABLE WRITABLE | |
Protected Types | |
enum | { INITIALIZED , SCHEDULED , PARAMCHANGE , BUSCONNECT , BUSDISCONNECT , INSERTION , REMOVAL , ENGINE_OUTPUT } |
using | MinMax = std::pair< double, double > |
using | MidiEventInput = MidiEventReader< 2 > |
Protected Member Functions | |
AudioProcessor (const ProcessorSetup &) | |
Constructor for AudioProcessor. | |
virtual | ~AudioProcessor () |
The destructor is called when the last std::shared_ptr<> reference drops. | |
virtual void | initialize (SpeakerArrangement busses)=0 |
void | enotify_enqueue_mt (uint32 pushmask) |
uint | schedule_processor () |
Schedule this node and its dependencies for engine rendering. | |
void | reschedule () |
Request recreation of the audio engine rendering schedule. | |
virtual uint | schedule_children () |
void | install_params (const AudioParams::Map ¶ms) |
Reset list of parameters, enqueues parameter value initializaiton events. | |
void | apply_event (const MidiEvent &event) |
Assign MidiEvent::PARAM_VALUE event values to parameters. | |
void | apply_input_events () |
virtual void | adjust_param (uint32_t paramid) |
double | peek_param_mt (Id32 paramid) const |
IBusId | add_input_bus (CString uilabel, SpeakerArrangement speakerarrangement, const String &hints="", const String &blurb="") |
Add an input bus with uilabel and channels configured via speakerarrangement . | |
OBusId | add_output_bus (CString uilabel, SpeakerArrangement speakerarrangement, const String &hints="", const String &blurb="") |
Add an output bus with uilabel and channels configured via speakerarrangement . | |
void | remove_all_buses () |
Remove existing bus configurations, useful at the start of configure(). | |
IOBus & | iobus (OBusId busid) |
Get internal output bus handle. | |
IOBus & | iobus (IBusId busid) |
Get internal input bus handle. | |
const IOBus & | iobus (OBusId busid) const |
const IOBus & | iobus (IBusId busid) const |
void | disconnect_ibuses () |
Reset input bus buffer data. | |
void | disconnect_obuses () |
Disconnect inputs of all Processors that are connected to outputs of this . | |
void | disconnect (IBusId ibus) |
Disconnect input ibusid . | |
void | connect (IBusId ibus, AudioProcessor &oproc, OBusId obus) |
Connect input ibusid to output obusid of AudioProcessor prev . | |
float * | oblock (OBusId b, uint c) |
void | assign_oblock (OBusId b, uint c, float val) |
Fill the output buffer of bus b , channel c with v . | |
void | redirect_oblock (OBusId b, uint c, const float *block) |
Redirect output buffer of bus b , channel c to point to block , or zeros if block==nullptr . | |
void | prepare_event_input () |
void | prepare_event_output () |
MidiEventInput | midi_event_input () |
Access the current MidiEvent inputs during render(), needs prepare_event_input(). | |
MidiEventOutput & | midi_event_output () |
Access the current output EventStream during render(), needs prepare_event_output(). | |
void | atomic_bits_resize (size_t count) |
Prepare count bits for atomic notifications. | |
bool | atomic_bit_notify (size_t nth) |
Set the nth atomic notification bit, return if enotify_enqueue_mt() is needed. | |
Static Protected Member Functions | |
static uint | schedule_processor (AudioProcessor &p) |
Protected Attributes | |
std::atomic< uint32 > | flags_ |
AudioEngine & | engine_ |
CString | aseid_ |
Friends | |
class | ProcessorManager |
class | DeviceImpl |
class | NativeDeviceImpl |
class | AudioEngineThread |
Audio signal AudioProcessor base class, implemented by all effects and instruments.
Definition at line 76 of file processor.hh.
union Ase::AudioProcessor::IOBus.__unnamed27__ |
Definition at line 289 of file processor.hh.
Class Members | ||
---|---|---|
struct IOBus.__unnamed27__.__unnamed29__ | __unnamed__ | |
struct IOBus.__unnamed27__.__unnamed31__ | __unnamed__ | |
IOTag | iotag | |
uint | mem_[4] |
struct Ase::AudioProcessor::IOBus.__unnamed27__.__unnamed29__ |
Definition at line 291 of file processor.hh.
Class Members | ||
---|---|---|
IOTag | ibus | |
OBusId | obusid | |
AudioProcessor * | oproc |
struct Ase::AudioProcessor::IOBus.__unnamed27__.__unnamed31__ |
Definition at line 296 of file processor.hh.
Class Members | ||
---|---|---|
uint | fbuffer_concounter | |
uint | fbuffer_count | |
uint | fbuffer_index | |
IOTag | obus |
struct Ase::AudioProcessor::ProcessorSetup |
Definition at line 137 of file processor.hh.
Class Members | ||
---|---|---|
CString | aseid | |
AudioEngine & | engine |
struct Ase::AudioProcessor::RenderContext |
Definition at line 804 of file processor.cc.
Class Members | ||
---|---|---|
MidiEventVector * | render_events |
using Ase::AudioProcessor::MakeDeviceP = std::function<DeviceP (const String&, StaticInfo, AudioProcessorP)> |
Definition at line 237 of file processor.hh.
using Ase::AudioProcessor::MakeProcessor = AudioProcessorP (*) (AudioEngine&) |
Definition at line 185 of file processor.hh.
using Ase::AudioProcessor::MakeProcessorP = AudioProcessorP (*) (CString,AudioEngine&) |
Definition at line 238 of file processor.hh.
Definition at line 186 of file processor.hh.
|
protected |
Definition at line 96 of file processor.hh.
|
protected |
Definition at line 94 of file processor.hh.
using Ase::AudioProcessor::StaticInfo = void (*) (AudioProcessorInfo&) |
Definition at line 236 of file processor.hh.
|
protected |
Definition at line 97 of file processor.hh.
|
explicitprotected |
Constructor for AudioProcessor.
Definition at line 104 of file processor.cc.
|
protectedvirtual |
The destructor is called when the last std::shared_ptr<> reference drops.
Definition at line 111 of file processor.cc.
References std::atomic::exchange(), and remove_all_buses().
|
protected |
Add an input bus with uilabel
and channels configured via speakerarrangement
.
Definition at line 510 of file processor.cc.
References assert_return, iobus(), is_initialized(), n_ibuses(), Ase::string_to_identifier(), and uint64_t.
Referenced by Ase::ClapAudioProcessor::initialize(), and Ase::AudioChain::initialize().
|
protected |
Add an output bus with uilabel
and channels configured via speakerarrangement
.
Definition at line 530 of file processor.cc.
References assert_return, iobus(), is_initialized(), n_obuses(), Ase::string_to_identifier(), and uint64_t.
Referenced by Ase::ClapAudioProcessor::initialize(), Ase::AudioChain::Inlet::initialize(), and Ase::AudioChain::initialize().
void Ase::AudioProcessor::adjust_all_params | ( | ) |
Definition at line 517 of file processor.hh.
|
protectedvirtual |
Definition at line 156 of file processor.hh.
|
protected |
Assign MidiEvent::PARAM_VALUE event values to parameters.
Definition at line 387 of file processor.hh.
References Ase::MidiEvent::type, and Ase::AudioParams::value().
Referenced by apply_input_events().
|
protected |
Process all input events via apply_event() and adjust_param(). This applies all incoming parameter changes, events like NOTE_ON are not handled.
Definition at line 402 of file processor.hh.
References apply_event(), and midi_event_input().
Fill the output buffer of bus b
, channel c
with v
.
Definition at line 627 of file processor.cc.
References Ase::floatfill(), and oblock().
Set the nth atomic notification bit, return if enotify_enqueue_mt() is needed.
Definition at line 389 of file processor.cc.
References assert_return.
AtomicBits::Iter Ase::AudioProcessor::atomic_bits_iter | ( | size_t | pos = 0 | ) | const |
Allow iterations over the atomic bits.
Definition at line 399 of file processor.cc.
References return_unless.
|
protected |
Prepare count
bits for atomic notifications.
Definition at line 380 of file processor.cc.
Retrieve BusInfo for an output bus.
Definition at line 494 of file processor.hh.
References iobus().
Check if the parameter dirty
flag is set. Return true
if the parameter value changed during render().
Definition at line 536 of file processor.hh.
References Ase::AudioParams::dirty_index(), Ase::AudioParams::index(), and ssize_t.
|
protected |
Connect input ibusid
to output obusid
of AudioProcessor prev
.
Definition at line 713 of file processor.cc.
References assert_return, disconnect(), enotify_enqueue_mt(), iobus(), Ase::MONO, Ase::BusInfo::n_channels(), n_ibuses(), n_ichannels(), n_obuses(), n_ochannels(), std::vector::push_back(), reschedule(), size_t, and Ase::BusInfo::speakers.
void Ase::AudioProcessor::connect_event_input | ( | AudioProcessor & | oproc | ) |
Connect event input to event output of AudioProcessor oproc
.
Definition at line 494 of file processor.cc.
References assert_return, disconnect_event_input(), enotify_enqueue_mt(), has_event_input(), has_event_output(), std::vector::push_back(), and reschedule().
Indicator for connected output buses. Not connected output bus buffers do not need to be filled.
Definition at line 637 of file processor.cc.
References assert_return, iobus(), n_obuses(), and size_t.
|
static |
Definition at line 599 of file processor.hh.
String Ase::AudioProcessor::debug_name | ( | ) | const |
Definition at line 423 of file processor.cc.
|
protected |
Disconnect input ibusid
.
Definition at line 687 of file processor.cc.
References assert_return, disconnect_event_input(), enotify_enqueue_mt(), Ase::Aux::erase_first(), iobus(), n_ibuses(), n_obuses(), reschedule(), return_unless, and size_t.
Referenced by connect(), and disconnect_ibuses().
void Ase::AudioProcessor::disconnect_event_input | ( | ) |
Disconnect event input if a connection is present.
Definition at line 477 of file processor.cc.
References assert_return, enotify_enqueue_mt(), Ase::Aux::erase_first(), and reschedule().
Referenced by connect_event_input(), and disconnect().
|
protected |
Reset input bus buffer data.
Definition at line 662 of file processor.cc.
References disconnect(), n_ibuses(), and reschedule().
|
protected |
Disconnect inputs of all Processors that are connected to outputs of this
.
Definition at line 673 of file processor.cc.
References std::vector::back(), reschedule(), return_unless, and std::vector::size().
void Ase::AudioProcessor::enable_engine_output | ( | bool | onoff | ) |
Configure if the main output of this module is mixed into the engine output.
Definition at line 446 of file processor.cc.
References assert_return, has_event_output(), and n_obuses().
AudioEngine & Ase::AudioProcessor::engine | ( | ) | const |
Retrieve AudioEngine handle for this AudioProcessor.
Definition at line 425 of file processor.hh.
Referenced by Ase::register_audio_processor().
|
protected |
Queue an AudioProcessor notification This function is MT-Safe after proper AudioProcessor initialization.
Definition at line 1080 of file processor.cc.
References assert_return, assert_warn, std::atomic::compare_exchange_strong(), std::atomic::fetch_or(), std::atomic::load(), return_unless, std::enable_shared_from_this< AudioProcessor >::shared_from_this(), and std::atomic::store().
Referenced by connect(), connect_event_input(), disconnect(), disconnect_event_input(), Ase::AudioCombo::insert(), Ase::AudioCombo::remove(), and Ase::ClapAudioProcessor::render().
Return the IBusId for input bus uilabel
or else 0.
Definition at line 549 of file processor.cc.
References Ase::BusInfo::ident, iobus(), Ase::CString::lookup(), n_ibuses(), and size_t.
Return the OBusId for output bus uilabel
or else 0.
Definition at line 561 of file processor.cc.
References Ase::BusInfo::ident, iobus(), Ase::CString::lookup(), n_obuses(), and size_t.
auto Ase::AudioProcessor::find_param | ( | const String & | identifier | ) | const |
Return the ParamId for parameter identifier
or else 0.
Definition at line 225 of file processor.cc.
References Ase::CString::lookup(), and std::make_pair().
DeviceP Ase::AudioProcessor::get_device | ( | ) | const |
Gain access to the Device handle of this
AudioProcessor.
Definition at line 130 of file processor.cc.
Referenced by Ase::ClapAudioProcessor::initialize().
Get param value normalized into 0…1.
Definition at line 314 of file processor.cc.
References get_param().
Fetch value
of parameter id
.
Definition at line 525 of file processor.hh.
References Ase::AudioParams::index(), and ssize_t.
Referenced by get_normalized().
bool Ase::AudioProcessor::has_event_input | ( | ) | const |
Returns true
if this AudioProcessor has an event input stream.
Definition at line 459 of file processor.hh.
Referenced by connect_event_input(), and Ase::ClapAudioProcessor::initialize().
bool Ase::AudioProcessor::has_event_output | ( | ) | const |
Returns true
if this AudioProcessor has an event output stream.
Definition at line 466 of file processor.hh.
Referenced by connect_event_input(), enable_engine_output(), and Ase::ClapAudioProcessor::initialize().
Access readonly float buffer of input bus b
, channel c
, see also ofloats().
Definition at line 546 of file processor.hh.
Referenced by Ase::ClapAudioProcessor::render(), and Ase::AudioChain::Inlet::render().
|
protectedpure virtual |
Mandatory method to setup parameters and I/O busses. See add_param(), add_input_bus() / add_output_bus(). This method will be called once per instance after construction.
Implemented in Ase::ClapAudioProcessor, Ase::AudioChain::Inlet, Ase::AudioChain, and Ase::MidiLib::MidiProducerImpl.
Definition at line 432 of file processor.cc.
References assert_return, n_ibuses(), and n_obuses().
|
protected |
Reset list of parameters, enqueues parameter value initializaiton events.
Definition at line 213 of file processor.cc.
References assert_return, and Ase::AudioParams::install().
double Ase::AudioProcessor::inyquist | ( | ) | const |
Inverse Nyquist frequency, i.e. 1.0 / nyquist().
Definition at line 452 of file processor.hh.
|
protected |
Get internal input bus handle.
Definition at line 159 of file processor.cc.
References assert_return, assert_warn, n_ibuses(), and size_t.
Definition at line 167 of file processor.hh.
|
protected |
Get internal output bus handle.
Definition at line 146 of file processor.cc.
References assert_return, assert_warn, n_obuses(), and size_t.
Referenced by add_input_bus(), add_output_bus(), bus_info(), bus_info(), connect(), connected(), disconnect(), find_ibus(), find_obus(), n_ichannels(), n_ochannels(), redirect_oblock(), and schedule_processor().
Definition at line 166 of file processor.hh.
bool Ase::AudioProcessor::is_initialized | ( | ) | const |
Check if AudioProcessor has been properly intiialized (so the parameter set is fixed).
Definition at line 407 of file processor.cc.
Referenced by add_input_bus(), and add_output_bus().
|
protected |
Access the current MidiEvent inputs during render(), needs prepare_event_input().
Definition at line 844 of file processor.cc.
Referenced by apply_input_events(), and Ase::MidiLib::MidiProducerImpl::render().
|
protected |
Access the current output EventStream during render(), needs prepare_event_output().
Definition at line 859 of file processor.cc.
References assert_return.
Referenced by Ase::MidiLib::MidiProducerImpl::render().
uint Ase::AudioProcessor::n_ibuses | ( | ) | const |
Number of input buses configured for this AudioProcessor.
Definition at line 473 of file processor.hh.
Referenced by add_input_bus(), connect(), disconnect(), disconnect_ibuses(), find_ibus(), initialize(), iobus(), and schedule_processor().
Number of channels of input bus busid
configured for this AudioProcessor.
Definition at line 501 of file processor.hh.
References iobus(), and Ase::BusInfo::n_channels().
Referenced by connect(), Ase::ClapAudioProcessor::render(), and Ase::AudioChain::Inlet::render().
uint Ase::AudioProcessor::n_obuses | ( | ) | const |
Number of output buses configured for this AudioProcessor.
Definition at line 480 of file processor.hh.
Referenced by add_output_bus(), connect(), connected(), disconnect(), enable_engine_output(), find_obus(), initialize(), iobus(), and redirect_oblock().
Number of channels of output bus busid
configured for this AudioProcessor.
Definition at line 509 of file processor.hh.
References iobus(), and Ase::BusInfo::n_channels().
Referenced by connect(), Ase::ClapAudioProcessor::render(), Ase::AudioChain::Inlet::render(), and Ase::AudioChain::render().
Convert MIDI note to Hertz according to the current MusicalTuning.
Definition at line 123 of file processor.cc.
References Ase::MidiNote::note_to_freq().
double Ase::AudioProcessor::nyquist | ( | ) | const |
Half the sample rate in Hz as double, used for render().
Definition at line 445 of file processor.hh.
Reset buffer redirections and access float buffer of output bus b
, channel c
. See also ofloats() for readonly access and redirect_oblock() for redirections.
Definition at line 561 of file processor.hh.
Referenced by assign_oblock(), and Ase::ClapAudioProcessor::render().
Access readonly float buffer of output bus b
, channel c
, see also oblock().
Definition at line 553 of file processor.hh.
Referenced by Ase::AudioChain::render().
Fetch the current parameter value of a AudioProcessor from any thread. This function is MT-Safe after proper AudioProcessor initialization.
Definition at line 283 of file processor.cc.
References assert_return.
AudioProcessor::MinMax Ase::AudioProcessor::param_range | ( | Id32 | paramid | ) | const |
Retrieve the minimum / maximum values for a parameter.
Definition at line 414 of file processor.cc.
References fmax(), fmin(), parameter(), and return_unless.
|
virtual |
Extract a parameter paramid
value from a text string. The string might contain unit information or consist only of number characters. Non-recognized characters should be ignored, so a best effort conversion is always undertaken. This function may be called from any thread, so this
must be treated as const
(it might be used concurrently by a different thread).
Definition at line 351 of file processor.cc.
References parameter().
Format a parameter paramid
value as text string. Currently, this function may be called from any thread, so this
must be treated as const
(it might be used concurrently by a different thread).
Definition at line 336 of file processor.cc.
References parameter().
ParameterC Ase::AudioProcessor::parameter | ( | Id32 | paramid | ) | const |
Retrieve supplemental information for parameters, usually to enhance the user interface.
Definition at line 262 of file processor.cc.
References Ase::AudioParams::index(), and ssize_t.
Referenced by param_range(), param_value_from_text(), param_value_to_text(), send_param(), and text_param_to_quark().
Fetch the current parameter value of an AudioProcessor. This function does not modify the parameter dirty
flag. This function is MT-Safe after proper AudioProcessor initialization.
Definition at line 272 of file processor.cc.
References Ase::AudioParams::index(), and ssize_t.
|
protected |
Prepare the AudioProcessor to receive Event objects during render() via get_event_input(). Note, remove_all_buses() will remove the Event input created by this function.
Definition at line 456 of file processor.cc.
References assert_return.
Referenced by Ase::ClapAudioProcessor::initialize(), and Ase::MidiLib::MidiProducerImpl::initialize().
|
protected |
Prepare the AudioProcessor to produce Event objects during render() via get_event_output(). Note, remove_all_buses() will remove the Event output created by this function.
Definition at line 467 of file processor.cc.
References assert_return.
Referenced by Ase::ClapAudioProcessor::initialize(), and Ase::MidiLib::MidiProducerImpl::initialize().
Redirect output buffer of bus b
, channel c
to point to block
, or zeros if block==nullptr
.
Definition at line 611 of file processor.cc.
References assert_return, Ase::const_float_zeros, iobus(), n_obuses(), and size_t.
Referenced by Ase::AudioChain::Inlet::render(), and Ase::AudioChain::render().
|
static |
Add a new type to the AudioProcessor type registry. New AudioProcessor types must have a unique URI (see query_info()
) and will be created with the factory function create()
.
Definition at line 879 of file processor.cc.
References Ase::AudioProcessorRegistry::aseid, assert_return, std::atomic_compare_exchange_strong(), and Ase::string_startswith().
Referenced by Ase::register_audio_processor().
|
static |
Definition at line 892 of file processor.cc.
|
static |
Iterate over the known AudioProcessor types.
Definition at line 909 of file processor.cc.
|
protected |
Remove existing bus configurations, useful at the start of configure().
Definition at line 646 of file processor.cc.
References assert_return, std::vector::empty(), and reschedule().
Referenced by Ase::ClapAudioProcessor::initialize(), Ase::AudioChain::Inlet::initialize(), Ase::MidiLib::MidiProducerImpl::initialize(), and ~AudioProcessor().
|
protected |
Request recreation of the audio engine rendering schedule.
Definition at line 439 of file processor.cc.
Referenced by connect(), connect_event_input(), disconnect(), disconnect_event_input(), disconnect_ibuses(), disconnect_obuses(), Ase::AudioCombo::insert(), Ase::AudioCombo::remove(), and remove_all_buses().
uint Ase::AudioProcessor::sample_rate | ( | ) | const |
Definition at line 438 of file processor.hh.
|
protectedvirtual |
Definition at line 150 of file processor.hh.
|
protected |
Schedule this node and its dependencies for engine rendering.
Definition at line 781 of file processor.cc.
References iobus(), std::max(), n_ibuses(), and schedule_processor().
Referenced by schedule_processor().
|
staticprotected |
Definition at line 151 of file processor.hh.
Set parameter id
to value
within ParamInfo.get_minmax()
.
Definition at line 238 of file processor.cc.
References assert_return, Ase::AudioParams::index(), parameter(), and ssize_t.
Referenced by set_normalized().
Set param value normalized into 0…1.
Definition at line 321 of file processor.cc.
References ASE_ISLIKELY, and send_param().
Helper for temporary uint<->string conversions.
Definition at line 372 of file processor.cc.
Ase main-thread helper for temporary string<->uint conversions.
Definition at line 359 of file processor.cc.
References assert_return, and parameter().
|
static |
The current timestamp in sample frames.
Definition at line 568 of file processor.hh.
const AudioTransport & Ase::AudioProcessor::transport | ( | ) | const |
Sample rate mixing frequency in Hz as unsigned, used for render().
Definition at line 432 of file processor.hh.
Referenced by Ase::MidiLib::MidiProducerImpl::render().
Definition at line 302 of file processor.cc.
Definition at line 291 of file processor.cc.
|
friend |
Definition at line 84 of file processor.hh.
|
friend |
Definition at line 82 of file processor.hh.
|
friend |
Definition at line 83 of file processor.hh.
|
friend |
Definition at line 81 of file processor.hh.
|
protected |
Definition at line 143 of file processor.hh.
|
protected |
Definition at line 142 of file processor.hh.
|
protected |
Definition at line 107 of file processor.hh.
|
static |
":G:r:w:" - GUI READABLE WRITABLE
GUI READABLE WRITABLE.
Definition at line 187 of file processor.hh.
|
static |
":G:S:r:w:" - GUI STORAGE READABLE WRITABLE
GUI STORAGE READABLE WRITABLE.
Definition at line 188 of file processor.hh.
|
static |
":S:r:w:" - STORAGE READABLE WRITABLE
STORAGE READABLE WRITABLE.
Definition at line 189 of file processor.hh.