def vol(self, gain, gain_type='<STR_LIT>', limiter_gain=None):
if not is_number(gain):<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>if limiter_gain is not None:<EOL><INDENT>if (not is_number(limiter_gain) or<EOL>limiter_gain <= <NUM_LIT:0> or limiter_gain >= <NUM_LIT:1>):<EOL><INDENT>raise ValueError(<EOL>'<STR_LIT>'<EOL>)<EOL><DEDENT><DEDENT>if gain_type in ['<STR_LIT>', '<STR_LIT>'] and gain < <NUM_LIT:0>:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>effect_args = ['<STR_LIT>']<EOL>effect_args.append('<STR_LIT>'.format(gain))<EOL>if gain_type == '<STR_LIT>':<EOL><INDENT>effect_args.append('<STR_LIT>')<EOL><DEDENT>elif gain_type == '<STR_LIT>':<EOL><INDENT>effect_args.append('<STR_LIT>')<EOL><DEDENT>elif gain_type == '<STR_LIT>':<EOL><INDENT>effect_args.append('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>if limiter_gain is not None:<EOL><INDENT>if gain_type in ['<STR_LIT>', '<STR_LIT>'] and gain > <NUM_LIT:1>:<EOL><INDENT>effect_args.append('<STR_LIT>'.format(limiter_gain))<EOL><DEDENT>elif gain_type == '<STR_LIT>' and gain > <NUM_LIT:0>:<EOL><INDENT>effect_args.append('<STR_LIT>'.format(limiter_gain))<EOL><DEDENT><DEDENT>self.effects.extend(effect_args)<EOL>self.effects_log.append('<STR_LIT>')<EOL>return self<EOL>
Apply an amplification or an attenuation to the audio signal.

        Parameters
        ----------
        gain : float
            Interpreted according to the given `gain_type`.
            If `gain_type' = 'amplitude', `gain' is a positive amplitude ratio.
            If `gain_type' = 'power', `gain' is a power (voltage squared).
            If `gain_type' = 'db', `gain' is in decibels.
        gain_type : string, default='amplitude'
            Type of gain. One of:
                - 'amplitude'
                - 'power'
                - 'db'
        limiter_gain : float or None, default=None
            If specified, a limiter is invoked on peaks greater than
            `limiter_gain' to prevent clipping.
            `limiter_gain` should be a positive value much less than 1.

        See Also
        --------
        gain, compand