[PD] why does PD round numbers? (in tables, in messageboxes, etc)
Martin Peach
martin.peach at sympatico.ca
Mon Apr 9 17:34:47 CEST 2012
On 2012-04-09 07:31, IOhannes m zmölnig wrote:
> On 04/09/12 12:39, katja wrote:
>>
>> Doing it better would require a lot of modifications, more than
>> changing some format specifiers. It's a pity we can't see MaxMsp's
>> code, the issues seem to be neatly solved there, like:
>>
>
> i haven't looked at the actual behaviour, but max has a (default) binary
> forma, where it can store numbers without precision loss.
>
> this is of course way easier to implement than trying to save numbers at
> a "reasonable2 precision in a textfile.
>
Here is part of a Max5 patch, a multiply object:
"box" : {
"maxclass" : "newobj",
"text" : "* -57.29578",
"numoutlets" : 1,
"fontname" : "Arial",
"outlettype" : [ "float" ],
"id" : "obj-19",
"fontsize" : 12.0,
"patching_rect" : [ 294.0, 382.0, 73.0, 20.0 ],
"numinlets" : 2
}
It is stored as a text file in a format not unlike xml. It may be that
floats are stored as doubles inside Max5 but the patcher is saved as text.
Martin
More information about the Pd-list
mailing list