Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing tempo of music track in Unity3D [closed]

Is it possible to change tempo of music track without using any sound engines like FMOD ? I know by changing pitch in AudioSource I can change speed of music but you know by changing pitch actually the music can be completely changed.

like image 425
ATHellboy Avatar asked Oct 17 '25 23:10

ATHellboy


1 Answers

If you want the answer it is the best approach which I've found in Unity. (Actually one of my friends suggest this approach)

  1. Create an Audio Mixer (Left click on project Folder > Create > Audio Mixer)
  2. Add the Audio Mixer to that AudioSource in Output value in the inspector
  3. Select the Audio Mixer > Master under his children, click Add Effect and select Pitch shifter
  4. Select the AudioSource and set the Pitch to 2 (Example)
  5. Set the Pitch of the AudioMixer Pitch to 0.5 (Example)

The formula for calculating AudioSource Pitch and AudioMixer Pitch: AudioMixer Pitch Value = 1 / AudioSource Pitch Value

  • If you are using AudioSource Pitch above of 2 then you need to add another Audio Pitch Shifter in the AudioMixer and set the values for both get original pitch (1)
like image 200
ATHellboy Avatar answered Oct 21 '25 07:10

ATHellboy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!