[PD-dev] string external & usage count

Bryan Jurish moocow at ling.uni-potsdam.de
Wed Oct 13 14:59:42 CEST 2004


moin joerg,

On 13 October 2004 at 14:08:55, joerg piringer appears to have written:
 > hi all,
 > i am trying to develop a string external that does not use symbols for 
 > string storage because of known problems with symbols.

sounds excellent -- i have been chewing on string represntations
for pd for a while; my only real current implementation is the
'pd-string' package (http://www.ling.uni-potsdam.de/~moocow/projects),
which has 2 objects: [any2string] and [string2any] -- "strings" are
passed around as lists of floats (in the range 0..255) -- it's
pretty space-inefficient, but it does appear to work.

 > what i am now doing is using string handles (int) and store the strings 
 > internally in my external. that works quite well. the only problem is 
 > that i had to introduce usage counters to free my string memory when it 
 > is no longer needed.
 [snip]

... that sounds pretty complex to me.  perhaps we might work
together to crunch more string data into a "list", maybe using
a special selector ('string'? 'ascii'?)  for it?  that way,
we could avoid at least some hairiness with reference-counting:
it looks like at least 3 bytes can be encoded losslessly in one
float (for later extraction with bitwise ops), which is still
wasting 1/4 of the allocated space, but I think I can live with
that... you?

marmosets,
	Bryan




More information about the Pd-dev mailing list