Calculate the pitch rate for a sound

MikeHart

Administrator
Joined
Jun 19, 2017
Messages
2,815
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
 

Attachments

  • 1548881251769.png
    1548881251769.png
    171.2 KB · Views: 62
Top Bottom