how to do an Recursive Comb Filter

   14482   22   1
User Avatar
Member
537 posts
Joined: Dec. 2005
Offline
Just thought I'd ask in case anyone has attempted it before in CHOPs.

I'm looking at two methods of making realistic distance spatial audio recording. One would be to use a blend of dry-sound-samples and full-reverb-sound-samples and blend that value together based on distance.

This method would be much easier but would require an external application and wouldn't be adjustable.

The next method would be to attempt an

Recursive Comb Filter (IIR)
http://www.gersic.com/dspwiki/index.php?title=Reverberation [gersic.com]

But I'm not sure where to start on this or if there would be a better DSP for CHOPs. Any ideas?
User Avatar
Staff
2591 posts
Joined: July 2005
Offline
andrewlowell
Just thought I'd ask in case anyone has attempted it before in CHOPs.

I'm looking at two methods of making realistic distance spatial audio recording. One would be to use a blend of dry-sound-samples and full-reverb-sound-samples and blend that value together based on distance.

This method would be much easier but would require an external application and wouldn't be adjustable.

The next method would be to attempt an

Recursive Comb Filter (IIR)
http://www.gersic.com/dspwiki/index.php?title=Reverberation [gersic.com]

But I'm not sure where to start on this or if there would be a better DSP for CHOPs. Any ideas?

I don't think there are any IIR functions available in CHOPs (though I might be wrong). But you might be able to implement an FIR with the existing tools (like the delay CHOP).

http://www.dspguru.com/info/faqs/firfaq.htm [dspguru.com]

Disclaimer: it's been a very long time since I've looked at digital filter design, so I might not have a clue.
User Avatar
Member
537 posts
Joined: Dec. 2005
Offline
actually I found this method, maybe it will work … I'm going to try it out when I get back to Houdini

n the current sample number
y the output (the filtered sound)
x the input (the source sound)
y(n) the n-th output sample
x(n) the n-th input sample
sr the sampling rate
D = delay samples
g = gain

y(n) = x(n-D) + g*y(n-D)

so with expression chop
oc = ic(0,$C,$I-Delay) + gainless*oc($C,$I-Delay)
Edited by - Sept. 21, 2007 18:18:19
User Avatar
Member
537 posts
Joined: Dec. 2005
Offline
wow, I love it when things work on the first try! works perfectly, thats a reverb … sweet

Ok, now to make a more complex reverb
User Avatar
Member
398 posts
Joined: July 2005
Offline
Hey Andrew,
Make some fancy demos with sound please! There are lots of FX demos made in Houdini but almost nothing concerning sound. Would be great to see/hear
f = conserve . diffuse . advect . add

fx td @ the mill
User Avatar
Member
537 posts
Joined: Dec. 2005
Offline
actually I was trying to figure this out for a houdini-sound-midi book I'm 2/3 done with. I'd love for you to look it over for suggestions / critique, please send me an email

andrew@andrew-lowell-productions.com
User Avatar
Member
454 posts
Joined: July 2005
Offline
Wow - reverb design in CHOPs! Good luck getting nice reverbs out of comb filters!! There's a bit of work there…

Have you tried any convolution techniques? If you can record an impulse response from a room, by firing off a white noise source in the room, record the response, trim off the impulse, and then convolve that sound with your audio you'll get some really nice reverb results. You can't animate the length of the reverb (which is why I never used it for “Pan”) but it gives you really sweet reverbs straight off the bat. You're better off doing convolution in the fourier domain of course. The Spectrum CHOP will do that conversion for you.

Good Luck!

Cheers
User Avatar
Member
537 posts
Joined: Dec. 2005
Offline
Do you know of any good references on how to do these types of reverbs? While I went to school for audio engineering I never learned or was taught this stuff :cry:

Lots of great reverbs exist .. but not for Houdini

conserning IIR's I did get the Manfred Schroeder reverb type to work pretty well, maybe for special effects, but I'm unclear on exactly what the “all-pass” is doing

http://www.gersic.com/dspwiki/index.php?title=Reverberation [gersic.com]

It's parameters are pretty easily controllable with other chops curves but the quality is still pretty inferior or rather, unnatural compaired to common audio applications like Nuendo.

Any advice would be great!
Edited by - Sept. 24, 2007 12:49:43
User Avatar
Member
454 posts
Joined: July 2005
Offline
Hi,

Convolution is what a lot of phase vocoding uses. With reverb though you are phase vocoding with a room response to colorize your audio.

While there's some pretty deep math behind vocoding, in Houdini you can basically take two sounds, feed them into 2 different spectrum CHOPs and then multiply the magnitude channels together. If you want to get creative you can run other filters over magnitude channels. (Filter ChOP - despike, gaussian etc)

To save you having to record romo responses yourself, you can download some off the web. It's a big (but wonderful) area, and here's some things that you might find useful:

http://www.mts.net/~mathers/q1_fft.html [mts.net]
http://emusician.com/convolution_number_nine/ [emusician.com]
http://emusician.com/tutorials/emusic_acting_impulse/ [emusician.com]
http://cnx.org/content/m13192/latest/ [cnx.org]
http://en.wikipedia.org/wiki/Impulse_response [en.wikipedia.org]
http://en.wikipedia.org/wiki/Convolution_reverb [en.wikipedia.org]
http://www.ludd.luth.se/~torger/brutefir.html#whatis [ludd.luth.se]
http://alumni.media.mit.edu/~westner/papers/ica99/node2.html [alumni.media.mit.edu]
http://ccrma.stanford.edu/~jos/mdft/ [ccrma.stanford.edu]
http://2pi.us/fconv.html [2pi.us]

Enjoy!
User Avatar
Member
537 posts
Joined: Dec. 2005
Offline
thanks this stuff looks very useful!

Conserning room responses … I'm guessing I could set up a system that would color white noise based on the distance and color of objects in the scene …. or a virtual room response … to do reverb like it was actually in the scene.

Thats not quite a project for this month, but might be six months down the road.
User Avatar
Member
7722 posts
Joined: July 2005
Online
Hmm … I'm not sure, but does the SpatialAudio CHOP and its Microphone/Sound object cousins help?
User Avatar
Member
537 posts
Joined: Dec. 2005
Offline
well think I'm getting it to work very nicely with convolution. I'm using a pretty inneficient method right now that I'll post later for suggestions, basically when I hit one piano note, all the piano notes sound in the reverb because it's using all the combined frequencies.

I can break this up into little bits which sounds much better but that waists audioXextrachannels of memory, almost unusable for anything but experiments. With atonal things it's fine of course.

In terms of spacial audio, it will be extremely useful for mixing in different reverbs and appropriate delays, but I need a good reverb first to play through the speakers/sound objects.

I kind of feel like I'm re-inventing the wheel with this (not that I'm oppsed to learning how to make my own reverbs, very cool, but ..)

I'm wondering if enough interest is generated … how hard it would be for SESI to implement a “LADSPA” CHOP. It's my understanding that those plugins don't use interfaces, so Houdini could simply populate whatever channels are needed with floats, and be able to automate them just like the EQ chops etc. There's tons of great plugins I'm sure.
Edited by - Sept. 25, 2007 01:11:24
User Avatar
Member
537 posts
Joined: Dec. 2005
Offline
ok here's the issue … wondering if anyone has any ideas. Basically, is there any way I can animate the frequency instead of using the whole file at once? Maybe there is a way to blend chunks of some sort or do it with a raw equasion.

I have the working way and the non-working way to compare. The good way takes lots longer and might crash a few machines, It hasn't crashed my system yet, I have 4-g's of memory … but I'm only using a few notes, it would surely crash with more.

Attachments:
chopReverbDesignTest.zip (750.2 KB)

User Avatar
Member
454 posts
Joined: July 2005
Offline
Hiya,

I had a quick look - interesting - but which frequency do you want to animate? A lot of the pass filters will read input channels that match internal parm names.

I think CHOPs are interesting for audio synthesis of short sounds, but I personally ended up using CHOPs to only create control rate channels - ie 100Hz and used those control channels in an external audio synthesis engine for all audio rate stuff. (Csound). Ram remains a big issue with CHOPs for audio sample rate projects.

Cheers
User Avatar
Member
537 posts
Joined: Dec. 2005
Offline
Thanks for having a look/listen. Currently in order to get a different coloration of the noise I'm separating it into channels and applying the reverbs separately … then adding them together again.

Even if memory is a huge issue with this approach I'm sure this isn't how audio programs do it. When I apply a single convolution filter than all the notes filter the noise at once producing a very artificial all-note sound … because it's using their combined frequencies.

I'm hoping there is a way to fade and reverberate only the frequencies that are most recently sounded, in a similar way to an IIR etc, actually I have an idea that I'll try out later, it might be possible to cut it into chunks for convolution, and then apply a comb to those, but I'm hoping there is a more elegant way.

Yes I know memory is a huge issue with CHOPs but I'm thinking long-term. When I was getting into computer music my PC couldn't really play back an audio track WITH an audio program. Houdini does much better than my first system could, so there isn't any reason why I'd think in 3-4 years Houdini won't be an excellent audio program on a 32 or 64 gig workstation. In the short term I'm still thinking about a lot of single-shot music and effect possibilities.
User Avatar
Member
454 posts
Joined: July 2005
Offline
I've pretty much told you the important things that I know about reverb, and am pretty pressed for time here at present. If you can read Csound, and have the Csound book, there are a number of reverb algorithms in that book that can be adapted to CHOPs. That's all I can suggest at this point besides various computer music books.

Houdini does have some amazing synthesis possibilities - especially in conjunction with animation. I used Houdini synthesised sounds a fair bit back in the day when I was doing this kind of stuff. In the last part of Heisenberg, that bell sound that repeats with different timbres is generated by a spectral resynthesis of a sound in CHOPs using a Copy CHOP to stamp new envelope values up into a filter CHOP that processed the magnitude channel. You can do granular synthesis and other weird FM and additive synth patches as well. Theres some fun to be had, but knowing a bit about audio DSP helps. I wish I'd known more back then…

Good Luck!!

Cheers
User Avatar
Member
537 posts
Joined: Dec. 2005
Offline
well, with the comb and the convolution I think I have enough to accomplish my origional objective … thanks very much for letting me know about that. It's something that you can go though years of audio school and never actually realise what's going on behind the scenes … very cool.

Yeah of course I'm trying to do this for the purposes of synthesis-to-animation, or animation-to-synthesis. Otherwise I'd be using an audio program that had reverb in it

I do think it would be awsome if Houdini could support LADSPA
User Avatar
Member
537 posts
Joined: Dec. 2005
Offline
hoknamahn
Hey Andrew,
Make some fancy demos with sound please! There are lots of FX demos made in Houdini but almost nothing concerning sound. Would be great to see/hear

Got the reverb to work, the reverb mix increases with the distance from the spatial system (which is a child of the camera). It could be improved greatly with a Python CHOP definition, this is really more of a mix-stamping effect.

Everything is generated in Houdini with a simple piano scale.

The particles are colored based on distance attenuation (red is full vol, white is no vol) … and stereo pan (green is right, blue is left)

http://www.andrew-lowell-productions.com/andrew-lowell-productions/download/01_particle_spatial_audio.mov [andrew-lowell-productions.com]
User Avatar
Member
454 posts
Joined: July 2005
Offline
HAH!!!

I can't tell you what that did in my head!!! It took me back to a wonderful wonderful place.

Good work - can't wait to see more…

Cheers
User Avatar
Member
537 posts
Joined: Dec. 2005
Offline
Thanks! Here's another …

http://www.andrew-lowell-productions.com/andrew-lowell-productions/download/01_proceduralSoundDesign.mov [andrew-lowell-productions.com]

For the ambience this one uses four sound objects, one of each side of the tray which play full wet mixes. The direct sound comes from the marbles.

But, My point with this one is to show an example that would have been much harder in a mainstream audio program than in Houdini.

There's hundreds of different collisions here, and different types of collisions, all of different volumes.

Without procedural audio it would have been a real pain to line up all those different audio clips, pan envelopes for each marble, volume envelopes etc. Let's just say the audio was much quicker to set up and also to render than the visuals.

I had to do something similar for the sound-design for a typewriter of an indi-film. Huge pain
  • Quick Links