tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Member Functions | List of all members
tracktion::engine::DiscreteLabelledParameter Struct Reference
Inheritance diagram for tracktion::engine::DiscreteLabelledParameter:
tracktion::engine::AutomatableParameter juce::ReferenceCountedObject tracktion::engine::Selectable juce::ValueTree::Listener

Public Member Functions

 DiscreteLabelledParameter (const juce::String &xmlTag, const juce::String &name, AutomatableEditItem &owner, juce::Range< float > valueRangeToUse, int numStatesToUse=0, juce::StringArray labelsToUse={})
 
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)
 
juce::Range< floatgetValueRange () 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.
 
EditItemID getOwnerID () const
 Returns the thing that you'd select if you wanted to show this param.
 
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.
 
void parameterChangeGestureEnd ()
 Call to indicate this parameter has stopped being to be changed.
 
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.
 
void removeModifier (ModifierAssignment &)
 Removes an assignment.
 
void removeModifier (ModifierSource &)
 Removes assignments for a ModifierSource.
 
bool hasActiveModifierAssignments () const
 Returns true if any ModifierSources are currently in use by assignments.
 
juce::ReferenceCountedArray< ModifierAssignmentgetAssignments () const
 Returns all the current ModifierAssignments.
 
juce::Array< ModifierSource * > getModifiers () const
 Returns all the current ModifierSources currently in use by assignments.
 
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.
 
float getCurrentBaseValue () const
 This is the current base value of the parameter i.e.
 
float getCurrentModifierValue () const
 This is the ammount of the modifier that has been applied to the base value to give the current parameter value.
 
bool isAutomationActive () const
 Returns true if the parameter is being dynamically changed somehow, either through automation or a ModifierAssignment.
 
void updateStream ()
 Forces the parameter to update its automation stream for reading automation.
 
void updateFromAutomationSources (TimePosition)
 Updates the parameter and modifier values from its current automation sources.
 
virtual bool isParameterActive () const
 
virtual std::optional< floatgetDefaultValue () const
 
bool isCurrentlyRecording () const
 true if the parameter been moved while in an automation record mode.
 
void resetRecordingStatus ()
 this is called before and after playback or recording.
 
void midiControllerMoved (float newPosition)
 
void midiControllerPressed ()
 
void curveHasChanged ()
 
juce::String getSelectableDescription () override
 Subclasses must return a description of what they are.
 
void addListener (Listener *l)
 
void removeListener (Listener *l)
 
- Public Member Functions inherited from juce::ReferenceCountedObject
void incReferenceCount () noexcept
 
void decReferenceCount () noexcept
 
bool decReferenceCountWithoutDeleting () noexcept
 
int getReferenceCount () const noexcept
 
- Public Member Functions inherited from tracktion::engine::Selectable
virtual void selectionStatusChanged (bool isNowSelected)
 Can be overridden to tell this object that it has just been selected or deselected.
 
virtual void changed ()
 This should be called to send a change notification to any SelectableListeners that are registered with this object.
 
virtual void selectableAboutToBeDeleted ()
 Called just before the selectable is about to be deleted so any subclasses should still be valid at this point.
 
void addListener (SelectableListener *)
 
void removeListener (SelectableListener *)
 
void addSelectableListener (SelectableListener *)
 
void removeSelectableListener (SelectableListener *)
 
void cancelAnyPendingUpdates ()
 If changed() has been called, this will cancel any pending async change notificaions.
 
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.
 
- Public Attributes inherited from tracktion::engine::AutomatableParameter
const juce::String paramID
 
const juce::NormalisableRange< floatvalueRange
 
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
AutomationSourceListgetAutomationSourceList () 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 Member Functions inherited from juce::ReferenceCountedObject
 ReferenceCountedObject (const ReferenceCountedObject &) noexcept
 
 ReferenceCountedObject (ReferenceCountedObject &&) noexcept
 
ReferenceCountedObjectoperator= (const ReferenceCountedObject &) noexcept
 
ReferenceCountedObjectoperator= (ReferenceCountedObject &&) noexcept
 
void resetReferenceCount () noexcept
 
- Protected Attributes inherited from tracktion::engine::AutomatableParameter
std::unique_ptr< AttachedValueattachedValue
 
juce::ListenerList< Listenerlisteners
 
SafeSelectable< EditeditRef
 
Pluginplugin
 
ModifiermodifierOwner
 
MacroParameterListmacroOwner
 
std::unique_ptr< AutomationCurveSourcecurveSource
 
std::atomic< floatcurrentValue
 
std::atomic< floatcurrentParameterValue
 
std::atomic< floatcurrentBaseValue
 
std::atomic< floatcurrentModifierValue
 
std::atomic< bool > isRecording
 
bool updateParametersRecursionCheck
 
AsyncCaller parameterChangedCaller
 
juce::ValueTree modifiersState
 
std::unique_ptr< AutomationSourceListautomationSourceList
 

Detailed Description

Definition at line 108 of file tracktion_ModifierInternal.h.

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 = {} 
)

Definition at line 110 of file tracktion_ModifierInternal.h.

◆ ~DiscreteLabelledParameter()

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

Definition at line 122 of file tracktion_ModifierInternal.h.

Member Function Documentation

◆ getAllLabels()

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

Reimplemented from tracktion::engine::AutomatableParameter.

Definition at line 147 of file tracktion_ModifierInternal.h.

◆ getLabelForValue()

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

Reimplemented from tracktion::engine::AutomatableParameter.

Definition at line 149 of file tracktion_ModifierInternal.h.

◆ getNumberOfStates()

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

Reimplemented from tracktion::engine::AutomatableParameter.

Definition at line 128 of file tracktion_ModifierInternal.h.

◆ getStateForValue()

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

Reimplemented from tracktion::engine::AutomatableParameter.

Definition at line 138 of file tracktion_ModifierInternal.h.

◆ getValueForState()

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

Reimplemented from tracktion::engine::AutomatableParameter.

Definition at line 130 of file tracktion_ModifierInternal.h.

◆ hasLabels()

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

Reimplemented from tracktion::engine::AutomatableParameter.

Definition at line 146 of file tracktion_ModifierInternal.h.

◆ isDiscrete()

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

Reimplemented from tracktion::engine::AutomatableParameter.

Definition at line 127 of file tracktion_ModifierInternal.h.

◆ snapToState()

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

Reimplemented from tracktion::engine::AutomatableParameter.

Definition at line 156 of file tracktion_ModifierInternal.h.


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