Pianotech

Expand all | Collapse all

Looking for a formula

  • 1.  Looking for a formula

    Registered Piano Technician
    Posted 08-06-2019 00:33
    I'm looking for a formula, well, two actually, if there is one, that can be used to calculate cents offset for a known frequency shift from a specific note. Also the reverse: The frequency offset for a known cents shift from a known note. 
    In other words, if I move a specific note, with a known frequency, by x cents, what is the change in frequency?
    Conversely, If I move a specific note with known cents deviation of 0 offset from what it's supposed to be, by x frequency value, what is the change in cents?
    Thanks --


    ------------------------------
    Geoff Sykes, RPT
    Los Angeles CA
    ------------------------------


  • 2.  RE: Looking for a formula

    Registered Piano Technician
    Posted 08-06-2019 02:00
    Cents difference between frequencies f1 and f2 is given by:

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

    Or if you can use a base 2 logarithm, that makes it a little simpler (the above version uses the change of base formula instead):

    c = 1200 * log_2(f2 / f1)

    And for the other way around, a change of c cents (positive or negative) from frequency f1 will give the following resulting frequency:

    f2 = f1 * 2^(c / 1200)





  • 3.  RE: Looking for a formula

    Registered Piano Technician
    Posted 08-06-2019 12:07
    Frank --

    Thanks for these. I even have a calculator that can work with logs. Very cool. 

    Thanks

    ------------------------------
    Geoff Sykes, RPT
    Los Angeles CA
    ------------------------------



  • 4.  RE: Looking for a formula

    Member
    Posted 08-06-2019 18:36
    Also there's this set of online calculators: http://hyperphysics.phy-astr.gsu.edu/hbase/Music/cents.html#c2

    ------------------------------
    Jason Kanter
    Lynnwood WA
    425-830-1561
    ------------------------------



  • 5.  RE: Looking for a formula

    Registered Piano Technician
    Posted 08-06-2019 22:55
    Yow, Jason. This is wonderful. Thanks!

    ------------------------------
    Geoff Sykes, RPT
    Los Angeles CA
    ------------------------------



  • 6.  RE: Looking for a formula

    Registered Piano Technician
    Posted 08-07-2019 13:49
    Thx Jason! People ask me about this quite a lot, and I usually give them the formulas, from now on I think I'll give them this web link :)

    ------------------------------
    Patrick Wingren, RPT
    Jakobstad, Finland
    0035844-5288048
    ------------------------------



  • 7.  RE: Looking for a formula

    Posted 08-06-2019 05:56
    Difference between F1 and F2 in cents (F2 is higher than F1):

    ¢ = 1200 × log(F2 / F1) / log(2).

    ¢ = 1200 × log2(F2 / F1).


    Calculating F2 if F1 is known (F2 is higher than F1):

    F2 = F1 × 2(¢ / 1200).


    Calculating F1 if F2 is known (F2 is higher than F1):

    F1 = F2 / 2(¢ / 1200).

    ------------------------------
    Roshan Kakiya
    ------------------------------



  • 8.  RE: Looking for a formula

    Posted 08-06-2019 06:39
    Could you provide the offsets in frequency and offsets in cents that you are using or want to use?

    ------------------------------
    Roshan Kakiya
    ------------------------------



  • 9.  RE: Looking for a formula

    Posted 08-06-2019 06:48
    Tough one. It depends on the octave and IH. Unless you do not mean 'specifically'.

    ------------------------------
    Regards,

    Jon Page
    mailto:jonpage@pianocapecod.com
    http://www.pianocapecod.com
    ------------------------------



  • 10.  RE: Looking for a formula

    Posted 08-06-2019 09:03
    Inharmonicity can be accounted for by the formulas that have been mentioned previously for converting frequency ratios to cents.

    Actual F1 and Actual F2 account for inharmonicity.

    The difference in cents between Actual F1 and Actual F2 can be calculated if a piano is tuned and information on its frequencies is provided by an ETD. The difference in cents between Actual F1 and Actual F2 will include inharmonicity.

    The formulas for converting frequency ratios to cents that have been mentioned previously can be modified as follows to account for inharmonicity:

    ¢ = 1200 × log(Actual F2 / Actual F1) / log(2).

    ¢ = 1200 × log2(Actual F2 / Actual F1).


    This approach could be useful for partial analysis. Jason Kanter has kindly provided the actual frequencies of a Steinway L on the 18th post of the following thread:

    https://my.ptg.org/communities/community-home/digestviewer/viewthread?GroupId=43&MessageKey=908c0368-7d1c-466e-b92d-2eee835c4dca&CommunityKey=6265a40b-9fd2-4152-a628-bd7c7d770cbf

    I will analyse the actual partials of A2-C#3 which is a Major Third.

    The actual beat rate of A2-C#3 is determined by the difference between the Actual 4th Partial of C#3 and the Actual 5th Partial of A2.

    Actual 4th Partial of C#3 = 553.97 Hz.

    Actual 5th Partial of A2 = 549.32 Hz.

    These two frequencies can be inserted into the formulas above to calculate the difference between them in cents:

    ¢ = 1200 × log(Actual F2 / Actual F1) / log(2) = 1200 × log(553.97 Hz / 549.32 Hz) / log(2) = 14.59 cents.

    ¢ = 1200 × log2(Actual F2 / Actual F1) = 1200 × log2(553.97 Hz / 549.32 Hz) = 14.59 cents.

    ------------------------------
    Roshan Kakiya
    ------------------------------



  • 11.  RE: Looking for a formula

    Posted 08-06-2019 10:43
      |   view attached
    Not accounting for IH and stretch preference, I think this is what you are looking for.

    ------------------------------
    Regards,

    Jon Page
    mailto:jonpage@pianocapecod.com
    http://www.pianocapecod.com
    ------------------------------

    Attachment(s)

    pdf
    cents_cps.pdf   43 KB 1 version


  • 12.  RE: Looking for a formula

    Posted 08-06-2019 10:54
    I fixed the text registering on this cents-cps.pdf.
    This cents_Hz.xls will offer more insight.

    ------------------------------
    Regards,

    Jon Page
    mailto:jonpage@pianocapecod.com
    http://www.pianocapecod.com
    ------------------------------

    Attachment(s)

    xls
    cents_Hz.xls   340 KB 1 version
    pdf
    cents-cps.pdf   23 KB 1 version


  • 13.  RE: Looking for a formula

    Registered Piano Technician
    Posted 08-06-2019 12:04
    Jon --

    Yow! What a great spread. Yes, I was interested in the numbers without IH. I'm not doing a science project so easy numbers are going to make the best examples. This is terrific! 

    Thanks

    ------------------------------
    Geoff Sykes, RPT
    Los Angeles CA
    ------------------------------