Draft:Beat (acoustics)/WJS withdrawn

Laplace_Transform

I had to completely rewrite the abstract. See: * * Beat (acoustics)/Exact phase beats Beat (acoustics) - Beat (acoustics)/Phase beats - Beat (acoustics)/Literature search - Beat (acoustics)/WJS

Consonant just intervals
Musical consonance is defined by a collection of frequency ratios defined by ratios of small whole numbers. Exactly which ratios create consonance is a matter of opinion, but our primary interest is in fractions between $$1$$ and $$2$$, where the coprime integer pairs range from from $$2$$ through $$8$$. Temporarily removing $$7$$ from the list leaves us with the six consonant intervals shown in Figure 1. Six piano keys (E&flat; E, ..., A) make the frequency ratio with the lower C shown in the figure. The question mark on D informs us that the "correct" ratio for that note is ambiguous, because two paths to D yield different results: Starting at C, one could move up by a factor of $$3/2$$ (fifth) and down by $$4/3$$ (fourth). Instead, one could obtain, $$10/9=(5/3)\cdot(2/3)$$ by moving up a sixth and down a fifth. This explains the need for a tempered scale way that does burden a student in a research group who has an aversion to higher mathematics.

This hypothetical math-adverse student might play an essential role in an effort to sort out a mystery dates back many years before Helmholtz proposed an explanation for the consonance of just intervals back in 1877. An important component of supervised student research involves students learning from students. Students begin higher education by developing a broad vocabulary, but only mastering one discipline. But most progress is interdisciplinary, and therefore demands communication between experts. Traditional courses (two midterms and a final) cannot tolerate the chaos of students always teaching each other. But that chaos might transform to joy if students are in a research group trying to understand acoustical beats. Of course, that joy is tempered when students are told that one group member's ability to detect rhythmic irregularities will carry absolutely no weight in the scientific community. Now we need an expert in experimental psychology.

Amplitude beats
It is well known that acoustical beats can be heard when a just interval is slightly detuned. An explanation by Helmholtz explanation is a common starting point for investigating this phenomenon, even by authors who concede that this model is less than convincing. What is easily taught is often misleading, yet there are reasons for introducing at topic with misleading simplicity. For example, student research that uncovers the flaws in a simple explanation has practical value in the teaching of that subject. In our case, the formulas and ideas presented below will prepare the reader for the more sophisticated calculations that follow.



Characteristic frequencies
Consider a perfectly tuned just interval with frequencies $$(f_p,f_q)$$, where:

''' Eq. 1 | ''' $$\quad f_p=pf_0>qf_0=f_q\,,$$

and $$p>q$$ are relatively prime integers. Adopting the usual symbols for period and frequency, we define $$T_0=1/f_0$$, is the longest of the four characteristic periods. The highest of these four frequencies is inspired by the fact that the smallest number divisible by both $$p$$ and $$q$$ is their product, $$pq$$. Hence we define:

'''Eq. 2 |''' $$\quad f_x=pqf_0$$

This allows us to write the period of the two pitches in the interval as multiples of $$T_x=1/f_x$$:

'''Eq. 3 |''' $$\quad T_q=pT_x$$ and $$T_p=qT_x$$

Figure 3 illustrates this for the (3/2) fifth, the high note's period is two units of $$T_x$$, while the lower note's period is three units long. A summary of relationships between these frequencies and periods is shown in Table 1.

Beats between matching harmonics


The history of recognizing importance of ratios of small numbers in defining consonant intervals is so ancient that it is almost a matter of convenience to associate it with Helmholtz (1821-1894), (who incidentally made great contributions to the field of musical acoustics.)  The amplitude beats depicted in Figure 2 (above) can be shown to occur at the frequency,

'''Eq. ? |''' $$\quad f_\text{beat}=|\Delta f|\equiv |f_2-f_1|$$

where $$\Delta f$$ is the difference between the two frequencies. Since we are seeking beats with frequencies of a few Hertz, this equation stipulates that we must consider beats between frequencies that are nearly equal.

It was Fourier (1768–1830) who demonstrated that periodic signals can be represented as a sum of sine and cosine wave whose frequencies follow a harmonic series. In other words, suppose a sound wave is periodic with period $$T$$, or equivalently, has a fundamental frequency of $$f=1/T$$. Subject to constraints beyond the scope of this article, any such function time can be expressed as a sum over sine and cosine waves, all with frequencies that are a multiples of $$f$$ (i.e. the frequencies are  $$f$$, $$2f$$, $$3f$$, $$4f$$, et cetera.)

We may neglect the cosine waves if the fluctuating pressure, $$p(t)$$ happens to be zero time, $$t=0,$$ and write this sum in the in what is called a Fourier series:

'''Eq. ? |''' $$\quad p(t)=C_1\sin(\omega t)+C_2\sin(2\omega t)+C_3\sin(3\omega t)+\ldots\,,$$

where $$(C_1, C_2,\dots)$$ are arbitrary constants, and "omega" is defined as, $$\omega=2\pi f$$. The top graph in Figure ? shows an example with the following choices for these constants:

'''Eq. ? |''' $$\quad C_1=2$$, $$\;C_2=-1$$, $$\;C_3=\tfrac 2 3$$, and $$C_j=0$$ if $$j>3$$.

The bottom graph in Figure ? depicts the waveform for a case that is inharmonic because $$3$$ was replaced by $$3.1$$.

See also:
 * How harmonic are 'harmonics'? - Joe Wolfe (UNSW)
 * Hyperphysics:Harmonic Content Demonstration
 * Constructing Musical Scales (Espen Slettnes)
 * Harmonic Series (musiccrashcourses.com)
 * Open vs Closed pipes (Flutes vs Clarinets) - Joe Wolfe (UNSW)

Formula

 * See also: Wikiversity's Beat (acoustics) and Wikipedia's Beat (acoustics)

Table 2 shows the 3/2 "fifth" interval with the higher frequency, $6/5$Hz, sharp by one Hertz. The harmonics, $5/4$, $4/3$, ..., are shown in that column. The harmonics of the lower frequency ($3/2$Hz) are also shown. The cases when the frequencies are match are shaded yellow, and accompanied by the frequency difference, which we call $$\Delta f$$. It can be shown that all the beat frequencies are given by:

'''Eq. ? |''' $$\quad {}^i\!f_B= i\cdot\left| q\Delta f_p - p\Delta f_q \right|\,,$$

where the prefix $$i$$ is a positive integer that can identify the pair of harmonics invovled: The $$ip^\text{th}$$ harmonic of $$f_q$$ matches the $$iq^\text{th}$$ harmonic of $$f_p$$. If the just interval's tuning is exact, this pair of harmonics have the same frequency, which is $$f_x=ipqf_0$$. In other words, $$f_x$$ as described in Table 1 is the frequency of the shared harmonic that is responsible for beats, according Helmholtz's model of consonance.

Equation (?) would lead one to believe that beats only occur when p-wave and q-wave each contain the corresponding harmonic in sufficient strength to cause the amplitude variations to be noticeable to the human ear. Yet, beats can be heard between pure sine waves that deviate slightly from just intonation.

The rest of this article is devoted to that mystery.

Phase beats
Equation ? also represents the frequency of what we shall call phase beats, except that the integer $$i$$ is restricted to only two values: To avoid confusion, the superscript to distinguish between phase beat frequency $$f^\phi$$ and beats between higher harmonics $$f^\text{H}$$. Two important caveats concerning phase beats must be mentioned:
 * $$i=1$$ for all just intervals.
 * $$i=2$$ if either $$p$$ or $$q$$ is even (verified for $$\max(p,q)\le 8$$ only).
 * 1) While there is evidence that people can distinguish phase differences between two pure sinusoidal waves, I was unable to find any mention of these "phase beats" on the internet.
 * 2) The rule regarding phase beats for $$i=2$$ has only been established for cases where $$p$$ and $$q$$ are both less than $8/5$.

Shown below are phase beats spanning two periods of $${}^2\!T_B^\phi$$ (one period of $${}^1\!T_B^\phi$$) a perfect fifth (P5) that is detuned by 4.3 cents. Figure 6 shows the waveform for P5 (perfect fifth) that has been detuned by about twice the amount associated with equal temperament. With a $5/3$ ratio, we expect to hear the $$i=2$$ beat, which occurs at twice the rate of the $$i=1$$ beat. This extra beat is shown in the center of the graph, where two cycles of the $$T_0$$ interval as shown (shaded cyan). Note how the central shaded region is the inverse of the two yellow shaded regions at each end. If humans perceive the central shaded section to be identical to those on the ends, the perception is that this is an $$i=2$$. But if the central section is perceived differently, humans will perceive two simultaneous beats: The $$i=1$$ occurs at frequency $${}^1\!f_B^\phi$$, with an additional beat at twice that frequency.

Hearing the beats
All files play the beat at 90 beats per minute and are arranged in 3/4 time:
 * 1) Four bars with no metronome: Listen for the beats
 * 2) Four bars with metronome. Think: click-2-3 | 2-2-3 | 3-2-3 | 4-2-3
 * 3) Four bars with no metronome. Count: rest-2-3 | 2-2-3 | 3-2-3 | 4-2-3
 * 4) One bar with metronome. Listen: click-2-3

The challenge occurs at step 3: Try to count the beats as if they were a four measure rest in a waltz. If you are the clicker, you would come on the first beat of the fifth bar after that rest. After a while you might be able to start counting at the beginning. If you are a musician, imagine that you have four bars of rest, four bars of clicks, four bars of rest, and one bar of clicks. And, you might discover that you need to "practice" by listening to a passage many times before you can master it. The waltz rhythm was deliberately chosen because doesn't fit into this theory of phase beats. In other words, while most waltzes emphasize that the "1" in 123 is a downbeat to be either skipped or played, here the "1" should sound exactly like the other two beats. So if you hear the "1" as louder, either you mind is playing tricks on you, or a new and unexplained effect is at work.

The first collection of seven sound files are WAV files. OGGs files are also shown. These are compressed but often easier to access online:

OGG:       P5 300.0-200.25 P4 266.667-200.188 M6 333.333-200.3 M3 250.0-200. m6 320.0-200.094 m3 240.0-200.125 d5 280.0-200.214

WAV:       P5 300.0-200.25 P4 266.667-200.188 M6 333.333-200.3 M3 250.0-200. m6 320.0-200.094 m3 240.0-200.125 d5 280.0-200.214



Phase shift model for detuning
Here we introduce an approximation that allows us to derive equation ?. The derivation is only valid for the eight just ratios shown in figure 7. For each ratio, three versions of the interval are shown. These versions differ only in the phase shift between the two pitches, and each version displays the two tone on separate time axes, so that there are actually six "sinusoidals" for each interval.

These "sinusoidals" are depicted as triangular waves for two reasons: One is convenience, as the diagram was created using Inkscape. These triangular waves make it much easier to see when the two waveforms are in phase. The top pair of waveforms depicts waves that are in phase; they are cosine waves of the origin as at the left end of each waveform. The bottom pair time-shifts the higher frequency wave by a time $$T_x=1/f_x,$$ where:

''' Eq. ? | ''' $$f_x=pf_q=qf_p,$$

and $$(p,q)$$ is a pair of relatively prime integers. The reader can verify from figure   7 that the length of each of each of the eight waveforms is $$T_0=1/f_0,$$ where:

''' Eq. ? | ''' $$f_0=f_p/p=f_q/q.$$

It can be shown that for each of the just ratios bottom pair of waveforms depicts a slightly detuned interval after $${}^1\!T_B^\phi$$ has elapsed. As shown in the figure, this is the true periodicity in the phase relationship because the blue line indicates where the peaks align. The middle pair of wafeforms depict half the phase difference. This pair depicts the phase shift after $${}^2\!T_B^\phi=\tfrac 1 2 {}^1\!T_B^\phi $$ of time has elapsed. The reader can verify that these just intervals display an alignment of the negative (downward peaks.) These alignments of negative peaks occur only if $$p$$ or $$q$$ is even. This is the beat pattern associated with $$i=2$$, which occurs only if $$p$$ and $$q$$ are both odd.


 * See Beat (acoustics)/Phase beats for a fuller explanation of figure ?

Two just tritones
It might be possible to test this phase-beating model by examining the tritones, $301$ and $602$ tritones, which differ by about $903$ cents. One tritone is with, and the other without the inverted beat at $$i=2.$$ If inverted waveforms sound exactly like the uninverted, the beat frequency should differ by a factor of two. A preliminary investigation using a low-cost pair of earphones failed to convincingly demonstrate this factor of two difference. This investigation was flawed by the fact that it was not a blind study, and because it used an inexpensive sound system. Also, it may be the case that humans can distinguish between a signal and its additive inverse due to possible nonlinearity how the ear perceives sound. What humans call "sound" ceases involves mechanical motion at the eardrum. Great complications occur after this motion causes nerve cells in the cochlea to create sound impulses. The following model is not an attempt to model how nerves in the cochlea convert sound to signals to the brain, but an oversimplification intended to introduce students to nonlinearity. The question is whether humans will perceive the signal at B in figure ? as different from the signals at A and C. Let $$x$$ and $$y$$ represent motion of eardrum and the amplitude of sound as perceived by nerves in the choclea, respectively. Both $$x$$ and $$y$$ can be defined so that their magnitudes are always less than unity. At the eardrum, $$x=x(t)$$ is an easily understood sum of two sinusoidal pressure fluctuations as shown in figure ? It is likely that a integro-differential equation is required to model $$y=y(t)$$, but for simplicity we take the relation to be that of a function:

''' Eq. ? | ''' $$y(t)=F(x(t))$$

If we stipulate that $$y(t)=0$$ when $$x(t)$$, it is plausible that this function can expressed in the following form:

''' Eq. ? | ''' $$F(x)= x\cdot (1 + \varepsilon_1 x + \varepsilon_2 x^2 + \ldots),$$

where $$\{\varepsilon_1,\varepsilon_2,\varepsilon_3,...\}$$ define the non-linearity of the relationship between $$x$$ and $$y$$. For sufficiently small $$x$$, these terms become successively smaller, so that the most important nonlinear effect often involves the the "first-order" ($$\varepsilon_1$$) term. The equation that stipulates that the perception of a sound is identical to the perception to it's additive inverse is:

''' Eq. ? | ''' $$-y(-x)=y(x)$$,

and the reader can verify that this is violated for any non-zero value of $$\varepsilon_2$$.

Different frequencies for phase and harmonic beats?
Figure ? suggests that equation is only an approximation because the beats (marked by the red and blue line) are delayed by less than $$T_0$$. This is a small correction because $$T_0<<T_B^\phi$$. But small deviations in the frequency of a periodic signal are easy to measure. A talented musician might be able count these beats for a sufficient length of time to detect a small difference between $$T_B^\phi$$ and $$T_B^H$$.

It is possible for humans to measure changes in beat frequency that are far too small for humans to perceive. All that is required is an audio-visual file that flashes a light at frequency $$f_B^H\,,$$ while playing an audio designed to beat at $$f_B^\phi\,.$$ The duration of this file can be several hours long. Instead of attempting to count beats, the person only needs to listen to selected excerpts.

Biological synchronization

 * Auditory cortex: The right auditory cortex has long been shown to be more sensitive to tonality (high spectral resolution), while the left auditory cortex has been shown to be more sensitive to minute sequential differences (rapid temporal changes) in sound, such as in speech
 * Lits&Stone: Devil's staircase figure. Neurons cannot fire at rates much beyond a kilohertz.
 * Neurotransmission. white lie. The brain is neither analog nor digital, but works using a signal processing paradigm that has some properties in common with both. ... the signals sent around the brain are "either-or" states that are similar to binary. A neuron fires or it does not. These all-or-nothing pulses are the basic language of the brain. So in this sense, the brain is computing using something like binary signals.forbes.com (quora)
 * Neurotransmission see first two images. See also Biological neuron model

See also c:Category:SVG cochlea

For modelling simplicity, firing frequencies may be the same as the driving frequencies, but in reality may be scaled-down versions of them, since neurons cannot fire at rates much beyond a kilohertz.

See also:
 * "Coupled Oscillators and Biological Synchronization," by S. Strogatz and I. Stewart in Scientific American 269(6), 102-109)
 * Synchronized metronome video (sciencedemonstrations.fas.harvard.edu)
 * Pantaleone, James. "Synchronization of metronomes." American Journal of Physics 70.10 (2002): 992-1000.

THEMES: Neurological spikes not sine waves ... trianguar waves.. Two analogs: Metronomes and circuits. Both are odes. Reference Beats (acoustics) on Wikiversity.

Acknowledgements
Any people, organisations, or funding sources that you would like to thank.

Competing interests
Any conflicts of interest that you would like to declare. Otherwise, a statement that the authors have no competing interest.

Ethics statement
The following passage was lifted from Institutional review board (Wikipedia). It emphasizes policy in the United States. For a worldwide perspective, see Ethics committee (Wikipedia).
 * An Institutional Review Board (IRB) is a committee that applies research ethics by reviewing the methods proposed for research to ensure that they are ethical. Such boards are formally designated to approve (or reject) behavioral research involving humans. Certain research categories are considered exempt from IRB oversight. One such category is research in conventional educational settings. Generally, human research ethics guidelines require that decisions about exemption are made by an IRB representative, not by the investigators themselves.

Editorial scrapbook

 * Coombes, S., and Gabriel James Lord. "Intrinsic modulation of pulse-coupled integrate-and-fire neurons." Physical Review E 56.5 (1997): 5809. (link) ... rhythmic motor behavior... Hodgkin–Huxley model (4 nonlinear odes).
 * Tadpole quote: "For example, in the mollusc Tritonia and the tadpole Xenopus the escape swim behavior is generated in this fashion ... The study of coupled oscillators has applications in understanding CPG (central pattern generators) neuronal circuits ... "
 * Three of the 41 citing articles involve music:
 * LotsStone coupled neural oscillators ... PROBLEMS WITH HELMHOLTZ'S THEORY ...
 * Heffernan, B., and A. Longtin. "Pulse-coupled neuron models as investigative tools for musical consonance." Journal of Neuroscience Methods 183.1 (2009): 95-106. (link)
 * Hadrava, Michal, and Jaroslav Hlinka. "A Dynamical Systems Approach to Spectral Music: Modeling the Role of Roughness and Inharmonicity in Perception of Musical Tension." Frontiers in Applied Mathematics and Statistics 6 (2020): 18.(link)


 * I found the references in Lots&Stone:
 * Schellenberg, E. Glenn, and Sandra E. Trehub. "Frequency ratios and the discrimination of pure tone sequences." Perception & Psychophysics 56.4 (1994): 472-478.(link) They studied sequential intervals and found people recognize them. Even infants do.  Goes against Helmholtz model... but what does this have to do with mode locking?
 * Mirollo, Renato E., and Steven H. Strogatz. "Synchronization of pulse-coupled biological oscillators." SIAM Journal on Applied Mathematics 50.6 (1990): 1645-1662. (link) mentioned in Lits&Stone.  Fireflies and women's menstrual cycles!


 * Hodgkin–Huxley differential equations as simple as I can find them (link)
 * ([ link])
 * ([ link])