The title says it all but I wanna get some more things clear first.
I only want a simple math equation which can take the speed of a sound and adjust the pitch using a pitch-shift sound effect to make the pitch normal.
I want to be able to update the sound to be able to constantly change speed but the pitch stays the same.
I know you can set the speed to 0.5 and set the octave in the pitch-shift effect to 2, but I want more options than just that.
I tried the only equation I can think of which is the difference between 1 and the speed of the sound * 2 for the octave, but that doesn’t work well.
There is no such thing as “speed of sound”. Sound is a series of vibrations in the air. Think about a sine wave. By changing the frequency of the wave, you can change the pitch of the sound. If you change the amplitude of the wave, you change the volume of the sound. If you do both at the same time, you can change the pitch and amplitude of the sound simultaneously.
To change the frequency of the wave, you have to change the number of cycles per second. If you double the number of cycles, the pitch will be an octave higher. If you halve the frequency, the pitch will be an octave lower.
I don’t know whether to be more concerned that you replied so fast where it didn’t even show you replying, or how this is not helpful at all since the only useful information I already know and is common knowledge if you have ever messed with sounds before. Nevermind thought that was a bot it probably isn’t, do those even exist on the devforum?
He is asking for changing the PlaybackSpeed along with its Pitch to match as if it were normal speed, Real Life isn’t relevant here, and I’m not sure why it is important for this case.
That was probably the rudest thing I have seen on the devforum and I was the one who said it, it’s not really the community it’s just me. Either way aside from this do you have anything helpful?
Thanks, I will try this out, sorry for being rude. I was pretty sure you were a bot because I didn’t even see your thing pop up in the replies section and that message was longer than average replies I see. I guess it must have bugged?
What would I set the original speed & pitch as? Both of them if they are supposed to be intended pitch would just be 1 since that is the default pitch of the sound.
Anyway to get back On Topic,
There isn’t really much you can do with Sounds, What you have is the correct way and its just the Limitations of the Roblox Sound Engine.
PitchShiftSoundEffect has a limit of between 0.5 - 2 so your options are limited
Basically the equation @xDeltaXen showed is pretty much just the same exact thing you started with, with an extra step:
.9 / 1 * 1 -- if your new Pitch is .9, The Result will be .9, No Changes