UNPKG

aes70

Version:

A controller library for the AES70 protocol.

243 lines (240 loc) 7.19 kB
import { OcaFloat32 } from '../../OCP1/OcaFloat32.js'; import { OcaParameterMask } from '../../OCP1/OcaParameterMask.js'; import { OcaParametricEQShape } from '../../OCP1/OcaParametricEQShape.js'; import { make_control_class } from '../make_control_class.js'; import { OcaActuator } from './OcaActuator.js'; /** * Parametric equalizer section with various shape options. * @extends OcaActuator * @class OcaFilterParametric */ export const OcaFilterParametric = make_control_class( 'OcaFilterParametric', 4, '\u0001\u0001\u0001\n', 3, OcaActuator, [ ['GetFrequency', 4, 1, [], [OcaFloat32, OcaFloat32, OcaFloat32]], ['SetFrequency', 4, 2, [OcaFloat32], []], ['GetShape', 4, 3, [], [OcaParametricEQShape]], ['SetShape', 4, 4, [OcaParametricEQShape], []], [ 'GetWidthParameter', 4, 5, [], [OcaFloat32, OcaFloat32, OcaFloat32], ['GetQ'], ], ['SetWidthParameter', 4, 6, [OcaFloat32], [], ['SetQ']], ['GetInbandGain', 4, 7, [], [OcaFloat32, OcaFloat32, OcaFloat32]], ['SetInbandGain', 4, 8, [OcaFloat32], [], ['SetInbandgain']], ['GetShapeParameter', 4, 9, [], [OcaFloat32, OcaFloat32, OcaFloat32]], ['SetShapeParameter', 4, 10, [OcaFloat32], []], [ 'SetMultiple', 4, 11, [ OcaParameterMask, OcaFloat32, OcaParametricEQShape, OcaFloat32, OcaFloat32, OcaFloat32, ], [], ], ], [ ['Frequency', [OcaFloat32], 4, 1, false, false, null], ['Shape', [OcaParametricEQShape], 4, 2, false, false, null], ['WidthParameter', [OcaFloat32], 4, 3, false, false, ['Q']], ['InBandGain', [OcaFloat32], 4, 4, false, false, ['InbandGain']], ['ShapeParameter', [OcaFloat32], 4, 5, false, false, null], ], [] ); /** * Gets the value and limits of the **Frequency** property. * The return values of this method are * * - Frequency of type ``number`` * - minFrequency of type ``number`` * - maxFrequency of type ``number`` * * @method OcaFilterParametric#GetFrequency * @returns {Promise<Arguments<number,number,number>>} */ /** * Sets the value of the **Frequency** property. * * @method OcaFilterParametric#SetFrequency * @param {number} Frequency * * @returns {Promise<void>} */ /** * Gets the value of the **Shape** property. * * @method OcaFilterParametric#GetShape * @returns {Promise<OcaParametricEQShape>} * A promise which resolves to a single value of type :class:`OcaParametricEQShape`. */ /** * Sets the value of the **Shape** property. * * @method OcaFilterParametric#SetShape * @param {IOcaParametricEQShape} type * * @returns {Promise<void>} */ /** * Gets the value and limits of the **WidthParameter** property. * The return values of this method are * * - Width of type ``number`` * - minWidth of type ``number`` * - maxWidth of type ``number`` * * @method OcaFilterParametric#GetWidthParameter * @returns {Promise<Arguments<number,number,number>>} */ /** * Gets the value and limits of the **WidthParameter** property. * An alias for GetWidthParameter. * The return values of this method are * * - Width of type ``number`` * - minWidth of type ``number`` * - maxWidth of type ``number`` * * @method OcaFilterParametric#GetQ * @returns {Promise<Arguments<number,number,number>>} */ /** * Sets the value of the **WidthParameter** property. * * @method OcaFilterParametric#SetWidthParameter * @param {number} Width * * @returns {Promise<void>} */ /** * Sets the value of the **WidthParameter** property. * An alias for SetWidthParameter. * * @method OcaFilterParametric#SetQ * @param {number} Width * * @returns {Promise<void>} */ /** * Gets the value, min, and max of the **InBandGain** property. * The return values of this method are * * - gain of type ``number`` * - minGain of type ``number`` * - maxGain of type ``number`` * * @method OcaFilterParametric#GetInbandGain * @returns {Promise<Arguments<number,number,number>>} */ /** * Sets the value of the **InBandGain** property. * * @method OcaFilterParametric#SetInbandGain * @param {number} gain * * @returns {Promise<void>} */ /** * Sets the value of the **InBandGain** property. * An alias for SetInbandGain. * * @method OcaFilterParametric#SetInbandgain * @param {number} gain * * @returns {Promise<void>} */ /** * Gets the value and limits of the **ShapeParameter** property. * The return values of this method are * * - shape of type ``number`` * - minShape of type ``number`` * - maxShape of type ``number`` * * @method OcaFilterParametric#GetShapeParameter * @returns {Promise<Arguments<number,number,number>>} */ /** * Sets the value of the S**hapeParameter** property. * * @method OcaFilterParametric#SetShapeParameter * @param {number} shape * * @returns {Promise<void>} */ /** * Sets some or all filter parameters. The action of this method is atomic - if * any of the value changes fails, none of the changes are made. * * @method OcaFilterParametric#SetMultiple * @param {IOcaParameterMask} Mask * @param {number} Frequency * @param {IOcaParametricEQShape} Shape * @param {number} WidthParameter * @param {number} InBandGain * @param {number} ShapeParameter * * @returns {Promise<void>} */ /** * This event is emitted when the property ``Frequency`` changes in the remote object. * The property ``Frequency`` is described in the AES70 standard as follows. * Frequency setpoint of the parametric filter. * * @member {PropertyEvent<number>} OcaFilterParametric#OnFrequencyChanged */ /** * This event is emitted when the property ``Shape`` changes in the remote object. * The property ``Shape`` is described in the AES70 standard as follows. * Shape of the parametric filter - peak, shelf, etc. * * @member {PropertyEvent<OcaParametricEQShape>} OcaFilterParametric#OnShapeChanged */ /** * This event is emitted when the property ``WidthParameter`` changes in the remote object. * The property ``WidthParameter`` is described in the AES70 standard as follows. * Width parameter. For normal parametric implementations, this is the Q of the * filter. * * @member {PropertyEvent<number>} OcaFilterParametric#OnWidthParameterChanged */ /** * An alias for OnWidthParameterChanged * * @member {PropertyEvent<number>} OcaFilterParametric#OnQChanged */ /** * This event is emitted when the property ``InBandGain`` changes in the remote object. * The property ``InBandGain`` is described in the AES70 standard as follows. * In-band gain of the parametric filter. * * @member {PropertyEvent<number>} OcaFilterParametric#OnInBandGainChanged */ /** * An alias for OnInBandGainChanged * * @member {PropertyEvent<number>} OcaFilterParametric#OnInbandGainChanged */ /** * This event is emitted when the property ``ShapeParameter`` changes in the remote object. * The property ``ShapeParameter`` is described in the AES70 standard as follows. * Width parameter. For certain filter types, this parameter may be used to * represent extra information about the shape of the transfer function. * * @member {PropertyEvent<number>} OcaFilterParametric#OnShapeParameterChanged */