[PD] Re: pyext to dyn

Thomas Grill t.grill at gmx.net
Mon Mar 1 18:22:48 CET 2004


Hi Wernfried,
building and outputting lists (e.g. for dyn~) with pyext is really easy...
the script (called ext1.py here) could look like:

try:
    import pyext
except:
    print "Module can only be loaded fro within pyext"

class listout(pyext._class):

    def bang_1(self):
        a = 200  # some number
        self._outlet(1,["newobj",".","bla","osc~",a])


and a demo patch like:

#N canvas 350 295 302 176 12;
#X obj 206 36 bng 15 250 50 0 empty empty empty 0 -6 0 8 -258699 -1 -1;
#X obj 41 73 pyext 1 1 ext1 listout;
#X obj 44 109 print to-dyn;
#X connect 0 0 1 1;
#X connect 1 0 2 0;


best greetings,
Thomas



----- Original Message ----- 
From: "wernfried lackner" <z at null2.net>
To: "Thomas Grill" <t.grill at gmx.net>
Sent: Monday, March 01, 2004 5:39 PM
Subject: pyext to dyn


> hallo thomas,
>
> ich benutze pyext um mit dyn~ objekte zu erzeugen und zu löschen, ist es
> möglich in python einen string zu formen und direkt dyn zu übergeben zb.
> "newobj . bla osc~ 200" oder muss ich die anzahl der parameter hardcoden?
>
> vielen dank
> wernfried
>
>





More information about the Pd-list mailing list