Return to: ATMI 2002 Presentation | Harmonic Series | Hear Just Intervals

Ratio to Cents

A JavaScript application for converting frequency ratios to cents.

by REGINALD BAIN


The JavaScript application below (blue frames) implements A. J. Ellis's frequency ratio to cents conversion formula (see Fig. 1). To use this application, enter the interval frequency ratio in the two form elements, then click the Convert to cents button. The interval size in cents will appear in the right frame rounded to the nearest cent.

(N.B., No error checking is performed on the interval frequency ratio you enter, so please be sure to enter valid numeric values.)


Fig. 3 . The size (given in cents) of some traditional tonal intervals in 12tet.

Interval name

Size in Cents (c.)
m2100 c.
M2200 c.
m3300 c.
M3400 c.
P4500 c.
A4/d5600 c.
P5700 c.
m6800 c.
M6900 c.
m71000 c.
M71100 c.
P81200 c.
m91300 c.
etc.

Fig. 1 . Formula for converting the interval frequency ratio f1 / f2 to cents (c).
c = 1200 * log2 (f2 / f1)

The formula in Fig. 1 employs a log2, or logarithm base 2, function. This formula can also be written using a log10 function, available on most scientific calculators via the log button:

Fig. 2 . The formula in Fig. 1 expressed using log10, rather than log2.
c = 1200 * 3.322 log10 (f2 / f1)

3.322 is a conversion factor that converts base 2 logarithms to base 10 logarithms.

 

Updated: August 30, 2008

Reginald Bain | University of South Carolina | School of Music | Disclaimer
http://www.music.sc.edu/fs/bain/atmi02/cents/
Cents: A convenient unit for for pitch interval & RatioToCents Application

Copyright © 1997-2008 by Reginald Bain. All rights reserved.
These materials may not be distributed in any form without the express written permission of the author.