[PD-dev] data "fields" - pure enough?

Frank Barknecht fbar at footils.org
Sun Oct 9 00:38:02 CEST 2005


Hallo,
notyves hat gesagt: // notyves wrote:

> from a brief glance it looks like miller's data structures use a
> key-value idea, at least from the users standpoint, i mean [set
> template3 h] is exactly how youd do the same thing in tcl: [dict set
> template3 h 10].. and are converted to raw fields of data (seperated
> with escaped ";" !)

They are not really dictionaries as in TCL, Python etc., they are more
modelled after "struct" in C (they even share the name). One important
difference is, that you cannot extend a [struct] with a new field at
runtime, whereas you can extend a dict/hash with a new key easily.
(That's what hashes are designed for and structs are not.)

> but i admit i am NOT a fan of this new msp(d)-0.39 w(0:100)(0-38)
> nonsense, what the heck is that?!?!

It's a way to let a float field be displayed differently from its
value using linear interpolation and it's also used to enforce a
constraint on the field's value's range. Say you have a [struct foo
... float w] then [drawpolygon ... w(0:100)(0:38) ...] will 

a) let w only go from 0 to 100 and 
b) let w be displayed as going from 0 px to 38 px. 

What is still missing here is an alternate way to display w: scaled,
but *without* restricting w to the range 0 to 100.

Ciao
-- 
 Frank Barknecht                 _ ______footils.org_ __goto10.org__




More information about the Pd-dev mailing list