Tuesday 4 April 2023

More pitch

I have in the past wondered about pitch, with one result being the post at reference 1. I have also dabbled in the book at reference 2 and a few weeks ago, idly turning its pages, I got into the chapter on pitch again, or more precisely, ‘Chapter 3: periodicity and pitch perception: physics, psychophysics, and neural mechanisms’.

Sticking with humans, I now know that pitch is a perception arising from some sounds, in particular those of voices and musical instruments. Pitches are ordered, that is to say a subject can say that this pitch is lower, the same or higher than that pitch. Generally speaking and subject to some error, subjects will agree about this. A sense of consonance is added to this sense of order, with subjects being able to say that this pitch is more or less consonant with some different pitch, a sense which is all bound up with octaves, defined in terms of the halving or the doubling of the fundamental frequency, which last follows.

[The original caption (from ResearchGate) says: ‘Fig. 5. Shows adding Gaussian white noise to sine signal’]

There is no simple relation between the frequency content of a sound and its pitch. That said, the story seems to be that for a sound to have pitch it must be more or less periodic, that is to say it does not have to be exactly periodic and locally rather than globally periodic will do. Furthermore, the sound could be made up of two components, a noise component and a periodic component. But the period does have to be less than 40ms or so – that is to say a lot less than that of the sine wave snapped above – and the sense of pitch starts to deteriorate when the period is less than about 0.25ms – with a millisecond (ms) being a thousandth of a second. Note that, generally speaking, an individual neuron cannot sustain a firing rate of firing every millisecond.

Sometimes there is an element of compromise about this. The brain does the best it can, selects the best period it can, with the material available – which, inter alia, gives rise to the phenomenon of the missing fundamental of reference 1.

The perception of pitch is then a simple function of the chosen period, with something called the fundamental frequency (in Hertz, or periods per second) being the reciprocal of that period. Giving a pitch range of from about 25Hz to 4,000Hz, with there being some variation here between subjects. While the intensity of that pitch will vary with the quality of the signal, in particular with the proportion of noise.

It is possible to map sounds with pitch onto frequency by getting subjects to match pitches to pure sine tones, generated by a computer. Or by a tuning fork, which produces something close to a pure sine tone, with little of the energy available being diverted into harmonics. The pitch of a pure sine tone is equal to the period (or the frequency) of that sine tone: in this case the relation between pitch and frequency content is simple.

Note that the ear does not register pitch. It registers frequency composition, in a fairly rough and ready way, using the hairs lining the inside of the cochlea, that is to say the spiral tube of the inner ear. Pitch is a percept, a construct, of the brain proper – in something of the same way as colour.

Along the way I got led down two garden paths, one about something called iterated ripple noise or IRN and another about the time it takes to correctly register a pitch. To these I now turn.

Iterated ripple noise

IRN has been and remains important in the study of pitch, being easy enough to generate using an old-speak electrical circuit and even easier using a computer.

One starts with white noise, that is to say a random signal which does not have pitch. One then goes through a number of iterations of ‘new signal equals old signal plus a copy of the old signal delayed by d ms’. After say five iterations of this one has something close to a periodic signal with period d. And with more iterations one gets even closer.

Which sounds straightforward enough, but I had some difficulty finding out exactly how this worked. A key paper, which might have been useful, reference 3, was behind a paywall, too high for casual use. Reference 4, nominally about the extension of regular IRN to dynamic IRN, in which the delay varied with time, was equally inaccessible – possibly because sound research of this sort has medical and commercial uses. Not to be dished out for free.

And I found it hard to visualise what was even going on, even when I resorted to pencil and paper. So on the basis of the clues I had gathered together, I knocked up some Visual Basic code in Excel. Which soon demonstrated that this technique did indeed generate periodicity, but also that long term behaviour, both in terms of number of seconds and of number of iterations was sensitive to the details of the code. The generated signal could quite easier go off the deep end, as it were.

The long view after 10 iterations. A signal fluctuating around a mean of slightly more than 5 with a range of 10. The mean being consistent with adding up 11 copies of white noise generated using the Excel random number to generate a uniform random series of numbers between zero and one.

More serious workers take the trouble to tidy up this noise, to remove unwanted frequencies.

The short view from the same run, with the periodic structure matching the delay of 20 units – a proxy for 20ms.


The long view after 60 iterations. Takes a little longer to get going, but much the same story as before.

The short view from the same run, with the signal now being much more firmly periodic, give or take a few extra, subsidiary peaks.

So while there may still be errors in the code, enough has been done to convince me that this, at first sight, rather odd procedure does indeed generate a periodic signal. One does not need a tuning fork, let alone a family of tuning forks, to make pitches.

A pitch signal which is useful because, by tweaking a couple of parameters, it is easy to control the pitch and the intensity of the resultant sound, making it a useful experimental tool.

How long does it take to know the pitch of a sound?

While some musicians push at the boundaries, western classical music looks to range up to around 200 beats per minute (bpm). That is to say around 300ms for a crochet or 75ms for semiquaver. While periods range downwards from around 25ms. So while some music might push it a bit, most notes will span tens of periods and more, well within the range for electrical determination of pitch. But what about biological determination?

In which connection Bing turned up reference 5 from the Poland of the end of the communist era, available from JSTOR (for journal storage), a digital library operated by the Mellon Foundation, Andew Mellon having been a (Pennsylvanian) banker, industrialist, politician and philanthropist of the early 20th century, an early advocate of the wisdom of cutting taxes for the very rich. A digital library which operates under a not-for-profit umbrella, but which does charge for a lot of its services. So the present paper can be read online for free, while a modest fee is required for download. As it happens, a rather good quality download, much better than many of the pdfs created with a scanner that one comes across. See references 6, 7 and 8.

The paper takes the form of a typescript from the Institute of Music Education at what was then the Pedogogical University at Zielona Góra, in Western Poland, a city which started out Polish in the first half of the second millennium, but was part of the Hapsburg then German empires for most of the second half, only reverting to Poland after the second world war. A university which appears to offer at least some lectures in English, for which see reference 9. And a accessible paper which is written from a musician’s point of view and the experimental subjects for which were music students. Part of the motivation being to remind those who want to push the boundaries of music of the boundaries of human perception of pitch.

It starts by telling us that ‘… The tonal perception threshold is equal to about 60ms for 50 Hz, decreasing to about 10ms for 1,000 Hz…’, which to this layman sounds very short.

The procedure brings to mind that described at reference 10. That is to say the subject was required to match a target pitch by tuning a reference pitch. It being understood that for any one target pitch one was going to get a range of matches. There would be statistical considerations, in particular interquartile ranges.

So in the summary table reproduced above, pitch increases from left to right and training increases from top to bottom.

While the tidy conclusions are reproduced in the snap above. Other things being equal, perception of pitch improves as the pitch gets higher and as the amount of training increases. Just as with, for example, colour, given a bit of natural talent, one can train peoples’ perception of sound.

Other matters

Pitch place

Given that ears do not code for pitch, neuroscientists are interested in whether there is a place in the human brain in which the pitch of a stimulus (if any) is coded. Is there patch of cortex which responds in a simple, topical way to pitch? So that we can say, for example, that pitch A will stimulate place B on that patch? That if we move A very slightly, B will move very slightly? And that if we increase A, B will move to (say) the left?

Reference 11 suggests that, at least as at 2010, we had yet to find such a place. In particular, that IRN has more about it than just pitch, so sensitivity to any old aspect of IRN is not enough.

Phase

I have in the past wondered about phase. What happens if all the second violons play out of phase with each other? Given that two violins playing 180° out of phase would add up to nothing, could the sound of lots of violins cancel out?

Maybe part of the answer is that two signals with the same period p add up to a signal of period p. So two signals of the same pitch would up to another signal of that pitch. To which extent, being out of phase would not matter. Volume, however, would be a different matter.

Circularity

Scientists of colour talk about the hue circle, on which hue goes around a circle and comes back to the beginning, wherever that might have happened to be. While musicians talk about running up and down scales – and if we disregard octave, we could talk about running around scales. I have yet to bottom out whether this analogy is of any value.

Would the starting point on any such circle be arbitrary, as some have argued for colour? See, for example, reference 12.

Tuning forks

In the course of all this, I had occasion to look up the tuning forks used in tuning pianos and was intrigued to come across the very small one noticed at reference 13.

Conclusions

Musical pitch might be reasonably well understood from the point of view of the subject, but it looks as if we have some way to go in working out how the brain does it.

References

Reference 1: http://psmv3.blogspot.com/2017/01/virtual-pitch.html. The business of bells.

Reference 2: Auditory Neuroscience: Making Sense of Sound - Jan Schnupp, Israel Nelken and Andrew King – 2012.

Reference 3: Pitch of iterated rippled noise – William A. Yost – 1996. Inaccessible behind a paywall.

Reference 4: Pitch detection of dynamic iterated rippled noise by humans and a modified auditory model – Susan Denham – 2005. 

Reference 5: Duration of Tones Required for Satisfactory Precision of Pitch Matching - Janina Fyk – 1987. 

Reference 6: https://www.jstor.org/

Reference 7: https://daily.jstor.org/

Reference 8: https://en.wikipedia.org/wiki/Andrew_Mellon

Reference 9: https://study.gov.pl/university/university-zielona-gora

Reference 10: https://psmv5.blogspot.com/2022/10/an-instrument.html

Reference 11: Re-examining the Evidence for a Pitch-Sensitive Region: A Human fMRI Study Using Iterated Ripple Noise – Daphne Barker, Christopher J. Plack, Deborah A. Hall – 2011.

Reference 12: https://psmv5.blogspot.com/2023/03/the-inverted-spectrum.html

Reference 13: https://psmv5.blogspot.com/2023/04/escapements.html. A small tuning fork which might be part of an escapement. 

Reference 14: https://dp.la/. I associate from JSTOR to the Digital Public Library of America, an outfit which, for my purposes, operates in much the same space.

Reference 15: Responsible Cyber Power in Practice – The National Cyber Force, GCHQ – 2023. A spot of light reading turned up from today’s FT. Another domain where we here in the UK seek to punch above our weight – while hopefully bearing in mind that our weight is declining.

No comments:

Post a Comment