[PD-dev] abstractions

Mathieu Bouchard matju at artengine.ca
Tue Jul 8 00:41:04 CEST 2008


On Tue, 8 Jul 2008, Roman Haefeli wrote:
>>> Pd way, instead I came with the idea that [moses] was not enough and
>>> that if [sel] and [route] and such, take multiple number of arguments,
>>> [moses] should. In some patches I had to string 8 [moses] together.
>>  btw such "range" is very feasible with only pd language and dynamic
>> patching.
>> see attached patch ;-)
>
> 1. if you create a patch using your [range] abstraction, then
> connections from the outlets are cut next time you load the patch. this
> because you cannot create outlets dynamically early enough without
> something like an [initbang], that is executed even before [loadbang]

Actually, I just found a hack. Edit your .pd file with a text editor in 
this way:

   1. replace "loadbang;" by "r \$0-initbang;"

   2. add a line at the very end that says just "$0-initbang bang;", no
      backslash, no "#X obj", no object position.

This works in all versions of Pd. If you don't understand how this works, 
it's normal. Furthermore, to edit this patch, -noloadbang does not work 
anymore, so you have to undo step 2 before any edit in pd, and redo it 
after any edit in pd.

So, yes, it can be done in Pd ! But my main point was that it's usually 
much less trouble to write the damn thing in C.

  _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801, Montréal, Québec


More information about the Pd-dev mailing list