-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pitch Factor ? #25
Comments
Hi! You are correct, going up an octave means multiply the frequency by 2 and going down an octave by 0.5 |
Many thanks for your answer @olvb ^^ |
Just got into this, it's great! yeah if you're working with music and trying to transpose, it's a bit difficult because the relationship is nonlinear. here's what i believe is the relationship after a quick regression. semitones correspond to the related pitch factor.
|
It can be computed, a mathematician figured it out centuries ago I forget who, has to do with Pythagorean commas etc etc: function semitonesToSpeed(semitones) {
return Math.pow(2, (semitones/12));
}
function speedToSemitones(playbackRate) {
return Math.log(playbackRate/1)/0.05776227;
} |
Hello there !
Your lib looks like what I need but I can't see any documentation.
Reading your sources, I can pretty much get how to use it but I'm wondering :
what is the relation between pitch factor and tones/octaves ?
I think climbing an octave multiplies frequency by 2... does that mean I have to set the pitch factor to 2 ? or 0.5 to go down an octave..
Thanks for your help ^^
The text was updated successfully, but these errors were encountered: