Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#1011 freeverb~ can't handle inf, NaN and subnormals

open
nobody
externals (233)
5
2013-01-07
2013-01-07
Katja
No

This is about Pd-E 0.42 / 0.43 on Intel

Although freeverb~.c has many calls to function fix_denorm_nan_float(), the object can't handle inf, NaN or subnormal numbers. If it gets an inf or NaN accidentally, the only way to recover from recycling NaN's is to reload the containing patch. If normal sound input is stopped, values in the delay lines gradually decay into the range of subnormal numbers, and CPU load increases dramatically.

Function fix_denorm_nan_float() doesn't really fix anything, it only returns the input value if it's good or zero if the input is bad. But the return value is nowhere stored. Probably, the function calls aren't even compiled at all for that reason, making [freeverb~] so efficient. SVN shows that the function was introduced in 2007, incorrectly replacing a type punning macro in the original freeverb~.c for Pd/MaxMsp.

All together, 40 such calls are intended per iteration of the perform loop, with 3 conditional checks each. If this would be really implemented, my estimation is that it would make [freeverb~] 1.5 or 2 times more expensive. It would be overkill. For all mentioned issues there are cheap and effective workarounds which can even be implemented in a Pd patch. Attached patch freeverb~-test.pd demonstrates bugs and workarounds. One day, [freeverb~] may be rewritten in this sense.

Discussion

  • Thanks for the thorough bug report :) If you are up for fixing it, go ahead and commit directly to trunk.

     
  • Katja
    Katja
    2013-01-08

    Yes the ports are by the same author but the original sources come from different authors and have very different methods. Both have their pro's and cons, I'm trying if it is possible to combine aspects and get a better reverb. As a side effect I could fix freeverb~ and port gigaverb~, but my focus is now on experiments and tests with the constituent elements (diffusors, comb filters, fdn).

     


Anonymous


Cancel   Add attachments