[PD-dev] [ pure-data-Bugs-3599847 ] freeverb~ can't handle inf, NaN and subnormals

SourceForge.net noreply at sourceforge.net
Tue Jan 8 00:03:40 CET 2013


Bugs item #3599847, was opened at 2013-01-07 15:03
Message generated for change (Tracker Item Submitted) made by katjav
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=478070&aid=3599847&group_id=55736

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: externals
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Katja  (katjav)
Assigned to: Nobody/Anonymous (nobody)
Summary: freeverb~ can't handle inf, NaN and subnormals

Initial Comment:
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.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=478070&aid=3599847&group_id=55736



More information about the Pd-dev mailing list