[PD] pd-msg redraw after patch clear?

2011-05-03 Thread Jeppi Jeppi

Hi all,I am playing a bit with the pd-msg system, for a dynamic GUI loader I 
need. Say I have a patch A with a subpatch B in it, with contents displayed, 
and a subpatch C inside B with contents (a GUI) displayed as well.From patch A 
I send a [clear( message to B to empty it, and thus be able to load a different 
patch D instead of C.Weird things happen, not all the GUI elements from C are 
cleared unless I minimize the window and maximize it. Also, the sliders in C 
don't seem to work always, or sometimes work but are not visually updated. 
Maybe this could be fixed somehow, or I am doing something wrong?
Thanks in advance!Josep M ___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd-msg redraw after patch clear?

2011-05-03 Thread Patrice Colet
hello,

 it's hard to tell where it get wrong without having a sight of the patch,
anyway maybe you should just open/close dynamicaly patches you need instead of 
trying to draw them as a subpatch

- Jeppi Jeppi jepp...@hotmail.com a écrit :

 Hi all,
 I am playing a bit with the pd-msg system, for a dynamic GUI loader I
 need. Say I have a patch A with a subpatch B in it, with contents
 displayed, and a subpatch C inside B with contents (a GUI) displayed
 as well.
 From patch A I send a [clear( message to B to empty it, and thus be
 able to load a different patch D instead of C.
 Weird things happen, not all the GUI elements from C are cleared
 unless I minimize the window and maximize it. Also, the sliders in C
 don't seem to work always, or sometimes work but are not visually
 updated. Maybe this could be fixed somehow, or I am doing something
 wrong?
 
 
 Thanks in advance!
 Josep M 
 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management -
 http://lists.puredata.info/listinfo/pd-list

-- 
Patrice Colet 

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd-msg

2008-04-26 Thread Frank Barknecht
Hallo,
Luigi Rensinghoff hat gesagt: // Luigi Rensinghoff wrote:

 lets say you have an abstraction:
 
 transfer.pd
 
 inside of that there is the core-math object like
 
 exponential_curve or exponential_sigmoid
 
 so it would be cool to just send the argument expoential_curve to  
 the abstraction so this object is created..

You can pass object names as arguments as well! So in transfer.pd just
use [$1], connect it, and call transfer.pd as [transfer
exponential_curve] or [transfer exponential_sigmoid] depending on
which mapping you want to use.

See attachement for a silly example.

Ciao
-- 
 Frank Barknecht _ __footils.org__


meta-help.pd
Description: application/puredata


meta.pd
Description: application/puredata
___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd-msg

2008-04-25 Thread Hans-Christoph Steiner


On Apr 24, 2008, at 10:49 PM, Mike McGonagle wrote:




On Thu, Apr 24, 2008 at 7:27 PM, Luigi Rensinghoff  
[EMAIL PROTECTED] wrote:


do you know how the numbers change if you cut everything from patch  
and paste it back in ?? my impression is that it does not start  
from zero ?? What if you copy it to a new patch ? then it should  
start from zero.


Well, if you are making these patches PROGRAMMATICALLY, then you  
can't cut and paste, as there is no way to do that in programming.


You might want to open up some abstractions in a text editor, you  
can see the code that PD uses to create these objects directly. It  
is very enlightening.


cut and paste is possible too.  Check out pd-msg for the details.   
Basically, you need to programmatically draw a box around the around  
the area to select the objects, then send the cut and paste messages.



Well sure i could keep track of thatbut what if i would like to  
modify an existing patch


Can't do it programmatically. You can only add objects to an  
existing patch, and if it is something that already has existing  
objects, there is no way to know how many objects are already in a  
patch.

mike


It would be non-trivial but possible.  You could count the lines in  
the .pd file with #X obj in them, that would give you the total  
number of objects.  I guess you'd have to count symbolatoms and  
floatatoms too.


.hc






--
Peace may sound simple—one beautiful word— but it requires  
everything we have, every quality, every strength, every dream,  
every high ideal.

—Yehudi Menuhin (1916–1999), musician
___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - http://lists.puredata.info/ 
listinfo/pd-list




 



Using ReBirth is like trying to play an 808 with a long stick.- 
David Zicarelli



___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd-msg

2008-04-25 Thread Mike McGonagle
On Fri, Apr 25, 2008 at 9:25 AM, Hans-Christoph Steiner [EMAIL PROTECTED]
wrote:


 On Apr 24, 2008, at 10:49 PM, Mike McGonagle wrote:



 On Thu, Apr 24, 2008 at 7:27 PM, Luigi Rensinghoff 
 [EMAIL PROTECTED] wrote:


 do you know how the numbers change if you cut everything from patch and
 paste it back in ?? my impression is that it does not start from zero ??
 What if you copy it to a new patch ? then it should start from zero.


 Well, if you are making these patches PROGRAMMATICALLY, then you can't cut
 and paste, as there is no way to do that in programming.

 You might want to open up some abstractions in a text editor, you can see
 the code that PD uses to create these objects directly. It is very
 enlightening.


 cut and paste is possible too.  Check out pd-msg for the details.
  Basically, you need to programmatically draw a box around the around the
 area to select the objects, then send the cut and paste messages.


And yes, while this is possible, it just seems very difficult at best, to
be able to create a patch and lay it out in such a way that you can make
those sorts of selections. LOTS of planning would need to go into such a
thing.




 Well sure i could keep track of thatbut what if i would like to modify
 an existing patch


 Can't do it programmatically. You can only add objects to an existing
 patch, and if it is something that already has existing objects, there is no
 way to know how many objects are already in a patch.
 mike


 It would be non-trivial but possible.  You could count the lines in the .pd
 file with #X obj in them, that would give you the total number of objects.
  I guess you'd have to count symbolatoms and floatatoms too.


You could probably do this by loading the patch into a [textfile] object, if
you need to do this programmatically.

Mike

-- 
Peace may sound simple—one beautiful word— but it requires everything we
have, every quality, every strength, every dream, every high ideal.
—Yehudi Menuhin (1916–1999), musician
___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd-msg

2008-04-25 Thread Hans-Christoph Steiner


On Apr 25, 2008, at 12:09 PM, Mike McGonagle wrote:




On Fri, Apr 25, 2008 at 9:25 AM, Hans-Christoph Steiner  
[EMAIL PROTECTED] wrote:


On Apr 24, 2008, at 10:49 PM, Mike McGonagle wrote:




On Thu, Apr 24, 2008 at 7:27 PM, Luigi Rensinghoff  
[EMAIL PROTECTED] wrote:


do you know how the numbers change if you cut everything from  
patch and paste it back in ?? my impression is that it does not  
start from zero ?? What if you copy it to a new patch ? then it  
should start from zero.


Well, if you are making these patches PROGRAMMATICALLY, then you  
can't cut and paste, as there is no way to do that in programming.


You might want to open up some abstractions in a text editor, you  
can see the code that PD uses to create these objects directly. It  
is very enlightening.


cut and paste is possible too.  Check out pd-msg for the details.   
Basically, you need to programmatically draw a box around the  
around the area to select the objects, then send the cut and paste  
messages.


And yes, while this is possible, it just seems very difficult at  
best, to be able to create a patch and lay it out in such a way  
that you can make those sorts of selections. LOTS of planning would  
need to go into such a thing.




Well sure i could keep track of thatbut what if i would like  
to modify an existing patch


Can't do it programmatically. You can only add objects to an  
existing patch, and if it is something that already has existing  
objects, there is no way to know how many objects are already in a  
patch.

mike


It would be non-trivial but possible.  You could count the lines in  
the .pd file with #X obj in them, that would give you the total  
number of objects.  I guess you'd have to count symbolatoms and  
floatatoms too.


You could probably do this by loading the patch into a [textfile]  
object, if you need to do this programmatically.


Yup, for an example, check out this one in Pd-extended 0.39.3:

Help-Browser-manuals-0.Intro-46.pure_data_files.pd  (I just  
released this is broken in 0.40...)


.hc




Mike

--
Peace may sound simple—one beautiful word— but it requires  
everything we have, every quality, every strength, every dream,  
every high ideal.

—Yehudi Menuhin (1916–1999), musician








 



It is convenient to imagine a power beyond us because that means we  
don't have to examine our own lives., from The Idols of  
Environmentalism, by Curtis White





___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd-msg

2008-04-25 Thread Mike McGonagle
Just curious, but has anyone tried to test the performance differences
between sending messages as compared to actually connecting things up
with wires?

I am curious weather or not one of my patches would work with
messages, as I want to instantiate close to 200 oscillators, with each
taking about 7 or 8 parameters per grain.

Mike


On 4/25/08, Roman Haefeli [EMAIL PROTECTED] wrote:
 On Fri, 2008-04-25 at 20:09 +0200, Frank Barknecht wrote:
   Hallo,
   Mike McGonagle hat gesagt: // Mike McGonagle wrote:
  
And yes, while this is possible, it just seems very difficult at best, 
 to
be able to create a patch and lay it out in such a way that you can make
those sorts of selections. LOTS of planning would need to go into such a
thing.
  
   What I generally do *if* I'm doing dynamic patching is write as much as
   possible into an abstraction and just create copies of that. nqpoly4~
   may help with automating that.
  
   A very useful trick for these abstractions is to avoid doing connections
   at all and just pass $0 as an argument. Then inside the abstraction, use
   [r $1-inlet] receivers where $1 is the $0 of the parent as passed as
   argument instead of inlets, and [s $1-outlet] instead of outlets. Outside 
 of
   the patch use [s $0-inlet] to write to the fake inlet, and [r $0-outlet]
   to read from the fake sender outlet. Do the same for signals with r~/s~
   and throw~/catch~ pairs. Most dynamic connections can be avoided by this
   approach.
  
   If you need to pass data from one dynamically created abstraction to
   another, use a similar approach with numbered arguments. Again this can
   be seen in action in the redesign of nqpoly4~.pd that I once did and
   that's in svn/pd-extended as well, or in polypoly.pd.



 this is basically the approach, that probably all dynamic patches from
  netpd are based on. no connections are created or deleted dynamically
  (it's just too cumbersome and relies on undocumented features).
  parts that need to be deleted separately go into their own subpatch, so
  that they can be deleted simply by sending 'clear' to the appropriate
  subpatch.

  however, there _are_ issues, that cannot solved that way. whenever
  signals are involved with dynamically created abstractions, it's likely
  to get one-block-delays due to the creation order of the
  [throw~]s/[catch~]es and [send~]s/[receive~]s. don't know how to deal
  with that yet.


  roman




  ___
  Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de



  ___
  PD-list@iem.at mailing list
  UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list



-- 
Peace may sound simple—one beautiful word— but it requires everything
we have, every quality, every strength, every dream, every high ideal.
—Yehudi Menuhin (1916–1999), musician

___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd-msg

2008-04-25 Thread Luigi Rensinghoff

Well...

not yet...but if you post the patch, or the part with th 200 or more  
wires...


i would test the difference.

I am surprised where this discussion is going...many useful tips so far.

I personally dont like that $0 $1 confusion somehow, but thats just  
because i dont remeber what i did when i open

the patch many months later or so..

Wires are somehow more haptic and its a part of pd that i like,  
sort of the typical pd-character, but
as in the 24 24 matrix thing - when you have to do more than 100  
connections in one patch, then its kind of silly, this weaving
so dynamic object creation or just automated connecting seems to be  
a good way..


To come to a little bit more practical example..

I am facing the problem - again with the mapping library - and this  
is, where it does not work with abstractions - i would like to have one

abstraction with a mapping object inside, but not always the same...

i post the example, later - where i am now experimenting with this  
message-thing


basically its like that..

lets say you have an abstraction:

transfer.pd

inside of that there is the core-math object like

exponential_curve or exponential_sigmoid

so it would be cool to just send the argument expoential_curve to  
the abstraction so this object is created..


well...not very clear i guess..

but i will post it later
..

What about the

route audio~ float  - object 

did nobody ever have the same problem ??

good night luigi



Am 26.04.2008 um 00:06 schrieb Mike McGonagle:


Just curious, but has anyone tried to test the performance differences
between sending messages as compared to actually connecting things up
with wires?

I am curious weather or not one of my patches would work with
messages, as I want to instantiate close to 200 oscillators, with each
taking about 7 or 8 parameters per grain.

Mike


On 4/25/08, Roman Haefeli [EMAIL PROTECTED] wrote:

On Fri, 2008-04-25 at 20:09 +0200, Frank Barknecht wrote:

Hallo,
Mike McGonagle hat gesagt: // Mike McGonagle wrote:

And yes, while this is possible, it just seems very difficult  
at best, to
be able to create a patch and lay it out in such a way that you  
can make
those sorts of selections. LOTS of planning would need to go  
into such a

thing.


What I generally do *if* I'm doing dynamic patching is write as  
much as
possible into an abstraction and just create copies of that.  
nqpoly4~

may help with automating that.

A very useful trick for these abstractions is to avoid doing  
connections
at all and just pass $0 as an argument. Then inside the  
abstraction, use

[r $1-inlet] receivers where $1 is the $0 of the parent as passed as
argument instead of inlets, and [s $1-outlet] instead of outlets.  
Outside of
the patch use [s $0-inlet] to write to the fake inlet, and [r $0- 
outlet]
to read from the fake sender outlet. Do the same for signals with  
r~/s~
and throw~/catch~ pairs. Most dynamic connections can be avoided  
by this

approach.

If you need to pass data from one dynamically created abstraction to
another, use a similar approach with numbered arguments. Again  
this can

be seen in action in the redesign of nqpoly4~.pd that I once did and
that's in svn/pd-extended as well, or in polypoly.pd.




this is basically the approach, that probably all dynamic patches  
from
 netpd are based on. no connections are created or deleted  
dynamically

 (it's just too cumbersome and relies on undocumented features).
 parts that need to be deleted separately go into their own  
subpatch, so
 that they can be deleted simply by sending 'clear' to the  
appropriate

 subpatch.

 however, there _are_ issues, that cannot solved that way. whenever
 signals are involved with dynamically created abstractions, it's  
likely

 to get one-block-delays due to the creation order of the
 [throw~]s/[catch~]es and [send~]s/[receive~]s. don't know how to  
deal

 with that yet.


 roman




 ___
 Telefonate ohne weitere Kosten vom PC zum PC: http:// 
messenger.yahoo.de




 ___
 PD-list@iem.at mailing list
 UNSUBSCRIBE and account-management - http://lists.puredata.info/ 
listinfo/pd-list





--
Peace may sound simple—one beautiful word— but it requires everything
we have, every quality, every strength, every dream, every high ideal.
—Yehudi Menuhin (1916–1999), musician

___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - http://lists.puredata.info/ 
listinfo/pd-list




---

Luigi Rensinghoff
[EMAIL PROTECTED]
skype:gigischinke
ichat:gigicarlo




___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] pd-msg

2008-04-24 Thread Luigi Rensinghoff
Hi List 

there is this well-written tips and tricks folder that desribes how  
to create objects/abstractions by sending messages.

like...in folder #5: 2.create_new_abstract.pd..

First, thanks to who put that together, this is extremely helpful and  
only documented here...

So my question is:

Is there a way to find out the indexnumber of the objects (the  
creation-order-number), that is needed for the

| connect a b c d(

message ??

The scenario:

imagine you build many objects and easily want to connect them with a  
little counter-like think.

1) How do you find out the number that needs to be given to  
connect ???

2) Which additional arguments can be send to which object ??

  for example i would like to build a number-box, using the built- 
in send and recieve mechanism...
  Is that possible ???

Thanks

Luigi

___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd-msg

2008-04-24 Thread Mike McGonagle
On Thu, Apr 24, 2008 at 7:03 PM, Luigi Rensinghoff 
[EMAIL PROTECTED] wrote:

 Hi List 

 there is this well-written tips and tricks folder that desribes how
 to create objects/abstractions by sending messages.

 like...in folder #5: 2.create_new_abstract.pd..

 First, thanks to who put that together, this is extremely helpful and
 only documented here...

 So my question is:

 Is there a way to find out the indexnumber of the objects (the
 creation-order-number), that is needed for the


Nope, you need to keep track of those yourself. It really shouldn't be all
that hard. I have done a couple of things creating patches in this
particular way, and I have found that it is a good idea to put the static
objects in a patch first, and then anything that is variable would go in
next, and then lastly, you wire them up.




 | connect a b c d(

 message ??

 The scenario:

 imagine you build many objects and easily want to connect them with a
 little counter-like think.

 1) How do you find out the number that needs to be given to
 connect ???


Each object is referenced in the order in which they are added to the patch.



 2) Which additional arguments can be send to which object ??


Not really sure what you mean here, but the string used to create the object
should have everything it needs to create that instance.

As far as I know, once you add an object to a patch, the only thing you can
do with it is to pass its index to a connect message.




  for example i would like to build a number-box, using the built-
 in send and recieve mechanism...
  Is that possible ???


Yes, you just need to set those arguments when you add the objects to the
patch. I am not really sure where it is, but there is a listing of each of
the objects in PD and what arguments they can handle.

Hope this helped.

Mike





 Thanks

 Luigi

 ___
 PD-list@iem.at mailing list
 UNSUBSCRIBE and account-management -
 http://lists.puredata.info/listinfo/pd-list




-- 
Peace may sound simple—one beautiful word— but it requires everything we
have, every quality, every strength, every dream, every high ideal.
—Yehudi Menuhin (1916–1999), musician
___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd-msg

2008-04-24 Thread Luigi Rensinghoff


Yes, you just need to set those arguments when you add the objects  
to the patch. I am not really sure where it is, but there is a  
listing of each of the objects in PD and what arguments they can  
handle.




Oh yes i found it

its just in the properties menu of the object - silly me



Hope this helped.

Mike




Thanks

Luigi

___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - http://lists.puredata.info/ 
listinfo/pd-list




--
Peace may sound simple—one beautiful word— but it requires  
everything we have, every quality, every strength, every dream,  
every high ideal.

—Yehudi Menuhin (1916–1999), musician
___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - http://lists.puredata.info/ 
listinfo/pd-list


---

Luigi Rensinghoff
[EMAIL PROTECTED]
skype:gigischinke
ichat:gigicarlo




___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list