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

#include <SlewDistortion.h>

Inheritance diagram for lmms::SlewDistortion:
lmms::Effect lmms::Plugin lmms::Model lmms::JournallingObject lmms::SerializingObject

Public Member Functions

 SlewDistortion (Model *parent, const Descriptor::SubPluginFeatures::Key *key)
 ~SlewDistortion () override=default
ProcessStatus processImpl (SampleFrame *buf, const f_cnt_t frames) override
EffectControls * controls () override
float msToCoeff (float ms)
Public Member Functions inherited from lmms::Effect
 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 isCorrupted () const
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
TempoSyncKnobModel * autoQuitModel ()
bool autoQuitEnabled () const
EffectChain * effectChain () 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)
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)
SerializingObjectHook * hook ()

Private Slots

void changeSampleRate ()

Private Attributes

std::array< float, 4 > m_inPeakDisplay = {0}
std::array< float, 4 > m_slewOut = {0}
std::array< float, 4 > m_dcOffset = {0}
std::array< float, 4 > m_inEnv = {0}
std::array< float, 4 > m_outEnv = {0}
std::array< float, 4 > m_outPeakDisplay = {0}
std::array< std::array< float, 1<< SLEWDIST_MAX_OVERSAMPLE_STAGES >, 2 > m_overOuts = {}
float m_sampleRate = 44100.f
int m_oldOversampleVal = -1
float m_coeffPrecalc = 0
float m_dcCoeff = 0
float m_biasInterpCoef = 0
float m_trueBias1 = 0
float m_trueBias2 = 0
std::array< Upsampler< SLEWDIST_MAX_OVERSAMPLE_STAGES >, 2 > m_upsampler
std::array< Downsampler< SLEWDIST_MAX_OVERSAMPLE_STAGES >, 2 > m_downsampler
StereoLinkwitzRiley m_lp
StereoLinkwitzRiley m_hp
SlewDistortionControls m_slewdistortionControls

Friends

class SlewDistortionControls
class gui::SlewDistortionControlDialog

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 ()
Static Public Member Functions inherited from lmms::Effect
static Effect * instantiate (const QString &_plugin_name, Model *_parent, Descriptor::SubPluginFeatures::Key *_key)
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 Types inherited from lmms::Effect
enum class  ProcessStatus { Continue , ContinueIfNotQuiet , Sleep }
Protected Member Functions inherited from lmms::Effect
virtual void processBypassedImpl ()
gui::PluginView * instantiateView (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)

Constructor & Destructor Documentation

◆ SlewDistortion()

lmms::SlewDistortion::SlewDistortion ( Model * parent,
const Descriptor::SubPluginFeatures::Key * key )

◆ ~SlewDistortion()

lmms::SlewDistortion::~SlewDistortion ( )
overridedefault

Member Function Documentation

◆ changeSampleRate

void lmms::SlewDistortion::changeSampleRate ( )
privateslot

◆ controls()

EffectControls * lmms::SlewDistortion::controls ( )
inlineoverridevirtual

Implements lmms::Effect.

◆ msToCoeff()

float lmms::SlewDistortion::msToCoeff ( float ms)
inline

◆ processImpl()

Effect::ProcessStatus lmms::SlewDistortion::processImpl ( SampleFrame * buf,
const f_cnt_t frames )
overridevirtual

The main audio processing method that runs when plugin is awake and running

Implements lmms::Effect.

◆ gui::SlewDistortionControlDialog

friend class gui::SlewDistortionControlDialog
friend

◆ SlewDistortionControls

friend class SlewDistortionControls
friend

Member Data Documentation

◆ m_biasInterpCoef

float lmms::SlewDistortion::m_biasInterpCoef = 0
private

◆ m_coeffPrecalc

float lmms::SlewDistortion::m_coeffPrecalc = 0
private

◆ m_dcCoeff

float lmms::SlewDistortion::m_dcCoeff = 0
private

◆ m_dcOffset

std::array<float, 4> lmms::SlewDistortion::m_dcOffset = {0}
private

◆ m_downsampler

std::array<Downsampler<SLEWDIST_MAX_OVERSAMPLE_STAGES>, 2> lmms::SlewDistortion::m_downsampler
private

◆ m_hp

StereoLinkwitzRiley lmms::SlewDistortion::m_hp
private

◆ m_inEnv

std::array<float, 4> lmms::SlewDistortion::m_inEnv = {0}
private

◆ m_inPeakDisplay

std::array<float, 4> lmms::SlewDistortion::m_inPeakDisplay = {0}
private

◆ m_lp

StereoLinkwitzRiley lmms::SlewDistortion::m_lp
private

◆ m_oldOversampleVal

int lmms::SlewDistortion::m_oldOversampleVal = -1
private

◆ m_outEnv

std::array<float, 4> lmms::SlewDistortion::m_outEnv = {0}
private

◆ m_outPeakDisplay

std::array<float, 4> lmms::SlewDistortion::m_outPeakDisplay = {0}
private

◆ m_overOuts

std::array<std::array<float, 1 << SLEWDIST_MAX_OVERSAMPLE_STAGES>, 2> lmms::SlewDistortion::m_overOuts = {}
private

◆ m_sampleRate

float lmms::SlewDistortion::m_sampleRate = 44100.f
private

◆ m_slewdistortionControls

SlewDistortionControls lmms::SlewDistortion::m_slewdistortionControls
private

◆ m_slewOut

std::array<float, 4> lmms::SlewDistortion::m_slewOut = {0}
private

◆ m_trueBias1

float lmms::SlewDistortion::m_trueBias1 = 0
private

◆ m_trueBias2

float lmms::SlewDistortion::m_trueBias2 = 0
private

◆ m_upsampler

std::array<Upsampler<SLEWDIST_MAX_OVERSAMPLE_STAGES>, 2> lmms::SlewDistortion::m_upsampler
private

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