Re: [PD] Data structure: drawnumbers in an array

2012-10-12 Thread mac2k1
Oh. It seems related. In the example patch from the bug you mentionned we have 
something like:

y_green_hotspot = y_red*2 + y_green

with y_green_hotspot and y_red relative to y_ds, and y_green relative to y_red.


In my patch we have:
 
- no problem with dots' hotspots

- for each drawnumbers :
x_hotspot = x_number*2
y_hotspot = y_number*2
relative to y_ds.

There is an obvious link: this *2 which shifts hotspots.

Cheers

 Message d'origine 
De : Jonathan Wilkes 
À : mac...@netcourrier.com ;
 Pd-list@iem.at 
Objet : Re: [PD] Data structure: drawnumbers in an array
Date : 11/10/2012 20:38:03 CEST

Is this the bug you're describing?
 
 http://sourceforge.net/tracker/index.php?func=detailaid=2457992group_id=557
 36atid=478070
 
 
  From: mac...@netcourrier.com 
 To: Pd-list@iem.at 
 Sent: Thursday, October 11, 2012 12:21 PM
 Subject: [PD] Data structure: drawnumbers in an array
  
 
 Dear List,
 
 I have an issue with a data structure consisting of a rectangle and an 
 array of dots, with x/y coordinates and a z value for each dot. I displayed 
 the z value with [drawnumber]. See the attached patch.
 
 I can clic and move the dots. However, mouse clics do not seem to reach the 
 number area correctly. There seems to be a wrong scaling of mouse 
 coordinates when trying to reach numbers nested in arrays. In pd 0.43 
 vanilla and 0.42.5 extended.
 
 I remember a behavior of the same kind with objects filled with lots of 
 text lines. This one was apparently fixed in pd 0.43. 
 
 I wish I could enter my numbers by mouse or keyboard, but for now I can 
 handle them via the data properties window.
 
 Clem
 
 ___
 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 structure: drawnumbers in an array

2012-10-11 Thread mac2k1
Dear List,

I have an issue with a data structure consisting of a rectangle and an array of 
dots, with x/y coordinates and a z value for each dot. I displayed the z value 
with [drawnumber]. See the attached patch.

I can clic and move the dots. However, mouse clics do not seem to reach the 
number area correctly. There seems to be a wrong scaling of mouse coordinates 
when trying to reach numbers nested in arrays. In pd 0.43 vanilla and 0.42.5 
extended.

I remember a behavior of the same kind with objects filled with lots of text 
lines. This one was apparently fixed in pd 0.43. 

I wish I could enter my numbers by mouse or keyboard, but for now I can handle 
them via the data properties window.

Clem

#N struct event float x float y float w float color symbol type float
pitch float vel float pos symbol data-type float data-nb array data
data-elem;
#N struct data-elem float x float y float z;
#N canvas 1 107 745 692 10;
#N canvas 702 105 450 586 event 0;
#X obj 46 107 filledpolygon color 0 1 0 0 w 0 w 10 0 10;
#X obj 46 23 struct event float x float y float w float color symbol
type float pitch float vel float pos symbol data-type float data-nb
array data data-elem;
#X obj 91 151 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 76 252 plot data 700 0 0 0 4;
#X obj 92 172 drawsymbol data-type 0 -15;
#X obj 46 71 s from_structevent;
#X connect 1 0 5 0;
#X connect 2 0 4 0;
#X connect 2 0 3 0;
#X restore 467 21 pd event;
#N canvas 450 89 450 300 array-data 0;
#X obj 40 41 struct data-elem float x float y float z;
#X obj 69 175 filledpolygon 0 0 0 0 0 0 5 5 5 5 0;
#X obj 45 102 drawnumber z 10 -1 0;
#X obj 40 63 print struct element;
#X connect 0 0 3 0;
#X restore 467 41 pd array-data;
#N canvas 836 227 593 425 window 1;
#X scalar event 210 201 100 123 symbol 0 0 0 symbol 0 \; 0 16 18 \;
35 16 -5 \; 70 15 3 \; 107 14 0 \; 0 30 -41 \; 35 30 0 \; 70 30 0 \;
105 30 0 \; 0 45 0 \; 35 45 0 \; 70 45 0 \; 107 45 0 \; 0 60 0 \; 35
60 0 \; 70 60 0 \; 105 60 0 \; 0 77 0 \; 35 75 0 \; 70 75 0 \; \;;
#X scalar event 246 -2 100 123 symbol 0 0 0 symbol 0 \; 0 15 991 \;
35 15 0 \; 70 15 0 \; 105 15 0 \; 0 30 0 \; 35 30 0 \; 70 30 0 \; 105
30 0 \; 0 45 0 \; 35 45 0 \; 70 45 0 \; 105 45 0 \; 0 60 0 \; \;;
#X restore 470 105 pd window;
#X msg 226 481 traverse pd-window \, bang;
#X obj 226 503 pointer;
#X obj 85 527 append event x y w color;
#X msg 85 487 0 0 100 123;
#X floatatom 40 489 5 0 0 0 - - -;
#X obj 487 345 setsize event data;
#X obj 583 443 getsize event data;
#X obj 613 561 element event data;
#X obj 514 659 set data-elem x y;
#X obj 583 466 t f b;
#X obj 583 488 until;
#X obj 583 510 f;
#X obj 613 510 + 1;
#X obj 583 420 trigger pointer pointer;
#X obj 583 532 t f f;
#X obj 630 485 0;
#X obj 511 549 t f f;
#X obj 538 593 + 1;
#X obj 538 615 * 15;
#X obj 492 586 mod 4;
#X obj 538 571 div 4;
#X obj 511 613 * 35;
#X msg 487 169 traverse pd-window;
#X obj 487 191 pointer;
#X msg 446 174 next;
#X obj 487 236 getsize event data;
#X obj 487 213 trigger pointer pointer;
#X floatatom 487 285 5 0 0 0 set_size - -;
#X msg 487 257 set \$1;
#X obj 487 302 t f b;
#X obj 592 319 pointer;
#X floatatom 448 368 5 0 0 0 nb_per_row - -;
#X obj 583 399 pointer;
#X obj 538 382 t b f;
#X text 70 40 event = rectangle + array of dots;
#X text 80 60 dots = position(x \, y) + value(z \, displayed);
#X text 37 147 I can accurately drag dots. But I cannot click on their
numbers and change manually the displayed value by mouse or keybord.
;
#X obj 314 297 get event x y;
#X floatatom 314 319 5 0 0 0 - - -;
#X floatatom 388 321 5 0 0 0 - - -;
#X text 37 197 The datastructure do not detect mouse clics at the right
place \, for drawnumber nested in arrays. It looks like a scaling issue
\, because I can reach them clicking futher down right \, provided
that I do not clic outside the datastructure.;
#X connect 3 0 4 0;
#X connect 4 0 5 4;
#X connect 6 0 5 0;
#X connect 7 0 5 0;
#X connect 9 0 12 0;
#X connect 10 0 11 2;
#X connect 12 0 13 0;
#X connect 12 1 18 0;
#X connect 13 0 14 0;
#X connect 14 0 15 0;
#X connect 14 0 17 0;
#X connect 15 0 14 1;
#X connect 16 0 9 0;
#X connect 16 1 10 1;
#X connect 17 0 19 0;
#X connect 17 1 10 0;
#X connect 18 0 14 1;
#X connect 19 0 22 0;
#X connect 19 1 23 0;
#X connect 20 0 21 0;
#X connect 21 0 11 1;
#X connect 22 0 24 0;
#X connect 23 0 20 0;
#X connect 24 0 11 0;
#X connect 25 0 26 0;
#X connect 26 0 29 0;
#X connect 26 0 40 0;
#X connect 27 0 26 0;
#X connect 28 0 31 0;
#X connect 29 0 28 0;
#X connect 29 1 33 1;
#X connect 29 1 35 1;
#X connect 30 0 32 0;
#X connect 31 0 30 0;
#X connect 32 0 8 0;
#X connect 32 1 33 0;
#X connect 33 0 8 1;
#X connect 34 0 36 0;
#X connect 35 0 16 0;
#X connect 36 0 35 0;
#X connect 36 1 22 1;
#X connect 36 1 23 1;
#X connect 40 0 41 0;
#X connect 40 1 42 0;
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Data structure: drawnumbers in an array

2012-10-11 Thread Jonathan Wilkes
Is this the bug you're describing?

http://sourceforge.net/tracker/index.php?func=detailaid=2457992group_id=55736atid=478070


 From: mac...@netcourrier.com mac...@netcourrier.com
To: Pd-list@iem.at 
Sent: Thursday, October 11, 2012 12:21 PM
Subject: [PD] Data structure: drawnumbers in an array
 

Dear List,

I have an issue with a data structure consisting of a rectangle and an array 
of dots, with x/y coordinates and a z value for each dot. I displayed the z 
value with [drawnumber]. See the attached patch.

I can clic and move the dots. However, mouse clics do not seem to reach the 
number area correctly. There seems to be a wrong scaling of mouse coordinates 
when trying to reach numbers nested in arrays. In pd 0.43 vanilla and 0.42.5 
extended.

I remember a behavior of the same kind with objects filled with lots of text 
lines. This one was apparently fixed in pd 0.43. 

I wish I could enter my numbers by mouse or keyboard, but for now I can handle 
them via the data properties window.

Clem

___
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 structure array with last element pointing back to first element

2011-10-03 Thread João Pais

The 1st circle is under the 2nd,


you mean, under the last one? (which makes sense, since they're drawn in  
creation order)


and Pd currently registers a click with the object at the bottom.  But  
is that a feature or a bug?


you mean the print coming from the vertex struct, giving the individual y  
values of each scalar in the array? that's a bit strange, never seen it.  
trying to adapt plot's help file doesn't replicate the behavior as well.


Either way, if it's implementation specific it then writing the patch as  
you suggest would work correctly under one implementation


while it wouldn't the move the circle at all under the other.


hmm, am not really understanding what you mean. but I have to work on  
something else right now, can't do much more for the time being.


João





From: João Pais jmmmp...@googlemail.com
To: Scott McCoid mccoid.sc...@gmail.com; pd-list@iem.at  
pd-list@iem.at; Jonathan Wilkes jancs...@yahoo.com

Sent: Sunday, October 2, 2011 8:48 PM
Subject: Re: [PD] Data structure array with last element pointing back  
to first element


wouldn't it be simpler to compare the value of the 1st point with the  
last one, without creating the new variables? it's too late now, can't  
give a concrete example.


or, this is a situation where a change identifier for arrays would  
come in very handy (which already exists for loose pointers). then the  
metro hack wouldn't be necessary.



Here's a quick hack-- didn't check it for bugs.

The real solution would be to add a -c flag to [plot] to draw the  
trace back to element 0:


[plot -c etc.]


-c is the same as curve, right? an extra parameter for the stepness of  
the bezier would also be nice


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


[PD] Data structure array with last element pointing back to first element

2011-10-02 Thread Scott McCoid
Hi,

I've recently started playing around with Pd's data structures, and I need
some help. It's relatively straightforward to create polygons and arrays of
polygons. Though, I'd like to create a closed polygon, where each vertex is
another data structure. I've attached a patch of what I have so far.

I basically just want there to be another line to connect the 4th element of
the array back to the first.

Is it possible to use a [drawpolygon] object where each of the corners would
be another data structure?

Thanks!

Scott


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


Re: [PD] Data structure array with last element pointing back to first element

2011-10-02 Thread Jonathan Wilkes
Here's a quick hack-- didn't check it for bugs.

The real solution would be to add a -c flag to [plot] to draw the trace back 
to element 0:

[plot -c etc.]

And maybe -f COLOR to draw the trace back to element 0 and fill the inside.
(Although that word probably be a bigger change.)

-Jonathan





From: Scott McCoid mccoid.sc...@gmail.com
To: pd-list@iem.at
Sent: Sunday, October 2, 2011 2:13 PM
Subject: [PD] Data structure array with last element pointing back to first 
element


Hi, 


I've recently started playing around with Pd's data structures, and I need 
some help. It's relatively straightforward to create polygons and arrays of 
polygons. Though, I'd like to create a closed polygon, where each vertex is 
another data structure. I've attached a patch of what I have so far. 


I basically just want there to be another line to connect the 4th element of 
the array back to the first.


Is it possible to use a [drawpolygon] object where each of the corners would 
be another data structure? 


Thanks!


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




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


Re: [PD] Data structure array with last element pointing back to first element

2011-10-02 Thread Jonathan Wilkes
The documentation says you can specify a bezier curve with the first argument 
as curve.  But you're 

right, you can also specify a curve by using the -c flag, which is much more 
logical.

I think using curve should be deprecated, for the obvious ambiguity that 
flags solve.

Miller?


-Jonathan





From: Scott McCoid mccoid.sc...@gmail.com
To: Jonathan Wilkes jancs...@yahoo.com
Cc: pd-list@iem.at pd-list@iem.at
Sent: Sunday, October 2, 2011 4:18 PM
Subject: Re: [PD] Data structure array with last element pointing back to 
first element


Whoa, this is great! Thanks Jonathan! 


Wouldn't adding the -c flag make a curved shape between each point?


On Sun, Oct 2, 2011 at 4:08 PM, Jonathan Wilkes jancs...@yahoo.com wrote:

Here's a quick hack-- didn't check it for bugs.


The real solution would be to add a -c flag to [plot] to draw the trace 
back to element 0:


[plot -c etc.]


And maybe -f COLOR to draw the trace back to element 0 and fill the inside.
(Although that word probably be a bigger change.)


-Jonathan





From: Scott McCoid mccoid.sc...@gmail.com
To: pd-list@iem.at
Sent: Sunday, October 2, 2011 2:13 PM
Subject: [PD] Data structure array with last element pointing back to first 
element



Hi, 


I've recently started playing around with Pd's data structures, and I need 
some help. It's relatively straightforward to create polygons and arrays of 
polygons. Though, I'd like to create a closed polygon, where each vertex is 
another data structure. I've attached a patch of what I have so far. 


I basically just want there to be another line to connect the 4th element of 
the array back to the first.


Is it possible to use a [drawpolygon] object where each of the corners would 
be another data structure? 


Thanks!


Scott
___
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 structure array with last element pointing back to first element

2011-10-02 Thread Jonathan Wilkes
The 1st circle is under the 2nd, and Pd currently registers a click with the 
object at the bottom.  But is that a feature or a bug? 
Either way, if it's implementation specific it then writing the patch as you 
suggest would work correctly under one implementation 

while it wouldn't the move the circle at all under the other.

-Jonathan





From: João Pais jmmmp...@googlemail.com
To: Scott McCoid mccoid.sc...@gmail.com; pd-list@iem.at pd-list@iem.at; 
Jonathan Wilkes jancs...@yahoo.com
Sent: Sunday, October 2, 2011 8:48 PM
Subject: Re: [PD] Data structure array with last element pointing back to 
first element

wouldn't it be simpler to compare the value of the 1st point with the last 
one, without creating the new variables? it's too late now, can't give a 
concrete example.

or, this is a situation where a change identifier for arrays would come in 
very handy (which already exists for loose pointers). then the metro hack 
wouldn't be necessary.

 Here's a quick hack-- didn't check it for bugs.
 
 The real solution would be to add a -c flag to [plot] to draw the trace 
 back to element 0:
 
 [plot -c etc.]

-c is the same as curve, right? an extra parameter for the stepness of the 
bezier would also be nice

João


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


[PD] data structure array not mouse editable

2011-02-19 Thread patko

Hello,

 I'd like to draw array with data structures that is not mouse editable, and 
I've seen it's possible to do such thing by drawing array of array.

From what I've understood by reading the archives, this is not really an 
intended behavior.

So I'd like to know if this behavior will stay like this, or if there is a plot 
option to disable mouse editing.

-- 
Patrice Colet 

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


Re: [PD] data structure array not mouse editable

2011-02-19 Thread patko
I've just seen that an array of array is now mouse editable

so is there an option to make an array not mouse editable, or to disable mouse 
edition of x or y or w?


- patko colet.patr...@free.fr a écrit :

 Hello,
 
  I'd like to draw array with data structures that is not mouse
 editable, and I've seen it's possible to do such thing by drawing
 array of array.
 
 From what I've understood by reading the archives, this is not really
 an intended behavior.
 
 So I'd like to know if this behavior will stay like this, or if there
 is a plot option to disable mouse editing.
 
 -- 
 Patrice Colet 
 
 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management -
 http://lists.puredata.info/listinfo/pd-list

-- 
Patrice Colet 

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


Re: [PD] data structure array not mouse editable

2011-02-19 Thread Jonathan Wilkes


--- On Sat, 2/19/11, patko colet.patr...@free.fr wrote:

 From: patko colet.patr...@free.fr
 Subject: Re: [PD] data structure array not mouse editable
 To: pd-list pd-list@iem.at
 Date: Saturday, February 19, 2011, 11:05 PM
 I've just seen that an array of array
 is now mouse editable
 
 so is there an option to make an array not mouse editable,
 or to disable mouse edition of x or y or w?

No, because there is no way to tell when the user is actively changing 
the value of an array element.  There is output from [struct] if you're 
changing the value of a float or symbol field, however, so for non-array 
fields you can create a hack that immediately sets any value changed by 
mouse interaction back to its previous value.

For array elements:
You can use [table] or a Put menu array as the real array data, and 
have your ds array poll that data periodically with a [metro whatever].  
Each time you poll, set reset the ds array elements to the corresponding 
elements of [table].  So the user can change the values, but they go 
back to their real values the next time you poll.

-Jonathan

 
 
 - patko colet.patr...@free.fr
 a écrit :
 
  Hello,
  
   I'd like to draw array with data structures that
 is not mouse
  editable, and I've seen it's possible to do such thing
 by drawing
  array of array.
  
  From what I've understood by reading the archives,
 this is not really
  an intended behavior.
  
  So I'd like to know if this behavior will stay like
 this, or if there
  is a plot option to disable mouse editing.
  
  -- 
  Patrice Colet 
  
  ___
  Pd-list@iem.at
 mailing list
  UNSUBSCRIBE and account-management -
  http://lists.puredata.info/listinfo/pd-list
 
 -- 
 Patrice Colet 
 
 ___
 Pd-list@iem.at
 mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list
 


  

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


Re: [PD] data structure unclickable

2008-07-05 Thread Yvan Volochine
It would be nice indeed.

Another nice thing would be to be able to change plot parameters on the fly,
like [plot myarray 900 1 10 15 h] where h is x-spacing.
I apologize if it's already possible but I couldn't manage that.
The only workaround that I found is to script cut and create new plot but
it's not a handsome style...

Cheers
Yvan



On Thu, Jul 3, 2008 at 6:22 PM, Miller Puckette [EMAIL PROTECTED]
wrote:

 I don't think there's any way, but there should be.  Another one for the
 (growing) dolist...

 cheers
 Miller


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


[PD] data structure unclickable

2008-07-02 Thread Yvan Volochine
Hi list.

Is there any way to make an array in a data structure *not* responding to
clicks ?
Cheers.

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


Re: [PD] Data Structure

2008-04-28 Thread Frank Barknecht
Hallo,
matohawk hat gesagt: // matohawk wrote:

 I have a question about 07.Sequencer patch in 4.data.structures, I see 
 this message
 ;
 pd-data sort
 
 what is of use it?

This sends the message sort to the automatically created receiver of
the [pd data] subpatch, similar to [;pd-data clear(. 

sort will sort the list of data items in the subpatch according to
their x-position. Data items are stored as a linked list: Each item in
this list contains the actual data and a reference to the 
next list item. So the traversal of the list in [pd data] normally
depends on the order, the items were created. After sort the
traversal happens according to x-position, as each list item's
next-reference is updated to point to the next item to the right
according to x-coordinate.

Ciao
-- 
 Frank Barknecht _ __footils.org__

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


[PD] Data Structure

2008-04-27 Thread matohawk
Hello,
I have a question about 07.Sequencer patch in 4.data.structures, I see 
this message
;
pd-data sort

what is of use it?

Cheers Thomas
http://matohawkitongroup.free.fr

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


Re: [PD] Data structure grain weirdness with x-y arrays

2008-04-23 Thread Hans-Christoph Steiner

You could also update the 'scalar' help patch, which you get when you  
get help on a visual instance of a data structure.  It is in SVN here:

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

.hc

On Apr 22, 2008, at 5:04 PM, Luke Iannini (pd) wrote:

 On an unrelated note, I just discovered:
 Option/Command click on an element to duplicate the element (it's best
 to click and drag since it will appear on top of the element you click
 on), or just to the left of the element to delete it (when using
 Option, cursors appear to let one know which operation will occur, but
 oddly not with Command).

 Shift-dragging an element moves it *and* all following elements  
 after it.

 I was vaguely aware of Command-clicking to add elements (though I had
 never gotten it to work), but I had no idea about deleting and
 dragging, both of which will be extremely useful in a sequencing
 context.

 I guess I'll stick these in the wiki somewhere.

 Cheers
 Luke

 On Mon, Apr 21, 2008 at 11:14 AM, Luke Iannini (pd)  
 [EMAIL PROTECTED] wrote:
 Hallo,
  I'm continuing work on a data structure sequencer, and have switched
  to using arrays for performance reasons thanks to Frank and Miller's
  suggestion.  That worked quite well!  Thanks again.

  One door leads to another, of course: I've run into an odd issue  
 when
  using the relatively recent grain and scale definitions with the
  elements of the array.  I've attached a modified version of
  05.array.pd to demonstrate.  Dragging array elements with the mouse
  becomes erratic as soon as the -y y(0:100)(0:1000)(1) or similar
  instruction is added to [plot], in that very fast mouse movements  
 are
  required to effect any change (i.e. move the mouse slowly enough,  
 and
  the element won't move at all).

  As far as I can tell the bug applies to the direction being  
 grained,
  but adding grain/scale to -x broke things entirely for me (the  
 drawing
  seemed to occur correctly, but I couldn't find any clickable
  hotspots).

  Finally, the hotspots for resizing elements also become displaced in
  the x direction.  In the patch, try resizing the rightmost green  
 boxes
  in the array to see what I mean.

  That's all.

  (okay, not really.  Are there any plans to add the change pointer
  output to elements of an array?  Their [struct]s remain silent.)

  Cheers
  Luke


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



 


Looking at things from a more basic level, you can come up with a  
more direct solution... It may sound small in theory, but it in  
practice, it can change entire economies. - Amy Smith



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


Re: [PD] Data structure grain weirdness with x-y arrays

2008-04-22 Thread Luke Iannini (pd)
On an unrelated note, I just discovered:
Option/Command click on an element to duplicate the element (it's best
to click and drag since it will appear on top of the element you click
on), or just to the left of the element to delete it (when using
Option, cursors appear to let one know which operation will occur, but
oddly not with Command).

Shift-dragging an element moves it *and* all following elements after it.

I was vaguely aware of Command-clicking to add elements (though I had
never gotten it to work), but I had no idea about deleting and
dragging, both of which will be extremely useful in a sequencing
context.

I guess I'll stick these in the wiki somewhere.

Cheers
Luke

On Mon, Apr 21, 2008 at 11:14 AM, Luke Iannini (pd) [EMAIL PROTECTED] wrote:
 Hallo,
  I'm continuing work on a data structure sequencer, and have switched
  to using arrays for performance reasons thanks to Frank and Miller's
  suggestion.  That worked quite well!  Thanks again.

  One door leads to another, of course: I've run into an odd issue when
  using the relatively recent grain and scale definitions with the
  elements of the array.  I've attached a modified version of
  05.array.pd to demonstrate.  Dragging array elements with the mouse
  becomes erratic as soon as the -y y(0:100)(0:1000)(1) or similar
  instruction is added to [plot], in that very fast mouse movements are
  required to effect any change (i.e. move the mouse slowly enough, and
  the element won't move at all).

  As far as I can tell the bug applies to the direction being grained,
  but adding grain/scale to -x broke things entirely for me (the drawing
  seemed to occur correctly, but I couldn't find any clickable
  hotspots).

  Finally, the hotspots for resizing elements also become displaced in
  the x direction.  In the patch, try resizing the rightmost green boxes
  in the array to see what I mean.

  That's all.

  (okay, not really.  Are there any plans to add the change pointer
  output to elements of an array?  Their [struct]s remain silent.)

  Cheers
  Luke


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


[PD] Data structure grain weirdness with x-y arrays

2008-04-21 Thread Luke Iannini (pd)
Hallo,
I'm continuing work on a data structure sequencer, and have switched
to using arrays for performance reasons thanks to Frank and Miller's
suggestion.  That worked quite well!  Thanks again.

One door leads to another, of course: I've run into an odd issue when
using the relatively recent grain and scale definitions with the
elements of the array.  I've attached a modified version of
05.array.pd to demonstrate.  Dragging array elements with the mouse
becomes erratic as soon as the -y y(0:100)(0:1000)(1) or similar
instruction is added to [plot], in that very fast mouse movements are
required to effect any change (i.e. move the mouse slowly enough, and
the element won't move at all).

As far as I can tell the bug applies to the direction being grained,
but adding grain/scale to -x broke things entirely for me (the drawing
seemed to occur correctly, but I couldn't find any clickable
hotspots).

Finally, the hotspots for resizing elements also become displaced in
the x direction.  In the patch, try resizing the rightmost green boxes
in the array to see what I mean.

That's all.

(okay, not really.  Are there any plans to add the change pointer
output to elements of an array?  Their [struct]s remain silent.)

Cheers
Luke


05.array-grains.pd
Description: Binary data
___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Data structure loop selection

2007-02-05 Thread robbert van hulzen
a quick ps: afaik any patch has a name (with which you saved it) and a
unique number: $0 (which you can use to avoid [s] [r] confusion in (multiple
instances of) abstractions).
to see it:

[bng]
|
[$0]
|
[nbx]

cheers, robbert

Peter Plessas [EMAIL PROTECTED] wrote:

...
 Although even your main (root) patch has such an unique name (some
 number i think), you would have to find it out (perhaps it is the same
 as the $0 variable)



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


Re: [PD] Data structure loop selection

2007-02-03 Thread Steffen


On 03/02/2007, at 2.27, raul diaz wrote:

- Is it possible to show  the $1 value in the canvas name: 1_sample  
instead of $1_sample? (That's not necessarily but I'm cusious)


You can set the canvas name by

[label new-canvas-name(
|
[send canvas-receive-symbol]

See attached pd patch for a lill' more detail.



set-canvas-name.pd
Description: Binary data



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


Re: [PD] Data structure loop selection

2007-02-03 Thread Frank Barknecht
Hallo,
raul diaz hat gesagt: // raul diaz wrote:

 I have made an abstraction for a table loop selection with data structure.
 That's the first I made with data structure, so I suposse there are some
 mistakes 

There's a big mistake where you do the data subpatch traversal: There
is no subpatch [pd 1_table] in your patch but still you try to do a
[traverse pd-1_table(. Instead there is a [pd $1_table] subpatch. 
You should use something like 
 
 [symbol pd-$1_table]
 |
 [traverse $1(

instead, if you're using Pd 0.40, or 

 [symbol $1_table]
 |
 [makefilename pd-%s]
 |
 [traverse $1(

for older Pds.

 and some things I would like to improve:
 - I would like to limit init and end point rango between 0 and 100, that way
 I could't drag either the init point down to 0 or the end point up to 100.

Check out the 09.scaling.pd help patch in the docs. You need to use a
different syntax to paint, it looks something like this x(0:100)(0:100)

However for what you want to do, you need to change other parts of the
patch as well and intruduce a dummy-X-coordinate. See attached
patch.


 - I don't know why I have two times the init and end markers (I only want
 one init marker and another end marker)

Probably one was saved with the patch. If you clear the subpatch and
put the markers on again, everything's fine.

 - How can I modify either the init or end markers from an external value
 (via receive)

You can send and receive pointers. Just get a pointer to one of the
markers using for example traversal, then send that pointer somewhere,
where you have a [set init x] object or so. 

You can also store the received pointer in a [pointer] object, if you
want to reuse it several times just like a [float] or [symbol].

Ciao
-- 
 Frank Barknecht _ __footils.org_ __goto10.org__
#N struct limited float x float y float dummy-x;
#N canvas 408 231 450 300 10;
#N canvas 383 206 852 549 limited 1;
#X text 83 153 Red: No scaling applied:;
#X text 80 206 Black: scaling applied;
#X obj 669 429 pointer;
#X obj 669 343 makefilename pd-%s;
#X obj 669 320 symbol subpatch;
#X obj 492 326 inlet;
#X obj 492 346 t b a;
#X obj 82 80 route select;
#X obj 82 103 outlet;
#X msg 669 408 traverse \$1 \, bang;
#X obj 82 53 struct limited float x float y float dummy-x;
#X obj 492 463 append limited x y dummy-x;
#X text 409 146 border;
#X msg 544 322 painter;
#X obj 410 179 drawpolygon 666 1 0 0 0 100 100 100 100 0 0 0;
#X msg 716 365 \; \$1 clear;
#X obj 669 366 t a a;
#X obj 84 177 drawpolygon 900 3 dummy-x 0 dummy-x 50;
#X obj 81 229 drawpolygon 0 3 dummy-x(0:100)(0:100) 50 dummy-x(0:100)(0:100)
100;
#X msg 492 423 100 100 30;
#X obj 199 82 drawnumber dummy-x 0 -20 0 dummy-x=;
#X text 82 315 Blue: Funky scaling;
#X obj 81 345 drawpolygon 8 3 dummy-x(0:100)(10:110) 50 dummy-x(50:1)(100:50)
100;
#X connect 2 0 11 3;
#X connect 3 0 16 0;
#X connect 4 0 3 0;
#X connect 5 0 6 0;
#X connect 6 0 19 0;
#X connect 6 1 4 0;
#X connect 7 0 8 0;
#X connect 9 0 2 0;
#X connect 10 0 7 0;
#X connect 13 0 6 0;
#X connect 16 0 9 0;
#X connect 16 1 15 0;
#X connect 19 0 11 0;
#X restore 75 67 pd limited;
#N canvas 0 0 450 300 painter 1;
#X scalar limited 100 100 51 \;;
#X restore 235 68 pd painter;
#X msg 75 42 painter;
#X connect 2 0 0 0;
___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Data structure loop selection

2007-02-03 Thread raul diaz

Hi list, Hi Frank!

Thanks Steffen and Frank for your help!

I have remake my abstraction and I think now there is no mistake.
Now I want to create my array $1_sample dynamically, but message array
doesn't work.
I receive error: Bad arguments for message 'array' to object 'canvas'.
Any suggestion?

Saludos.

--
Raul Diaz Poblete
*
[EMAIL PROTECTED]
Ciudad Real [Spain]
___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Data structure loop selection

2007-02-03 Thread raul diaz

Sorry...I forgot to attached my patch!

2007/2/3, raul diaz [EMAIL PROTECTED]:


Hi list, Hi Frank!

Thanks Steffen and Frank for your help!

I have remake my abstraction and I think now there is no mistake.
Now I want to create my array $1_sample dynamically, but message array
doesn't work.
I receive error: Bad arguments for message 'array' to object 'canvas'.
Any suggestion?

Saludos.




--
Raul Diaz Poblete
*
[EMAIL PROTECTED]
Ciudad Real [Spain]


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


Re: [PD] Data structure loop selection

2007-02-03 Thread Peter Plessas

Hi, did you try table instead of array?
AFAIK, array is just the GUI-variant of table...

lg, Peter

raul diaz wrote:

Hi list, Hi Frank!

Thanks Steffen and Frank for your help!

I have remake my abstraction and I think now there is no mistake.
Now I want to create my array $1_sample dynamically, but message array
doesn't work.
I receive error: Bad arguments for message 'array' to object 'canvas'.
Any suggestion?

Saludos.




___
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 structure loop selection

2007-02-03 Thread Peter Plessas

Hi,

ah you are trying to create an object inside a subpatch, right (scripting)?
Then the correct syntax would be:

[obj 10 10 table(
 |
 |
[s pd-1_table]

where 1_table is the name of a subpatch, so i am not sure if you are 
to append the suffix .pd

10 10 is the X and Y position of the object.

There are some docs online about pd-scripting:

http://puredata.org/community/pdwiki/PdInternalMessages/?searchterm=pd-msg

lg,P

raul diaz wrote:

Hi!

Hi, did you try table instead of array?

AFAIK, array is just the GUI-variant of table...



Either table or array doesn't work.
I use the next scheme:

|table(
|
|s pd-1_table.pd|

I don't know why!?




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


Re: [PD] Data structure loop selection

2007-02-03 Thread raul diaz

Thanks Peter!

Now I can create a table object with your messages.
But the problem is that I don't want to create a subpatch with a table.
Instead of that I would like to create a table in a existing subpatch
($1_table) with all my data structure markers. Maybe it's better to create
first my subpatch $1_table with your messages and then create all the data
structure inside.

Anyway, thanks a lot and regards.

2007/2/3, Peter Plessas [EMAIL PROTECTED]:


Hi,

ah you are trying to create an object inside a subpatch, right
(scripting)?
Then the correct syntax would be:

[obj 10 10 table(
  |
  |
[s pd-1_table]

where 1_table is the name of a subpatch, so i am not sure if you are
to append the suffix .pd
10 10 is the X and Y position of the object.

There are some docs online about pd-scripting:

http://puredata.org/community/pdwiki/PdInternalMessages/?searchterm=pd-msg

lg,P




--
Raul Diaz Poblete
*
[EMAIL PROTECTED]
Ciudad Real [Spain]
___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Data structure loop selection

2007-02-03 Thread Peter Plessas

Hi,

just a quick one, other people might give better advice though:
Afaik the target (f.e. subpatch) must exist before you can script. Why? 
Because you have to know the name of your target, f.e. [pd target].
Although even your main (root) patch has such an unique name (some 
number i think), you would have to find it out (perhaps it is the same 
as the $0 variable), or use the (deprecated?) [namecanvas] object to 
explicitely name your patch.


So either someone comes up with a better explanation or you try creating 
that one subpatch by hand, and after that, start scripting objects, 
messages, etc. inside.


Search the mailing-list archives as well.

good luck,

BTW: you left graz again, didn't you?

Peter

raul diaz wrote:

Thanks Peter!

Now I can create a table object with your messages.
But the problem is that I don't want to create a subpatch with a table.
Instead of that I would like to create a table in a existing subpatch
($1_table) with all my data structure markers. Maybe it's better to create
first my subpatch $1_table with your messages and then create all the data
structure inside.

Anyway, thanks a lot and regards.

2007/2/3, Peter Plessas [EMAIL PROTECTED]:


Hi,

ah you are trying to create an object inside a subpatch, right
(scripting)?
Then the correct syntax would be:

[obj 10 10 table(
  |
  |
[s pd-1_table]

where 1_table is the name of a subpatch, so i am not sure if you are
to append the suffix .pd
10 10 is the X and Y position of the object.

There are some docs online about pd-scripting:

http://puredata.org/community/pdwiki/PdInternalMessages/?searchterm=pd-msg 



lg,P






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


Re: [PD] Data structure loop selection

2007-02-03 Thread raul diaz

Sorry, maybe I might give a better explanation.

I want to create all my loop selection each loadbang. So, I could clear the
subpatch (f.e.$1_table) at loadbang and after that I create my array and my
data structure markers. This way, I avoid to duplicate data structure
markers.
But, if there is another way to create my data structure markers in a
existing subpatch (f.e.$1_table) without duplicate risk, it will be perfect
too.


BTW: you left graz again, didn't you?


I was in graz during last year, until juny. I would like to visit graz in

sprig...maybe at springseven festival!

Saludos.

--
Raul Diaz Poblete
*
[EMAIL PROTECTED]
Ciudad Real [Spain]
___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list