# Flanger

amp: | 1 | mix: | 1 | pre_mix: | 1 | pre_amp: | 1
phase: | 4 | phase_offset: | 0 | wave: | 4 | invert_wave: | 0
stereo_invert_wave: | 0 | delay: | 5 | max_delay: | 20 | depth: | 5
decay: | 2 | feedback: | 0 | invert_flange: | 0

``

    with_fx :flanger do
      play 50
    end

Mix the incoming signal with a copy of itself which has a rate modulating faster and slower than the original. Creates a swirling/whooshing effect.

Introduced in v2.3

## Options

amp: | The amplitude of the sound. Typically a value between 0 and 1. Higher amplitudes may be used, but won’t make the sound louder, they will just reduce the quality of all the sounds currently being played (due to compression.) Default: 1 Must be zero or greater May be changed whilst playing Has slide options to shape changes
mix: | The amount (percentage) of FX present in the resulting sound represented as a value between 0 and 1. For example, a mix of 0 means that only the original sound is heard, a mix of 1 means that only the FX is heard (typically the default) and a mix of 0.5 means that half the original and half of the FX is heard. Default: 1 Must be a value between 0 and 1 inclusively May be changed whilst playing Has slide options to shape changes
pre_mix: | The amount (percentage) of the original signal that is fed into the internal FX system as a value between 0 and 1. With a pre_mix: of 0 the FX is completely bypassed unlike a mix: of 0 where the internal FX is still being fed the original signal but the output of the FX is ignored. The difference between the two is subtle but important and is evident when the FX has a residual component such as echo or reverb. When switching mix: from 0 to 1, the residual component of the FX’s output from previous audio is present in the output signal. With pre_mix: there is no residual component of the previous audio in the output signal. Default: 1 Must be zero or greater May be changed whilst playing Has slide options to shape changes
pre_amp: | Amplification applied to the input signal immediately before it is passed to the FX. Default: 1 Must be zero or greater May be changed whilst playing Has slide options to shape changes
phase: | Phase duration in beats of flanger modulation. Default: 4 Must be greater than zero May be changed whilst playing Has slide options to shape changes Scaled with current BPM value
phase_offset: | Initial modulation phase offset (a value between 0 and 1). Default: 0 Must be a value between 0 and 1 inclusively Can not be changed once set
wave: | Wave type - 0 saw, 1 pulse, 2 triangle, 3 sine, 4 cubic. Different waves will produce different flanging modulation effects. Default: 4 Must be one of the following values: [0, 1, 2, 3, 4] May be changed whilst playing
invert_wave: | Invert flanger control waveform (i.e. flip it on the y axis). 0=uninverted wave, 1=inverted wave. Default: 0 Must be one of the following values: [0, 1] May be changed whilst playing
stereo_invert_wave: | Make the flanger control waveform in the left ear an inversion of the control waveform in the right ear. 0=uninverted wave, 1=inverted wave. This happens after the standard wave inversion with param :invert_wave. Default: 0 Must be one of the following values: [0, 1] May be changed whilst playing
delay: | Amount of delay time between original and flanged version of audio. Default: 5 May be changed whilst playing Has slide options to shape changes
max_delay: | Max delay time. Used to set internal buffer size. Default: 20 Must be zero or greater Can not be changed once set
depth: | Flange depth - greater depths produce a more prominent effect. Default: 5 May be changed whilst playing Has slide options to shape changes
decay: | Flange decay time in ms Default: 2 Must be zero or greater May be changed whilst playing Has slide options to shape changes
feedback: | Amount of feedback. Default: 0 Must be zero or greater May be changed whilst playing Has slide options to shape changes
invert_flange: | Invert flanger signal. 0=no inversion, 1=inverted signal. Default: 0 Must be one of the following values: [0, 1] May be changed whilst playing

## Slide Options

Any parameter that is slidable has three additional options named _slide, _slide_curve, and _slide_shape. For example, 'amp' is slidable, so you can also set amp_slide, amp_slide_curve, and amp_slide_shape with the following effects:

_slide: | Amount of time (in beats) for the parameter value to change. A long parameter_slide value means that the parameter takes a long time to slide from the previous value to the new value. A parameter_slide of 0 means that the parameter instantly changes to the new value. Default: 0
_slide_shape: | Shape of curve. 0: step, 1: linear, 3: sine, 4: welch, 5: custom (use *_slide_curve: opt e.g. amp_slide_curve:), 6: squared, 7: cubed. Default: 5
_slide_curve: | Shape of the slide curve (only honoured if slide shape is 5). 0 means linear and positive and negative numbers curve the segment up and down respectively. Default: 0