|
lmms
Cross-platform music production software
|
#include <Instrument.h>
Public Types | |
| 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*> |
Public Member Functions | |
| Instrument (InstrumentTrack *_instrument_track, const Descriptor *_descriptor, const Descriptor::SubPluginFeatures::Key *key=nullptr, Flags flags=Flag::NoFlags) | |
| ~Instrument () override=default | |
| virtual bool | hasNoteInput () const |
| virtual void | play (SampleFrame *_working_buffer) |
| 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 |
| virtual bool | handleMidiEvent (const MidiEvent &, const TimePos &=TimePos(), f_cnt_t offset=0) |
| 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 |
| virtual void | loadFile (const QString &file) |
| 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 () |
| virtual QString | nodeName () const =0 |
| void | setHook (SerializingObjectHook *_hook) |
| SerializingObjectHook * | hook () |
Static Public Member Functions | |
| 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) |
Protected Member Functions | |
| 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 | |
| virtual gui::PluginView * | instantiateView (QWidget *)=0 |
| Create a view for the model. | |
| void | collectErrorForUI (QString errMsg) |
| Protected Member Functions inherited from lmms::JournallingObject | |
| void | changeID (jo_id_t _id) |
| Protected Member Functions inherited from lmms::SerializingObject | |
| virtual void | saveSettings (QDomDocument &doc, QDomElement &element)=0 |
| virtual void | loadSettings (const QDomElement &element)=0 |
Private Attributes | |
| InstrumentTrack * | m_instrumentTrack |
| Flags | m_flags |
Additional Inherited Members | |
| Signals inherited from lmms::Model | |
| void | dataChanged () |
| void | dataUnchanged () |
| void | propertiesChanged () |
| using lmms::Instrument::Flags = lmms::Flags<Flag> |
|
strong |
| Enumerator | |
|---|---|
| NoFlags | |
| IsSingleStreamed | |
| IsMidiBased | Instrument provides a single audio stream for all notes |
| IsNotBendable | Instrument is controlled by MIDI events rather than NotePlayHandles |
| lmms::Instrument::Instrument | ( | InstrumentTrack * | _instrument_track, |
| const Descriptor * | _descriptor, | ||
| const Descriptor::SubPluginFeatures::Key * | key = nullptr, | ||
| Flags | flags = Flag::NoFlags ) |
|
overridedefault |
|
protected |
|
protected |
|
virtual |
Reimplemented in lmms::AudioFileProcessor.
|
inlinevirtual |
Called if external source needs to change something but we cannot reference the class header. Should return nullptr if the model is not found.
Reimplemented in lmms::GigInstrument, and lmms::Sf2Instrument.
|
protected |
|
virtual |
Reimplemented in lmms::AudioFileProcessor, lmms::BitInvader, lmms::FreeBoyInstrument, lmms::GigInstrument, lmms::KickerInstrument, lmms::Lb302Synth, lmms::MalletsInstrument, lmms::MonstroInstrument, lmms::NesInstrument, lmms::OrganicInstrument, lmms::PatmanInstrument, lmms::Sf2Instrument, lmms::SfxrInstrument, lmms::SidInstrument, lmms::SlicerT, lmms::TripleOscillator, lmms::Vibed, lmms::WatsynInstrument, and lmms::Xpressive.
|
inline |
|
inlinevirtual |
|
overridevirtual |
Reimplemented from lmms::Model.
| sample_rate_t lmms::Instrument::getSampleRate | ( | ) | const |
|
inlinevirtual |
Reimplemented in lmms::CarlaInstrument, lmms::Lv2Instrument, lmms::OpulenzInstrument, lmms::VestigeInstrument, and lmms::ZynAddSubFxInstrument.
|
inlinevirtual |
Reimplemented in lmms::Lv2Instrument.
|
static |
instantiate instrument-plugin with given name or return NULL on failure
|
inline |
|
inline |
|
virtual |
|
inline |
|
inline |
|
inlinevirtual |
For applicable instruments: Provides host with current MIDI bank and program.
Reimplemented in lmms::GigInstrument, and lmms::Sf2Instrument.
|
virtual |
|
inlinevirtual |
Reimplemented in lmms::AudioFileProcessor, lmms::BitInvader, lmms::DummyInstrument, lmms::FreeBoyInstrument, lmms::GigInstrument, lmms::KickerInstrument, lmms::Lb302Synth, lmms::MalletsInstrument, lmms::MonstroInstrument, lmms::NesInstrument, lmms::OrganicInstrument, lmms::PatmanInstrument, lmms::Sf2Instrument, lmms::SfxrInstrument, lmms::SidInstrument, lmms::SlicerT, lmms::TripleOscillator, lmms::Vibed, lmms::WatsynInstrument, and lmms::Xpressive.
|
private |
|
private |