[PD] (breaking symbols) was Re: find a list of numbers in a text file

Hans-Christoph Steiner hans at at.or.at
Tue Sep 6 21:55:23 CEST 2011

On Sep 6, 2011, at 3:53 AM, fbar wrote:

> On Tue, Sep 06, 2011 at 09:44:33AM +0200, Frank Barknecht wrote:
>> I'm not sure what "appears in the patch" should mean. It definitly  
>> means
>> that numercial-symbol selectors don't get shown and cannot be written
>> into a patch, so you cannot use them in the editor where "real"
>> selectors should be written, like in [route].
> Forgot to add: Of course it is possible and legal to "use" numerical  
> or
> non-printable symbols as selectors, but they have to be constructed
> dynamically and cannot be typed, in accordance with the restrictions
> mentioned in the manual. Instead something like this can be used:
>  [makefilename %d]
>  |
>  |                  [makefilename %d]
>  |                  |
>  [select symbol-dummy]
> I used [makefilename %d] a lot in the rj library's [m_chorddict]
> dictionary for chords, where some chord names are proper symbols, like
> "m7", while others are floats like 7. The float-names get converted to
> symbols internally to look up chord notes in a data structure array
> keyed by symbols only (using [m_symbolarray]).

So this is a great example of why Pd should have a more complete  
dynamic typing system.  There are good reasons to have arbitrary  
symbols, including "43", like m_chorddict.  To make such a system work  
in Pd, and have anything that can be interpreted as number be a float,  
there needs to be some dynamic typing, like Tcl, Python, etc. do.   
This particular issue is only one small part of the picture, and  
should be considered in the whole picture.

Its obviously working for you, Frank, as it is, since you are the  
master of hacks like that.  But I still remember how brutally painful  
it was to learn Pd's type system.  I think with a few well thought out  
changes, we can make it work better for everyone with minimal pain.



You can't steal a gift. Bird gave the world his music, and if you can  
hear it, you can have it. - Dizzy Gillespie

More information about the Pd-list mailing list