lmms
Cross-platform music production software
Loading...
Searching...
No Matches
lmms::AutomationNode Class Reference

#include <AutomationNode.h>

Public Member Functions

 AutomationNode ()
 Dummy constructor for the QMap.
 AutomationNode (AutomationClip *clip, float value, int pos)
 AutomationNode (AutomationClip *clip, float inValue, float outValue, int pos)
AutomationNode & operator+= (float f)
AutomationNode & operator-= (float f)
AutomationNode & operator*= (float f)
AutomationNode & operator/= (float f)
const float getInValue () const
void setInValue (float value)
 Sets the inValue of an automation node.
const float getOutValue () const
void setOutValue (float value)
 Sets the outValue of an automation node.
void resetOutValue ()
 Resets the outValue so it matches inValue.
const float getValueOffset () const
 Gets the offset between inValue and outValue.
const float getInTangent () const
 Gets the tangent of the left side of the node.
void setInTangent (float tangent)
 Sets the tangent of the left side of the node.
const float getOutTangent () const
 Gets the tangent of the right side of the node.
void setOutTangent (float tangent)
 Sets the tangent of the right side of the node.
const bool lockedTangents () const
 Checks if the tangents from the node are locked.
void setLockedTangents (bool b)
 Locks or Unlocks the tangents from this node.
void setClip (AutomationClip *clip)
 Sets the clip this node belongs to.

Private Attributes

AutomationClip * m_clip
 Clip that this node belongs to.
int m_pos
 Time position of this node (matches the timeMap key).
float m_inValue
float m_outValue
float m_inTangent
 Slope at each point for calculating spline.
float m_outTangent
 Slope at each point for calculating spline.
bool m_lockedTangents

Constructor & Destructor Documentation

◆ AutomationNode() [1/3]

lmms::AutomationNode::AutomationNode ( )

Dummy constructor for the QMap.

◆ AutomationNode() [2/3]

lmms::AutomationNode::AutomationNode ( AutomationClip * clip,
float value,
int pos )

◆ AutomationNode() [3/3]

lmms::AutomationNode::AutomationNode ( AutomationClip * clip,
float inValue,
float outValue,
int pos )

Member Function Documentation

◆ getInTangent()

const float lmms::AutomationNode::getInTangent ( ) const
inline

Gets the tangent of the left side of the node.

Returns
A float with the tangent from the inValue side

◆ getInValue()

const float lmms::AutomationNode::getInValue ( ) const
inline

◆ getOutTangent()

const float lmms::AutomationNode::getOutTangent ( ) const
inline

Gets the tangent of the right side of the node.

Returns
A float with the tangent from the outValue side

◆ getOutValue()

const float lmms::AutomationNode::getOutValue ( ) const
inline

◆ getValueOffset()

const float lmms::AutomationNode::getValueOffset ( ) const
inline

Gets the offset between inValue and outValue.

Returns
A float representing the offset between inValue and outValue

◆ lockedTangents()

const bool lmms::AutomationNode::lockedTangents ( ) const
inline

Checks if the tangents from the node are locked.

◆ operator*=()

AutomationNode & lmms::AutomationNode::operator*= ( float f)
inline

◆ operator+=()

AutomationNode & lmms::AutomationNode::operator+= ( float f)
inline

◆ operator-=()

AutomationNode & lmms::AutomationNode::operator-= ( float f)
inline

◆ operator/=()

AutomationNode & lmms::AutomationNode::operator/= ( float f)
inline

◆ resetOutValue()

void lmms::AutomationNode::resetOutValue ( )

Resets the outValue so it matches inValue.

◆ setClip()

void lmms::AutomationNode::setClip ( AutomationClip * clip)
inline

Sets the clip this node belongs to.

Parameters
clipclip that m_clip will be set to

◆ setInTangent()

void lmms::AutomationNode::setInTangent ( float tangent)
inline

Sets the tangent of the left side of the node.

Parameters
tangentA float with the tangent for the inValue side

◆ setInValue()

void lmms::AutomationNode::setInValue ( float value)

Sets the inValue of an automation node.

Parameters
valueA float value to be assigned

◆ setLockedTangents()

void lmms::AutomationNode::setLockedTangents ( bool b)
inline

Locks or Unlocks the tangents from this node.

Parameters
bWhether or not the tangents should be locked

◆ setOutTangent()

void lmms::AutomationNode::setOutTangent ( float tangent)
inline

Sets the tangent of the right side of the node.

Parameters
tangentA float with the tangent for the outValue side

◆ setOutValue()

void lmms::AutomationNode::setOutValue ( float value)

Sets the outValue of an automation node.

Parameters
valueA float value to be assigned

Member Data Documentation

◆ m_clip

AutomationClip* lmms::AutomationNode::m_clip
private

Clip that this node belongs to.

◆ m_inTangent

float lmms::AutomationNode::m_inTangent
private

Slope at each point for calculating spline.

We might have discrete jumps between curves, so we possibly have two different tangents for each side of the curve. If m_inValue and m_outValue are equal, m_inTangent and m_outTangent are equal too.

◆ m_inValue

float lmms::AutomationNode::m_inValue
private

◆ m_lockedTangents

bool lmms::AutomationNode::m_lockedTangents
private

If the tangents were edited manually, this will be true. That way the tangents from this node will not be recalculated. It's set back to false if the tangents are reset.

◆ m_outTangent

float lmms::AutomationNode::m_outTangent
private

Slope at each point for calculating spline.

We might have discrete jumps between curves, so we possibly have two different tangents for each side of the curve. If m_inValue and m_outValue are equal, m_inTangent and m_outTangent are equal too.

◆ m_outValue

float lmms::AutomationNode::m_outValue
private

◆ m_pos

int lmms::AutomationNode::m_pos
private

Time position of this node (matches the timeMap key).


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