|
MostlyHarmless 0.0.1
|
Interface for the plugin's audio processing functionality. More...
#include <mostlyharmless_IEngine.h>
Public Member Functions | |
| virtual | ~IEngine () noexcept=default |
| virtual void | initialise (InitContext context) noexcept=0 |
| virtual void | process (ProcessContext context) noexcept=0 |
| virtual void | reset () noexcept=0 |
| virtual void | handleNoteOn (std::uint16_t portIndex, std::uint8_t channel, std::uint8_t note, double velocity) |
| virtual void | handleNoteOff (std::uint16_t portIndex, std::uint8_t channel, std::uint8_t note, double velocity) |
| virtual void | handleControlChange (std::uint16_t portIndex, std::uint8_t channel, std::uint8_t controlNumber, std::uint8_t data) |
| virtual void | handleProgramChange (std::uint16_t portIndex, std::uint8_t channel, std::uint8_t programNumber) |
| virtual void | handlePolyAftertouch (std::uint16_t portIndex, std::uint8_t channel, std::uint8_t note, std::uint8_t pressure) |
| virtual void | handleChannelAftertouch (std::uint16_t portIndex, std::uint8_t channel, std::uint8_t pressure) |
| virtual void | handlePitchWheel (std::uint16_t portIndex, std::uint8_t channel, double value) |
Interface for the plugin's audio processing functionality.
As detailed in the FX Plugin tutorial, users must implement this, ISharedState, IPluginEntry, and optionally IEditor, and register their subclasses with the framework to create an audio plugin. These will also be created if using the provided create.py script.
Encapsulates all things audio-thread related, and all functions either run on the audio thread, or are guaranteed not to be called while the audio thread is running.
You probably want your subclass to take a pointer to your subclass of ISharedState, for access to parameters, and the procToGui / guiToProc queues.
|
virtualdefaultnoexcept |
Virtual destructor.
|
inlinevirtual |
Called if the plugin receives a (channel-wide) aftertouch event. In this case, all notes within a channel get the same pressure value. Not pure virtual, as this function isn't relevant if you haven't requested midi functionality. Called on the audio thread, in response to a channel aftertouch event.
| portIndex | The clap port index the event originated from. |
| channel | The midi channel the event was passed to |
| pressure | The pressure applied to this midi note |
|
inlinevirtual |
Called if the plugin receives a midi control change event - not pure virtual, as this function isn't relevant if you haven't requested midi functionality. Called on the audio thread, in response to a control change event. Some of the identifiers here are reserved for special controls (mod wheel etc) - we don't do any handling of this framework side, so have a google if you need this info!
| portIndex | The clap port index the event originated from. |
| channel | The midi channel the event was passed to |
| controlNumber | The midi control that was changed |
| data | The data in the midi message - see the midi spec for interpreting this. |
|
inlinevirtual |
Called if the plugin receives a midi (or clap) note off event - not pure virtual, as this function isn't relevant if you haven't requested midi functionality. Called on the audio thread, in response to a noteOff event.
| portIndex | The clap port index the event originated from. |
| channel | The midi channel the event was passed to |
| note | The 0-127 midi note that was turned off. |
| velocity | The 0-1 velocity of the note event |
|
inlinevirtual |
Called if the plugin receives a midi (or clap) note on event - not pure virtual, as this function isn't relevant if you haven't requested midi functionality. Called on the audio thread, in response to a noteOn event.
| portIndex | The clap port index the event originated from. |
| channel | The midi channel the event was passed to |
| note | The 0-127 midi note that was turned on. |
| velocity | The 0-1 velocity of the note event |
|
inlinevirtual |
Called if the plugin receives a pitch wheel event - not pure virtual, as this function isn't relevant if you haven't requested midi functionality. Called on the audio thread, in response to a pitch wheel event.
| portIndex | The clap port index the event originated from. |
| channel | The midi channel the event was passed to |
| value | The value, between -1.0 and 1.0 |
|
inlinevirtual |
Called if the plugin receives a (polyphonic) aftertouch event (polyphonic in the sense that each note can have its own pressure data). Not pure virtual, as this function isn't relevant if you haven't requested midi functionality. Called on the audio thread, in response to a poly aftertouch event.
| portIndex | The clap port index the event originated from. |
| channel | The midi channel the event was passed to |
| note | The midi note this aftertouch event applies to |
| pressure | The pressure applied to this midi note |
|
inlinevirtual |
Called if the plugin receives a program change event - not pure virtual, as this function isn't relevant if you haven't requested midi functionality. Called on the audio thread, in response to a program change event.
| portIndex | The clap port index the event originated from. |
| channel | The midi channel the event was passed to |
| programNumber | The program number that was set |
|
pure virtualnoexcept |
Called when the host is preparing to play. Any sample-rate-dependent resizing etc should be done here. Will probably not be called on the audio thread, but is guaranteed to not be called concurrently with the audio thread.
| context | An InitContext containing various settings provided by the host. |
|
pure virtualnoexcept |
The main audio callback function - any DSP processing should stem from this function. Called on the audio thread.
| context | A ProcessContext containing a non-owning view into the current buffer region, and an optional for transport info. |
|
pure virtualnoexcept |
Called to cleanup any resources that require cleaning up - use this to clear delay lines / temp buffers, etc etc.