Created
February 6, 2013 18:00
-
-
Save mazbox/4724484 to your computer and use it in GitHub Desktop.
Convert a midi note to speed (1 is original speed, 0.5 would be an octave lower, 2, an octave higher etc.)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float midiNoteToSpeed(int midiNote, int originalNote) { | |
return pow(2, (midiNote-originalNote)/12.f); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment