The audio playback rate.
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
The varispeed audio unit resamples the input signal, as a result changing the playback rate also changes the pitch. For example, changing the rate to
2 results in the output audio playing one octave higher. Similarly changing the rate to
0, results in the output audio playing one octave lower.
The pitch is measured in “cents”, a logarithmic value used for measuring musical intervals. One octave is equal to 1200 cents. One musical semitone is equal to 100 cents.
rate value you calculate the pitch (in cents) using the formula
pitch = 1200. Conversely, you calculate the appropriate
rate for a desired pitch with the formula
rate = pow(2, cents/1200.
The default value is
1. The range of values is
4. The unit of
rate is unspecified.