# Calculating consonance/dissonance (i.e. need for resolution) from list of frequencies [duplicate]

Is anyone aware of any formulas that can be used to calculate consonance or dissonance from a list of frequencies (in hertz)?

I realize consonance/dissonance is a somewhat nebulous concept. What I mean is what the human ear perceives as a need for resolution (I realize this is probably even more nebulous).

So for example, in 440 hz equal temperament, a C major triad starting on C5 (C5 - 523.2511 hz, E5 - 659.2551, G5 - 783.9909) would be perceived as mostly consonant (not in need of resolution), whereas a C diminished triad (C5 - 523.2511 hz, Eb5 - 622.2540 hz, Gb5 - 739.9888) would be perceived as quite dissonant (and in need of resolution). One can imagine upper chord extensions, which would generally (always?) add dissonance. This feels to me like a phenomena which should be able to be approximated with a formula.

For context: I'm working on an application which randomly generates chromatic contexts (sets of possible notes in hertz), scales based upon that chromatic context, and chords based upon those scales. I'm in need of a formula which will allow me to programmatically predict which chord cadences may prove pleasing to the human ear (moving from consonance, to dissonance, and back to consonance).

I realize that this is a difficult problem. Anything you can do to point me in the right direction would be helpful.

• I sense you'll run into many of the same problems as here - the awkward part is that, in a given key in equal temperament, a plain old major chord (e.g. the Neapolitan or bII) may very well be more dissonant than a diminished 7th chord (e.g. vii°7). Commented Aug 4, 2019 at 6:15
• You should definitely have a chat with that user (Seery) - he seems to have a similar project on the go! Commented Aug 4, 2019 at 7:39
• It's likely not to be productive, as we all listen to harmonic changes differently. That apart, more often than not, it's the interaction between a series of harmonies (chords if you like) that produce consonance/dissonance, not merely one chord following another. But there's still that subjectivity.
– Tim
Commented Aug 4, 2019 at 10:17