back to list

Hudson - Regarding your reply

🔗Dan Amateur <xamateur_dan@...>

10/2/2006 8:27:40 PM

Hudson, I used your formula and did a test.
Results are below. Is the below value of
620.874, in 'cents' then? Or is this a frequency?
If its cents, how do we then convert this to
frequency? I think I've almost 'got' this.....

log 2 0.30103
f1 440.00000
f2 256.00000
f1/f2 1.71875
octave 1200.00000

'1200*log2(f1/ f2)
620.8743661

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

🔗Hudson Lacerda <hfmlacerda@...>

10/2/2006 9:31:38 PM

Dan Amateur escreveu:
> Hudson, I used your formula and did a test.
> Results are below. Is the below value of
> 620.874, in 'cents' then? Or is this a frequency?
> If its cents, how do we then convert this to
> frequency? I think I've almost 'got' this.....

> log 2 0.30103
> f1 440.00000
> f2 256.00000
> f1/f2 1.71875
> octave 1200.00000
> > '1200*log2(f1/ f2)
> 620.8743661

Hi Dan.

I was not clear enough about the meaning of ``log2'', thus your computation is wrong. log2 is the logarithm base 2 of some value.

To use whatever base (for example, you are using base 10), you can use this formula to obtain the interval in cents:

c = 1200 * log(f1/f2) / log(2)

Then, given:
f1 = 440.0
f2 = 256.0
r = f1/f2 = 1.71875
log10(2) = 0.30103
log10(r) = 0.23521

One can compute:
c = 1200 * 0.23521 / 0.30103 = 937.62

Therefore, the interval between the frequencies 440.0Hz and 256.0Hz corresponds to 937.62 cents.

To obtain the frequencies back from the reference 256.0Hz and the interval of 937.62 cents:

r = 2^(c/1200)

Indeed:
r = 2^(937.62/1200) = 1.718738

And thus:
f1 = f2 * r
f1 = 256.0 * r = 256.0 * 1.718738 = 440.0
f1 = 440Hz

Maybe it was better call f2 as f0 -- it was used as the reference frequency (the denominator in the ratio r).

Cheers,
Hudson

--
'-------------------------------------------------------------------.
Hudson Lacerda http://br.geocities.com/hfmlacerda/

microabc -- free software for microtonal music
http://br.geocities.com/hfmlacerda/abc/microabc-about.html

*N�O DEIXE SEU VOTO SUMIR! http://www.votoseguro.org/
*Ap�ie o Manifesto: http://www.votoseguro.com/alertaprofessores/
.-------------------------------------------------------------------'
--


_______________________________________________________ O Yahoo! est� de cara nova. Venha conferir! http://br.yahoo.com