<!--
{
  "documentType" : "article",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/time-pitch-algorithm-settings",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Time pitch algorithm settings"
}
-->

# Time pitch algorithm settings

The constants that define the values for the time pitch algorithms.

## Discussion

In iOS and macOS, the default algorithm for playback for apps linked on or after iOS 15 or macOS 12 is [`timeDomain`](/documentation/AVFoundation/AVAudioTimePitchAlgorithm/timeDomain).

For iOS versions prior to iOS 15, the default value is [`lowQualityZeroLatency`](/documentation/AVFoundation/AVAudioTimePitchAlgorithm/lowQualityZeroLatency), and for macOS versions prior to macOS 12, the default value is [`spectral`](/documentation/AVFoundation/AVAudioTimePitchAlgorithm/spectral).

The default value for export and other offline processing is [`spectral`](/documentation/AVFoundation/AVAudioTimePitchAlgorithm/spectral).

For scaled audio edits, such as when the [`timeMapping`](/documentation/AVFoundation/AVAssetTrackSegment/timeMapping) of an [`AVAssetTrackSegment`](/documentation/AVFoundation/AVAssetTrackSegment) is between `timeRanges` of unequal duration, it’s important to choose an algorithm that supports the full range of edit rates present in the source media. The pitch algorithm [`spectral`](/documentation/AVFoundation/AVAudioTimePitchAlgorithm/spectral) is often the best choice due to the highly inclusive range of rates it supports, assuming that it’s desirable to maintain a constant pitch regardless of the edit rate. If it’s desirable to allow the pitch to vary with the edit rate, [`varispeed`](/documentation/AVFoundation/AVAudioTimePitchAlgorithm/varispeed) is the best choice.

## Topics

### Constants

[`timeDomain`](/documentation/AVFoundation/AVAudioTimePitchAlgorithm/timeDomain)

A modest quality time pitch algorithm that’s suitable for voice.

[`varispeed`](/documentation/AVFoundation/AVAudioTimePitchAlgorithm/varispeed)

A high-quality time pitch algorithm that doesn’t perform pitch correction.

[`spectral`](/documentation/AVFoundation/AVAudioTimePitchAlgorithm/spectral)

A highest-quality time pitch algorithm that’s suitable for music.

[`lowQualityZeroLatency`](/documentation/AVFoundation/AVAudioTimePitchAlgorithm/lowQualityZeroLatency)

A low-quality and very low computationally intensive pitch algorithm.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)