# DynamicsProcessing.BandBase

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# BandBase

*** ** * ** ***

Kotlin \|[Java](https://developer.android.com/reference/android/media/audiofx/DynamicsProcessing.BandBase "View this page in Java")  

```
class BandBase
```

|---|--------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                         ||
| ↳ | [android.media.audiofx.DynamicsProcessing.BandBase](https://developer.android.com/reference/kotlin/android/media/audiofx/DynamicsProcessing.BandBase#) |

|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Known Direct Subclasses [DynamicsProcessing.EqBand](https://developer.android.com/reference/kotlin/android/media/audiofx/DynamicsProcessing.EqBand), [DynamicsProcessing.MbcBand](https://developer.android.com/reference/kotlin/android/media/audiofx/DynamicsProcessing.MbcBand) |-------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [DynamicsProcessing.EqBand](https://developer.android.com/reference/kotlin/android/media/audiofx/DynamicsProcessing.EqBand)   | Class for Equalizer Bands Equalizer bands have three controllable parameters: enabled/disabled, cutoffFrequency and gain                                                                                                                 | | [DynamicsProcessing.MbcBand](https://developer.android.com/reference/kotlin/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. | |

Base class for bands

## Summary

|                                                                                                                                                                                       Public constructors                                                                                                                                                                                       ||
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [BandBase](https://developer.android.com/reference/kotlin/android/media/audiofx/DynamicsProcessing.BandBase#BandBase(kotlin.Boolean,%20kotlin.Float))`(`enabled:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`, `cutoffFrequency:` `[Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)`)` Class constructor for BandBase |

|                                                                                                                                                                                                 Public methods                                                                                                                                                                                                  ||
|-----------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)     | [getCutoffFrequency](https://developer.android.com/reference/kotlin/android/media/audiofx/DynamicsProcessing.BandBase#getCutoffFrequency())`()` gets cutoffFrequency for this band in Hertz (Hz)                                                                                                                       |
| open [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [isEnabled](https://developer.android.com/reference/kotlin/android/media/audiofx/DynamicsProcessing.BandBase#isEnabled())`()` returns enabled state of the band                                                                                                                                                        |
| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)       | [setCutoffFrequency](https://developer.android.com/reference/kotlin/android/media/audiofx/DynamicsProcessing.BandBase#setCutoffFrequency(kotlin.Float))`(`frequency:` `[Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)`)` sets topmost frequency number (in Hz) this band will process. |
| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)       | [setEnabled](https://developer.android.com/reference/kotlin/android/media/audiofx/DynamicsProcessing.BandBase#setEnabled(kotlin.Boolean))`(`enabled:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` sets enabled state of the band                                            |
| open [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)   | [toString](https://developer.android.com/reference/kotlin/android/media/audiofx/DynamicsProcessing.BandBase#toString())`()` <br />                                                                                                                                                                                     |

## Public constructors

### BandBase

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
BandBase(
    enabled: Boolean, 
    cutoffFrequency: Float)
```

Class constructor for BandBase

|                                                                                                                                                                                                         Parameters                                                                                                                                                                                                          ||
|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `enabled`         | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html): true if this band is currently used to process sound. When false, the band is effectively muted and sound set to zero.                                                                                                                                                                                               |
| `cutoffFrequency` | [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html): 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. |

## Public methods

### getCutoffFrequency

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun getCutoffFrequency(): Float
```

gets cutoffFrequency for this band in Hertz (Hz)

|                                                           Return                                                            ||
|--------------------------------------------------------------------------------|---------------------------------------------|
| [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html) | cutoffFrequency for this band in Hertz (Hz) |

### isEnabled

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun isEnabled(): Boolean
```

returns enabled state of the band

|                                                                    Return                                                                    ||
|------------------------------------------------------------------------------------|----------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | true if bands is enabled for processing, false otherwise |

### setCutoffFrequency

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun setCutoffFrequency(frequency: Float): Unit
```

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

|                                          Parameters                                          ||
|-------------|---------------------------------------------------------------------------------|
| `frequency` | [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html): |

### setEnabled

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun setEnabled(enabled: Boolean): Unit
```

sets enabled state of the band

|                                                            Parameters                                                            ||
|-----------|-----------------------------------------------------------------------------------------------------------------------|
| `enabled` | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html): true for enabled, false otherwise |

### toString

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun toString(): String
```

|                                                          Return                                                          ||
|----------------------------------------------------------------------------------|----------------------------------------|
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | a string representation of the object. |