Hi Pun Chik,
hi . can u send me an example patch of this harmonic series of resonant comb filters...im really interested in learning this. an example patch would be really nice
I'm a bit too busy to make a simple demo right now, but the principle is easy to understand:
A comb filter is simply a very short delay with a high amount of feedback. It is so short that it's length becomes an oscillating waveform. Try making a simple [delwrite~ delayname] and a [vd~ delayname]. Now make a feedback loop by connecting the [vd~ delayname] back into the [delwrite~ delayname], and multiply this by a number less than 1. Something between .9 and .99 will give you a good ringing sound. The output of the [vd~ delayname] also gets sent out to the [adc~] for you to hear.
Divide the samplerate by the frequency you want the comb filter to resonate at, then divide by 1000 to get the delay length to send to the [vd~ delayname]. It would be good to put your [delwrite~] and [vd~] objects in a subpatch with a [block~ 1] object, which sets the blocksize to 1 and allows for the shortest possible delay times [which in turn gives you the highest possible resonant frequencies].
To make a resonant series, make multiple instances of this [as abstractions, don't forget to use $0 in the "delayname"!], and send the base frequency to the first comb filter abstraction, and multiplications or divisions of that to subsequent "harmonic" subpatches. Integers [2,3,4...] will produce clean harmonics, while other numbers [.98, 1.34, 2.22...] will be detuned to various degrees, resulting in an acoustic "beating" phenomenon as waveforms amplify and cancel each other out.
The same audio input is sent to all the comb filters. Sharp, percussive sounds will "ring" the filters, giving you a plucked-string kind of sound. Continuous sounds give something like a guitar or sitar type of drone. Try changing the multipliers of the "harmonic" filters for different drone or tonal effects.
All in all, I find it is much better for people to understand the principles of how these things work, so building your own will be great practice! Google for "karplus-strong" for more technical/mathmatical info.
Good luck, derek
pun chik wrote:
hi . can u send me an example patch of this harmonic series of resonant comb filters...im really interested in learning this. an example patch would be really nice many thanks punchik
On Tue, 08 Feb 2005 18:11:04 +0100, "derek holzer" derek@x-i.net said:
Hi Marcus,
marcus estes wrote:
I'm a big fan of the Keith Fullerton Whitman album "Playthroughs,"
Me too! I got a similar effect by using a harmonic series of resonant comb filters triggered by contact mike input. The mikes are attached to various bits and bobs I found in the Amazon... shells, plants, bones and other unidentifiable stuff that produce nice sounds when plucked, scraped or bowed. The comb filters are run through a granulating feedback delay that makes "clusters" of particles similar to what you hear on "Playthroughs" or "21:30 for Acoustic Guitar". Three or four delays set at irregular intervals [i.e. 3/4, 7/5, 5/9, etc] add further texture.
I'm also a big fan of Derek Holzer's Particle Chamber patch.
Thanks! ;-)
I have considered re-tooling the Particle Chamber for use with a live input, but that seems a bit tricky.
It's not too hard, really. Particle Chamber reads from static tables, grabbing sections of loaded soundfiles and playing them back. I've built a few adaptations for myself of this idea using delay lines instead of tables, and they perform on input audio in the same way. I just haven't cleaned them up for release yet. But if you compared the "guts" of each patch, you would find them almost identical except for the source of the sound. The mechanics remain pretty much the same. Play around with that for a while, and I promise to clean up my own version sometime in March for public release.
best, derek
-- derek holzer ::: http://www.umatic.nl ---Oblique Strategy # 36: "Consult other sources -promising -unpromising"
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://iem.at/cgi-bin/mailman/listinfo/pd-list
derek holzer wrote:
Hi Pun Chik,
[vd~ delayname]. It would be good to put your [delwrite~] and [vd~] objects in a subpatch with a [block~ 1] object, which sets the blocksize to 1 and allows for the shortest possible delay times [which in turn gives you the highest possible resonant frequencies].
but think twice before you do that as it might well eat your cpu if you are careless.
mfg.asd.r IOhannes
Hi Derek,
Thank you for the explanation, Karplus-Strong gives charimng sounds. But I can't make it resonate at the frequency I want. I made a little testing patch trying to follow your guidelines as much as I could. What's wrong?
I googled a bit and I always found that deltime should be deltime (sec) = 1/Freq(Hz)
example: to get a A440 sound I should deltime (msec) = (1/440)*1000
why must we do deltime (msec) = (samplerate~ / Freq(Hz)) / 1000 instead?
I can't get it... (.. newbie)
-----Messaggio originale----- Da: pd-list-admin@iem.at [mailto:pd-list-admin@iem.at]Per conto di derek holzer Inviato: martedì 15 febbraio 2005 17.48 A: pun chik Cc: PD-List Oggetto: [PD] resonant comb filter series
Hi Pun Chik,
hi . can u send me an example patch of this harmonic series of resonant comb filters...im really interested in learning this. an example patch would be really nice
I'm a bit too busy to make a simple demo right now, but the principle is easy to understand:
A comb filter is simply a very short delay with a high amount of feedback. It is so short that it's length becomes an oscillating waveform. Try making a simple [delwrite~ delayname] and a [vd~ delayname]. Now make a feedback loop by connecting the [vd~ delayname] back into the [delwrite~ delayname], and multiply this by a number less than 1. Something between .9 and .99 will give you a good ringing sound. The output of the [vd~ delayname] also gets sent out to the [adc~] for you to hear.
Divide the samplerate by the frequency you want the comb filter to resonate at, then divide by 1000 to get the delay length to send to the [vd~ delayname]. It would be good to put your [delwrite~] and [vd~] objects in a subpatch with a [block~ 1] object, which sets the blocksize to 1 and allows for the shortest possible delay times [which in turn gives you the highest possible resonant frequencies].
To make a resonant series, make multiple instances of this [as abstractions, don't forget to use $0 in the "delayname"!], and send the base frequency to the first comb filter abstraction, and multiplications or divisions of that to subsequent "harmonic" subpatches. Integers [2,3,4...] will produce clean harmonics, while other numbers [.98, 1.34, 2.22...] will be detuned to various degrees, resulting in an acoustic "beating" phenomenon as waveforms amplify and cancel each other out.
The same audio input is sent to all the comb filters. Sharp, percussive sounds will "ring" the filters, giving you a plucked-string kind of sound. Continuous sounds give something like a guitar or sitar type of drone. Try changing the multipliers of the "harmonic" filters for different drone or tonal effects.
All in all, I find it is much better for people to understand the principles of how these things work, so building your own will be great practice! Google for "karplus-strong" for more technical/mathmatical info.
Good luck, derek
Hi Davide,
I'll get back to you with something in just a sec, but first this:
you do know that [fiddle~] sends out the MIDI pitch, not the frequency in Hz, right? It doesn't account for the discrepency in your patch, but it is the first error I noticed.
d.
Davide Morelli wrote:
Hi Derek,
Thank you for the explanation, Karplus-Strong gives charimng sounds. But I can't make it resonate at the frequency I want. I made a little testing patch trying to follow your guidelines as much as I could. What's wrong?
I googled a bit and I always found that deltime should be deltime (sec) = 1/Freq(Hz)
example: to get a A440 sound I should deltime (msec) = (1/440)*1000
why must we do deltime (msec) = (samplerate~ / Freq(Hz)) / 1000 instead?
I can't get it... (.. newbie)
OK, I'm back.
As far as I can figure, you made two boo-boos. The first was assuming that the output of [fiddle~] was in Hz, when it is in MIDI.
The second was too many objects in your low-blocksize subpatch. I can't explain why, but your subpatch was not operating at [block~ 1] for some reason. The only things that are necessary in that subpatch are the [vd~] and the [delwrite~]. Everything else should be left out.
I cleaned it up and have attached it here. The one last thing to note is that [fiddle~] will not give an "accurate" reading of the comb filter below around 138.5 Hz or MIDI note 49. As the delay gets longer, the resulting sound becomes less sinusoidal and closer to the noise which is driving the comb filter.
best, derek
Davide Morelli wrote:
Hi Derek,
Thank you for the explanation, Karplus-Strong gives charimng sounds. But I can't make it resonate at the frequency I want. I made a little testing patch trying to follow your guidelines as much as I could. What's wrong?
I googled a bit and I always found that deltime should be deltime (sec) = 1/Freq(Hz)
example: to get a A440 sound I should deltime (msec) = (1/440)*1000
why must we do deltime (msec) = (samplerate~ / Freq(Hz)) / 1000 instead?
I can't get it... (.. newbie)
Hi again,
Davide Morelli wrote:
I googled a bit and I always found that deltime should be deltime (sec) = 1/Freq(Hz)
example: to get a A440 sound I should deltime (msec) = (1/440)*1000
I can't remember where I found this formula, but most of the Karplus-Strong algorithms I've looked up account for the sampling rate. Those that don't assume a fixed sampling rate. The algorithm you found is one of those that assume a fixed rate of 44100:
deltime (sec) = 1/Freq(Hz)
MIDI note 45 = 110 Hz
(1 / 110 Hz) = 0.00909 0.00909 * 1000 = 9.09 ms
why must we do deltime (msec) = (samplerate~ / Freq(Hz)) / 1000 instead?
Sorry, I misread my own patch! The proper version is below, and you will happily note it gives the same result as yours given a sampling rate of 44100:
deltime (msec) = (samplerate~ / Freq in Hz) / (samplerate~ / 1000)
MIDI note 45 = 110 Hz
(44100 Hz / 110 Hz) = 400.9 (44100 Hz / 1000) = 44.1 400.9 / 44.1 = 9.09 ms
The benefit of this method is that other sampling rates can be used. Higher sampling rates allow for higher frequencies to be generated, as is usually the case in DSP.
best, derek
Doh! (sorry for my newbieness... but couldn't find help pages on fiddle~ )
anyway my ear tell me that if I set the freq slider to 110Hz I still don't hear a 110Hz sound..
----- Original Message ----- From: "derek holzer" derek@x-i.net To: "Davide Morelli" info@davidemorelli.it Cc: "PD list" pd-list@iem.at Sent: Wednesday, February 16, 2005 5:05 PM Subject: Re: R: [PD] resonant comb filter series
Hi Davide,
I'll get back to you with something in just a sec, but first this:
you do know that [fiddle~] sends out the MIDI pitch, not the frequency in Hz, right? It doesn't account for the discrepency in your patch, but it is the first error I noticed.
d.
Davide Morelli wrote:
Hi Derek,
Thank you for the explanation, Karplus-Strong gives charimng sounds. But I can't make it resonate at the frequency I want. I made a little testing patch trying to follow your guidelines as much as I could. What's wrong?
I googled a bit and I always found that deltime should be deltime (sec) = 1/Freq(Hz)
example: to get a A440 sound I should deltime (msec) = (1/440)*1000
why must we do deltime (msec) = (samplerate~ / Freq(Hz)) / 1000 instead?
I can't get it... (.. newbie)
-- derek holzer ::: http://www.umatic.nl ---Oblique Strategy # 36: "Consult other sources -promising -unpromising"
On Wed, Feb 16, 2005 at 04:35:09PM +0100, Davide Morelli wrote:
Hi Derek,
Thank you for the explanation, Karplus-Strong gives charimng sounds. But I can't make it resonate at the frequency I want. I made a little testing patch trying to follow your guidelines as much as I could. What's wrong?
I googled a bit and I always found that deltime should be deltime (sec) = 1/Freq(Hz)
example: to get a A440 sound I should deltime (msec) = (1/440)*1000
why must we do deltime (msec) = (samplerate~ / Freq(Hz)) / 1000 instead?
you shouldn't have to do this, you would only need to involve samplerate~ if you were calculating the number of samples in the delay line. but you don't need to, you just give it milliseconds and vd~ sorts out the annoying stuff internally.
the 1000/freq function you found should work as it gives you the wavelength (in msecs) of the given frequency.
of course i haven't looked at the patch, i'm just shooting first and asking questions later ;)
pix.
Hey Pix!
pix wrote:
why must we do deltime (msec) = (samplerate~ / Freq(Hz)) / 1000 instead?
Again, my oops, it was: deltime (msec) = (samplerate~ / Freq in Hz) / (samplerate~ / 1000)
you shouldn't have to do this, you would only need to involve samplerate~ if you were calculating the number of samples in the delay line. but you don't need to, you just give it milliseconds and vd~ sorts out the annoying stuff internally.
This assumes a sampling rate of 44100, however. Have a look at my last mail, where I revised the algorithm. I've used my patch at 44100, 48000 and 96000 Hz sampling rates and gotten consistant results, but I don't think that Davide's method would hold up outside the 44100 Hz range. But hey, I'm no Miller S. Puckette ;-)
d.
On Wed, Feb 16, 2005 at 06:25:15PM +0100, derek holzer wrote:
Hey Pix!
pix wrote:
why must we do deltime (msec) = (samplerate~ / Freq(Hz)) / 1000 instead?
Again, my oops, it was: deltime (msec) = (samplerate~ / Freq in Hz) / (samplerate~ / 1000)
you shouldn't have to do this, you would only need to involve samplerate~ if you were calculating the number of samples in the delay line. but you don't need to, you just give it milliseconds and vd~ sorts out the annoying stuff internally.
This assumes a sampling rate of 44100, however. Have a look at my last mail, where I revised the algorithm. I've used my patch at 44100, 48000 and 96000 Hz sampling rates and gotten consistant results, but I don't think that Davide's method would hold up outside the 44100 Hz range. But hey, I'm no Miller S. Puckette ;-)
(samplerate / freq) / (samplerate / 1000)
= (samplerate / freq) * (1000 / samplerate)
= (samplerate * 1000) / (freq * samplerate)
// (the two samplerates cancel)
= 1000 / freq
that's why it works on different samplerates.
the reason you might see karplus strong algorithms mentioning the samplerate is because all of the implementations i have seen actually use a table which is filled with noise to simulate a pluck. the table is then progressively smoothed while it is being played.
in that case, you need to know the samplerate to work out the size of the table. but with a delay line, you are just talking about length in terms of milliseconds, and it is up to the vd~ or delread~ object to work out the "physical" length of the buffer that it uses.
pix.
Hi again,
pix wrote:
(samplerate / freq) / (samplerate / 1000)
= (samplerate / freq) * (1000 / samplerate)
= (samplerate * 1000) / (freq * samplerate)
// (the two samplerates cancel)
= 1000 / freq
that's why it works on different samplerates.
Indeed, I stand corrected! That's what I get for having all the Asian-American kids do my math homework for me back in school!
It's funny, because I made that comb filter patch for myself about 6 months ago, and now I found myself trying to remember how I actually arrived at this method when I have to explain it to someone else. Good learning experience!
d.
If you really wanna see the math, or at least two different versions that involve using sampling rate, see here:
http://www-ccrma.stanford.edu/~serafin/320/assign5/Implementing_basic_Karplu...
and here:
http://www.sfu.ca/~truax/reson.html
derek
pix wrote:
On Wed, Feb 16, 2005 at 04:35:09PM +0100, Davide Morelli wrote:
why must we do deltime (msec) = (samplerate~ / Freq(Hz)) / 1000 instead?
you shouldn't have to do this, you would only need to involve samplerate~ if you were calculating the number of samples in the delay line. but you don't need to, you just give it milliseconds and vd~ sorts out the annoying stuff internally.
the 1000/freq function you found should work as it gives you the wavelength (in msecs) of the given frequency.
In case any of y'all is interested, I made a GOP version of the example Derek posted earlier. It works very nicely for me, but no guarantees.
Cheers, ian
derek holzer wrote:
If you really wanna see the math, or at least two different versions that involve using sampling rate, see here:
http://www-ccrma.stanford.edu/~serafin/320/assign5/Implementing_basic_Karplu...
and here:
http://www.sfu.ca/~truax/reson.html
derek
pix wrote:
On Wed, Feb 16, 2005 at 04:35:09PM +0100, Davide Morelli wrote:
why must we do deltime (msec) = (samplerate~ / Freq(Hz)) / 1000 instead?
you shouldn't have to do this, you would only need to involve samplerate~ if you were calculating the number of samples in the delay line. but you don't need to, you just give it milliseconds and vd~ sorts out the annoying stuff internally.
the 1000/freq function you found should work as it gives you the wavelength (in msecs) of the given frequency.
Hi,
I recently used the principles shown here by Derek Holzer in a live performance, a lecture of the 6th book of the Odissea (Nausicaa) mp3 excerpt available at http://www.davidemorelli.it/04/odissea.mp3 sources: https://puredata.info/Members/dmorelli/patches/
Thank you Derek.
davide.
-----Messaggio originale----- Da: pd-list-admin@iem.at [mailto:pd-list-admin@iem.at]Per conto di derek holzer Inviato: martedì 15 febbraio 2005 17.48 A: pun chik Cc: PD-List Oggetto: [PD] resonant comb filter series
A comb filter is simply a very short delay with a high amount of feedback. It is so short that it's length becomes an oscillating waveform. Try making a simple [delwrite~ delayname] and a [vd~ delayname]. Now make a feedback loop by connecting the [vd~ delayname] back into the [delwrite~ delayname], and multiply this by a number less than 1. Something between .9 and .99 will give you a good ringing sound. The output of the [vd~ delayname] also gets sent out to the [adc~] for you to hear.
Divide the samplerate by the frequency you want the comb filter to resonate at, then divide by 1000 to get the delay length to send to the [vd~ delayname]. It would be good to put your [delwrite~] and [vd~] objects in a subpatch with a [block~ 1] object, which sets the blocksize to 1 and allows for the shortest possible delay times [which in turn gives you the highest possible resonant frequencies].
To make a resonant series, make multiple instances of this [as abstractions, don't forget to use $0 in the "delayname"!], and send the base frequency to the first comb filter abstraction, and multiplications or divisions of that to subsequent "harmonic" subpatches. Integers [2,3,4...] will produce clean harmonics, while other numbers [.98, 1.34, 2.22...] will be detuned to various degrees, resulting in an acoustic "beating" phenomenon as waveforms amplify and cancel each other out.
The same audio input is sent to all the comb filters. Sharp, percussive sounds will "ring" the filters, giving you a plucked-string kind of sound. Continuous sounds give something like a guitar or sitar type of drone. Try changing the multipliers of the "harmonic" filters for different drone or tonal effects.
All in all, I find it is much better for people to understand the principles of how these things work, so building your own will be great practice! Google for "karplus-strong" for more technical/mathmatical info.
Good luck, derek