[PD] Workarounds for number truncation >6 digits?

Mathieu Bouchard matju at artengine.ca
Wed Feb 25 23:48:56 CET 2009

On Wed, 25 Feb 2009, Hans-Christoph Steiner wrote:

> I forgot to add, ideally we could fix the GUI stripping things down to 6 
> digits.  Anyone have teh documentation on this issue?  I looked around 
> but couldn't find it.  I think IOhannes outlined it at one point.

It's hidden deep inside. You'd think it were in some obvious place like 
gatom_redraw in g_text.c. but this only calls glist_retext in g_graph.c. 
this in turn only calls rtext_retext in g_rtext.c. So you can see it does 
something about reducing width of numbers if they are too wide, but they 
don't decide the original width. They actually use the result from 
binbuf_gettext, which is in m_binbuf.c. But it is not doing that job, it's 
delegating it to atom_string, which is in m_atom.c. There you can find a 
sprintf "%g", but if you modify it, you also modify the way numbers are 
saved in patchfiles and in [textfile], the way numbers are sent over 
[netsend], the way numbers are [print]ed in the console, etc.

   "it's fun. it's a big, big fun." -- Louis 19

  _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801, Montréal, Québec

More information about the Pd-list mailing list