• ### Calculating Resonance for Delay

Hello,

In "Designing Sound" by Andy Farnell, p. 378-379, he gives the following description of how to approximate the resonance duration of bells inside of a telephone box:

Making a Box
The resonator in ﬁgure 29.14 sends its input signal into two delays that feedback into each other. Between them is a ﬁxed ﬁlter that mimics the material properties of the box and a that serves to limit the signal and introduce a little distortion to create a brighter sound. An old telephone has a box about 20cm to 30cm (12 inches) square. From the speed of sound being 340m/s we get a resonance of 0.3/340ms or about 1.1kHz. Two delays are used with the length being slightly longer than the width. Tapping some Bakelite shows resonances somewhere between a hard wood and plastic, and for a plate about 5mm thickresonances were seen at 1kHz, 500Hz, and 300Hz. Choosing the exact values for the patch in ﬁgure 29.14 requires a bit of tweaking by hand. You want to ﬁnd two values for the acoustic resonance and set the width, length, and feed-back to give a good eﬀect, while at the same time you must pick ﬁlter valuesthat give a nice hollow radiated tone. Picking feedback values close to 0.7 givesgood results; then tune the ﬁlters to get the quality of a plastic box without accidentally sending the acoustic resonator into unstable feedback.

Now, I understand that 0.3/340ms = 1133Hz (about 1.1kHz) and 1/1133 = 0.88ms which is the value he used for one of the delays in his "casing" patch. What I don't understand is how he got the resonance value of 0.3/340ms to begin with. I assume the 0.3 comes from the 30 centimeters, ie. the width of the box, but what about the 340 ms? It looks related to the speed of sound, but how exactly? And is this a formula I can reuse, ie.

w/340 = r

where w is the width in meters and r is the resonance frequency in Hertz? I tried Googling this but the resonance formulae that came up were much more complex.

Also, apologies if this topic is less about PD and more about Math/Acoustics. In the future, would it be better to ask questions like this on a math forum instead?

• Posts 8 | Views 3192
• @s.elliot.perez yes you are correct. 30 centimeters = .3 meters. This is the physical wavelength of the wave that will resonate in the box. so, if sound moves @ approximately 340 m/s you have to divide 340 by .3 meters to get how many times the air waves will bounce back and forth between 2 surfaces in 1 second, which is the resonant frequency (if they travel in a straight line without interference), which is 1133 1/3 hz. if you instead divide .3 by 340 you will get the number of seconds that corresponds to the temporal wavelength (the inverse of the frequency, or how long it will take for the pressure waves to go from one side of the box to the other).

the frequencies that will actually resonate in a simplified "2-wall" delay setup like this will be all of the harmonics of this fundamental, and all of the frequencies halfway between the harmonics will be reduced (it is a comb filter)

gotta say, I would think using all of these send~s and receive~s would mess these calculations up since I thought they also delay by a millisecond or so..

• Thanks, Sébastian, you've explained it very well and I understand.

The comb-filter thing doesn't have anything to do with the [bp~] objects, right? So with a sound that has a lot of non-harmonic partials, like a bell, it could end up sounding more consonant (assuming some of the non-harmonic partials are about halfway between the harmonic partials) because of the casing?

Does anyone know if that's true about send~/throw~/receive~/catch? Is it faster to use wire connections?

• @s.elliot.perez yup, it would reinforce whatever "fundamental" the comb filter was at. You could also pass in white noise and get a buzzy pitch out also. (this is basically how the karplus-strong algorithm works).

In this example there seems to be a comb filter and then a more complex feedback system with the bp~ filters and whatnot though.

• @seb-harmonik.ar So the "comb filter" is the system of delays with feedback? How does one specify the fundamental thereof? The length of the delays? Is the fundamental about 1.133Hz in this case?

By the way, here's Farnell's original patch: striker.pd

and here's a version without [send~] or [throw~] objects: telephoneBell.pd

and they do indeed sound different, with the latter sounding louder/clearer. Did I make a mistake somewhere? Or could this indeed be due to the added delay of [send~] / [throw~] objects? I admit I stopped using them in the past because I noticed they created some kind of weird partial phase cancellation that wasn't happening with direct wire connections.

• @s.elliot.perez "comb filter" refers to 2 simple delays: 1 where you delay the incoming signal, multiply it, and add it to itself (no feedback) and 1 where you take the output, delay it, multiply it and then add it to the input to create the new output (this is the classic "echo" effect and what we generally think of when we think of the "delay" effect with feedback)

the fundamental frequency is equal to the inverse of the delay length (e.g. if your delay length is 1 ms your frequency will be 1000 hz). I don't think the bandpass filters should affect it too much.

in this situation, the delays are feeding back into each other so it's more complex than a simple comb filter. However, the frequencies should still depend on the delay times like that.

Interesting side note: all digital filters can be deconstructed into these 2 simple building blocks, except that they use 1 sample instead of milliseconds or seconds. The feed forward one is called a "zero" and the feedback one is a "pole". This is because the space between the peaks of the comb filter is the inverse of the delay time. So, if you set the delay time to 1 sample you get a "peak" width of the entire spectrum up to the sample rate.

I think you did it right, but you might need to lower your block size within a subpatch to get lower delay times than 64 samples (~1.45 ms @44.1k) also.. and/or do the stuff in the helpfiles G04.control.blocksize.pd and G05.execution.order.pd where you can

• Ah, yes, I see the two types of Comb Filter on Wikipedia. So the Feedback-version has higher peaks and a steeper curve because of cumulative feedback?

I actually mostly use PD nowadays with the Hvcc-compiler, which converts patches into C-code and then wraps it for different platforms. I don't know how those plugins are affected by send~ & throw~, and the makers of hvcc disbanded and stopped answering my mails. T-T

• P. 399 of Designing Sound (p. 423 in this online version: https://ja.scribd.com/document/289610007/Designing-Sound-Andy-Farnell-pdf) describes the building of formants and a resonator for a wooden door. Here are the formants:

And here are the delay alues for the resonator:

While I imagine the formants were derived from spectograms of door recordings, I don't understand how the delay values (4.52ms, 5.06ms etc.) were derived. I thought they might derive from the formant frequencies, but while there are eight delays, there are only six filters.

Does anyone have any idea where Farnell got these values? Also, do abstractions have the same audio lag as subpatches?

EDIT: Here's the actual patch. I added that hip~ thing from the other thread to hear a single impulse, haha, with and without formants. The formants sound good- like they'd make a good spectrum for a wooden body with more resonance, but with the delays sound kind of trashy: doorcreaker.zip

Posts 8 | Views 3192
Internal error.

Oops! Looks like something went wrong!