<div class="im">On Fri, Mar 23, 2012 at 4:54 AM, Mathieu Bouchard <span dir="ltr"><<a href="mailto:matju@artengine.ca" target="_blank">matju@artengine.ca</a>></span> wrote:<br></div><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Le 2012-03-23 à 04:09:00, Angakok Thoth a écrit :<div><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
For example, this shade of red:<br>
Red=192. Green=0, Blue=0<br>
- (192*65536) - (0 * 256) - (0) = -12582912<br>
<br>
If I make a messagebox |color -12582912[ and send it to the togglebox, i
get bright blue. what am I doing wrong? for most shades of colours it
seems to be working OK, but not for this one and not for some others.<br>
</blockquote>
<br></div>
You're supposed to also subtract 1 to the whole thing.<br></blockquote></div><div><br>I tried even that, but it was totally the same.<br>In the meantime I found that the formula work ok if I use it directly, but when I put it in messagebox, the colour is changed.<br>
</div><div class="im"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I don't know, but also the fact, the PD rewrites my messagebox to |color
-1.25829e+007[ after save, seems suspicious to me. Is PD rounding the
numbers in messageboxes? (the new form seems to be missing few digits)<br>
</blockquote>
<br></div>
Yes, it is rounding numbers and this destroy part of the precision that
the internal float format has. For this reason, I recompute those
numbers everytime I use them, but there's another reason as well :
separate r,g,b numbers is easier to understand when reading and
modifying patches.<br>
</blockquote></div><br>Yes,yes. That is the problem. Thanks. <br>Seems that I'll have to repatch all my color stuff this way.<br>Anyway,
I have to say it's kinda awful to HAVE TO do that because of this weird
rounding "feature" and there are already too many workarounds in my
patch.<br>
I think I'll try to count the numbers only once (on loadbang), and store
them into float object that i'll bang when I need the number and don't
need to recount everytime before use. (not simple thing to do, while I need this loadbang happen sooner than a loadbang that is redrawing my
toggleboxes using those color numbers. Will have to switch to
having only one loadbang in whole patch and "t b b b b b" after it,
sending to various parts of the patch. Just because of this stupid bug). So, I think I know what I can do, to make it work... but still, I
just don't get it. Shouldn't the messagebox just leave the number as is /
as it would be a text? What an awful feature. There also can't be any
aesthetic reason for it, while the messageboxes doesn't even show up
when in GOP, which is another 'feature' of messageboxes that I fail to
understand. ((not sure if worth posting in another topic, but what is
the point, of having messageboxes invisible in GOP? I can move
messagebox away from GOP zone if I don't want to see it.. If I have the
message box it the GOP zone, then I probably want it visible to be
visible, so i'm able to write in it and click it. Would be a nice
addition to the small set of objects that can be used for building the
GUI.<br>
<br>thanks and regards,<br>Daniel