The top-level namespace, contains all things plugin-related. More...
Namespaces | |
namespace | audio |
Contains audio helpers and utilities. | |
namespace | core |
Contains core functionality of the framework. | |
namespace | events |
Contains classes and functions related to events. | |
namespace | gui |
Contains GUI related classes & functions. | |
namespace | internal |
namespace | utils |
Contains general purpose utility classes & functions. | |
Classes | |
struct | LoopInfo |
Convenience struct holding relevant positional info about a loop the host may currently be running. More... | |
struct | Parameter |
Container class for a single parameter. More... | |
struct | ParameterID |
Convenience class for generating a parameter id. More... | |
struct | TimeSignature |
Convenience struct holding the numerator and denominator of a time signature. Two ints in a trenchcoat. More... | |
struct | TransportState |
Contains info from the host about the current transport state. More... | |
Enumerations | |
enum class | BusConfig { InputOutput , InputOnly , OutputOnly , None } |
Represents available IO configs, for both audio and midi. More... | |
Functions | |
clap_plugin_descriptor & | getDescriptor () |
BusConfig | getAudioBusConfig () noexcept |
BusConfig | getNoteBusConfig () noexcept |
template<marvin::FloatType SampleType> | |
void | runBlockDispatch (marvin::containers::BufferView< SampleType > buffer, mostly_harmless::events::InputEventContext eventContext, std::function< void(const clap_event_header *event)> &&eventCallback, std::function< void(marvin::containers::BufferView< SampleType >)> &&blockCallback) |
Splits an input buffer into chunks and dispatches them, allowing for block based processing. | |
The top-level namespace, contains all things plugin-related.
|
strong |
|
nodiscardnoexcept |
Retrieves the current mostly_harmless::BusConfig in use for audio io.
|
nodiscard |
Retrieve the currently set clap_plugin_descriptor details. This is populated via the mostly_harmless_add_plugin cmake function.
|
nodiscardnoexcept |
Retrieves the current mostly_harmless::BusConfig in use for midi io.
void mostly_harmless::runBlockDispatch | ( | marvin::containers::BufferView< SampleType > | buffer, |
mostly_harmless::events::InputEventContext | eventContext, | ||
std::function< void(const clap_event_header *event)> && | eventCallback, | ||
std::function< void(marvin::containers::BufferView< SampleType >)> && | blockCallback ) |
Splits an input buffer into chunks and dispatches them, allowing for block based processing.
As parameter and note events are sample accurate, and passed via a single queue, naively doing block based processing with the entire input buffer would mean only having one param / note update event per block. To get around this, this function handles chunking the audio between events, and calling some process function with that chunk. For example:
buffer | The entire buffer for this block |
eventCallback | The input event queue for this block. |
eventCallback | A callback to invoke on a new event. |
blockCallback | A callback to invoke on a new chunk. |