Platforms to show: All Mac Windows Linux Cross-Platform

Back to AVAudioUnitVarispeedMBS class.

AVAudioUnitVarispeedMBS.Rate as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundationNode MBS AVFoundation Plugin 15.3 ✅ Yes ❌ No ❌ No ✅ Yes All
The audio playback rate.

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.0 results in the output audio playing one octave higher. Similarly changing the rate to 0.5, 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.

Using the rate value you calculate the pitch (in cents) using the formula pitch = 1200.0 * log2(rate). Conversely, you calculate the appropriate rate for a desired pitch with the formula rate = pow(2, cents/1200.0).

The default value is 1.0. The range of values is 0.25 to 4.0. The unit of rate is unspecified.
(Read and Write property)

The items on this page are in the following plugins: MBS AVFoundation Plugin.


The biggest plugin in space...