MikeHart
Administrator
- Joined
- Jun 19, 2017
- Messages
- 3,597
If you need to calculate the pitch rate of a sound, you can use this function:
Code:
'Calculates the pitchrate for the amount of given halfsteps. The default base note is 'A4'
Function _GetPitchRate:Float(halfStep:Float, base:Float=1.0)
Local pr:Float = Pow(1.0594630943592953,halfStep) * base
Return pr
End