#

- Developed by Dented Pixel
API Docs for: LeanTween 2.50

### Support LeanTween!

#### Maintaining and adding new features takes time, your support is appreciated.

Show: Inherited Protected Private Deprecated

# LeanAudioOptions Class

Defined in: `LeanAudio.cs:316`

Pass in options to LeanAudio

## Constructor

### `LeanAudioOptions`

()

Defined in `LeanAudio.cs:316`

- Index
- Methods

## Item Index

### Methods

- setFrequency
- setVibrato

## Methods

### `setFrequency`

(

- `frequencyRate:int`

)
LeanAudioOptions

Defined in `LeanAudio.cs:343`

Set the frequency for the audio is encoded. 44100 is CD quality, but you can usually get away with much lower (or use a lower amount to get a more 8-bit sound).

#### Parameters:

- `frequencyRate:int` Int

  of the frequency you wish to encode the AudioClip at

#### Returns:

LeanAudioOptions:

LeanAudioOptions describing optional values

#### Example:

AnimationCurve volumeCurve = new AnimationCurve( new Keyframe(0f, 1f, 0f, -1f), new Keyframe(1f, 0f, -1f, 0f));
AnimationCurve frequencyCurve = new AnimationCurve( new Keyframe(0f, 0.003f, 0f, 0f), new Keyframe(1f, 0.003f, 0f, 0f));
AudioClip audioClip = LeanAudio.createAudio(volumeCurve, frequencyCurve, LeanAudio.options().setVibrato( new Vector3[]{ new Vector3(0.32f,0f,0f)} ).setFrequency(12100) );

### `setVibrato`

(

- `vibratoArray:Vector3[]`

)
LeanAudioOptions

Defined in `LeanAudio.cs:359`

Set details about the shape of the curve by adding vibrato modulations through it (alters the peak values giving it a wah-wah effect). You can add as many as you want to sculpt out more detail in the sound wave.

#### Parameters:

- `vibratoArray:Vector3[]` Vector3

  The first value is the period in seconds that you wish to have the vibrato wave fluctuate at. The second value is the minimum height you wish the vibrato wave to dip down to (default is zero). The third is reserved for future effects.

#### Returns:

LeanAudioOptions:

LeanAudioOptions describing optional values

#### Example:

AnimationCurve volumeCurve = new AnimationCurve( new Keyframe(0f, 1f, 0f, -1f), new Keyframe(1f, 0f, -1f, 0f));
AnimationCurve frequencyCurve = new AnimationCurve( new Keyframe(0f, 0.003f, 0f, 0f), new Keyframe(1f, 0.003f, 0f, 0f));
AudioClip audioClip = LeanAudio.createAudio(volumeCurve, frequencyCurve, LeanAudio.options().setVibrato( new Vector3[]{ new Vector3(0.32f,0.3f,0f)} ).setFrequency(12100) );