Added in API level 28

MbcBand


class MbcBand : DynamicsProcessing.BandBase
kotlin.Any
   ↳ android.media.audiofx.DynamicsProcessing.BandBase
   ↳ android.media.audiofx.DynamicsProcessing.MbcBand

Class for Multi-Band compressor bands MBC bands have multiple controllable parameters: enabled/disabled, cutoffFrequency, attackTime, releaseTime, ratio, threshold, kneeWidth, noiseGateThreshold, expanderRatio, preGain and postGain.

Summary

Public constructors
MbcBand(enabled: Boolean, cutoffFrequency: Float, attackTime: Float, releaseTime: Float, ratio: Float, threshold: Float, kneeWidth: Float, noiseGateThreshold: Float, expanderRatio: Float, preGain: Float, postGain: Float)

Class constructor for MbcBand

Class constructor for MbcBand

Public methods
Float

gets attack time for compressor in milliseconds (ms)

Float

gets Expander ratio (1:N) for signals below the Noise Gate Threshold.

Float

get Knee Width in decibels (dB) around compressor threshold point.

Float

gets the noise gate threshold in decibels (dB) from 0 dB Full Scale (dBFS).

Float

gets the gain applied to the signal AFTER compression.

Float

gets the gain applied to the signal BEFORE the compression.

Float

gets the compressor ratio (N:1)

Float

gets release time for compressor in milliseconds (ms)

Float

gets the compressor threshold measured in decibels (dB) from 0 dB Full Scale (dBFS).

Unit
setAttackTime(attackTime: Float)

sets attack time for compressor in milliseconds (ms)

Unit
setExpanderRatio(expanderRatio: Float)

sets Expander ratio (1:N) for signals below the Noise Gate Threshold.

Unit
setKneeWidth(kneeWidth: Float)

sets knee width in decibels (dB).

Unit
setNoiseGateThreshold(noiseGateThreshold: Float)

sets noise gate threshod in decibels (dB).

Unit
setPostGain(postGain: Float)

sets the gain to be applied to the siganl AFTER the compression.

Unit
setPreGain(preGain: Float)

sets the gain to be applied to the signal BEFORE the compression, measured in decibels (dB), where 0 dB means no level change.

Unit
setRatio(ratio: Float)

sets compressor ratio (N:1)

Unit
setReleaseTime(releaseTime: Float)

sets release time for compressor in milliseconds (ms)

Unit
setThreshold(threshold: Float)

sets the compressor threshold measured in decibels (dB) from 0 dB Full Scale (dBFS).

String

Inherited functions

Public constructors

MbcBand

Added in API level 28
MbcBand(
    enabled: Boolean,
    cutoffFrequency: Float,
    attackTime: Float,
    releaseTime: Float,
    ratio: Float,
    threshold: Float,
    kneeWidth: Float,
    noiseGateThreshold: Float,
    expanderRatio: Float,
    preGain: Float,
    postGain: Float)

Class constructor for MbcBand

Parameters
enabled Boolean: true if this band is currently used to process sound. When false, the band is effectively muted and sound set to zero.
cutoffFrequency Float: topmost frequency number (in Hz) this band will process. The effective bandwidth for the band is then computed using this and the previous band topmost frequency (or 0 Hz for band number 0). Frequencies are expected to increase with band number, thus band 0 cutoffFrequency <= band 1 cutoffFrequency, and so on.
attackTime Float: Attack Time for compressor in milliseconds (ms)
releaseTime Float: Release Time for compressor in milliseconds (ms)
ratio Float: Compressor ratio (N:1) (input:output)
threshold Float: Compressor threshold measured in decibels (dB) from 0 dB Full Scale (dBFS).
kneeWidth Float: Width in decibels (dB) around compressor threshold point.
noiseGateThreshold Float: Noise gate threshold in decibels (dB) from 0 dB Full Scale (dBFS).
expanderRatio Float: Expander ratio (1:N) (input:output) for signals below the Noise Gate Threshold.
preGain Float: Gain applied to the signal BEFORE the compression.
postGain Float: Gain applied to the signal AFTER compression.

MbcBand

Added in API level 28
MbcBand(cfg: DynamicsProcessing.MbcBand!)

Class constructor for MbcBand

Parameters
cfg DynamicsProcessing.MbcBand!: copy constructor

Public methods

getAttackTime

Added in API level 28
fun getAttackTime(): Float

gets attack time for compressor in milliseconds (ms)

Return
Float attack time for compressor in milliseconds (ms)

getExpanderRatio

Added in API level 28
fun getExpanderRatio(): Float

gets Expander ratio (1:N) for signals below the Noise Gate Threshold.

Return
Float Expander ratio (1:N)

getKneeWidth

Added in API level 28
fun getKneeWidth(): Float

get Knee Width in decibels (dB) around compressor threshold point. Widths are always positive, with higher values representing a wider area of transition from the linear zone to the compression zone. A knee of 0 dB means a more abrupt transition.

Return
Float Knee Width in decibels (dB)

getNoiseGateThreshold

Added in API level 28
fun getNoiseGateThreshold(): Float

gets the noise gate threshold in decibels (dB) from 0 dB Full Scale (dBFS). Noise gate thresholds are negative. Signals below this level will be expanded according the expanderRatio parameter. A Noise Gate Threshold of -75 dB means very quiet signals might be effectively removed from the signal.

Return
Float Noise Gate Threshold in decibels (dB)

getPostGain

Added in API level 28
fun getPostGain(): Float

gets the gain applied to the signal AFTER compression. Measured in decibels (dB) where 0 dB means no level change

Return
Float postGain value in decibels (dB)

getPreGain

Added in API level 28
fun getPreGain(): Float

gets the gain applied to the signal BEFORE the compression. Measured in decibels (dB) where 0 dB means no level change.

Return
Float preGain value in decibels (dB)

getRatio

Added in API level 28
fun getRatio(): Float

gets the compressor ratio (N:1)

Return
Float compressor ratio (N:1)

getReleaseTime

Added in API level 28
fun getReleaseTime(): Float

gets release time for compressor in milliseconds (ms)

Return
Float release time for compressor in milliseconds (ms)

getThreshold

Added in API level 28
fun getThreshold(): Float

gets the compressor threshold measured in decibels (dB) from 0 dB Full Scale (dBFS). Thresholds are negative. A threshold of 0 dB means no compression will take place.

Return
Float compressor threshold in decibels (dB)

setAttackTime

Added in API level 28
fun setAttackTime(attackTime: Float): Unit

sets attack time for compressor in milliseconds (ms)

Parameters
attackTime Float: desired for compressor in milliseconds (ms)

setExpanderRatio

Added in API level 28
fun setExpanderRatio(expanderRatio: Float): Unit

sets Expander ratio (1:N) for signals below the Noise Gate Threshold.

Parameters
expanderRatio Float: desired expander ratio (1:N)

setKneeWidth

Added in API level 28
fun setKneeWidth(kneeWidth: Float): Unit

sets knee width in decibels (dB). See android.media.audiofx.DynamicsProcessing.MbcBand#getKneeWidth for more information.

Parameters
kneeWidth Float: desired in decibels (dB)

setNoiseGateThreshold

Added in API level 28
fun setNoiseGateThreshold(noiseGateThreshold: Float): Unit

sets noise gate threshod in decibels (dB). See android.media.audiofx.DynamicsProcessing.MbcBand#getNoiseGateThreshold for more information.

Parameters
noiseGateThreshold Float: desired in decibels (dB)

setPostGain

Added in API level 28
fun setPostGain(postGain: Float): Unit

sets the gain to be applied to the siganl AFTER the compression. Measured in decibels (dB), where 0 dB means no level change.

Parameters
postGain Float: desired value in decibels (dB)

setPreGain

Added in API level 28
fun setPreGain(preGain: Float): Unit

sets the gain to be applied to the signal BEFORE the compression, measured in decibels (dB), where 0 dB means no level change.

Parameters
preGain Float: desired in decibels (dB)

setRatio

Added in API level 28
fun setRatio(ratio: Float): Unit

sets compressor ratio (N:1)

Parameters
ratio Float: desired for the compressor (N:1)

setReleaseTime

Added in API level 28
fun setReleaseTime(releaseTime: Float): Unit

sets release time for compressor in milliseconds (ms)

Parameters
releaseTime Float: desired for compressor in milliseconds (ms)

setThreshold

Added in API level 28
fun setThreshold(threshold: Float): Unit

sets the compressor threshold measured in decibels (dB) from 0 dB Full Scale (dBFS). Thresholds are negative. A threshold of 0 dB means no compression will take place.

Parameters
threshold Float: desired for compressor in decibels(dB)

toString

Added in API level 28
fun toString(): String
Return
String a string representation of the object.