MCPcopy Create free account
hub / github.com/LabSound/LabSound / ParamEvent

Class ParamEvent

include/LabSound/core/AudioParamTimeline.h:46–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44 // @tofix - move to implementation file to hide from public API
45
46 class ParamEvent
47 {
48
49 public:
50 enum Type
51 {
52 SetValue,
53 LinearRampToValue,
54 ExponentialRampToValue,
55 SetTarget,
56 SetValueCurve,
57 LastType
58 };
59
60 ParamEvent(Type type, float value, float time, float timeConstant, float duration, std::vector<float> curve)
61 : m_type(type)
62 , m_value(value)
63 , m_time(time)
64 , m_timeConstant(timeConstant)
65 , m_duration(duration)
66 , m_curve(curve)
67 {
68 }
69
70 ParamEvent(const ParamEvent & rhs)
71 : m_type(rhs.m_type)
72 , m_value(rhs.m_value)
73 , m_time(rhs.m_time)
74 , m_timeConstant(rhs.m_timeConstant)
75 , m_duration(rhs.m_duration)
76 , m_curve(rhs.m_curve)
77 {
78 }
79
80 const ParamEvent & operator=(const ParamEvent & rhs)
81 {
82
83 m_type = rhs.m_type;
84 m_value = rhs.m_value;
85 m_time = rhs.m_time;
86 m_timeConstant = rhs.m_timeConstant;
87 m_duration = rhs.m_duration;
88 m_curve = rhs.m_curve;
89 return *this;
90 }
91
92 unsigned type() const { return m_type; }
93 float value() const { return m_value; }
94 float time() const { return m_time; }
95 float timeConstant() const { return m_timeConstant; }
96 float duration() const { return m_duration; }
97 std::vector<float> & curve() { return m_curve; }
98
99 private:
100 unsigned m_type;
101 float m_value;
102 float m_time;
103 float m_timeConstant;

Callers 5

setValueAtTimeMethod · 0.85
setTargetAtTimeMethod · 0.85
setValueCurveAtTimeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected