I have avoided this by getting myself in the habit of moving stuff around with a shift-arrowkey rather than the mouse. It takes a second longer, but it's almost guaranteed to work (it also helps avoid that annoying problem you get when you paste something directly over what you just copied and you don't know which one you're grabbing with the mouse).
Matt
Date: Thu, 27 Nov 2008 03:52:57 +0900 From: "hard off" hard.off@gmail.com Subject: [PD] undoing a dodgy cut and paste To: "PD list" pd-list@iem.at Message-ID: 161320dd0811261052g1f97489fw53c0a213908e3f08@mail.gmail.com Content-Type: text/plain; charset="iso-8859-1"
i'm sure this must have happened to everyone a couple of times:
you cut a section of a patch, and paste it into another patch or subpatch. the pasted contents overlay existing parts of the patch, and you go to move them with your mouse while they are still highlighted.
however, sometimes your mouse just doesn't hit a part of the highlighted pasted objects, and the highlight comes off, and you're left with a big tangled mess of objects and patch chords.
other than just 'being super careful', is there any way to avoid or fix this problem without moving each individual object by hand???
After checking out Frank Barknecht's ds slider example, I'm trying to build a ds bar-graph that behaves like the max multi-slider, where you can click-drag to change multiple values in one mouse-swoop. In the attached patch, you can click on the red "handle" and drag across the bars to change the elements of the arrays. But I can't figure out how to resize the "bars" without using a metro to get the y-value of the handles. Is there a simpler way to do this? I tried using only one struct for both "bar" and "handle" but couldn't figure out how to get the bottom of the bars to stay constant.
Thanks, Jonathan
Wow, didn't really look at the programming, but the sliders look great...
Mike
On Wed, Nov 26, 2008 at 3:06 PM, Jonathan Wilkes jancsika@yahoo.com wrote:
After checking out Frank Barknecht's ds slider example, I'm trying to build a ds bar-graph that behaves like the max multi-slider, where you can click-drag to change multiple values in one mouse-swoop. In the attached patch, you can click on the red "handle" and drag across the bars to change the elements of the arrays. But I can't figure out how to resize the "bars" without using a metro to get the y-value of the handles. Is there a simpler way to do this? I tried using only one struct for both "bar" and "handle" but couldn't figure out how to get the bottom of the bars to stay constant.
Thanks, Jonathan
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Funky stuff, looks nice.
.hc
On Nov 26, 2008, at 7:10 PM, Mike McGonagle wrote:
Wow, didn't really look at the programming, but the sliders look
great...Mike
On Wed, Nov 26, 2008 at 3:06 PM, Jonathan Wilkes
jancsika@yahoo.com wrote:After checking out Frank Barknecht's ds slider example, I'm trying
to build a ds bar-graph that behaves like the max multi-slider,
where you can click-drag to change multiple values in one mouse- swoop. In the attached patch, you can click on the red "handle" and
drag across the bars to change the elements of the arrays. But I
can't figure out how to resize the "bars" without using a metro to
get the y-value of the handles. Is there a simpler way to do this? I tried using only one
struct for both "bar" and "handle" but couldn't figure out how to
get the bottom of the bars to stay constant.Thanks, Jonathan
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
-- Peace may sound simple—one beautiful word— but it requires everything we have, every quality, every strength, every dream, every high ideal. —Yehudi Menuhin (1916–1999), musician
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
'You people have such restrictive dress for women,’ she said,
hobbling away in three inch heels and panty hose to finish out
another pink-collar temp pool day. - “Hijab Scene #2", by Mohja Kahf
i understand your question, and unfortunately don't have the answer because datastructs are a bit foreign to me.
however...if you are going to use this structure for controlling audio or visual processes, then won't you need to constantly poll the y-values of the handles anyway?
I haven't put it to practical use yet. But if I weren't using arrays, I would just have a scalable rectangle, for example, and get the y-value from the outlet of the corresponding struct. When stretching the rectangle, it gives a "change" message plus a pointer to the object, so there's no need to poll.
But a struct won't output anything when moving an array element. If it did, then maybe it's as simple as using [tabwrite] to link to a table for audio processing.
--- On Mon, 12/1/08, hard off hard.off@gmail.com wrote:
From: hard off hard.off@gmail.com Subject: Re: [PD] Multi-slider attempt To: "Hans-Christoph Steiner" hans@eds.org Cc: "PD-List" pd-list@iem.at Date: Monday, December 1, 2008, 5:47 AM i understand your question, and unfortunately don't have the answer because datastructs are a bit foreign to me.
however...if you are going to use this structure for controlling audio or visual processes, then won't you need to constantly poll the y-values of the handles anyway? _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
After screwing around with ds for awhile, I figured out that if you scale a point on a polygon or curve in the opposite direction of the y-scale for the plot, you get an anchored point that doesn't move, as in the attached bargraph.pd. Same thing works for drawnumber.
When I tested this using Miller's 0.42-0test06, I noticed some new features for data structures:
I also made a little scrolling bar graph test to get some heavy use out of ds while dealing with sound. In barscroll.pd, traversing the array every 40ms works fine with about 30 elements (at least with the simple, gritty sounds I'm using), but with 200 both video and audio get chopped up considerably. Sluggish redrawing seems to affect all data structures, too-- even in other patches.
Finally, I noticed a few things that might be nice additions to ds, if they're possible and/or desirable:
I have no idea how to implement any of these, but I hope at least a few of them would be generally useful.
-Jonathan
--- On Tue, 12/2/08, Jonathan Wilkes jancsika@yahoo.com wrote:
From: Jonathan Wilkes jancsika@yahoo.com Subject: Re: [PD] Multi-slider attempt To: "Hans-Christoph Steiner" hans@eds.org, "hard off" hard.off@gmail.com Cc: "PD-List" pd-list@iem.at Date: Tuesday, December 2, 2008, 2:53 AM I haven't put it to practical use yet. But if I weren't using arrays, I would just have a scalable rectangle, for example, and get the y-value from the outlet of the corresponding struct. When stretching the rectangle, it gives a "change" message plus a pointer to the object, so there's no need to poll.
But a struct won't output anything when moving an array element. If it did, then maybe it's as simple as using [tabwrite] to link to a table for audio processing.
--- On Mon, 12/1/08, hard off hard.off@gmail.com wrote:
From: hard off hard.off@gmail.com Subject: Re: [PD] Multi-slider attempt To: "Hans-Christoph Steiner"
Cc: "PD-List" pd-list@iem.at Date: Monday, December 1, 2008, 5:47 AM i understand your question, and unfortunately
don't have
the answer because datastructs are a bit foreign to me.
however...if you are going to use this structure for controlling audio or visual processes, then won't you need to
constantly
poll the y-values of the handles anyway? _______________________________________________ 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
hi jonathan,
you can update he bars by making them part of the handles. i attached my version of your attempt.
g.
Jonathan Wilkes:
After checking out Frank Barknecht's ds slider example, I'm trying to build a ds bar-graph that behaves like the max multi-slider, where you can click-drag to change multiple values in one mouse-swoop. In the attached patch, you can click on the red "handle" and drag across the bars to change the elements of the arrays. But I can't figure out how to resize the "bars" without using a metro to get the y-value of the handles. Is there a simpler way to do this? I tried using only one struct for both "bar" and "handle" but couldn't figure out how to get the bottom of the bars to stay constant.
Thanks, Jonathan
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
#N struct container float x float y array handles handle; #N struct handle float y; #N canvas 431 83 816 617 10; #N canvas 75 211 450 300 container 0; #X obj 82 53 struct container float x float y array handles handle array; #X obj 82 97 plot handles 0 0 0 40 23; #X restore 164 104 pd container; #N canvas 56 33 534 703 paint 1; #X scalar container 100 100 ; 38 ; 92 ; 83 ; 52 ; 54 ; 58 ; 62 ; 33 ; ;; #X coords 0 0 1 1 85 60 0; #X restore 343 139 pd paint; #X msg 404 109 clear; #X obj 404 136 s pd-paint; #N canvas 1100 4 580 348 handle 1; #X obj 98 72 struct handle float y; #X obj 98 101 filledpolygon 950 333 1 -10 -5 10 -5 10 5 -10 5 -10 -5 ; #X obj 159 141 filledpolygon 777 666 1 -10 y(-100:120)(227:7) 10 y(-100:120)(227:7) 10 8 -10 8 -10 y(-100:120)(227:7); #X restore 164 60 pd handle; #N canvas 0 22 427 343 init 0; #X obj 114 192 append container x y; #X obj 231 166 pointer; #X msg 231 140 traverse pd-paint , bang; #X obj 114 83 t b b b; #X msg 114 148 100 100; #X msg 211 85 ; pd-paint clear; #X obj 114 29 loadbang; #X obj 114 227 outlet; #X obj 61 29 inlet; #X connect 0 0 7 0; #X connect 1 0 0 2; #X connect 2 0 1 0; #X connect 3 0 4 0; #X connect 3 1 2 0; #X connect 3 2 5 0; #X connect 4 0 0 0; #X connect 6 0 3 0; #X connect 8 0 3 0; #X restore 331 230 pd init; #X obj 184 325 setsize container handles; #X obj 331 198 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 373 416 element container handles; #X obj 373 441 get handle y; #X msg 184 290 8; #X text 257 196 Re-init -->; #X obj 184 258 t b; #X msg 555 144 bang; #X obj 373 323 until; #X obj 373 345 f; #X obj 402 345 + 1; #X obj 448 347 sel 0; #X obj 402 367 mod 10; #X obj 454 501 list; #X obj 448 567 list; #X text 591 142 get the list; #X obj 448 588 print Values; #X obj 373 508 list prepend; #X obj 373 301 t b b; #X msg 442 477 list; #X obj 246 290 + 1; #X obj 373 396 - 1; #X obj 574 540 unpack 0 0 0 0 0 0 0 0; #X floatatom 519 575 5 0 0 0 - - -; #X floatatom 552 575 5 0 0 0 - - -; #X floatatom 585 575 5 0 0 0 - - -; #X floatatom 618 575 5 0 0 0 - - -; #X floatatom 651 575 5 0 0 0 - - -; #X floatatom 683 575 5 0 0 0 - - -; #X floatatom 716 575 5 0 0 0 - - -; #X floatatom 749 575 5 0 0 0 - - -; #X obj 373 464 * -1; #X obj 373 483 + 100; #X connect 2 0 3 0; #X connect 5 0 6 1; #X connect 5 0 8 1; #X connect 5 0 12 0; #X connect 7 0 5 0; #X connect 8 0 9 0; #X connect 9 0 37 0; #X connect 10 0 6 0; #X connect 10 0 26 0; #X connect 12 0 10 0; #X connect 13 0 24 0; #X connect 14 0 15 0; #X connect 15 0 16 0; #X connect 16 0 18 0; #X connect 17 0 14 1; #X connect 17 0 20 0; #X connect 18 0 17 0; #X connect 18 0 15 1; #X connect 18 0 27 0; #X connect 19 0 23 1; #X connect 20 0 22 0; #X connect 20 0 28 0; #X connect 23 0 19 0; #X connect 23 0 20 1; #X connect 24 0 14 0; #X connect 24 1 25 0; #X connect 25 0 23 1; #X connect 26 0 18 1; #X connect 27 0 8 0; #X connect 28 0 29 0; #X connect 28 1 30 0; #X connect 28 2 31 0; #X connect 28 3 32 0; #X connect 28 4 33 0; #X connect 28 5 34 0; #X connect 28 6 35 0; #X connect 28 7 36 0; #X connect 37 0 38 0; #X connect 38 0 23 0;