Applies a high-quality, real time pitch change to an audio signal.
For example, you can use this Node with the Audio File Node to apply a pitch change to an audio file. For this, connect the Audio File Node to the Pitch Shift Node, and the Pitch Shift Node to an Audio Destination Node.
This is a computationally expensive effect, and you should use it sparingly. A faster alternative is the Constant Offset Node for Melody connections, which changes the pitch of individual notes before synthesizing them (e.g. with an Oscillator Node).
An audio signal to pitch change. This should carry an audible signal to get a meaningful output. It doesn’t work well with control signals.
A control signal to control the pitch change, in semitones. Unlike the Semitones setting however, this input accepts non-integer values.
You can enable this input by enabling automation on the Semitones setting. If you don’t connect anything to this input, it’s as if you connected a constant 0 signal, meaning no actual pitch change will occur. Note: the control signal from this input is processed in blocks of 128 samples.
The pitch change to apply, in semitones (steps of 100 cents). Positive values raise pitch, negative values lower pitch.
Additional pitch change to apply, in cents, on top of the Semitones setting. Positive values raise pitch, negative values lower pitch. Enabling the Pitch-Control Input will hide this setting, because that input then controls all pitch change.
The fast Fourier transform size used when transforming the signal (see the Technical Details section below for what this means)
You will often need to tune this “by ear”. Higher values do a better job at preserving harmonic relations in the source signal, but increase latency, have more processing cost, and may produce “smearing” artifacts (especially with audio signals containing sharp percussion). On the other hand, lower values are faster, have lower latency, but may alter harmonic relations in the source audio signal.
The audio signal with the pitch change applied. If you connected a control signal to the Audio Input, this output will most likely be silent. If you are interested in why this happens, see the next section.
Pitch shifting an audio signal is a complex problem that can be solved in various ways. The Pitch Shift Node in AudioNodes is based on a phase-vocoder algorithm (with identity phase locking), which in turn uses the fast Fourier transform, where the number of frequency components (or frequency bins) is what the Resolution setting changes. This allows using the Pitch Shift Node with any real time audio signal, be it from an Audio File Node to play an audio file, or an Audio Input Node to listen to your microphone.
Due to the nature of this algorithm, the Pitch Shift Node does not really work with control signals, as they rarely have meaningful frequency data in them.
The latency of this Node, in seconds, is always exactly the resolution divided by the sample rate. Thus, a higher sample rate or lower resolution each reduce latency.
The volume of the output might be very slightly lower, depending on the audio signal. This is caused by the Hann Window function used under the hood, but is accounted for when rebuilding the output after pitch shifting.