Hi,
on 2nd thought to the array problem:
Is it possible to change the size of the graphic representation of an array and its x-y location with a message? Then the main buffer could get obsolete and the space it occupies on the screen would be replaced by enlarged versions of the "icons" in turn.
-- Orm
hi, there is normalize and (with soundfiler) resize, but that's maybe not what you were asking for? the display of 2646000 samples (1minute) is not faster if the size of the array is 20 pixels or 500. to have fast displays, i suggest to extremely downsample the data! (to 20 or 500 samples) this will be visible in less than 10 ms. sÃme.
----- Original Message ----- From: "Orm Finnendahl" finnendahl@folkwang-hochschule.de To: pd-list@iem.kug.ac.at Sent: Thursday, May 16, 2002 10:45 AM Subject: [PD] arrays, 2nd thought
Hi,
on 2nd thought to the array problem:
Is it possible to change the size of the graphic representation of an array and its x-y location with a message? Then the main buffer could get obsolete and the space it occupies on the screen would be replaced by enlarged versions of the "icons" in turn.
-- Orm
hi Orm,
yes, if you happen to know array size:
"<array-size> <screen-x-size> <screen-y-size>" -> "; pd-<graph-name> coords 0 1 $1 -1 $2 $3 1; <array-name> resize $1"
The sole purpose of resize' message to an array above is forcing to redraw it, but, anyway, you need the size for the
coords' message.
I think there is an external, somewhere, which reports array size.
Btw, there is a 'concat' method in a vexing library used for coping data between arrays. It is still a shameful vapourware, but if you have plenty of time and patience, might send you a snapshot...
Krzysztof
Orm Finnendahl wrote: ...
Is it possible to change the size of the graphic representation of an array and its x-y location with a message? Then the main buffer could
Hi Krzysztof,
thanks for the help. I tried this and it works to move the array. But I can't change the size of its visual appearance (I would like to move AND resize the appearance of the array.
Here is the patch (you have to load another sample as it isn't included):
#N canvas 111 20 876 667 10; #X obj 395 92 soundfiler; #X msg 397 26 read -resize /home/orm/work/kompositionen/palindrome/snd/matthias04.wav array3; #N canvas 78 482 310 147 graph7 0; #N canvas 0 0 450 300 graph3 0; #X array array3 132200 float 0; #X coords 0 1 132199 -1 200 140 1; #X restore 24 -2 graph; #X coords 0 1 2200 -1 3000 -30340 1; #X restore -61 -16 pd graph7; #X msg 408 194 ; pd-graph7 coords 0 1 132200 -1 3000 -30340 1 ; array3 resize 132200; #X msg 406 246 ; pd-graph7 coords 0 1 132200 -1 0 0 1 ; array3 resize 132200; #X connect 1 0 0 0;
How can I do that? In addition: If I have two arrays in that graph, how can I make them to swap positions? Or is it not wise to have more than one array in the same graph, and rather put the graphs on top of each other??
-- Orm
Am Donnerstag, den 16. Mai 2002 um 12:33:04 Uhr (+0200) schrieb Krzysztof Czaja:
hi Orm,
yes, if you happen to know array size:
"<array-size> <screen-x-size> <screen-y-size>" -> "; pd-<graph-name> coords 0 1 $1 -1 $2 $3 1; <array-name> resize $1"
The sole purpose of
resize' message to an array above is forcing to redraw it, but, anyway, you need the size for the
coords' message.I think there is an external, somewhere, which reports array size.
Btw, there is a 'concat' method in a vexing library used for coping data between arrays. It is still a shameful vapourware, but if you have plenty of time and patience, might send you a snapshot...
Krzysztof
Orm Finnendahl wrote: ...
Is it possible to change the size of the graphic representation of an array and its x-y location with a message? Then the main buffer could
hi Orm,
check the attached example. It is much too cryptic, and fragile -- and do not save it, unless stopped in an initial state!
Krzysztof
Orm Finnendahl wrote: ...
I can't change the size of its visual appearance (I would like to move AND resize the appearance of the array.
#N canvas 97 92 997 792 12; #N canvas 0 0 450 300 t1 0; #X array 1-t 100 float 0; #X coords 0 1 99 -1 100 100 1; #X restore 50 50 graph; #N canvas 0 0 450 300 t2 0; #X array 2-t 100 float 0; #X coords 0 1 99 -1 500 300 1; #X restore 350 50 graph; #X obj 57 501 t b b; #X obj 466 500 t b b; #X msg 57 620 ; pd-array-magic.pd editmode 1 , mouse $4 $5 0 0 , motion $6 $7 0 , mouseup $6 $7 0 , editmode 0 ; $2 coords 0 1 $3 -1 $8 $9 1 ; $1-t resize $3 ; pd-array-magic.pd editmode 1 , editmode 0; #X msg 466 543 1 pd-t1 100 100 100 400 100 500 300; #X msg 96 579 1 pd-t1 100 400 100 100 100 100 100; #X msg 57 540 2 pd-t2 100 100 250 400 100 500 300; #X msg 505 579 2 pd-t2 100 400 100 100 250 100 100; #X obj 236 444 metro 500; #X obj 236 477 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X obj 57 464 spigot; #X obj 466 466 spigot; #X obj 467 430 t b 0; #X obj 57 429 t 0 b; #X obj 236 410 loadbang; #X obj 195 409 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X connect 2 0 7 0; #X connect 2 1 6 0; #X connect 3 0 5 0; #X connect 3 1 8 0; #X connect 5 0 4 0; #X connect 6 0 4 0; #X connect 7 0 4 0; #X connect 8 0 4 0; #X connect 9 0 10 0; #X connect 10 0 13 0; #X connect 10 0 14 0; #X connect 11 0 2 0; #X connect 12 0 3 0; #X connect 13 0 12 0; #X connect 13 1 12 1; #X connect 14 0 11 1; #X connect 14 1 11 0; #X connect 15 0 9 0; #X connect 16 0 9 0;
Hi,
thanks Krzysztof!
I definetely have to come up with some other idea although it is amazing that mouse events can be scripted within pd itself.
All that makes me think about a piece of music in form of a pd patch, which reconstructs itself (creating objects and connections, triggering events etc.) while evolving. For a performance, the screen has to get projected and there should be some amount of indeterminancy about the flow of events. Maybe a dynamic system? Maybe doing some sort of creation contest among pd-users (like the most obtrusive c-code contest)? :-)
Yours, Orm
Am Donnerstag, den 16. Mai 2002 um 15:42:58 Uhr (+0200) schrieb Krzysztof Czaja:
hi Orm,
check the attached example. It is much too cryptic, and fragile -- and do not save it, unless stopped in an initial state!
Krzysztof
Orm Finnendahl wrote: ...
I can't change the size of its visual appearance (I would like to move AND resize the appearance of the array.
#N canvas 97 92 997 792 12; #N canvas 0 0 450 300 t1 0; #X array 1-t 100 float 0; #X coords 0 1 99 -1 100 100 1; #X restore 50 50 graph; #N canvas 0 0 450 300 t2 0; #X array 2-t 100 float 0; #X coords 0 1 99 -1 500 300 1; #X restore 350 50 graph; #X obj 57 501 t b b; #X obj 466 500 t b b; #X msg 57 620 ; pd-array-magic.pd editmode 1 , mouse $4 $5 0 0 , motion $6 $7 0 , mouseup $6 $7 0 , editmode 0 ; $2 coords 0 1 $3 -1 $8 $9 1 ; $1-t resize $3 ; pd-array-magic.pd editmode 1 , editmode 0; #X msg 466 543 1 pd-t1 100 100 100 400 100 500 300; #X msg 96 579 1 pd-t1 100 400 100 100 100 100 100; #X msg 57 540 2 pd-t2 100 100 250 400 100 500 300; #X msg 505 579 2 pd-t2 100 400 100 100 250 100 100; #X obj 236 444 metro 500; #X obj 236 477 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X obj 57 464 spigot; #X obj 466 466 spigot; #X obj 467 430 t b 0; #X obj 57 429 t 0 b; #X obj 236 410 loadbang; #X obj 195 409 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X connect 2 0 7 0; #X connect 2 1 6 0; #X connect 3 0 5 0; #X connect 3 1 8 0; #X connect 5 0 4 0; #X connect 6 0 4 0; #X connect 7 0 4 0; #X connect 8 0 4 0; #X connect 9 0 10 0; #X connect 10 0 13 0; #X connect 10 0 14 0; #X connect 11 0 2 0; #X connect 12 0 3 0; #X connect 13 0 12 0; #X connect 13 1 12 1; #X connect 14 0 11 1; #X connect 14 1 11 0; #X connect 15 0 9 0; #X connect 16 0 9 0;
At 16:37 16.05.2002 +0200, you wrote:
Hi,
thanks Krzysztof!
I definetely have to come up with some other idea although it is amazing that mouse events can be scripted within pd itself.
All that makes me think about a piece of music in form of a pd patch, which reconstructs itself (creating objects and connections, triggering events etc.) while evolving. For a performance, the screen has to get projected and there should be some amount of indeterminancy about the flow of events. Maybe a dynamic system? Maybe doing some sort of creation contest among pd-users (like the most obtrusive c-code contest)? :-)
It would be even better, if there were better possibilities to delete and destroy patches and objects within the messaging-system ......
Greetings Michael
Michael Iber
http://www.iberspace.de mailto://mail@iber-online.de
hi,
yes!!! the meaning seems clear to me of six arguments for pd-<graph-name>: X from, Y to, X to, Y from, screen width, screen height, ... do you know what the last value stands for? and how can i specify the location of the graph (esp. new graphs) (it always appears at 100/20)?
sÃme.
----- Original Message ----- From: "Krzysztof Czaja" czaja@chopin.edu.pl To: "Orm Finnendahl" finnendahl@folkwang-hochschule.de Cc: pd-list@iem.kug.ac.at Sent: Thursday, May 16, 2002 12:33 PM Subject: Re: [PD] arrays, 2nd thought
hi Orm,
yes, if you happen to know array size:
"<array-size> <screen-x-size> <screen-y-size>" -> "; pd-<graph-name> coords 0 1 $1 -1 $2 $3 1; <array-name> resize $1"
hi Marius,
last argument of coords' message is
graph-on-parent' flag.
I do not know of any way of changing the screen location of an existing object other than using mouse events, as in my `array-magic' example:
editmode 1, mouse <x0> <y0> 0 0, motion <x1> <y1> 0, mouseup <x1> <y1> 0, editmode 0
where <x0>, <y0> should be a screen point unique to an object, and <x1> = <x0> + <x-shift>, same for <y1> (growing downwards).
In the example the final line of ``editmode 1, editmode 0'' is redundant (left in haste).
All this is pure (but dirty) hacking, using undocumented interface -- Miller has every right to change anything anytime...
Krzysztof
sme wrote: ...
pd-<graph-name>: X from, Y to, X to, Y from, screen width, screen height, ... do you know what the last value stands for? and how can i specify the location of the graph (esp. new graphs) (it always appears at 100/20)?
...
"<array-size> <screen-x-size> <screen-y-size>" -> "; pd-<graph-name> coords 0 1 $1 -1 $2 $3 1; <array-name> resize $1"