[PD] coloring arrays
Mathieu Bouchard
matju at artengine.ca
Mon Oct 24 15:37:49 CEST 2011
Le 2011-10-24 à 12:28:00, Quim Llimona a écrit :
> Data structures, maybe? But I guess it would be very inefficient for
> large arrays (you would have to create an instance for each array
> element).
AFAIR, float arrays are just plain data structures. At least, they use a
built-in template defined in a hidden patch that is always loaded. That
template just contains «float y» and nothing else.
This also explains why float arrays are efficient (in a normal way) in
32-bit mode, but when you use 64-bit mode they are not anymore : pd's
data-structures have that restriction that the smallest thing you can put
in them is a «word», where «word» is defined as the biggest of float,
symbol, pointer. In 32-bit mode, they all have the same size (4 bytes
each), but in 64-bit mode, the latter two are twice bigger, so, the floats
have to be padded.
Pd's data-structures don't have to be allocated as separate items. They
can be allocated in array-fashion, as one big block.
What I say about Pd's data-structures doesn't apply to array-like types
defined in other plugins, such as GridFlow, iemmatrix, iem16, Gem, PDP. In
theory, plugins can use data-structures and define new stuff about
data-structures, but in practice, no-one ever did.
______________________________________________________________________
| Mathieu BOUCHARD ----- téléphone : +1.514.383.3801 ----- Montréal, QC
More information about the Pd-list
mailing list