Live data from Hacker News

Cat meow sounds visualized with auto-correlation function

soundshader.github.io

21–30 of 35 posts

Re: Cat meow sounds visualized with auto-correlation function

#21
post #2

Hi HN! I used the meow sounds from https://soundspunos.com/animals/10-cat-meow-sounds.html . I expected to see very little variability in the meows, maybe just 4-5 different types for basic emotions. To my surprise, each “cat meow” has astonishingly colorful, complex and unique structure, unlike human vowels that follow a more or less predictable pattern: https://soundshader.github.io/vowels . The algorithm behind th…

Is it possible to see what sounds map to what ACF images? I don't see that. And without this, the effect is ... just some pretty pictures.

The only way right now is to use the demo and download the sounds yourself (you can use the meows from my link to get the same images):

https://soundshader.github.io/?n=4096&img=2048&acf.lr=5&sr=5...

Re: Cat meow sounds visualized with auto-correlation function

#22
post #14

> It computes FFT to decompose the sound into a set of A·cos(2πwt+φ) waves and drops the phase φ to align all cos waves together. This is known as the auto-correlation function (ACF). How is simply dropping the phase transforming FFT into ACF (according to various definitions of ACF as shown here: https://en.wikipedia.org/wiki/Autocorrelation )?

I might be mistaken but since the auto-correlation function is the inverse FFT of the power spectral density and power spectral density doesn't contain information about the phase. Thus, it's like dropping the phase and taking IFFT(|A|^2)

They're inverse operations but as far as I understand that's not the only thing going on with the ACF. Taking the phase out is just taking the real part of the FFT is it not? Regardless where's the correlation?

Re: Cat meow sounds visualized with auto-correlation function

#23
post #17

> It computes FFT to decompose the sound into a set of A·cos(2πwt+φ) waves and drops the phase φ to align all cos waves together. This is known as the auto-correlation function (ACF). How is simply dropping the phase transforming FFT into ACF (according to various definitions of ACF as shown here: https://en.wikipedia.org/wiki/Autocorrelation )?

Wikipedia is great at obfuscating simple ideas in complex math. The "Efficient computation" explains the idea well, but it could be made even simpler. The amplitude squaring step drops the phase there.

The phase is dropped but isn't there more going on? Comparing the signal to itself at various lags? I don't see how just dropping the phase accomplishes that.

Re: Cat meow sounds visualized with auto-correlation function

#24
post #3
post #2

Hi HN! I used the meow sounds from https://soundspunos.com/animals/10-cat-meow-sounds.html . I expected to see very little variability in the meows, maybe just 4-5 different types for basic emotions. To my surprise, each “cat meow” has astonishingly colorful, complex and unique structure, unlike human vowels that follow a more or less predictable pattern: https://soundshader.github.io/vowels . The algorithm behind th…

I would agree that the images are rather intriguing, but ... what does all this visual structure actually mean? I'm guessing some kind of overtone structure in these sounds (perhaps decipherable to cats, but not to us)? I await your insight.

Interpreting ACF images:

1. Time progresses from the center to the edge of the circle.

2. Color means note, e.g. A4=432Hz is red, but so is A1, A2 and all other A notes. B is orange, C is yellow, D is green and so on.

3. The amount of fine details is frequency: the higher the frequency, the more fine details you see. If notes of different colors and different frequencies sound simultaneously, e.g. a A2 with a G5, you’ll see a red belt with a few repetitions mixed with a blue belt with 8x more repetitions, so the result will be a purple belt with a fine structure.

For example, on one image below there is a green belt with 10 repetitions. One repetition correponds to 13.5 Hz here (55296 Hz sample rate, 4096 FFT bins), so 10 repetitions is 135 Hz, which corresponds to C3. On another image there is a curious red cross in the center, it’s a red belt with 2 repetitons. That’s 27 Hz, or A0, almost infrasound.

Re: Cat meow sounds visualized with auto-correlation function

#25
post #21

Earlier quoted context omitted.

Is it possible to see what sounds map to what ACF images? I don't see that. And without this, the effect is ... just some pretty pictures.

The only way right now is to use the demo and download the sounds yourself (you can use the meows from my link to get the same images): https://soundshader.github.io/?n=4096&img=2048&acf.lr=5&sr=5...

A link or pairing of the images and corresponding audio would be nice to have.

Re: Cat meow sounds visualized with auto-correlation function

#26
post #18

Is "dropping the phase" the same thing as computing the spectral power distribution? P.S. A4 = 432Hz is a stupid fad that can't die soon enough.

Seems so, except that in this case it is basically just the modulus whereas the PSD is the modulus squared |A|^2

Ahh yeah, magnitude vs. power, my mistake on the terms.

Re: Cat meow sounds visualized with auto-correlation function

#27
post #8

Earlier quoted context omitted.

I know from personal experience, cat's use a lot of inflection in their voices. I'm not at all surprised by the images (though I don't know exactly what they mean). This inflection directly effects the image, because it modulates the pitch of the meow. Another factor, completely unrepresented in these images is the lower frequency components connected by seconds of silence. Most cats are pretty quiet, but sometimes t…

> Not to start a dog vs cat war, but as someone who loves both, I think I can safely say that cats put much more information in their voices than dogs, for example. My cat only gets really vocal when she wants something ( & usually only with me, not my kids or spouse). She also trills a lot, usually in surprise. Could be they compress the data - dogs are very chatty - maybe the cats focus on high throughput whereas t…

> maybe the cats focus on high throughput whereas the dogs go for low-latency.

I really like that way of thinking about it. Cats hit the low latency pretty quick with the hissing, which is what the wild cats looked more like in this projects demo. Kinda makes sense.

Re: Cat meow sounds visualized with auto-correlation function

#28
post #17

Earlier quoted context omitted.

Wikipedia is great at obfuscating simple ideas in complex math. The "Efficient computation" explains the idea well, but it could be made even simpler. The amplitude squaring step drops the phase there.

The phase is dropped but isn't there more going on? Comparing the signal to itself at various lags? I don't see how just dropping the phase accomplishes that.

Not really. ACF is defined as a convolution of signal X with itself: XX. But FFT turns a convolution into a dot product: FFT[XX] = FFT[X]·FFT[X], or just |FFT[X]|². But what is this really? If X is a sum of A·cos(2πwt+φ) waves, then FFT[X] is a set of A·exp(iφ) complex numbers. What does |FFT[X]|² do? It turns those complex numbers into A². Inversing this FFT gives a sum of A²·cos(2πwt) waves, so in effect ACF has dropped the phases and squared amplitudes. This is also why ACF have this bright vertical line - this is cos(x) functions piling up together.

Re: Cat meow sounds visualized with auto-correlation function

#29

Is "dropping the phase" the same thing as computing the spectral power distribution? P.S. A4 = 432Hz is a stupid fad that can't die soon enough.

432 vs 440 Hz in music is the equivalent of the C++ vs Java battle. Vivaldi was a proponent of 432 Hz, so it's only when he died, newthinkers had recalibrated pianos to 440 Hz. I believe the newthinkers are simply lacking taste, and rounding 432 to 440 is same as chopping off a chunk of Parthenon to "fix" its proportions from the golden phi ratio to 3/2.

Re: Cat meow sounds visualized with auto-correlation function

#30
post #29

Is "dropping the phase" the same thing as computing the spectral power distribution? P.S. A4 = 432Hz is a stupid fad that can't die soon enough.

432 vs 440 Hz in music is the equivalent of the C++ vs Java battle. Vivaldi was a proponent of 432 Hz, so it's only when he died, newthinkers had recalibrated pianos to 440 Hz. I believe the newthinkers are simply lacking taste, and rounding 432 to 440 is same as chopping off a chunk of Parthenon to "fix" its proportions from the golden phi ratio to 3/2.

No, it's not. Java and C++, hell even Java and C# are much more relevantly dissimilar than setting A at 440 vs 432. I'd love to see a citation on Vivaldi's love for 432, he wasn't even playing in 12-TET was he? He'd probably be playing in meantone during that era right? I figure he'd be way more mad about using the wrong intonation to play his music than a difference absolute pitch reference.

> rounding 432 to 440

Rounding from what to what? Why does the number cycles relative to seconds being any particular number matter?

Post reply on HN