back to list

Re: [tuning-math] Re: Approximate GCD's. Are these almost periodic functions?

🔗Carl Lumma <carl@lumma.org>

4/29/2010 1:06:31 AM

Hi Mike,

I assume you've run this by Paul? What does he think? -Carl

At 12:26 AM 4/29/2010, you wrote:
>Rick is on a crusade to get the word "virtual pitch" changed because
>it's a actually a "real" pitch because pseudoperiodicities are real. I
>think the overall goal now is to find a precise mathematical way to
>get from a complex interval like 501/400 to 5/4, or even from 81/64 to
>5/4.
>
>Here's a possible solution: convolve the waveform with a sawtooth
>wave, or some form of impulse train with a rolloff. Make it be
>exponentially damped. We'll call this filtering function c(wt)
>(pretend the w is an authoritative-sounding greek omega sign). Its
>frequency spectrum should look like a feedback comb filter with some
>kind of rolloff, and of a Q that you will basically be picking with
>however much damping you choose.
>
>Convolve the waveform with all of these for all w, and then get the
>total energy for each resulting waveform, and then plot the resulting
>energy(w). If you pick your rolloff and damping properly, you'll note
>that this will basically give you what you're looking for: 81/64 will
>generate a huge spike two octaves below the 64 as if it were really
>5/4. You will also see some other huge spikes, and this resulting
>curve basically shows you all of the "possible fundamentals" that the
>brain could pick for any given chord, as well as the probability that
>it will pick each one. (Normalize it so that the sum is 1 and you have
>a brand new type of harmonic entropy to work with, and for chords to
>boot. Voila!)
>
>The damping refers to the tendency of the periodicity mechanism to
>stop tracking the same frequency forever and instead resonate at close
>pseudo-periodicities (which you are noticing yourself visually), and
>the rolloff refers to the fact that higher harmonics generate much
>weaker fundamentals than lower ones.
>
>In complete layman's terms: come up with a filterbank of low-passed
>comb filters (an infinitely dense one, in fact), set the incoming
>waveform into all of them and see what sticks. I think this is an
>excellent model for how the brain does what it does, although I'm
>unsure as to the exact coefficients for the rolloff and the damping.
>I'm pretty sure the damping changes with the situation, analogous to
>how the free "s" parameter can change in Paul's HE model.
>
>I call it "Harmonic Profiling," and I'll have some MATLAB code for you
>all to play around with as soon as I stop going through this
>post-college-graduate financial crisis that I'm going through.
>
>-Mike

🔗Mike Battaglia <battaglia01@gmail.com>

4/29/2010 1:34:52 AM

On Thu, Apr 29, 2010 at 4:06 AM, Carl Lumma <carl@lumma.org> wrote:
> Hi Mike,
>
> I assume you've run this by Paul? What does he think? -Carl

I haven't run it by him yet. The last time I spoke with Paul about
crazy mathematical stuff was when I was trying to come up with a quick
approximation for the classic HE curve so that we could finally see
how triads and tetrads would turn up. After we spoke about it at
length I started to get on this wavelength instead and abandoned the
process. I didn't want to bother him with my unfinished train of
thought until I had worked all of the math out, since I know he's busy
these days.

I'm still sorting some of the details out though, namely how best to
interpret the resulting curve; whether it represents all of the
possible fundamentals produced, or the full set of all of the
simultaneous fundamentals produced. It could be either in different
cases and I haven't figured out a clear algorithm to differentiate
between the two yet, save just using my ears. I was planning on
sending it Paul's way once that was figured out.

-Mike

🔗Mike Battaglia <battaglia01@gmail.com>

4/29/2010 2:26:10 AM

Also, this approach is different when compared to HE in a few
respects. HE is an overall measure of how consonant a chord is. This
is more of a measure of what is "happening" in a chord
psychoacoustically and what it's made of. It's also an extension of my
more recent thinking that there really is no singular dimension of
"consonance" but rather different "flavors" of it, especially when
chords are involved. However, if you do want to come up with a single
measure of "consonance" for a chord, you could do it just by using the
resulting profile as the basis for a sort of "continuous entropy"
calculation.

How will it compare to classic HE if you do that? For dyads, I think
it'll probably work out to be about the same as dyadic HE. For triads
I think it will be somewhat similar to calculating the triadic HE, and
then the dyadic HE of each of the sub-dyads, somehow weighting them
and then coming up with an overall entropy measure based on that
information. For tetrads you first get the tetradic HE, then the HE of
each of the sub-triads, then the HE of each of the sub-dyads, and so
on.

-Mike

🔗Mike Battaglia <battaglia01@gmail.com>

4/29/2010 2:26:30 AM

Ideologically there's one more difference that I also think is
important: HE comes from a psychoacoustics and information theory
paradigm. It involves coming up with a set of possible "matches" for
an interval (via the Farey series calculation), giving each interval a
"domain" (from the mediant with the next lowest interval to the
mediant with the next highest interval), assigning the incoming dyad a
gaussian curve representing the probability that it will be perceived
as any interval along the spectrum, and then coming up with an entropy
curve based on that.

This model instead comes from a psychoacoustics and signal processing
paradigm. Instead of a Farey series of intervals, it comes up with a
continuous set of harmonic series that any incoming tones could fit
into. Instead of mediant-based weighting, the weighting is done by the
rolloff of the filter - higher harmonics are weighted as contributing
less to the strength of the fundamental than do lower ones. The
assignment of the logarithmically-skewed Gaussian "range" to the
incoming dyad is replaced by the interaction between each harmonic's
own linear Gaussian "range" and the linear "ranges" of nearby
competing harmonics from different fundamentals. Emerging from this
property of the model is that that higher harmonics have less of a
"tolerance" for mistuning than lower harmonics, and that this
tolerance is also limited by the "span" a harmonic has to other
nearby, stronger harmonics.

By far the weakest part of this model has been finding a good rolloff.
I think a 1/N^x weighting isn't going to be the best way to go. I
believe a value of x as 1.5 worked the best, but still not good
enough. I have a hunch, though, that whenever I do figure it out, that
the end result will be very close to the Farey Series +
mediant-weighting + Gaussian probability curve approach. Which might
then possibly illuminate how those things might emerge from more
fundamental tenets of signal processing.

-Mike