lmms
Cross-platform music production software
Loading...
Searching...
No Matches
lmms::Lv2Instrument Class Reference

#include <Lv2Instrument.h>

Inheritance diagram for lmms::Lv2Instrument:
lmms::Instrument lmms::Lv2ControlBase lmms::Plugin lmms::LinkedModelGroups lmms::Model lmms::JournallingObject lmms::SerializingObject

Signals

void modelChanged ()
Signals inherited from lmms::Model
void dataChanged ()
void dataUnchanged ()
void propertiesChanged ()

Public Member Functions

 Lv2Instrument (InstrumentTrack *instrumentTrackArg, Descriptor::SubPluginFeatures::Key *key)
 ~Lv2Instrument () override
void reload ()
void onSampleRateChanged ()
void saveSettings (QDomDocument &doc, QDomElement &that) override
void loadSettings (const QDomElement &that) override
void loadFile (const QString &file) override
bool hasNoteInput () const override
bool handleMidiEvent (const MidiEvent &event, const TimePos &time=TimePos(), f_cnt_t offset=0) override
void play (SampleFrame *buf) override
gui::PluginView * instantiateView (QWidget *parent) override
 Create a view for the model.
Public Member Functions inherited from lmms::Instrument
 Instrument (InstrumentTrack *_instrument_track, const Descriptor *_descriptor, const Descriptor::SubPluginFeatures::Key *key=nullptr, Flags flags=Flag::NoFlags)
 ~Instrument () override=default
virtual void playNote (NotePlayHandle *, SampleFrame *)
virtual void deleteNotePluginData (NotePlayHandle *_note_to_play)
virtual auto midiPatch () const -> std::optional< MidiPatch >
 For applicable instruments: Provides host with current MIDI bank and program.
virtual auto childModel (std::string_view modelName) -> AutomatableModel *
virtual f_cnt_t beatLen (NotePlayHandle *_n) const
virtual float desiredReleaseTimeMs () const
f_cnt_t desiredReleaseFrames () const
sample_rate_t getSampleRate () const
bool isSingleStreamed () const
bool isMidiBased () const
bool isBendable () const
QString fullDisplayName () const override
virtual bool isFromTrack (const Track *_track) const
InstrumentTrack * instrumentTrack () const
Public Member Functions inherited from lmms::Plugin
 Plugin (const Descriptor *descriptor, Model *parent, const Descriptor::SubPluginFeatures::Key *key=nullptr)
 Constructor of a plugin.
 ~Plugin () override=default
QString displayName () const override
 Return display-name out of sub plugin or descriptor.
const PixmapLoader * logo () const
 Return logo out of sub plugin or descriptor.
Type type () const
 Return plugin type.
const Descriptor * descriptor () const
 Return plugin Descriptor.
const Descriptor::SubPluginFeatures::Key & key () const
gui::PluginView * createView (QWidget *parent)
 Create a view for the model.
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 void setDisplayName (const QString &displayName)
Public Member Functions inherited from lmms::JournallingObject
 JournallingObject ()
 ~JournallingObject () override
jo_id_t id () const
void saveJournallingState (const bool newState)
void restoreJournallingState ()
void addJournalCheckPoint ()
QDomElement saveState (QDomDocument &_doc, QDomElement &_parent) override
void restoreState (const QDomElement &_this) override
bool isJournalling () const
void setJournalling (const bool _sr)
bool testAndSetJournalling (const bool newState)
bool isJournallingStateStackEmpty () const
Public Member Functions inherited from lmms::SerializingObject
 SerializingObject ()
virtual ~SerializingObject ()
void setHook (SerializingObjectHook *_hook)
SerializingObjectHook * hook ()
Public Member Functions inherited from lmms::Lv2ControlBase
void shutdown ()
void init (Model *meAsModel)
const LilvPlugin * getPlugin () const
Lv2Proc * control (std::size_t idx)
const Lv2Proc * control (std::size_t idx) const
bool hasGui () const
void setHasGui (bool val)
Public Member Functions inherited from lmms::LinkedModelGroups
virtual ~LinkedModelGroups ()=default
void linkAllModels ()
void saveSettings (class QDomDocument &doc, class QDomElement &that)
void loadSettings (const class QDomElement &that)

Private Slots

void updatePitchRange ()

Private Member Functions

QString nodeName () const override
void clearRunningNotes ()

Private Attributes

std::array< int, NumKeys > m_runningNotes = {}

Friends

class gui::Lv2InsView

Additional Inherited Members

Public Types inherited from lmms::Instrument
enum class  Flag { NoFlags = 0x00 , IsSingleStreamed = 0x01 , IsMidiBased = 0x02 , IsNotBendable = 0x04 }
using Flags = lmms::Flags<Flag>
Public Types inherited from lmms::Plugin
enum class  Type {
  Instrument , Effect , ImportFilter , ExportFilter ,
  Tool , Library , Other , Undefined = 255
}
using DescriptorList = QList<Descriptor*>
Static Public Member Functions inherited from lmms::Instrument
static Instrument * instantiate (const QString &_plugin_name, InstrumentTrack *_instrument_track, const Plugin::Descriptor::SubPluginFeatures::Key *key, bool keyFromDnd=false)
Static Public Member Functions inherited from lmms::Plugin
static Plugin * instantiateWithKey (const QString &pluginName, Model *parent, const Descriptor::SubPluginFeatures::Key *key, bool keyFromDnd=false)
static Plugin * instantiate (const QString &pluginName, Model *parent, void *data)
Static Public Member Functions inherited from lmms::Lv2ControlBase
static Plugin::Type check (const LilvPlugin *m_plugin, std::vector< PluginIssue > &issues)
Protected Member Functions inherited from lmms::Instrument
void applyFadeIn (SampleFrame *buf, NotePlayHandle *n)
void applyRelease (SampleFrame *buf, const NotePlayHandle *_n)
float computeReleaseTimeMsByFrameCount (f_cnt_t frames) const
Protected Member Functions inherited from lmms::Plugin
void collectErrorForUI (QString errMsg)
Protected Member Functions inherited from lmms::JournallingObject
void changeID (jo_id_t _id)
Protected Member Functions inherited from lmms::Lv2ControlBase
 Lv2ControlBase (class Model *that, const QString &uri)
 Lv2ControlBase (const Lv2ControlBase &)=delete
 ~Lv2ControlBase () override
void reload ()
Lv2ControlBase & operator= (const Lv2ControlBase &)=delete
LinkedModelGroup * getGroup (std::size_t idx) override
const LinkedModelGroup * getGroup (std::size_t idx) const override
void copyModelsFromLmms ()
void copyModelsToLmms () const
 Bring values from all ports to the LMMS core.
void copyBuffersFromLmms (const SampleFrame *buf, f_cnt_t frames)
 Copy buffer passed by LMMS into our ports.
void copyBuffersToLmms (SampleFrame *buf, f_cnt_t frames) const
 Copy our ports into buffers passed by LMMS.
void run (f_cnt_t frames)
 Run the Lv2 plugin instance for.
void saveSettings (QDomDocument &doc, QDomElement &that)
void loadSettings (const QDomElement &that)
void loadFile (const QString &file)
std::size_t controlCount () const
QString nodeName () const
bool hasNoteInput () const
void handleMidiInputEvent (const class MidiEvent &event, const class TimePos &time, f_cnt_t offset)

Constructor & Destructor Documentation

◆ Lv2Instrument()

lmms::Lv2Instrument::Lv2Instrument ( InstrumentTrack * instrumentTrackArg,
Descriptor::SubPluginFeatures::Key * key )

◆ ~Lv2Instrument()

lmms::Lv2Instrument::~Lv2Instrument ( )
override

Member Function Documentation

◆ clearRunningNotes()

void lmms::Lv2Instrument::clearRunningNotes ( )
private

◆ handleMidiEvent()

bool lmms::Lv2Instrument::handleMidiEvent ( const MidiEvent & event,
const TimePos & time = TimePos(),
f_cnt_t offset = 0 )
overridevirtual

Reimplemented from lmms::Instrument.

◆ hasNoteInput()

bool lmms::Lv2Instrument::hasNoteInput ( ) const
inlineoverridevirtual

Reimplemented from lmms::Instrument.

◆ instantiateView()

gui::PluginView * lmms::Lv2Instrument::instantiateView ( QWidget * parent)
overridevirtual

Create a view for the model.

Implements lmms::Plugin.

◆ loadFile()

void lmms::Lv2Instrument::loadFile ( const QString & file)
overridevirtual

Can be called if a file matching supportedFileTypes should be loaded/processed with the help of this plugin

Reimplemented from lmms::Plugin.

◆ loadSettings()

void lmms::Lv2Instrument::loadSettings ( const QDomElement & that)
overridevirtual

◆ modelChanged

void lmms::Lv2Instrument::modelChanged ( )
signal

◆ nodeName()

QString lmms::Lv2Instrument::nodeName ( void ) const
overrideprivatevirtual

◆ onSampleRateChanged()

void lmms::Lv2Instrument::onSampleRateChanged ( )

◆ play()

void lmms::Lv2Instrument::play ( SampleFrame * buf)
overridevirtual

Reimplemented from lmms::Instrument.

◆ reload()

void lmms::Lv2Instrument::reload ( )

◆ saveSettings()

void lmms::Lv2Instrument::saveSettings ( QDomDocument & doc,
QDomElement & that )
overridevirtual

◆ updatePitchRange

void lmms::Lv2Instrument::updatePitchRange ( )
privateslot

◆ gui::Lv2InsView

friend class gui::Lv2InsView
friend

Member Data Documentation

◆ m_runningNotes

std::array<int, NumKeys> lmms::Lv2Instrument::m_runningNotes = {}
private

The documentation for this class was generated from the following files: