It came to my attention that intervals often sound less dissonant if they occur in the context of a chord rather than being played isolated, e.g. C-B on its own sounds more dissonant to my ear than the Cmaj7 chord C-E-G-B which includes C-B.
I'm wondering if there is a general dissonance measure that allows comparing C-B and C-E-G-B by mapping it to a single value (let's say between 0 and 1).
I know about roughness calculation, however in the texts it is suggested that chord roughness should be determined by adding the roughness value R(f1, f2) of each frequency pair (f1, f2), meaning that for the chord C-E-G-B total roughness is calculated by
R(C, E) + R(C, G) + R(C, B) + R(E, G) + R(E, B) + R(G, B)
This is always bigger than the roughness of the single interval R(C, B), since R(C, B) is part of the sum, so chords are always measured as "more dissonant" than the single intervals they consist of.
More generally: If the roughness of a frequency set R(f1, f2, ..., fn) is recursively defined as the addition of all pair values R(f, f') then note sets of different size cannot be compared effectively: A triad will always be rougher than the intervals in it. A tetrad will always be rougher than the triads that can be constructed by removing a note from it, etc.
This goes against the intuition of the first observation, that C-E-G-B sounds less dissonant than C-B alone.
EDIT: edited for clarity that it is about comparing frequency sets of different size