[PD] From pd file color to cnv message

Jonathan Wilkes jancsika at yahoo.com
Sun Mar 14 21:15:08 CET 2010


Thanks, Roman.

For a quick solution:
I noticed that if you click "compose color" in the "Properties" dialogue for cnv, it gives the RGB values, so I can just plug those into the 
converter subpatch in cnv's help patch.

-Jonathan

--- On Sun, 3/14/10, Roman Haefeli <reduzierer at yahoo.de> wrote:

> From: Roman Haefeli <reduzierer at yahoo.de>
> Subject: Re: [PD] From pd file color to cnv message
> To: "Jonathan Wilkes" <jancsika at yahoo.com>
> Cc: pd-list at iem.at
> Date: Sunday, March 14, 2010, 1:05 AM
> Since 24bit integer numbers cannot be
> fully represented with the number
> format used in .pd files (and in any other textual
> representation in
> pd), color values for the iemguis are saved as 18bit
> integer numbers,
> where each channel occupies 6 bit. So the bit mask for
> those values is
> the following:
> 
> ((rrrrrrggggggbbbbbb)*-1)-1
> 
> whereas the 'color' message to the iemgui objects expects a
> 8
> bit/channel number, which has this bitmask:
> 
> ((rrrrrrrrggggggggbbbbbbbb)*-1)-1
> 
> So if you want to read the color values from a .pd file and
> send them to
> the iemguis, you need to bitshift the channel parts from
> the 18bit
> scheme to make it fit into the 24 bit scheme.
> 
> Roman
> 
> 
> 
> On Fri, 2010-03-12 at 19:50 -0800, Jonathan Wilkes wrote:
> > Hello,
> >      Can anyone tell me how to figure
> out what value to send a [cnv] object 
> > to get it to display the colors shown in this
> patch?  If I try to take one 
> > of those big negative values from the pd file I get a
> totally different 
> > color.
> > 
> > Thanks,
> > Jonathan
> > 
> > 
> >       
> > 
> > 
> > _______________________________________________
> > Pd-list at iem.at
> mailing list
> > UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
> 
> 
> 
> 


      





More information about the Pd-list mailing list