[PD] About nbx and "inf" ( was Re: no more Nan display in Pd, why?)

Alexandre Torres Porres porres at gmail.com
Thu May 19 21:21:54 CEST 2016

So, I've been checking about nbx and infinite values... I can see you
intentionally had nbx to clip at a certain range of values by default, more
specifically, we see in the line 760 of g_numbox.c double min=-1.0e+37, max=

I think this should default to inf or -inf, but I see there's an issue that
prevents us from being able to set it in the GUI interface.

The difference with the atom box is that if you have a range from 0-0 it
doesn't clip, and it can go up to inf or -inf... but with nbx, a range of
0-0 clips it in this single value of 0... and since it does not understand
if you type "-inf" or "inf" as an actual infinite float, we're pretty much
tied up in setting this via the interface.

Nonetheless, it is possible to set the nbx to accept -inf or inf via a
patch that sends a range message. I have this example attached.

Funny thing is that if you now open the properties you can see "-inf" and
"inf" set as the range. But if you save the properties with those, it
doesn't understand it and things get ruined again even if you have made
this workaround :P

So this proves it it not a code or restriction from the object, but from
the interface.

I personally like very much being able to print "inf" in a fancy number GUI
box, so I think this is something that needs to be fixed, but how?

do you have any thoughts?


- Have it not clip at all if you set the range values from 0-0 as in the
atom number box.
- Make it understand "-inf" and "inf"
- create a check button for "none" for both lower and upper range, so it
has no restriction

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20160519/a1fc25d1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nbx-inf.pd
Type: application/octet-stream
Size: 762 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20160519/a1fc25d1/attachment.obj>

More information about the Pd-list mailing list