Take the 2-minute tour ×
Musical Practice & Performance Stack Exchange is a question and answer site for musicians, students, and enthusiasts. It's 100% free, no registration required.

I know that if I played C and B together they would be very dissonant compared to if I played a G or C one octave up. Is there a quantitative way to describe that sort dissonance?

Edit: I understand that smaller ratios between the frequencies of the notes means they are more consonant. My question is how to express that. Notes with the ratio of 2:1 are very consonant, and 15:16 are dissonant. Saying that smaller ratios are more consonant is very qualitative, I'm looking for a quantitative way to represent consonance.

Basically, what I'm trying to do is figure out a way to describe to a computer how consonant or dissonant two or more notes are. I want to be able to put in 1:2 or 15:16 and have a programmatic way to determine which one is more dissonant.

share|improve this question
    
If you can tell the computer which tuning system the notes come from, then I think this is possible. E.g., if they come from Equal Temperament, you could look at n mod 12, and go from there. If the frequencies come from Just Intonation, just look at the denomintor of the ratio: smaller is more consonant. But it sounds as if you might be looking for some sort of universal measure of consonance, something that could say "a perfect fifth in Equal Temperament is x times more dissonant than a major seventh in Just Intonation." If so, I can't help you with that (sorry!). –  Alex Basson Oct 30 '11 at 10:44
add comment

6 Answers

up vote 14 down vote accepted

Yes, there are ways to measure it, though there are many different algorithms claiming to be more accurate than the others. This formula by Vassilakis is recent (2007).

These measure "roughness", which is similar to dissonance. (Dissonance is basically roughness, but weighted towards certain intervals due to cultural conditioning, which is obviously hard to measure quantitatively.) For two sine tones, roughness vs frequency difference looks like this:

enter image description here

enter image description here

For more complex signals, made up of multiple tones:

The roughness of signals corresponding to spectra with more than two sine components is calculated by summing the roughness of all sine-pairs in the spectrum.

For tones with harmonic spectra, the net effect of the roughness between all the harmonics present produces graphs with notches of consonance at intervals that we're familiar with, like 3:2 perfect fifth:

enter image description here

enter image description here

The black curve is from the older Plomp-Levelt 1965 paper, with this description:

We assume that the total dissonance of such an interval is equal to the sum of the dissonances of each pair of adjacent partials ... these presuppositions are rather speculative ... In this way, the curves ... were computed for complex tones consisting of 6 harmonics. ... shows how the consonance of some intervals, given by simple frequency ratios, depends on frequency.

(So the Plomp-Levelt curve is based on summing up the roughness of adjacent partials while Vassilakis sums "all sine-pairs". (Sethares wrote me and says the "adjacent" thing is just because computational power was limited in the 60s, comparing every pair is more appropriate.))

Further descriptions of this curve can be found in Marc Leman - Foundations of musicology as content processing science (which also talks about deriving the slendro and pelog scales from the same algorithm but with inharmonic instruments) and Plomp and Levelt's Hidden Ratio

The blue curve is from Sethares Relating Tuning and Timbre, which uses this MATLAB calculation, also based on the Plomp-Levelt curves. (And here's my Python translation.) Here's a MATLAB-based app that uses the 2007 Vassilakis model to also calculate the same curve for 6 harmonics (and has the M3 as more consonant than the m3).

You can see the two curves disagree on whether the m3 or M3 is more consonant. I'm not sure if this is due to calculating only adjacent partials vs all partials or if the partials have different amplitudes or what. Of course, real instruments produce lots of variation in their harmonic spectra, even playing the same note on the same instrument, so these curves are all inherently approximations. Here's a plot I made of violin vs clarinet, showing that the M3 is more consonant when the violin is playing the higher note, due to clarinets producing mostly odd harmonics.

share|improve this answer
    
Oooh, nice. This is interesting... If I hadn't already accepted the other answer ages ago I'd be tempted to mark this one. Thanks for posting this :) –  Alex Jun 20 '12 at 18:08
    
That first curve looks like it matches human perception very well, with dissonance initially being low due to the inability to perceive a difference between two tones that are very close but not an exact match. –  Matthew Read Jun 29 '12 at 18:17
    
@MatthewRead: Yeah, but according to that curve, a 2.01:1 ratio of sine waves should be equally consonant with a 2:1 ratio, yet when I test this, there is very obvious beating in the 2.01 case. Maybe this is just due to distortion in headphones? I'm not sure. –  endolith Jul 7 '12 at 15:15
    
Beating isn't dissonance. –  Matthew Read Jul 8 '12 at 7:15
2  
Ah, I have a bit more narrow definition of beating than what is used there. I restrict it to the variation in loudness, the amplitude fluctuations described on that page. One it gets into roughness or dissonance I would no longer call it beating. That's what I meant in my comment above: 2.01:1 doesn't sound dissonant (in the grating, disharmonious sense) even though you can hear the beating as amplitude fluctuation. –  Matthew Read Jul 9 '12 at 1:30
show 1 more comment

Yes. It has to do with the ratio of their frequencies. Essentially, the smaller the numbers involved the better.

The perfect unison, with a 1:1 ratio (e.g., C played with the same C), has perfect consonance. C to the next G has a 2:3 ratio; the perfect fifth is the next most consonant. The minor second (e.g., C to C#) is the most dissonant in Western scales with a frequency ratio of 15:16.

What this represents is how often the sound waves "match up". Every third cycle of a C matches with every second cycle of a G, and vice versa; i.e., the peaks of the waves occur at the same time every two cycles (or three cycles, depending on which note you choose as the base). This is often! So overall, your ear perceives the sounds as being in sync and melodious. In contrast, waves that match up infrequently, such as the minor second with only the 15th (16th) cycle matching, are largely out of sync and therefore dissonant.

The mind is strange, and what one perceives as dissonance is not necessarily what another would perceive as dissonance. That said, the closest you'll get to an absolute, objective measure is the base 2 logarithm of the Least Common Multiple of the the sides of the ratio. I.e., lg(LCM(15, 16)) = lg(240) ~= 7.9. This is about 3 times more than lg(LCM(2, 3)) = lg(6) ~= 2.6. Neatly, lg(LCM(1, 1)) = lg(1) = 0, so this also reflects the fact that the perfect unison has no dissonance. Interestingly, Euler seemed to think the LCM was the way to do this as well1.

(Note that LCM(x, y) = x*y for fully reduced ratios; e.g., 2:3 rather than 4:6.)


[1]: Knobloch, Eberhard (2008). Euler Transgressing Limits: The Infinite and Music Theory. Quaderns d’Història de l’Enginyeria, IX, 9-24. Available online: http://upcommons.upc.edu/revistes/bitstream/2099/8052/1/article2.pdf

share|improve this answer
1  
+1 for explaining why ratios with smaller numbers sound more consonant than ratios with larger numbers. Credit where credit is due: I added to my answer a cite to yours. –  Alex Basson Oct 30 '11 at 4:14
    
This isn't quite what I'm asking. I understand the mathematics behind the relationships between the notes. What I'm looking for is a way to express the consonance as a value. Relationships like 1:2, 2:3, and 1:1 are consonant, and 15:16 is dissonant. Is there a way to transform that ratio into a value that represents how consonant or dissonant it is? –  Alex Oct 30 '11 at 4:23
    
@Alex Maybe computing the ratio? 15/16 = 0.9375 > 2/3 = 0.66 etc. –  percusse Oct 30 '11 at 14:55
1  
1/1 = 1 > 15/16, so that method doesn't work. I suspect my massaging the numbers I can come up with my own method, but I was hoping someone had already done this sort of thing in the past so I wouldn't have to (re)invent it myself. –  Alex Oct 30 '11 at 15:35
1  
I believe this is called "Tenney's harmonic distance". "HD(a/b) = log(ab) where a/b is a relatively prime, usually octave reduced ratio." I plotted it here. (Does this work for chords, too? 4:5:6 is a major chord and 10:12:15 is a minor chord, so minor chord is 1.6 times as dissonant?) –  endolith Jun 13 '12 at 21:48
show 5 more comments

There's a short answer and a longer, more complicated answer; I'll just give the short answer here along with the barest basics of the long answer.

The short answer is: Yes, there is, sorta. If you take the ratio of the frequencies of the two pitches, you'll get some fraction in lowest terms. The smaller the numbers in that fraction, the more consonant the interval. For example, two pitches in unison have a 1:1 ratio. An octave has a 2:1 ratio. A perfect fifth (such as C to G) has a 3:2 ratio, etc. Matthew does a good job in his answer explaining why ratios with smaller numbers sound more consonant than ratios with larger numbers.

But this is all made more complicated by temperament, which is the way in which pitches are tuned relative to each other. See, suppose you tune your A to 440 Hz and then start tuning the other notes relative to that A, using the whole-number ratios as a guide. You'll tune E at 660 Hz, for example. For the first few notes, everything will sound great, but it won't be too long before you start to hear some strange intervals. Some intervals have nice, whole-number ratios, but then others that you'd think should sound good, like the major third from Eb to G, sound really bad. To make a long story short, it turns out to be impossible to tune all twelve chromatic notes using whole-number ratios of frequencies and have everything come out right. Mathematically, it just can't be done.

So you have to make some compromises somewhere. There are many, many different ways to make such a compromise, and I won't detail them here. But for the last two hundred fifty years or so, we've settled on a tuning system known as Equal Temperament. In this system, you start with a reference pitch (e.g. A440), and then the frequency of every other note is 2n/12, where n is the number of half-steps above the reference pitch.

In this system, none of the intervals will have whole-number ratios. But all intervals are consistent (some would say consistently imperfect), and so it allows you to play in any key. It's an effective compromise, but you lose the purity of true whole-number ratio intervals. And so the short answer I gave above turns out to be only sort-of correct, because the consonant intervals will have ratios that are almost, but not in fact actually, nice small whole-number ratios.

share|improve this answer
    
+1 for beating me to the punch and additional info about temperament! –  Matthew Read Oct 30 '11 at 3:57
    
This is not quite what I'm asking about either. Is there a way to quantitatively measure the difference on consonance or dissonance between two frequencies. For example, say you played the C major chord on an instrument with equal temperament and then played the chord on an instrument with just intonation. The equal implemented would be more dissonant than the just intonation, but is there a way to measure how much more dissonant? –  Alex Oct 30 '11 at 4:34
    
"it turns out to be impossible to tune all twelve chromatic notes" In Just intonation there aren't 12 notes. There are just tones in a fractal arrangement with small integer ratio relationships. 12-tone equal temperament is an approximation of Just intonation. –  endolith Jun 14 '12 at 14:53
add comment

Using the empirical formula A+B divided by AB where A and B represent the frequency ratio of the two notes of that interval seems to give an absolute measure of the magnitude of the degree of consonance as follows

Unison-frequency ratio 1:1 yields a value of 2

Octave-frequency ratio 2:1 yields a value of 1.5

Perfect 5th-frequency ratio 3:2 yields a value of 0.833

Perfect 4th-frequency ratio 4:3 yields a value of 0.583

Major 6th-frequency ratio 5:3 yields a value of 0.533

Major 3rd-frequency ratio 5:4 yields a value of 0.45

Minor 3rd-frequency ratio 5:6 yields a value of 0.366

Minor 6th-frequency ratio 5:8 yields a value of 0.325

Major 2nd-frequency ratio 8:9 yields a value of 0.236

Major 7th-frequency ratio 8:15 yields a value of 0.192

Minor 7th-frequency ratio 9:16 yields a value of 0.174

Minor 2nd-frequency ratio 15:16 yields a value of 0.129

Although the formula used is empirical , the results adhere remarkably closely to the accepted order of degree of consonance of the harmonic intervals within an octave

share|improve this answer
    
Hmm, this can also be represented as 1/A + 1/B. Not sure what that means, but it's interesting. +1 –  Matthew Read Nov 15 '11 at 0:52
    
It means there are many monotone functions in the math. Looking at the above As and Bs one can see that A+B work equally well, if not better: 2, 3, 5, 7, 8, 9, 11, 13, 17, 23, 25, 31. –  horsh Nov 15 '11 at 2:11
add comment

You wrote "Chord" but spoke only about two notes combinations, and the answer is already marked. Also don't forget that we are speaking about music here. What is measured is not the physical tone but the perception of the listener.

I wanted to answer nevertheless that for 'real' chords with three or more members the simple math does not apply anymore. The psychological component becomes more important. An augmented chord (c e g#) is (imperfect) consonance for all combinantions, yet it is perceived as one of the most dissonant chords.

Also for two note combinations it matters in which octave you play them. Dissonant intervals are less dissonant if you play them one octave apart while consonant intervals are less consonant when played apart, both psychological effects.

There are other parameters other than the pitch that may take over. Even with just tuning intervals on the lower end of our hearing spectrum do not sound nearly as "good" as in the middle range. Our ear is not linear, it has it preferred bands in the audio spectrum, where the spoken language is.

share|improve this answer
add comment

Take all the theory with a grain of salt. You may love hot peppers or hate hot peppers.

You may think the major 7th chord (for instance C E G B) that ends many jazz compositions and Darius Milhaud's "La Création du Monde" is the most beautiful consonance imaginable, far more interesting than a plain triad. Or you may think it's the most horrible dissonance.

Consonance and dissonance can be defined objectively, as you see in the other answers, but most people think of them as subjective terms. As such, they depend on the ears, taste and history of the listener.

share|improve this answer
    
As a teenager I tried to devise the most dissonant chord I could, and came up with a C major triad superimposed on an F# major triad. I was pleased with how crunchy this sounded at the time. Many years later I hear the same chord and it seems nowhere near as dissonant as when I first heard it. Either I've become more jaded over the years, or maybe (I hope) I've become more harmonically sophisticated. It's me that's changed though, not the notes I'm hearing. –  Brian THOMAS Apr 17 at 12:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.