vhd244
New Member
Posts: 11
Posts: 11
|
Post by vhd244 on Apr 20, 2021 17:56:50 GMT
Hi, I was reviewing different audio plugins and I was wondering if its possible and easy to change (with Master Audio) the pitch of a sound effect based on the current tune of the music. This is best described in this video: youtu.be/p-FLWabby4Y?t=354Thanks.
|
|
|
Post by DarkTonic Dev on Apr 20, 2021 19:16:49 GMT
I'm not sure how you would detect the "tune" of the music (not sure what that means), but you can specify the pitch to play the sound effects at when you play them. There's a pitch parameter.
If you're looking to change the pitch after it's started playing, you can use the GlideByPitch method, like this:
var psr = MasterAudio.PlaySound3DFollowTransform("YourSoundGroupName", this.transform); // later if (psr.ActiveVariation != null) { psr.ActiveVariation.GlideByPitch(.1f, .5f); }
|
|
vhd244
New Member
Posts: 11
Posts: 11
|
Post by vhd244 on Apr 20, 2021 19:47:42 GMT
If you check out the video that I mentioned, it's best described there (it's fast forwarded to the part mentioned). The answer doesn't seem like its based on music and just a pitch change unless I'm mistaken
|
|
|
Post by DarkTonic Dev on Apr 20, 2021 19:56:41 GMT
If you can detect whatever it is in the music (Audio Source) from the code, then yes.
|
|
vhd244
New Member
Posts: 11
Posts: 11
|
Post by vhd244 on Apr 20, 2021 19:58:31 GMT
Oh? I will give it a shot. Thanks for answering
|
|
|
Post by DarkTonic Dev on Apr 20, 2021 21:30:12 GMT
No problem.
|
|