[music-dsp] Cents and ratios
Rebecca.Lovelace at vugames.com
Tue Dec 10 11:11:01 EST 2002
OK, I know the equation for calculating the ratio for any given value in
cents. I also know the ratios that correspond to 1-12 semitones.
I'm trying to do pitch shifting by cents (less than a semitone) using a
simple upsample by X, downsample by Y algorithm. (I know there are other
algorithms, but I want the sound to be sped up/slowed down, so this
algorithm is best for my particular purpose). It seems like I have 2
1) Convert from cents to a decimal value at run-time. This seems like the
worst solution because A) I have to do a log10 and B) in order to make sure
I have enough significant data, I either have to use huge numbers in the
up/downsampling routines OR write a LCD detection scheme which will be
expensive time-wise as well
2) Hand calculate all the cents values I want ahead of time and optimize the
ratios, put them in a LUT
I'm wondering if I am missing anything in terms of the relationship between
the intervals that would make all the precalculation (or at least some of
it) unnecessary. I've found a lot of webpages with a very light description
of the subject, but nothing really indepth. It's that weird grey area
between math and music theory.
Also, if anyone can recommend any books that go into this level of detailed
discussion of math and music I would love to hear about them.
More information about the music-dsp