dear list, i know this has already been adressed but i still wonder how can one build a receiver with two or more initialization arguments.
nb | [s 0-1-test]
and in abstraction [pd test 0 1] [r $1-$2-test] does not work.
i solved this pb with a simple and uncomplete pyext script (r.py, attached): to be used like that:
nb | [s 0-1-test]
and in abstraction [pd test 0 1] [pyx r r $1 $2 test]
but i wish i could get a genuine pd solution. vincent
import pyext class r(pyext._class): _inlets=0 _outlets=1
def __init__(self, *args):
r = ''
for arg in args:
r += str(arg)+'-'
self._bind(r[0:-1], self.recv)
def recv(self, *args):
if len(args)==2:
self._outlet(1, str(args[0]), (str(args[1]),))
elif len(args)==1:
self._outlet(1, args)
else:
self._outlet(1, args)