# Ping Pong Echo

amp: | 1 | mix: | 1 | pre_mix: | 1 | pre_amp: | 1
phase: | 0.25 | feedback: | 0.5 | max_phase: | 1 | pan_start: | 1

``

    with_fx :ping_pong do
      play 50
    end

Echo FX with each delayed echo swapping between left and right channels. Has variable phase duration (time between echoes) and feedback (proportion of sound fed into each echo). If you wish to have a phase duration longer than 1s, you need to specify the longest phase duration you’d like with the arg max_phase. Be warned, `:ping_pong` FX with very long phases can consume a lot of memory and take longer to initialise. Also, large values for feedback will cause the echo to last for a very long time.

Note: sliding the `phase:` opt with `phase_slide:` will also cause each echo during the slide to change in pitch, in much the same way that a sample’s pitch changes when altering its rate.

Introduced in v3.2

## 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: | The time between echoes in beats. Default: 0.25 Must be greater than zero May be changed whilst playing Has slide options to shape changes Scaled with current BPM value
feedback: | Proportion of sound fed into each successive echo from the previous one. Default: 0.5 Must be greater than zero, must be a value less than 1 May be changed whilst playing Has slide options to shape changes
max_phase: | The maximum phase duration in beats. Default: 1 Must be greater than zero Can not be changed once set Scaled with current BPM value
pan_start: | Starting position of sound in the stereo field. With headphones on, this means how much of the sound starts in the left ear, and how much starts in the right ear. With a value of -1, the sound starts completely in the left ear, a value of 0 starts the sound equally in both ears, and a value of 1 starts the sound completely in the right ear. Values in between -1 and 1 move the sound accordingly. Each echo will swap between left and right at the same distance away from 0 (the centre) that this `pan_start:` opt is set to. For example, with a value of -1, the sound starts completely in the left ear, and the echoes after this will swap between fully right and fully left (1 and -1). With a value of 0, since the sound starts in the centre of the stereo field, each echo also stays in the centre, meaning the panning effect is cancelled out. Default: 1 Must be a value between -1 and 1 inclusively Can not be changed once set

## 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