|
LMMS
|
#include <Lv2Proc.h>
Classes | |
| struct | StereoPortRef |
Public Member Functions | |
| Lv2Proc (const LilvPlugin *plugin, Model *parent) | |
| ~Lv2Proc () override | |
| void | reload () |
| void | onSampleRateChanged () |
| StereoPortRef & | inPorts () |
| const StereoPortRef & | inPorts () const |
| StereoPortRef & | outPorts () |
| const StereoPortRef & | outPorts () const |
| template<class Functor> | |
| void | foreach_port (const Functor &ftor) |
| template<class Functor> | |
| void | foreach_port (const Functor &ftor) const |
| void | dumpPorts () |
| Debug function to print ports to stdout. | |
| void | copyModelsFromCore () |
| void | copyModelsToCore () |
| Bring values from all ports to the LMMS core. | |
| void | copyBuffersFromCore (const SampleFrame *buf, unsigned firstChan, unsigned num, f_cnt_t frames) |
| void | copyBuffersToCore (SampleFrame *buf, unsigned firstChan, unsigned num, f_cnt_t frames) const |
| void | run (f_cnt_t frames) |
| Run the Lv2 plugin instance for. | |
| void | handleMidiInputEvent (const class MidiEvent &event, const TimePos &time, f_cnt_t offset) |
| class AutomatableModel * | modelAtPort (const QString &uri) |
| std::size_t | controlCount () const |
| bool | hasNoteInput () const |
| Public Member Functions inherited from lmms::LinkedModelGroup | |
| LinkedModelGroup (Model *parent) | |
| void | linkControls (LinkedModelGroup *other) |
| template<class Functor> | |
| void | foreach_model (const Functor &ftor) |
| template<class Functor> | |
| void | foreach_model (const Functor &ftor) const |
| std::size_t | modelNum () const |
| bool | containsModel (const QString &name) const |
| void | removeControl (AutomatableModel *) |
| void | saveValues (class QDomDocument &doc, class QDomElement &that) |
| void | loadValues (const class QDomElement &that) |
| AutomatableModel * | getModel (const std::string &s) |
| void | addModel (class AutomatableModel *model, const QString &name) |
| Register a further model. | |
| bool | eraseModel (const QString &name) |
| Unregister a model, return true if a model was erased. | |
| void | clearModels () |
| Remove all models. | |
| Public Member Functions inherited from lmms::Model | |
| Model (Model *parent, QString displayName=QString(), bool defaultConstructed=false) | |
| ~Model () override=default | |
| bool | isDefaultConstructed () const |
| Model * | parentModel () const |
| virtual QString | displayName () const |
| virtual void | setDisplayName (const QString &displayName) |
| virtual QString | fullDisplayName () const |
Static Public Member Functions | |
| static Plugin::Type | check (const LilvPlugin *plugin, std::vector< PluginIssue > &issues) |
Protected Member Functions | |
| void | initPlugin () |
| Create ports and instance, connect ports, activate plugin. | |
| void | shutdownPlugin () |
| Deactivate instance. | |
Private Member Functions | |
| void | initMOptions () |
| initialize m_options | |
| void | initPluginSpecificFeatures () |
| void | loadFileInternal (const QString &file) |
| load a file in the plugin, but don't do anything in LMMS | |
| void | createPorts () |
| allocate m_ports, fill all with metadata, and assign meaning of ports | |
| void | createPort (std::size_t portNum) |
| fill m_ports[portNum] with metadata | |
| void | connectPort (std::size_t num) |
| connect m_ports[portNum] with Lv2 | |
| void | dumpPort (std::size_t num) |
Static Private Member Functions | |
| static int32_t | defaultEvbufSize () |
| static bool | portIsSideChain (const LilvPlugin *plugin, const LilvPort *port) |
| static bool | portIsOptional (const LilvPlugin *plugin, const LilvPort *port) |
| static AutoLilvNode | uri (const char *uriStr) |
Private Attributes | |
| const LilvPlugin * | m_plugin |
| LilvInstance * | m_instance = nullptr |
| Lv2Features | m_features |
| Lv2Options | m_options |
| std::optional< Lv2Worker > | m_worker |
| Semaphore | m_workLock |
| std::vector< std::unique_ptr< Lv2Ports::PortBase > > | m_ports |
| StereoPortRef | m_inPorts |
| StereoPortRef | m_outPorts |
| Lv2Ports::AtomSeq * | m_midiIn = nullptr |
| Lv2Ports::AtomSeq * | m_midiOut = nullptr |
| std::atomic_flag | m_ringLock = ATOMIC_FLAG_INIT |
| spinlock for the MIDI ringbuffer (for MIDI events going to the plugin) | |
| ringbuffer_t< struct MidiInputEvent > | m_midiInputBuf |
| MIDI ringbuffer (for MIDI events going to the plugin). | |
| ringbuffer_reader_t< struct MidiInputEvent > | m_midiInputReader |
| MIDI ringbuffer reader. | |
| std::map< std::string, AutomatableModel * > | m_connectedModels |
Static Private Attributes | |
| constexpr static const std::size_t | m_maxMidiInputEvents = 1024 |
Friends | |
| class | Lv2ProcSuspender |
Additional Inherited Members | |
| Signals inherited from lmms::LinkedModelGroup | |
| void | modelAdded (lmms::AutomatableModel *added) |
| void | modelRemoved (lmms::AutomatableModel *removed) |
| Signals inherited from lmms::Model | |
| void | dataChanged () |
| void | dataUnchanged () |
| void | propertiesChanged () |
Class representing one Lv2 processor, i.e. one Lv2 handle. For Mono effects, 1 Lv2ControlBase references 2 Lv2Proc.
| lmms::Lv2Proc::Lv2Proc | ( | const LilvPlugin * | plugin, |
| Model * | parent ) |
|
override |
|
static |
|
private |
connect m_ports[portNum] with Lv2
|
inline |
| void lmms::Lv2Proc::copyBuffersFromCore | ( | const SampleFrame * | buf, |
| unsigned | firstChan, | ||
| unsigned | num, | ||
| f_cnt_t | frames ) |
Copy buffer passed by the core into our ports
| buf | buffer of sample frames, each sample frame is something like a float[<number-of-procs> * <channels per proc>] array. |
| firstChan | The offset for buf where we have to read our first channel. This marks the first sample in each sample frame where we read from. If we are the 2nd of 2 mono procs, this can be greater than 0. |
| num | Number of channels we must read from |
| buf | (starting at offset) |
| void lmms::Lv2Proc::copyBuffersToCore | ( | SampleFrame * | buf, |
| unsigned | firstChan, | ||
| unsigned | num, | ||
| f_cnt_t | frames ) const |
Copy our ports into buffers passed by the core
| buf | buffer of sample frames, each sample frame is something like a float[<number-of-procs> * <channels per proc>] array. |
| firstChan | The offset for buf where we have to write our first channel. This marks the first sample in each sample frame where we write to. If we are the 2nd of 2 mono procs, this can be greater than 0. |
| num | Number of channels we must write to |
| buf | (starting at offset) |
| void lmms::Lv2Proc::copyModelsFromCore | ( | ) |
Copy values from the LMMS core (connected models, MIDI events, ...) into the respective ports
| void lmms::Lv2Proc::copyModelsToCore | ( | ) |
Bring values from all ports to the LMMS core.
|
private |
fill m_ports[portNum] with metadata
|
private |
allocate m_ports, fill all with metadata, and assign meaning of ports
|
inlinestaticprivate |
|
private |
| void lmms::Lv2Proc::dumpPorts | ( | ) |
Debug function to print ports to stdout.
| void lmms::Lv2Proc::handleMidiInputEvent | ( | const class MidiEvent & | event, |
| const TimePos & | time, | ||
| f_cnt_t | offset ) |
| bool lmms::Lv2Proc::hasNoteInput | ( | ) | const |
|
private |
initialize m_options
|
protected |
Create ports and instance, connect ports, activate plugin.
|
private |
|
inline |
|
inline |
load a file in the plugin, but don't do anything in LMMS
| AutomatableModel * lmms::Lv2Proc::modelAtPort | ( | const QString & | uri | ) |
| void lmms::Lv2Proc::onSampleRateChanged | ( | ) |
|
inline |
|
inline |
|
staticprivate |
|
staticprivate |
| void lmms::Lv2Proc::reload | ( | ) |
|
protected |
Deactivate instance.
|
staticprivate |
|
friend |
|
private |
models for the controls, sorted by port symbols
|
private |
|
private |
|
private |
|
staticconstexprprivate |
|
private |
|
private |
MIDI ringbuffer (for MIDI events going to the plugin).
|
private |
MIDI ringbuffer reader.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
spinlock for the MIDI ringbuffer (for MIDI events going to the plugin)
|
private |
|
private |