Deluge Firmware 1.3.0
Build date: 2025.04.16
Loading...
Searching...
No Matches
AutoParam Class Reference
Collaboration diagram for AutoParam:

Public Member Functions

void init ()
 
void setCurrentValueInResponseToUserInput (int32_t value, ModelStackWithAutoParam const *modelStack, bool shouldLogAction=true, int32_t livePos=-1, bool mayDeleteNodesInLinearRun=true, bool isMPE=false)
 
int32_t processCurrentPos (ModelStackWithAutoParam const *modelStack, bool reversed, bool didPinpong, bool mayInterpolate=true, bool mustUpdateValueAtEveryNode=false)
 
void setValueForRegion (uint32_t pos, uint32_t length, int32_t value, ModelStackWithAutoParam const *modelStack, ActionType actionType=ActionType::NOTE_EDIT)
 
void setValuePossiblyForRegion (int32_t value, ModelStackWithAutoParam const *modelStack, int32_t pos, int32_t length, bool mayDeleteNodesInLinearRun=true)
 
int32_t getValueAtPos (uint32_t pos, ModelStackWithAutoParam const *modelStack, bool reversed=false)
 
bool tickSamples (int32_t numSamples)
 tick the interolator by a number of samples - used for internal synths
 
bool tickTicks (int32_t numTicks)
 tick the interpolator by a number of ticks - used for midi
 
void setPlayPos (uint32_t pos, ModelStackWithAutoParam const *modelStack, bool reversed)
 
bool grabValueFromPos (uint32_t pos, ModelStackWithAutoParam const *modelStack)
 
void generateRepeats (uint32_t oldLength, uint32_t newLength, bool shouldPingpong)
 
void cloneFrom (AutoParam *otherParam, bool copyAutomation)
 
Error beenCloned (bool copyAutomation, int32_t reverseDirectionWithLength)
 
void copyOverridingFrom (AutoParam *otherParam)
 
void trimToLength (uint32_t newLength, Action *action, ModelStackWithAutoParam const *modelStack)
 
void deleteAutomation (Action *action, ModelStackWithAutoParam const *modelStack, bool shouldNotify=true)
 
void deleteAutomationBasicForSetup ()
 
void writeToFile (Serializer &writer, bool writeAutomation, int32_t *valueForOverride=nullptr)
 
Error readFromFile (Deserializer &reader, int32_t readAutomationUpToPos)
 
bool containsSomething (uint32_t neutralValue=0)
 
void shiftValues (int32_t offset)
 
void shiftParamVolumeByDB (float offset)
 
void shiftHorizontally (int32_t amount, int32_t effectiveLength)
 
void swapState (AutoParamState *state, ModelStackWithAutoParam const *modelStack)
 
void copy (int32_t startPos, int32_t endPos, CopiedParamAutomation *copiedParamAutomation, bool isPatchCable, ModelStackWithAutoParam const *modelStack)
 
void paste (int32_t startPos, int32_t endPos, float scaleFactor, ModelStackWithAutoParam const *modelStack, CopiedParamAutomation *copiedParamAutomation, bool isPatchCable)
 
Error makeInterpolationGoodAgain (int32_t clipLength, int32_t quantizationRShift)
 
void transposeCCValuesToChannelPressureValues ()
 
void deleteTime (int32_t startPos, int32_t lengthToDelete, ModelStackWithAutoParam *modelStack)
 
void insertTime (int32_t pos, int32_t lengthToInsert)
 
void appendParam (AutoParam *otherParam, int32_t oldLength, int32_t reverseThisRepeatWithLength, bool pingpongingGenerally)
 
void nudgeNonInterpolatingNodesAtPos (int32_t pos, int32_t offset, int32_t lengthBeforeLoop, Action *action, ModelStackWithAutoParam const *modelStack)
 
void stealNodes (ModelStackWithAutoParam const *modelStack, int32_t pos, int32_t regionLength, int32_t loopLength, Action *action, StolenParamNodes *stolenNodeRecord=nullptr)
 
void insertStolenNodes (ModelStackWithAutoParam const *modelStack, int32_t pos, int32_t regionLength, int32_t loopLength, Action *action, StolenParamNodes *stolenNodeRecord)
 
void moveRegionHorizontally (ModelStackWithAutoParam const *modelStack, int32_t pos, int32_t length, int32_t offset, int32_t lengthBeforeLoop, Action *action)
 
void deleteNodesWithinRegion (ModelStackWithAutoParam const *modelStack, int32_t pos, int32_t length)
 
int32_t setNodeAtPos (int32_t pos, int32_t value, bool shouldInterpolate)
 Make sure the value of this AutoParam will be value at time pos.
 
int32_t homogenizeRegion (ModelStackWithAutoParam const *modelStack, int32_t startPos, int32_t length, int32_t startValue, bool interpolateLeftNode, bool interpolateRightNode, int32_t effectiveLength, bool reversed, int32_t posAtWhichClipWillCut=2147483647)
 
int32_t getDistanceToNextNode (ModelStackWithAutoParam const *modelStack, int32_t pos, bool reversed)
 
void setCurrentValueWithNoReversionOrRecording (ModelStackWithAutoParam const *modelStack, int32_t value)
 
int32_t getCurrentValue ()
 
int32_t getValuePossiblyAtPos (int32_t pos, ModelStackWithAutoParam *modelStack)
 
void notifyPingpongOccurred ()
 
void setCurrentValueBasicForSetup (int32_t value)
 
bool isAutomated ()
 
void cancelOverriding ()
 

Static Public Member Functions

static bool containedSomethingBefore (bool wasAutomatedBefore, uint32_t valueBefore, uint32_t neutralValue=0)
 

Public Attributes

ParamNodeVector nodes
 The nodes that make up this parameter. If empty, currentValue should be used.
 
int32_t currentValue
 Current value of the AutoParam. Updated by several functions.
 
int32_t valueIncrementPerHalfTick
 
uint32_t renewedOverridingAtTime
 

Private Member Functions

bool deleteRedundantNodeInLinearRun (int32_t lastNodeInRunI, int32_t effectiveLength, bool mayLoopAroundBackToEnd=true)
 
void setupInterpolation (ParamNode *nextNode, int32_t effectiveLength, int32_t currentPos, bool reversed)
 
void homogenizeRegionTestSuccess (int32_t pos, int32_t regionEnd, int32_t startValue, bool interpolateStart, bool interpolateEnd)
 
void deleteNodesBeyondPos (int32_t pos)
 

Member Function Documentation

◆ setNodeAtPos()

int32_t AutoParam::setNodeAtPos ( int32_t pos,
int32_t value,
bool shouldInterpolate )

Make sure the value of this AutoParam will be value at time pos.

If no node exists at the provided position, a new node will be created.

Parameters
[in]posPosition to modify.
[in]valueValue to use.
[in]shouldInterpolateSets ParamNode::interpolated on the created or modified node.
Returns
the index in to nodes of the modified node.

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