[nan] values from average~?

Apr 12, 2009 at 4:02am

[nan] values from average~?

Hi, I am getting a nan signal from average~ when the signal I am sending it is 0. My arguments are [average~ 1000 rms]. The signal I’m sending it is a kick synth I have built, nothing strange or unusual, but whenever it’s not playing average~ gives nan. Why might this be happening?

#43328
Apr 12, 2009 at 1:52pm

First question: is the average~ object getting zeros or just numbers very, very close to zero?

In the former case, average~ should just spit out zero. I can’t duplicate your results (a test patch might help), but I can imagine exotic circumstances where squaring (the ‘s’ in rms) values very close to zero could result in denormalized interim results. And trying to take the square root of a denormal might NaN (ie, generate a machine result that is ‘not a number’… that’s like dividing by zero, only worse). But I’m not convinced that’s what’s happening.

Test patch, Max version, and platform will probably be needed to get any further then maybes.

#155404

You must be logged in to reply to this topic.