Re: [PD] Data structures and click event

2014-03-12 Thread Billy Stiltner
re: 'slow ass coders' usually takes me 15 years to get anything done, the
things that are taking longer than 15 years will probably be wonderful.  I
will link  to you something that will make you change your mind about
'being years behind everything else'  3:33:28 seconds of some
/pd-0.45-4/bin$ ./pd

the pdBerlin has some nice examples of using Chris Mccormick's lfo
datastructure editor, I was weary of it before along with some GOP scaling
stuff, but think I might give it a try. something is weird with this new
(old junk keyboard, whenever I hold down more than 2 or 3 keys too fast ,
jack is glitching like the mouse dropouts. I am used to it by now and not
one bit of that dreaded static makes it inside the wave file.

I feel like I have crossed a hurdle yesterday #1 loadable filename list for
scrolling through presets instead of searching with the dialog[ cant that
dialog be used as a directory tool? I mean it allready does what everyone
want's a directory listing to do, splits up the file name from the patch,
etc...  just make it an atom.

#2 I somehow miraculously figured out how to count up a binary sequence
like that is the oputput of the euclidian function for slick beats [1 0 1 0
1 1 0(  and convert it to something that can be used as a mode for scales
[2 2 1 2( my method does not yet work for sequencs that start with 0
-rotations but that doesen't bother me one bit.  I ould have done it so
easy with c, assembly language or even machine code but doing that
graphically had my panties in a wad.
***
A quotation by Hermann von Helmholtz
Whoever in the pursuit of science, seeks after immediate practical utility
may rest assured that he seeks in vain.
Academic Discourse (Heidelberg 1862)

JOC/EFR February 2006

The URL of this page is:
http://www-history.mcs.st-andrews.ac.uk/.../Helmholtz.htmlhttp://www-history.mcs.st-andrews.ac.uk/Quotations/Helmholtz.html



On Fri, Mar 7, 2014 at 6:55 PM, Miller Puckette m...@ucsd.edu wrote:

 I'll have to have a look and see what the ideas are... I don't
 know anything yet.  Anyhow I think there are a couple of things
 that are higher priority:  getting editing to be more user-friendly,
 and getting the IEM GUIs to behave better.  And I'm afraid I can
 only write code at a fraction of the speed others can - so PD
 vanilla will always seem years behind everything else.

 cheers
 Miller

 On Sat, Mar 08, 2014 at 12:45:33AM +0100, João Pais wrote:
 
 
  On 03/05/2014 05:24 AM, Pierre Massat wrote:
  Dear list,
  
  First of all i'd like to say that i'm very impressed by the
  potential of data structures in Pd. I've always kind of ignored
  this feature and it's a pity because it's really worth diving
  into it.That being said I think that help and example patches
  are far from sufficient for beginners, and if it wasn't for
  Chris McCormick's s-abstractions I would have been able to
  really figure out how to use them (stuff like how to make an
  entire polygon draggable, how to use GOP with proper scaling,
  etc.).
  
  It's not just the documentation, it's the interface.  Having to
  walk linked-lists of graphically unlinked objects is bad.  Having
  to use boilerplate to find the head of a glist just to create a
  scalar is bad.
  
   I think Pd-l2ork is getting close to a release with my new data
  structure stuff in it.  It's a first step at addressing some of
  these issues.
 
  and any prospects of that stuff making it into vanilla or pd-ext,
  for the non-unix users out there?

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


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

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


Re: [PD] Data structures and click event

2014-03-12 Thread Billy Stiltner
https://archive.org/details/isophi12moj

upgraded ubuntustudio from 13.04 to 13.10 this morning without any
noticeable problems yet.
how does jack2 handle pulse audio and alsa now? somehow it stopped working
together before the upgrade.  might have  misconfigured jack with the old
pasuspender -- use/bin/jackd or something


On Wed, Mar 12, 2014 at 3:57 PM, Billy Stiltner billy.stilt...@gmail.comwrote:

 re: 'slow ass coders' usually takes me 15 years to get anything done, the
 things that are taking longer than 15 years will probably be wonderful.  I
 will link  to you something that will make you change your mind about
 'being years behind everything else'  3:33:28 seconds of some
 /pd-0.45-4/bin$ ./pd

 the pdBerlin has some nice examples of using Chris Mccormick's lfo
 datastructure editor, I was weary of it before along with some GOP scaling
 stuff, but think I might give it a try. something is weird with this new
 (old junk keyboard, whenever I hold down more than 2 or 3 keys too fast ,
 jack is glitching like the mouse dropouts. I am used to it by now and not
 one bit of that dreaded static makes it inside the wave file.

 I feel like I have crossed a hurdle yesterday #1 loadable filename list
 for scrolling through presets instead of searching with the dialog[ cant
 that dialog be used as a directory tool? I mean it allready does what
 everyone want's a directory listing to do, splits up the file name from the
 patch, etc...  just make it an atom.

 #2 I somehow miraculously figured out how to count up a binary sequence
 like that is the oputput of the euclidian function for slick beats [1 0 1 0
 1 1 0(  and convert it to something that can be used as a mode for scales
 [2 2 1 2( my method does not yet work for sequencs that start with 0
 -rotations but that doesen't bother me one bit.  I ould have done it so
 easy with c, assembly language or even machine code but doing that
 graphically had my panties in a wad.
 ***
 A quotation by Hermann von Helmholtz
 Whoever in the pursuit of science, seeks after immediate practical utility
 may rest assured that he seeks in vain.
 Academic Discourse (Heidelberg 1862)

 JOC/EFR February 2006

 The URL of this page is:
 http://www-history.mcs.st-andrews.ac.uk/.../Helmholtz.htmlhttp://www-history.mcs.st-andrews.ac.uk/Quotations/Helmholtz.html



 On Fri, Mar 7, 2014 at 6:55 PM, Miller Puckette m...@ucsd.edu wrote:

 I'll have to have a look and see what the ideas are... I don't
 know anything yet.  Anyhow I think there are a couple of things
 that are higher priority:  getting editing to be more user-friendly,
 and getting the IEM GUIs to behave better.  And I'm afraid I can
 only write code at a fraction of the speed others can - so PD
 vanilla will always seem years behind everything else.

 cheers
 Miller

 On Sat, Mar 08, 2014 at 12:45:33AM +0100, João Pais wrote:
 
 
  On 03/05/2014 05:24 AM, Pierre Massat wrote:
  Dear list,
  
  First of all i'd like to say that i'm very impressed by the
  potential of data structures in Pd. I've always kind of ignored
  this feature and it's a pity because it's really worth diving
  into it.That being said I think that help and example patches
  are far from sufficient for beginners, and if it wasn't for
  Chris McCormick's s-abstractions I would have been able to
  really figure out how to use them (stuff like how to make an
  entire polygon draggable, how to use GOP with proper scaling,
  etc.).
  
  It's not just the documentation, it's the interface.  Having to
  walk linked-lists of graphically unlinked objects is bad.  Having
  to use boilerplate to find the head of a glist just to create a
  scalar is bad.
  
   I think Pd-l2ork is getting close to a release with my new data
  structure stuff in it.  It's a first step at addressing some of
  these issues.
 
  and any prospects of that stuff making it into vanilla or pd-ext,
  for the non-unix users out there?

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


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



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


Re: [PD] Data structures and click event

2014-03-12 Thread Jonathan Wilkes

On 03/07/2014 06:55 PM, Miller Puckette wrote:

I'll have to have a look and see what the ideas are... I don't
know anything yet.


Well there's the important stuff:
https://jwilkes.nfshost.com/mm.webm

And then the less important stuff, like being able to patch 15 out of 
the 28 demos shown here:

http://raphaeljs.com/

Essentially everything except the ones with gradients and text, but 
those features can be added later.


It's generally not as high level as Raphael-- for example I ported the 
Raphael code to subpatches for the easing demo, and I'm just using 
[line] to do the animation.  However, it would not be too hard on the Pd 
side to add an animate method.  In fact that'd be quite efficient as 
you'd only be sending a single message over the socket and letting the 
GUI take care of the details.


Also, I'm instantiating scalars inside object boxes.  Since the user can 
send messages to update shape attributes straight to the parent draw 
command, this means he/she can do an end-run around pointers for 
prototyping.  So essentially you have the ability to dynamically change 
visual attributes on the class level (i.e., the parentwidgetbehavior) 
and on the object level (for the specific scalar, as you can currently).


There are still lots of details to get right, like handling groups 
properly, but the basic stuff is there.


-Jonathan


   Anyhow I think there are a couple of things
that are higher priority:  getting editing to be more user-friendly,
and getting the IEM GUIs to behave better.  And I'm afraid I can
only write code at a fraction of the speed others can - so PD
vanilla will always seem years behind everything else.

cheers
Miller

On Sat, Mar 08, 2014 at 12:45:33AM +0100, João Pais wrote:



On 03/05/2014 05:24 AM, Pierre Massat wrote:

Dear list,

First of all i'd like to say that i'm very impressed by the
potential of data structures in Pd. I've always kind of ignored
this feature and it's a pity because it's really worth diving
into it.That being said I think that help and example patches
are far from sufficient for beginners, and if it wasn't for
Chris McCormick's s-abstractions I would have been able to
really figure out how to use them (stuff like how to make an
entire polygon draggable, how to use GOP with proper scaling,
etc.).

It's not just the documentation, it's the interface.  Having to
walk linked-lists of graphically unlinked objects is bad.  Having
to use boilerplate to find the head of a glist just to create a
scalar is bad.

I think Pd-l2ork is getting close to a release with my new data
structure stuff in it.  It's a first step at addressing some of
these issues.

and any prospects of that stuff making it into vanilla or pd-ext,
for the non-unix users out there?
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list





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


Re: [PD] Data structures and click event

2014-03-08 Thread Dan Wilcox

On Mar 8, 2014, at 5:59 AM, pd-list-requ...@iem.at wrote:

 
 No.  It requires a toolkit that has modern 2d features like affine 
 transformations and opacity, etc.  Pd-l2ork leverages Tkpath, a tcl/tk 
 library.  Other modern toolkits like Qt have their own 2d interfaces with the 
 same features and could be used, but tcl/tk on its own does not.
 
 for the non-unix users out there?
 
 For OSX, one of the tcl/tk libraries-- Tkpath needs to be ported from Carbon 
 to Cocoa.

I have this about halfway done. I finally found the old QuickTime Carbon 
headers so I could port the old school font creation to CoreText. All of the 
old Quick Draw stuff is no longer on the Apple Developer docs, so it was a bit 
confusing at first. It will take a little while though since I dip into it now 
and then among everything else.

 I haven't investigated a Windows port yet but it's probably mostly a matter 
 of setting up the proper compile environment more than anything else.  
 Granted one would probably need to tweak pd.tk and L2ork's build script, but 
 getting set up in Windows seems to be where most of the work is.  (At least 
 in my experience so far.)

It shouldn't require too much beyond the current steps to build vanilla or 
extended on Windows: a mingw + msys enviornent. Tkpath uses an autoconf build 
system so it should be fine on Windows as long as you point it to the tcl/tk 
headers. The issue with OSX is that it simple hasn't been updated in a while 
but I imagine it's fine on Windows since MS moves very very slowly as far as 
moving to new APIs is concerned.


Dan Wilcox
@danomatika
danomatika.com
robotcowboy.com





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


Re: [PD] Data structures and click event

2014-03-08 Thread Jonathan Wilkes

On 03/08/2014 12:46 PM, Dan Wilcox wrote:


On Mar 8, 2014, at 5:59 AM, pd-list-requ...@iem.at 
mailto:pd-list-requ...@iem.at wrote:




No.  It requires a toolkit that has modern 2d features like affine 
transformations and opacity, etc.  Pd-l2ork leverages Tkpath, a 
tcl/tk library.  Other modern toolkits like Qt have their own 2d 
interfaces with the same features and could be used, but tcl/tk on 
its own does not.



for the non-unix users out there?


For OSX, one of the tcl/tk libraries-- Tkpath needs to be ported from 
Carbon to Cocoa.


I have this about halfway done. I finally found the old QuickTime 
Carbon headers so I could port the old school font creation to 
CoreText. All of the old Quick Draw stuff is no longer on the Apple 
Developer docs, so it was a bit confusing at first. It will take a 
little while though since I dip into it now and then among everything 
else.


Hey that's great!

I can probably help once you get that part ready.  One issue will be to 
making sure everything builds using a newer version of tcl/tk than what 
Pd-extended currently ships with.  It might be good just to go ahead and 
try 8.6 since it has some new tk::mac goodies.




I haven't investigated a Windows port yet but it's probably mostly a 
matter of setting up the proper compile environment more than 
anything else.  Granted one would probably need to tweak pd.tk and 
L2ork's build script, but getting set up in Windows seems to be where 
most of the work is.  (At least in my experience so far.)


It shouldn't require too much beyond the current steps to build 
vanilla or extended on Windows: a mingw + msys enviornent. Tkpath uses 
an autoconf build system so it should be fine on Windows as long as 
you point it to the tcl/tk headers. The issue with OSX is that it 
simple hasn't been updated in a while but I imagine it's fine on 
Windows since MS moves very very slowly as far as moving to new APIs 
is concerned.


There are a few other tk libs Pd-l2ork uses.  I'm also assuming Tkpath 
doesn't have any crashers in Windows-- I haven't tried it yet.


-Jonathan




Dan Wilcox
@danomatika
danomatika.com http://danomatika.com
robotcowboy.com http://robotcowboy.com







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


Re: [PD] Data structures and click event

2014-03-07 Thread João Pais


On 03/05/2014 05:24 AM, Pierre Massat
  wrote:


  

  

  

  Dear list,

  
  First of all i'd like to say that i'm very impressed
  by the potential of data structures in Pd. I've always
  kind of ignored this feature and it's a pity because
  it's really worth diving into it. 

That being said I think that help and example patches
are far from sufficient for beginners, and if it wasn't
for Chris McCormick's s-abstractions I would have been
able to really figure out how to use them (stuff like
how to make an entire polygon draggable, how to use GOP
with proper scaling, etc.).
  

  

  


It's not just the documentation, it's the interface. Having to walk
linked-lists of graphically unlinked objects is bad. Having to use
boilerplate to find the head of a glist just to create a scalar is
bad.
I think Pd-l2ork is getting close to a release with my new data
structure stuff in it. It's a first step at addressing some of
these issues.and any prospects of that stuff making it into vanilla or pd-ext, for the non-unix users out there?___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Data structures and click event

2014-03-07 Thread Miller Puckette
I'll have to have a look and see what the ideas are... I don't
know anything yet.  Anyhow I think there are a couple of things
that are higher priority:  getting editing to be more user-friendly,
and getting the IEM GUIs to behave better.  And I'm afraid I can
only write code at a fraction of the speed others can - so PD
vanilla will always seem years behind everything else.

cheers
Miller

On Sat, Mar 08, 2014 at 12:45:33AM +0100, João Pais wrote:
 
 
 On 03/05/2014 05:24 AM, Pierre Massat wrote:
 Dear list,
 
 First of all i'd like to say that i'm very impressed by the
 potential of data structures in Pd. I've always kind of ignored
 this feature and it's a pity because it's really worth diving
 into it.That being said I think that help and example patches
 are far from sufficient for beginners, and if it wasn't for
 Chris McCormick's s-abstractions I would have been able to
 really figure out how to use them (stuff like how to make an
 entire polygon draggable, how to use GOP with proper scaling,
 etc.).
 
 It's not just the documentation, it's the interface.  Having to
 walk linked-lists of graphically unlinked objects is bad.  Having
 to use boilerplate to find the head of a glist just to create a
 scalar is bad.
 
  I think Pd-l2ork is getting close to a release with my new data
 structure stuff in it.  It's a first step at addressing some of
 these issues.
 
 and any prospects of that stuff making it into vanilla or pd-ext,
 for the non-unix users out there?

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


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


Re: [PD] Data structures and click event

2014-03-07 Thread Jonathan Wilkes

On 03/07/2014 06:45 PM, João Pais wrote:



On 03/05/2014 05:24 AM, Pierre Massat wrote:

Dear list,

First of all i'd like to say that i'm very impressed by the
potential of data structures in Pd. I've always kind of ignored
this feature and it's a pity because it's really worth diving
into it.
That being said I think that help and example patches are far
from sufficient for beginners, and if it wasn't for Chris
McCormick's s-abstractions I would have been able to really
figure out how to use them (stuff like how to make an entire
polygon draggable, how to use GOP with proper scaling, etc.).


It's not just the documentation, it's the interface.  Having to
walk linked-lists of graphically unlinked objects is bad. Having
to use boilerplate to find the head of a glist just to create a
scalar is bad.

  I think Pd-l2ork is getting close to a release with my new data
structure stuff in it.  It's a first step at addressing some of
these issues.


and any prospects of that stuff making it into vanilla or pd-ext,


No.  It requires a toolkit that has modern 2d features like affine 
transformations and opacity, etc.  Pd-l2ork leverages Tkpath, a tcl/tk 
library.  Other modern toolkits like Qt have their own 2d interfaces 
with the same features and could be used, but tcl/tk on its own does not.



for the non-unix users out there?


For OSX, one of the tcl/tk libraries-- Tkpath needs to be ported from 
Carbon to Cocoa.


I haven't investigated a Windows port yet but it's probably mostly a 
matter of setting up the proper compile environment more than anything 
else.  Granted one would probably need to tweak pd.tk and L2ork's build 
script, but getting set up in Windows seems to be where most of the work 
is.  (At least in my experience so far.)


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


[PD] Data structures and click event

2014-03-05 Thread Pierre Massat
Dear list,

First of all i'd like to say that i'm very impressed by the potential of
data structures in Pd. I've always kind of ignored this feature and it's a
pity because it's really worth diving into it.
That being said I think that help and example patches are far from
sufficient for beginners, and if it wasn't for Chris McCormick's
s-abstractions I would have been able to really figure out how to use them
(stuff like how to make an entire polygon draggable, how to use GOP with
proper scaling, etc.).

I m now stuck with a question. How can I identify the element which was
just clicked ? I know that [struc] outputs the events, like click,
selection and change, but I thought I could identify individual elements by
their pointer id. It turns out that I get the same pointer for every
element, although I created them sequentially (using [append]).

(I guess something must be escaping me about pointers... I've noticed that
within the same template, I get different pointers for elements on
different y-levels, but the same pointer for all the element on the same
y-level regardless of their x.)

Cheers,

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


Re: [PD] Data structures and click event

2014-03-05 Thread Pierre Massat
Nevermind, it's working the way I expected, the y value was being output
and I thought that was the pointer's id.

Cheers,

Pierre.


2014-03-05 11:24 GMT+01:00 Pierre Massat pimas...@gmail.com:

 Dear list,

 First of all i'd like to say that i'm very impressed by the potential of
 data structures in Pd. I've always kind of ignored this feature and it's a
 pity because it's really worth diving into it.
 That being said I think that help and example patches are far from
 sufficient for beginners, and if it wasn't for Chris McCormick's
 s-abstractions I would have been able to really figure out how to use them
 (stuff like how to make an entire polygon draggable, how to use GOP with
 proper scaling, etc.).

 I m now stuck with a question. How can I identify the element which was
 just clicked ? I know that [struc] outputs the events, like click,
 selection and change, but I thought I could identify individual elements by
 their pointer id. It turns out that I get the same pointer for every
 element, although I created them sequentially (using [append]).

 (I guess something must be escaping me about pointers... I've noticed that
 within the same template, I get different pointers for elements on
 different y-levels, but the same pointer for all the element on the same
 y-level regardless of their x.)

 Cheers,

 Pierre

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


Re: [PD] Data structures and click event

2014-03-05 Thread Jonathan Wilkes

On 03/05/2014 05:24 AM, Pierre Massat wrote:

Dear list,

First of all i'd like to say that i'm very impressed by the potential 
of data structures in Pd. I've always kind of ignored this feature and 
it's a pity because it's really worth diving into it.
That being said I think that help and example patches are far from 
sufficient for beginners, and if it wasn't for Chris McCormick's 
s-abstractions I would have been able to really figure out how to use 
them (stuff like how to make an entire polygon draggable, how to use 
GOP with proper scaling, etc.).


It's not just the documentation, it's the interface.  Having to walk 
linked-lists of graphically unlinked objects is bad.  Having to use 
boilerplate to find the head of a glist just to create a scalar is bad.


I think Pd-l2ork is getting close to a release with my new data 
structure stuff in it.  It's a first step at addressing some of these 
issues.


-Jonathan



I m now stuck with a question. How can I identify the element which 
was just clicked ? I know that [struc] outputs the events, like click, 
selection and change, but I thought I could identify individual 
elements by their pointer id. It turns out that I get the same pointer 
for every element, although I created them sequentially (using [append]).


(I guess something must be escaping me about pointers... I've noticed 
that within the same template, I get different pointers for elements 
on different y-levels, but the same pointer for all the element on the 
same y-level regardless of their x.)


Cheers,

Pierre


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


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


Re: [PD] Data structures and their clickable area

2014-01-29 Thread Roman Haefeli
On Mon, 2014-01-27 at 21:34 -0500, Jonathan Wilkes wrote:
 On 01/27/2014 05:35 PM, Roman Haefeli wrote:
  Hi
 
  I'm using a template consisting of a rectangle done with [filledpolygon]
  and a number [drawnumber] in it. While mouse clicks anywhere in the area
  of the rectangle are detected, it's only possible to change the number
  with the keyboard when I exactly click on the number. Is there a way to
  make the number catch the keyboard no matter where I click in the
  rectangle?

 One possibility is to make the hotspot bbox settable. 

Actually, something like this would be on my wishlist. Knowing it does
not exist yet, I hoped for some kludge solution.

  Or maybe have a 
 method to forward widgetbehaviors to another drawing command.

Would certainly be interesting too, though having the hotspot area be
configurable would make this less important.

Anyway, thanks for your thoughts.

Roman 


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


Re: [PD] Data structures and their clickable area

2014-01-29 Thread Roman Haefeli
On Mon, 2014-01-27 at 21:34 -0500, Jonathan Wilkes wrote:
 On 01/27/2014 05:35 PM, Roman Haefeli wrote:

Similarly, I'd like to be able to mouse-drag anywhere in the
  rectangle in order to change the value of the number.
 
 You could probably do it if you use a field variable to define hotspots 
 on every 6x6 tile of the rectangle.  But you'd also have to constrain 
 movement of the rectangle by abusing the quanta syntax, something like 
 (-whatever:whatever)(0:0). 

Interesting idea.

  That would presumably constrain the field 
 variable's screen coordinates so that it doesn't move when you 
 click-drag it.

I'm not sure, if I fully understand the quanta syntax. I'd assumed that
something like x(-30:30)(0:0) would not allow any movement, as you
suggest. But it is still movable as if I'd use plain x (without quanta).
When I use something like x(-30:30)(-1:1), it jumps between -30 and 30.

   Then use the same field variable for your [drawnumber].

Unfortunately, when using quanta, the variable doesn't return the input
(my mouse movement), but the result. So the number jumps between -30 and
30 as well.

Roman



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


Re: [PD] Data structures and their clickable area

2014-01-29 Thread Roman Haefeli
On Die, 2014-01-28 at 12:40 +0100, João Pais wrote:
 there might be a complicated and confuse way of doing it - by clicking the  
 scalar, you activate a click message to the drawing window, that clicks in  
 the drawed number. For that you would have to look around the click  
 messages in the pd documents, which I didn't really understood so far.

Can you intercept mouse events done in the canvas? Can you even do it
without externals?

Roman

  On 01/27/2014 05:35 PM, Roman Haefeli wrote:
  Hi
 
  I'm using a template consisting of a rectangle done with [filledpolygon]
  and a number [drawnumber] in it. While mouse clicks anywhere in the area
  of the rectangle are detected, it's only possible to change the number
  with the keyboard when I exactly click on the number. Is there a way to
  make the number catch the keyboard no matter where I click in the
  rectangle?
 
  That's not possible.  Essentially what you want is to take a click from  
  one draw command-- [filledpolygon]-- and map it or forward it to  
  another-- [drawnumber].  Scalars don't give you any tools to hook in to  
  a parent drawing command's widgetbehavior that way.
 
Similarly, I'd like to be able to mouse-drag anywhere in the
  rectangle in order to change the value of the number.
 
  You could probably do it if you use a field variable to define hotspots  
  on every 6x6 tile of the rectangle.  But you'd also have to constrain  
  movement of the rectangle by abusing the quanta syntax, something like  
  (-whatever:whatever)(0:0).  That would presumably constrain the field  
  variable's screen coordinates so that it doesn't move when you  
  click-drag it.  Then use the same field variable for your [drawnumber].
 
  I'm almost finished with some new drawing instructions for data  
  structures in Pd-l2ork that implement a subset of the svg spec. I've got  
  some mouseover/mouseout widgetbehaviors working, but still nothing  
  particularly sophisticated in terms of mapping mouse/keyboard  
  interaction to field variables.
 
  One possibility is to make the hotspot bbox settable.  Or maybe have a  
  method to forward widgetbehaviors to another drawing command.
 
  -Jonathan
 
 
  Any ideas?
 
  Roman
 
 
 
  ___
  Pd-list@iem.at mailing list
  UNSUBSCRIBE and account-management -  
  http://lists.puredata.info/listinfo/pd-list
 
 
  ___
  Pd-list@iem.at mailing list
  UNSUBSCRIBE and account-management -  
  http://lists.puredata.info/listinfo/pd-list
 
 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list



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


Re: [PD] Data structures and their clickable area

2014-01-29 Thread Roman Haefeli
On Mon, 2014-01-27 at 23:35 +0100, Roman Haefeli wrote:
 Hi
 
 I'm using a template consisting of a rectangle done with [filledpolygon]
 and a number [drawnumber] in it. While mouse clicks anywhere in the area
 of the rectangle are detected, it's only possible to change the number
 with the keyboard when I exactly click on the number. Is there a way to
 make the number catch the keyboard no matter where I click in the
 rectangle?

To answer my own question: I had some thought about dealing with the
'capture the keyboard' part. When clicking the rectangle, I could use
the pointer to route keyboards events from [keyname] to the clicked
scalar. This way, I could even use 'Left' and 'Right' key events to move
the scalar selection with the keyboard. This would allow to set a whole
array of numbers by only using the keyboard. It's still not clear how to
unselect the whole thing, when data entry is completed, though. I
believe many interfaces allow de-select something by clicking anywhere
nearby. Don't know if that is feasible in Pd. Using a key would be
another option. The 'Escape' key, for instance. 


Roman



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


Re: [PD] Data structures and their clickable area

2014-01-29 Thread Jonathan Wilkes

On 01/29/2014 05:40 PM, Roman Haefeli wrote:

On Mon, 2014-01-27 at 21:34 -0500, Jonathan Wilkes wrote:

On 01/27/2014 05:35 PM, Roman Haefeli wrote:

Hi

I'm using a template consisting of a rectangle done with [filledpolygon]
and a number [drawnumber] in it. While mouse clicks anywhere in the area
of the rectangle are detected, it's only possible to change the number
with the keyboard when I exactly click on the number. Is there a way to
make the number catch the keyboard no matter where I click in the
rectangle?

One possibility is to make the hotspot bbox settable.

Actually, something like this would be on my wishlist. Knowing it does
not exist yet, I hoped for some kludge solution.


It would literally be five minutes of dev time.  But I'm not sure it's 
the ideal solution since often you want a hotspot to exceed the formal 
bounds of an object, and this wouldn't do that.


Still, I'll code it up and see how it works.




  Or maybe have a
method to forward widgetbehaviors to another drawing command.

Would certainly be interesting too, though having the hotspot area be
configurable would make this less important.


Probably best to just fool around with Raphael.js or some such library 
to see what it does, and see what can be ported.


-Jonathan



Anyway, thanks for your thoughts.

Roman


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





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


Re: [PD] Data structures and their clickable area

2014-01-28 Thread João Pais
there might be a complicated and confuse way of doing it - by clicking the  
scalar, you activate a click message to the drawing window, that clicks in  
the drawed number. For that you would have to look around the click  
messages in the pd documents, which I didn't really understood so far.


João


On 01/27/2014 05:35 PM, Roman Haefeli wrote:

Hi

I'm using a template consisting of a rectangle done with [filledpolygon]
and a number [drawnumber] in it. While mouse clicks anywhere in the area
of the rectangle are detected, it's only possible to change the number
with the keyboard when I exactly click on the number. Is there a way to
make the number catch the keyboard no matter where I click in the
rectangle?


That's not possible.  Essentially what you want is to take a click from  
one draw command-- [filledpolygon]-- and map it or forward it to  
another-- [drawnumber].  Scalars don't give you any tools to hook in to  
a parent drawing command's widgetbehavior that way.



  Similarly, I'd like to be able to mouse-drag anywhere in the
rectangle in order to change the value of the number.


You could probably do it if you use a field variable to define hotspots  
on every 6x6 tile of the rectangle.  But you'd also have to constrain  
movement of the rectangle by abusing the quanta syntax, something like  
(-whatever:whatever)(0:0).  That would presumably constrain the field  
variable's screen coordinates so that it doesn't move when you  
click-drag it.  Then use the same field variable for your [drawnumber].


I'm almost finished with some new drawing instructions for data  
structures in Pd-l2ork that implement a subset of the svg spec. I've got  
some mouseover/mouseout widgetbehaviors working, but still nothing  
particularly sophisticated in terms of mapping mouse/keyboard  
interaction to field variables.


One possibility is to make the hotspot bbox settable.  Or maybe have a  
method to forward widgetbehaviors to another drawing command.


-Jonathan



Any ideas?

Roman



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



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


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


[PD] Data structures and their clickable area

2014-01-27 Thread Roman Haefeli
Hi

I'm using a template consisting of a rectangle done with [filledpolygon]
and a number [drawnumber] in it. While mouse clicks anywhere in the area
of the rectangle are detected, it's only possible to change the number
with the keyboard when I exactly click on the number. Is there a way to
make the number catch the keyboard no matter where I click in the
rectangle? Similarly, I'd like to be able to mouse-drag anywhere in the
rectangle in order to change the value of the number. 

Any ideas?

Roman



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


Re: [PD] Data structures and their clickable area

2014-01-27 Thread Jonathan Wilkes

On 01/27/2014 05:35 PM, Roman Haefeli wrote:

Hi

I'm using a template consisting of a rectangle done with [filledpolygon]
and a number [drawnumber] in it. While mouse clicks anywhere in the area
of the rectangle are detected, it's only possible to change the number
with the keyboard when I exactly click on the number. Is there a way to
make the number catch the keyboard no matter where I click in the
rectangle?


That's not possible.  Essentially what you want is to take a click from 
one draw command-- [filledpolygon]-- and map it or forward it to 
another-- [drawnumber].  Scalars don't give you any tools to hook in to 
a parent drawing command's widgetbehavior that way.



  Similarly, I'd like to be able to mouse-drag anywhere in the
rectangle in order to change the value of the number.


You could probably do it if you use a field variable to define hotspots 
on every 6x6 tile of the rectangle.  But you'd also have to constrain 
movement of the rectangle by abusing the quanta syntax, something like 
(-whatever:whatever)(0:0).  That would presumably constrain the field 
variable's screen coordinates so that it doesn't move when you 
click-drag it.  Then use the same field variable for your [drawnumber].


I'm almost finished with some new drawing instructions for data 
structures in Pd-l2ork that implement a subset of the svg spec. I've got 
some mouseover/mouseout widgetbehaviors working, but still nothing 
particularly sophisticated in terms of mapping mouse/keyboard 
interaction to field variables.


One possibility is to make the hotspot bbox settable.  Or maybe have a 
method to forward widgetbehaviors to another drawing command.


-Jonathan



Any ideas?

Roman



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



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


Re: [PD] Data structures: no object for freeing pointers?

2013-06-23 Thread João Pais
 I'd like one day to understand how to implement DS into a GOP, it's a  
bit triky,

then on a single window it's possible to have the whole interface.


I wrote something about it in a thread some weeks ago:  
http://lists.puredata.info/pipermail/pd-list/2013-05/102819.html


it's not really possible to do this in the context we're talking about  
because we don't know which scalar is modified when it's embedded into  
an array, a way would be about using y value, but in this case y is  
always = 0


ah, you mean an element instead of a scalar (although they're all  
scalars when drawn). the only way I would remember now would be use the  
[struct] output to trigger a comparation of the previous array with the  
current one, saved as lists. not optimal at all, but it can work if there  
aren't too many elements.


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


Re: [PD] Data structures: no object for freeing pointers?

2013-06-21 Thread João Pais
Yes with visibility setting we can access an element of an array only,  
so each state can be stored, retrieved, replaced at will by accessing an  
element of te array... The matter is how accessing an element, idealy it  
would be a [nbx] where max value is the number of array elements, or a


that's very easy, just get the number of elements from the array's  
pointer, and send it as [max $1( to the nbox (or whichever command defines  
the limits, I don't have Pd open).



scalar but I don't how it's possible to fix limits to [drawnumber]


I think not from the gui. Unless you enforce it programatically: route the  
change output from the [struct] in the template, and use it to force the  
maximum number to a [set] object. Like:


[struct drawnumber...]
|
[route change]
|
[50(  (assuming 50 is the current max number)
|
[set drawnumber...]


In a parallel part, the current pointer gets and sets the maximum number  
of elements (now at 50)


Look at the current help file for [drawnumber] for more details.



De: João Pais jmmmp...@googlemail.com
À: pd-list pd-list@iem.at, Patrice Colet colet.patr...@free.fr
Envoyé: Jeudi 20 Juin 2013 11:09:26
Objet: Re: [PD] Data structures: no object for freeing pointers?

One approach is to assign a variable for active/unactive scalars. And
then
use that variable to render the scalar visible/invisible. After a
work
session, the user can hide the active scalars, display the inactive
ones,
and select + delete these. It's still far from ideal, but a
compromise.


 Envoyé: Mardi 11 Juin 2013 11:25:23
 Objet: Re: [PD] Data structures: no object for freeing pointers?

 On Die, 2013-06-11 at 11:00 +0200, Jan Baumgart wrote:
  I've been building a sequencer with data structs. But now I've
  come
  to a
  dead end, because there seems to be no object, that let's you
  remove
  structs.
  The only way seems to be deleting them in the gui.


 It's still possible to put only one pointer and then arrays on it,
 then
 you can add or delete at the last array item, or it's possible to
 put an
 id at each array element and then remove the element id to delete,
 then
 it's possible to have undo's.

 pc

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


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


Re: [PD] Data structures: no object for freeing pointers?

2013-06-21 Thread Patrice Colet


Colet Patrice

- Mail original -
 De: João Pais jmmmp...@googlemail.com
 À: pd-list pd-list@iem.at, Patrice Colet colet.patr...@free.fr
 Envoyé: Vendredi 21 Juin 2013 10:00:58
 Objet: Re: [PD] Data structures: no object for freeing pointers?
 
  Yes with visibility setting we can access an element of an array
  only,
  so each state can be stored, retrieved, replaced at will by
  accessing an
  element of te array... The matter is how accessing an element,
  idealy it
  would be a [nbx] where max value is the number of array elements,
  or a
 
 that's very easy, just get the number of elements from the array's
 pointer, and send it as [max $1( to the nbox (or whichever command
 defines
 the limits, I don't have Pd open).
 

 Without opening pd I think it's something like range $1 $2
and that's what I'm doing when controlling DS from GOP,
it seems the best way to go..

 I'd like one day to understand how to implement DS into a GOP, it's a bit 
triky,
then on a single window it's possible to have the whole interface.

  scalar but I don't how it's possible to fix limits to [drawnumber]
 
 I think not from the gui. Unless you enforce it programatically:
 route the
 change output from the [struct] in the template, and use it to
 force the
 maximum number to a [set] object. Like:
 
 [struct drawnumber...]
 |
 [route change]
 |
 [50(  (assuming 50 is the current max number)
 |
 [set drawnumber...]
 
 
 In a parallel part, the current pointer gets and sets the maximum
 number
 of elements (now at 50)
 
 Look at the current help file for [drawnumber] for more details.
 

it's not really possible to do this in the context we're talking about because 
we don't know which scalar is modified when it's embedded into an array, a way 
would be about using y value, but in this case y is always = 0
 
  De: João Pais jmmmp...@googlemail.com
  À: pd-list pd-list@iem.at, Patrice Colet
  colet.patr...@free.fr
  Envoyé: Jeudi 20 Juin 2013 11:09:26
  Objet: Re: [PD] Data structures: no object for freeing pointers?
 
  One approach is to assign a variable for active/unactive scalars.
  And
  then
  use that variable to render the scalar visible/invisible. After a
  work
  session, the user can hide the active scalars, display the
  inactive
  ones,
  and select + delete these. It's still far from ideal, but a
  compromise.
 
  
   Envoyé: Mardi 11 Juin 2013 11:25:23
   Objet: Re: [PD] Data structures: no object for freeing
   pointers?
  
   On Die, 2013-06-11 at 11:00 +0200, Jan Baumgart wrote:
I've been building a sequencer with data structs. But now
I've
come
to a
dead end, because there seems to be no object, that let's you
remove
structs.
The only way seems to be deleting them in the gui.
  
  
   It's still possible to put only one pointer and then arrays on
   it,
   then
   you can add or delete at the last array item, or it's possible
   to
   put an
   id at each array element and then remove the element id to
   delete,
   then
   it's possible to have undo's.
  
   pc
  
   ___
   Pd-list@iem.at mailing list
   UNSUBSCRIBE and account-management -
   http://lists.puredata.info/listinfo/pd-list
 

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


Re: [PD] Data structures: no object for freeing pointers?

2013-06-20 Thread João Pais
One approach is to assign a variable for active/unactive scalars. And then  
use that variable to render the scalar visible/invisible. After a work  
session, the user can hide the active scalars, display the inactive ones,  
and select + delete these. It's still far from ideal, but a compromise.





Envoyé: Mardi 11 Juin 2013 11:25:23
Objet: Re: [PD] Data structures: no object for freeing pointers?

On Die, 2013-06-11 at 11:00 +0200, Jan Baumgart wrote:
 I've been building a sequencer with data structs. But now I've come
 to a
 dead end, because there seems to be no object, that let's you
 remove
 structs.
 The only way seems to be deleting them in the gui.



It's still possible to put only one pointer and then arrays on it, then  
you can add or delete at the last array item, or it's possible to put an  
id at each array element and then remove the element id to delete, then  
it's possible to have undo's.


pc

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


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


Re: [PD] Data structures: no object for freeing pointers?

2013-06-20 Thread Patrice Colet
Yes with visibility setting we can access an element of an array only, so each 
state can be stored, retrieved, replaced at will by accessing an element of te 
array... The matter is how accessing an element, idealy it would be a [nbx] 
where max value is the number of array elements, or a scalar but I don't how 
it's possible to fix limits to [drawnumber]

 De: João Pais jmmmp...@googlemail.com
 À: pd-list pd-list@iem.at, Patrice Colet colet.patr...@free.fr
 Envoyé: Jeudi 20 Juin 2013 11:09:26
 Objet: Re: [PD] Data structures: no object for freeing pointers?
 
 One approach is to assign a variable for active/unactive scalars. And
 then
 use that variable to render the scalar visible/invisible. After a
 work
 session, the user can hide the active scalars, display the inactive
 ones,
 and select + delete these. It's still far from ideal, but a
 compromise.
 
 
  Envoyé: Mardi 11 Juin 2013 11:25:23
  Objet: Re: [PD] Data structures: no object for freeing pointers?
 
  On Die, 2013-06-11 at 11:00 +0200, Jan Baumgart wrote:
   I've been building a sequencer with data structs. But now I've
   come
   to a
   dead end, because there seems to be no object, that let's you
   remove
   structs.
   The only way seems to be deleting them in the gui.
 
 
  It's still possible to put only one pointer and then arrays on it,
  then
  you can add or delete at the last array item, or it's possible to
  put an
  id at each array element and then remove the element id to delete,
  then
  it's possible to have undo's.
 
  pc
 
  ___
  Pd-list@iem.at mailing list
  UNSUBSCRIBE and account-management -
  http://lists.puredata.info/listinfo/pd-list
 

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


[PD] Data structures: no object for freeing pointers?

2013-06-11 Thread Jan Baumgart
I've been building a sequencer with data structs. But now I've come to a 
dead end, because there seems to be no object, that let's you remove 
structs.

The only way seems to be deleting them in the gui.

Am I missing something here?

cheers,
Jan

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


Re: [PD] Data structures: no object for freeing pointers?

2013-06-11 Thread Roman Haefeli
On Die, 2013-06-11 at 11:00 +0200, Jan Baumgart wrote:
 I've been building a sequencer with data structs. But now I've come to a 
 dead end, because there seems to be no object, that let's you remove 
 structs.
 The only way seems to be deleting them in the gui.

I think that is one of the limitations of data structures in Pd. You can
clear a whole canvas, but not a single scalar, programmatically at
least. 

The limitations of data structures have been discussed recently:
http://lists.puredata.info/pipermail/pd-list/2013-05/102808.html

a bit less recent post:
http://lists.puredata.info/pipermail/pd-list/2011-04/088309.html

Roman



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


[PD] Data structures: Detect array changes

2013-06-11 Thread Roman Haefeli
Hi all

Actually, the same question applies to normal tables as well, but I know
that plain Pd does not provide a way to detect changes, whereas Pd-l2ork
does.

What about data structure arrays? Is there some hidden way to detect
changes? I can detect clicks, but I found nothing else.

Roman



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


[PD] Data Structures: Lower and upper bound for graphical arrays

2013-06-11 Thread Roman Haefeli
On a related note, is there a way to limit y for arrays with mutable y?
If there'd be a way to detect changes, this would be actually easy to
implement.

Roman



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


Re: [PD] Data structures: no object for freeing pointers?

2013-06-11 Thread Patrice Colet

 Envoyé: Mardi 11 Juin 2013 11:25:23
 Objet: Re: [PD] Data structures: no object for freeing pointers?
 
 On Die, 2013-06-11 at 11:00 +0200, Jan Baumgart wrote:
  I've been building a sequencer with data structs. But now I've come
  to a
  dead end, because there seems to be no object, that let's you
  remove
  structs.
  The only way seems to be deleting them in the gui.
 

It's still possible to put only one pointer and then arrays on it, then you can 
add or delete at the last array item, or it's possible to put an id at each 
array element and then remove the element id to delete, then it's possible to 
have undo's. 

pc

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


Re: [PD] Data Structures: Lower and upper bound for graphical arrays

2013-06-11 Thread Jonathan Wilkes


 From: Roman Haefeli reduz...@gmail.com
To: pd-list pd-list@iem.at 
Sent: Tuesday, June 11, 2013 6:02 AM
Subject: [PD] Data Structures: Lower and upper bound for graphical arrays
 

On a related note, is there a way to limit y for arrays with mutable y?
If there'd be a way to detect changes, this would be actually easy to
implement.

There isn't a way to detect changes.

But you can limit y with the -y flag of [plot]:
[plot -y y(0:100)(0:100) etc.]
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Data structures: no object for freeing pointers?

2013-06-11 Thread Miller Puckette
I find the data structure deign extremely limited and have been thinking for
years about how to make it more powerful.  I have a rather weak idea about
alowing deletion of individual items in lists that I'm planning to try out in
the run-up to the next release - not that that can help you right now.

(In addition to the manifold problems that others have noted I'll add more
fundamental ones: 

fundamentally clunky pointer mechanism
difficulty of making numerically accurate changes on visual data structures
(except by escaping to a text represntation ala 'properties' :)

cheers
Miller

On Tue, Jun 11, 2013 at 03:04:10PM +0200, Patrice Colet wrote:
 
  Envoyé: Mardi 11 Juin 2013 11:25:23
  Objet: Re: [PD] Data structures: no object for freeing pointers?
  
  On Die, 2013-06-11 at 11:00 +0200, Jan Baumgart wrote:
   I've been building a sequencer with data structs. But now I've come
   to a
   dead end, because there seems to be no object, that let's you
   remove
   structs.
   The only way seems to be deleting them in the gui.
  
 
 It's still possible to put only one pointer and then arrays on it, then you 
 can add or delete at the last array item, or it's possible to put an id at 
 each array element and then remove the element id to delete, then it's 
 possible to have undo's. 
 
 pc
 
 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list

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


Re: [PD] Data Structures: Lower and upper bound for graphical arrays

2013-06-11 Thread Roman Haefeli
On Die, 2013-06-11 at 08:37 -0700, Jonathan Wilkes wrote:
 
 
 __
 From: Roman Haefeli reduz...@gmail.com
 To: pd-list pd-list@iem.at 
 Sent: Tuesday, June 11, 2013 6:02 AM
 Subject: [PD] Data Structures: Lower and upper bound for graphical
 arrays
 
 
 On a related note, is there a way to limit y for arrays with mutable
 y?
 If there'd be a way to detect changes, this would be actually easy to
 implement.
 
 There isn't a way to detect changes.
 
 But you can limit y with the -y flag of [plot]:
 [plot -y y(0:100)(0:100) etc.]

Ah, that is much more elegant than what seems impossible. Nice, thanks!

Roman



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


Re: [PD] data structures in abstractions

2012-12-09 Thread João Pais

Hi,

I noticed the gop doesn't work on pd-ext 0.42-5, but it works on 0.43-4  
(w7).
Another bug that was already there: if you drag one control point to  
outside the gop window, the struct doesn't respond to the mouse control  
anymore - although it still works properly. In my abstraction  
[jmmmp/bezier] I use messages to put the struct back into the gop  
boundaries.


About the name and arguments always showing, it's a bit annoying. I think  
I made an extra [donecanvasdialog 1 -1 2 -20 120 120 -20 $1 $2 0 0, dirty  
0( in [bezier] to enforce this choice. Maybe there's something broken in  
the code, that it doesn't let the option be taken?


João


Thanks Jonathan
You are a magician. You said it works, so now it does no bugs.
The only thing I can't get rid of is the datawindow name appearing in  
the graph on parent. No matter how many times I turn it off, once I save  
it and load it again, it comes back on.

The name of the main graph on parent does not show, only of the subpatch
I attached the abstraction here
Cheers
Eldad





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


Re: [PD] data structures in abstractions

2012-11-28 Thread João Pais

Hi,

I don't have much time to look at patches now. You can see my abstractions  
[jmmmp/bezier], [jmmmp/swatch], to see if there's something you find  
interesting for your problem. They should be in pd-extended.


Best,

João


Thanks Jonathan
You are a magician. You said it works, so now it does no bugs.
The only thing I can't get rid of is the datawindow name appearing in  
the graph on parent. No matter how many times I turn it off, once I save  
it and load it again, it comes back on.

The name of the main graph on parent does not show, only of the subpatch
I attached the abstraction here
Cheers
Eldad


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


[PD] data structures in abstractions

2012-11-27 Thread eldad tsabary
Hello all
Is there a way to include a data structure graphical shape (filledpolygon for 
example) inside an abstraction's graph on parent?
I saw that when trying to add a graph on parent in the data window it messes up 
everything.
Thanks
Eldad



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


Re: [PD] data structures in abstractions

2012-11-27 Thread Jonathan Wilkes
- Original Message -

 From: eldad tsabary tazberryd...@gmail.com
 To: pd-list@iem.at
 Cc: 
 Sent: Tuesday, November 27, 2012 1:48 PM
 Subject: [PD] data structures in abstractions
 
 Hello all
 Is there a way to include a data structure graphical shape (filledpolygon for 
 example) inside an abstraction's graph on parent?
 I saw that when trying to add a graph on parent in the data window it messes 
 up 
 everything.
 Thanks
 Eldad

Hi Eldad,
 You have to adjust the x range and y range in the canvas properties to be 
in
agreement with the x and y size in the canvas properties.  So if x size is 85, 
make
the range 0 to 84, and do a similar process for the y.
 I think it's done this way for Put menu arrays where you would have a 
different
y range depending on the situation.  However, drawing instructions like [plot] 
give the
ability to scale the values of a scalar to some screen pixel range so I don't 
get why
this range business is part of the canvas properties (or the canvas class for 
that
matter).

-Jonathan

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

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


Re: [PD] data structures in abstractions

2012-11-27 Thread eldad tsabary
Great
It works fairly well with graph on parent of the subpatch (datawindow)
However, if I try to make the entire patch into an abstraction and have a graph 
on parent of the main window containing the graph from the subpatch it doesn't 
work so well.
It seems to display in another patch but buggy, and it also doesn't allow me to 
drag and drop the polygon joints.
Do you know if this should work and how?
Many thanks again
Eldad




 

On 2012-11-27, at 3:09 PM, Jonathan Wilkes wrote:

 - Original Message -
 
 From: eldad tsabary tazberryd...@gmail.com
 To: pd-list@iem.at
 Cc: 
 Sent: Tuesday, November 27, 2012 1:48 PM
 Subject: [PD] data structures in abstractions
 
 Hello all
 Is there a way to include a data structure graphical shape (filledpolygon 
 for 
 example) inside an abstraction's graph on parent?
 I saw that when trying to add a graph on parent in the data window it messes 
 up 
 everything.
 Thanks
 Eldad
 
 Hi Eldad,
  You have to adjust the x range and y range in the canvas properties to 
 be in
 agreement with the x and y size in the canvas properties.  So if x size is 
 85, make
 the range 0 to 84, and do a similar process for the y.
  I think it's done this way for Put menu arrays where you would have a 
 different
 y range depending on the situation.  However, drawing instructions like 
 [plot] give the
 ability to scale the values of a scalar to some screen pixel range so I don't 
 get why
 this range business is part of the canvas properties (or the canvas class 
 for that
 matter).
 
 -Jonathan
 
 
 
 
 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list
 


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


Re: [PD] data structures in abstractions

2012-11-27 Thread Jonathan Wilkes
- Original Message -

 From: eldad tsabary tazberryd...@gmail.com
 To: pd-list@iem.at
 Cc: 
 Sent: Tuesday, November 27, 2012 10:31 PM
 Subject: Re: [PD] data structures in abstractions
 
G reat
 It works fairly well with graph on parent of the subpatch (datawindow)
 However, if I try to make the entire patch into an abstraction and have a 
 graph 
 on parent of the main window containing the graph from the subpatch it 
 doesn't work so well.
 It seems to display in another patch but buggy, and it also doesn't allow me 
 to drag and drop the polygon joints.
 Do you know if this should work and how?
 Many thanks again
 Eldad

Works for me-- I don't get any difference between gop subpatch (or nested 
subpatches)
vs. gop abstraction.  I can click and drag the joints the same as before.

What is buggy?

-Jonathan

 
 
 
 
 
 
 On 2012-11-27, at 3:09 PM, Jonathan Wilkes wrote:
 
  - Original Message -
 
  From: eldad tsabary tazberryd...@gmail.com
  To: pd-list@iem.at
  Cc: 
  Sent: Tuesday, November 27, 2012 1:48 PM
  Subject: [PD] data structures in abstractions
 
  Hello all
  Is there a way to include a data structure graphical shape 
 (filledpolygon for 
  example) inside an abstraction's graph on parent?
  I saw that when trying to add a graph on parent in the data window it 
 messes up 
  everything.
  Thanks
  Eldad
 
  Hi Eldad,
       You have to adjust the x range and y range in the canvas properties to 
 be in
  agreement with the x and y size in the canvas properties.  So if x 
 size is 85, make
  the range 0 to 84, and do a similar process for the y.
       I think it's done this way for Put menu arrays where 
 you would have a different
  y range depending on the situation.  However, drawing instructions like 
 [plot] give the
  ability to scale the values of a scalar to some screen pixel range so I 
 don't get why
  this range business is part of the canvas properties (or the 
 canvas class for that
  matter).
 
  -Jonathan
 
 
 
 
  ___
  Pd-list@iem.at mailing list
  UNSUBSCRIBE and account-management - 
  http://lists.puredata.info/listinfo/pd-list
 
 
 
 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list
 

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


Re: [PD] data structures in abstractions

2012-11-27 Thread eldad tsabary
Thanks Jonathan
You are a magician. You said it works, so now it does no bugs.
The only thing I can't get rid of is the datawindow name appearing in the graph 
on parent. No matter how many times I turn it off, once I save it and load it 
again, it comes back on.
The name of the main graph on parent does not show, only of the subpatch
I attached the abstraction here
Cheers
Eldad






randomPolygon.pd
Description: Binary data


randomPolygon-help.pd
Description: Binary data



On 2012-11-27, at 11:11 PM, Jonathan Wilkes wrote:

 - Original Message -
 
 From: eldad tsabary tazberryd...@gmail.com
 To: pd-list@iem.at
 Cc: 
 Sent: Tuesday, November 27, 2012 10:31 PM
 Subject: Re: [PD] data structures in abstractions
 
 G reat
 It works fairly well with graph on parent of the subpatch (datawindow)
 However, if I try to make the entire patch into an abstraction and have a 
 graph 
 on parent of the main window containing the graph from the subpatch it 
 doesn't work so well.
 It seems to display in another patch but buggy, and it also doesn't allow me 
 to drag and drop the polygon joints.
 Do you know if this should work and how?
 Many thanks again
 Eldad
 
 Works for me-- I don't get any difference between gop subpatch (or nested 
 subpatches)
 vs. gop abstraction.  I can click and drag the joints the same as before.
 
 What is buggy?
 
 -Jonathan
 
 
 
 
 
 
 
 On 2012-11-27, at 3:09 PM, Jonathan Wilkes wrote:
 
 - Original Message -
 
 From: eldad tsabary tazberryd...@gmail.com
 To: pd-list@iem.at
 Cc: 
 Sent: Tuesday, November 27, 2012 1:48 PM
 Subject: [PD] data structures in abstractions
 
 Hello all
 Is there a way to include a data structure graphical shape 
 (filledpolygon for 
 example) inside an abstraction's graph on parent?
 I saw that when trying to add a graph on parent in the data window it 
 messes up 
 everything.
 Thanks
 Eldad
 
 Hi Eldad,
   You have to adjust the x range and y range in the canvas properties 
 to 
 be in
 agreement with the x and y size in the canvas properties.  So if x 
 size is 85, make
 the range 0 to 84, and do a similar process for the y.
   I think it's done this way for Put menu arrays where 
 you would have a different
 y range depending on the situation.  However, drawing instructions like 
 [plot] give the
 ability to scale the values of a scalar to some screen pixel range so I 
 don't get why
 this range business is part of the canvas properties (or the 
 canvas class for that
 matter).
 
 -Jonathan
 
 
 
 
 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list
 
 
 
 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list
 

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


[PD] Data Structures - Scaling Visual Display - (1:10)(2:200)

2012-06-29 Thread JF
I can't remember where I've seen it but you can create a struct like so...

[struct structname float x(1:10)(2:200)]

...such that x displays more tightly or loosely and with boundaries depending 
on the values in the brackets. But I can't figure how to enter the values 
properly!


My question is, how do you set the values in the brackets? What do they refer 
to?!

Is there any documentation available on this?

Thanks,
John.

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


Re: [PD] Data Structures - Scaling Visual Display - (1:10)(2:200)

2012-06-29 Thread Miller Puckette
There's a somewhat lame explanation in doc/4.data.structures/09.scaling.pd

-- in brief, 1:10 in the example below says that the value of x is restricted
to the range 1-10, and this range is linearly rescaled to values 2-200 in
the coordinates of the patch.

cheers
Miller

On Fri, Jun 29, 2012 at 06:50:21PM -0700, JF wrote:
 I can't remember where I've seen it but you can create a struct like so...
 
 [struct structname float x(1:10)(2:200)]
 
 ...such that x displays more tightly or loosely and with boundaries depending 
 on the values in the brackets. But I can't figure how to enter the values 
 properly!
 
 
 My question is, how do you set the values in the brackets? What do they refer 
 to?!
 
 Is there any documentation available on this?
 
 Thanks,
 John.
 
 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list

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


[PD] data structures- polygones with and without arrays

2012-03-22 Thread Mirko Maier
hi list,

is there a way to have in one window both polygones with and without arrays? 
at least i can define two separate templates, but then the pointer gets 
confused.
on pd-ext 0.42, Win XP. thanks for help.

cheers
mirko
-- 
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!  

Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a

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


Re: [PD] data structures- polygones with and without arrays

2012-03-22 Thread Jonathan Wilkes
- Original Message -

 From: Mirko Maier mir...@gmx.de
 To: pd-list@iem.at
 Cc: 
 Sent: Thursday, March 22, 2012 12:05 PM
 Subject: [PD] data structures- polygones with and without arrays
 
 hi list,
 
 is there a way to have in one window both polygones with and without arrays? 
 at least i can define two separate templates, but then the pointer gets 
 confused.
 on pd-ext 0.42, Win XP. thanks for help.

If you use arguments like [pointer foo bar] it will send pointers for scalar 
foo 
and scalar bar to different outlets.

-Jonathan

 
 cheers
 mirko
 -- 
 NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!                        
   
         
 Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a
 
 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list
 

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


Re: [PD] Data Structures - Delete specific scalar?

2011-04-28 Thread João Pais

Hi,

I looked at your sequencer. I didn't play around with it, but I wonder if  
you are better off using an array instead of X scalars? As I suggested  
before, you can use a variable to decide if the data is active or not,  
it's not really necessary to erase it from the patch. Also on the  
graphical side, it should be possible to hide individual array elements  
using the -v command (or not? I didn't try yet, but it works with  
individual scalars).


João


Is there any message based way to delete a scalar?

As I presume what people usually do is select the graphic in the  
datawindow and

delete it this way. I need to do this without the graphical selection.

I'm currently using data structures just as a multi-dimensional storage  
object

(the graphical side doesn't concern me). I've developed [data/drip] and
[data/filter] patches akin to [list-drip] and [list-filter]. I'm now  
looking to
create an object where I can remove specific scalars based on whether or  
not

their value fields match a certain condition (via [data/filter]).


Thanks in advance as always,
John.


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



--
Friedenstr. 58
10249 Berlin (Deutschland)
Tel +49 30 42020091 | Mob +49 162 6843570
Studio +49 30 69509190
jmmmp...@googlemail.com | skype: jmmmpjmmmp

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


Re: [PD] Data Structures - Delete specific scalar?

2011-04-23 Thread JF
Thanks João,

I'm looking into a brute force workaround whereupon I drip the data structure 
and copy it to a buffer structure but with the scalars that I want to delete 
filtered out - then I clone this buffer back to the original thus deleting 
certain scalars. This should work for my needs.

Also as an aside, I'm just reading Frank's data structure tutorial patches (I'm 
a beginner to this topic!). I really think that these should be added to the 
official vanilla documentation.

Cheers, John.



- Original Message 
 From: João Pais jmmmp...@googlemail.com
 To: JF sainti...@yahoo.com
 Sent: Sat, 23 April, 2011 1:38:27
 Subject: Re: [PD] Data Structures - Delete specific scalar?
 
 unfortunately, that and many other basic things aren't possible with data-s 
yet.  there are a couple ways you could use to circumvent this limitation:
 
 -  use a field for active or unactive scalars, and set them to 0 or 1. then 
connect  them to a spigot or similar, so that the other fields don't go 
through 
the rest  of the patch. You can also connect this to the -v (?) field, to make 
this scalar  invisible.
 - if you want to be radical, get the coordinates of your scalar,  and using 
pd-messages, emulate the mouse's behaviour of going to edit mode,  selecting 
the 
scalar and deleting it.
 
 Or write the st. puckette and tell  him about putting this in.
 
 João Pais
 
  Is there any message  based way to delete a scalar?
  
  As I presume what people usually  do is select the graphic in the 
  datawindow 
and
  delete it this way. I  need to do this without the graphical selection.
  
  I'm currently  using data structures just as a multi-dimensional storage 
object
  (the  graphical side doesn't concern me). I've developed [data/drip] and
   [data/filter] patches akin to [list-drip] and [list-filter]. I'm now 
  looking  
to
  create an object where I can remove specific scalars based on whether  or 
not
  their value fields match a certain condition (via  [data/filter]).
  
  
  Thanks in advance as always,
   John.
  
  
   ___
  Pd-list@iem.at mailing list
  UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list
 
 
 --Friedenstr.  58
 10249 Berlin (Deutschland)
 Tel +49 30 42020091 | Mob +49 162  6843570
 Studio +49 30 69509190
 jmmmp...@googlemail.com | skype:  jmmmpjmmmp
 

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


[PD] Data Structures - Delete specific scalar?

2011-04-22 Thread JF
Is there any message based way to delete a scalar?

As I presume what people usually do is select the graphic in the datawindow and 
delete it this way. I need to do this without the graphical selection.

I'm currently using data structures just as a multi-dimensional storage object 
(the graphical side doesn't concern me). I've developed [data/drip] and 
[data/filter] patches akin to [list-drip] and [list-filter]. I'm now looking to 
create an object where I can remove specific scalars based on whether or not 
their value fields match a certain condition (via [data/filter]).


Thanks in advance as always,
John.


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


Re: [PD] Data Structures GOP and installing latest PD

2011-04-06 Thread João Pais

I didn't know you could GOP data structures.
This opens up a new world.
Where is an up to date tutorial on using data structures?


I've prepared a DS tutorial that some people liked. But since I've spent  
some time on it, I would prefer to be given the chance to present that  
more often before spreading it around as I usually do with my other stuff.


There's also an old tutorial by F Barknecht around, but I don't know  
anymore where.


João Pais

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


Re: [PD] Data Structures GOP and installing latest PD

2011-04-05 Thread João Pais

If you set the canvas size to 1,1 the subpatch shows up about the same
size as the default array canvas size. I done some experimenting with


ah yes, that makes sense. since I only use the structures in the gop, I  
never cared about searching it better.




setting gop with pd-pdsubpatch and not donecanvasdialog but the other
message with fewer arguments. Couldn't you just send the canvas a
message to tell it whether it is a text atom or a graph? I looked
through the code for quite a while but could not find how this could
be done.


I don't speak C, so can't really say anything. but I would say, you can't.  
and anyway, doesn't matter which object it is, it gets the same treatment




I read somewhere that even if gui elements are not drawn in  a
subpatch they take use a lot of cpu.
Is this true? How much processing goes on for  gui elements when not  
visible?


I don't have any hard data to back this up, but I think not, only  
displayed elements count to cpu (maybe hidden ones count a bit?). my only  
way to be sure would be to make a stress test. but maybe someone else can  
say more about tcl/tk.


João

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


Re: [PD] Data Structures GOP and installing latest PD

2011-04-05 Thread Billy Stiltner
João,,

The other message that does gop is coords.
I do not know the complete message but this works

[toggle]
|
[coords 600 600 700 700 1 1 $1(
|
[s pd-pd-arrayz]


[pd pd-arrayz]

clicking toggle displays or hides [pd pd-arrayz]

your canvas and hradio on dsp is genious.
I could not find bezier or swatch. I will have to update my pd.
I did see the sliders it is pretty cool. thanks

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


Re: [PD] Data Structures GOP and installing latest PD

2011-04-05 Thread Mathieu Bouchard

On Mon, 4 Apr 2011, Billy Stiltner wrote:


I read somewhere that even if gui elements are not drawn in  a
subpatch they take use a lot of cpu.
Is this true? How much processing goes on for  gui elements when not visible?


Try it together with the Load Meter.

If you can't see a consistent difference of percentage, it means that it's 
not important.


Load Meter does not take into account the time spent in Tcl/Tk, but when a 
subpatch is hidden, this does not matter.


 ___
| Mathieu Bouchard  tél: +1.514.383.3801  Villeray, Montréal, QC
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Data Structures GOP and installing latest PD

2011-04-05 Thread João Pais

The other message that does gop is coords.
I do not know the complete message but this works

[toggle]
|
[coords 600 600 700 700 1 1 $1(
|
[s pd-pd-arrayz]


[pd pd-arrayz]

clicking toggle displays or hides [pd pd-arrayz]


I just tried around, and it looks like it does the same as  
donecanvasdialog, except the first 2 parameters, x+y canvas size. what you  
have as $1 also accept 2, which is the setting for GOP on+hide object  
name and arguments (quite useful). after that you can add 2 more numbers,  
for the x and y margins.


Don't change the settings much while the subpatch is opened, or tcl/tk  
will stop responding that well (but it doesn't crash pd).


João

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


Re: [PD] Data Structures GOP and installing latest PD

2011-04-05 Thread Jonathan Wilkes


--- On Tue, 4/5/11, João Pais jmmmp...@googlemail.com wrote:

 From: João Pais jmmmp...@googlemail.com
 Subject: Re: [PD] Data Structures GOP and installing latest PD
 To: Billy Stiltner billy.stilt...@gmail.com
 Cc: pd-list pd-list@iem.at, Jonathan Wilkes jancs...@yahoo.com
 Date: Tuesday, April 5, 2011, 6:22 PM
  The other message that does gop
 is coords.
  I do not know the complete message but this works
  
  [toggle]
  |
  [coords 600 600 700 700 1 1 $1(
  |
  [s pd-pd-arrayz]
  
  
  [pd pd-arrayz]
  
  clicking toggle displays or hides [pd pd-arrayz]
 
 I just tried around, and it looks like it does the same as
 donecanvasdialog, except the first 2 parameters, x+y canvas
 size. what you have as $1 also accept 2, which is the
 setting for GOP on+hide object name and arguments (quite
 useful). after that you can add 2 more numbers, for the x
 and y margins.
 
 Don't change the settings much while the subpatch is
 opened, or tcl/tk will stop responding that well (but it
 doesn't crash pd).

Not sure if it was mentioned, but I think donecanvasdialog sets the 
dirty flag and coords does not (if it matters to you).

-Jonathan

 
 João
 

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


Re: [PD] Data Structures GOP and installing latest PD

2011-04-05 Thread Billy Stiltner
João
Thanks for the zip. The abstractions are nice. I wonder if there is a
way to keep from moving the control points out of bounds on the
bezier. With a slider or numberbox it is easy just store a limit in an
f and when the slider value changes check to see if it is beyond limit
then do a delayed message to the slider to set the value to limit. You
could even put a message to canvas label beyond the outer limit
haha!.



On 4/5/11, Jonathan Wilkes jancs...@yahoo.com wrote:


 --- On Tue, 4/5/11, João Pais jmmmp...@googlemail.com wrote:

 From: João Pais jmmmp...@googlemail.com
 Subject: Re: [PD] Data Structures GOP and installing latest PD
 To: Billy Stiltner billy.stilt...@gmail.com
 Cc: pd-list pd-list@iem.at, Jonathan Wilkes jancs...@yahoo.com
 Date: Tuesday, April 5, 2011, 6:22 PM
  The other message that does gop
 is coords.
  I do not know the complete message but this works
 
  [toggle]
  |
  [coords 600 600 700 700 1 1 $1(
  |
  [s pd-pd-arrayz]
 
 
  [pd pd-arrayz]
 
  clicking toggle displays or hides [pd pd-arrayz]

 I just tried around, and it looks like it does the same as
 donecanvasdialog, except the first 2 parameters, x+y canvas
 size. what you have as $1 also accept 2, which is the
 setting for GOP on+hide object name and arguments (quite
 useful). after that you can add 2 more numbers, for the x
 and y margins.

 Don't change the settings much while the subpatch is
 opened, or tcl/tk will stop responding that well (but it
 doesn't crash pd).

 Not sure if it was mentioned, but I think donecanvasdialog sets the
 dirty flag and coords does not (if it matters to you).

 -Jonathan


 João



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


Re: [PD] Data Structures GOP and installing latest PD

2011-04-05 Thread Jonathan Wilkes


--- On Tue, 4/5/11, Billy Stiltner billy.stilt...@gmail.com wrote:

 From: Billy Stiltner billy.stilt...@gmail.com
 Subject: Re: [PD] Data Structures GOP and installing latest PD
 To: Jonathan Wilkes jancs...@yahoo.com
 Cc: João Pais jmmmp...@googlemail.com, pd-list pd-list@iem.at
 Date: Tuesday, April 5, 2011, 8:36 PM
 João
 Thanks for the zip. The abstractions are nice. I wonder if
 there is a
 way to keep from moving the control points out of bounds on
 the
 bezier. With a slider or numberbox it is easy just store a
 limit in an
 f and when the slider value changes check to see if it is
 beyond limit
 then do a delayed message to the slider to set the value to
 limit.

You can do that with data structures, too.

 You
 could even put a message to canvas label beyond the outer
 limit
 haha!.
 
 
 
 On 4/5/11, Jonathan Wilkes jancs...@yahoo.com
 wrote:
 
 
  --- On Tue, 4/5/11, João Pais jmmmp...@googlemail.com
 wrote:
 
  From: João Pais jmmmp...@googlemail.com
  Subject: Re: [PD] Data Structures GOP and
 installing latest PD
  To: Billy Stiltner billy.stilt...@gmail.com
  Cc: pd-list pd-list@iem.at,
 Jonathan Wilkes jancs...@yahoo.com
  Date: Tuesday, April 5, 2011, 6:22 PM
   The other message that does gop
  is coords.
   I do not know the complete message but this
 works
  
   [toggle]
   |
   [coords 600 600 700 700 1 1 $1(
   |
   [s pd-pd-arrayz]
  
  
   [pd pd-arrayz]
  
   clicking toggle displays or hides [pd
 pd-arrayz]
 
  I just tried around, and it looks like it does the
 same as
  donecanvasdialog, except the first 2 parameters,
 x+y canvas
  size. what you have as $1 also accept 2, which is
 the
  setting for GOP on+hide object name and
 arguments (quite
  useful). after that you can add 2 more numbers,
 for the x
  and y margins.
 
  Don't change the settings much while the subpatch
 is
  opened, or tcl/tk will stop responding that well
 (but it
  doesn't crash pd).
 
  Not sure if it was mentioned, but I think
 donecanvasdialog sets the
  dirty flag and coords does not (if it matters to
 you).
 
  -Jonathan
 
 
  João
 
 
 

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


Re: [PD] Data Structures GOP and installing latest PD

2011-04-05 Thread João Pais
just like jonathan said, you can do that with data structures, just add  
the parenthesis scales to the variable declaration. I just don't leave the  
limit in, because you can still define extreme positions (for example,  
controling the points with messages instead of mouse click).



João
Thanks for the zip. The abstractions are nice. I wonder if there is a
way to keep from moving the control points out of bounds on the
bezier. With a slider or numberbox it is easy just store a limit in an
f and when the slider value changes check to see if it is beyond limit
then do a delayed message to the slider to set the value to limit. You
could even put a message to canvas label beyond the outer limit
haha!.


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


[PD] Data Structures GOP and installing latest PD

2011-04-04 Thread Billy Stiltner
Hey

I didn't know you could GOP data structures.
This opens up a new world.
Where is an up to date tutorial on using data structures?

I'm about to install PD 0.43. I have a test4 version installed as well
as pdx 0.42.5 and vanilla 0.42.5.
I have a couple of libraries loaded with vanilla - GEM and GGE. How
will the new version efect these installations?

Also on LINUX I have with UBUNTU studio 10.10 pd 0.42.5 with all the
exts available and then on puredyne I think my vanilla installation is
messed up because I had to edit the config files to get pdL2ORK to
run. Should be fine if I just replace the config files with the
originals.

Where is some god documentation on installing multiple versions of PD.
What should I look out for when using so many different installations.

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


Re: [PD] Data Structures GOP and installing latest PD

2011-04-04 Thread Jonathan Wilkes


--- On Mon, 4/4/11, Billy Stiltner billy.stilt...@gmail.com wrote:

 From: Billy Stiltner billy.stilt...@gmail.com
 Subject: [PD] Data Structures GOP and installing latest PD
 To: pd-list pd-list@iem.at
 Date: Monday, April 4, 2011, 9:37 PM
 Hey
 
 I didn't know you could GOP data structures.
 This opens up a new world.
 Where is an up to date tutorial on using data structures?

I don't know of an up-to-date tutorial, but there is a tutorial in 
doc/4.data.structures.  Some parts are out of date:

* data is, in fact, persistent when using scalars.  Data is saved along 
with the patch. (Similar to using a Put menu array and checking the 
box for save contents, except that with scalars they always save with 
the patch.)
* the term template is used both to describe the subpatch in which the 
data structure ([struct] + any drawing instructions) is defined as well 
as the [struct] object itself.  (I think [struct] used to be named 
[template]...)
* some of the mouse-driven messages (e.g., click) didn't exist when 
those tutorials were written.  For an up-to-date list see struct-help.pd 
in:

http://pure-data.svn.sourceforge.net/viewvc/pure-data/trunk/doc/pddp/

(all the data structure related objects like [plot], [element], etc. have 
updated documentation if you use the pddp docs from the link above.)

-Jonathan

 
 I'm about to install PD 0.43. I have a test4 version
 installed as well
 as pdx 0.42.5 and vanilla 0.42.5.
 I have a couple of libraries loaded with vanilla - GEM and
 GGE. How
 will the new version efect these installations?
 
 Also on LINUX I have with UBUNTU studio 10.10 pd 0.42.5
 with all the
 exts available and then on puredyne I think my vanilla
 installation is
 messed up because I had to edit the config files to get
 pdL2ORK to
 run. Should be fine if I just replace the config files with
 the
 originals.
 
 Where is some god documentation on installing multiple
 versions of PD.
 What should I look out for when using so many different
 installations.
 
 ___
 Pd-list@iem.at
 mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list
 

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


Re: [PD] Data Structures GOP and installing latest PD

2011-04-04 Thread João Pais

I didn't know you could GOP data structures.
This opens up a new world.
Where is an up to date tutorial on using data structures?


you can use gop with any graphical object. you can see some objects of my  
library, jmmmp at pd-extended/extra - like [sliders], [swatch] or  
specially [bezier]. there are some bugs, like in [bezier] if one of the  
control points gets out of the gop area, the data strucutres stop  
responding to the graphic input; but they still keep working.


one other thing is the scaling, usually the data-s takes the whole canvas  
of the gop patch, but appears correctly. also, since data structures can't  
be saved using $0-variables, if you want a dynamic, multi-use patch, you  
might need to do some trickery, like generating the scalars with loadbang.


etc. etc... maybe people will start using them now and then more often, if  
they see how useful they can be.


João Pais

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


Re: [PD] Data Structures GOP and installing latest PD

2011-04-04 Thread Billy Stiltner
João and Jonathon,

Thanks for the information.

If you set the canvas size to 1,1 the subpatch shows up about the same
size as the default array canvas size. I done some experimenting with
setting gop with pd-pdsubpatch and not donecanvasdialog but the other
message with fewer arguments. Couldn't you just send the canvas a
message to tell it whether it is a text atom or a graph? I looked
through the code for quite a while but could not find how this could
be done.

I read somewhere that even if gui elements are not drawn in  a
subpatch they take use a lot of cpu.
Is this true? How much processing goes on for  gui elements when not visible?

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


Re: [PD] Data structures with $0?

2010-06-20 Thread João Pais

wrote me saying that he's doing a real external for this, so that would
be a better solution.


Why is an external a better solution ?


isn't a hard coded external always more efficient than an abstraction,
specially if tcl/tk and gop are involved? I thought so.



Anyway. I was inspired to make a bézier patch. It's an integer solution,
so, for 17 points I run t from 0 to 16 instead of to 1, then I divide by
pow(16,3) at the end to compensate. I could redo it in floats with almost
the same number of boxes though.

Here's the screenshot of the whole patch :

   http://gridflow.ca/gallery/bezier.png

It takes only 9 (nine) objects to compute it. For large numbers of  
points,

I can add a cache using two more boxes. Float requires two extra boxes
(and editing some more). Using a different order doesn't require any
repatching, just edit three or four boxes to change some numbers (I'm not
counting the fact that you have to recreate the multi-numberbox at the
right to have more rows). When I count the objects I'm not counting the
multi-numberbox nor any of the objects on the left. The wire that goes up
is carrying the polygons ready to be rendered.


I have my patch in the other computer, can't send it now. my patch shows
only a gop with the line (array) and 4 control points, which can be moved
around with the mouse. it's also possible to dump the present coordinates  
of the points, and to feed others into the array. so it can be used  
graphically or with parameters.
there are also a couple other details, and other things I want to do, but  
won't have the time for now.


if I remember, I can send the current version tomorrow.

João

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


Re: [PD] Data structures with $0?

2010-06-20 Thread Mathieu Bouchard

On Sun, 20 Jun 2010, João Pais wrote:


isn't a hard coded external always more efficient than an abstraction,


What's the speed that you need ?
What's the speed that you want ?


specially if tcl/tk and gop are involved? I thought so.


After it's computed, you still has to render the result.

Chances are that you'd still render it with Tcl/Tk and GOP.

GOP itself does not introduce a noticeable slowdown in pd-vanilla nor 
pd-extended nor pd-devel.


I have my patch in the other computer, can't send it now. my patch shows 
only a gop with the line (array) and 4 control points, which can be 
moved around with the mouse.


I know, you sent it and I've seen it. I decided to concentrate on the 
formula, so I did it with numberboxes instead. It's possible to use the GF 
computation together with a DS rendering.


 _ _ __ ___ _  _ _ ...
| Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Data structures with $0?

2010-06-20 Thread João Pais

isn't a hard coded external always more efficient than an abstraction,


What's the speed that you need ?
What's the speed that you want ?


I never measured it. what's the speed of pd? I guess as less speed as  
necessary, so that it doesn't bother other processes. also, in order to  
make it a sucessful abstraction, I have to put in extra code just to make  
sure that the data-s are created properly. although it's stable, it's  
always a drag.




specially if tcl/tk and gop are involved? I thought so.


After it's computed, you still has to render the result.

Chances are that you'd still render it with Tcl/Tk and GOP.

GOP itself does not introduce a noticeable slowdown in pd-vanilla nor
pd-extended nor pd-devel.


that might depend. some days ago I had a patch with 3 lines feeding into  
number boxes, and that alone made the cpu go up at least 10% (maybe  
more?). In my laptop trio I used a gop data-s abstraction to display the  
panning of the players, but replaced it with a gem patch. only that small  
module used ~ 20% cpu. in the end it's a waste, if you're trying to do  
that + 100 voice samples at the same time.


the example from dmtod#* seemed to be a full external, that might save  
some computation time. he also had the dashed lines to the control points,  
it's a small plus. (I could also do them with data-s, but can't be  
bothered).




I have my patch in the other computer, can't send it now. my patch shows
only a gop with the line (array) and 4 control points, which can be
moved around with the mouse.


I know, you sent it and I've seen it. I decided to concentrate on the
formula, so I did it with numberboxes instead. It's possible to use the  
GF

computation together with a DS rendering.


ah, I forgot. the latest version can be fed the precise coordinates for  
each point separately, just like yours - I just scaled everything from 0  
to 1, since the patch is supposed to be a 0-1 transfer function.


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


Re: [PD] Data structures with $0?

2010-06-19 Thread Mathieu Bouchard

On Fri, 18 Jun 2010, João Pais wrote:


thanks, I'll try to put this in when I can. meanwhile dtmod


His name is dmotd.

wrote me saying that he's doing a real external for this, so that would 
be a better solution.


Why is an external a better solution ?

Anyway. I was inspired to make a bézier patch. It's an integer solution, 
so, for 17 points I run t from 0 to 16 instead of to 1, then I divide by 
pow(16,3) at the end to compensate. I could redo it in floats with almost 
the same number of boxes though.


Here's the screenshot of the whole patch :

  http://gridflow.ca/gallery/bezier.png

It takes only 9 (nine) objects to compute it. For large numbers of points, 
I can add a cache using two more boxes. Float requires two extra boxes 
(and editing some more). Using a different order doesn't require any 
repatching, just edit three or four boxes to change some numbers (I'm not 
counting the fact that you have to recreate the multi-numberbox at the 
right to have more rows). When I count the objects I'm not counting the 
multi-numberbox nor any of the objects on the left. The wire that goes up 
is carrying the polygons ready to be rendered.


 _ _ __ ___ _  _ _ ...
| Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Data structures with $0?

2010-06-18 Thread João Pais
thanks, I'll try to put this in when I can. meanwhile dtmod wrote me  
saying that he's doing a real external for this, so that would be a better  
solution. anyway since I started, I'll try to finish my work.




 [expr pow(1-$f1,3)*pow($f1,0)*$f2 +
   pow(1-$f1,2)*pow($f1,1)*$f3 +
   pow(1-$f1,1)*pow($f1,2)*$f4 +
   pow(1-$f1,0)*pow($f1,3)*$f5]


doh, I forgot some multipliers.

  [expr 1*pow(1-$f1,3)*pow($f1,0)*$f2 +
3*pow(1-$f1,2)*pow($f1,1)*$f3 +
3*pow(1-$f1,1)*pow($f1,2)*$f4 +
1*pow(1-$f1,0)*pow($f1,3)*$f5]

when you vary the order, the 1 3 3 1 sequence goes like this :

1
1  1
1  2  1
1  3  3  1
1  4  6  4  1
1  5 10 10  5  1
1  6 15 20 15  6  1

notice how the numbers for each order are made from the numbers for the
previous order : each number is the one above plus the one to the left of
the one above.

you also get that same pattern of numbers doing various things such as  
the
theory of coin-flipping, approximations of Gaussian blur, or if you  
expand

pow(x+1,n), e.g. :

   pow(x+1,4) is the same as :
 1*pow(x,0) +
 4*pow(x,1) +
 6*pow(x,2) +
 4*pow(x,3) +
 1*pow(x,4)

Note that http://en.wikipedia.org/wiki/Pascal_triangle has some cool
drawings and animations about it. (I especially like the fact that a
fractal appears in that number pattern if you make many rows of it)

  _ _ __ ___ _  _ _ ...
| Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801



--
Friedenstr. 58
10249 Berlin (Deutschland)
Tel +49 30 42020091 | Mob +49 162 6843570
Studio +49 30 69509190
jmmmp...@googlemail.com | skype: jmmmpjmmmp

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


[PD] Data structures with $0?

2010-06-17 Thread João Pais

Hi,

I was working on an abstraction with a gop data structure, and run into a
problem. I noticed that after closing the patch and opening it again, the
data structure wouldn't show, and the console would complain from a stale
pointer. Finally I noticed that the problem came from the templates have
$0- arguments, but these abstract arguments aren't saved by the
structure itself. instead, it begins with e.g. 1072-.

For now, the only way to make this work is the save the abstraction
without the data structure, and create it at init time. I can't send a
clear to the canvas, as it's an abstraction with gop, and the patch itself
must go somewhere. (in the upper patch only the graphic interface is seen)

But would it be possible/desirable that data structures with $0 in their
templates also retain the abstract $0 symbol in the structures themselves?
Or everytime a patch with such definitions is saved, there will be
problems when it's open again.
For example, arrays (which are a special case of data structures, afaik)
can retain their $0 symbols with no problems. I think it would make sense
for general data structures as well.


An outdated version of the patch with the stale pointer problem was sent
to the list some days ago,
http://lists.puredata.info/pipermail/pd-list/2010-06/079989.html. Btw,
this is to control arrays with bezier curves, in case someone is
interested.
Does anyone know a general formula for bezier curves of the xth order?

Best,

João


--
Friedenstr. 58
10249 Berlin (Deutschland)
Tel +49 30 42020091 | Mob +49 162 6843570
Studio +49 30 69509190
jmmmp...@googlemail.com | skype: jmmmpjmmmp

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


Re: [PD] Data structures with $0?

2010-06-17 Thread Pedro Lopes
Does anyone know a general formula for bezier curves of the xth order?

This seems interesting, but it was just a lame google bezier nth order
search... Although, here it is:
- http://anidea.com/technology/fun-with-bezier-curves/


Keep posting the results! :D


-- 
Pedro Lopes
contacto: j...@radiozero.pt
website: http://web.ist.utl.pt/Pedro.Lopes
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Data structures with $0?

2010-06-17 Thread João Pais

Does anyone know a general formula for bezier curves of the xth order?


This seems interesting, but it was just a lame google bezier nth order
search... Although, here it is:
- http://anidea.com/technology/fun-with-bezier-curves/


here's the latest patch, with cubic lines. I've seen that site while doing  
my research, but there was no formula there I couldn't understand (my math  
skills are below high school level). If you point me to a formula for an x  
order curve (in case such formula exists), I could implement it in the  
patch.


I was also thinking of instead using as many cubic lines as possible (and  
match the end point with the first point of the next), but it might be  
simpler to get a general formula instead.


João

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


Re: [PD] Data structures with $0?

2010-06-17 Thread Mathieu Bouchard

On Thu, 17 Jun 2010, João Pais wrote:

Btw, this is to control arrays with bezier curves, in case someone is 
interested. Does anyone know a general formula for bezier curves of the 
xth order?


It's explained in http://en.wikipedia.org/wiki/B%C3%A9zier_curve

But by far, the most common are order 2 (Tcl/Tk, TrueType, etc) and order 
3 (Illustrator, PDF, etc) and there's a reason for that. They become 
increasing complicated and hard to handle as the order increases, and I 
don't mean the computation time : even though computation time does 
increase a lot with the order, it's not as radical as the decrease of your 
ability to figure out the parameters to make the curve go where you want 
it to go, because it looks less predictable.


So, usually, when they have more than four dots, people chain together 
pieces made from three or four dots each.


 _ _ __ ___ _  _ _ ...
| Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Data structures with $0?

2010-06-17 Thread João Pais

Btw, this is to control arrays with bezier curves, in case someone is
interested. Does anyone know a general formula for bezier curves of the
xth order?


It's explained in http://en.wikipedia.org/wiki/B%C3%A9zier_curve


yes, but since my math skills aren't much better than basic, all those  
equations and polynomials mean nothing to me. unless I get a clear  
equation (like the cubic one I used, which I found in another site), I  
can't go any further.
if anyone wants to translate those funny drawings for me into something  
comprehensible, I'll put it in the patch.



increase a lot with the order, it's not as radical as the decrease of  
your

ability to figure out the parameters to make the curve go where you want
it to go, because it looks less predictable.


my purpose of doing this is basically to modulate a [line] (0-1), that  
is, with one direction. I never worked with higher than cubic curves  
(coreldraw etc are cubic), but since the purpose is to have a line that  
follows only one direction, would it become that unpredictable?




So, usually, when they have more than four dots, people chain together
pieces made from three or four dots each.


I know. that's another thing I have to look at in the future, but don't  
have a) the time and concentration b) the necessity for it. although it  
would be better, because then the patch would be complete.


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


Re: [PD] Data structures with $0?

2010-06-17 Thread Mathieu Bouchard

On Thu, 17 Jun 2010, João Pais wrote:

yes, but since my math skills aren't much better than basic, all those 
equations and polynomials mean nothing to me. unless I get a clear 
equation (like the cubic one I used, which I found in another site), I 
can't go any further. if anyone wants to translate those funny drawings 
for me into something comprehensible, I'll put it in the patch.


Then this means I'd have to give you one formula per order, or what ?

The general formula goes like this : time goes from 0 to 1. to figure out 
the position for a time we call t, you do this for each point numbered 
i, you multiply the point by t, i times, and you multiply the point by 
(1-t), n-i times. It gives a pattern like :


  [expr pow(1-$f1,3)*pow($f1,0)*$f2 +
pow(1-$f1,2)*pow($f1,1)*$f3 +
pow(1-$f1,1)*pow($f1,2)*$f4 +
pow(1-$f1,0)*pow($f1,3)*$f5]

I put the pow(,1) and pow(,0) in the formula just to make the pattern 
obvious... pow($f1,1) = $f1 and pow($f1,0) = 1, so, they'd be skipped in a 
real formula.


So, to adapt to 5 points, you'd add a $f6, the exponents in the first 
column would be 4,3,2,1,0, and in the second column they'd be 0,1,2,3,4. 
You can see that you can add any number of points like that.


It's more difficult, though, to make a patch that supports all possible 
orders at once. One way you can do it is with a [until] or [list split] or 
[list-drip], to compute the formula for one point at a time, and a [f] [+] 
combination to add the results together, for example. All this because you 
can't make a single [expr] that supports any number of points.


my purpose of doing this is basically to modulate a [line] (0-1), that 
is, with one direction. I never worked with higher than cubic curves 
(coreldraw etc are cubic), but since the purpose is to have a line that 
follows only one direction, would it become that unpredictable?


CorelDraw curves do the same thing in two dimensions by doing the same 
formula twice, once for the x, once for the y. Everything funny that you 
can do with those curves in 2 dimensions has a reason that comes from the 
1-dimensional case. If you setup your points to bounce back and forth in a 
big-order Bézier, you will get an overly jumpy curve. Here's an extreme 
example :


  
http://demonstrations.wolfram.com/RungesPhenomenon/HTMLImages/index.en/popup_3.jpg

this example is a Lagrange curve instead of a Bézier curve, but the 
jumpiness is a problem with all methods (some more sensitive than others).



So, usually, when they have more than four dots, people chain together
pieces made from three or four dots each.
I know. that's another thing I have to look at in the future, but don't have 
a) the time and concentration b) the necessity for it. although it would be 
better, because then the patch would be complete.


If I wanted a [vline] that did Bézier, I'd expect it to be chaining 
together pieces of Bézier that use three or four points at a time. Sort of 
like the difference between [tabread] and [tabread4], but with a better 
formula than [tabread4].


 _ _ __ ___ _  _ _ ...
| Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Data structures with $0?

2010-06-17 Thread Mathieu Bouchard

On Thu, 17 Jun 2010, Mathieu Bouchard wrote:


 [expr pow(1-$f1,3)*pow($f1,0)*$f2 +
   pow(1-$f1,2)*pow($f1,1)*$f3 +
   pow(1-$f1,1)*pow($f1,2)*$f4 +
   pow(1-$f1,0)*pow($f1,3)*$f5]


doh, I forgot some multipliers.

 [expr 1*pow(1-$f1,3)*pow($f1,0)*$f2 +
   3*pow(1-$f1,2)*pow($f1,1)*$f3 +
   3*pow(1-$f1,1)*pow($f1,2)*$f4 +
   1*pow(1-$f1,0)*pow($f1,3)*$f5]

when you vary the order, the 1 3 3 1 sequence goes like this :

1
1  1
1  2  1
1  3  3  1
1  4  6  4  1
1  5 10 10  5  1
1  6 15 20 15  6  1

notice how the numbers for each order are made from the numbers for the 
previous order : each number is the one above plus the one to the left of 
the one above.


you also get that same pattern of numbers doing various things such as the 
theory of coin-flipping, approximations of Gaussian blur, or if you expand 
pow(x+1,n), e.g. :


  pow(x+1,4) is the same as :
1*pow(x,0) +
4*pow(x,1) +
6*pow(x,2) +
4*pow(x,3) +
1*pow(x,4)

Note that http://en.wikipedia.org/wiki/Pascal_triangle has some cool 
drawings and animations about it. (I especially like the fact that a 
fractal appears in that number pattern if you make many rows of it)


 _ _ __ ___ _  _ _ ...
| Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] Data Structures abs (was:Re: understanding graphics objects on canvas)

2010-05-12 Thread patko

- João Pais jmmmp...@googlemail.com a écrit :

 Data structures can be a very powerful mean to graphically  
 display/interact with the patch (to perform, display, compose, ...).
 But  
 without some improvements they'll still be a hidden part of pd. And
 afaik,


 The algorithms we get when implementing data structures 
for managing large amount of informations in realtime,
seems to be simplier and faster than using list objects,
without plotting anything, but there are not a lot of examples.

Didn't someone made a set of abs for this?

 Wouldn't it be nice to have a set of patches that eases the access
to the struct, doing all the route-in, or a class of data structures objects 
like the list-abs? Having it for graphical stuff would be nice too.

cp

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


Re: [PD] Data Structures abs (was:Re: understanding graphics objects on canvas)

2010-05-12 Thread Jonathan Wilkes
Sure, see Luke Iannini's ds-abs:

http://pure-data.svn.sourceforge.net/viewvc/pure-data/trunk/abstractions/sfruit/ds-abs/



--- On Wed, 5/12/10, patko colet.patr...@free.fr wrote:

From: patko colet.patr...@free.fr
Subject: [PD] Data Structures abs (was:Re: understanding graphics objects on 
canvas)
To: pd-list pd-list@iem.at
Cc: João Pais jmmmp...@googlemail.com
Date: Wednesday, May 12, 2010, 12:02 PM


- João Pais jmmmp...@googlemail.com a écrit :

 Data structures can be a very powerful mean to graphically  
 display/interact with the patch (to perform, display, compose, ...).
 But  
 without some improvements they'll still be a hidden part of pd. And
 afaik,


 The algorithms we get when implementing data structures 
for managing large amount of informations in realtime,
seems to be simplier and faster than using list objects,
without plotting anything, but there are not a lot of examples.

Didn't someone made a set of abs for this?

 Wouldn't it be nice to have a set of patches that eases the access
to the struct, doing all the route-in, or a class of data structures objects 
like the list-abs? Having it for graphical stuff would be nice too.

cp

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



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


Re: [PD] Data Structures abs (was:Re: understanding graphics objects on canvas)

2010-05-12 Thread patko
great, thanks

Patrice Colet - 06 32 66 03 57 

- Jonathan Wilkes jancs...@yahoo.com a écrit :

 Sure, see Luke Iannini's ds-abs:
 
 http://pure-data.svn.sourceforge.net/viewvc/pure-data/trunk/abstractions/sfruit/ds-abs/
 
 
 
 --- On Wed, 5/12/10, patko colet.patr...@free.fr wrote:
 
 
 
 From: patko colet.patr...@free.fr
 Subject: [PD] Data Structures abs (was:Re: understanding graphics
 objects on canvas)
 To: pd-list pd-list@iem.at
 Cc: João Pais jmmmp...@googlemail.com
 Date: Wednesday, May 12, 2010, 12:02 PM
 
 
 
 - João Pais  jmmmp...@googlemail.com  a écrit :
 
  Data structures can be a very powerful mean to graphically
  display/interact with the patch (to perform, display, compose, ...).
  But
  without some improvements they'll still be a hidden part of pd. And
  afaik,
 
 
 The algorithms we get when implementing data structures
 for managing large amount of informations in realtime,
 seems to be simplier and faster than using list objects,
 without plotting anything, but there are not a lot of examples.
 
 Didn't someone made a set of abs for this?
 
 Wouldn't it be nice to have a set of patches that eases the access
 to the struct, doing all the route-in, or a class of data structures
 objects
 like the list-abs? Having it for graphical stuff would be nice too.
 
 cp
 
 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management -
 http://lists.puredata.info/listinfo/pd-list

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


Re: [PD] data structures: variable array element + variable resolution?

2010-03-16 Thread João Pais

I had a couple of questions about data structures:

- I have an array based on template X. I wanted to make
variations on the drawing of that array, by changing a
variable in template X. The thing is, I can't access X when
it's inside an array. Is there a way to get a pointer to the
X templates inside an array?


[element]


ah, so if the float names are the same, the information gets through. The  
only thing is that since this is a parameter with the same value at all  
elements, I had to make a mechanism which goes through the whole array  
when something changes.



If you don't care about the flickering, you could do something like  
what's

attached.  Notice that you have to name the template folder something
different than the struct.


thanks for your help. instead of trying to do a general patch for many  
uses, I've went with 3 versions of it, each for a different step value.

maybe when data structures are more developed we can go further.

João

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


Re: [PD] data structures: variable array element + variable resolution?

2010-03-15 Thread Jonathan Wilkes
--- On Mon, 3/15/10, João Pais jmmmp...@googlemail.com wrote:

 From: João Pais jmmmp...@googlemail.com
 Subject: [PD] data structures: variable array element + variable resolution?
 To: PD-List pd-list@iem.at
 Date: Monday, March 15, 2010, 3:10 AM
 Hi,
 
 I had a couple of questions about data structures:
 
 - I have an array based on template X. I wanted to make
 variations on the drawing of that array, by changing a
 variable in template X. The thing is, I can't access X when
 it's inside an array. Is there a way to get a pointer to the
 X templates inside an array?

[element]

 I also tried creating an extra instance of X and change the
 variable of that template. Unfortunately it had no effect on
 the same templates inside the array.

Right, you're just changing the value for that particular scalar.

 
 - I have a variable being plotted with a step value of 1:
 [plot -y y(0:100)(-1:1)(1) ...]. I wanted to change the step
 value on the fly, but when I wrote (step) instead of (1),
 there was a parse error. Does that mean that the step is
 always the same at each template? Is isn't possible to
 assign a variable to the step value?

As far as I can tell you are right, unfortunately.  You can hack around 
this by taking the output from the [struct] and quantizing it yourself 
(i.e., [get] the y value, [div] by your desired step size, and [set] the y 
value, all the time keeping track of the real y value using the difference 
between the current and previous y).

Oh, but if it's an array, you won't get output from a [struct] when you 
move the elements.  So nevermind.

 
 
 If if isn't possible to do any of these operations, I might
 be able to circumvent the problem by deleting and creating
 new objects. Afaik it isn't possible to edit an object, it's
 necessary to cut it and create a new one. Am I correct, or
 is there a new possibility I don't know yet?

If you don't care about the flickering, you could do something like what's 
attached.  Notice that you have to name the template folder something 
different than the struct.

-Jonathan

 
 Thanks,
 
 João Pais
 
 --Friedenstr. 58
 10249 Berlin (Deutschland)
 Tel +49 30 42020091 | Mob +49 162 6843570
 Studio +49 30 69509190
 jmmmp...@googlemail.com
 | skype: jmmmpjmmmp
 
 ___
 Pd-list@iem.at
 mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list



  

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


[PD] data structures: variable array element + variable resolution?

2010-03-14 Thread João Pais

Hi,

I had a couple of questions about data structures:

- I have an array based on template X. I wanted to make variations on the  
drawing of that array, by changing a variable in template X. The thing is,  
I can't access X when it's inside an array. Is there a way to get a  
pointer to the X templates inside an array?
I also tried creating an extra instance of X and change the variable of  
that template. Unfortunately it had no effect on the same templates inside  
the array.


- I have a variable being plotted with a step value of 1: [plot -y  
y(0:100)(-1:1)(1) ...]. I wanted to change the step value on the fly, but  
when I wrote (step) instead of (1), there was a parse error. Does that  
mean that the step is always the same at each template? Is isn't possible  
to assign a variable to the step value?



If if isn't possible to do any of these operations, I might be able to  
circumvent the problem by deleting and creating new objects. Afaik it  
isn't possible to edit an object, it's necessary to cut it and create a  
new one. Am I correct, or is there a new possibility I don't know yet?


Thanks,

João Pais

--
Friedenstr. 58
10249 Berlin (Deutschland)
Tel +49 30 42020091 | Mob +49 162 6843570
Studio +49 30 69509190
jmmmp...@googlemail.com | skype: jmmmpjmmmp

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


[PD] data structures: sugestions for future implmentation

2009-09-14 Thread João Pais

Hi all and specially Mr. Puckette,

I've been working more with data structures in a new patch. Although some  
nice things are possible, there are still some details that might give  
much more power to their possibilities. Most of these sugestions become  
only evident when one works with more than one template (struct) in the  
same patch.
To know my context, I'm working now with a template with 5 arrays inside.  
Probably other templates might come with more or less arrays - or maybe in  
the end only one (super-)template, with as many activated arrays as  
necessary.



My sugestions are:

- be possible to set the parameters dynamically with a set ... message,  
like in many other objects. Because all objects get hard-coded with the  
first structure given, it's necessary to create many copies of the same  
code if you want to run the same operation through different templates (or  
even different arrays on the same template).
E.g. if you use [tabread], you can use only the same object to read  
different tables. But if you use [get], [set], [element], ... you need as  
many objects as structs. And if something changes in the structure of your  
template, you need to make X changes to the patch.


- automatic pointer output from the struct by clicking in the structure  
also not in edit mode. This allows a much easier compositional work on the  
fly.


- a select 0/1 command given to a pointer, that would behave like a  
mouse selection in edit mode. or highlight, to show in which atom the  
pointer is.


- a displace x y command. of course this can be already coded, but if it  
would be inside the struct object would be much faster


- a previous command for a pointer, or even previous x and next x.  
being at that, maybe even a first and last as well.


- to choose faster between different notes (data structure atoms) on my  
score, I'm assiging an id parameter to the struct, and these get  
reassigned each time the score is sorted. since each pointer already has  
its own identity, would it be possible to make this number/symbol  
transparent? then it would not be necessary to make more code to do the  
same function. an extra would be a flag to display/hide this number/symbol.
actually I don't really know what's inside a (gpointer) - it looks like  
if instead of having number boxes, one would only get (float) when trying  
to see the result of an operation.


- general [get] that doesn't depend on a struct, solely on common  
parameters. This can be used, for example, to make a list of all x and y  
(and w) elements of different templates/arrays - without making a copy for  
each template.


- does the scale function work only for the display of data (with  
draw-objects)? If yes, I guess it would be advantageous to have this  
control already at the data level.
And if not, how is it possible to use this feature to limit the values of  
a struct? (and not only of its representation)



Can it be that there's a memory bug somewhere? Besides some crashes when  
templates get changed, also once was noticeable by looking at the  
properties window that structures kept parameters already deleted. (have  
no concrete example now to show)



Best,

João Pais

--
Friedenstr. 58
10249 Berlin (Deutschland)
Tel +49 30 42020091 | Mob +49 162 6843570
Studio +49 30 69509190
jmmmp...@googlemail.com | skype: jmmmpjmmmp

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


[PD] data structures variable plot x spacing

2009-08-27 Thread João Pais

Hi,

quick qestion: is there a way to make the x spacing in [plot] to be  
dynamic? Arrays in data structures is a bit new for me, and I'm not  
getting it for this. Also looked at the examples + Frank's tutorial, but  
couldn't find anything.


best,

João Pais

--
Friedenstr. 58
10249 Berlin (Deutschland)
Tel +49 30 42020091 | Mob +49 162 6843570
Studio +49 30 69509190
jmmmp...@googlemail.com | skype: jmmmpjmmmp

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


Re: [PD] data structures variable plot x spacing

2009-08-27 Thread Jonathan Wilkes


--- On Thu, 8/27/09, João Pais jmmmp...@googlemail.com wrote:

 From: João Pais jmmmp...@googlemail.com
 Subject: [PD] data structures variable plot x spacing
 To: PD-List pd-list@iem.at
 Date: Thursday, August 27, 2009, 10:48 PM
 Hi,
 
 quick qestion: is there a way to make the x spacing in
 [plot] to be dynamic? Arrays in data structures is a bit new
 for me, and I'm not getting it for this. Also looked at the
 examples + Frank's tutorial, but couldn't find anything.

Sure.  Use a variable instead of a static value, like [plot some_array 0 1 0 0 
x-spacing], and make sure x-spacing is in the 
relevant [struct] object.  Then use [set] to change x-spacing.

Unfortunately, you still can't do x0(0:max-px)(0:max), or x0(0:100) 
(0:100)(q), though you could hack your way around the latter using 
the outlet from [struct].

-Jonathan

 
 best,
 
 João Pais
 
 --Friedenstr. 58
 10249 Berlin (Deutschland)
 Tel +49 30 42020091 | Mob +49 162 6843570
 Studio +49 30 69509190
 jmmmp...@googlemail.com
 | skype: jmmmpjmmmp
 
 ___
 Pd-list@iem.at
 mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list
 


  

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


Re: [PD] data structures variable plot x spacing

2009-08-27 Thread João Pais
Sure.  Use a variable instead of a static value, like [plot some_array 0  
1 0 0 x-spacing], and make sure x-spacing is in the

relevant [struct] object.  Then use [set] to change x-spacing.

Unfortunately, you still can't do x0(0:max-px)(0:max), or x0(0:100)
(0:100)(q), though you could hack your way around the latter using
the outlet from [struct].


of course, was doing it in the wrong struct. thanks.

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


[PD] data-structures short questions

2009-03-20 Thread João Pais

Hi,

after creating a structure (object) with append, is it possible to delete  
it? Or just better hide it with 0 on the drawing objects?


(the patch is only to display data, not to be used by the user)

João

--
Friedenstr. 58
10249 Berlin (Deutschland)
Tel +49 30 42020091 | Mob +49 162 6843570
jmmmp...@googlemail.com | skype: jmmmpjmmmp

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


Re: [PD] data-structures short questions

2009-03-20 Thread Jonathan Wilkes

I don't think it's possible to delete a ds object unless selecting it with the 
mouse (or maybe with the mouse msg).

Notice that if you turn off drawing instructions by using an inlet to 
[filledcurve], for example, all other visible data structures will flash off 
and on again.  I think that's why someone suggested a while back to just change 
the color to 999 instead.  But if you have a lot of ds instances that you want 
to hide, use the -v flag, because there is no flashing and it's faster than 
changing the color.

-Jonathan


--- On Fri, 3/20/09, João Pais jmmmp...@googlemail.com wrote:

 From: João Pais jmmmp...@googlemail.com
 Subject: [PD] data-structures short questions
 To: PD-List pd-list@iem.at
 Date: Friday, March 20, 2009, 9:02 PM
 Hi,
 
 after creating a structure (object) with append, is it
 possible to delete it? Or just better hide it with 0 on the
 drawing objects?
 
 (the patch is only to display data, not to be used by the
 user)
 
 João
 
 --Friedenstr. 58
 10249 Berlin (Deutschland)
 Tel +49 30 42020091 | Mob +49 162 6843570
 jmmmp...@googlemail.com | skype: jmmmpjmmmp
 
 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management -
 http://lists.puredata.info/listinfo/pd-list


  

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


Re: [PD] data-structures short questions

2009-03-20 Thread João Pais
I don't think it's possible to delete a ds object unless selecting it  
with the mouse (or maybe with the mouse msg).


I thought so as well. so a better choice might be to hide it.


Notice that if you turn off drawing instructions by using an inlet to  
[filledcurve], for example, all other visible data structures will flash  
off and on again.  I think that's why someone suggested a while back to  
just change the color to 999 instead.  But if you have a lot of ds  
instances that you want to hide, use the -v flag, because there is no  
flashing and it's faster than changing the color.


you mean flash when the 1/0 command comes in? I was just trying that, but  
didn't notice anything - it was a very simple struct.

what I'm thinking uses a maximum of 64 elements, so it's not that heavy.

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


Re: [PD] data-structures short questions

2009-03-20 Thread João Pais
ah, now I know. it never happened to me, because I never used enough to  
make them visible. that's a nice example patch.


btw, in order to control the display of the individual elements I used -v  
in the definitions of the base struct (that gets taken by the array). that  
allows for individual control, and it should be the only example missing  
from your file.



Here's a patch to show what I mean.  Even for a two-pixel drawing in a  
hidden subpatch, flashing happens when the visibility is toggled.  So if  
you use any other patches with datastructures (or the same one twice as  
an abstraction) it will be noticeable, regardless of the drawing  
complexity.


Btw: I notice in test.pd that if leave the first abstraction open and  
then close test.pd, I get two errors, like:


error: .x9dd9e0: no such object
error: .x9cc8a0: no such object

(0.42-4, winxp sp3)


exactly same specs here. I also notice another thing: my draw area is in a  
gop, and the patch is to be used as a gop. so, when using a gop ind the  
2nd degree, the setting for hide object name and arguments of that area  
doesn't get saved. (no problem with the level above)


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


Re: [PD] data-structures short questions

2009-03-20 Thread João Pais
sorry, forgot to ask: and there's also no way of deleting an array without  
deleting the whole window with clear, is there?



ah, now I know. it never happened to me, because I never used enough to  
make them visible. that's a nice example patch.


btw, in order to control the display of the individual elements I used  
-v in the definitions of the base struct (that gets taken by the array).  
that allows for individual control, and it should be the only example  
missing  from your file.



Here's a patch to show what I mean.  Even for a two-pixel drawing in a  
hidden subpatch, flashing happens when the visibility is toggled.  So  
if you use any other patches with datastructures (or the same one twice  
as an abstraction) it will be noticeable, regardless of the drawing  
complexity.


Btw: I notice in test.pd that if leave the first abstraction open and  
then close test.pd, I get two errors, like:


error: .x9dd9e0: no such object
error: .x9cc8a0: no such object

(0.42-4, winxp sp3)


exactly same specs here. I also notice another thing: my draw area is in  
a gop, and the patch is to be used as a gop. so, when using a gop ind  
the 2nd degree, the setting for hide object name and arguments of that  
area doesn't get saved. (no problem with the level above)




--
Friedenstr. 58
10249 Berlin (Deutschland)
Tel +49 30 42020091 | Mob +49 162 6843570
jmmmp...@googlemail.com | skype: jmmmpjmmmp

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


Re: [PD] data-structures short questions

2009-03-20 Thread Jonathan Wilkes



--- On Sat, 3/21/09, João Pais jmmmp...@googlemail.com wrote:

 From: João Pais jmmmp...@googlemail.com
 Subject: Re: [PD] data-structures short questions
 To: Jonathan Wilkes jancs...@yahoo.com, PD-List pd-list@iem.at
 Date: Saturday, March 21, 2009, 2:37 AM
 sorry, forgot to ask: and there's also no way of
 deleting an array without deleting the whole window with
 clear, is there?

I believe that is the case.

I tested -v for the elements, and didn't notice any difference.  -vs for [plot] 
has a bug, however: it doesn't properly erase the objects until you hide and 
reopen the window, as in the attached patch.

Additionally, arrays with graphical elements exhibit the same flashing problem 
I've been talking about.  If you click-drag an element you'll see that all the 
elements after #49 start flashing.  Add another drawing instruction to the 
template, and it's even worse: everything after the #4 flashes.

-Jonathan

 
 
  ah, now I know. it never happened to me, because I
 never used enough to make them visible. that's a nice
 example patch.
  
  btw, in order to control the display of the individual
 elements I used -v in the definitions of the base struct
 (that gets taken by the array). that allows for individual
 control, and it should be the only example missing  from
 your file.
  
  
  Here's a patch to show what I mean.  Even for
 a two-pixel drawing in a hidden subpatch, flashing happens
 when the visibility is toggled.  So if you use any other
 patches with datastructures (or the same one twice as an
 abstraction) it will be noticeable, regardless of the
 drawing complexity.
  
  Btw: I notice in test.pd that if leave the first
 abstraction open and then close test.pd, I get two errors,
 like:
  
  error: .x9dd9e0: no such object
  error: .x9cc8a0: no such object
  
  (0.42-4, winxp sp3)
  
  exactly same specs here. I also notice another thing:
 my draw area is in a gop, and the patch is to be used as a
 gop. so, when using a gop ind the 2nd degree, the setting
 for hide object name and arguments of that area
 doesn't get saved. (no problem with the level above)
 
 
 
 --Friedenstr. 58
 10249 Berlin (Deutschland)
 Tel +49 30 42020091 | Mob +49 162 6843570
 jmmmp...@googlemail.com | skype: jmmmpjmmmp


  

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


[PD] Data Structures

2008-04-28 Thread matohawk
Hello,
I have another question about Data Structures.
Why when we load a score with a message pd, like this :
;
pd-data read file.txt

the following message :

warning: pd-template-toplevel: multiply defined
warning: pd-template-element: multiply defined

displays in the console?

Using with Pd version 0.41-4
And Ubuntu Gutsy
See the example 4.data.stuctures/06.file.pd in the help files

Cheers Matohawk

http://matohawkitongroup.free.fr
http://aide.auditive.free.fr



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


Re: [PD] data structures and library abstraction question

2007-01-31 Thread Roman Haefeli
On Tue, 2007-01-30 at 15:07 -0800, Rich E wrote:
 Hi all,
 
 I just had a look at Frank's data structure tutorial, in which he
 suggests making a library abstraction for all structure templates.
 This seems like something I have to do for some patches I'm working
 on, but it would also be nice to just be able to check if the library
 is open, and if not, to open it.  
 
 So the question is, is there a way to check if a certain abstraction
 is already open?
 

if i understand right, what you want to do, implementing such a test
mechanism is very easy. put this somewhere into your abstraction:

[r isitthere]
|
[s yesitsthere]

then you can easily check, if the library abs is open by sending a bang
to [s isitthere]. when you receive a bang on [r yesitisthere], your
abstraction is obviously open :-)

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


Re: [PD] data structures and library abstraction question

2007-01-31 Thread Frank Barknecht
Hallo,
Rich E hat gesagt: // Rich E wrote:
 I just had a look at Frank's data structure tutorial, in which he suggests
 making a library abstraction for all structure templates.  This seems like
 something I have to do for some patches I'm working on, but it would also be
 nice to just be able to check if the library is open, and if not, to open
 it.
 
 So the question is, is there a way to check if a certain abstraction is
 already open?

You could use a so called singleton. I'm using a crudbe, but working
one  in sssad which you could just grab. It's a wrapper abstraction which you
call with the name of another abstraction as argument. It will make
sure, that the passed abstraction is created only the first time, the
singleton is used.

Ciao
-- 
 Frank Barknecht _ __footils.org_ __goto10.org__

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


[PD] data structures and library abstraction question

2007-01-30 Thread Rich E

Hi all,

I just had a look at Frank's data structure tutorial, in which he suggests
making a library abstraction for all structure templates.  This seems like
something I have to do for some patches I'm working on, but it would also be
nice to just be able to check if the library is open, and if not, to open
it.

So the question is, is there a way to check if a certain abstraction is
already open?

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


Re: [PD] data structures - get symbol?

2006-11-19 Thread João Miguel Pais

This should work since 0.39, but as always with data structures: This
is an area that's changing a lot with every new Miller-Pd so I'd
recommend to use 0.40 instead. With that, you can [set] and [get]
symbol fields as shown in attached patch. Setting them on creation
with [append] doesn't seem to work yet, however, at least I couldn't
make it work.


thanks, it works fine on the latest version of pd-ext. I guess (I hope)  
that the next step would be implementing the symbols in [append], so that  
an extra [set -symbol] must not be used. Is Mr. Miller on the house? :)


one more question though: I tried to apply the [get] help patch in my  
patch, but it didn't work. in the following picture, when I press traverse  
pd breaks up. on the other hand, like in your patch connecting directly  
[append] to the get pointer (through the inlet which is now disconnected)  
it works when the structures are created, but I can't make it work after  
that.attachment: get.jpg
___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] data structures - get symbol?

2006-11-19 Thread Frank Barknecht
Hallo,
João Miguel Pais hat gesagt: // João Miguel Pais wrote:

 one more question though: I tried to apply the [get] help patch in my  
 patch, but it didn't work. in the following picture, when I press traverse  
 pd breaks up. on the other hand, like in your patch connecting directly  
 [append] to the get pointer (through the inlet which is now disconnected)  
 it works when the structures are created, but I can't make it work after  
 that.

 [traverse pd-SUBPATCH, bang( 
 | 
 [pointer]

will output a pointer to the start of [pd SUBPATCH], but not a pointer
to an actual scalar. You need to use [next( for that or directly:
  
  [traverse pd-SUBPATCH, next(
  |
  [pointer]

Ciao
-- 
 Frank Barknecht _ __footils.org_ __goto10.org__

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


Re: [PD] data structures - get symbol?

2006-11-19 Thread João Miguel Pais

 [traverse pd-SUBPATCH, next(
  |
  [pointer]


hmm, komisch.

I had also tried out with next (I thought I had sent the picture with it).  
the result is the same, pd quits when the [next( after the traverse comes.  
there's also another structure type on the same subpatch, but I guess that  
that shouldn't interfere, right?


Joao

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