Using Unity's own default AudioSource
, there is a pitch slider. However, that pitch slider affects both the speed and the pitch.
Short of doing the speed up/slow down in an external program and importing multiple versions of the same audio track or using third-party middlewares, is there another way to achieve this in the stock engine?
I'm happy for any guidance towards any APIs to do this programatically (ie. access to the raw soundwave as it's being played*) or concoction of internal components.
*You can access the raw waveform (samples) of an AudioClip, but I prefer to do this real-time.
pitch
property in Unity and the user won't notice the difference in the length of the clip. Any more than that, and the clip generally needs to be recreated/re-recorded at the desired pitch. You can try to write a custom filter usingOnAudioFilterRead()
, but if you aren't already deeply familiar with audio engineering, you'll probably be overwhelmed. \$\endgroup\$