def pitch(self, n_semitones, quick=False):
if not is_number(n_semitones):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if n_semitones < -<NUM_LIT:12> or n_semitones > <NUM_LIT:12>:<EOL><INDENT>logger.warning(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>if not isinstance(quick, bool):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>effect_args = ['<STR_LIT>']<EOL>if quick:<EOL><INDENT>effect_args.append('<STR_LIT>')<EOL><DEDENT>effect_args.append('<STR_LIT>'.format(n_semitones * <NUM_LIT>))<EOL>self.effects.extend(effect_args)<EOL>self.effects_log.append('<STR_LIT>')<EOL>return self<EOL>
Pitch shift the audio without changing the tempo.

        This effect uses the WSOLA algorithm. The audio is chopped up into
        segments which are then shifted in the time domain and overlapped
        (cross-faded) at points where their waveforms are most similar as
        determined by measurement of least squares.

        Parameters
        ----------
        n_semitones : float
            The number of semitones to shift. Can be positive or negative.
        quick : bool, default=False
            If True, this effect will run faster but with lower sound quality.

        See Also
        --------
        bend, speed, tempo