back to list

Simple algorithm to measure the tonalness of a chord

🔗Mike Battaglia <battaglia01@gmail.com>

10/6/2011 8:57:18 PM

Pretty simple:

1) Treat the chord as a set of integers. For example, 10:12:15 should
be represented as the set {10, 12, 15}.
2) Obtain the power set of this resulting set. You now have {{}, {10},
{12}, {15}, {10, 12}, {10, 15}, {12, 15}, {10, 12, 15}}
3) Each entry in the power set will be another set. Iterate through
all of these sets, and replace each one with gcd(s), for some suitable
complexity metric of s, where s is the set you're looking at. Ditch
the empty set.
4) Calculate the standard deviation of this set.

This will tell you approximately how many VFs the chord will point to.
I'd like to claim that I'll crunch some numbers later, but as you
might have noticed I'm a bit behind on my number-crunching promises,
so I'll have to get to it when I get to it.

Possible improvements:
1) Instead of coming up with a data set, come up with a probability
distribution, and "weight" the power of each VF by the complexity of
the generating set. Use a complexity such as 1/n^2 + 1/d^2, or
something which can compare dyads to triads, etc.
2) Instead of using the standard deviation, calculate the entropy of
the resulting distribution.
3) Instead of picking the GCD, pick the VF that has the highest
probability for the dyad as measured by harmonic entropy.

-Mike

🔗Mike Battaglia <battaglia01@gmail.com>

10/6/2011 9:00:23 PM

I thought about this more - it might be best to ditch the use of
standard deviation and go right to entropy. Otherwise, chords that
have VFs that are closer to one another, say 16/15 apart, will be
rated as more tonal than chords that have VFs that are 2/1 apart, like
with 4:5:6. For now, I'll treat this as a public work in progress and
encourage your thoughts for improvement.

-Mike

On Thu, Oct 6, 2011 at 11:57 PM, Mike Battaglia <battaglia01@gmail.com> wrote:
> Pretty simple:
>
> 1) Treat the chord as a set of integers. For example, 10:12:15 should
> be represented as the set {10, 12, 15}.
> 2) Obtain the power set of this resulting set. You now have {{}, {10},
> {12}, {15}, {10, 12}, {10, 15}, {12, 15}, {10, 12, 15}}
> 3) Each entry in the power set will be another set. Iterate through
> all of these sets, and replace each one with gcd(s), for some suitable
> complexity metric of s, where s is the set you're looking at. Ditch
> the empty set.
> 4) Calculate the standard deviation of this set.
>
> This will tell you approximately how many VFs the chord will point to.
> I'd like to claim that I'll crunch some numbers later, but as you
> might have noticed I'm a bit behind on my number-crunching promises,
> so I'll have to get to it when I get to it.
>
> Possible improvements:
> 1) Instead of coming up with a data set, come up with a probability
> distribution, and "weight" the power of each VF by the complexity of
> the generating set. Use a complexity such as 1/n^2 + 1/d^2, or
> something which can compare dyads to triads, etc.
> 2) Instead of using the standard deviation, calculate the entropy of
> the resulting distribution.
> 3) Instead of picking the GCD, pick the VF that has the highest
> probability for the dyad as measured by harmonic entropy.
>
> -Mike
>