|
LMMS
|
#include <AutomatableModel.h>
Classes | |
| struct | DCastVisitor |
| struct | ConstDCastVisitor |
Public Types | |
| enum class | ScaleType { Linear , Logarithmic , Decibel } |
Public Slots | |
| virtual void | reset () |
| void | unlink () |
| void | unlinkControllerConnection () |
| void | setUseControllerValue (bool b=true) |
Signals | |
| void | initValueChanged (float val) |
| void | destroyed (lmms::jo_id_t id) |
| Signals inherited from lmms::Model | |
| void | dataChanged () |
| void | dataUnchanged () |
| void | propertiesChanged () |
Public Member Functions | |
| ~AutomatableModel () override | |
| virtual void | accept (ModelVisitor &v)=0 |
| virtual void | accept (ConstModelVisitor &v) const =0 |
| template<class Target> | |
| Target * | dynamicCast (bool doThrow=false) |
| Return this class casted to Target. | |
| template<class Target> | |
| const Target * | dynamicCast (bool doThrow=false) const |
| const overload, see overloaded function | |
| bool | isAutomated () const |
| bool | isAutomatedOrControlled () const |
| ControllerConnection * | controllerConnection () const |
| void | setControllerConnection (ControllerConnection *c) |
| template<class T> | |
| T | value (int frameOffset=0) const |
| float | controllerValue (int frameOffset) const |
| ValueBuffer * | valueBuffer () |
| Function that returns sample-exact data as a ValueBuffer. | |
| template<class T> | |
| T | initValue () const |
| bool | isAtInitValue () const |
| template<class T> | |
| T | minValue () const |
| template<class T> | |
| T | maxValue () const |
| template<class T> | |
| T | step () const |
| float | scaledValue (float value) const |
| Returns value scaled with the scale type and min/max values of this model. | |
| float | inverseScaledValue (float value) const |
| Returns value applied with the inverse of this model's scale type. | |
| void | setInitValue (const float value) |
| void | setValue (const float value, const bool isAutomated=false) |
| void | incValue (int steps) |
| float | range () const |
| void | setRange (const float min, const float max, const float step=1) |
| void | setScaleType (ScaleType sc) |
| void | setScaleLogarithmic (bool setToTrue=true) |
| bool | isScaleLogarithmic () const |
| void | setStep (const float step) |
| float | centerValue () const |
| void | setCenterValue (const float centerVal) |
| void | linkToModel (AutomatableModel *model) |
link this to model, copying the value from model | |
| size_t | countLinks () const |
| virtual void | saveSettings (QDomDocument &doc, QDomElement &element, const QString &name) |
| Saves settings (value, automation links and controller connections) of AutomatableModel into specified DOM element using <name> as attribute/node name. | |
| virtual void | loadSettings (const QDomElement &element, const QString &name) |
| Loads settings (value, automation links and controller connections) of AutomatableModel from specified DOM element using <name> as attribute/node name. | |
| QString | nodeName () const override |
| virtual QString | displayValue (const float val) const =0 |
| bool | isLinked () const |
| bool | isValueChanged () |
| float | globalAutomationValueAt (const TimePos &time) |
| void | setStrictStepSize (const bool b) |
| bool | useControllerValue () const |
| 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 |
| 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 () |
Static Public Member Functions | |
| template<class T> | |
| static T | castValue (const float v) |
| template<bool> | |
| static bool | castValue (const float v) |
| static void | incrementPeriodCounter () |
| static void | resetPeriodCounter () |
Protected Member Functions | |
| AutomatableModel (const float val=0, const float min=0, const float max=0, const float step=0, Model *parent=nullptr, const QString &displayName=QString(), bool defaultConstructed=false) | |
| float | fittedValue (float value) const |
| Protected Member Functions inherited from lmms::JournallingObject | |
| void | changeID (jo_id_t _id) |
Private Member Functions | |
| void | saveSettings (QDomDocument &doc, QDomElement &element) override |
| void | loadSettings (const QDomElement &element) override |
| void | setValueInternal (const float value) |
| AutomatableModel * | getLastLinkedModel () const |
| bool | isLinkedToModel (AutomatableModel *model) const |
| template<class T> | |
| T | logToLinearScale (T value) const |
| Scales @value from linear to logarithmic. Value should be within [0,1]. | |
| template<class T> | |
| void | roundAt (T &value, const T &where) const |
Static Private Member Functions | |
| static bool | mustQuoteName (const QString &name) |
Private Attributes | |
| ScaleType | m_scaleType |
| scale type, linear by default | |
| float | m_value |
| float | m_initValue |
| float | m_minValue |
| float | m_maxValue |
| float | m_step |
| float | m_range |
| float | m_centerValue |
| bool | m_valueChanged |
| float | m_oldValue |
| used by valueBuffer for interpolation | |
| bool | m_hasStrictStepSize |
| AutomatableModel * | m_nextLink |
| ControllerConnection * | m_controllerConnection |
| NULL if not appended to controller, otherwise connection info. | |
| ValueBuffer | m_valueBuffer |
| long | m_lastUpdatedPeriod |
| bool | m_hasSampleExactData |
| QMutex | m_valueBufferMutex |
| bool | m_useControllerValue |
Static Private Attributes | |
| static long | s_periodCounter = 0 |
|
strong |
|
override |
|
protected |
|
pure virtual |
|
pure virtual |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inline |
| float lmms::AutomatableModel::controllerValue | ( | int | frameOffset | ) | const |
| size_t lmms::AutomatableModel::countLinks | ( | ) | const |
|
signal |
|
pure virtual |
Implemented in lmms::BoolModel, lmms::FloatModel, and lmms::IntModel.
|
inline |
Return this class casted to Target.
| doThrow | throw an assertion if the cast fails, instead of returning a nullptr |
|
inline |
const overload, see overloaded function
|
protected |
|
private |
linking is stored in a linked list ring
|
inlinestatic |
|
inline |
|
signal |
| float lmms::AutomatableModel::inverseScaledValue | ( | float | value | ) | const |
Returns value applied with the inverse of this model's scale type.
|
inline |
| bool lmms::AutomatableModel::isAutomated | ( | ) | const |
|
inline |
|
inline |
|
private |
|
inline |
|
inline |
| void lmms::AutomatableModel::linkToModel | ( | AutomatableModel * | model | ) |
link this to model, copying the value from model
|
inlineoverrideprivatevirtual |
Implements lmms::SerializingObject.
Reimplemented in lmms::InlineAutomation.
|
virtual |
Loads settings (value, automation links and controller connections) of AutomatableModel from specified DOM element using <name> as attribute/node name.
Reimplemented in lmms::CarlaParamFloatModel, lmms::SfxrNegPosOneFloatModel, lmms::SfxrZeroToOneFloatModel, and lmms::TempoSyncKnobModel.
|
private |
Scales @value from linear to logarithmic. Value should be within [0,1].
|
inline |
|
inline |
|
staticprivate |
|
inlineoverridevirtual |
Implements lmms::SerializingObject.
Reimplemented in lmms::DetuningHelper.
|
inline |
|
virtualslot |
|
inlinestatic |
rounds value to where if it is close to it
| value | will be modified to rounded value |
|
inlineoverrideprivatevirtual |
Implements lmms::SerializingObject.
Reimplemented in lmms::InlineAutomation.
|
virtual |
Saves settings (value, automation links and controller connections) of AutomatableModel into specified DOM element using <name> as attribute/node name.
| doc | TODO |
| element | Where this option shall be saved. Depending on the model, this can be done in an attribute or in a subnode. |
| name | Name to store this model as. |
Reimplemented in lmms::CarlaParamFloatModel, and lmms::TempoSyncKnobModel.
| float lmms::AutomatableModel::scaledValue | ( | float | value | ) | const |
Returns value scaled with the scale type and min/max values of this model.
| void lmms::AutomatableModel::setControllerConnection | ( | ControllerConnection * | c | ) |
|
inline |
|
slot |
|
slot |
|
inline |
|
inline |
| ValueBuffer * lmms::AutomatableModel::valueBuffer | ( | ) |
Function that returns sample-exact data as a ValueBuffer.
|
private |
|
private |
NULL if not appended to controller, otherwise connection info.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
an AutomatableModel can be linked together with others in a linked list the list has no end, the last model is connected to the first forming a ring
|
private |
used by valueBuffer for interpolation
|
private |
|
private |
scale type, linear by default
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |