Real time convolution

Jul 21, 2009 at 5:22am

Real time convolution

Hello, I am a beginner to Max/Msp.

I have a problem of convolving an impulse response (2 seconds long) with a music sample (16 seconds long). In the attached patch, I opened an impulse response on the left sfplay~ object and the music sample is opened in the right sfplay~ object. The problem is that I cannot convolve the whole music sample with the whole impulse response. In other words, the music sample is convolved with the impulse response only for 2 seconds (which is the length of the impulse response) every time I press the text message ’1′ connected to the left sfplay~ object.

I suspect using buffer object might help, however I do not know if it is useful. If so, please help me how to do.

Another question is how long it will be taken for the convolution of an impulse response with 18 seconds music sample. The sampling rate used for the music is 44.1 kHz, 16 bit. The reason I concern about this is that the impulse response has to be replaced to another impulse response instantly. So i hope the time is not longer than 0.5 second.

Thanks in advance.

#44811
Jul 21, 2009 at 7:35pm

when you call it “impulse response” it seems that you
are going to build a deconvolution reverb.

using fft/pfft and convolving 2 channels volumes is
not how deconvolution reverbs work.

it will need too much CPU to build something like that in
maxmsp as you can not optimise the process good enough
(compared to C language stuff) but there is a third party
external which can do it.

the best way to find it is searching for “convolution”
on maxobjects.com:

http://www.maxobjects.com/?request=convolution&operateur=AND&id_format=0&id_plateforme=0

-110

#161299
Jul 22, 2009 at 5:12am

Thanks Roman Thilenius for your prompt reply.

What I want to do is to convolve reverb, not to deconvolve reverb.

I did download tconvolve object from the website you provided. However I do not know how to use. Could anyone please provide me a simple guide?

#161300
Jul 23, 2009 at 11:45am
Roman Thilenius wrote on Tue, 21 July 2009 13:35
when you call it “impulse response” it seems that you
are going to build a deconvolution reverb.

using fft/pfft and convolving 2 channels volumes is
not how deconvolution reverbs work.

it will need too much CPU to build something like that in
maxmsp as you can not optimise the process good enough
(compared to C language stuff) but there is a third party
external which can do it.

the best way to find it is searching for “convolution”
on maxobjects.com:

http://www.maxobjects.com/?request=convolution&operateur=AND&id_format=0&id_plateforme=0

-110

Do you know how much CPU?
I have a quadcore 2,53ghz processor, will this struggle you think?

#161301
Jul 23, 2009 at 12:06pm

I do not know. I have 2.2 GHz core 2 duo.

I have another problem of using tconvolution vst. In order to use this plug-in, I need pluggo installed in Max/msp. However the pluggo is no longer available for max/msp, of which version higher than 5.0.

So another option for the convolution reverb would be SIR vst. The version 1 (SIR1) is free however the version 2 (SIR2) is USD$189. And only the version 2 is compatible with mac.

Anyone knows a good convolution reverb vst plug-in, which is complementary and compatible with mac?

#161302
Jul 23, 2009 at 6:07pm
marlon brando wrote on Thu, 23 July 2009 13:45
Do you know how much CPU?
I have a quadcore 2,53ghz processor, will this struggle you think?

i am a motu customer since day 1.

#161303
Jul 23, 2009 at 6:11pm
honeysyd wrote on Thu, 23 July 2009 14:06
I do not know. I have 2.2 GHz core 2 duo.

you will know by trying it out.

but i think marlon brando was talking about the tconvolution~
OBJECT rather than the plug-in.

try the object in max – its pretty cool.
yet not as effective as commercial products.

#161304
Jul 24, 2009 at 7:36pm

Does TconvolutionUB~ support only the sampling rate of 44.1 kHz?

I have an impulse response and a music segment sampled at 48 kHz. However the output of the TconvolutionUB has the sampling rate of 48 kHz, although those files are opened in Max/MSP with the sampling rate of 44.1 kHz.

Is there a method to convolve them with the sampling rate of 48 kHz??

I have attached three waveforms resulting from three different convolution method: (1) Aurora plugin in Adobe Audition; (2) Tconvolution object in Max/MSP; and (3) SIR2 VST plugin opened with vst~ object in Max/Msp. As seen in the attached, the three methods show substantially different waveform profiles, although slightly different gain adjustment is taken into account.

Another question is why my CPU usage gets high when I open the patch having TconvolutionUB~, even while I do not run any convolution calculations.

Thanks Roman Thilenius for your very useful answer.

#161305
Jul 24, 2009 at 9:38pm
honeysyd wrote on Fri, 24 July 2009 21:36
Is there a method to convolve them with the sampling rate of 48 kHz??

by converting the files before using them or by setting
your hardware to 48 khz. the loss of quality, if any, is
the same. when we are taking into account that you eventually
will go back to 44.1 at a point.

Quote:
Another question is why my CPU usage gets high when I open the patch having TconvolutionUB~, even while I do not run any convolution calculations.

i assume it runs all the time, like al msp objects do.

in case it does not support turning it off by a message
you might want to look into the helpfiles for [begin~] or
[poly~].

-110

.

#161306
Jul 25, 2009 at 4:49am
Roman Thilenius wrote on Fri, 24 July 2009 15:38
by converting the files before using them or by setting
your hardware to 48 khz. the loss of quality, if any, is
the same. when we are taking into account that you eventually
will go back to 44.1 at a point.

The impulse response and the music were sampled at 48 kHz already. Would you suspect that the inconsistent sampling rate between the three methods causes the different profile of convolved sound waveforms?

I have attached the patch I used. Please have a look.

#161307

You must be logged in to reply to this topic.