I’m quite new to the forum, in fact, this is my first post here. Nevertheless, I already follow the posts already quite some time, and I’ve used the great JUCE framework for some of my hobby projects.
One of them is KlangFalter, which is a free (GPL) audio convolution plugin, which I wrote because I couldn’t find any free Audio Unit convolution plugin, and because I was curious about writing any audio plugin: https://github.com/HiFi-LoFi/KlangFalter
It’s not perfect, but at least it works for me already in Ableton Live.
Furthermore, you can find the following two “sub-parts” of the plugin on Github.
[list]https://github.com/HiFi-LoFi/AudioFFT[/list]
A simple 2-file (.h+.cpp) 1D FFT implementation in C++ using either Ooura FFT or the FFT routines of the Apple Accelerate framework (MIT licensed). I wrote it, because I was looking for a very fast FFT library in C++ without any further dependencies and which does not consist of many files.
[list]https://github.com/HiFi-LoFi/FFTConvolver[/list]
The FFT convolution algorithm used in KlangFalter (GPL licensed). Again, no further dependencies (not even JUCE).
Maybe parts of this stuff is somehow useful for people.
… and sorry for not answering earlier (I was out of town for a couple of days). :oops:
Concerning your questions:
Basically yes, as there’s nothing OS-specific in the code, it shouldn’t be too hard (i.e. as hard resp. easy as porting any JUCE audio plugin). However, I only have a Mac at the moment, so I can’t try it.
I’m not sure about the exact definition of “latency”. However, it immediately outputs the processed result of the passed input samples, so I’d say that it has zero latency (except for the time required for processing the input samples), so there’s no latency of a constant number of samples, for example. Does this help? I thankful for any hint how to determine the exact latency.
Yes, exactly, it’s a partitioned convolution algorithm. Furthermore, there’s a further convolver class (TwoStageFFTConvolver), which works internally with a short-block convolver in the front and a long-block (background thread) convolver in the back for improving the balance between short processing time and CPU load.
[quote=“falkTX”]Do you mind if I import your code into my distrho project? (http://distrho.sourceforge.net/)
That way I can release Linux binaries (with LV2 support).[/quote]
Becoming part of your distrho project would be an honour for me! However, I’d like to do a little more cleanup on the code and testing before releasing it from its “beta” stadium, and at the moment the code is not on the latest and greatest version of JUCE. I hope that I’ll find the time to do this within the next one or two weeks. What about, if I drop you a message as soon as I’m finished with this?
Did you try to apply a correction gain factor of 44.1/96 (or sqrt(44.1/96)) on the output ? I remember I did something like that on a IR loader I have worked on in the past ;)
For me the DC gain of a FIR filter is simply the sum of all the coefficient values, so obviously when you resample an IR, you increase the output volume of a signal convoluted with this IR, since the number of coefficients has increased, and they may all be positive in the worst case.
You may still have a difference after that since the anti-imaging/anti-aliasing filter is not perfect, but a lot lower than 6 dB...
I downloaded the code and set up the project with the Projucer. It compiles, but plugin won’t work in any of the audio programs I’m trying (Logic, Live and Audacity). The project generates both ‘.vst’ and a ‘.a’ files.