# MTCoreAudio Value Transformers Reference

MTCoreAudio provides some NSValueTransformers for use with Cocoa Bindings. They are registered and available to Cocoa Bindings when MTCoreAudioDevice is initialized. These transformers must be initialized and registered before any nib file that uses them is loaded.

## Value Transformers

- MTDecibelToLinearTransformer
- MTLinearToDecibelTransformer

### MTDecibelToLinearTransformer

`NSString * const MTDecibelToLinearTransformerName = @"MTDecibelToLinearTransformer"`
The `MTDecibelToLinearTransformerName` value transformer returns an instance of NSNumber containing a double-precision floating point value. The returned value is the result of converting the original logarithmic-scale value, `dB`, to a linear scale with the formula `α = 10(dB/20)`. This transformation is reversible if `α` is positive. The original value must respond to `-doubleValue`.

### MTLinearToDecibelTransformer

`NSString * const MTLinearToDecibelTransformerName = @"MTLinearToDecibelTransformer"`
The `MTLinearToDecibelTransformerName` value transformer returns an instance of NSNumber containing a double-precision floating point value. The returned value is the result of converting the original linear-scale value, `α` (which must be positive), to a logarithmic scale with the formula `dB = 20 × log10(α)`. This transformation is reversible. The original value must respond to `-doubleValue`.
Use this transformer to bind a model object that uses a linear scale to a view object (such as a slider) that uses a log scale.

Mike > Mac OS X > MTCoreAudio.framework > MTCoreAudio Value Transformers