def sinc(self, filter_type='<STR_LIT>', cutoff_freq=<NUM_LIT>,<EOL>stop_band_attenuation=<NUM_LIT>, transition_bw=None,<EOL>phase_response=None):
filter_types = ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>']<EOL>if filter_type not in filter_types:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>".format('<STR_LIT:U+002CU+0020>'.join(filter_types))<EOL>)<EOL><DEDENT>if not (is_number(cutoff_freq) or isinstance(cutoff_freq, list)):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if filter_type in ['<STR_LIT>', '<STR_LIT>'] and isinstance(cutoff_freq, list):<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>if filter_type in ['<STR_LIT>', '<STR_LIT>'] and is_number(cutoff_freq):<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>if is_number(cutoff_freq) and cutoff_freq <= <NUM_LIT:0>:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if isinstance(cutoff_freq, list):<EOL><INDENT>if len(cutoff_freq) != <NUM_LIT:2>:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>if any([not is_number(f) or f <= <NUM_LIT:0> for f in cutoff_freq]):<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>cutoff_freq = sorted(cutoff_freq)<EOL><DEDENT>if not is_number(stop_band_attenuation) or stop_band_attenuation < <NUM_LIT:0>:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if not (is_number(transition_bw) or<EOL>isinstance(transition_bw, list) or transition_bw is None):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if filter_type in ['<STR_LIT>', '<STR_LIT>'] and isinstance(transition_bw, list):<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>if is_number(transition_bw) and transition_bw <= <NUM_LIT:0>:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if isinstance(transition_bw, list):<EOL><INDENT>if any([not is_number(f) or f <= <NUM_LIT:0> for f in transition_bw]):<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>if len(transition_bw) != <NUM_LIT:2>:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT><DEDENT>if phase_response is not None and not is_number(phase_response):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if (is_number(phase_response) and<EOL>(phase_response < <NUM_LIT:0> or phase_response > <NUM_LIT:100>)):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>effect_args = ['<STR_LIT>']<EOL>effect_args.extend(['<STR_LIT>', '<STR_LIT>'.format(stop_band_attenuation)])<EOL>if phase_response is not None:<EOL><INDENT>effect_args.extend(['<STR_LIT>', '<STR_LIT>'.format(phase_response)])<EOL><DEDENT>if filter_type == '<STR_LIT>':<EOL><INDENT>if transition_bw is not None:<EOL><INDENT>effect_args.extend(['<STR_LIT>', '<STR_LIT>'.format(transition_bw)])<EOL><DEDENT>effect_args.append('<STR_LIT>'.format(cutoff_freq))<EOL><DEDENT>elif filter_type == '<STR_LIT>':<EOL><INDENT>effect_args.append('<STR_LIT>'.format(cutoff_freq))<EOL>if transition_bw is not None:<EOL><INDENT>effect_args.extend(['<STR_LIT>', '<STR_LIT>'.format(transition_bw)])<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if is_number(transition_bw):<EOL><INDENT>effect_args.extend(['<STR_LIT>', '<STR_LIT>'.format(transition_bw)])<EOL><DEDENT>elif isinstance(transition_bw, list):<EOL><INDENT>effect_args.extend(['<STR_LIT>', '<STR_LIT>'.format(transition_bw[<NUM_LIT:0>])])<EOL><DEDENT><DEDENT>if filter_type == '<STR_LIT>':<EOL><INDENT>effect_args.append(<EOL>'<STR_LIT>'.format(cutoff_freq[<NUM_LIT:0>], cutoff_freq[<NUM_LIT:1>])<EOL>)<EOL><DEDENT>elif filter_type == '<STR_LIT>':<EOL><INDENT>effect_args.append(<EOL>'<STR_LIT>'.format(cutoff_freq[<NUM_LIT:1>], cutoff_freq[<NUM_LIT:0>])<EOL>)<EOL><DEDENT>if isinstance(transition_bw, list):<EOL><INDENT>effect_args.extend(['<STR_LIT>', '<STR_LIT>'.format(transition_bw[<NUM_LIT:1>])])<EOL><DEDENT>self.effects.extend(effect_args)<EOL>self.effects_log.append('<STR_LIT>')<EOL>return self<EOL>
Apply a sinc kaiser-windowed low-pass, high-pass, band-pass, or
        band-reject filter to the signal.

        Parameters
        ----------
        filter_type : str, default='high'
            Type of filter. One of:
                - 'high' for a high-pass filter
                - 'low' for a low-pass filter
                - 'pass' for a band-pass filter
                - 'reject' for a band-reject filter
        cutoff_freq : float or list, default=3000
            A scalar or length 2 list indicating the filter's critical
            frequencies. The critical frequencies are given in Hz and must be
            positive. For a high-pass or low-pass filter, cutoff_freq
            must be a scalar. For a band-pass or band-reject filter, it must be
            a length 2 list.
        stop_band_attenuation : float, default=120
            The stop band attenuation in dB
        transition_bw : float, list or None, default=None
            The transition band-width in Hz.
            If None, sox's default of 5% of the total bandwith is used.
            If a float, the given transition bandwith is used for both the
            upper and lower bands (if applicable).
            If a list, the first argument is used for the lower band and the
            second for the upper band.
        phase_response : float or None
            The filter's phase response between 0 (minimum) and 100 (maximum).
            If None, sox's default phase repsonse is used.

        See Also
        --------
        band, bandpass, bandreject, highpass, lowpass