COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :

Go Back   Cockos Incorporated Forums > Other Software Discussion > WDL users forum

Reply
 
Thread Tools Display Modes
Old 07-05-2019, 05:24 AM   #1
skoleyuno
Human being with feelings
 
Join Date: Jul 2019
Posts: 2
Default Changing Impulse during runtime: Convolution

Hi

I am building a plugin that uses the convoengine to load impulses in realtime, however, whenever I load a new impulse there is an audible click. I suspect this either has something to do with the fact that the engine is reinitialised whenever SetImpulse is called, and this causes some latency or I have a some kind of smoothing issue whenever I change impulses.

Does anyone know of a solution?

Thanks
skoleyuno is offline   Reply With Quote
Old 07-06-2019, 01:38 AM   #2
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
Default

Well, it depends what the cause of the click is... You could run 2 convolution engines, and crossfade between them. This should fix pops/clicks caused by the instantaneous change from one IR to another.

However, pops/clicks could also be caused by audio drop-outs. When you set a new impulse the engine needs to take the FFT of the IR, and this can take a lot of time. Also, it might do some memory reallocations, which could also interfere with the audio thread. To prevent all this I guess you could set the new impulse in another thread, wait until it's ready, and then crossfade.
Tale is online now   Reply With Quote
Old 07-09-2019, 08:31 PM   #3
sstillwell
Human being with feelings
 
Join Date: Jul 2006
Location: Cowtown
Posts: 1,562
Default

Or due to the impulse being loaded while a buffer is being convolved. Loading the impulse is not an atomic action, so unless you're guarding with some sort of lock you could be convolving with some random percentage of new impulse + remainder of old impulse.

Of course, locking access to the impulse has its own set of problems...including dropped buffers like was mentioned earlier.

Or, maybe it's late in the day and I'm tired and I'm totally off base.
__________________
https://www.stillwellaudio.com/
sstillwell is offline   Reply With Quote
Old 07-18-2019, 05:51 PM   #4
skoleyuno
Human being with feelings
 
Join Date: Jul 2019
Posts: 2
Default Resolution

Hi Tale & sstillwell

Thank you for your suggestions.

It turned out that the pops were being caused by silence which was indeed being introduced by processing delays and buffers clearing during IR switches. I ended up following Tale's advice and used two engines which were processed in parrallel (one feeding the output buffer and another in a copy of the output buffer). The buffers were then alternately applied to the output using an arbitrary processing counter (4 counts). This seemed to provide a good compromise to reduce the pops.

I haven't applied a crossfade yet, however, hopefully it should smooth out the remaining pops due to silence.

Cheers
skoleyuno is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:12 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.