def chorus(self, gain_in=<NUM_LIT:0.5>, gain_out=<NUM_LIT>, n_voices=<NUM_LIT:3>, delays=None,<EOL>decays=None, speeds=None, depths=None, shapes=None):
if not is_number(gain_in) or gain_in <= <NUM_LIT:0> or gain_in > <NUM_LIT:1>:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if not is_number(gain_out) or gain_out <= <NUM_LIT:0> or gain_out > <NUM_LIT:1>:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if not isinstance(n_voices, int) or n_voices <= <NUM_LIT:0>:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if not (delays is None or isinstance(delays, list)):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if delays is not None:<EOL><INDENT>if len(delays) != n_voices:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if any((not is_number(p) or p < <NUM_LIT:20>) for p in delays):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT><DEDENT>else:<EOL><INDENT>delays = [random.uniform(<NUM_LIT>, <NUM_LIT>) for _ in range(n_voices)]<EOL><DEDENT>if not (decays is None or isinstance(decays, list)):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if decays is not None:<EOL><INDENT>if len(decays) != n_voices:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if any((not is_number(p) or p <= <NUM_LIT:0> or p > <NUM_LIT:1>) for p in decays):<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>decays = [random.uniform(<NUM_LIT>, <NUM_LIT>) for _ in range(n_voices)]<EOL><DEDENT>if not (speeds is None or isinstance(speeds, list)):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if speeds is not None:<EOL><INDENT>if len(speeds) != n_voices:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if any((not is_number(p) or p <= <NUM_LIT:0>) for p in speeds):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT><DEDENT>else:<EOL><INDENT>speeds = [random.uniform(<NUM_LIT>, <NUM_LIT>) for _ in range(n_voices)]<EOL><DEDENT>if not (depths is None or isinstance(depths, list)):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if depths is not None:<EOL><INDENT>if len(depths) != n_voices:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if any((not is_number(p) or p <= <NUM_LIT:0>) for p in depths):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT><DEDENT>else:<EOL><INDENT>depths = [random.uniform(<NUM_LIT:1.0>, <NUM_LIT>) for _ in range(n_voices)]<EOL><DEDENT>if not (shapes is None or isinstance(shapes, list)):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if shapes is not None:<EOL><INDENT>if len(shapes) != n_voices:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if any((p not in ['<STR_LIT:t>', '<STR_LIT:s>']) for p in shapes):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT><DEDENT>else:<EOL><INDENT>shapes = [random.choice(['<STR_LIT:t>', '<STR_LIT:s>']) for _ in range(n_voices)]<EOL><DEDENT>effect_args = ['<STR_LIT>', '<STR_LIT:{}>'.format(gain_in), '<STR_LIT:{}>'.format(gain_out)]<EOL>for i in range(n_voices):<EOL><INDENT>effect_args.extend([<EOL>'<STR_LIT>'.format(delays[i]),<EOL>'<STR_LIT>'.format(decays[i]),<EOL>'<STR_LIT>'.format(speeds[i]),<EOL>'<STR_LIT>'.format(depths[i]),<EOL>'<STR_LIT>'.format(shapes[i])<EOL>])<EOL><DEDENT>self.effects.extend(effect_args)<EOL>self.effects_log.append('<STR_LIT>')<EOL>return self<EOL>
Add a chorus effect to the audio. This can makeasingle vocal sound
        like a chorus, but can also be applied to instrumentation.

        Chorus resembles an echo effect with a short delay, but whereas with
        echo the delay is constant, with chorus, it is varied using sinusoidal
        or triangular modulation. The modulation depth defines the range the
        modulated delay is played before or after the delay. Hence the delayed
        sound will sound slower or faster, that is the delayed sound tuned
        around the original one, like in a chorus where some vocals are
        slightly off key.

        Parameters
        ----------
        gain_in : float, default=0.3
            The time in seconds over which the instantaneous level of the input
            signal is averaged to determine increases in volume.
        gain_out : float, default=0.8
            The time in seconds over which the instantaneous level of the input
            signal is averaged to determine decreases in volume.
        n_voices : int, default=3
            The number of voices in the chorus effect.
        delays : list of floats > 20 or None, default=None
            If a list, the list of delays (in miliseconds) of length n_voices.
            If None, the individual delay parameters are chosen automatically
            to be between 40 and 60 miliseconds.
        decays : list of floats or None, default=None
            If a list, the list of decays (as a fraction of gain_in) of length
            n_voices.
            If None, the individual decay parameters are chosen automatically
            to be between 0.3 and 0.4.
        speeds : list of floats or None, default=None
            If a list, the list of modulation speeds (in Hz) of length n_voices
            If None, the individual speed parameters are chosen automatically
            to be between 0.25 and 0.4 Hz.
        depths : list of floats or None, default=None
            If a list, the list of depths (in miliseconds) of length n_voices.
            If None, the individual delay parameters are chosen automatically
            to be between 1 and 3 miliseconds.
        shapes : list of 's' or 't' or None, deault=None
            If a list, the list of modulation shapes - 's' for sinusoidal or
            't' for triangular - of length n_voices.
            If None, the individual shapes are chosen automatically.