|
DSPark 1.8.0
Header-only C++20 DSP for real-time and offline audio
|
#include <DSParkClap.h>

Public Member Functions | |
| Plugin (const clap_host_t *h) noexcept | |
| void | applyNormalized (int index, double normalized) noexcept |
| void | applyFactoryPresetIdx (int idx) noexcept |
| void | refreshLatency () noexcept |
| void | collectEvent (const clap_event_header_t *ev, uint32_t numSamples, BlockEvent *events, int &count) noexcept |
| void | collectEvents (const clap_input_events_t *in, uint32_t numSamples, BlockEvent *events, int &count) noexcept |
| bool | applyBlockEvent (const BlockEvent &ev, int blockStart) noexcept |
| void | forwardTransport (const clap_event_transport_t *t) noexcept |
Static Public Member Functions | |
| static Plugin * | self (const clap_plugin_t *p) noexcept |
| static int | indexOfParamId (uint32_t id) noexcept |
| static bool | sInit (const clap_plugin_t *p) noexcept |
| static void | sDestroy (const clap_plugin_t *p) noexcept |
| static bool | sActivate (const clap_plugin_t *p, double sr, uint32_t, uint32_t maxFrames) noexcept |
| static void | sDeactivate (const clap_plugin_t *) noexcept |
| static bool | sStartProcessing (const clap_plugin_t *) noexcept |
| static void | sStopProcessing (const clap_plugin_t *) noexcept |
| static void | sReset (const clap_plugin_t *p) noexcept |
| static clap_process_status | sProcess (const clap_plugin_t *p, const clap_process_t *process) noexcept |
| static const void * | sGetExtension (const clap_plugin_t *, const char *id) noexcept |
| static void | sOnMainThread (const clap_plugin_t *p) noexcept |
| static uint32_t | sPortCount (const clap_plugin_t *, bool isInput) noexcept |
| static bool | sPortGet (const clap_plugin_t *p, uint32_t index, bool isInput, clap_audio_port_info_t *info) noexcept |
| static uint32_t | sConfigCount (const clap_plugin_t *) noexcept |
| static void | fillConfig (clap_audio_ports_config_t *config, int width) noexcept |
| static bool | sConfigGet (const clap_plugin_t *, uint32_t index, clap_audio_ports_config_t *config) noexcept |
| static bool | sConfigSelect (const clap_plugin_t *p, clap_id configId) noexcept |
| static clap_id | sConfigCurrent (const clap_plugin_t *p) noexcept |
| static bool | sConfigInfoGet (const clap_plugin_t *p, clap_id configId, uint32_t portIndex, bool isInput, clap_audio_port_info_t *info) noexcept |
| static uint32_t | sNotePortCount (const clap_plugin_t *, bool isInput) noexcept |
| static bool | sNotePortGet (const clap_plugin_t *, uint32_t index, bool isInput, clap_note_port_info_t *info) noexcept |
| static bool | sRenderHardRealtime (const clap_plugin_t *) noexcept |
| static bool | sRenderSet (const clap_plugin_t *p, clap_plugin_render_mode mode) noexcept |
| static bool | sPresetFromLocation (const clap_plugin_t *p, uint32_t locationKind, const char *location, const char *loadKey) noexcept |
| static uint32_t | sParamCount (const clap_plugin_t *) noexcept |
| static bool | sParamInfo (const clap_plugin_t *, uint32_t index, clap_param_info_t *info) noexcept |
| static bool | sParamValue (const clap_plugin_t *p, clap_id id, double *out) noexcept |
| static bool | sParamValueToText (const clap_plugin_t *, clap_id id, double value, char *out, uint32_t size) noexcept |
| static bool | sParamTextToValue (const clap_plugin_t *, clap_id id, const char *text, double *out) noexcept |
| static void | sParamFlush (const clap_plugin_t *p, const clap_input_events_t *in, const clap_output_events_t *out) noexcept |
| static bool | sStateSave (const clap_plugin_t *p, const clap_ostream_t *stream) noexcept |
| static bool | sStateLoad (const clap_plugin_t *p, const clap_istream_t *stream) noexcept |
| static uint32_t | sLatencyGet (const clap_plugin_t *p) noexcept |
| static uint32_t | sTailGet (const clap_plugin_t *p) noexcept |
| static const clap_plugin_descriptor_t * | descriptor () noexcept |
| static const clap_plugin_t * | create (const clap_host_t *host) noexcept |
Public Attributes | |
| clap_plugin_t | plugin {} |
| const clap_host_t * | host = nullptr |
| const clap_host_latency_t * | hostLatency = nullptr |
| const clap_host_params_t * | hostParams = nullptr |
| const clap_host_preset_load_t * | hostPresetLoad = nullptr |
| P | user {} |
| double | sampleRate = 48000.0 |
| uint32_t | maxFrames = 0 |
| bool | prepared = false |
| std::atomic< int > | cachedLatency { 0 } |
| int | currentChannels = defaultChannelCount<P>() |
| bool | offlineRender = false |
| std::atomic< bool > | latencyDirty { false } |
| std::atomic< double > | shadow [kNumParams==0 ? 1 :kNumParams] {} |
| std::atomic< bool > | bypass { false } |
| std::atomic< int > | currentProgram { 0 } |
| float | bypassMix = 0.0f |
| std::vector< float > | dryL |
| std::vector< float > | dryR |
| std::vector< float > | silence |
| DryDelay | dryDelay |
Static Public Attributes | |
| static constexpr size_t | kNumParams = P::parameters.size() |
| static constexpr bool | kIsInstrument |
| static constexpr int | kNumPresets = factoryPresetCountOf<P>() |
| static const clap_plugin_audio_ports_t | kAudioPorts = { &sPortCount, &sPortGet } |
| static const clap_plugin_audio_ports_config_t | kPortsConfig |
| static const clap_plugin_audio_ports_config_info_t | kPortsConfigInfo |
| static const clap_plugin_note_ports_t | kNotePorts |
| static const clap_plugin_render_t | kRender |
| static const clap_plugin_preset_load_t | kPresetLoad |
| static const clap_plugin_params_t | kParams |
| static const clap_plugin_state_t | kState = { &sStateSave, &sStateLoad } |
| static const clap_plugin_latency_t | kLatency = { &sLatencyGet } |
| static const clap_plugin_tail_t | kTail = { &sTailGet } |
Definition at line 73 of file DSParkClap.h.
|
inlineexplicitnoexcept |
Definition at line 145 of file DSParkClap.h.
|
inlinenoexcept |
Applies one event; blockStart rebases MIDI offsets onto the next processBlock call. Returns true when a user parameter changed.
Definition at line 317 of file DSParkClap.h.
|
inlinenoexcept |
Applies one factory preset: every parameter, by normalized value.
Definition at line 175 of file DSParkClap.h.
|
inlinenoexcept |
Definition at line 157 of file DSParkClap.h.
|
inlinenoexcept |
Translates one CLAP event into the timestamped block stream. CLAP param events carry PLAIN values; raw MIDI covers what note events don't (pitch bend, CC, pressure).
Definition at line 209 of file DSParkClap.h.
|
inlinenoexcept |
Definition at line 306 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 1420 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 1396 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 779 of file DSParkClap.h.
|
inlinenoexcept |
Forwards the per-block clap transport as a TransportInfo.
Definition at line 345 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 167 of file DSParkClap.h.
|
inlinenoexcept |
Re-reads the plugin latency after parameter motion. The CLAP host must hear about it on the main thread, so a change only flags it and requests a callback; sOnMainThread delivers clap_host_latency.
Definition at line 191 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 460 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 777 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 815 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 795 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 820 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 803 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 490 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 458 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 152 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 687 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 442 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 1096 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 856 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 861 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 725 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 931 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 1014 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 936 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 996 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 964 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 980 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 736 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 746 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 896 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 503 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 879 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 881 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 494 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 491 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 1061 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 1040 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 492 of file DSParkClap.h.
|
inlinestaticnoexcept |
Definition at line 1104 of file DSParkClap.h.
| std::atomic<bool> dspark::plugin::clap_backend::Plugin< P >::bypass { false } |
Definition at line 112 of file DSParkClap.h.
| float dspark::plugin::clap_backend::Plugin< P >::bypassMix = 0.0f |
Definition at line 114 of file DSParkClap.h.
| std::atomic<int> dspark::plugin::clap_backend::Plugin< P >::cachedLatency { 0 } |
Latency in samples, as last reported to the host. The processing call re-reads it after parameter motion while the host fetches it from its own thread, so it is a published word rather than a plain int. It stands alone – nothing else is ordered against it, and the host is told to re-fetch through the notification path below – so the plain store/load idiom for a single independent value is the whole contract.
Definition at line 106 of file DSParkClap.h.
| int dspark::plugin::clap_backend::Plugin< P >::currentChannels = defaultChannelCount<P>() |
Definition at line 107 of file DSParkClap.h.
| std::atomic<int> dspark::plugin::clap_backend::Plugin< P >::currentProgram { 0 } |
Definition at line 113 of file DSParkClap.h.
| DryDelay dspark::plugin::clap_backend::Plugin< P >::dryDelay |
Definition at line 117 of file DSParkClap.h.
| std::vector<float> dspark::plugin::clap_backend::Plugin< P >::dryL |
Definition at line 115 of file DSParkClap.h.
| std::vector<float> dspark::plugin::clap_backend::Plugin< P >::dryR |
Definition at line 115 of file DSParkClap.h.
| const clap_host_t* dspark::plugin::clap_backend::Plugin< P >::host = nullptr |
Definition at line 91 of file DSParkClap.h.
| const clap_host_latency_t* dspark::plugin::clap_backend::Plugin< P >::hostLatency = nullptr |
Definition at line 92 of file DSParkClap.h.
| const clap_host_params_t* dspark::plugin::clap_backend::Plugin< P >::hostParams = nullptr |
Definition at line 93 of file DSParkClap.h.
| const clap_host_preset_load_t* dspark::plugin::clap_backend::Plugin< P >::hostPresetLoad = nullptr |
Definition at line 94 of file DSParkClap.h.
|
inlinestatic |
Definition at line 773 of file DSParkClap.h.
|
staticconstexpr |
Definition at line 76 of file DSParkClap.h.
|
inlinestatic |
Definition at line 1102 of file DSParkClap.h.
|
inlinestatic |
Definition at line 873 of file DSParkClap.h.
|
staticconstexpr |
Definition at line 75 of file DSParkClap.h.
|
staticconstexpr |
Definition at line 78 of file DSParkClap.h.
|
inlinestatic |
Definition at line 1033 of file DSParkClap.h.
|
inlinestatic |
Definition at line 811 of file DSParkClap.h.
|
inlinestatic |
Definition at line 850 of file DSParkClap.h.
|
inlinestatic |
Definition at line 925 of file DSParkClap.h.
|
inlinestatic |
Definition at line 890 of file DSParkClap.h.
|
inlinestatic |
Definition at line 1092 of file DSParkClap.h.
|
inlinestatic |
Definition at line 1124 of file DSParkClap.h.
| std::atomic<bool> dspark::plugin::clap_backend::Plugin< P >::latencyDirty { false } |
Definition at line 109 of file DSParkClap.h.
| uint32_t dspark::plugin::clap_backend::Plugin< P >::maxFrames = 0 |
Definition at line 98 of file DSParkClap.h.
| bool dspark::plugin::clap_backend::Plugin< P >::offlineRender = false |
Definition at line 108 of file DSParkClap.h.
| clap_plugin_t dspark::plugin::clap_backend::Plugin< P >::plugin {} |
Definition at line 90 of file DSParkClap.h.
| bool dspark::plugin::clap_backend::Plugin< P >::prepared = false |
Definition at line 99 of file DSParkClap.h.
| double dspark::plugin::clap_backend::Plugin< P >::sampleRate = 48000.0 |
Definition at line 97 of file DSParkClap.h.
| std::atomic<double> dspark::plugin::clap_backend::Plugin< P >::shadow[kNumParams==0 ? 1 :kNumParams] {} |
Definition at line 111 of file DSParkClap.h.
| std::vector<float> dspark::plugin::clap_backend::Plugin< P >::silence |
Definition at line 116 of file DSParkClap.h.
| P dspark::plugin::clap_backend::Plugin< P >::user {} |
Definition at line 96 of file DSParkClap.h.