Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Finding an expression for dissonance

  1. Apr 20, 2006 #1
    I've been trying to find an expression that calculates the dissonance between two frequencies, something which would have its highest peak when the frequencies match, its second highest peak when the frequencies are in a 2/1 ratio, its third highest peak for a 3/2 ratio, etc. Does anyone know of such an expression?
  2. jcsd
  3. Apr 21, 2006 #2

    Meir Achuz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Dissonance is in the ear of the beholder.
  4. Apr 21, 2006 #3


    User Avatar
    Science Advisor

    I think you are going to have to derive a very exact definition of what you consider to be disonant. You can have disonance between two tones that are slightly out of tune, or a full half step off.

    You have not described dissonance. You are describing what, from what I have seen, happens naturally when you have a tone with a lot of harmonics. In looking at an FFT of a signal, the base frequency is usually the strongest with interval peaks decreasing in amplitude with frequency. Of course there are always exceptions.

    Is an FFT what you were eluding to when you said "peaks?"
  5. Apr 21, 2006 #4
    Perhaps it's best if I rephrase my question. I'm looking for an expression that will determine the consonance between certain pitches. Here's a rough idea of what I'm looking for:

    There was this physics experiment we did in class about a year ago where a current-carrying wire would be driven to oscillate by having an alternating current move through it while a permanent magnet was fixed near the end. The amplitude of the wire would be greatest when the AC frequency matched the frequency at which the string as a whole would vibrate when plucked (it would have 2 nodes at the endpoints). The amplitude was second-highest when the AC frequency was such that the string would have 3 nodes. And so on. Let f_a = the base frequency, f_b = another frequency, and A(f) = the amplitude of the string vibration for a certain frequency divided by the maximum amplitude (at f_a, so that 0 <= A(f) <= 1 for any f).

    I think A(f) could be a good measure of the consonance between two notes, but I don't remember what A(f) should be. I imagine it'd be 0 in most places, but peaking at 1/1, 2/1, 3/1, 3/2, 4/3, etc. frequency ratios.

    (An FFT isn't quite what I want. Let's say we have two functions sin(at) and sin(bt). If a = b, these two pitches would be very consonant, and an FFT would have a spike here, but if a = 2b, there'd also be consonance, and the FFT would just show 0.)

    (I might as well explain that I'm trying to find some way to create melodies using differential equations or some other type of model. If I had an expression for consonance, I could mathematically show the tendency of a note to approach certain other frequencies.)
    Last edited: Apr 21, 2006
  6. Apr 23, 2006 #5


    User Avatar
    Science Advisor

    In this day and age, one of the last refuges of tonal music is garage-band rock and roll -- the "three chord" variety. In the West, we hear, for example, a II-V-I progression as complete, but not necessarily so in the Middle East, or China. Why do I say tonal? Typically, tonal music refers to the so-called Common-Practice music of the 1700s and 1800s, which has fairly restrictive practices for dealing with dissonances. Go back far enough, and a V-I resolution was not common, rather as you can hear in Gregorian Chants, the resolutions were done with IV-I progressions, which sounds eirie to our contemporary ears.

    Some of Bach's music is highly dissonant, but still treasured. From Wagner on, the restrictions of tonality and dissonance declined in importance. Nowadays, anything goes, provided that the music sounds "good" to somebody.

    That being said, there are lot's of people doing computer-composed music, including music composed by neural networks. Do a Google search -- you will, no doubt be amazed at the extent of what you'll find. Good luck.

    Reilly Atkinson
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook