Is there a way to play an Fmod Event backwards, ie. reverse the audio playback?
In Unity it is possible to do this on an AudioSource by setting the AudioSource’s pitch to -1f, see this code:
// Reverses playback of the audiosource we send in.
// Manually play the AudioSource after calling this method to hear it
// play the audio in reverse from the end of the AudioClip
public static void ReversePlaybackFromEnd(AudioSource audioSource)
{
audioSource.timeSamples = audioSource.clip.samples - 1;
audioSource.pitch *= -1f;
}
How would I go about doing this with an Fmod Studio event?
Use cases where I’d like to use this:
- “Timescroll”-effects where the player can manipulate time and make the game simulate backwards/forwards.
- An easy way of getting more variation out of some types of sound assets, since with this you can basically “duplicate” the amount of sound variations you have in the game, without using actual reversed versions of your pre-existing sound files.
- Probably usable to make cool things with music, where the harmony is changed depending on if the event is playing normally or if it is reversed. Check this video for inspiration:
https://www.dropbox.com/s/iyqkch9pglhrc90/2020-09-25%2012-08-32%20-%20More%20DOTween%20Music%20Backwards%20Pitch%20Chaos.mp4?dl=0