TracktionEngine
Public Member Functions | List of all members
tracktion::engine::DiscreteLabelledParameter Struct Reference
Inheritance diagram for tracktion::engine::DiscreteLabelledParameter:

Public Member Functions

 DiscreteLabelledParameter (const juce::String &xmlTag, const juce::String &name, AutomatableEditItem &owner, juce::Range< float > valueRangeToUse, int numStatesToUse=0, juce::StringArray labelsToUse={})
 
 ~DiscreteLabelledParameter () override
 
bool isDiscrete () const override
 
int getNumberOfStates () const override
 
float getValueForState (int i) const override
 
int getStateForValue (float value) const override
 
bool hasLabels () const override
 
juce::StringArray getAllLabels () const override
 
juce::String getLabelForValue (float val) const override
 
float snapToState (float val) const override
 
- Public Member Functions inherited from tracktion::engine::AutomatableParameter
 AutomatableParameter (const juce::String &paramID, const juce::String &name, AutomatableEditItem &, juce::NormalisableRange< float > valueRange)
 
 ~AutomatableParameter () override
 
juce::Range< float > getValueRange () const
 
PlugingetPlugin () const
 
EnginegetEngine () const noexcept
 
EditgetEdit () const noexcept
 
TrackgetTrack () const noexcept
 
AutomationCurvegetCurve () const noexcept
 
void attachToCurrentValue (juce::CachedValue< float > &)
 
void attachToCurrentValue (juce::CachedValue< int > &)
 
void attachToCurrentValue (juce::CachedValue< bool > &)
 
void updateFromAttachedValue ()
 
void detachFromCurrentValue ()
 
virtual juce::String getParameterName () const
 
virtual juce::String getParameterShortName (int) const
 
virtual juce::String getLabel ()
 
virtual juce::String getPluginAndParamName () const
 
virtual juce::String getFullName () const
 
SelectablegetOwnerSelectable () const
 Returns the thing that you'd select if you wanted to show this param. More...
 
EditItemID getOwnerID () const
 Returns the thing that you'd select if you wanted to show this param. More...
 
float getCurrentValue () const noexcept
 
float getCurrentNormalisedValue () const noexcept
 
virtual juce::String valueToString (float value)
 
virtual float stringToValue (const juce::String &s)
 
virtual juce::String getCurrentValueAsString ()
 
juce::String getCurrentValueAsStringWithLabel ()
 
virtual void beginParameterChangeGesture ()
 
virtual void endParameterChangeGesture ()
 
void setParameter (float value, juce::NotificationType)
 
void setNormalisedParameter (float value, juce::NotificationType)
 
void updateToFollowCurve (TimePosition)
 
void parameterChangeGestureBegin ()
 Call to indicate this parameter is about to be changed. More...
 
void parameterChangeGestureEnd ()
 Call to indicate this parameter has stopped being to be changed. More...
 
bool hasAutomationPoints () const noexcept
 
ModifierAssignment::Ptr addModifier (ModifierSource &, float value=1.0f, float offset=0.0f, float curve=0.5f)
 Creates an assignment for a given source. More...
 
void removeModifier (ModifierAssignment &)
 Removes an assignment. More...
 
void removeModifier (ModifierSource &)
 Removes assignments for a ModifierSource. More...
 
bool hasActiveModifierAssignments () const
 Returns true if any ModifierSources are currently in use by assignments. More...
 
juce::ReferenceCountedArray< ModifierAssignmentgetAssignments () const
 Returns all the current ModifierAssignments. More...
 
juce::Array< ModifierSource * > getModifiers () const
 Returns all the current ModifierSources currently in use by assignments. More...
 
float getCurrentExplicitValue () const
 This is the value that has been set explicity, either by calling setParameter or the plugin telling us one if its parameters has changed. More...
 
float getCurrentBaseValue () const
 This is the current base value of the parameter i.e. More...
 
float getCurrentModifierValue () const
 This is the ammount of the modifier that has been applied to the base value to give the current parameter value. More...
 
bool isAutomationActive () const
 Returns true if the parameter is being dynamically changed somehow, either through automation or a ModifierAssignment. More...
 
void updateStream ()
 Forces the parameter to update its automation stream for reading automation. More...
 
void updateFromAutomationSources (TimePosition)
 Updates the parameter and modifier values from its current automation sources. More...
 
virtual bool isParameterActive () const
 
virtual std::optional< float > getDefaultValue () const
 
bool isCurrentlyRecording () const
 true if the parameter been moved while in an automation record mode. More...
 
void resetRecordingStatus ()
 this is called before and after playback or recording. More...
 
void midiControllerMoved (float newPosition)
 
void midiControllerPressed ()
 
void curveHasChanged ()
 
juce::String getSelectableDescription () override
 Subclasses must return a description of what they are. More...
 
void addListener (Listener *l)
 
void removeListener (Listener *l)
 
- Public Member Functions inherited from tracktion::engine::Selectable
 Selectable ()
 
virtual ~Selectable ()
 
virtual void selectionStatusChanged (bool isNowSelected)
 Can be overridden to tell this object that it has just been selected or deselected. More...
 
virtual void changed ()
 This should be called to send a change notification to any SelectableListeners that are registered with this object. More...
 
virtual void selectableAboutToBeDeleted ()
 Called just before the selectable is about to be deleted so any subclasses should still be valid at this point. More...
 
void addSelectableListener (SelectableListener *)
 
void removeSelectableListener (SelectableListener *)
 
void cancelAnyPendingUpdates ()
 If changed() has been called, this will cancel any pending async change notificaions. More...
 
void deselect ()
 
void propertiesChanged ()
 
void notifyListenersOfDeletion ()
 
WeakRef getWeakRef ()
 

Additional Inherited Members

- Public Types inherited from tracktion::engine::AutomatableParameter
using Ptr = juce::ReferenceCountedObjectPtr< AutomatableParameter >
 
using Array = juce::ReferenceCountedArray< AutomatableParameter >
 
- Public Types inherited from tracktion::engine::Selectable
using WeakRef = juce::WeakReference< Selectable >
 
- Static Public Member Functions inherited from tracktion::engine::Selectable
static void initialise ()
 
static bool isSelectableValid (const Selectable *) noexcept
 checks whether this object has been deleted. More...
 
- Public Attributes inherited from tracktion::engine::AutomatableParameter
const juce::String paramID
 
const juce::NormalisableRange< float > valueRange
 
AutomatableEditItemautomatableEditElement
 
std::function< juce::String(float)> valueToStringFunction
 
std::function< float(const juce::String &)> stringToValueFunction
 
const juce::String paramName
 
juce::ValueTree parentState
 
- Public Attributes inherited from tracktion::engine::Selectable
WeakRef::Master masterReference
 
- Protected Member Functions inherited from tracktion::engine::AutomatableParameter
AutomationSourceList & getAutomationSourceList () const
 
void setParameterValue (float value, bool isFollowingCurve)
 
void valueTreePropertyChanged (juce::ValueTree &, const juce::Identifier &) override
 
void valueTreeChildAdded (juce::ValueTree &, juce::ValueTree &) override
 
void valueTreeChildRemoved (juce::ValueTree &, juce::ValueTree &, int) override
 
void valueTreeChildOrderChanged (juce::ValueTree &, int, int) override
 
void valueTreeParentChanged (juce::ValueTree &) override
 
void valueTreeRedirected (juce::ValueTree &) override
 
virtual void parameterChanged (float, bool)
 
- Protected Attributes inherited from tracktion::engine::AutomatableParameter
std::unique_ptr< AttachedValue > attachedValue
 
juce::ListenerList< Listenerlisteners
 
juce::WeakReference< SelectableeditRef
 
Pluginplugin = nullptr
 
ModifiermodifierOwner = nullptr
 
MacroParameterListmacroOwner = nullptr
 
std::unique_ptr< AutomationCurveSource > curveSource
 
std::atomic< float > currentValue { 0.0f }
 
std::atomic< float > currentParameterValue { 0.0f }
 
std::atomic< float > currentBaseValue { 0.0f }
 
std::atomic< float > currentModifierValue { 0.0f }
 
std::atomic< bool > isRecording { false }
 
bool updateParametersRecursionCheck = false
 
juce::ValueTree modifiersState
 
std::unique_ptr< AutomationSourceList > automationSourceList
 

Constructor & Destructor Documentation

◆ DiscreteLabelledParameter()

tracktion::engine::DiscreteLabelledParameter::DiscreteLabelledParameter ( const juce::String &  xmlTag,
const juce::String &  name,
AutomatableEditItem owner,
juce::Range< float >  valueRangeToUse,
int  numStatesToUse = 0,
juce::StringArray  labelsToUse = {} 
)

◆ ~DiscreteLabelledParameter()

tracktion::engine::DiscreteLabelledParameter::~DiscreteLabelledParameter ( )
override

Member Function Documentation

◆ isDiscrete()

bool tracktion::engine::DiscreteLabelledParameter::isDiscrete ( ) const
overridevirtual

◆ getNumberOfStates()

int tracktion::engine::DiscreteLabelledParameter::getNumberOfStates ( ) const
overridevirtual

◆ getValueForState()

float tracktion::engine::DiscreteLabelledParameter::getValueForState ( int  i) const
overridevirtual

◆ getStateForValue()

int tracktion::engine::DiscreteLabelledParameter::getStateForValue ( float  value) const
overridevirtual

◆ hasLabels()

bool tracktion::engine::DiscreteLabelledParameter::hasLabels ( ) const
overridevirtual

◆ getAllLabels()

juce::StringArray tracktion::engine::DiscreteLabelledParameter::getAllLabels ( ) const
overridevirtual

◆ getLabelForValue()

juce::String tracktion::engine::DiscreteLabelledParameter::getLabelForValue ( float  val) const
overridevirtual

◆ snapToState()

float tracktion::engine::DiscreteLabelledParameter::snapToState ( float  val) const
overridevirtual

The documentation for this struct was generated from the following file: