Krotos Modules 3
Loading...
Searching...
No Matches
krotos::Kwidget_OfflineAnalyser Class Reference

#include <Kwidget_OfflineAnalyser.h>

Inheritance diagram for krotos::Kwidget_OfflineAnalyser:
krotos::Kwidget krotos::ResourceLock

Classes

struct  Parameters
 

Public Member Functions

 Kwidget_OfflineAnalyser (const String &id)
 
- Public Member Functions inherited from krotos::Kwidget
 Kwidget (const String &kwidgetType, const String &kwidgetID)
 
virtual ~Kwidget ()=default
 
void init ()
 
std::unique_ptr< KwidgetProcessorcreateVoice ()
 
std::unique_ptr< KwidgetGUIcreateControls ()
 
KwidgetProcessorgetVoice (int idx) const
 
int getNumVoices () const
 
KwidgetProcessorgetActiveVoice () const
 
virtual void noteOn (int voiceIdx, int midiNote, float velocity)
 
virtual void noteOff (int voiceIdx, float velocity)
 
virtual void noteCleared (int voiceIdx)
 
virtual bool isActive (int voiceIdx)
 
void addModulator (const String &paramID, Kwidget *modulator, int modulatorIdx, float depth=0.99f, KAttachment::Polarity=KAttachment::Polarity::Bipolar)
 
void removeModulator (const String &paramID, Kwidget *modulator, int modulatorIdx)
 
void setModulatorDepth (const String &paramID, Kwidget *modulator, int modulatorIdx, float depth)
 
void setModulatorPolarity (const String &paramID, Kwidget *modulator, int modulatorIdx, KAttachment::Polarity polarity)
 
const std::vector< std::shared_ptr< KParameter > > & getParameters () const
 
KParametergetParameter (const String &parameterID) const noexcept
 Get a raw pointer to a KParameter belonging to this Kwidget's KwidgetProcessor. Useful for low overhead direct parameter access.
 
std::shared_ptr< KParametergetParameterToAttach (const String &parameterID) const noexcept
 Get a shared pointer to a KParameter, for use with KParameter::Listener objects and situations where the parameter lifetime goes beyond local scope.
 
CustomParametergetCustomParameter (const String &parameterID)
 
CustomParameterTreegetCustomParameterTree (const Identifier &type)
 Get a CustomParameterTree belonging to this Kwidget.
 
template<typename T >
T * getCustomParameter (const Identifier &type)
 Get the CustomParameterTree subclass object of the specified type.
 
void notifyAllParametersListeners ()
 Call every parameter's value changed listeners with their current values.
 
const ValueTree & getState ()
 
virtual void setState (const ValueTree &newState, KwidgetAudioProcessor &processor)
 
void flushState ()
 
bool isModulator () const
 
int getNumModulators () const
 
const String & getKwidgetType () const
 
const String & getKwidgetID () const
 
const String & getKwidgetVersionFromCurrentState () const
 
String getKwidgetVersion () const
 
virtual const String & getKwidgetLabel ()
 
StringArray getDragID (const String &parameterID)
 
virtual size_t numGUIImplementations ()
 
virtual String getGuiName (int)
 
virtual void createNestedKwidgets (KwidgetAudioProcessor &)
 
bool isAChildKwidget ()
 
std::vector< Kwidget * > & getChildKwidgets ()
 
bool isStateChanging ()
 
void addChildKwidget (Kwidget *child)
 
void removeChildKwidgetFromTree (String kwidgetID)
 
KwidgetfindChildKwidget (String kiwdgetID)
 
void addParameterCallback (const String &paramID, std::function< void(float)> callback)
 
void addVersionedParameterCallback (StringRef kwidgetVersionTheParameterChangedIn, const String &paramID, std::function< void(float)> callback)
 Add an action to be performed when a specified parameter of a specific kwidget version changes value. This can be used to implement backwards compatibility when older versions of the kwidget state are loaded, and the parameters in newer versions may have been changed or removed.
 
int getTemplateID ()
 
- Public Member Functions inherited from krotos::ResourceLock
 ResourceLock ()
 
bool requestAccess (const StringRef id)
 Called by a client to request access to the resource.
 
bool hasAccess (const StringRef id) const
 Called by a client to enquire whether it has access to the resource.
 
void finishedAccessing (const StringRef id)
 Called by a client to inform the resource that it no longer needs access.
 
void setAccessible (bool isAccessible)
 Called by the resource to grant or deny access to clients.
 

Protected Member Functions

std::vector< ParameterInfocreateParameters () override
 
std::unique_ptr< KwidgetProcessorcreateProcessor () override
 
std::unique_ptr< KwidgetGUIcreateGUI () override
 
- Protected Member Functions inherited from krotos::Kwidget
void addChildGuis (std::unique_ptr< KwidgetGUI > &parentGui)
 
CustomParametercreateAndAddCustomParameter (const String &paramID, const var &value)
 
template<typename T >
T * createAndAddCustomParameter (const Identifier &type)
 Create a highly customizable piece of state for this Kwidget by appending a subclass of CustomParameterTree to this Kwidget's state.
 
void setKwidgetVersion (const String &kwidgetVersionString)
 

Additional Inherited Members

- Public Types inherited from krotos::Kwidget
enum  DragID_Index { KwidgetID = 0 , ParameterID = 1 }
 
- Static Public Member Functions inherited from krotos::Kwidget
static String getParentID (String childKwidgetID)
 
- Protected Attributes inherited from krotos::Kwidget
std::vector< Kwidget * > m_childKwidgets
 

Constructor & Destructor Documentation

◆ Kwidget_OfflineAnalyser()

krotos::Kwidget_OfflineAnalyser::Kwidget_OfflineAnalyser ( const String & id)

Member Function Documentation

◆ createGUI()

std::unique_ptr< KwidgetGUI > krotos::Kwidget_OfflineAnalyser::createGUI ( )
overrideprotectedvirtual

Override this method to define the type of KwidgetGUI used by this Kwidget.

Implements krotos::Kwidget.

◆ createParameters()

std::vector< Kwidget::ParameterInfo > krotos::krotos::Kwidget_OfflineAnalyser::createParameters ( )
overrideprotectedvirtual

Define all the parameters that this processor will have here.

Parameters are defined with a ParameterInfo struct requiring the following parameters:

paramID A string used to identify the parameter.
paramName The parameter's display name.
range The range of the parameter as a NormalisableRange<float>.
defaultValue The default value of the parameter.

Implements krotos::Kwidget.

◆ createProcessor()

std::unique_ptr< KwidgetProcessor > krotos::Kwidget_OfflineAnalyser::createProcessor ( )
overrideprotectedvirtual

Override this method to define the type of KwidgetProcessor used by this Kwidget.

Implements krotos::Kwidget.


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