template<class Class>
aes70::device::OcaDynamicsCurve class

Template parameters
Class - Class to wrap.

This class template detects the methods and events defined for the class OcaDynamicsCurve in the AES70 specification and exposes them through AES70. Note that all AES70 methods and event handlers need to be public in order to be detected.

Detects the following symbols with the corresponding detector classes:

  • GetNSegments : aes70::device::Getter

    Return values:

    • n : OcaUint8
    • minN : OcaUint8
    • maxN : OcaUint8
  • SetNSegments : aes70::device::Setter

    Arguments:

    • Slope : OcaUint8
  • GetThreshold : aes70::device::Getter

    Return values:

    • Threshold : OcaList<OcaDBr>
    • minThreshold : OcaFloat32
    • maxThreshold : OcaFloat32
  • SetThreshold : aes70::device::Setter

    Arguments:

    • Threshold : OcaList<OcaDBr>
  • GetSlope : aes70::device::Getter

    Return values:

    • slope : OcaList<OcaFloat32>
    • minSlope : OcaList<OcaFloat32>
    • maxSlope : OcaList<OcaFloat32>
  • SetSlope : aes70::device::Setter

    Arguments:

    • slope : OcaList<OcaFloat32>
  • GetKneeParameter : aes70::device::Getter

    Return values:

    • parameter : OcaList<OcaFloat32>
    • minParameter : OcaList<OcaFloat32>
    • maxParameter : OcaList<OcaFloat32>
  • SetKneeParameter : aes70::device::Setter

    Arguments:

    • parameter : OcaList<OcaFloat32>
  • GetDynamicGainCeiling : aes70::device::Getter

    Return values:

    • gain : OcaFloat32
    • minGain : OcaFloat32
    • maxGain : OcaFloat32
  • SetDynamicGainCeiling : aes70::device::Setter

    Arguments:

    • gain : OcaFloat32
  • GetDynamicGainFloor : aes70::device::Getter

    Return values:

    • Gain : OcaFloat32
    • minGain : OcaFloat32
    • maxGain : OcaFloat32
  • SetDynamicGainFloor : aes70::device::Setter

    Arguments:

    • Gain : OcaFloat32
  • SetMultiple : aes70::device::Method

    Arguments:

    • Mask : OcaBitSet16
    • nSegments : OcaUint8
    • Threshold : OcaList<OcaDBr>
    • Slope : OcaList<OcaFloat32>
    • KneeParameter : OcaList<OcaFloat32>
    • DynamicGainFloor : OcaFloat32
    • DynamicGainCeiling : OcaFloat32

Detects the following event handlers for property changes (of type aes70::property_change_event ):

  • OnNSegmentsChanged with property encoder OCP1::OcaUint8
  • OnThresholdChanged with property encoder OCP1::OcaList<OCP1::Struct<OCP1::OcaFloat32, OCP1::OcaFloat32>>
  • OnSlopeChanged with property encoder OCP1::OcaList<OCP1::OcaFloat32>
  • OnKneeParameterChanged with property encoder OCP1::OcaList<OCP1::OcaFloat32>
  • OnDynamicGainFloorChanged with property encoder OCP1::OcaFloat32
  • OnDynamicGainCeilingChanged with property encoder OCP1::OcaFloat32

From the AES70 standard:

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).

Base classes

template<class Class>
class OcaActuator

Public static variables

static const OcaClassVersionNumber ClassVersion
static const classid_tpl<4> ClassId
static const size_t count_events

Public static functions

static auto get_event_index(OcaEventID id, size_t index) -> AES70_ALWAYS_INLINE ptrdiff_t

Constructors, destructors, conversion operators

template<typename ... TN>
OcaDynamicsCurve(TN && ... args)

Public functions

auto get_class_version() const -> uint16_t virtual
auto get_classid() const -> const classid& virtual
void init(aes70::device::device* d, uint32_t n) virtual
auto call(const OcaMethodID id, const uint8_t* src, const uint8_t* src_end, uint8_t parameterCount, const aes70::response_generator& response) -> bool virtual
auto get_event_index(const OcaEventID OcaEventID) const -> ptrdiff_t virtual

Function documentation

template<classClass>
static AES70_ALWAYS_INLINE ptrdiff_t aes70::device::OcaDynamicsCurve<Class>::get_event_index(OcaEventID id, size_t index)

Internal class for finding the event index of a given EventID. Returns -1 if the given event is not defined.

template<classClass> template<typename ... TN>
aes70::device::OcaDynamicsCurve<Class>::OcaDynamicsCurve(TN && ... args)

Constructor which calls the constructor of Class with args forwarded.

template<classClass>
uint16_t aes70::device::OcaDynamicsCurve<Class>::get_class_version() const virtual

Returns the AES70 class version of this object.

template<classClass>
const classid& aes70::device::OcaDynamicsCurve<Class>::get_classid() const virtual

Returns the AES70 class id of this object.

template<classClass>
void aes70::device::OcaDynamicsCurve<Class>::init(aes70::device::device* d, uint32_t n) virtual

Called when this object is added to a device.

template<classClass>
bool aes70::device::OcaDynamicsCurve<Class>::call(const OcaMethodID id, const uint8_t* src, const uint8_t* src_end, uint8_t parameterCount, const aes70::response_generator& response) virtual

Internal method used to call AES70 methods in this object.

template<classClass>
ptrdiff_t aes70::device::OcaDynamicsCurve<Class>::get_event_index(const OcaEventID OcaEventID) const virtual

Returns the index of a given event. The idea is that all events defined on a aes70 class can be enumerated. For events which this object does not implement, the value -1 is returned.

Variable documentation

template<classClass>
static const OcaClassVersionNumber aes70::device::OcaDynamicsCurve<Class>::ClassVersion

The ClassVersion of this class according to the AES70 standard.

template<classClass>
static const classid_tpl<4> aes70::device::OcaDynamicsCurve<Class>::ClassId

The ClassID of this class according to the AES70 standard.

template<classClass>
static const size_t aes70::device::OcaDynamicsCurve<Class>::count_events

Number of events defined in this class. This depends on which events are implemented by Class.