LMMS
Loading...
Searching...
No Matches
lmms::Effect Class Referenceabstract

#include <Effect.h>

Inheritance diagram for lmms::Effect:
lmms::Plugin lmms::Model lmms::JournallingObject lmms::SerializingObject lmms::AmplifierEffect lmms::Analyzer lmms::BassBoosterEffect lmms::BitcrushEffect lmms::CompressorEffect lmms::CrossoverEQEffect lmms::DelayEffect lmms::DispersionEffect lmms::DualFilterEffect lmms::DummyEffect lmms::DynProcEffect lmms::EqEffect lmms::FlangerEffect lmms::FrequencyShifterEffect lmms::GranularPitchShifterEffect lmms::LOMMEffect lmms::LadspaEffect lmms::Lv2Effect lmms::MultitapEchoEffect lmms::PeakControllerEffect lmms::ReverbSCEffect lmms::SlewDistortion lmms::StereoEnhancerEffect lmms::StereoMatrixEffect lmms::Vectorscope lmms::VstEffect lmms::WaveShaperEffect

Public Member Functions

 Effect (const Plugin::Descriptor *_desc, Model *_parent, const Descriptor::SubPluginFeatures::Key *_key)
void saveSettings (QDomDocument &_doc, QDomElement &_parent) override
void loadSettings (const QDomElement &_this) override
QString nodeName () const override
bool processAudioBuffer (AudioBuffer &inOut)
 Returns true if audio was processed and should continue being processed.
bool isOkay () const
void setOkay (bool _state)
bool isAwake () const
 "Awake" means the effect has not been put to sleep by auto-quit
bool isEnabled () const
f_cnt_t timeout () const
float wetLevel () const
float dryLevel () const
bool dontRun () const
void setDontRun (bool _state)
bool isProcessingAudio () const
TempoSyncKnobModelautoQuitModel ()
bool autoQuitEnabled () const
EffectChaineffectChain () const
virtual EffectControlscontrols ()=0
Public Member Functions inherited from lmms::Plugin
 Plugin (const Descriptor *descriptor, Model *parent, const Descriptor::SubPluginFeatures::Key *key=nullptr)
 ~Plugin () override=default
QString displayName () const override
 Return display-name out of sub plugin or descriptor.
const PixmapLoaderlogo () const
 Return logo out of sub plugin or descriptor.
Type type () const
 Return plugin type.
const Descriptordescriptor () const
 Return plugin Descriptor.
const Descriptor::SubPluginFeatures::Keykey () const
virtual void loadFile (const QString &file)
virtual AutomatableModelchildModel (const QString &modelName)
gui::PluginViewcreateView (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
ModelparentModel () const
virtual void setDisplayName (const QString &displayName)
virtual QString fullDisplayName () const
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)
SerializingObjectHookhook ()

Static Public Member Functions

static Effectinstantiate (const QString &_plugin_name, Model *_parent, Descriptor::SubPluginFeatures::Key *_key)
Static Public Member Functions inherited from lmms::Plugin
static PlugininstantiateWithKey (const QString &pluginName, Model *parent, const Descriptor::SubPluginFeatures::Key *key, bool keyFromDnd=false)
static Plugininstantiate (const QString &pluginName, Model *parent, void *data)

Protected Types

enum class  ProcessStatus { Continue , ContinueIfNotQuiet , Sleep }

Protected Member Functions

virtual ProcessStatus processImpl (SampleFrame *buf, const f_cnt_t frames)=0
virtual void processBypassedImpl ()
gui::PluginViewinstantiateView (QWidget *) override
 Create a view for the model.
void goToSleep ()
void wakeUp ()
virtual void onEnabledChanged ()
Protected Member Functions inherited from lmms::Plugin
void collectErrorForUI (QString errMsg)
Protected Member Functions inherited from lmms::JournallingObject
void changeID (jo_id_t _id)

Private Member Functions

void handleAutoQuit (bool silentOutput)

Private Attributes

EffectChainm_parent
bool m_okay
bool m_noRun
bool m_awake
f_cnt_t m_quietBufferCount = 0
 The number of consecutive periods where output buffers remain below the silence threshold.
BoolModel m_enabledModel
FloatModel m_wetDryModel
TempoSyncKnobModel m_autoQuitModel
bool m_autoQuitEnabled = false

Friends

class gui::EffectView
class EffectChain

Additional Inherited Members

Public Types inherited from lmms::Plugin
enum class  Type {
  Instrument , Effect , ImportFilter , ExportFilter ,
  Tool , Library , Other , Undefined = 255
}
using DescriptorList = QList<Descriptor*>
Signals inherited from lmms::Model
void dataChanged ()
void dataUnchanged ()
void propertiesChanged ()

Member Enumeration Documentation

◆ ProcessStatus

enum class lmms::Effect::ProcessStatus
strongprotected
Enumerator
Continue 

Unconditionally continue processing.

ContinueIfNotQuiet 

Calculate the RMS out sum and call checkGate to determine whether to stop processing.

Sleep 

Do not continue processing.

Constructor & Destructor Documentation

◆ Effect()

Effect::Effect ( const Plugin::Descriptor * _desc,
Model * _parent,
const Descriptor::SubPluginFeatures::Key * _key )

Member Function Documentation

◆ autoQuitEnabled()

bool lmms::Effect::autoQuitEnabled ( ) const
inline

◆ autoQuitModel()

TempoSyncKnobModel * lmms::Effect::autoQuitModel ( )
inline

◆ controls()

◆ dontRun()

bool lmms::Effect::dontRun ( ) const
inline

◆ dryLevel()

float lmms::Effect::dryLevel ( ) const
inline

◆ effectChain()

EffectChain * lmms::Effect::effectChain ( ) const
inline

◆ goToSleep()

void lmms::Effect::goToSleep ( )
inlineprotected

◆ handleAutoQuit()

void Effect::handleAutoQuit ( bool silentOutput)
private

If auto-quit is enabled ("Keep effects running even without input" setting is disabled), after "decay" ms of the output buffer remaining below the silence threshold, the effect is turned off and won't be processed again until it receives new audio input.

◆ instantiate()

Effect * Effect::instantiate ( const QString & _plugin_name,
Model * _parent,
Descriptor::SubPluginFeatures::Key * _key )
static

◆ instantiateView()

gui::PluginView * Effect::instantiateView ( QWidget * )
overrideprotectedvirtual

Create a view for the model.

Implements lmms::Plugin.

◆ isAwake()

bool lmms::Effect::isAwake ( ) const
inline

"Awake" means the effect has not been put to sleep by auto-quit

◆ isEnabled()

bool lmms::Effect::isEnabled ( ) const
inline

◆ isOkay()

bool lmms::Effect::isOkay ( ) const
inline

◆ isProcessingAudio()

bool lmms::Effect::isProcessingAudio ( ) const
inline

◆ loadSettings()

void Effect::loadSettings ( const QDomElement & _this)
overridevirtual

◆ nodeName()

QString lmms::Effect::nodeName ( void ) const
inlineoverridevirtual

◆ onEnabledChanged()

virtual void lmms::Effect::onEnabledChanged ( )
inlineprotectedvirtual

Reimplemented in lmms::DualFilterEffect.

◆ processAudioBuffer()

bool Effect::processAudioBuffer ( AudioBuffer & inOut)

Returns true if audio was processed and should continue being processed.

◆ processBypassedImpl()

virtual void lmms::Effect::processBypassedImpl ( )
inlineprotectedvirtual

Optional method that runs instead of processImpl when an effect is awake but not running.

Reimplemented in lmms::CompressorEffect, lmms::DynProcEffect, and lmms::StereoEnhancerEffect.

◆ processImpl()

◆ saveSettings()

void Effect::saveSettings ( QDomDocument & _doc,
QDomElement & _parent )
overridevirtual

◆ setDontRun()

void lmms::Effect::setDontRun ( bool _state)
inline

◆ setOkay()

void lmms::Effect::setOkay ( bool _state)
inline

◆ timeout()

f_cnt_t lmms::Effect::timeout ( ) const
inline

◆ wakeUp()

void lmms::Effect::wakeUp ( )
inlineprotected

◆ wetLevel()

float lmms::Effect::wetLevel ( ) const
inline

◆ EffectChain

friend class EffectChain
friend

◆ gui::EffectView

friend class gui::EffectView
friend

Member Data Documentation

◆ m_autoQuitEnabled

bool lmms::Effect::m_autoQuitEnabled = false
private

◆ m_autoQuitModel

TempoSyncKnobModel lmms::Effect::m_autoQuitModel
private

◆ m_awake

bool lmms::Effect::m_awake
private

◆ m_enabledModel

BoolModel lmms::Effect::m_enabledModel
private

◆ m_noRun

bool lmms::Effect::m_noRun
private

◆ m_okay

bool lmms::Effect::m_okay
private

◆ m_parent

EffectChain* lmms::Effect::m_parent
private

◆ m_quietBufferCount

f_cnt_t lmms::Effect::m_quietBufferCount = 0
private

The number of consecutive periods where output buffers remain below the silence threshold.

◆ m_wetDryModel

FloatModel lmms::Effect::m_wetDryModel
private

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