OcaDynamicsCurve¶
A online version of the AES70 specification of this class can be found at http://docs.deuso.de.
The class is a subclass of OcaActuator()
.
This class defines the properties
Name |
JavaScript Type |
AES70 Type |
---|---|---|
NSegments |
number |
OcaUint8 |
Threshold |
OcaDBr[] |
OcaList<OcaDBr> |
Slope |
number[] |
OcaList<OcaFloat32> |
KneeParameter |
number[] |
OcaList<OcaFloat32> |
DynamicGainFloor |
number |
OcaDB |
DynamicGainCeiling |
number |
OcaDB |
Furthermore, it inherits the properties ClassID, ClassVersion, ObjectNumber, Lockable, Role, Enabled, Ports, Label, Owner, Latency, NSegments, Threshold, Slope, KneeParameter, DynamicGainFloor and DynamicGainCeiling.
-
class
OcaDynamicsCurve
(objectNumber, device)¶ Dynamic compression / expansion curve. Curve means a function that expresses the relationship of output level to input level. The dependent variable (Y) of the curve is output level; the independent variable (X) is input level. Every curve is composed of (n+1) straight-line segments joined by (n) small fillets called knees . Each knee occurs at a particular input level value called the threshold. Each segment is characterized by its slope. | / | S3 / | S2 / | T1 ————- T2 | / | S1 / | / | / +———————————— This “drawing” shows a three-segment curve. The horizontal axis is input level, vertical axis is output level. Algebraically, a curve is a function Out = Curve( In, T[1..n-1], S[1..n], K[1..n-1] ) where n is the number of segments, and In is input level in dBr Out is output level in dBr T[1…n-1] is an array of thresholds in dBr S[1…n] is an array of slopes in dBr per dBr, i.e. unitless K[1..n] is the knee parameter , an implementation-dependant parameter that specifies the shape of the curve around the knee. Each segment has a slope that expresses its ratio of output level to input level. Note that this slope is the inverse of what dynamics processors call “ratio”. For example, a ratio of 2:1 is represented by a curve segment with slope 1/2 = 0.5. This model can represent familiar audio dynamics elements (we ignore K[] in these examples): - Compressor with ratio of 2:1 and threshold of 10dBr: n = 2 T[1] = 10 S[1] = 1 S[2] = 0.5 - Hard limiter with threshold of 18dBr: n = 2 T[1] = 18 S[1] = 1 S[2] = 0 - Upward expander with ratio of 1.5:1 and threshold of -12dBr: n = 2 T[1] = -12 S[1] = 1 S[2] = 1.5 - Downward expander (gate) with ratio of 50:1 and threshold of -45dBr: n = 2 T[1] = -45 S[1] = 50 S[2] = 1 This class, OcaDynamicsCurve, adds two additional parameters to the basic curve mechanism. Out = Curve( In, T[1..n-1], S[1..n], K[1..n-1] , Floor, Ceiling) where In, T[], and S[], and K[] are as defined above. Floor is the lowest gain (in dBr) that the dynamics element is allowed to produce. Ceiling is the highest gain (in dBr) that the dynamics element is allowed to produce. To show the use of Floor and Ceiling , we revisit some of the examples above (again, K[] is ignored): - Compressor with ratio of 2:1, threshold of 10dBr, and max gain reduction of 20dB: n = 2 T[1] = 10 S[1] = 1 S[2] = 0.5 Floor = -20 Ceiling = 0 - Upward expander with ratio of 1.5:1, threshold of -12dBr, and max gain boost of 4dB: n = 2 T[1] = -12 S[1] = 1 S[2] = 1.5 Floor = 0 Ceiling = 4.0 More complex dynamics curves can be modeled by using more segments ( n > 2) .
-
OcaDynamicsCurve.
OnDynamicGainCeilingChanged
¶ type: PropertyEvent.<number>
This event is emitted when the property DynamicGainCeiling changes in the remote object. The property
DynamicGainCeiling
is described in the AES70 standard as follows. Highest allowed dynamic gain value. See class description for details.
-
OcaDynamicsCurve.
OnDynamicGainFloorChanged
¶ type: PropertyEvent.<number>
This event is emitted when the property DynamicGainFloor changes in the remote object. The property
DynamicGainFloor
is described in the AES70 standard as follows. Lowest allowed dynamic gain value. See class description for details.
-
OcaDynamicsCurve.
OnKneeParameterChanged
¶ type: PropertyEvent.<Array.<number>>
This event is emitted when the property KneeParameter changes in the remote object. The property
KneeParameter
is described in the AES70 standard as follows. <b>K[1..n]</b>. See class description for details.
-
OcaDynamicsCurve.
OnNSegmentsChanged
¶ type: PropertyEvent.<number>
This event is emitted when the property NSegments changes in the remote object. The property
NSegments
is described in the AES70 standard as follows. Number of curve segments.
-
OcaDynamicsCurve.
OnSlopeChanged
¶ type: PropertyEvent.<Array.<number>>
This event is emitted when the property Slope changes in the remote object. The property
Slope
is described in the AES70 standard as follows. <b>S[1..n]</b>. See class description for details.
-
OcaDynamicsCurve.
OnThresholdChanged
¶ type: PropertyEvent.<Array.<OcaDBr>>
This event is emitted when the property Threshold changes in the remote object. The property
Threshold
is described in the AES70 standard as follows. <b>T[1..n-1]</b>. See class description for details.
-
OcaDynamicsCurve.
GetDynamicGainCeiling
()¶ Gets the value of the DynamicGainCeiling property. The return value indicates whether the data was successfully retrieved. The return values of this method are
gain of type
number
minGain of type
number
maxGain of type
number
- Returns
Promise.<Arguments.<number, number, number>> –
-
OcaDynamicsCurve.
GetDynamicGainFloor
()¶ Gets the value of the DynamicGainFloor property. The return value indicates whether the data was successfully retrieved. The return values of this method are
Gain of type
number
minGain of type
number
maxGain of type
number
- Returns
Promise.<Arguments.<number, number, number>> –
-
OcaDynamicsCurve.
GetKneeParameter
()¶ Gets the list of KneeParameter valuess. The return value indicates whether the list was successfully retrieved. The return values of this method are
parameter of type
number[]
minParameter of type
number[]
maxParameter of type
number[]
- Returns
Promise.<Arguments.<Array.<number>, Array.<number>, Array.<number>>> –
-
OcaDynamicsCurve.
GetNSegments
()¶ Gets the number of curve segments. The return value indicates whether the value was successfully retrieved. The return values of this method are
n of type
number
minN of type
number
maxN of type
number
- Returns
Promise.<Arguments.<number, number, number>> –
-
OcaDynamicsCurve.
GetSlope
()¶ Gets the list of Slope values. The return value indicates whether the list was successfully retrieved. The return values of this method are
slope of type
number[]
minSlope of type
number[]
maxSlope of type
number[]
- Returns
Promise.<Arguments.<Array.<number>, Array.<number>, Array.<number>>> –
-
OcaDynamicsCurve.
GetThreshold
()¶ Gets the list of Threshold values. The return value indicates whether the data was successfully retrieved. The return values of this method are
Threshold of type
OcaDBr[]
minThreshold of type
number
maxThreshold of type
number
- Returns
Promise.<Arguments.<Array.<OcaDBr>, number, number>> –
-
OcaDynamicsCurve.
SetDynamicGainCeiling
(gain)¶ Sets the value of the DynamicGainCeiling property. The return value indicates whether the data was successfully set.
- Arguments
gain (number) –
- Returns
Promise.<void> –
-
OcaDynamicsCurve.
SetDynamicGainFloor
(Gain)¶ Sets the value of the DynamicGainFloor property. The return value indicates whether the data was successfully set.
- Arguments
Gain (number) –
- Returns
Promise.<void> –
-
OcaDynamicsCurve.
SetKneeParameter
(parameter)¶ Sets the list of KneeParameter values. The return value indicates whether the values were successfully set.
- Arguments
parameter (Array.<number>) –
- Returns
Promise.<void> –
-
OcaDynamicsCurve.
SetMultiple
(Mask, nSegments, Threshold, Slope, KneeParameter, DynamicGainFloor, DynamicGainCeiling)¶ Sets some or all dynamics curve parameters. The return value indicates if the parameters were successfully set. The action of this method is atomic - if any of the value changes fails, none of the changes are made.
- Arguments
Mask (int) –
nSegments (number) –
Threshold (Array.<OcaDBr>) –
Slope (Array.<number>) –
KneeParameter (Array.<number>) –
DynamicGainFloor (number) –
DynamicGainCeiling (number) –
- Returns
Promise.<void> –
-
OcaDynamicsCurve.
SetNSegments
(Slope)¶ Sets the number of curve segments. The return value indicates whether the data was successfully set. If this method increases the value of n, the data in properties Threshold , Slope , and KneeParameter of the new segment are by default set to the values of the previous segment.
- Arguments
Slope (number) –
- Returns
Promise.<void> –
-
OcaDynamicsCurve.
SetSlope
(slope)¶ Sets the list of Slope values. The return value indicates whether the values were successfully set.
- Arguments
slope (Array.<number>) –
- Returns
Promise.<void> –
-
OcaDynamicsCurve.
SetThreshold
(Threshold)¶ Sets the list of Threshold values. The return value indicates whether the values were successfully set.
- Arguments
Threshold (Array.<OcaDBr>) –
- Returns
Promise.<void> –
-