Calculating cents between two frequencies?

D_Lo's icon

I pretty much want to what the utility at the top of this page does: http://sizes.com/units/cent.htm

There must be an abstraction somewhere, but I can't seem to sniff it out.

Jean-Francois Charles's icon
Max Patch
Copy patch and select New From Clipboard in Max.

I first thought of a single expr, but this way is kind of fun, too:

D_Lo's icon

Thanks!

Roman Thilenius's icon

cents are linear - you can use [mtof] and [ftom 0.]

Jean-Francois Charles's icon
Max Patch
Copy patch and select New From Clipboard in Max.

And here is an [expr] version.

Jean-Francois Charles's icon

Think about it: the difference between 1234 Hz and 2345 Hz is 1111 cents.