hi
i'm having trouble with creating/using a template containing an array. problems arise when i want to use 2 or more instances of the template in the same patch: the same array is created twice. I tried to solve the problem by renaming the array by passing the new name as a parameter (name of template new name array, e.g. loopplayer a1 and then loadbang -> rename array blabla a1). this only works once. when i reopen the patch, pd crashes. i haven't checked (i'm sorry, i should have, but i'm in windows now and i run pd under linux), but i think the array in the template itself gets renamed as well. just a guess.
any suggestions?
mik
ah ! do not use the "array" function; use "table <my_array_name>" instead; this will create an object that looks like an abstraction and contains a single named array;
then everything becomes easy :: into your patch called "loopplayer" insert a "table $1" instead of your array. then invoke "loopplayer groovy" and "loopplayer cool" and so on, and you will get distinct arrays called "groovy", "cool" and "so on". you can reference to the first argument of an abstraction via the "$1"; so inside your patch you might want to use "tabwrite4~ $1",...
mfg.fsd.asr hannes
mik schrieb:
hi
i'm having trouble with creating/using a template containing an array. problems arise when i want to use 2 or more instances of the template in the same patch: the same array is created twice. I tried to solve the problem by renaming the array by passing the new name as a parameter (name of template new name array, e.g. loopplayer a1 and then loadbang -> rename array blabla a1). this only works once. when i reopen the patch, pd crashes. i haven't checked (i'm sorry, i should have, but i'm in windows now and i run pd under linux), but i think the array in the template itself gets renamed as well. just a guess.
any suggestions?
mik
that's what i needed to know.
thanks.
mik ----- Original Message ----- From: "forum::für::umläute" zmoelnig@iem.mhsg.ac.at To: "mik" prims@wol.be Cc: "pd list" pd-list@iem.mhsg.ac.at Sent: Tuesday, August 15, 2000 10:51 PM Subject: Re:
ah ! do not use the "array" function; use "table <my_array_name>" instead; this will create an object that looks like an abstraction and contains a single named array;
then everything becomes easy :: into your patch called "loopplayer" insert a "table $1" instead of your array. then invoke "loopplayer groovy" and "loopplayer cool" and so on, and you will get distinct arrays called "groovy", "cool" and "so on". you can reference to the first argument of an abstraction via the "$1"; so inside your patch you might want to use "tabwrite4~ $1",...
mfg.fsd.asr hannes
mik schrieb:
hi
i'm having trouble with creating/using a template containing an array. problems arise when i want to use 2 or more instances of the template in
the
same patch: the same array is created twice. I tried to solve the
problem by
renaming the array by passing the new name as a parameter (name of
template
new name array, e.g. loopplayer a1 and then loadbang -> rename array
blabla
a1). this only works once. when i reopen the patch, pd crashes. i
haven't
checked (i'm sorry, i should have, but i'm in windows now and i run pd
under
linux), but i think the array in the template itself gets renamed as
well.
just a guess.
any suggestions?
mik