Hello all,
I'm working to add some amplitude+phase correction to my room and using convolution to apply the filter, and have a question about how to avoid clipping during the convolution step. Is there any way to create a filter which cannot clip during the convolution step? I'll try to give some more info below (and info on an experiment I'm trying out to avoid clipping):
The background is I'm measuring my room response (n.b. using REW), creating filters to flatten the response (n.b. using Rephase to create FIR filters), and applying the filter in my convolution software (n.b. CamillaDSP), before hitting my recording IF and speakers. Sometimes I get clipping reported by the convolution software when I play some tracks or boost the track level, and am trying to understand how to avoid this entirely. I know there are many ways to clip in the signal chain, but I really just want to dial in the convolution stage to narrow the focus a bit. There's a lot of info online, which I'm reading but still digesting, but the basic approach I've found is to a) reduce the level of my input or b) create a filter which also lowers the output. I really like b), the idea being to create a filter which never clips for any input, rather than risk clipping depending on the input level or track. Do you have any ideas how to set the filter level so clipping cannot occur at convolution time? So far, in Rephase I can lower the 'Output Settings' fader then regenerate my filter, and this helps, but I don't know which level can *always* prevent clipping. If you have any info/tips/tricks on this point, it'd be very helpful!
I've also done some Googling, and think I saw some info which may help prevent convolution clipping. I'll share the info here, but am still experimenting with it and don't know enough to vouch for it. If anyone knows if the approach is correct or not, I'd really love to hear it. Basically, if I export my filter as a .csv file from Rephase, import into Excel/Sheet, convert all values to absolute values using ABS(), then add them all up into a single total using SUM(), then I get a total. I think I'm reading that as long as the total is <=1 there can never be clipping during convolution for any input. If the total is something >1, then I believe I can just lower my 'Output Settings' fader in Rephase and regenerate the filter until I get a <=1 value. I'll put the link below, where I'm seeing a comment about the math and how convolution clipping could be avoided by the above approach. But, does this pass muster at all? Would love to know any thoughts on whether the math checks out (or if there's another way to get any 'no convolution clipping' guarantee.
Reference:
See "Reply by kaz●November 21, 2018". I think if "sum(abs(coeffs))" <= 1, then the max output is never boosted and cannot clip. This is essentially the motivator for the Excel/Sheets procedure above.
Thanks very much for your comments and advice.
Best regards,
Shaun
I'm working to add some amplitude+phase correction to my room and using convolution to apply the filter, and have a question about how to avoid clipping during the convolution step. Is there any way to create a filter which cannot clip during the convolution step? I'll try to give some more info below (and info on an experiment I'm trying out to avoid clipping):
The background is I'm measuring my room response (n.b. using REW), creating filters to flatten the response (n.b. using Rephase to create FIR filters), and applying the filter in my convolution software (n.b. CamillaDSP), before hitting my recording IF and speakers. Sometimes I get clipping reported by the convolution software when I play some tracks or boost the track level, and am trying to understand how to avoid this entirely. I know there are many ways to clip in the signal chain, but I really just want to dial in the convolution stage to narrow the focus a bit. There's a lot of info online, which I'm reading but still digesting, but the basic approach I've found is to a) reduce the level of my input or b) create a filter which also lowers the output. I really like b), the idea being to create a filter which never clips for any input, rather than risk clipping depending on the input level or track. Do you have any ideas how to set the filter level so clipping cannot occur at convolution time? So far, in Rephase I can lower the 'Output Settings' fader then regenerate my filter, and this helps, but I don't know which level can *always* prevent clipping. If you have any info/tips/tricks on this point, it'd be very helpful!
I've also done some Googling, and think I saw some info which may help prevent convolution clipping. I'll share the info here, but am still experimenting with it and don't know enough to vouch for it. If anyone knows if the approach is correct or not, I'd really love to hear it. Basically, if I export my filter as a .csv file from Rephase, import into Excel/Sheet, convert all values to absolute values using ABS(), then add them all up into a single total using SUM(), then I get a total. I think I'm reading that as long as the total is <=1 there can never be clipping during convolution for any input. If the total is something >1, then I believe I can just lower my 'Output Settings' fader in Rephase and regenerate the filter until I get a <=1 value. I'll put the link below, where I'm seeing a comment about the math and how convolution clipping could be avoided by the above approach. But, does this pass muster at all? Would love to know any thoughts on whether the math checks out (or if there's another way to get any 'no convolution clipping' guarantee.
Reference:
Is there a way to mathematically prove whether the convolution of a digital signal will lead to digital clipping?
Hello, I had a question regarding the convolution of digital signals. Assuming the following digital signal: [2_2826.png] ...is convolved by the...
www.dsprelated.com
Thanks very much for your comments and advice.
Best regards,
Shaun