Class PitchShift


  • public class PitchShift
    extends java.lang.Object
    Perform pitch scaling of an input signal.
    Since:
    Ptolemy II 1.0
    Version:
    $Id$
    Author:
    Brian K. Vogel
    Pt.AcceptedRating:
    Red (vogel)
    Pt.ProposedRating:
    Red (vogel)
    • Constructor Summary

      Constructors 
      Constructor Description
      PitchShift​(float sampleRate)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double[] performPitchShift​(double[] in, double[] pitchArray, double pitchScaleIn)
      Perform pitch shifting on the input signal.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PitchShift

        public PitchShift​(float sampleRate)
    • Method Detail

      • performPitchShift

        public double[] performPitchShift​(double[] in,
                                          double[] pitchArray,
                                          double pitchScaleIn)
        Perform pitch shifting on the input signal. Read in an array of doubles in in[], sampled at _sampleRate, with corresponding pitch values given by pitchArray. The desired pitch scale factor is passed via pitchScaleIn. The delayed and pitch shifted signal is returned as a vector of the same length as in[]. The delay (latency) of this pitch shifter is given by _pitchDetectorDelay + OUTPUT_BUFFER_DELAY + _sampleRate/MINIMUM_PITCH. The delay of the external pitch detector (delay between a sample of in and the sample of pitchArray containing the corresponding pitch) is set by _pitchDetectorDelay.