Harmonic entropy: Difference between revisions

Wikispaces>mbattaglia1
**Imported revision 630772999 - Original comment: **
Wikispaces>mbattaglia1
**Imported revision 630773075 - Original comment: Reverted to Dec 28, 2017 10:50 pm**
Line 1: Line 1:
<h2>IMPORTED REVISION FROM WIKISPACES</h2>
<h2>IMPORTED REVISION FROM WIKISPACES</h2>
This is an imported revision from Wikispaces. The revision metadata is included below for reference:<br>
This is an imported revision from Wikispaces. The revision metadata is included below for reference:<br>
: This revision was by author [[User:mbattaglia1|mbattaglia1]] and made on <tt>2018-06-30 15:08:31 UTC</tt>.<br>
: This revision was by author [[User:mbattaglia1|mbattaglia1]] and made on <tt>2018-06-30 15:54:11 UTC</tt>.<br>
: The original revision id was <tt>630772999</tt>.<br>
: The original revision id was <tt>630773075</tt>.<br>
: The revision comment was: <tt></tt><br>
: The revision comment was: <tt>Reverted to Dec 28, 2017 10:50 pm</tt><br>
The revision contents are below, presented both in the original Wikispaces Wikitext format, and in HTML exactly as Wikispaces rendered it.<br>
The revision contents are below, presented both in the original Wikispaces Wikitext format, and in HTML exactly as Wikispaces rendered it.<br>
<h4>Original Wikitext content:</h4>
<h4>Original Wikitext content:</h4>
<div style="width:100%; max-height:400pt; overflow:auto; background-color:#f8f9fa; border: 1px solid #eaecf0; padding:0em"><pre style="margin:0px;border:none;background:none;word-wrap:break-word;white-space: pre-wrap ! important" class="old-revision-html">&lt;!--- xenharmonic (microtonal wiki) - Harmonic Entropy ---&gt;
<div style="width:100%; max-height:400pt; overflow:auto; background-color:#f8f9fa; border: 1px solid #eaecf0; padding:0em"><pre style="margin:0px;border:none;background:none;word-wrap:break-word;white-space: pre-wrap ! important" class="old-revision-html">[[math]]
&lt;math&gt;\newcommand{\cent}{\text{¢}}&lt;/math&gt;&lt;br&gt;
\newcommand{\cent}{\text{¢}}
[[math]]
=Introduction=
[[toc]]
**Harmonic Entropy**, sometimes abbreviated as "HE", is a simple model to quantify the extent to which musical chords exhibit various psychoacoustic effects, lumped together in a single construct called psychoacoustic **concordance**. It was invented by Paul Erlich and developed extensively on the Yahoo! tuning and harmonic_entropy lists. Various later contributions to the model have been made by Steve Martin, Mike Battaglia, Keenan Pepper, and others.


=Introduction=
=Background=  
The general workings of the human auditory system lead to a plethora of well-documented and sonically interesting phenomena that can occur when a musical chord is played:
* The perception of partial **timbral fusion** of the chord into one complex sound
* The appearance of a **virtual fundamental** pitch in the bass
* Critical band effects, such as timbral **beatlessness**, compared to mistunings of the chord in the surrounding area
* The appearance of a quick fluttering effect sometimes known as **periodicity buzz**


'''Harmonic Entropy''', sometimes abbreviated as "HE", is a simple model to quantify the extent to which musical chords exhibit various psychoacoustic effects, lumped together in a single construct called psychoacoustic '''concordance'''. It was invented by Paul Erlich and developed extensively on the Yahoo! tuning and harmonic_entropy lists. Various later contributions to the model have been made by Steve Martin, Mike Battaglia, Keenan Pepper, and others.&lt;br&gt;
There has been much research specifically on the musical implications critical band effects in the literature (e.g. Sethares's work), which are perhaps the psychoacoustic phenomena that readers are most familiar with. However, the modern xenharmonic community has displayed immense interest in exploring the other effects mentioned above as well, which have proven extremely important to the development of modern xenharmonic music.


&lt;br&gt;
These effects sometimes behave differently, and do not always appear&lt;span style="line-height: 1.5;"&gt; strictly in tandem with one another. For instance, Paul Erlich has noted that most models for beatlessness measure 10:12:15 and 4:5:6 as being identical, whereas the latter exhibits more timbral fusion and a more salient virtual fundamental than the former. However, suppose we want to come up with a combined measure for how often effects such as the above tend to occur. It is then useful to note that&lt;/span&gt;


=Background=
The general workings of the human auditory system lead to a plethora of well-documented and sonically interesting phenomena that can occur when a musical chord is played:&lt;br&gt;
* The perception of partial '''timbral fusion''' of the chord into one complex sound
* The appearance of a '''virtual fundamental''' pitch in the bass
* Critical band effects, such as timbral '''beatlessness''', compared to mistunings of the chord in the surrounding area
* The appearance of a quick fluttering effect sometimes known as '''periodicity buzz'''&lt;br&gt;
There has been much research specifically on the musical implications critical band effects in the literature (e.g. Sethares's work), which are perhaps the psychoacoustic phenomena that readers are most familiar with. However, the modern xenharmonic community has displayed immense interest in exploring the other effects mentioned above as well, which have proven extremely important to the development of modern xenharmonic music.&lt;br&gt;
&lt;br&gt;
These effects sometimes behave differently, and do not always appear&lt;span style="line-height: 1.5;"&gt; strictly in tandem with one another. For instance, Paul Erlich has noted that most models for beatlessness measure 10:12:15 and 4:5:6 as being identical, whereas the latter exhibits more timbral fusion and a more salient virtual fundamental than the former. However, suppose we want to come up with a combined measure for how often effects such as the above tend to occur. It is then useful to note that&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
* &lt;span style="line-height: 1.5;"&gt;effects such as these tend to appear most strongly for those chords with large subsets that correspond to simple chunks of the harmonic series&lt;/span&gt;
* &lt;span style="line-height: 1.5;"&gt;effects such as these tend to appear most strongly for those chords with large subsets that correspond to simple chunks of the harmonic series&lt;/span&gt;
* &lt;span style="line-height: 1.5;"&gt;the effects produced exhibit some degree of tolerance for mistuning&lt;/span&gt;


* &lt;span style="line-height: 1.5;"&gt;the effects produced exhibit some degree of tolerance for mistuning&lt;/span&gt;&lt;br&gt;
&lt;span style="line-height: 1.5;"&gt;This enables us to speak of a general notion of the psychoacoustic &lt;/span&gt;**&lt;span style="line-height: 1.5;"&gt;concordance&lt;/span&gt;**&lt;span style="line-height: 1.5;"&gt; of an interval - the degree to which effects such as the above will appear when an arbitrary musical chord is played. Additionally, chords which are very inharmonic often exhibit a quality known as psychoacoustic &lt;/span&gt;**&lt;span style="line-height: 1.5;"&gt;discordance&lt;/span&gt;**&lt;span style="line-height: 1.5;"&gt;.&lt;/span&gt;
 
&lt;span style="line-height: 1.5;"&gt;This enables us to speak of a general notion of the psychoacoustic &lt;/span&gt;'''&lt;span style="line-height: 1.5;"&gt;concordance&lt;/span&gt;'''&lt;span style="line-height: 1.5;"&gt; of an interval - the degree to which effects such as the above will appear when an arbitrary musical chord is played. Additionally, chords which are very inharmonic often exhibit a quality known as psychoacoustic &lt;/span&gt;'''&lt;span style="line-height: 1.5;"&gt;discordance&lt;/span&gt;'''&lt;span style="line-height: 1.5;"&gt;.&lt;/span&gt;&lt;br&gt;
 
&lt;br&gt;
 
While psychoacoustic concordance is not a feature universal to all styles of music, it has been utilized significantly in Western music in the study of intonation. For instance, flexible-pitch ensembles operating within 12-EDO, such as barbershop quartets and string ensembles, will often adjust intonationally from the underlying 12-EDO reference to maximize the concordance of individual chords. Indeed, the entire history of Western tuning theory -- from meantone temperament, to the various Baroque well-temperaments, to 12-EDO itself, to the modern [[Regular Temperaments|theory of regular temperament]] -- can be seen as an attempt to reason mathematically about how to generate manageable tuning systems that will maximize concordance and minimize discordance.&lt;br&gt;
 
&lt;br&gt;
 
The Harmonic Entropy model is a simple way of quantifying how much an arbitrary chord will exhibit psychoacoustic concordance.&lt;br&gt;
 
&lt;br&gt;
 
Concordance has often been confused with actual musical consonance, an unfortunate fact made more common by the&lt;span style="line-height: 1.5;"&gt; psychoacoustics literature under the unfortunate name &lt;/span&gt;'''&lt;span style="line-height: 1.5;"&gt;sensory consonance&lt;/span&gt;'''&lt;span style="line-height: 1.5;"&gt;, most often used to refer to phenomena related to roughness and beatlessness specifically. This is not to be confused with the more familiar construct of tonal stability, typically just called "consonance" in Western common practice music theory and sometimes clarified as "musical consonance" in the music cognition literature. To make matters worse, the literature has also at times referred to concordance -- and not tonal stability -- as &lt;/span&gt;'''&lt;span style="line-height: 1.5;"&gt;tonal consonance&lt;/span&gt;'''&lt;span style="line-height: 1.5;"&gt;, often referring to phenomena related to virtual pitch integration, creating a complete terminological mess. As a result, the term "consonance" has been completely avoided in this article.&lt;/span&gt;&lt;br&gt;
 
&lt;br&gt;
 
=Model=
 
The original Harmonic Entropy model limited itself to working with dyads. More recently, work by Steve Martin and others has extended this basic idea to higher-cardinality chords. This article will concern itself with dyads, as the dyadic case is still the most well-developed, and many of the ideas extend naturally to larger chords without need for much exposition.&lt;br&gt;
 
&lt;br&gt;
 
The general idea of Harmonic Entropy is to first develop a discrete probability distribution quantifying how strongly an arbitrary incoming dyad "matches" every element in a set of basis rational intervals, and then seeing how evenly distributed the resulting probabilities are. If the distribution for some dyad is spread out very evenly, such that there is no clear "victor" basis interval that dominates the distribution, the dyad is considered to be more discordant; on the other extreme, if the distribution tends to concentrate on one or a small set of dyads, the dyad is considered to be more concordant. A clear mathematical way of quantifying this is via &lt;span style="line-height: 1.5;"&gt;the [[http://en.wikipedia.org/wiki/Entropy_(information_theory) Shannon entropy]] of the probability distribution:&lt;/span&gt;&lt;br&gt;
 
&lt;br&gt;
 
&lt;math&gt;H(d) = -\sum_{b} p_d(b) \log_β p_d(b)&lt;/math&gt;&lt;br&gt;
 
&lt;br&gt;
 
where H(d) is the Shannon entropy of the dyad d, the b are all of the basis rationals in the set, the p&lt;span style="font-size: 90%; vertical-align: sub;"&gt;d&lt;/span&gt;(b) is the probability assigned to basis rational b given an input dyad of d, and the logarithm β reflects the units of information being used (by convention, we set β=e, corresponding to the use of nats). This is the Harmonic Entropy of the dyad d.&lt;br&gt;
 
&lt;br&gt;
 
In order to systematically assign a probability distribution to this dyad, we first start by defining a '''spreading function''' that dictates how the dyad is "smeared" out in log-frequency space, representing how the auditory system allows for some tolerance for mistuning. The typical choice that we will assume here for a spreading function is a Gaussian distribution, with mean set to be centered around the incoming dyad, and standard deviation '''s''' typically taken as a free parameter in the system.&lt;br&gt;
 
&lt;br&gt;
 
A fairly typical choice of settings for a basic dyadic HE model would be:&lt;br&gt;
* The basis set is all those rationals bounded by some maximum Tenney height, with the bound typically notated as '''N''' and set to at least 10000.
 
* The spreading function is typically a Gaussian distribution with a frequency deviation of 1% either way, or about s=~17 cents.&lt;br&gt;
 
Other spreading functions have also been explored, such as the use of the "Vos function" of a·exp(b|x|) rather than the Gaussian distribution. We will assume the Gaussian distribution as the spreading function for the remainder of this article, so that the spreading function for a dyad d can be written as follows:&lt;br&gt;
 
&lt;br&gt;
 
&lt;math&gt;S(x-d) = \frac{1}{s\sqrt{2\pi}} e^{-\frac{(x-d)^2}{2s^2}}&lt;/math&gt;&lt;br&gt;
 
&lt;br&gt;
 
where the notation S(x-d) is chosen to make clear that we are translating S to be centered around the dyad d, which is now the mean of the Gaussian. In this notation, ''s'' becomes the standard deviation of the Gaussian, being an ASCII-friendly version of the more familiar symbol σ for representing the standard deviation. We assume here that the variable x represents cents, and will adopt this convention for the remainder of the article. Note that in previous expositions on Harmonic Entropy, ''s'' was sometimes given in units representing a percentage of linear-frequency deviation; we allow ''s'' to stand for cents here to simplify the notation. To convert from a percentage to cents, the formula cents = 1200*log2(1+percentage) can be used.&lt;br&gt;
 
&lt;br&gt;
 
It is also common to use as a basis set all those rationals bounded by some maximum Weil height, with a typical cutoff for N set to at least 100. This has sometimes been referred to as seeding HE with the "Farey sequence of order N" and its reciprocals, so references in Paul's work to "Farey series HE" vs "Tenney series HE" are sometimes seen.&lt;br&gt;
 
&lt;br&gt;
 
Given a spreading function and set of basis rationals, there are two different procedures commonly used to assign probabilities to each rational. The first, the '''domain-integral approach''', works for arbitrary nowhere dense sets of rationals without any further free parameters. The second, the '''complexity-normalization approach''', has nice mathematical properties which sometimes make it easier to compute and which may lead to generalizations to infinite sets of rationals which are sometimes dense in the reals. It is conjectured that there are certain important limiting situations where the two converge; both are described in detail below.&lt;br&gt;
 
&lt;br&gt;
 
=Domain-Integral Probabilities=
 
For sets of basis rationals which are nowhere dense, the log-frequency spectrum can be divided up into '''domains''' assigned to the basis rationals. Each rational is assigned a domain with lower bound equal to the mediant of itself and its nearest lower neighbor, and likewise with upper bound equal to the mediant of itself and its nearest upper neighbor. If no such neighbor exists, ±∞ is used instead. Mathematically, this can be represented via the following expression:&lt;br&gt;
 
&lt;br&gt;
 
&lt;math&gt;p_d(b) = \int_{\cent(b_l)}^{\cent(b_u)} S(x-d) dx&lt;/math&gt;&lt;br&gt;
 
&lt;br&gt;
 
where s&lt;span style="vertical-align: sub;"&gt;d&lt;/span&gt;(x) is the spreading function associated with d&lt;span style="line-height: 1.5;"&gt;, b&lt;/span&gt;&lt;span style="line-height: 1.5; vertical-align: sub;"&gt;l&lt;/span&gt;&lt;span style="line-height: 1.5;"&gt; and b&lt;/span&gt;&lt;span style="line-height: 1.5; vertical-align: sub;"&gt;u&lt;/span&gt;&lt;span style="line-height: 1.5;"&gt; are the domain lower and upper bounds associated with basis rational b, and ¢(f) = 1200·log2(f), or the "cents" function converting frequency ratios to cents. Normally, b&lt;/span&gt;&lt;span style="line-height: 1.5; vertical-align: sub;"&gt;l &lt;/span&gt;&lt;span style="line-height: 1.5;"&gt;is set equal to the mediant of b and its nearest lower neighbor (if it exists), or -∞ if not; likewise with b&lt;/span&gt;&lt;span style="line-height: 1.5; vertical-align: sub;"&gt;u&lt;/span&gt;&lt;span style="line-height: 1.5;"&gt;.&lt;/span&gt;&lt;br&gt;
 
&lt;br&gt;
 
This process can be summarized by the following picture, taken from [[http://sethares.engr.wisc.edu/paperspdf/HarmonicEntropy.pdf William Sethares' paper on Harmonic Entropy]]:&lt;br&gt;
 
&lt;br&gt;
 
http://i.imgur.com/aQlqRXz.png&lt;br&gt;
 
Note the difference in terminology here - in this example, the f&lt;span style="font-size: 90%; vertical-align: sub;"&gt;j+n&lt;/span&gt; are the basis rationals, the r&lt;span style="font-size: 12px; vertical-align: sub;"&gt;j+n&lt;/span&gt; are the domains for each basis rational, and the bounds for each domain are the mediants between each f&lt;span style="font-size: 12px; vertical-align: sub;"&gt;j+n &lt;/span&gt;and its nearest neighbor. The probability assigned to each basis rational is then the area under the spreading function curve for each rational's domain. The entropy of this probability distribution is then the Harmonic Entropy for that dyad.&lt;br&gt;
 
&lt;br&gt;
 
In the case where the set of basis rationals consists of a finite set bounded by Tenney or Weil height, the resulting set of widths is conjectured to have interesting mathematical properties, leading to mathematically nice conceptual simplifications of the model. These simplifications are explained below.&lt;br&gt;
 
&lt;br&gt;
=Complexity-Normalization Probabilities=
 
It has been noted empirically by Paul Erlich that, given all those rationals with Tenney height under some cutoff N as a basis set, that the domain widths for rationals sufficiently far from the cutoff seem to be proportional to 1/sqrt(nd). While it's still an open conjecture that this pattern holds for arbitrarily large N, the assumption is sometimes made that this is the case, and hence that for these basis rational sets, 1/sqrt(nd) "approximations" to the width are sufficient to estimate domain-integral Harmonic Entropy. This modifies the expression for the p&lt;span style="font-size: 12px; vertical-align: sub;"&gt;d&lt;/span&gt;(b) as follows, noting that for the moment the "probabilities" won't sum to 1:&lt;br&gt;
 
&lt;br&gt;
 
&lt;math&gt;q_d(b) = \frac{S(\cent(b)-d)}{\sqrt{n_b \cdot d_b}}&lt;/math&gt;&lt;br&gt;
 
&lt;br&gt;
 
where the q&lt;span style="font-size: 12px; vertical-align: sub;"&gt;d&lt;/span&gt;(b) now represent the unnormalized "probabilities", and n&lt;span style="vertical-align: sub;"&gt;b&lt;/span&gt; and d&lt;span style="vertical-align: sub;"&gt;b&lt;/span&gt; are the numerator and denominator, respectively, of basis rational b. Again, the set of basis rationals here is assumed to be all of those rationals of Tenney Height ≤ N for some N.&lt;br&gt;
 
&lt;br&gt;
 
A similar observation for the use of Weil-bounded subsets of the rationals suggests domain widths of 1/max(n,d), yielding instead the following formula:&lt;br&gt;
 
&lt;br&gt;
 
&lt;math&gt;q_d(b) = \frac{S(\cent(b)-d)}{\max(n_b,d_b)}&lt;/math&gt;&lt;br&gt;
 
&lt;br&gt;
 
where this time the set of basis rationals is assumed to be all of those of Weil Height ≤ N for some N.&lt;br&gt;
 
&lt;br&gt;
 
In both cases, the general approach is the same: the value of the spreading function, taken at the value of cents(b), is divided by some sort of "complexity" function representing how much weight is given to that rational number. While the two complexity functions considered thus far were derived empirically by observing the asymptotic behavior of various height-bounded subsets of the rationals, we can generalize this for arbitrary basis sets of rationals and arbitrary complexities as follows:&lt;br&gt;
 
&lt;br&gt;
 
&lt;math&gt;q_d(b) = \frac{S(\cent(b)-d)}{\|b\|}&lt;/math&gt;&lt;br&gt;
 
&lt;br&gt;
 
where ||b|| denotes a complexity function mapping from rational numbers to non-negative reals.&lt;br&gt;
 
&lt;br&gt;
 
As these "probabilities" don't sum to 1, the result is not a probability distribution at all, invalidating the use of the Shannon Entropy. To rectify this, the distribution is normalized so that the probabilities do sum to 1:&lt;br&gt;
 
&lt;br&gt;
 
&lt;math&gt;p_d(b) = \frac{q_d(b)}{\sum_b q_d(b)}&lt;/math&gt;&lt;br&gt;
 
&lt;br&gt;
 
The p&lt;span style="vertical-align: sub;"&gt;d&lt;/span&gt;(b) are then used directly to compute the entropy.&lt;br&gt;
 
&lt;br&gt;
 
This approach to assigning probabilities to basis rationals is useful because it hypothetically makes it possible to consider the HE of sets of rationals which are dense in the reals, or even the entire set of positive rationals ℚ&lt;span style="font-size: 80%; vertical-align: super;"&gt;+&lt;/span&gt;, although the best way to do this is a subject of ongoing research.&lt;br&gt;
 
&lt;br&gt;
 
=Examples=
 
&lt;br&gt;
 
&lt;span style="background-color: #ffffff;"&gt;In all of these examples, the x-axis represents the width in cents of the dyad, and the y-axis represents &lt;/span&gt;''&lt;span style="background-color: #ffffff;"&gt;discordance&lt;/span&gt;'' rather than concordance&lt;span style="background-color: #ffffff;"&gt;, measured in nats of Shannon entropy. Note that by convention, the value for s is typically expressed as a percentage of frequency deviation; this can be converted to cents via &lt;/span&gt;&lt;br&gt;
 
&lt;br&gt;
 
&lt;br&gt;
 
&lt;span style="background-color: #ffffff;"&gt;This uses as a spreading function the Gaussian distribution with s=~17 cents (or a lin-frequency deviation of 1%). The basis set is all rationals of Tenney height less than 10000. This uses the complexity-normalization approach, and the complexity function is sqrt(n·d):&lt;/span&gt;&lt;br&gt;
 
http://i.imgur.com/tNg7z1P.png&lt;br&gt;
 
&lt;span style="background-color: #ffffff;"&gt;This example uses the same spreading function and standard deviation, but this time the basis set is all rationals of Weil height less than 100. The complexity function here is max(n,d):&lt;/span&gt;&lt;br&gt;
 
&lt;br&gt;
 
http://i.imgur.com/TZdU6eD.png&lt;br&gt;
 
The following image compares the domain-integral and complexity-normalization approaches by overlaying the two curves on top of each other. In both cases, the spreading function is again a Gaussian with s=~17 cents, and the basis set is all those rationals with Tenney height ≤ 10000. It can be seen that the curves are extremely similar, and that the locations of the minima and maxima are largely preserved:&lt;br&gt;
 
http://i.imgur.com/5QPTsEP.png&lt;br&gt;
 
&lt;span style="font-size: 1.4em; line-height: 1.5;"&gt;'''Harmonic Rényi Entropy'''&lt;/span&gt;&lt;br&gt;
 
An extension to the base Harmonic Entropy model, proposed by Mike Battaglia, is to generalize the use of [[http://en.wikipedia.org/wiki/Entropy_(information_theory) Shannon entropy]] by replacing it instead with [[http://en.wikipedia.org/wiki/R%C3%A9nyi_entropy Rényi entropy]], a [[http://en.wikipedia.org/wiki/Q-analog q-analog]] of Shannon's original entropy. The '''Harmonic Rényi Entropy of order a''' of an incoming dyad can be defined as follows:&lt;br&gt;
 
&lt;br&gt;
 
&lt;math&gt;H_a(d) = \frac{1}{1-a} \log_β \sum_b p_d(b)^a&lt;/math&gt;&lt;br&gt;
 
&lt;br&gt;
 
where the p_d(b) are the probabilities assigned by dyad d to each basis rational b. Being a q-analog, it is noteworthy that Rényi entropy converges to Shannon entropy in the limit as a→1, a fact which can be verified using L'Hôpital's rule as found [[http://www.sonycsl.co.jp/person/nielsen/Note-HopitalRuleShannonRenyiTsallis.pdf here]].&lt;br&gt;
 
&lt;br&gt;
 
The Rényi entropy has found use in cryptography as a measure of the strength of a cryptographic code in the face of an intelligent attacker, an application for which Shannon entropy has long been known to be insufficient as described in [[http://users.cis.fiu.edu/~smithg/papers/qest11.pdf this paper]] and [[http://www.ietf.org/rfc/rfc4086.txt this RFC]]. More precisely, the Rényi entropy of order ∞, also called the '''min-entropy''', is used to measure the strength of the randomness used to define a cryptographic secret against a "worst-case" attacker who has complete knowledge of the probability distribution from which cryptographic secrets are drawn. In a musical context, by considering the incoming dyad as analogous to a cryptographic code which is attempting to be "cracked" by an intelligent auditory system, we can consider that the analogous "worst-case attacker" would be a "best-case auditory system" which has complete awareness of the probability distribution for any incoming dyad. This analogy would view such an auditory system as actively attempting to choose the most probable rational, rather than drawing a rational at random weighted by the distribution.&lt;br&gt;
 
&lt;br&gt;
 
The use of a=∞ min-entropy would reflect this view. In contrast, the use of a=1 Shannon entropy reflects a much "dumber" process which performs no such analysis and perhaps doesn't even seek to "choose" any sort of "victor" rational at all. As the parameter a interpolates between these two options, it &lt;span style="line-height: 1.5;"&gt;can be interpreted as the extent to which the rational-matching process for incoming dyads is considered to be "intelligent" and "active" in this way.&lt;/span&gt;&lt;br&gt;
 
&lt;br&gt;
 
Some psychoacoustic effects naturally fit into this paradigm, such as the virtual pitch integration process, which actually does attempt to find a single victor when matching incoming chords with chunks of the harmonic series. Other psychoacoustic effects, such as that of beatlessness, may instead be better viewed as "dumb" processes whereby nothing in particular is being "chosen," but where a more uniform distribution of matching rational numbers for a dyad simply generates a more discordant sonic effect. Different values of a can differentiate between the predominance given to these two types of effect in the overall construct of psychoacoustic concordance.&lt;br&gt;
 
&lt;br&gt;
 
Certain values of ''a'' reduce to simpler expressions and have special names.&lt;br&gt;
 
&lt;br&gt;
 
===a=0: Harmonic Hartley Entropy===
 
&lt;math&gt;H(d) = \log |R|&lt;/math&gt;&lt;br&gt;
 
where |R| is the cardinality of the set of basis rationals. This assumes, in essence, an "infinitely dumb" auditory system which can do no better than picking a rational number from a uniform distribution completely at random. All dyads have the same Harmonic Hartley Entropy. The Hartley Entropy is sometimes called the "max-entropy," and is useful mainly as an upper bound on the other forms of entropy: all Rényi Entropies are always guaranteed to be less than the Hartley Entropy.&lt;br&gt;
 
http://i.imgur.com/iVFpChm.png&lt;br&gt;
 
''Harmonic Hartley Entropy (a=0) with the basis set all rationals with Tenney height ≤ 10000. Note that the choice of spreading function makes no difference in the end result at all.''&lt;br&gt;
 
&lt;br&gt;
===a=1: Harmonic Shannon Entropy (Harmonic Entropy)===
 
&lt;math&gt;H(d) = -\sum_{b} p_d(b) \log p_d(b)&lt;/math&gt;&lt;br&gt;
 
This is Paul's original Harmonic Entropy. Within the cryptographic analogy, this can be thought of as an auditory system which simply selects a rational at random from the incoming distribution, weighted via the distribution itself.&lt;br&gt;
 
http://i.imgur.com/bghmli1.png&lt;br&gt;
 
''Harmonic Shannon Entropy (a=1) with the basis set all rationals with Tenney height ≤ 10000, spreading function a Gaussian distribution with s=1% (~17 cents), and sqrt(n·d) complexity.''&lt;br&gt;
 
&lt;br&gt;
===a=2: Harmonic Collision Entropy===
 
&lt;math&gt;H(d) = -\log \sum_b p_d(b)^2 = -log (P_d = Q_d)&lt;/math&gt;&lt;br&gt;
 
where P&lt;span style="font-size: 90%; vertical-align: sub;"&gt;d&lt;/span&gt; and Q&lt;span style="font-size: 90%; vertical-align: sub;"&gt;d&lt;/span&gt; are independent and identically distributed random variables corresponding to the same dyad, and the collision entropy is the same as the negative log of the probability that the two variables produce the same outcome.&lt;br&gt;
 
http://i.imgur.com/LBzWxgY.png&lt;br&gt;
 
''Harmonic Collision Entropy (a=2) with the basis set all rationals with Tenney height ≤ 10000, spreading function a Gaussian distribution with s=1% (~17 cents), and sqrt(n·d) complexity.''&lt;br&gt;
 
&lt;br&gt;
===a=∞: Harmonic Min-Entropy===
 
&lt;math&gt;-\log \max_b p_d(b)&lt;/math&gt;&lt;br&gt;
 
This is the min-entropy, which simply takes the negative log of the largest probability in the distribution. This can be thought of as representing the "strength" of the incoming dyad from being "deciphered" by a "best-case" auditory system. The name "min-entropy" reflects that the a=∞ case is guaranteed to be a lower bound among all Rényi entropies.&lt;br&gt;
 
http://i.imgur.com/u91Xkww.png&lt;br&gt;
 
''Harmonic Rényi Entropy with a=7, with the high value of a being chosen to approximate min-entropy (a=''∞''). The basis set is still all rationals with Tenney height ≤ 10000, the spreading function a Gaussian distribution with s=1% (~17 cents), and the complexity function sqrt(n·d).''&lt;br&gt;
= =
 
=Convolution-Based Expression For Quickly Computing Renyi Entropy=
 
Below is given an derivation that expresses Harmonic Renyi Entropy in terms of two simpler functions, each of which is a convolution product and hence can be computed quickly using the Fast Fourier Transform. The below derivation depends on the use of complexity-normalization probabilities, although it may be possible to extend to domain-integral probabilities instead.&lt;br&gt;
 
&lt;br&gt;
 
===Preliminaries===
 
The Harmonic Renyi Entropy is defined as&lt;br&gt;
 
&lt;br&gt;
 
&lt;math&gt;H_a(d) = \frac{1}{1-a} \log_β \sum_b p_d(b)^a&lt;/math&gt;&lt;br&gt;
 
&lt;br&gt;
 
As before, we can write the p&lt;span style="vertical-align: sub;"&gt;d&lt;/span&gt; as follows:&lt;br&gt;
 
&lt;br&gt;
 
&lt;math&gt;p_d(b) = \frac{q_d(b)}{\sum_b q_d(b)}&lt;/math&gt;&lt;br&gt;
 
&lt;br&gt;
 
where the q&lt;span style="vertical-align: sub;"&gt;d&lt;/span&gt; are "unnormalized" probabilities, and the denominator above is the sum of these unnormalized probabilities, so that all of the p&lt;span style="vertical-align: sub;"&gt;d&lt;/span&gt; sum to 1.&lt;br&gt;


To simplify notation, we first rewrite the denominator as a "normalization" function:&lt;br&gt;
While psychoacoustic concordance is not a feature universal to all styles of music, it has been utilized significantly in Western music in the study of intonation. For instance, flexible-pitch ensembles operating within 12-EDO, such as barbershop quartets and string ensembles, will often adjust intonationally from the underlying 12-EDO reference to maximize the concordance of individual chords. Indeed, the entire history of Western tuning theory -- from meantone temperament, to the various Baroque well-temperaments, to 12-EDO itself, to the modern [[@xenharmonic/Regular Temperaments|theory of regular temperament]] -- can be seen as an attempt to reason mathematically about how to generate manageable tuning systems that will maximize concordance and minimize discordance.


&lt;br&gt;
The Harmonic Entropy model is a simple way of quantifying how much an arbitrary chord will exhibit psychoacoustic concordance.


&lt;math&gt;\psi(d) = \sum_b q_d(b)&lt;/math&gt;&lt;br&gt;
Concordance has often been confused with actual musical consonance, an unfortunate fact made more common by the&lt;span style="line-height: 1.5;"&gt; psychoacoustics literature under the unfortunate name &lt;/span&gt;**&lt;span style="line-height: 1.5;"&gt;sensory consonance&lt;/span&gt;**&lt;span style="line-height: 1.5;"&gt;, most often used to refer to phenomena related to roughness and beatlessness specifically. This is not to be confused with the more familiar construct of tonal stability, typically just called "consonance" in Western common practice music theory and sometimes clarified as "musical consonance" in the music cognition literature. To make matters worse, the literature has also at times referred to concordance -- and not tonal stability -- as &lt;/span&gt;**&lt;span style="line-height: 1.5;"&gt;tonal consonance&lt;/span&gt;**&lt;span style="line-height: 1.5;"&gt;, often referring to phenomena related to virtual pitch integration, creating a complete terminological mess. As a result, the term "consonance" has been completely avoided in this article.&lt;/span&gt;


&lt;br&gt;
=Model=
The original Harmonic Entropy model limited itself to working with dyads. More recently, work by Steve Martin and others has extended this basic idea to higher-cardinality chords. This article will concern itself with dyads, as the dyadic case is still the most well-developed, and many of the ideas extend naturally to larger chords without need for much exposition.


and putting back into the original equation, we get&lt;br&gt;
The general idea of Harmonic Entropy is to first develop a discrete probability distribution quantifying how strongly an arbitrary incoming dyad "matches" every element in a set of basis rational intervals, and then seeing how evenly distributed the resulting probabilities are. If the distribution for some dyad is spread out very evenly, such that there is no clear "victor" basis interval that dominates the distribution, the dyad is considered to be more discordant; on the other extreme, if the distribution tends to concentrate on one or a small set of dyads, the dyad is considered to be more concordant. A clear mathematical way of quantifying this is via &lt;span style="line-height: 1.5;"&gt;the [[@http://en.wikipedia.org/wiki/Entropy_(information_theory)|Shannon entropy]] of the probability distribution:&lt;/span&gt;


&lt;br&gt;
[[math]]
H(d) = -\sum_{b} p_d(b) \log_β p_d(b)
[[math]]


&lt;math&gt;H_a(d) = \frac{1}{1-a} \log_β \left( \sum_b \left( \frac{q_d(b)}{\psi(d)} \right)^a \right)&lt;/math&gt;&lt;br&gt;
where H(d) is the Shannon entropy of the dyad d, the b are all of the basis rationals in the set, the p&lt;span style="font-size: 90%; vertical-align: sub;"&gt;d&lt;/span&gt;(b) is the probability assigned to basis rational b given an input dyad of d, and the logarithm β reflects the units of information being used (by convention, we set β=e, corresponding to the use of nats). This is the Harmonic Entropy of the dyad d.


&lt;br&gt;
In order to systematically assign a probability distribution to this dyad, we first start by defining a **spreading function** that dictates how the dyad is "smeared" out in log-frequency space, representing how the auditory system allows for some tolerance for mistuning. The typical choice that we will assume here for a spreading function is a Gaussian distribution, with mean set to be centered around the incoming dyad, and standard deviation **s** typically taken as a free parameter in the system.


Since ψ(d) is the same for each basis interval b, we can pull it out of the summation to obtain:&lt;br&gt;
A fairly typical choice of settings for a basic dyadic HE model would be:
* The basis set is all those rationals bounded by some maximum Tenney height, with the bound typically notated as **N** and set to at least 10000.
* The spreading function is typically a Gaussian distribution with a frequency deviation of 1% either way, or about s=~17 cents.


&lt;br&gt;
Other spreading functions have also been explored, such as the use of the "Vos function" of a·exp(b|x|) rather than the Gaussian distribution. We will assume the Gaussian distribution as the spreading function for the remainder of this article, so that the spreading function for a dyad d can be written as follows:


&lt;math&gt;H_a(d) = \frac{1}{1-a} \log_β \left( \frac{\sum_b q_d(b)^a}{\psi(d)^a} \right)&lt;/math&gt;&lt;br&gt;
[[math]]
S(x-d) = \frac{1}{s\sqrt{2\pi}} e^{-\frac{(x-d)^2}{2s^2}}
[[math]]


&lt;br&gt;
where the notation S(x-d) is chosen to make clear that we are translating S to be centered around the dyad d, which is now the mean of the Gaussian. In this notation, //s// becomes the standard deviation of the Gaussian, being an ASCII-friendly version of the more familiar symbol σ for representing the standard deviation. We assume here that the variable x represents cents, and will adopt this convention for the remainder of the article. Note that in previous expositions on Harmonic Entropy, //s// was sometimes given in units representing a percentage of linear-frequency deviation; we allow //s// to stand for cents here to simplify the notation. To convert from a percentage to cents, the formula cents = 1200*log2(1+percentage) can be used.


To simplify, we can also rewrite the numerator, the sum of "raw" (unnormalized) pseudo-probabilities, as a function:&lt;br&gt;
It is also common to use as a basis set all those rationals bounded by some maximum Weil height, with a typical cutoff for N set to at least 100. This has sometimes been referred to as seeding HE with the "Farey sequence of order N" and its reciprocals, so references in Paul's work to "Farey series HE" vs "Tenney series HE" are sometimes seen.


&lt;br&gt;
Given a spreading function and set of basis rationals, there are two different procedures commonly used to assign probabilities to each rational. The first, the **domain-integral approach**, works for arbitrary nowhere dense sets of rationals without any further free parameters. The second, the **complexity-normalization approach**, has nice mathematical properties which sometimes make it easier to compute and which may lead to generalizations to infinite sets of rationals which are sometimes dense in the reals. It is conjectured that there are certain important limiting situations where the two converge; both are described in detail below.


&lt;math&gt;\rho_a(d) = \sum_b q_d(b)^a&lt;/math&gt;&lt;br&gt;
=Domain-Integral Probabilities=
For sets of basis rationals which are nowhere dense, the log-frequency spectrum can be divided up into **domains** assigned to the basis rationals. Each rational is assigned a domain with lower bound equal to the mediant of itself and its nearest lower neighbor, and likewise with upper bound equal to the mediant of itself and its nearest upper neighbor. If no such neighbor exists, ±∞ is used instead. Mathematically, this can be represented via the following expression:


&lt;br&gt;
[[math]]
p_d(b) = \int_{\cent(b_l)}^{\cent(b_u)} S(x-d) dx
[[math]]


Finally, we put this all together to obtain a simplified version of the Harmonic Renyi Entropy equation:&lt;br&gt;
where s&lt;span style="vertical-align: sub;"&gt;d&lt;/span&gt;(x) is the spreading function associated with d&lt;span style="line-height: 1.5;"&gt;, b&lt;/span&gt;&lt;span style="line-height: 1.5; vertical-align: sub;"&gt;l&lt;/span&gt;&lt;span style="line-height: 1.5;"&gt; and b&lt;/span&gt;&lt;span style="line-height: 1.5; vertical-align: sub;"&gt;u&lt;/span&gt;&lt;span style="line-height: 1.5;"&gt; are the domain lower and upper bounds associated with basis rational b, and ¢(f) = 1200·log2(f), or the "cents" function converting frequency ratios to cents. Normally, b&lt;/span&gt;&lt;span style="line-height: 1.5; vertical-align: sub;"&gt;l &lt;/span&gt;&lt;span style="line-height: 1.5;"&gt;is set equal to the mediant of b and its nearest lower neighbor (if it exists), or -∞ if not; likewise with b&lt;/span&gt;&lt;span style="line-height: 1.5; vertical-align: sub;"&gt;u&lt;/span&gt;&lt;span style="line-height: 1.5;"&gt;.&lt;/span&gt;


&lt;br&gt;
This process can be summarized by the following picture, taken from [[@http://sethares.engr.wisc.edu/paperspdf/HarmonicEntropy.pdf|William Sethares' paper on Harmonic Entropy]]:


&lt;math&gt;H_a(d) = \frac{1}{1-a} \log_β \left( \frac{\rho_a(d)}{\psi(d)^a} \right)&lt;/math&gt;&lt;br&gt;
[[image:http://i.imgur.com/aQlqRXz.png]]
Note the difference in terminology here - in this example, the f&lt;span style="font-size: 90%; vertical-align: sub;"&gt;j+n&lt;/span&gt; are the basis rationals, the r&lt;span style="font-size: 12px; vertical-align: sub;"&gt;j+n&lt;/span&gt; are the domains for each basis rational, and the bounds for each domain are the mediants between each f&lt;span style="font-size: 12px; vertical-align: sub;"&gt;j+n &lt;/span&gt;and its nearest neighbor. The probability assigned to each basis rational is then the area under the spreading function curve for each rational's domain. The entropy of this probability distribution is then the Harmonic Entropy for that dyad.


&lt;br&gt;
In the case where the set of basis rationals consists of a finite set bounded by Tenney or Weil height, the resulting set of widths is conjectured to have interesting mathematical properties, leading to mathematically nice conceptual simplifications of the model. These simplifications are explained below.


We thus reduce the term inside the logarithm to the quotient of the functions ρ&lt;span style="vertical-align: sub;"&gt;a&lt;/span&gt;(d) and ψ(d)&lt;span style="vertical-align: super;"&gt;a&lt;/span&gt;. Our aim is now to express each of these two functions in terms of a convolution product.&lt;br&gt;
=Complexity-Normalization Probabilities=
It has been noted empirically by Paul Erlich that, given all those rationals with Tenney height under some cutoff N as a basis set, that the domain widths for rationals sufficiently far from the cutoff seem to be proportional to 1/sqrt(nd). While it's still an open conjecture that this pattern holds for arbitrarily large N, the assumption is sometimes made that this is the case, and hence that for these basis rational sets, 1/sqrt(nd) "approximations" to the width are sufficient to estimate domain-integral Harmonic Entropy. This modifies the expression for the p&lt;span style="font-size: 12px; vertical-align: sub;"&gt;d&lt;/span&gt;(b) as follows, noting that for the moment the "probabilities" won't sum to 1:


&lt;br&gt;
[[math]]
q_d(b) = \frac{S(\cent(b)-d)}{\sqrt{n_b \cdot d_b}}
[[math]]


===Convolution product for ψ(d)===
where the q&lt;span style="font-size: 12px; vertical-align: sub;"&gt;d&lt;/span&gt;(b) now represent the unnormalized "probabilities", and n&lt;span style="vertical-align: sub;"&gt;b&lt;/span&gt; and d&lt;span style="vertical-align: sub;"&gt;b&lt;/span&gt; are the numerator and denominator, respectively, of basis rational b. Again, the set of basis rationals here is assumed to be all of those rationals of Tenney Height ≤ N for some N.


ψ(d), the normalization function, is written as follows:&lt;br&gt;
A similar observation for the use of Weil-bounded subsets of the rationals suggests domain widths of 1/max(n,d), yielding instead the following formula:


&lt;br&gt;
[[math]]
q_d(b) = \frac{S(\cent(b)-d)}{\max(n_b,d_b)}
[[math]]


&lt;math&gt;\psi(d) = \sum_b q_d(b)&lt;/math&gt;&lt;br&gt;
where this time the set of basis rationals is assumed to be all of those of Weil Height ≤ N for some N.


&lt;br&gt;
In both cases, the general approach is the same: the value of the spreading function, taken at the value of cents(b), is divided by some sort of "complexity" function representing how much weight is given to that rational number. While the two complexity functions considered thus far were derived empirically by observing the asymptotic behavior of various height-bounded subsets of the rationals, we can generalize this for arbitrary basis sets of rationals and arbitrary complexities as follows:


Again, each q&lt;span style="vertical-align: sub;"&gt;d&lt;/span&gt;(b) is defined as follows:&lt;br&gt;
[[math]]
q_d(b) = \frac{S(\cent(b)-d)}{\|b\|}
[[math]]


&lt;math&gt;q_d(b) = \frac{S(\cent(b)-d)}{\|b\|}&lt;/math&gt;&lt;br&gt;
where ||b|| denotes a complexity function mapping from rational numbers to non-negative reals.


&lt;br&gt;
As these "probabilities" don't sum to 1, the result is not a probability distribution at all, invalidating the use of the Shannon Entropy. To rectify this, the distribution is normalized so that the probabilities do sum to 1:


Assuming we are treating the d as constant, it is clear that the q&lt;span style="vertical-align: sub;"&gt;d&lt;/span&gt;(b) are all scaled, translated, flipped versions of the spreading function S. We can use this property to rewrite each one as a convolution with a delta distribution:&lt;br&gt;
[[math]]
p_d(b) = \frac{q_d(b)}{\sum_b q_d(b)}
[[math]]


&lt;math&gt;q_d(b) = \left(S \ast \frac{\delta_{-\cent(b)}}{\|b\|}\right)(-d)&lt;/math&gt;&lt;br&gt;
The p&lt;span style="vertical-align: sub;"&gt;d&lt;/span&gt;(b) are then used directly to compute the entropy.


&lt;br&gt;
This approach to assigning probabilities to basis rationals is useful because it hypothetically makes it possible to consider the HE of sets of rationals which are dense in the reals, or even the entire set of positive rationals ℚ&lt;span style="font-size: 80%; vertical-align: super;"&gt;+&lt;/span&gt;, although the best way to do this is a subject of ongoing research.


Putting this back into the original summation, we obtain&lt;br&gt;
=Examples=


&lt;math&gt;\psi(d) = \sum_b \left(S \ast \frac{\delta_{-\cent(b)}}{\|b\|}\right)(-d)&lt;/math&gt;&lt;br&gt;
&lt;span style="background-color: #ffffff;"&gt;In all of these examples, the x-axis represents the width in cents of the dyad, and the y-axis represents &lt;/span&gt;//&lt;span style="background-color: #ffffff;"&gt;discordance&lt;/span&gt;// rather than concordance&lt;span style="background-color: #ffffff;"&gt;, measured in nats of Shannon entropy. Note that by convention, the value for s is typically expressed as a percentage of frequency deviation; this can be converted to cents via &lt;/span&gt;


&lt;br&gt;


We note that the left factor in the convolution product is always S, and is not dependent on b in any way. Since convolution distributes over multiplication, we can factor the S out of the summation to obtain&lt;br&gt;
&lt;span style="background-color: #ffffff;"&gt;This uses as a spreading function the Gaussian distribution with s=~17 cents (or a lin-frequency deviation of 1%). The basis set is all rationals of Tenney height less than 10000. This uses the complexity-normalization approach, and the complexity function is sqrt(n·d):&lt;/span&gt;
[[image:http://i.imgur.com/tNg7z1P.png]]
&lt;span style="background-color: #ffffff;"&gt;This example uses the same spreading function and standard deviation, but this time the basis set is all rationals of Weil height less than 100. The complexity function here is max(n,d):&lt;/span&gt;


&lt;math&gt;\psi(d) = \left[S \ast \left(\sum_b \frac{\delta_{-\cent(b)}}{\|b\|}\right)\right](-d)&lt;/math&gt;&lt;br&gt;
[[image:http://i.imgur.com/TZdU6eD.png]]
The following image compares the domain-integral and complexity-normalization approaches by overlaying the two curves on top of each other. In both cases, the spreading function is again a Gaussian with s=~17 cents, and the basis set is all those rationals with Tenney height ≤ 10000. It can be seen that the curves are extremely similar, and that the locations of the minima and maxima are largely preserved:
[[image:http://i.imgur.com/5QPTsEP.png width="800" height="600"]]
&lt;span style="font-size: 1.4em; line-height: 1.5;"&gt;**Harmonic Rényi Entropy**&lt;/span&gt;
An extension to the base Harmonic Entropy model, proposed by Mike Battaglia, is to generalize the use of [[@http://en.wikipedia.org/wiki/Entropy_(information_theory)|Shannon entropy]] by replacing it instead with [[@http://en.wikipedia.org/wiki/R%C3%A9nyi_entropy|Rényi entropy]], a [[@http://en.wikipedia.org/wiki/Q-analog|q-analog]] of Shannon's original entropy. The **Harmonic Rényi Entropy of order a** of an incoming dyad can be defined as follows:


&lt;br&gt;
[[math]]
H_a(d) = \frac{1}{1-a} \log_β \sum_b p_d(b)^a
[[math]]


We can clean up this notation by defining the auxiliary distribution K:&lt;br&gt;
where the p_d(b) are the probabilities assigned by dyad d to each basis rational b. Being a q-analog, it is noteworthy that Rényi entropy converges to Shannon entropy in the limit as a→1, a fact which can be verified using L'Hôpital's rule as found [[@http://www.sonycsl.co.jp/person/nielsen/Note-HopitalRuleShannonRenyiTsallis.pdf|here]].


&lt;math&gt;K(d) = \left(\sum_b \frac{\delta_{-\cent(b)}}{\|b\|}\right)&lt;/math&gt;&lt;br&gt;
The Rényi entropy has found use in cryptography as a measure of the strength of a cryptographic code in the face of an intelligent attacker, an application for which Shannon entropy has long been known to be insufficient as described in [[@http://users.cis.fiu.edu/~smithg/papers/qest11.pdf|this paper]] and [[@http://www.ietf.org/rfc/rfc4086.txt|this RFC]]. More precisely, the Rényi entropy of order ∞, also called the **min-entropy**, is used to measure the strength of the randomness used to define a cryptographic secret against a "worst-case" attacker who has complete knowledge of the probability distribution from which cryptographic secrets are drawn. In a musical context, by considering the incoming dyad as analogous to a cryptographic code which is attempting to be "cracked" by an intelligent auditory system, we can consider that the analogous "worst-case attacker" would be a "best-case auditory system" which has complete awareness of the probability distribution for any incoming dyad. This analogy would view such an auditory system as actively attempting to choose the most probable rational, rather than drawing a rational at random weighted by the distribution.


&lt;br&gt;
The use of a=∞ min-entropy would reflect this view. In contrast, the use of a=1 Shannon entropy reflects a much "dumber" process which performs no such analysis and perhaps doesn't even seek to "choose" any sort of "victor" rational at all. As the parameter a interpolates between these two options, it &lt;span style="line-height: 1.5;"&gt;can be interpreted as the extent to which the rational-matching process for incoming dyads is considered to be "intelligent" and "active" in this way.&lt;/span&gt;


Which leaves us with the final expression:&lt;br&gt;
Some psychoacoustic effects naturally fit into this paradigm, such as the virtual pitch integration process, which actually does attempt to find a single victor when matching incoming chords with chunks of the harmonic series. Other psychoacoustic effects, such as that of beatlessness, may instead be better viewed as "dumb" processes whereby nothing in particular is being "chosen," but where a more uniform distribution of matching rational numbers for a dyad simply generates a more discordant sonic effect. Different values of a can differentiate between the predominance given to these two types of effect in the overall construct of psychoacoustic concordance.


&lt;math&gt;\psi(d) = \left[S \ast K\right](-d)&lt;/math&gt;&lt;br&gt;
Certain values of //a// reduce to simpler expressions and have special names.


&lt;br&gt;
===a=0: Harmonic Hartley Entropy===
[[math]]
H(d) = \log |R|
[[math]]
where |R| is the cardinality of the set of basis rationals. This assumes, in essence, an "infinitely dumb" auditory system which can do no better than picking a rational number from a uniform distribution completely at random. All dyads have the same Harmonic Hartley Entropy. The Hartley Entropy is sometimes called the "max-entropy," and is useful mainly as an upper bound on the other forms of entropy: all Rényi Entropies are always guaranteed to be less than the Hartley Entropy.
[[image:http://i.imgur.com/iVFpChm.png width="560" height="281"]]
//Harmonic Hartley Entropy (a=0) with the basis set all rationals with Tenney height ≤ 10000. Note that the choice of spreading function makes no difference in the end result at all.//


===Convolution product for ρ&lt;span style="vertical-align: sub;"&gt;a&lt;/span&gt;(d)===
===a=1: Harmonic Shannon Entropy (Harmonic Entropy)===
[[math]]
H(d) = -\sum_{b} p_d(b) \log p_d(b)
[[math]]
This is Paul's original Harmonic Entropy. Within the cryptographic analogy, this can be thought of as an auditory system which simply selects a rational at random from the incoming distribution, weighted via the distribution itself.
[[image:http://i.imgur.com/bghmli1.png width="560" height="278"]]
//Harmonic Shannon Entropy (a=1) with the basis set all rationals with Tenney height ≤ 10000, spreading function a Gaussian distribution with s=1% (~17 cents), and sqrt(n·d) complexity.//


The derivation for ρ&lt;span style="vertical-align: sub;"&gt;a&lt;/span&gt;(d) proceeds similarly. Recall the function is written as follows:&lt;br&gt;
===a=2: Harmonic Collision Entropy===
[[math]]
H(d) = -\log \sum_b p_d(b)^2 = -log (P_d = Q_d)
[[math]]
where P&lt;span style="font-size: 90%; vertical-align: sub;"&gt;d&lt;/span&gt; and Q&lt;span style="font-size: 90%; vertical-align: sub;"&gt;d&lt;/span&gt; are independent and identically distributed random variables corresponding to the same dyad, and the collision entropy is the same as the negative log of the probability that the two variables produce the same outcome.
[[image:http://i.imgur.com/LBzWxgY.png width="560" height="278"]]
//Harmonic Collision Entropy (a=2) with the basis set all rationals with Tenney height ≤ 10000, spreading function a Gaussian distribution with s=1% (~17 cents), and sqrt(n·d) complexity.//


&lt;math&gt;\rho_a(d) = \sum_b q_d(b)^a&lt;/math&gt;&lt;br&gt;
===a=∞: Harmonic Min-Entropy===
[[math]]
-\log \max_b p_d(b)
[[math]]
This is the min-entropy, which simply takes the negative log of the largest probability in the distribution. This can be thought of as representing the "strength" of the incoming dyad from being "deciphered" by a "best-case" auditory system. The name "min-entropy" reflects that the a=∞ case is guaranteed to be a lower bound among all Rényi entropies.
[[image:http://i.imgur.com/u91Xkww.png width="560" height="281"]]
//Harmonic Rényi Entropy with a=7, with the high value of a being chosen to approximate min-entropy (a=//∞//). The basis set is still all rationals with Tenney height ≤ 10000, the spreading function a Gaussian distribution with s=1% (~17 cents), and the complexity function sqrt(n·d).//
= =
=Convolution-Based Expression For Quickly Computing Renyi Entropy=
Below is given an derivation that expresses Harmonic Renyi Entropy in terms of two simpler functions, each of which is a convolution product and hence can be computed quickly using the Fast Fourier Transform. The below derivation depends on the use of complexity-normalization probabilities, although it may be possible to extend to domain-integral probabilities instead.


&lt;br&gt;
===Preliminaries===
The Harmonic Renyi Entropy is defined as


The expression for each q&lt;span style="vertical-align: sub;"&gt;d&lt;/span&gt;(b)&lt;span style="vertical-align: super;"&gt;a&lt;/span&gt; is:&lt;br&gt;
[[math]]
H_a(d) = \frac{1}{1-a} \log_β \sum_b p_d(b)^a
[[math]]


&lt;math&gt;q_d(b)^a = \frac{S(\cent(b)-d)^a}{\|b\|^a}&lt;/math&gt;&lt;br&gt;
As before, we can write the p&lt;span style="vertical-align: sub;"&gt;d&lt;/span&gt; as follows:


&lt;br&gt;
[[math]]
p_d(b) = \frac{q_d(b)}{\sum_b q_d(b)}
[[math]]


We can again express this as a convolution of the function S&lt;span style="vertical-align: super;"&gt;a&lt;/span&gt;, meaning the spreading function S taken to the a'th power, and a delta distribution:&lt;br&gt;
where the q&lt;span style="vertical-align: sub;"&gt;d&lt;/span&gt; are "unnormalized" probabilities, and the denominator above is the sum of these unnormalized probabilities, so that all of the p&lt;span style="vertical-align: sub;"&gt;d&lt;/span&gt; sum to 1.
To simplify notation, we first rewrite the denominator as a "normalization" function:


&lt;math&gt;q_d(b)^a = \left(S^a \ast \frac{\delta_{-\cent(b)}}{\|b\|^a}\right)(-d)&lt;/math&gt;&lt;br&gt;
[[math]]
\psi(d) = \sum_b q_d(b)
[[math]]


&lt;br&gt;
and putting back into the original equation, we get


Putting this back into the original summation and factoring as before, we obtain&lt;br&gt;
[[math]]
H_a(d) = \frac{1}{1-a} \log_β \left( \sum_b \left( \frac{q_d(b)}{\psi(d)} \right)^a \right)
[[math]]


&lt;math&gt;\rho_a(d) = \left[S^a \ast \left(\sum_b \frac{\delta_{-\cent(b)}}{\|b\|^a}\right)\right](-d)&lt;/math&gt;&lt;br&gt;
Since ψ(d) is the same for each basis interval b, we can pull it out of the summation to obtain:


&lt;br&gt;
[[math]]
H_a(d) = \frac{1}{1-a} \log_β \left( \frac{\sum_b q_d(b)^a}{\psi(d)^a} \right)
[[math]]


And again we clean up notation by defining the auxiliary distribution&lt;br&gt;
To simplify, we can also rewrite the numerator, the sum of "raw" (unnormalized) pseudo-probabilities, as a function:


&lt;math&gt;K^a(d) = \left(\sum_b \frac{\delta_{-\cent(b)}}{\|b\|^a}\right)&lt;/math&gt;&lt;br&gt;
[[math]]
\rho_a(d) = \sum_b q_d(b)^a
[[math]]


&lt;br&gt;
Finally, we put this all together to obtain a simplified version of the Harmonic Renyi Entropy equation:


so that&lt;br&gt;
[[math]]
H_a(d) = \frac{1}{1-a} \log_β \left( \frac{\rho_a(d)}{\psi(d)^a} \right)
[[math]]


&lt;math&gt;\rho_a(d) = \left[S^a \ast K^a\right](-d)&lt;/math&gt;&lt;br&gt;
We thus reduce the term inside the logarithm to the quotient of the functions ρ&lt;span style="vertical-align: sub;"&gt;a&lt;/span&gt;(d) and ψ(d)&lt;span style="vertical-align: super;"&gt;a&lt;/span&gt;. Our aim is now to express each of these two functions in terms of a convolution product.


&lt;br&gt;
===Convolution product for ψ(d)===
ψ(d), the normalization function, is written as follows:


We have now succeeded in representing ρ&lt;span style="vertical-align: sub;"&gt;a&lt;/span&gt;(d) as a convolution.&lt;br&gt;
[[math]]
\psi(d) = \sum_b q_d(b)
[[math]]


Note that the function K&lt;span style="vertical-align: super;"&gt;a&lt;/span&gt;(d) involves a slight abuse of notation, as it is not literally K(d) taken to the a'th power (as the square of the delta distribution is undefined). Rather, we are simply taking the weights of each delta distribution in the summation to the a'th power.&lt;br&gt;
Again, each q&lt;span style="vertical-align: sub;"&gt;d&lt;/span&gt;(b) is defined as follows:
[[math]]
q_d(b) = \frac{S(\cent(b)-d)}{\|b\|}
[[math]]


&lt;br&gt;
Assuming we are treating the d as constant, it is clear that the q&lt;span style="vertical-align: sub;"&gt;d&lt;/span&gt;(b) are all scaled, translated, flipped versions of the spreading function S. We can use this property to rewrite each one as a convolution with a delta distribution:
[[math]]
q_d(b) = \left(S \ast \frac{\delta_{-\cent(b)}}{\|b\|}\right)(-d)
[[math]]


===Round-up===
Putting this back into the original summation, we obtain
[[math]]
\psi(d) = \sum_b \left(S \ast \frac{\delta_{-\cent(b)}}{\|b\|}\right)(-d)
[[math]]


Taking all of this, we can rewrite the original expression for Harmonic Renyi Entropy as follows:&lt;br&gt;
We note that the left factor in the convolution product is always S, and is not dependent on b in any way. Since convolution distributes over multiplication, we can factor the S out of the summation to obtain
[[math]]
\psi(d) = \left[S \ast \left(\sum_b \frac{\delta_{-\cent(b)}}{\|b\|}\right)\right](-d)
[[math]]


&lt;math&gt;H_a(d) = \frac{1}{1-a} \log_β \left( \frac{\left[S^a \ast K^a\right](-d)}{\left[S \ast K\right]^a(-d)} \right)&lt;/math&gt;&lt;br&gt;
We can clean up this notation by defining the auxiliary distribution K:
[[math]]
K(d) = \left(\sum_b \frac{\delta_{-\cent(b)}}{\|b\|}\right)
[[math]]


&lt;br&gt;
Which leaves us with the final expression:
[[math]]
\psi(d) = \left[S \ast K\right](-d)
[[math]]


where the expression&lt;br&gt;
===Convolution product for ρ&lt;span style="vertical-align: sub;"&gt;a&lt;/span&gt;(d)===
The derivation for ρ&lt;span style="vertical-align: sub;"&gt;a&lt;/span&gt;(d) proceeds similarly. Recall the function is written as follows:
[[math]]
\rho_a(d) = \sum_b q_d(b)^a
[[math]]


&lt;br&gt;
The expression for each q&lt;span style="vertical-align: sub;"&gt;d&lt;/span&gt;(b)&lt;span style="vertical-align: super;"&gt;a&lt;/span&gt; is:
[[math]]
q_d(b)^a = \frac{S(\cent(b)-d)^a}{\|b\|^a}
[[math]]


&lt;math&gt;\left[S \ast K\right]^a(-d)&lt;/math&gt;&lt;br&gt;
We can again express this as a convolution of the function S&lt;span style="vertical-align: super;"&gt;a&lt;/span&gt;, meaning the spreading function S taken to the a'th power, and a delta distribution:
[[math]]
q_d(b)^a = \left(S^a \ast \frac{\delta_{-\cent(b)}}{\|b\|^a}\right)(-d)
[[math]]


&lt;br&gt;
Putting this back into the original summation and factoring as before, we obtain
[[math]]
\rho_a(d) = \left[S^a \ast \left(\sum_b \frac{\delta_{-\cent(b)}}{\|b\|^a}\right)\right](-d)
[[math]]


represents the convolution of S and K, taken to the a'th power.&lt;br&gt;
And again we clean up notation by defining the auxiliary distribution
[[math]]
K^a(d) = \left(\sum_b \frac{\delta_{-\cent(b)}}{\|b\|^a}\right)
[[math]]


&lt;br&gt;
so that
[[math]]
\rho_a(d) = \left[S^a \ast K^a\right](-d)
[[math]]


We have succeeded in representing Harmonic Renyi Entropy in simple terms of two convolution products, each of which can be computed in O(N log N) time.&lt;br&gt;
We have now succeeded in representing ρ&lt;span style="vertical-align: sub;"&gt;a&lt;/span&gt;(d) as a convolution.
Note that the function K&lt;span style="vertical-align: super;"&gt;a&lt;/span&gt;(d) involves a slight abuse of notation, as it is not literally K(d) taken to the a'th power (as the square of the delta distribution is undefined). Rather, we are simply taking the weights of each delta distribution in the summation to the a'th power.


&lt;br&gt;
===Round-up===
Taking all of this, we can rewrite the original expression for Harmonic Renyi Entropy as follows:
[[math]]
H_a(d) = \frac{1}{1-a} \log_β \left( \frac{\left[S^a \ast K^a\right](-d)}{\left[S \ast K\right]^a(-d)} \right)
[[math]]


=References=
where the expression


[[http://www.webcitation.org/60qOlJVFS Paul Erlich article]]&lt;br&gt;
[[math]]
\left[S \ast K\right]^a(-d)
[[math]]


[[http://sethares.engr.wisc.edu/paperspdf/HarmonicEntropy.pdf William Sethares article]]&lt;br&gt;
represents the convolution of S and K, taken to the a'th power.


[[http://www.tonalsoft.com/enc/h/harmonic-entropy.aspx Harmonic entropy (TonalSoft encyclopedia)]]&lt;br&gt;
We have succeeded in representing Harmonic Renyi Entropy in simple terms of two convolution products, each of which can be computed in O(N log N) time.


[[http://launch.groups.yahoo.com/group/harmonic_entropy/ Harmonic entropy group on Yahoo]]&lt;br&gt;
=References=
 
[[http://www.webcitation.org/60qOlJVFS|Paul Erlich article]]
[[http://www.mikebattagliamusic.com/HE-JS/HE.html Harmonic entropy graph calculator (JavaScript)]]</pre></div>
[[http://sethares.engr.wisc.edu/paperspdf/HarmonicEntropy.pdf|William Sethares article]]
[[http://www.tonalsoft.com/enc/h/harmonic-entropy.aspx|Harmonic entropy (TonalSoft encyclopedia)]]
[[http://launch.groups.yahoo.com/group/harmonic_entropy/|Harmonic entropy group on Yahoo]]
[[@http://www.mikebattagliamusic.com/HE-JS/HE.html|Harmonic entropy graph calculator (JavaScript)]]</pre></div>
<h4>Original HTML content:</h4>
<h4>Original HTML content:</h4>
<div style="width:100%; max-height:400pt; overflow:auto; background-color:#f8f9fa; border: 1px solid #eaecf0; padding:0em"><pre style="margin:0px;border:none;background:none;word-wrap:break-word;width:200%;white-space: pre-wrap ! important" class="old-revision-html">&lt;html&gt;&lt;head&gt;&lt;title&gt;Harmonic Entropy&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&amp;lt;!--- xenharmonic (microtonal wiki) - Harmonic Entropy ---&amp;gt;&lt;br /&gt;
<div style="width:100%; max-height:400pt; overflow:auto; background-color:#f8f9fa; border: 1px solid #eaecf0; padding:0em"><pre style="margin:0px;border:none;background:none;word-wrap:break-word;width:200%;white-space: pre-wrap ! important" class="old-revision-html">&lt;html&gt;&lt;head&gt;&lt;title&gt;Harmonic Entropy&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;!-- ws:start:WikiTextMathRule:0:
&amp;lt;math&amp;gt;\newcommand{\cent}{\text{¢}}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[math]]&amp;lt;br/&amp;gt;
&lt;br /&gt;
\newcommand{\cent}{\text{¢}}&amp;lt;br/&amp;gt;[[math]]
&lt;!-- ws:start:WikiTextHeadingRule:0:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id="toc0"&gt;&lt;a name="Introduction"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:0 --&gt;Introduction&lt;/h1&gt;
--&gt;&lt;script type="math/tex"&gt;\newcommand{\cent}{\text{¢}}&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:0 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:35:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id="toc0"&gt;&lt;a name="Introduction"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:35 --&gt;Introduction&lt;/h1&gt;
'''Harmonic Entropy''', sometimes abbreviated as &amp;quot;HE&amp;quot;, is a simple model to quantify the extent to which musical chords exhibit various psychoacoustic effects, lumped together in a single construct called psychoacoustic '''concordance'''. It was invented by Paul Erlich and developed extensively on the Yahoo! tuning and harmonic_entropy lists. Various later contributions to the model have been made by Steve Martin, Mike Battaglia, Keenan Pepper, and others.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextTocRule:69:&amp;lt;img id=&amp;quot;wikitext@@toc@@normal&amp;quot; class=&amp;quot;WikiMedia WikiMediaToc&amp;quot; title=&amp;quot;Table of Contents&amp;quot; src=&amp;quot;/site/embedthumbnail/toc/normal?w=225&amp;amp;h=100&amp;quot;/&amp;gt; --&gt;&lt;div id="toc"&gt;&lt;h1 class="nopad"&gt;Table of Contents&lt;/h1&gt;&lt;!-- ws:end:WikiTextTocRule:69 --&gt;&lt;!-- ws:start:WikiTextTocRule:70: --&gt;&lt;div style="margin-left: 1em;"&gt;&lt;a href="#Introduction"&gt;Introduction&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;!-- ws:end:WikiTextTocRule:70 --&gt;&lt;!-- ws:start:WikiTextTocRule:71: --&gt;&lt;div style="margin-left: 1em;"&gt;&lt;a href="#Background"&gt;Background&lt;/a&gt;&lt;/div&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:end:WikiTextTocRule:71 --&gt;&lt;!-- ws:start:WikiTextTocRule:72: --&gt;&lt;div style="margin-left: 1em;"&gt;&lt;a href="#Model"&gt;Model&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;!-- ws:end:WikiTextTocRule:72 --&gt;&lt;!-- ws:start:WikiTextTocRule:73: --&gt;&lt;div style="margin-left: 1em;"&gt;&lt;a href="#Domain-Integral Probabilities"&gt;Domain-Integral Probabilities&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:start:WikiTextHeadingRule:2:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id="toc1"&gt;&lt;a name="Background"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:2 --&gt;Background&lt;/h1&gt;
&lt;!-- ws:end:WikiTextTocRule:73 --&gt;&lt;!-- ws:start:WikiTextTocRule:74: --&gt;&lt;div style="margin-left: 1em;"&gt;&lt;a href="#Complexity-Normalization Probabilities"&gt;Complexity-Normalization Probabilities&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;!-- ws:end:WikiTextTocRule:74 --&gt;&lt;!-- ws:start:WikiTextTocRule:75: --&gt;&lt;div style="margin-left: 1em;"&gt;&lt;a href="#Examples"&gt;Examples&lt;/a&gt;&lt;/div&gt;
The general workings of the human auditory system lead to a plethora of well-documented and sonically interesting phenomena that can occur when a musical chord is played:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:end:WikiTextTocRule:75 --&gt;&lt;!-- ws:start:WikiTextTocRule:76: --&gt;&lt;div style="margin-left: 3em;"&gt;&lt;a href="#Examples--a=0: Harmonic Hartley Entropy"&gt;a=0: Harmonic Hartley Entropy&lt;/a&gt;&lt;/div&gt;
&lt;ul&gt;&lt;li&gt;The perception of partial '''timbral fusion''' of the chord into one complex sound&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:end:WikiTextTocRule:76 --&gt;&lt;!-- ws:start:WikiTextTocRule:77: --&gt;&lt;div style="margin-left: 3em;"&gt;&lt;a href="#Examples--a=1: Harmonic Shannon Entropy (Harmonic Entropy)"&gt;a=1: Harmonic Shannon Entropy (Harmonic Entropy)&lt;/a&gt;&lt;/div&gt;
&lt;ul&gt;&lt;li&gt;The appearance of a '''virtual fundamental''' pitch in the bass&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:end:WikiTextTocRule:77 --&gt;&lt;!-- ws:start:WikiTextTocRule:78: --&gt;&lt;div style="margin-left: 3em;"&gt;&lt;a href="#Examples--a=2: Harmonic Collision Entropy"&gt;a=2: Harmonic Collision Entropy&lt;/a&gt;&lt;/div&gt;
&lt;ul&gt;&lt;li&gt;Critical band effects, such as timbral '''beatlessness''', compared to mistunings of the chord in the surrounding area&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:end:WikiTextTocRule:78 --&gt;&lt;!-- ws:start:WikiTextTocRule:79: --&gt;&lt;div style="margin-left: 3em;"&gt;&lt;a href="#Examples--a=∞: Harmonic Min-Entropy"&gt;a=∞: Harmonic Min-Entropy&lt;/a&gt;&lt;/div&gt;
&lt;ul&gt;&lt;li&gt;The appearance of a quick fluttering effect sometimes known as '''periodicity buzz'''&amp;lt;br&amp;gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:end:WikiTextTocRule:79 --&gt;&lt;!-- ws:start:WikiTextTocRule:80: --&gt;&lt;div style="margin-left: 1em;"&gt;&lt;a href="#toc10"&gt; &lt;/a&gt;&lt;/div&gt;
There has been much research specifically on the musical implications critical band effects in the literature (e.g. Sethares's work), which are perhaps the psychoacoustic phenomena that readers are most familiar with. However, the modern xenharmonic community has displayed immense interest in exploring the other effects mentioned above as well, which have proven extremely important to the development of modern xenharmonic music.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:end:WikiTextTocRule:80 --&gt;&lt;!-- ws:start:WikiTextTocRule:81: --&gt;&lt;div style="margin-left: 1em;"&gt;&lt;a href="#Convolution-Based Expression For Quickly Computing Renyi Entropy"&gt;Convolution-Based Expression For Quickly Computing Renyi Entropy&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;!-- ws:end:WikiTextTocRule:81 --&gt;&lt;!-- ws:start:WikiTextTocRule:82: --&gt;&lt;div style="margin-left: 3em;"&gt;&lt;a href="#Convolution-Based Expression For Quickly Computing Renyi Entropy--Preliminaries"&gt;Preliminaries&lt;/a&gt;&lt;/div&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:end:WikiTextTocRule:82 --&gt;&lt;!-- ws:start:WikiTextTocRule:83: --&gt;&lt;div style="margin-left: 3em;"&gt;&lt;a href="#Convolution-Based Expression For Quickly Computing Renyi Entropy--Convolution product for ψ(d)"&gt;Convolution product for ψ(d)&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;!-- ws:end:WikiTextTocRule:83 --&gt;&lt;!-- ws:start:WikiTextTocRule:84: --&gt;&lt;div style="margin-left: 3em;"&gt;&lt;a href="#Convolution-Based Expression For Quickly Computing Renyi Entropy--Convolution product for ρa(d)"&gt;Convolution product for ρa(d)&lt;/a&gt;&lt;/div&gt;
These effects sometimes behave differently, and do not always appear&lt;span style="line-height: 1.5;"&gt; strictly in tandem with one another. For instance, Paul Erlich has noted that most models for beatlessness measure 10:12:15 and 4:5:6 as being identical, whereas the latter exhibits more timbral fusion and a more salient virtual fundamental than the former. However, suppose we want to come up with a combined measure for how often effects such as the above tend to occur. It is then useful to note that&lt;/span&gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:end:WikiTextTocRule:84 --&gt;&lt;!-- ws:start:WikiTextTocRule:85: --&gt;&lt;div style="margin-left: 3em;"&gt;&lt;a href="#Convolution-Based Expression For Quickly Computing Renyi Entropy--Round-up"&gt;Round-up&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;!-- ws:end:WikiTextTocRule:85 --&gt;&lt;!-- ws:start:WikiTextTocRule:86: --&gt;&lt;div style="margin-left: 1em;"&gt;&lt;a href="#References"&gt;References&lt;/a&gt;&lt;/div&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:end:WikiTextTocRule:86 --&gt;&lt;!-- ws:start:WikiTextTocRule:87: --&gt;&lt;/div&gt;
&lt;ul&gt;&lt;li&gt;&lt;span style="line-height: 1.5;"&gt;effects such as these tend to appear most strongly for those chords with large subsets that correspond to simple chunks of the harmonic series&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;!-- ws:end:WikiTextTocRule:87 --&gt;&lt;strong&gt;Harmonic Entropy&lt;/strong&gt;, sometimes abbreviated as &amp;quot;HE&amp;quot;, is a simple model to quantify the extent to which musical chords exhibit various psychoacoustic effects, lumped together in a single construct called psychoacoustic &lt;strong&gt;concordance&lt;/strong&gt;. It was invented by Paul Erlich and developed extensively on the Yahoo! tuning and harmonic_entropy lists. Various later contributions to the model have been made by Steve Martin, Mike Battaglia, Keenan Pepper, and others.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span style="line-height: 1.5;"&gt;the effects produced exhibit some degree of tolerance for mistuning&lt;/span&gt;&amp;lt;br&amp;gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;span style="line-height: 1.5;"&gt;This enables us to speak of a general notion of the psychoacoustic &lt;/span&gt;'''&lt;span style="line-height: 1.5;"&gt;concordance&lt;/span&gt;'''&lt;span style="line-height: 1.5;"&gt; of an interval - the degree to which effects such as the above will appear when an arbitrary musical chord is played. Additionally, chords which are very inharmonic often exhibit a quality known as psychoacoustic &lt;/span&gt;'''&lt;span style="line-height: 1.5;"&gt;discordance&lt;/span&gt;'''&lt;span style="line-height: 1.5;"&gt;.&lt;/span&gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
While psychoacoustic concordance is not a feature universal to all styles of music, it has been utilized significantly in Western music in the study of intonation. For instance, flexible-pitch ensembles operating within 12-EDO, such as barbershop quartets and string ensembles, will often adjust intonationally from the underlying 12-EDO reference to maximize the concordance of individual chords. Indeed, the entire history of Western tuning theory -- from meantone temperament, to the various Baroque well-temperaments, to 12-EDO itself, to the modern &lt;a class="wiki_link" href="/Regular%20Temperaments"&gt;theory of regular temperament&lt;/a&gt; -- can be seen as an attempt to reason mathematically about how to generate manageable tuning systems that will maximize concordance and minimize discordance.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Harmonic Entropy model is a simple way of quantifying how much an arbitrary chord will exhibit psychoacoustic concordance.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Concordance has often been confused with actual musical consonance, an unfortunate fact made more common by the&lt;span style="line-height: 1.5;"&gt; psychoacoustics literature under the unfortunate name &lt;/span&gt;'''&lt;span style="line-height: 1.5;"&gt;sensory consonance&lt;/span&gt;'''&lt;span style="line-height: 1.5;"&gt;, most often used to refer to phenomena related to roughness and beatlessness specifically. This is not to be confused with the more familiar construct of tonal stability, typically just called &amp;quot;consonance&amp;quot; in Western common practice music theory and sometimes clarified as &amp;quot;musical consonance&amp;quot; in the music cognition literature. To make matters worse, the literature has also at times referred to concordance -- and not tonal stability -- as &lt;/span&gt;'''&lt;span style="line-height: 1.5;"&gt;tonal consonance&lt;/span&gt;'''&lt;span style="line-height: 1.5;"&gt;, often referring to phenomena related to virtual pitch integration, creating a complete terminological mess. As a result, the term &amp;quot;consonance&amp;quot; has been completely avoided in this article.&lt;/span&gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:4:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id="toc2"&gt;&lt;a name="Model"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:4 --&gt;Model&lt;/h1&gt;
&lt;br /&gt;
The original Harmonic Entropy model limited itself to working with dyads. More recently, work by Steve Martin and others has extended this basic idea to higher-cardinality chords. This article will concern itself with dyads, as the dyadic case is still the most well-developed, and many of the ideas extend naturally to larger chords without need for much exposition.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The general idea of Harmonic Entropy is to first develop a discrete probability distribution quantifying how strongly an arbitrary incoming dyad &amp;quot;matches&amp;quot; every element in a set of basis rational intervals, and then seeing how evenly distributed the resulting probabilities are. If the distribution for some dyad is spread out very evenly, such that there is no clear &amp;quot;victor&amp;quot; basis interval that dominates the distribution, the dyad is considered to be more discordant; on the other extreme, if the distribution tends to concentrate on one or a small set of dyads, the dyad is considered to be more concordant. A clear mathematical way of quantifying this is via &lt;span style="line-height: 1.5;"&gt;the [[&lt;!-- ws:start:WikiTextUrlRule:623:http://en.wikipedia.org/wiki/Entropy_(information_theory --&gt;&lt;a class="wiki_link_ext" href="http://en.wikipedia.org/wiki/Entropy_(information_theory" rel="nofollow"&gt;http://en.wikipedia.org/wiki/Entropy_(information_theory&lt;/a&gt;&lt;!-- ws:end:WikiTextUrlRule:623 --&gt;) Shannon entropy]] of the probability distribution:&lt;/span&gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H(d) = -\sum_{b} p_d(b) \log_β p_d(b)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where H(d) is the Shannon entropy of the dyad d, the b are all of the basis rationals in the set, the p&lt;span style="font-size: 90%; vertical-align: sub;"&gt;d&lt;/span&gt;(b) is the probability assigned to basis rational b given an input dyad of d, and the logarithm β reflects the units of information being used (by convention, we set β=e, corresponding to the use of nats). This is the Harmonic Entropy of the dyad d.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to systematically assign a probability distribution to this dyad, we first start by defining a '''spreading function''' that dictates how the dyad is &amp;quot;smeared&amp;quot; out in log-frequency space, representing how the auditory system allows for some tolerance for mistuning. The typical choice that we will assume here for a spreading function is a Gaussian distribution, with mean set to be centered around the incoming dyad, and standard deviation '''s''' typically taken as a free parameter in the system.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A fairly typical choice of settings for a basic dyadic HE model would be:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;The basis set is all those rationals bounded by some maximum Tenney height, with the bound typically notated as '''N''' and set to at least 10000.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;The spreading function is typically a Gaussian distribution with a frequency deviation of 1% either way, or about s=~17 cents.&amp;lt;br&amp;gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
Other spreading functions have also been explored, such as the use of the &amp;quot;Vos function&amp;quot; of a·exp(b|x|) rather than the Gaussian distribution. We will assume the Gaussian distribution as the spreading function for the remainder of this article, so that the spreading function for a dyad d can be written as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;S(x-d) = \frac{1}{s\sqrt{2\pi}} e^{-\frac{(x-d)^2}{2s^2}}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the notation S(x-d) is chosen to make clear that we are translating S to be centered around the dyad d, which is now the mean of the Gaussian. In this notation, ''s'' becomes the standard deviation of the Gaussian, being an ASCII-friendly version of the more familiar symbol σ for representing the standard deviation. We assume here that the variable x represents cents, and will adopt this convention for the remainder of the article. Note that in previous expositions on Harmonic Entropy, ''s'' was sometimes given in units representing a percentage of linear-frequency deviation; we allow ''s'' to stand for cents here to simplify the notation. To convert from a percentage to cents, the formula cents = 1200*log2(1+percentage) can be used.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is also common to use as a basis set all those rationals bounded by some maximum Weil height, with a typical cutoff for N set to at least 100. This has sometimes been referred to as seeding HE with the &amp;quot;Farey sequence of order N&amp;quot; and its reciprocals, so references in Paul's work to &amp;quot;Farey series HE&amp;quot; vs &amp;quot;Tenney series HE&amp;quot; are sometimes seen.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Given a spreading function and set of basis rationals, there are two different procedures commonly used to assign probabilities to each rational. The first, the '''domain-integral approach''', works for arbitrary nowhere dense sets of rationals without any further free parameters. The second, the '''complexity-normalization approach''', has nice mathematical properties which sometimes make it easier to compute and which may lead to generalizations to infinite sets of rationals which are sometimes dense in the reals. It is conjectured that there are certain important limiting situations where the two converge; both are described in detail below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:6:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id="toc3"&gt;&lt;a name="Domain-Integral Probabilities"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:6 --&gt;Domain-Integral Probabilities&lt;/h1&gt;
&lt;br /&gt;
For sets of basis rationals which are nowhere dense, the log-frequency spectrum can be divided up into '''domains''' assigned to the basis rationals. Each rational is assigned a domain with lower bound equal to the mediant of itself and its nearest lower neighbor, and likewise with upper bound equal to the mediant of itself and its nearest upper neighbor. If no such neighbor exists, ±∞ is used instead. Mathematically, this can be represented via the following expression:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;p_d(b) = \int_{\cent(b_l)}^{\cent(b_u)} S(x-d) dx&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where s&lt;span style="vertical-align: sub;"&gt;d&lt;/span&gt;(x) is the spreading function associated with d&lt;span style="line-height: 1.5;"&gt;, b&lt;/span&gt;&lt;span style="line-height: 1.5; vertical-align: sub;"&gt;l&lt;/span&gt;&lt;span style="line-height: 1.5;"&gt; and b&lt;/span&gt;&lt;span style="line-height: 1.5; vertical-align: sub;"&gt;u&lt;/span&gt;&lt;span style="line-height: 1.5;"&gt; are the domain lower and upper bounds associated with basis rational b, and ¢(f) = 1200·log2(f), or the &amp;quot;cents&amp;quot; function converting frequency ratios to cents. Normally, b&lt;/span&gt;&lt;span style="line-height: 1.5; vertical-align: sub;"&gt;l &lt;/span&gt;&lt;span style="line-height: 1.5;"&gt;is set equal to the mediant of b and its nearest lower neighbor (if it exists), or -∞ if not; likewise with b&lt;/span&gt;&lt;span style="line-height: 1.5; vertical-align: sub;"&gt;u&lt;/span&gt;&lt;span style="line-height: 1.5;"&gt;.&lt;/span&gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process can be summarized by the following picture, taken from [[&lt;!-- ws:start:WikiTextUrlRule:624:http://sethares.engr.wisc.edu/paperspdf/HarmonicEntropy.pdf --&gt;&lt;a class="wiki_link_ext" href="http://sethares.engr.wisc.edu/paperspdf/HarmonicEntropy.pdf" rel="nofollow"&gt;http://sethares.engr.wisc.edu/paperspdf/HarmonicEntropy.pdf&lt;/a&gt;&lt;!-- ws:end:WikiTextUrlRule:624 --&gt; William Sethares' paper on Harmonic Entropy]]:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextUrlRule:625:http://i.imgur.com/aQlqRXz.png --&gt;&lt;a class="wiki_link_ext" href="http://i.imgur.com/aQlqRXz.png" rel="nofollow"&gt;http://i.imgur.com/aQlqRXz.png&lt;/a&gt;&lt;!-- ws:end:WikiTextUrlRule:625 --&gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note the difference in terminology here - in this example, the f&lt;span style="font-size: 90%; vertical-align: sub;"&gt;j+n&lt;/span&gt; are the basis rationals, the r&lt;span style="font-size: 12px; vertical-align: sub;"&gt;j+n&lt;/span&gt; are the domains for each basis rational, and the bounds for each domain are the mediants between each f&lt;span style="font-size: 12px; vertical-align: sub;"&gt;j+n &lt;/span&gt;and its nearest neighbor. The probability assigned to each basis rational is then the area under the spreading function curve for each rational's domain. The entropy of this probability distribution is then the Harmonic Entropy for that dyad.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the case where the set of basis rationals consists of a finite set bounded by Tenney or Weil height, the resulting set of widths is conjectured to have interesting mathematical properties, leading to mathematically nice conceptual simplifications of the model. These simplifications are explained below.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:8:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id="toc4"&gt;&lt;a name="Complexity-Normalization Probabilities"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:8 --&gt;Complexity-Normalization Probabilities&lt;/h1&gt;
&lt;br /&gt;
It has been noted empirically by Paul Erlich that, given all those rationals with Tenney height under some cutoff N as a basis set, that the domain widths for rationals sufficiently far from the cutoff seem to be proportional to 1/sqrt(nd). While it's still an open conjecture that this pattern holds for arbitrarily large N, the assumption is sometimes made that this is the case, and hence that for these basis rational sets, 1/sqrt(nd) &amp;quot;approximations&amp;quot; to the width are sufficient to estimate domain-integral Harmonic Entropy. This modifies the expression for the p&lt;span style="font-size: 12px; vertical-align: sub;"&gt;d&lt;/span&gt;(b) as follows, noting that for the moment the &amp;quot;probabilities&amp;quot; won't sum to 1:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;q_d(b) = \frac{S(\cent(b)-d)}{\sqrt{n_b \cdot d_b}}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the q&lt;span style="font-size: 12px; vertical-align: sub;"&gt;d&lt;/span&gt;(b) now represent the unnormalized &amp;quot;probabilities&amp;quot;, and n&lt;span style="vertical-align: sub;"&gt;b&lt;/span&gt; and d&lt;span style="vertical-align: sub;"&gt;b&lt;/span&gt; are the numerator and denominator, respectively, of basis rational b. Again, the set of basis rationals here is assumed to be all of those rationals of Tenney Height ≤ N for some N.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A similar observation for the use of Weil-bounded subsets of the rationals suggests domain widths of 1/max(n,d), yielding instead the following formula:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;q_d(b) = \frac{S(\cent(b)-d)}{\max(n_b,d_b)}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where this time the set of basis rationals is assumed to be all of those of Weil Height ≤ N for some N.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In both cases, the general approach is the same: the value of the spreading function, taken at the value of cents(b), is divided by some sort of &amp;quot;complexity&amp;quot; function representing how much weight is given to that rational number. While the two complexity functions considered thus far were derived empirically by observing the asymptotic behavior of various height-bounded subsets of the rationals, we can generalize this for arbitrary basis sets of rationals and arbitrary complexities as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;q_d(b) = \frac{S(\cent(b)-d)}{\|b\|}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where ||b|| denotes a complexity function mapping from rational numbers to non-negative reals.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As these &amp;quot;probabilities&amp;quot; don't sum to 1, the result is not a probability distribution at all, invalidating the use of the Shannon Entropy. To rectify this, the distribution is normalized so that the probabilities do sum to 1:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;p_d(b) = \frac{q_d(b)}{\sum_b q_d(b)}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The p&lt;span style="vertical-align: sub;"&gt;d&lt;/span&gt;(b) are then used directly to compute the entropy.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This approach to assigning probabilities to basis rationals is useful because it hypothetically makes it possible to consider the HE of sets of rationals which are dense in the reals, or even the entire set of positive rationals ℚ&lt;span style="font-size: 80%; vertical-align: super;"&gt;+&lt;/span&gt;, although the best way to do this is a subject of ongoing research.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:10:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id="toc5"&gt;&lt;a name="Examples"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:10 --&gt;Examples&lt;/h1&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="background-color: #ffffff;"&gt;In all of these examples, the x-axis represents the width in cents of the dyad, and the y-axis represents &lt;/span&gt;''&lt;span style="background-color: #ffffff;"&gt;discordance&lt;/span&gt;'' rather than concordance&lt;span style="background-color: #ffffff;"&gt;, measured in nats of Shannon entropy. Note that by convention, the value for s is typically expressed as a percentage of frequency deviation; this can be converted to cents via &lt;/span&gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="background-color: #ffffff;"&gt;This uses as a spreading function the Gaussian distribution with s=~17 cents (or a lin-frequency deviation of 1%). The basis set is all rationals of Tenney height less than 10000. This uses the complexity-normalization approach, and the complexity function is sqrt(n·d):&lt;/span&gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextUrlRule:626:http://i.imgur.com/tNg7z1P.png --&gt;&lt;a class="wiki_link_ext" href="http://i.imgur.com/tNg7z1P.png" rel="nofollow"&gt;http://i.imgur.com/tNg7z1P.png&lt;/a&gt;&lt;!-- ws:end:WikiTextUrlRule:626 --&gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="background-color: #ffffff;"&gt;This example uses the same spreading function and standard deviation, but this time the basis set is all rationals of Weil height less than 100. The complexity function here is max(n,d):&lt;/span&gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextUrlRule:627:http://i.imgur.com/TZdU6eD.png --&gt;&lt;a class="wiki_link_ext" href="http://i.imgur.com/TZdU6eD.png" rel="nofollow"&gt;http://i.imgur.com/TZdU6eD.png&lt;/a&gt;&lt;!-- ws:end:WikiTextUrlRule:627 --&gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following image compares the domain-integral and complexity-normalization approaches by overlaying the two curves on top of each other. In both cases, the spreading function is again a Gaussian with s=~17 cents, and the basis set is all those rationals with Tenney height ≤ 10000. It can be seen that the curves are extremely similar, and that the locations of the minima and maxima are largely preserved:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextUrlRule:628:http://i.imgur.com/5QPTsEP.png --&gt;&lt;a class="wiki_link_ext" href="http://i.imgur.com/5QPTsEP.png" rel="nofollow"&gt;http://i.imgur.com/5QPTsEP.png&lt;/a&gt;&lt;!-- ws:end:WikiTextUrlRule:628 --&gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: 1.4em; line-height: 1.5;"&gt;'''Harmonic Rényi Entropy'''&lt;/span&gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An extension to the base Harmonic Entropy model, proposed by Mike Battaglia, is to generalize the use of [[&lt;!-- ws:start:WikiTextUrlRule:629:http://en.wikipedia.org/wiki/Entropy_(information_theory --&gt;&lt;a class="wiki_link_ext" href="http://en.wikipedia.org/wiki/Entropy_(information_theory" rel="nofollow"&gt;http://en.wikipedia.org/wiki/Entropy_(information_theory&lt;/a&gt;&lt;!-- ws:end:WikiTextUrlRule:629 --&gt;) Shannon entropy]] by replacing it instead with [[&lt;!-- ws:start:WikiTextUrlRule:630:http://en.wikipedia.org/wiki/R%C3%A9nyi_entropy --&gt;&lt;a class="wiki_link_ext" href="http://en.wikipedia.org/wiki/R%C3%A9nyi_entropy" rel="nofollow"&gt;http://en.wikipedia.org/wiki/R%C3%A9nyi_entropy&lt;/a&gt;&lt;!-- ws:end:WikiTextUrlRule:630 --&gt; Rényi entropy]], a [[&lt;!-- ws:start:WikiTextUrlRule:631:http://en.wikipedia.org/wiki/Q-analog --&gt;&lt;a class="wiki_link_ext" href="http://en.wikipedia.org/wiki/Q-analog" rel="nofollow"&gt;http://en.wikipedia.org/wiki/Q-analog&lt;/a&gt;&lt;!-- ws:end:WikiTextUrlRule:631 --&gt; q-analog]] of Shannon's original entropy. The '''Harmonic Rényi Entropy of order a''' of an incoming dyad can be defined as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H_a(d) = \frac{1}{1-a} \log_β \sum_b p_d(b)^a&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the p_d(b) are the probabilities assigned by dyad d to each basis rational b. Being a q-analog, it is noteworthy that Rényi entropy converges to Shannon entropy in the limit as a→1, a fact which can be verified using L'Hôpital's rule as found [[&lt;!-- ws:start:WikiTextUrlRule:632:http://www.sonycsl.co.jp/person/nielsen/Note-HopitalRuleShannonRenyiTsallis.pdf --&gt;&lt;a class="wiki_link_ext" href="http://www.sonycsl.co.jp/person/nielsen/Note-HopitalRuleShannonRenyiTsallis.pdf" rel="nofollow"&gt;http://www.sonycsl.co.jp/person/nielsen/Note-HopitalRuleShannonRenyiTsallis.pdf&lt;/a&gt;&lt;!-- ws:end:WikiTextUrlRule:632 --&gt; here]].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Rényi entropy has found use in cryptography as a measure of the strength of a cryptographic code in the face of an intelligent attacker, an application for which Shannon entropy has long been known to be insufficient as described in [[&lt;!-- ws:start:WikiTextUrlRule:633:http://users.cis.fiu.edu/~smithg/papers/qest11.pdf --&gt;&lt;a class="wiki_link_ext" href="http://users.cis.fiu.edu/~smithg/papers/qest11.pdf" rel="nofollow"&gt;http://users.cis.fiu.edu/~smithg/papers/qest11.pdf&lt;/a&gt;&lt;!-- ws:end:WikiTextUrlRule:633 --&gt; this paper]] and [[&lt;!-- ws:start:WikiTextUrlRule:634:http://www.ietf.org/rfc/rfc4086.txt --&gt;&lt;a class="wiki_link_ext" href="http://www.ietf.org/rfc/rfc4086.txt" rel="nofollow"&gt;http://www.ietf.org/rfc/rfc4086.txt&lt;/a&gt;&lt;!-- ws:end:WikiTextUrlRule:634 --&gt; this RFC]]. More precisely, the Rényi entropy of order ∞, also called the '''min-entropy''', is used to measure the strength of the randomness used to define a cryptographic secret against a &amp;quot;worst-case&amp;quot; attacker who has complete knowledge of the probability distribution from which cryptographic secrets are drawn. In a musical context, by considering the incoming dyad as analogous to a cryptographic code which is attempting to be &amp;quot;cracked&amp;quot; by an intelligent auditory system, we can consider that the analogous &amp;quot;worst-case attacker&amp;quot; would be a &amp;quot;best-case auditory system&amp;quot; which has complete awareness of the probability distribution for any incoming dyad. This analogy would view such an auditory system as actively attempting to choose the most probable rational, rather than drawing a rational at random weighted by the distribution.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The use of a=∞ min-entropy would reflect this view. In contrast, the use of a=1 Shannon entropy reflects a much &amp;quot;dumber&amp;quot; process which performs no such analysis and perhaps doesn't even seek to &amp;quot;choose&amp;quot; any sort of &amp;quot;victor&amp;quot; rational at all. As the parameter a interpolates between these two options, it &lt;span style="line-height: 1.5;"&gt;can be interpreted as the extent to which the rational-matching process for incoming dyads is considered to be &amp;quot;intelligent&amp;quot; and &amp;quot;active&amp;quot; in this way.&lt;/span&gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some psychoacoustic effects naturally fit into this paradigm, such as the virtual pitch integration process, which actually does attempt to find a single victor when matching incoming chords with chunks of the harmonic series. Other psychoacoustic effects, such as that of beatlessness, may instead be better viewed as &amp;quot;dumb&amp;quot; processes whereby nothing in particular is being &amp;quot;chosen,&amp;quot; but where a more uniform distribution of matching rational numbers for a dyad simply generates a more discordant sonic effect. Different values of a can differentiate between the predominance given to these two types of effect in the overall construct of psychoacoustic concordance.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Certain values of ''a'' reduce to simpler expressions and have special names.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:12:&amp;lt;h3&amp;gt; --&gt;&lt;h3 id="toc6"&gt;&lt;a name="Examples--a=0: Harmonic Hartley Entropy"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:12 --&gt;a=0: Harmonic Hartley Entropy&lt;/h3&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H(d) = \log |R|&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where |R| is the cardinality of the set of basis rationals. This assumes, in essence, an &amp;quot;infinitely dumb&amp;quot; auditory system which can do no better than picking a rational number from a uniform distribution completely at random. All dyads have the same Harmonic Hartley Entropy. The Hartley Entropy is sometimes called the &amp;quot;max-entropy,&amp;quot; and is useful mainly as an upper bound on the other forms of entropy: all Rényi Entropies are always guaranteed to be less than the Hartley Entropy.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextUrlRule:635:http://i.imgur.com/iVFpChm.png --&gt;&lt;a class="wiki_link_ext" href="http://i.imgur.com/iVFpChm.png" rel="nofollow"&gt;http://i.imgur.com/iVFpChm.png&lt;/a&gt;&lt;!-- ws:end:WikiTextUrlRule:635 --&gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Harmonic Hartley Entropy (a=0) with the basis set all rationals with Tenney height ≤ 10000. Note that the choice of spreading function makes no difference in the end result at all.''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:14:&amp;lt;h3&amp;gt; --&gt;&lt;h3 id="toc7"&gt;&lt;a name="Examples--a=1: Harmonic Shannon Entropy (Harmonic Entropy)"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:14 --&gt;a=1: Harmonic Shannon Entropy (Harmonic Entropy)&lt;/h3&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H(d) = -\sum_{b} p_d(b) \log p_d(b)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is Paul's original Harmonic Entropy. Within the cryptographic analogy, this can be thought of as an auditory system which simply selects a rational at random from the incoming distribution, weighted via the distribution itself.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextUrlRule:636:http://i.imgur.com/bghmli1.png --&gt;&lt;a class="wiki_link_ext" href="http://i.imgur.com/bghmli1.png" rel="nofollow"&gt;http://i.imgur.com/bghmli1.png&lt;/a&gt;&lt;!-- ws:end:WikiTextUrlRule:636 --&gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Harmonic Shannon Entropy (a=1) with the basis set all rationals with Tenney height ≤ 10000, spreading function a Gaussian distribution with s=1% (~17 cents), and sqrt(n·d) complexity.''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:16:&amp;lt;h3&amp;gt; --&gt;&lt;h3 id="toc8"&gt;&lt;a name="Examples--a=2: Harmonic Collision Entropy"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:16 --&gt;a=2: Harmonic Collision Entropy&lt;/h3&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H(d) = -\log \sum_b p_d(b)^2 = -log (P_d = Q_d)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where P&lt;span style="font-size: 90%; vertical-align: sub;"&gt;d&lt;/span&gt; and Q&lt;span style="font-size: 90%; vertical-align: sub;"&gt;d&lt;/span&gt; are independent and identically distributed random variables corresponding to the same dyad, and the collision entropy is the same as the negative log of the probability that the two variables produce the same outcome.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextUrlRule:637:http://i.imgur.com/LBzWxgY.png --&gt;&lt;a class="wiki_link_ext" href="http://i.imgur.com/LBzWxgY.png" rel="nofollow"&gt;http://i.imgur.com/LBzWxgY.png&lt;/a&gt;&lt;!-- ws:end:WikiTextUrlRule:637 --&gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Harmonic Collision Entropy (a=2) with the basis set all rationals with Tenney height ≤ 10000, spreading function a Gaussian distribution with s=1% (~17 cents), and sqrt(n·d) complexity.''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:18:&amp;lt;h3&amp;gt; --&gt;&lt;h3 id="toc9"&gt;&lt;a name="Examples--a=∞: Harmonic Min-Entropy"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:18 --&gt;a=∞: Harmonic Min-Entropy&lt;/h3&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;-\log \max_b p_d(b)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the min-entropy, which simply takes the negative log of the largest probability in the distribution. This can be thought of as representing the &amp;quot;strength&amp;quot; of the incoming dyad from being &amp;quot;deciphered&amp;quot; by a &amp;quot;best-case&amp;quot; auditory system. The name &amp;quot;min-entropy&amp;quot; reflects that the a=∞ case is guaranteed to be a lower bound among all Rényi entropies.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextUrlRule:638:http://i.imgur.com/u91Xkww.png --&gt;&lt;a class="wiki_link_ext" href="http://i.imgur.com/u91Xkww.png" rel="nofollow"&gt;http://i.imgur.com/u91Xkww.png&lt;/a&gt;&lt;!-- ws:end:WikiTextUrlRule:638 --&gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Harmonic Rényi Entropy with a=7, with the high value of a being chosen to approximate min-entropy (a=''∞''). The basis set is still all rationals with Tenney height ≤ 10000, the spreading function a Gaussian distribution with s=1% (~17 cents), and the complexity function sqrt(n·d).''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:20:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id="toc10"&gt;&lt;!-- ws:end:WikiTextHeadingRule:20 --&gt; &lt;/h1&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:22:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id="toc11"&gt;&lt;a name="Convolution-Based Expression For Quickly Computing Renyi Entropy"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:22 --&gt;Convolution-Based Expression For Quickly Computing Renyi Entropy&lt;/h1&gt;
&lt;br /&gt;
Below is given an derivation that expresses Harmonic Renyi Entropy in terms of two simpler functions, each of which is a convolution product and hence can be computed quickly using the Fast Fourier Transform. The below derivation depends on the use of complexity-normalization probabilities, although it may be possible to extend to domain-integral probabilities instead.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:24:&amp;lt;h3&amp;gt; --&gt;&lt;h3 id="toc12"&gt;&lt;a name="Convolution-Based Expression For Quickly Computing Renyi Entropy--Preliminaries"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:24 --&gt;Preliminaries&lt;/h3&gt;
&lt;br /&gt;
The Harmonic Renyi Entropy is defined as&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H_a(d) = \frac{1}{1-a} \log_β \sum_b p_d(b)^a&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As before, we can write the p&lt;span style="vertical-align: sub;"&gt;d&lt;/span&gt; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;p_d(b) = \frac{q_d(b)}{\sum_b q_d(b)}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the q&lt;span style="vertical-align: sub;"&gt;d&lt;/span&gt; are &amp;quot;unnormalized&amp;quot; probabilities, and the denominator above is the sum of these unnormalized probabilities, so that all of the p&lt;span style="vertical-align: sub;"&gt;d&lt;/span&gt; sum to 1.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To simplify notation, we first rewrite the denominator as a &amp;quot;normalization&amp;quot; function:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:37:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id="toc1"&gt;&lt;a name="Background"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:37 --&gt;Background&lt;/h1&gt;
The general workings of the human auditory system lead to a plethora of well-documented and sonically interesting phenomena that can occur when a musical chord is played:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;The perception of partial &lt;strong&gt;timbral fusion&lt;/strong&gt; of the chord into one complex sound&lt;/li&gt;&lt;li&gt;The appearance of a &lt;strong&gt;virtual fundamental&lt;/strong&gt; pitch in the bass&lt;/li&gt;&lt;li&gt;Critical band effects, such as timbral &lt;strong&gt;beatlessness&lt;/strong&gt;, compared to mistunings of the chord in the surrounding area&lt;/li&gt;&lt;li&gt;The appearance of a quick fluttering effect sometimes known as &lt;strong&gt;periodicity buzz&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
There has been much research specifically on the musical implications critical band effects in the literature (e.g. Sethares's work), which are perhaps the psychoacoustic phenomena that readers are most familiar with. However, the modern xenharmonic community has displayed immense interest in exploring the other effects mentioned above as well, which have proven extremely important to the development of modern xenharmonic music.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
These effects sometimes behave differently, and do not always appear&lt;span style="line-height: 1.5;"&gt; strictly in tandem with one another. For instance, Paul Erlich has noted that most models for beatlessness measure 10:12:15 and 4:5:6 as being identical, whereas the latter exhibits more timbral fusion and a more salient virtual fundamental than the former. However, suppose we want to come up with a combined measure for how often effects such as the above tend to occur. It is then useful to note that&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\psi(d) = \sum_b q_d(b)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span style="line-height: 1.5;"&gt;effects such as these tend to appear most strongly for those chords with large subsets that correspond to simple chunks of the harmonic series&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="line-height: 1.5;"&gt;the effects produced exhibit some degree of tolerance for mistuning&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;span style="line-height: 1.5;"&gt;This enables us to speak of a general notion of the psychoacoustic &lt;/span&gt;&lt;strong&gt;&lt;span style="line-height: 1.5;"&gt;concordance&lt;/span&gt;&lt;/strong&gt;&lt;span style="line-height: 1.5;"&gt; of an interval - the degree to which effects such as the above will appear when an arbitrary musical chord is played. Additionally, chords which are very inharmonic often exhibit a quality known as psychoacoustic &lt;/span&gt;&lt;strong&gt;&lt;span style="line-height: 1.5;"&gt;discordance&lt;/span&gt;&lt;/strong&gt;&lt;span style="line-height: 1.5;"&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
While psychoacoustic concordance is not a feature universal to all styles of music, it has been utilized significantly in Western music in the study of intonation. For instance, flexible-pitch ensembles operating within 12-EDO, such as barbershop quartets and string ensembles, will often adjust intonationally from the underlying 12-EDO reference to maximize the concordance of individual chords. Indeed, the entire history of Western tuning theory -- from meantone temperament, to the various Baroque well-temperaments, to 12-EDO itself, to the modern &lt;a class="wiki_link" href="http://xenharmonic.wikispaces.com/Regular%20Temperaments" target="_blank"&gt;theory of regular temperament&lt;/a&gt; -- can be seen as an attempt to reason mathematically about how to generate manageable tuning systems that will maximize concordance and minimize discordance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
and putting back into the original equation, we get&amp;lt;br&amp;gt;&lt;br /&gt;
The Harmonic Entropy model is a simple way of quantifying how much an arbitrary chord will exhibit psychoacoustic concordance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Concordance has often been confused with actual musical consonance, an unfortunate fact made more common by the&lt;span style="line-height: 1.5;"&gt; psychoacoustics literature under the unfortunate name &lt;/span&gt;&lt;strong&gt;&lt;span style="line-height: 1.5;"&gt;sensory consonance&lt;/span&gt;&lt;/strong&gt;&lt;span style="line-height: 1.5;"&gt;, most often used to refer to phenomena related to roughness and beatlessness specifically. This is not to be confused with the more familiar construct of tonal stability, typically just called &amp;quot;consonance&amp;quot; in Western common practice music theory and sometimes clarified as &amp;quot;musical consonance&amp;quot; in the music cognition literature. To make matters worse, the literature has also at times referred to concordance -- and not tonal stability -- as &lt;/span&gt;&lt;strong&gt;&lt;span style="line-height: 1.5;"&gt;tonal consonance&lt;/span&gt;&lt;/strong&gt;&lt;span style="line-height: 1.5;"&gt;, often referring to phenomena related to virtual pitch integration, creating a complete terminological mess. As a result, the term &amp;quot;consonance&amp;quot; has been completely avoided in this article.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H_a(d) = \frac{1}{1-a} \log_β \left( \sum_b \left( \frac{q_d(b)}{\psi(d)} \right)^a \right)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:39:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id="toc2"&gt;&lt;a name="Model"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:39 --&gt;Model&lt;/h1&gt;
The original Harmonic Entropy model limited itself to working with dyads. More recently, work by Steve Martin and others has extended this basic idea to higher-cardinality chords. This article will concern itself with dyads, as the dyadic case is still the most well-developed, and many of the ideas extend naturally to larger chords without need for much exposition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The general idea of Harmonic Entropy is to first develop a discrete probability distribution quantifying how strongly an arbitrary incoming dyad &amp;quot;matches&amp;quot; every element in a set of basis rational intervals, and then seeing how evenly distributed the resulting probabilities are. If the distribution for some dyad is spread out very evenly, such that there is no clear &amp;quot;victor&amp;quot; basis interval that dominates the distribution, the dyad is considered to be more discordant; on the other extreme, if the distribution tends to concentrate on one or a small set of dyads, the dyad is considered to be more concordant. A clear mathematical way of quantifying this is via &lt;span style="line-height: 1.5;"&gt;the &lt;a class="wiki_link_ext" href="http://en.wikipedia.org/wiki/Entropy_(information_theory)" rel="nofollow" target="_blank"&gt;Shannon entropy&lt;/a&gt; of the probability distribution:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since ψ(d) is the same for each basis interval b, we can pull it out of the summation to obtain:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextMathRule:1:
[[math]]&amp;lt;br/&amp;gt;
H(d) = -\sum_{b} p_d(b) \log_β p_d(b)&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;H(d) = -\sum_{b} p_d(b) \log_β p_d(b)&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:1 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
where H(d) is the Shannon entropy of the dyad d, the b are all of the basis rationals in the set, the p&lt;span style="font-size: 90%; vertical-align: sub;"&gt;d&lt;/span&gt;(b) is the probability assigned to basis rational b given an input dyad of d, and the logarithm β reflects the units of information being used (by convention, we set β=e, corresponding to the use of nats). This is the Harmonic Entropy of the dyad d.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H_a(d) = \frac{1}{1-a} \log_β \left( \frac{\sum_b q_d(b)^a}{\psi(d)^a} \right)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
In order to systematically assign a probability distribution to this dyad, we first start by defining a &lt;strong&gt;spreading function&lt;/strong&gt; that dictates how the dyad is &amp;quot;smeared&amp;quot; out in log-frequency space, representing how the auditory system allows for some tolerance for mistuning. The typical choice that we will assume here for a spreading function is a Gaussian distribution, with mean set to be centered around the incoming dyad, and standard deviation &lt;strong&gt;s&lt;/strong&gt; typically taken as a free parameter in the system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
A fairly typical choice of settings for a basic dyadic HE model would be:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;The basis set is all those rationals bounded by some maximum Tenney height, with the bound typically notated as &lt;strong&gt;N&lt;/strong&gt; and set to at least 10000.&lt;/li&gt;&lt;li&gt;The spreading function is typically a Gaussian distribution with a frequency deviation of 1% either way, or about s=~17 cents.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
Other spreading functions have also been explored, such as the use of the &amp;quot;Vos function&amp;quot; of a·exp(b|x|) rather than the Gaussian distribution. We will assume the Gaussian distribution as the spreading function for the remainder of this article, so that the spreading function for a dyad d can be written as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To simplify, we can also rewrite the numerator, the sum of &amp;quot;raw&amp;quot; (unnormalized) pseudo-probabilities, as a function:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextMathRule:2:
[[math]]&amp;lt;br/&amp;gt;
S(x-d) = \frac{1}{s\sqrt{2\pi}} e^{-\frac{(x-d)^2}{2s^2}}&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;S(x-d) = \frac{1}{s\sqrt{2\pi}} e^{-\frac{(x-d)^2}{2s^2}}&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:2 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
where the notation S(x-d) is chosen to make clear that we are translating S to be centered around the dyad d, which is now the mean of the Gaussian. In this notation, &lt;em&gt;s&lt;/em&gt; becomes the standard deviation of the Gaussian, being an ASCII-friendly version of the more familiar symbol σ for representing the standard deviation. We assume here that the variable x represents cents, and will adopt this convention for the remainder of the article. Note that in previous expositions on Harmonic Entropy, &lt;em&gt;s&lt;/em&gt; was sometimes given in units representing a percentage of linear-frequency deviation; we allow &lt;em&gt;s&lt;/em&gt; to stand for cents here to simplify the notation. To convert from a percentage to cents, the formula cents = 1200*log2(1+percentage) can be used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\rho_a(d) = \sum_b q_d(b)^a&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
It is also common to use as a basis set all those rationals bounded by some maximum Weil height, with a typical cutoff for N set to at least 100. This has sometimes been referred to as seeding HE with the &amp;quot;Farey sequence of order N&amp;quot; and its reciprocals, so references in Paul's work to &amp;quot;Farey series HE&amp;quot; vs &amp;quot;Tenney series HE&amp;quot; are sometimes seen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Given a spreading function and set of basis rationals, there are two different procedures commonly used to assign probabilities to each rational. The first, the &lt;strong&gt;domain-integral approach&lt;/strong&gt;, works for arbitrary nowhere dense sets of rationals without any further free parameters. The second, the &lt;strong&gt;complexity-normalization approach&lt;/strong&gt;, has nice mathematical properties which sometimes make it easier to compute and which may lead to generalizations to infinite sets of rationals which are sometimes dense in the reals. It is conjectured that there are certain important limiting situations where the two converge; both are described in detail below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, we put this all together to obtain a simplified version of the Harmonic Renyi Entropy equation:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:41:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id="toc3"&gt;&lt;a name="Domain-Integral Probabilities"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:41 --&gt;Domain-Integral Probabilities&lt;/h1&gt;
For sets of basis rationals which are nowhere dense, the log-frequency spectrum can be divided up into &lt;strong&gt;domains&lt;/strong&gt; assigned to the basis rationals. Each rational is assigned a domain with lower bound equal to the mediant of itself and its nearest lower neighbor, and likewise with upper bound equal to the mediant of itself and its nearest upper neighbor. If no such neighbor exists, ±∞ is used instead. Mathematically, this can be represented via the following expression:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextMathRule:3:
[[math]]&amp;lt;br/&amp;gt;
p_d(b) = \int_{\cent(b_l)}^{\cent(b_u)} S(x-d) dx&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;p_d(b) = \int_{\cent(b_l)}^{\cent(b_u)} S(x-d) dx&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:3 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H_a(d) = \frac{1}{1-a} \log_β \left( \frac{\rho_a(d)}{\psi(d)^a} \right)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
where s&lt;span style="vertical-align: sub;"&gt;d&lt;/span&gt;(x) is the spreading function associated with d&lt;span style="line-height: 1.5;"&gt;, b&lt;/span&gt;&lt;span style="line-height: 1.5; vertical-align: sub;"&gt;l&lt;/span&gt;&lt;span style="line-height: 1.5;"&gt; and b&lt;/span&gt;&lt;span style="line-height: 1.5; vertical-align: sub;"&gt;u&lt;/span&gt;&lt;span style="line-height: 1.5;"&gt; are the domain lower and upper bounds associated with basis rational b, and ¢(f) = 1200·log2(f), or the &amp;quot;cents&amp;quot; function converting frequency ratios to cents. Normally, b&lt;/span&gt;&lt;span style="line-height: 1.5; vertical-align: sub;"&gt;l &lt;/span&gt;&lt;span style="line-height: 1.5;"&gt;is set equal to the mediant of b and its nearest lower neighbor (if it exists), or -∞ if not; likewise with b&lt;/span&gt;&lt;span style="line-height: 1.5; vertical-align: sub;"&gt;u&lt;/span&gt;&lt;span style="line-height: 1.5;"&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This process can be summarized by the following picture, taken from &lt;a class="wiki_link_ext" href="http://sethares.engr.wisc.edu/paperspdf/HarmonicEntropy.pdf" rel="nofollow" target="_blank"&gt;William Sethares' paper on Harmonic Entropy&lt;/a&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We thus reduce the term inside the logarithm to the quotient of the functions ρ&lt;span style="vertical-align: sub;"&gt;a&lt;/span&gt;(d) and ψ(d)&lt;span style="vertical-align: super;"&gt;a&lt;/span&gt;. Our aim is now to express each of these two functions in terms of a convolution product.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextRemoteImageRule:110:&amp;lt;img src=&amp;quot;http://i.imgur.com/aQlqRXz.png&amp;quot; alt=&amp;quot;&amp;quot; title=&amp;quot;&amp;quot; /&amp;gt; --&gt;&lt;img src="http://i.imgur.com/aQlqRXz.png" alt="external image aQlqRXz.png" title="external image aQlqRXz.png" /&gt;&lt;!-- ws:end:WikiTextRemoteImageRule:110 --&gt;&lt;br /&gt;
Note the difference in terminology here - in this example, the f&lt;span style="font-size: 90%; vertical-align: sub;"&gt;j+n&lt;/span&gt; are the basis rationals, the r&lt;span style="font-size: 12px; vertical-align: sub;"&gt;j+n&lt;/span&gt; are the domains for each basis rational, and the bounds for each domain are the mediants between each f&lt;span style="font-size: 12px; vertical-align: sub;"&gt;j+n &lt;/span&gt;and its nearest neighbor. The probability assigned to each basis rational is then the area under the spreading function curve for each rational's domain. The entropy of this probability distribution is then the Harmonic Entropy for that dyad.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In the case where the set of basis rationals consists of a finite set bounded by Tenney or Weil height, the resulting set of widths is conjectured to have interesting mathematical properties, leading to mathematically nice conceptual simplifications of the model. These simplifications are explained below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:26:&amp;lt;h3&amp;gt; --&gt;&lt;h3 id="toc13"&gt;&lt;a name="Convolution-Based Expression For Quickly Computing Renyi Entropy--Convolution product for ψ(d)"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:26 --&gt;Convolution product for ψ(d)&lt;/h3&gt;
&lt;!-- ws:start:WikiTextHeadingRule:43:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id="toc4"&gt;&lt;a name="Complexity-Normalization Probabilities"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:43 --&gt;Complexity-Normalization Probabilities&lt;/h1&gt;
It has been noted empirically by Paul Erlich that, given all those rationals with Tenney height under some cutoff N as a basis set, that the domain widths for rationals sufficiently far from the cutoff seem to be proportional to 1/sqrt(nd). While it's still an open conjecture that this pattern holds for arbitrarily large N, the assumption is sometimes made that this is the case, and hence that for these basis rational sets, 1/sqrt(nd) &amp;quot;approximations&amp;quot; to the width are sufficient to estimate domain-integral Harmonic Entropy. This modifies the expression for the p&lt;span style="font-size: 12px; vertical-align: sub;"&gt;d&lt;/span&gt;(b) as follows, noting that for the moment the &amp;quot;probabilities&amp;quot; won't sum to 1:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ψ(d), the normalization function, is written as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextMathRule:4:
[[math]]&amp;lt;br/&amp;gt;
q_d(b) = \frac{S(\cent(b)-d)}{\sqrt{n_b \cdot d_b}}&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;q_d(b) = \frac{S(\cent(b)-d)}{\sqrt{n_b \cdot d_b}}&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:4 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
where the q&lt;span style="font-size: 12px; vertical-align: sub;"&gt;d&lt;/span&gt;(b) now represent the unnormalized &amp;quot;probabilities&amp;quot;, and n&lt;span style="vertical-align: sub;"&gt;b&lt;/span&gt; and d&lt;span style="vertical-align: sub;"&gt;b&lt;/span&gt; are the numerator and denominator, respectively, of basis rational b. Again, the set of basis rationals here is assumed to be all of those rationals of Tenney Height ≤ N for some N.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\psi(d) = \sum_b q_d(b)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
A similar observation for the use of Weil-bounded subsets of the rationals suggests domain widths of 1/max(n,d), yielding instead the following formula:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextMathRule:5:
[[math]]&amp;lt;br/&amp;gt;
q_d(b) = \frac{S(\cent(b)-d)}{\max(n_b,d_b)}&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;q_d(b) = \frac{S(\cent(b)-d)}{\max(n_b,d_b)}&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:5 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Again, each q&lt;span style="vertical-align: sub;"&gt;d&lt;/span&gt;(b) is defined as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
where this time the set of basis rationals is assumed to be all of those of Weil Height ≤ N for some N.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;q_d(b) = \frac{S(\cent(b)-d)}{\|b\|}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
In both cases, the general approach is the same: the value of the spreading function, taken at the value of cents(b), is divided by some sort of &amp;quot;complexity&amp;quot; function representing how much weight is given to that rational number. While the two complexity functions considered thus far were derived empirically by observing the asymptotic behavior of various height-bounded subsets of the rationals, we can generalize this for arbitrary basis sets of rationals and arbitrary complexities as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextMathRule:6:
[[math]]&amp;lt;br/&amp;gt;
q_d(b) = \frac{S(\cent(b)-d)}{\|b\|}&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;q_d(b) = \frac{S(\cent(b)-d)}{\|b\|}&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:6 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Assuming we are treating the d as constant, it is clear that the q&lt;span style="vertical-align: sub;"&gt;d&lt;/span&gt;(b) are all scaled, translated, flipped versions of the spreading function S. We can use this property to rewrite each one as a convolution with a delta distribution:&amp;lt;br&amp;gt;&lt;br /&gt;
where ||b|| denotes a complexity function mapping from rational numbers to non-negative reals.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;q_d(b) = \left(S \ast \frac{\delta_{-\cent(b)}}{\|b\|}\right)(-d)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
As these &amp;quot;probabilities&amp;quot; don't sum to 1, the result is not a probability distribution at all, invalidating the use of the Shannon Entropy. To rectify this, the distribution is normalized so that the probabilities do sum to 1:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextMathRule:7:
[[math]]&amp;lt;br/&amp;gt;
p_d(b) = \frac{q_d(b)}{\sum_b q_d(b)}&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;p_d(b) = \frac{q_d(b)}{\sum_b q_d(b)}&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:7 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Putting this back into the original summation, we obtain&amp;lt;br&amp;gt;&lt;br /&gt;
The p&lt;span style="vertical-align: sub;"&gt;d&lt;/span&gt;(b) are then used directly to compute the entropy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\psi(d) = \sum_b \left(S \ast \frac{\delta_{-\cent(b)}}{\|b\|}\right)(-d)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This approach to assigning probabilities to basis rationals is useful because it hypothetically makes it possible to consider the HE of sets of rationals which are dense in the reals, or even the entire set of positive rationals ℚ&lt;span style="font-size: 80%; vertical-align: super;"&gt;+&lt;/span&gt;, although the best way to do this is a subject of ongoing research.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:45:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id="toc5"&gt;&lt;a name="Examples"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:45 --&gt;Examples&lt;/h1&gt;
&lt;br /&gt;
&lt;span style="background-color: #ffffff;"&gt;In all of these examples, the x-axis represents the width in cents of the dyad, and the y-axis represents &lt;/span&gt;&lt;em&gt;&lt;span style="background-color: #ffffff;"&gt;discordance&lt;/span&gt;&lt;/em&gt; rather than concordance&lt;span style="background-color: #ffffff;"&gt;, measured in nats of Shannon entropy. Note that by convention, the value for s is typically expressed as a percentage of frequency deviation; this can be converted to cents via &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We note that the left factor in the convolution product is always S, and is not dependent on b in any way. Since convolution distributes over multiplication, we can factor the S out of the summation to obtain&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\psi(d) = \left[S \ast \left(\sum_b \frac{\delta_{-\cent(b)}}{\|b\|}\right)\right](-d)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;span style="background-color: #ffffff;"&gt;This uses as a spreading function the Gaussian distribution with s=~17 cents (or a lin-frequency deviation of 1%). The basis set is all rationals of Tenney height less than 10000. This uses the complexity-normalization approach, and the complexity function is sqrt(n·d):&lt;/span&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextRemoteImageRule:111:&amp;lt;img src=&amp;quot;http://i.imgur.com/tNg7z1P.png&amp;quot; alt=&amp;quot;&amp;quot; title=&amp;quot;&amp;quot; /&amp;gt; --&gt;&lt;img src="http://i.imgur.com/tNg7z1P.png" alt="external image tNg7z1P.png" title="external image tNg7z1P.png" /&gt;&lt;!-- ws:end:WikiTextRemoteImageRule:111 --&gt;&lt;br /&gt;
&lt;span style="background-color: #ffffff;"&gt;This example uses the same spreading function and standard deviation, but this time the basis set is all rationals of Weil height less than 100. The complexity function here is max(n,d):&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextRemoteImageRule:112:&amp;lt;img src=&amp;quot;http://i.imgur.com/TZdU6eD.png&amp;quot; alt=&amp;quot;&amp;quot; title=&amp;quot;&amp;quot; /&amp;gt; --&gt;&lt;img src="http://i.imgur.com/TZdU6eD.png" alt="external image TZdU6eD.png" title="external image TZdU6eD.png" /&gt;&lt;!-- ws:end:WikiTextRemoteImageRule:112 --&gt;&lt;br /&gt;
The following image compares the domain-integral and complexity-normalization approaches by overlaying the two curves on top of each other. In both cases, the spreading function is again a Gaussian with s=~17 cents, and the basis set is all those rationals with Tenney height ≤ 10000. It can be seen that the curves are extremely similar, and that the locations of the minima and maxima are largely preserved:&lt;br /&gt;
&lt;!-- ws:start:WikiTextRemoteImageRule:113:&amp;lt;img src=&amp;quot;http://i.imgur.com/5QPTsEP.png&amp;quot; alt=&amp;quot;&amp;quot; title=&amp;quot;&amp;quot; style=&amp;quot;height: 600px; width: 800px;&amp;quot; /&amp;gt; --&gt;&lt;img src="http://i.imgur.com/5QPTsEP.png" alt="external image 5QPTsEP.png" title="external image 5QPTsEP.png" style="height: 600px; width: 800px;" /&gt;&lt;!-- ws:end:WikiTextRemoteImageRule:113 --&gt;&lt;br /&gt;
&lt;span style="font-size: 1.4em; line-height: 1.5;"&gt;&lt;strong&gt;Harmonic Rényi Entropy&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
An extension to the base Harmonic Entropy model, proposed by Mike Battaglia, is to generalize the use of &lt;a class="wiki_link_ext" href="http://en.wikipedia.org/wiki/Entropy_(information_theory)" rel="nofollow" target="_blank"&gt;Shannon entropy&lt;/a&gt; by replacing it instead with &lt;a class="wiki_link_ext" href="http://en.wikipedia.org/wiki/R%C3%A9nyi_entropy" rel="nofollow" target="_blank"&gt;Rényi entropy&lt;/a&gt;, a &lt;a class="wiki_link_ext" href="http://en.wikipedia.org/wiki/Q-analog" rel="nofollow" target="_blank"&gt;q-analog&lt;/a&gt; of Shannon's original entropy. The &lt;strong&gt;Harmonic Rényi Entropy of order a&lt;/strong&gt; of an incoming dyad can be defined as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can clean up this notation by defining the auxiliary distribution K:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextMathRule:8:
[[math]]&amp;lt;br/&amp;gt;
H_a(d) = \frac{1}{1-a} \log_β \sum_b p_d(b)^a&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;H_a(d) = \frac{1}{1-a} \log_β \sum_b p_d(b)^a&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:8 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;K(d) = \left(\sum_b \frac{\delta_{-\cent(b)}}{\|b\|}\right)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
where the p_d(b) are the probabilities assigned by dyad d to each basis rational b. Being a q-analog, it is noteworthy that Rényi entropy converges to Shannon entropy in the limit as a→1, a fact which can be verified using L'Hôpital's rule as found &lt;a class="wiki_link_ext" href="http://www.sonycsl.co.jp/person/nielsen/Note-HopitalRuleShannonRenyiTsallis.pdf" rel="nofollow" target="_blank"&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The Rényi entropy has found use in cryptography as a measure of the strength of a cryptographic code in the face of an intelligent attacker, an application for which Shannon entropy has long been known to be insufficient as described in &lt;a class="wiki_link_ext" href="http://users.cis.fiu.edu/~smithg/papers/qest11.pdf" rel="nofollow" target="_blank"&gt;this paper&lt;/a&gt; and &lt;a class="wiki_link_ext" href="http://www.ietf.org/rfc/rfc4086.txt" rel="nofollow" target="_blank"&gt;this RFC&lt;/a&gt;. More precisely, the Rényi entropy of order ∞, also called the &lt;strong&gt;min-entropy&lt;/strong&gt;, is used to measure the strength of the randomness used to define a cryptographic secret against a &amp;quot;worst-case&amp;quot; attacker who has complete knowledge of the probability distribution from which cryptographic secrets are drawn. In a musical context, by considering the incoming dyad as analogous to a cryptographic code which is attempting to be &amp;quot;cracked&amp;quot; by an intelligent auditory system, we can consider that the analogous &amp;quot;worst-case attacker&amp;quot; would be a &amp;quot;best-case auditory system&amp;quot; which has complete awareness of the probability distribution for any incoming dyad. This analogy would view such an auditory system as actively attempting to choose the most probable rational, rather than drawing a rational at random weighted by the distribution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Which leaves us with the final expression:&amp;lt;br&amp;gt;&lt;br /&gt;
The use of a=∞ min-entropy would reflect this view. In contrast, the use of a=1 Shannon entropy reflects a much &amp;quot;dumber&amp;quot; process which performs no such analysis and perhaps doesn't even seek to &amp;quot;choose&amp;quot; any sort of &amp;quot;victor&amp;quot; rational at all. As the parameter a interpolates between these two options, it &lt;span style="line-height: 1.5;"&gt;can be interpreted as the extent to which the rational-matching process for incoming dyads is considered to be &amp;quot;intelligent&amp;quot; and &amp;quot;active&amp;quot; in this way.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\psi(d) = \left[S \ast K\right](-d)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Some psychoacoustic effects naturally fit into this paradigm, such as the virtual pitch integration process, which actually does attempt to find a single victor when matching incoming chords with chunks of the harmonic series. Other psychoacoustic effects, such as that of beatlessness, may instead be better viewed as &amp;quot;dumb&amp;quot; processes whereby nothing in particular is being &amp;quot;chosen,&amp;quot; but where a more uniform distribution of matching rational numbers for a dyad simply generates a more discordant sonic effect. Different values of a can differentiate between the predominance given to these two types of effect in the overall construct of psychoacoustic concordance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Certain values of &lt;em&gt;a&lt;/em&gt; reduce to simpler expressions and have special names.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:28:&amp;lt;h3&amp;gt; --&gt;&lt;h3 id="toc14"&gt;&lt;a name="Convolution-Based Expression For Quickly Computing Renyi Entropy--Convolution product for ρa(d)"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:28 --&gt;Convolution product for ρ&lt;span style="vertical-align: sub;"&gt;a&lt;/span&gt;(d)&lt;/h3&gt;
&lt;!-- ws:start:WikiTextHeadingRule:47:&amp;lt;h3&amp;gt; --&gt;&lt;h3 id="toc6"&gt;&lt;a name="Examples--a=0: Harmonic Hartley Entropy"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:47 --&gt;a=0: Harmonic Hartley Entropy&lt;/h3&gt;
&lt;!-- ws:start:WikiTextMathRule:9:
[[math]]&amp;lt;br/&amp;gt;
H(d) = \log |R|&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;H(d) = \log |R|&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:9 --&gt;&lt;br /&gt;
where |R| is the cardinality of the set of basis rationals. This assumes, in essence, an &amp;quot;infinitely dumb&amp;quot; auditory system which can do no better than picking a rational number from a uniform distribution completely at random. All dyads have the same Harmonic Hartley Entropy. The Hartley Entropy is sometimes called the &amp;quot;max-entropy,&amp;quot; and is useful mainly as an upper bound on the other forms of entropy: all Rényi Entropies are always guaranteed to be less than the Hartley Entropy.&lt;br /&gt;
&lt;!-- ws:start:WikiTextRemoteImageRule:114:&amp;lt;img src=&amp;quot;http://i.imgur.com/iVFpChm.png&amp;quot; alt=&amp;quot;&amp;quot; title=&amp;quot;&amp;quot; style=&amp;quot;height: 281px; width: 560px;&amp;quot; /&amp;gt; --&gt;&lt;img src="http://i.imgur.com/iVFpChm.png" alt="external image iVFpChm.png" title="external image iVFpChm.png" style="height: 281px; width: 560px;" /&gt;&lt;!-- ws:end:WikiTextRemoteImageRule:114 --&gt;&lt;br /&gt;
&lt;em&gt;Harmonic Hartley Entropy (a=0) with the basis set all rationals with Tenney height ≤ 10000. Note that the choice of spreading function makes no difference in the end result at all.&lt;/em&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The derivation for ρ&lt;span style="vertical-align: sub;"&gt;a&lt;/span&gt;(d) proceeds similarly. Recall the function is written as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:49:&amp;lt;h3&amp;gt; --&gt;&lt;h3 id="toc7"&gt;&lt;a name="Examples--a=1: Harmonic Shannon Entropy (Harmonic Entropy)"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:49 --&gt;a=1: Harmonic Shannon Entropy (Harmonic Entropy)&lt;/h3&gt;
&lt;!-- ws:start:WikiTextMathRule:10:
[[math]]&amp;lt;br/&amp;gt;
H(d) = -\sum_{b} p_d(b) \log p_d(b)&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;H(d) = -\sum_{b} p_d(b) \log p_d(b)&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:10 --&gt;&lt;br /&gt;
This is Paul's original Harmonic Entropy. Within the cryptographic analogy, this can be thought of as an auditory system which simply selects a rational at random from the incoming distribution, weighted via the distribution itself.&lt;br /&gt;
&lt;!-- ws:start:WikiTextRemoteImageRule:115:&amp;lt;img src=&amp;quot;http://i.imgur.com/bghmli1.png&amp;quot; alt=&amp;quot;&amp;quot; title=&amp;quot;&amp;quot; style=&amp;quot;height: 278px; width: 560px;&amp;quot; /&amp;gt; --&gt;&lt;img src="http://i.imgur.com/bghmli1.png" alt="external image bghmli1.png" title="external image bghmli1.png" style="height: 278px; width: 560px;" /&gt;&lt;!-- ws:end:WikiTextRemoteImageRule:115 --&gt;&lt;br /&gt;
&lt;em&gt;Harmonic Shannon Entropy (a=1) with the basis set all rationals with Tenney height ≤ 10000, spreading function a Gaussian distribution with s=1% (~17 cents), and sqrt(n·d) complexity.&lt;/em&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\rho_a(d) = \sum_b q_d(b)^a&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:51:&amp;lt;h3&amp;gt; --&gt;&lt;h3 id="toc8"&gt;&lt;a name="Examples--a=2: Harmonic Collision Entropy"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:51 --&gt;a=2: Harmonic Collision Entropy&lt;/h3&gt;
&lt;!-- ws:start:WikiTextMathRule:11:
[[math]]&amp;lt;br/&amp;gt;
H(d) = -\log \sum_b p_d(b)^2 = -log (P_d = Q_d)&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;H(d) = -\log \sum_b p_d(b)^2 = -log (P_d = Q_d)&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:11 --&gt;&lt;br /&gt;
where P&lt;span style="font-size: 90%; vertical-align: sub;"&gt;d&lt;/span&gt; and Q&lt;span style="font-size: 90%; vertical-align: sub;"&gt;d&lt;/span&gt; are independent and identically distributed random variables corresponding to the same dyad, and the collision entropy is the same as the negative log of the probability that the two variables produce the same outcome.&lt;br /&gt;
&lt;!-- ws:start:WikiTextRemoteImageRule:116:&amp;lt;img src=&amp;quot;http://i.imgur.com/LBzWxgY.png&amp;quot; alt=&amp;quot;&amp;quot; title=&amp;quot;&amp;quot; style=&amp;quot;height: 278px; width: 560px;&amp;quot; /&amp;gt; --&gt;&lt;img src="http://i.imgur.com/LBzWxgY.png" alt="external image LBzWxgY.png" title="external image LBzWxgY.png" style="height: 278px; width: 560px;" /&gt;&lt;!-- ws:end:WikiTextRemoteImageRule:116 --&gt;&lt;br /&gt;
&lt;em&gt;Harmonic Collision Entropy (a=2) with the basis set all rationals with Tenney height ≤ 10000, spreading function a Gaussian distribution with s=1% (~17 cents), and sqrt(n·d) complexity.&lt;/em&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:53:&amp;lt;h3&amp;gt; --&gt;&lt;h3 id="toc9"&gt;&lt;a name="Examples--a=∞: Harmonic Min-Entropy"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:53 --&gt;a=∞: Harmonic Min-Entropy&lt;/h3&gt;
&lt;!-- ws:start:WikiTextMathRule:12:
[[math]]&amp;lt;br/&amp;gt;
-\log \max_b p_d(b)&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;-\log \max_b p_d(b)&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:12 --&gt;&lt;br /&gt;
This is the min-entropy, which simply takes the negative log of the largest probability in the distribution. This can be thought of as representing the &amp;quot;strength&amp;quot; of the incoming dyad from being &amp;quot;deciphered&amp;quot; by a &amp;quot;best-case&amp;quot; auditory system. The name &amp;quot;min-entropy&amp;quot; reflects that the a=∞ case is guaranteed to be a lower bound among all Rényi entropies.&lt;br /&gt;
&lt;!-- ws:start:WikiTextRemoteImageRule:117:&amp;lt;img src=&amp;quot;http://i.imgur.com/u91Xkww.png&amp;quot; alt=&amp;quot;&amp;quot; title=&amp;quot;&amp;quot; style=&amp;quot;height: 281px; width: 560px;&amp;quot; /&amp;gt; --&gt;&lt;img src="http://i.imgur.com/u91Xkww.png" alt="external image u91Xkww.png" title="external image u91Xkww.png" style="height: 281px; width: 560px;" /&gt;&lt;!-- ws:end:WikiTextRemoteImageRule:117 --&gt;&lt;br /&gt;
&lt;em&gt;Harmonic Rényi Entropy with a=7, with the high value of a being chosen to approximate min-entropy (a=&lt;/em&gt;∞&lt;em&gt;). The basis set is still all rationals with Tenney height ≤ 10000, the spreading function a Gaussian distribution with s=1% (~17 cents), and the complexity function sqrt(n·d).&lt;/em&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:55:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id="toc10"&gt;&lt;!-- ws:end:WikiTextHeadingRule:55 --&gt; &lt;/h1&gt;
&lt;!-- ws:start:WikiTextHeadingRule:57:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id="toc11"&gt;&lt;a name="Convolution-Based Expression For Quickly Computing Renyi Entropy"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:57 --&gt;Convolution-Based Expression For Quickly Computing Renyi Entropy&lt;/h1&gt;
Below is given an derivation that expresses Harmonic Renyi Entropy in terms of two simpler functions, each of which is a convolution product and hence can be computed quickly using the Fast Fourier Transform. The below derivation depends on the use of complexity-normalization probabilities, although it may be possible to extend to domain-integral probabilities instead.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The expression for each q&lt;span style="vertical-align: sub;"&gt;d&lt;/span&gt;(b)&lt;span style="vertical-align: super;"&gt;a&lt;/span&gt; is:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:59:&amp;lt;h3&amp;gt; --&gt;&lt;h3 id="toc12"&gt;&lt;a name="Convolution-Based Expression For Quickly Computing Renyi Entropy--Preliminaries"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:59 --&gt;Preliminaries&lt;/h3&gt;
The Harmonic Renyi Entropy is defined as&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;q_d(b)^a = \frac{S(\cent(b)-d)^a}{\|b\|^a}&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextMathRule:13:
[[math]]&amp;lt;br/&amp;gt;
H_a(d) = \frac{1}{1-a} \log_β \sum_b p_d(b)^a&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;H_a(d) = \frac{1}{1-a} \log_β \sum_b p_d(b)^a&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:13 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
As before, we can write the p&lt;span style="vertical-align: sub;"&gt;d&lt;/span&gt; as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can again express this as a convolution of the function S&lt;span style="vertical-align: super;"&gt;a&lt;/span&gt;, meaning the spreading function S taken to the a'th power, and a delta distribution:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextMathRule:14:
[[math]]&amp;lt;br/&amp;gt;
p_d(b) = \frac{q_d(b)}{\sum_b q_d(b)}&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;p_d(b) = \frac{q_d(b)}{\sum_b q_d(b)}&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:14 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;q_d(b)^a = \left(S^a \ast \frac{\delta_{-\cent(b)}}{\|b\|^a}\right)(-d)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
where the q&lt;span style="vertical-align: sub;"&gt;d&lt;/span&gt; are &amp;quot;unnormalized&amp;quot; probabilities, and the denominator above is the sum of these unnormalized probabilities, so that all of the p&lt;span style="vertical-align: sub;"&gt;d&lt;/span&gt; sum to 1.&lt;br /&gt;
To simplify notation, we first rewrite the denominator as a &amp;quot;normalization&amp;quot; function:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextMathRule:15:
[[math]]&amp;lt;br/&amp;gt;
\psi(d) = \sum_b q_d(b)&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;\psi(d) = \sum_b q_d(b)&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:15 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Putting this back into the original summation and factoring as before, we obtain&amp;lt;br&amp;gt;&lt;br /&gt;
and putting back into the original equation, we get&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\rho_a(d) = \left[S^a \ast \left(\sum_b \frac{\delta_{-\cent(b)}}{\|b\|^a}\right)\right](-d)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextMathRule:16:
[[math]]&amp;lt;br/&amp;gt;
H_a(d) = \frac{1}{1-a} \log_β \left( \sum_b \left( \frac{q_d(b)}{\psi(d)} \right)^a \right)&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;H_a(d) = \frac{1}{1-a} \log_β \left( \sum_b \left( \frac{q_d(b)}{\psi(d)} \right)^a \right)&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:16 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since ψ(d) is the same for each basis interval b, we can pull it out of the summation to obtain:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And again we clean up notation by defining the auxiliary distribution&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextMathRule:17:
[[math]]&amp;lt;br/&amp;gt;
H_a(d) = \frac{1}{1-a} \log_β \left( \frac{\sum_b q_d(b)^a}{\psi(d)^a} \right)&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;H_a(d) = \frac{1}{1-a} \log_β \left( \frac{\sum_b q_d(b)^a}{\psi(d)^a} \right)&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:17 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;K^a(d) = \left(\sum_b \frac{\delta_{-\cent(b)}}{\|b\|^a}\right)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
To simplify, we can also rewrite the numerator, the sum of &amp;quot;raw&amp;quot; (unnormalized) pseudo-probabilities, as a function:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextMathRule:18:
[[math]]&amp;lt;br/&amp;gt;
\rho_a(d) = \sum_b q_d(b)^a&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;\rho_a(d) = \sum_b q_d(b)^a&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:18 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
so that&amp;lt;br&amp;gt;&lt;br /&gt;
Finally, we put this all together to obtain a simplified version of the Harmonic Renyi Entropy equation:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\rho_a(d) = \left[S^a \ast K^a\right](-d)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextMathRule:19:
[[math]]&amp;lt;br/&amp;gt;
H_a(d) = \frac{1}{1-a} \log_β \left( \frac{\rho_a(d)}{\psi(d)^a} \right)&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;H_a(d) = \frac{1}{1-a} \log_β \left( \frac{\rho_a(d)}{\psi(d)^a} \right)&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:19 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
We thus reduce the term inside the logarithm to the quotient of the functions ρ&lt;span style="vertical-align: sub;"&gt;a&lt;/span&gt;(d) and ψ(d)&lt;span style="vertical-align: super;"&gt;a&lt;/span&gt;. Our aim is now to express each of these two functions in terms of a convolution product.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have now succeeded in representing ρ&lt;span style="vertical-align: sub;"&gt;a&lt;/span&gt;(d) as a convolution.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:61:&amp;lt;h3&amp;gt; --&gt;&lt;h3 id="toc13"&gt;&lt;a name="Convolution-Based Expression For Quickly Computing Renyi Entropy--Convolution product for ψ(d)"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:61 --&gt;Convolution product for ψ(d)&lt;/h3&gt;
ψ(d), the normalization function, is written as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that the function K&lt;span style="vertical-align: super;"&gt;a&lt;/span&gt;(d) involves a slight abuse of notation, as it is not literally K(d) taken to the a'th power (as the square of the delta distribution is undefined). Rather, we are simply taking the weights of each delta distribution in the summation to the a'th power.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextMathRule:20:
[[math]]&amp;lt;br/&amp;gt;
\psi(d) = \sum_b q_d(b)&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;\psi(d) = \sum_b q_d(b)&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:20 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Again, each q&lt;span style="vertical-align: sub;"&gt;d&lt;/span&gt;(b) is defined as follows:&lt;br /&gt;
&lt;!-- ws:start:WikiTextMathRule:21:
[[math]]&amp;lt;br/&amp;gt;
q_d(b) = \frac{S(\cent(b)-d)}{\|b\|}&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;q_d(b) = \frac{S(\cent(b)-d)}{\|b\|}&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:21 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:30:&amp;lt;h3&amp;gt; --&gt;&lt;h3 id="toc15"&gt;&lt;a name="Convolution-Based Expression For Quickly Computing Renyi Entropy--Round-up"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:30 --&gt;Round-up&lt;/h3&gt;
Assuming we are treating the d as constant, it is clear that the q&lt;span style="vertical-align: sub;"&gt;d&lt;/span&gt;(b) are all scaled, translated, flipped versions of the spreading function S. We can use this property to rewrite each one as a convolution with a delta distribution:&lt;br /&gt;
&lt;!-- ws:start:WikiTextMathRule:22:
[[math]]&amp;lt;br/&amp;gt;
q_d(b) = \left(S \ast \frac{\delta_{-\cent(b)}}{\|b\|}\right)(-d)&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;q_d(b) = \left(S \ast \frac{\delta_{-\cent(b)}}{\|b\|}\right)(-d)&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:22 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Taking all of this, we can rewrite the original expression for Harmonic Renyi Entropy as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
Putting this back into the original summation, we obtain&lt;br /&gt;
&lt;!-- ws:start:WikiTextMathRule:23:
[[math]]&amp;lt;br/&amp;gt;
\psi(d) = \sum_b \left(S \ast \frac{\delta_{-\cent(b)}}{\|b\|}\right)(-d)&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;\psi(d) = \sum_b \left(S \ast \frac{\delta_{-\cent(b)}}{\|b\|}\right)(-d)&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:23 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H_a(d) = \frac{1}{1-a} \log_β \left( \frac{\left[S^a \ast K^a\right](-d)}{\left[S \ast K\right]^a(-d)} \right)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We note that the left factor in the convolution product is always S, and is not dependent on b in any way. Since convolution distributes over multiplication, we can factor the S out of the summation to obtain&lt;br /&gt;
&lt;!-- ws:start:WikiTextMathRule:24:
[[math]]&amp;lt;br/&amp;gt;
\psi(d) = \left[S \ast \left(\sum_b \frac{\delta_{-\cent(b)}}{\|b\|}\right)\right](-d)&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;\psi(d) = \left[S \ast \left(\sum_b \frac{\delta_{-\cent(b)}}{\|b\|}\right)\right](-d)&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:24 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
We can clean up this notation by defining the auxiliary distribution K:&lt;br /&gt;
&lt;!-- ws:start:WikiTextMathRule:25:
[[math]]&amp;lt;br/&amp;gt;
K(d) = \left(\sum_b \frac{\delta_{-\cent(b)}}{\|b\|}\right)&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;K(d) = \left(\sum_b \frac{\delta_{-\cent(b)}}{\|b\|}\right)&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:25 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where the expression&amp;lt;br&amp;gt;&lt;br /&gt;
Which leaves us with the final expression:&lt;br /&gt;
&lt;!-- ws:start:WikiTextMathRule:26:
[[math]]&amp;lt;br/&amp;gt;
\psi(d) = \left[S \ast K\right](-d)&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;\psi(d) = \left[S \ast K\right](-d)&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:26 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:63:&amp;lt;h3&amp;gt; --&gt;&lt;h3 id="toc14"&gt;&lt;a name="Convolution-Based Expression For Quickly Computing Renyi Entropy--Convolution product for ρa(d)"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:63 --&gt;Convolution product for ρ&lt;span style="vertical-align: sub;"&gt;a&lt;/span&gt;(d)&lt;/h3&gt;
The derivation for ρ&lt;span style="vertical-align: sub;"&gt;a&lt;/span&gt;(d) proceeds similarly. Recall the function is written as follows:&lt;br /&gt;
&lt;!-- ws:start:WikiTextMathRule:27:
[[math]]&amp;lt;br/&amp;gt;
\rho_a(d) = \sum_b q_d(b)^a&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;\rho_a(d) = \sum_b q_d(b)^a&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:27 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\left[S \ast K\right]^a(-d)&amp;lt;/math&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The expression for each q&lt;span style="vertical-align: sub;"&gt;d&lt;/span&gt;(b)&lt;span style="vertical-align: super;"&gt;a&lt;/span&gt; is:&lt;br /&gt;
&lt;!-- ws:start:WikiTextMathRule:28:
[[math]]&amp;lt;br/&amp;gt;
q_d(b)^a = \frac{S(\cent(b)-d)^a}{\|b\|^a}&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;q_d(b)^a = \frac{S(\cent(b)-d)^a}{\|b\|^a}&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:28 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
We can again express this as a convolution of the function S&lt;span style="vertical-align: super;"&gt;a&lt;/span&gt;, meaning the spreading function S taken to the a'th power, and a delta distribution:&lt;br /&gt;
&lt;!-- ws:start:WikiTextMathRule:29:
[[math]]&amp;lt;br/&amp;gt;
q_d(b)^a = \left(S^a \ast \frac{\delta_{-\cent(b)}}{\|b\|^a}\right)(-d)&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;q_d(b)^a = \left(S^a \ast \frac{\delta_{-\cent(b)}}{\|b\|^a}\right)(-d)&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:29 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
represents the convolution of S and K, taken to the a'th power.&amp;lt;br&amp;gt;&lt;br /&gt;
Putting this back into the original summation and factoring as before, we obtain&lt;br /&gt;
&lt;!-- ws:start:WikiTextMathRule:30:
[[math]]&amp;lt;br/&amp;gt;
\rho_a(d) = \left[S^a \ast \left(\sum_b \frac{\delta_{-\cent(b)}}{\|b\|^a}\right)\right](-d)&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;\rho_a(d) = \left[S^a \ast \left(\sum_b \frac{\delta_{-\cent(b)}}{\|b\|^a}\right)\right](-d)&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:30 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
And again we clean up notation by defining the auxiliary distribution&lt;br /&gt;
&lt;!-- ws:start:WikiTextMathRule:31:
[[math]]&amp;lt;br/&amp;gt;
K^a(d) = \left(\sum_b \frac{\delta_{-\cent(b)}}{\|b\|^a}\right)&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;K^a(d) = \left(\sum_b \frac{\delta_{-\cent(b)}}{\|b\|^a}\right)&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:31 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have succeeded in representing Harmonic Renyi Entropy in simple terms of two convolution products, each of which can be computed in O(N log N) time.&amp;lt;br&amp;gt;&lt;br /&gt;
so that&lt;br /&gt;
&lt;!-- ws:start:WikiTextMathRule:32:
[[math]]&amp;lt;br/&amp;gt;
\rho_a(d) = \left[S^a \ast K^a\right](-d)&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;\rho_a(d) = \left[S^a \ast K^a\right](-d)&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:32 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
We have now succeeded in representing ρ&lt;span style="vertical-align: sub;"&gt;a&lt;/span&gt;(d) as a convolution.&lt;br /&gt;
Note that the function K&lt;span style="vertical-align: super;"&gt;a&lt;/span&gt;(d) involves a slight abuse of notation, as it is not literally K(d) taken to the a'th power (as the square of the delta distribution is undefined). Rather, we are simply taking the weights of each delta distribution in the summation to the a'th power.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:32:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id="toc16"&gt;&lt;a name="References"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:32 --&gt;References&lt;/h1&gt;
&lt;!-- ws:start:WikiTextHeadingRule:65:&amp;lt;h3&amp;gt; --&gt;&lt;h3 id="toc15"&gt;&lt;a name="Convolution-Based Expression For Quickly Computing Renyi Entropy--Round-up"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:65 --&gt;Round-up&lt;/h3&gt;
Taking all of this, we can rewrite the original expression for Harmonic Renyi Entropy as follows:&lt;br /&gt;
&lt;!-- ws:start:WikiTextMathRule:33:
[[math]]&amp;lt;br/&amp;gt;
H_a(d) = \frac{1}{1-a} \log_β \left( \frac{\left[S^a \ast K^a\right](-d)}{\left[S \ast K\right]^a(-d)} \right)&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;H_a(d) = \frac{1}{1-a} \log_β \left( \frac{\left[S^a \ast K^a\right](-d)}{\left[S \ast K\right]^a(-d)} \right)&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:33 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[&lt;!-- ws:start:WikiTextUrlRule:639:http://www.webcitation.org/60qOlJVFS --&gt;&lt;a class="wiki_link_ext" href="http://www.webcitation.org/60qOlJVFS" rel="nofollow"&gt;http://www.webcitation.org/60qOlJVFS&lt;/a&gt;&lt;!-- ws:end:WikiTextUrlRule:639 --&gt; Paul Erlich article]]&amp;lt;br&amp;gt;&lt;br /&gt;
where the expression&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[&lt;!-- ws:start:WikiTextUrlRule:640:http://sethares.engr.wisc.edu/paperspdf/HarmonicEntropy.pdf --&gt;&lt;a class="wiki_link_ext" href="http://sethares.engr.wisc.edu/paperspdf/HarmonicEntropy.pdf" rel="nofollow"&gt;http://sethares.engr.wisc.edu/paperspdf/HarmonicEntropy.pdf&lt;/a&gt;&lt;!-- ws:end:WikiTextUrlRule:640 --&gt; William Sethares article]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextMathRule:34:
[[math]]&amp;lt;br/&amp;gt;
\left[S \ast K\right]^a(-d)&amp;lt;br/&amp;gt;[[math]]
--&gt;&lt;script type="math/tex"&gt;\left[S \ast K\right]^a(-d)&lt;/script&gt;&lt;!-- ws:end:WikiTextMathRule:34 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[&lt;!-- ws:start:WikiTextUrlRule:641:http://www.tonalsoft.com/enc/h/harmonic-entropy.aspx --&gt;&lt;a class="wiki_link_ext" href="http://www.tonalsoft.com/enc/h/harmonic-entropy.aspx" rel="nofollow"&gt;http://www.tonalsoft.com/enc/h/harmonic-entropy.aspx&lt;/a&gt;&lt;!-- ws:end:WikiTextUrlRule:641 --&gt; Harmonic entropy (TonalSoft encyclopedia)]]&amp;lt;br&amp;gt;&lt;br /&gt;
represents the convolution of S and K, taken to the a'th power.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[&lt;!-- ws:start:WikiTextUrlRule:642:http://launch.groups.yahoo.com/group/harmonic_entropy/ --&gt;&lt;a class="wiki_link_ext" href="http://launch.groups.yahoo.com/group/harmonic_entropy/" rel="nofollow"&gt;http://launch.groups.yahoo.com/group/harmonic_entropy/&lt;/a&gt;&lt;!-- ws:end:WikiTextUrlRule:642 --&gt; Harmonic entropy group on Yahoo]]&amp;lt;br&amp;gt;&lt;br /&gt;
We have succeeded in representing Harmonic Renyi Entropy in simple terms of two convolution products, each of which can be computed in O(N log N) time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[&lt;!-- ws:start:WikiTextUrlRule:643:http://www.mikebattagliamusic.com/HE-JS/HE.html --&gt;&lt;a class="wiki_link_ext" href="http://www.mikebattagliamusic.com/HE-JS/HE.html" rel="nofollow"&gt;http://www.mikebattagliamusic.com/HE-JS/HE.html&lt;/a&gt;&lt;!-- ws:end:WikiTextUrlRule:643 --&gt; Harmonic entropy graph calculator (JavaScript)]]&lt;/body&gt;&lt;/html&gt;</pre></div>
&lt;!-- ws:start:WikiTextHeadingRule:67:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id="toc16"&gt;&lt;a name="References"&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:67 --&gt;References&lt;/h1&gt;
&lt;a class="wiki_link_ext" href="http://www.webcitation.org/60qOlJVFS" rel="nofollow"&gt;Paul Erlich article&lt;/a&gt;&lt;br /&gt;
&lt;a class="wiki_link_ext" href="http://sethares.engr.wisc.edu/paperspdf/HarmonicEntropy.pdf" rel="nofollow"&gt;William Sethares article&lt;/a&gt;&lt;br /&gt;
&lt;a class="wiki_link_ext" href="http://www.tonalsoft.com/enc/h/harmonic-entropy.aspx" rel="nofollow"&gt;Harmonic entropy (TonalSoft encyclopedia)&lt;/a&gt;&lt;br /&gt;
&lt;a class="wiki_link_ext" href="http://launch.groups.yahoo.com/group/harmonic_entropy/" rel="nofollow"&gt;Harmonic entropy group on Yahoo&lt;/a&gt;&lt;br /&gt;
&lt;a class="wiki_link_ext" href="http://www.mikebattagliamusic.com/HE-JS/HE.html" rel="nofollow" target="_blank"&gt;Harmonic entropy graph calculator (JavaScript)&lt;/a&gt;&lt;/body&gt;&lt;/html&gt;</pre></div>