I’m loading different IR’s for a simple amp sim from BinaryData and everything works perfectly.
However, the issue comes when I try using a DryWetMixer to mix both signals since there is some latency being introduced by the IR (which is different depending on the IR I use) and mixing the signal introduces phasing.
I can’t figure out a way to properly calculate that latency, any ideas?
Note: I know that Convolution has a “getLatency()” function but that’s for the actual convolution engine and not the IR.
One option is to run the plugin 100% wet inside PluginDoctor, and look at the Impulse Response tab. This will run a Dirac Delta Function through it. If the output is another Dirac Delta delayed by N samples, there’s your answer.
If the IR has non-integer latency or the output isn’t concentrated at a specific point in time, it’s more complicated. A backup option would be to put a variable delay on the dry signal path, and hand-tune it (probably to within 0.01 samples ballpark) until you get a flat response in PluginDoctor’s Frequency Response view at 50% dry/wet. In this scenario, make sure your subsample delay algorithm itself has a flat frequency response.