[PD] changing the position of arrays dynamically

Miller Puckette msp at ucsd.edu
Sun Nov 10 17:50:33 CET 2013


It's less efficient than William's solution, but there's an "array get"
object in Pd 0.45 that spits out a list of elements in an array that
would also work.

cheers
Miller

On Sun, Nov 10, 2013 at 03:05:41PM +0000, Julian Brooks wrote:
> Thanks for the patch Peiman.
> 
> Completely different but the same end-result as Michael's.
> And my learning moves on another small notch.
> (having one of those "isn't Pd great" moments:)
> 
> BTW - [popup] was a new one on me but [tabletool]'s great.  If you haven't
> checked them out yet William Brent's other Pd stuff's recommended.
> 
> Regards,
> 
> Julian
> 
> 
> On 10 November 2013 12:00, peiman khosravi <peimankhosravi at gmail.com> wrote:
> 
> > Thanks João,
> >
> > I'd love to see an example of that.
> >
> > Best,
> > Peiman
> >
> >
> >
> >
> > *www.peimankhosravi.co.uk <http://www.peimankhosravi.co.uk> || RSS Feed
> > <http://peimankhosravi.co.uk/miscposts.rss> || Concert News
> > <http://spectralkimia.wordpress.com/>*
> >
> >
> > On 10 November 2013 11:58, João Pais <jmmmpais at googlemail.com> wrote:
> >
> >>  you could also use data structures to copy the arrays to the display,
> >> and superimpose and hide whichever necessary, e.g. also using different
> >> colors/thickness for each array. I don't have the time now to make an
> >> example, though. Maybe during the next days.
> >>
> >>
> >> OK, here it is.
> >>
> >> It needs two externals: 'tabletool' and 'Popup'. (OSX builds included in
> >> the zip file but I think they're distributed in pd_extended, in which case
> >> just modify [declare -path] in the patch.)
> >>
> >> Best,
> >> Peiman
> >>
> >>
> >>
> >>
> >>
> >>
> >> *www.peimankhosravi.co.uk <http://www.peimankhosravi.co.uk> || RSS Feed
> >> <http://peimankhosravi.co.uk/miscposts.rss> || Concert News
> >> <http://spectralkimia.wordpress.com/>*
> >>
> >>
> >> On 9 November 2013 13:11, peiman khosravi <peimankhosravi at gmail.com>wrote:
> >>
> >>> This is great. I also have a working example that I'll send later today
> >>> once I've tidied it up. I'm using the tabletool external with horizontal
> >>> zooming in and out of the array too.
> >>>
> >>> Will send it in a couple of hours.
> >>>
> >>> P
> >>>
> >>>
> >>>
> >>>
> >>> *www.peimankhosravi.co.uk <http://www.peimankhosravi.co.uk> || RSS Feed
> >>> <http://peimankhosravi.co.uk/miscposts.rss> || Concert News
> >>> <http://spectralkimia.wordpress.com/>*
> >>>
> >>>
> >>> On 9 November 2013 12:06, michael noble <looplog at gmail.com> wrote:
> >>>
> >>>>
> >>>> On Sat, Nov 9, 2013 at 6:42 PM, Julian Brooks <jbeezez at gmail.com>wrote:
> >>>>
> >>>>> Michael - would you mind knocking up a quick example
> >>>>
> >>>>
> >>>> This seems to work (roughly) so far as I understand Peiman's original
> >>>> request correctly. I can't vouch for it being the most efficient or
> >>>> bug-free solution. It polls the buffer array using a metro counter so that
> >>>> changes to the active table are updated on the fly. Switching the active
> >>>> table just dumps that table to the buffer array.
> >>>>
> >>>>
> >>>>
> >>>> #N canvas 555 248 450 300 10;
> >>>> #N canvas 553 638 450 300 gui 0;
> >>>> #N canvas 1 52 450 250 (subpatch) 0;
> >>>> #X array buffer 100 float 3;
> >>>> #A 0 -0.585714 -0.585714 -0.585714 -0.585714 -0.585714 -0.585714
> >>>> -0.585714
> >>>> -0.585714 -0.585714 -0.585714 -0.585714 -0.585714 -0.585714 -0.585714
> >>>> -0.585714 -0.585714 -0.585714 -0.585714 -0.585714 -0.585714 -0.571428
> >>>> -0.571428 -0.571428 -0.557143 -0.557143 -0.557143 -0.557143 -0.557143
> >>>> -0.557143 -0.542857 -0.542857 -0.542857 -0.542857 -0.542857 -0.542857
> >>>> -0.542857 -0.542857 -0.542857 -0.542857 -0.542857 -0.542857 -0.542857
> >>>> -0.542857 -0.542857 -0.542857 -0.542857 -0.542857 -0.542857 -0.542857
> >>>> -0.542857 -0.542857 -0.542857 -0.542857 -0.542857 -0.542857 -0.542857
> >>>> -0.542857 -0.542857 -0.542857 -0.542857 -0.542857 -0.542857 -0.542857
> >>>> -0.542857 -0.542857 -0.542857 -0.542857 -0.542857 -0.542857 -0.542857
> >>>> -0.542857 -0.542857 -0.542857 -0.542857 -0.542857 -0.542857 -0.542857
> >>>> -0.542857 -0.542857 -0.542857 -0.542857 -0.542857 -0.542857 -0.542857
> >>>> -0.542857 -0.542857 -0.542857 -0.542857 -0.542857 -0.542857 -0.542857
> >>>> -0.542857 -0.542857 -0.542857 -0.542857 -0.542857 -0.542857 -0.542857
> >>>> -0.542857 -0.471428;
> >>>> #X coords 0 1 99 -1 200 140 1;
> >>>> #X restore 100 50 graph;
> >>>> #X obj 100 211 hradio 25 1 0 8 tablenum empty empty 0 -8 0 10 -262144
> >>>> -1 -1 0;
> >>>> #X coords 0 -1 1 1 200 200 2 100 50;
> >>>> #X restore 48 70 pd gui;
> >>>> #N canvas 1 52 450 300 tables 1;
> >>>> #X obj 46 27 table x1;
> >>>> #X obj 46 49 table x2;
> >>>> #X obj 46 71 table x3;
> >>>> #X obj 46 93 table x4;
> >>>> #X obj 46 115 table x5;
> >>>> #X obj 46 137 table x6;
> >>>> #X obj 46 159 table x7;
> >>>> #X obj 46 181 table x8;
> >>>> #X restore 294 68 pd tables;
> >>>> #N canvas 1048 269 755 530 guts 0;
> >>>> #X obj 236 18 r tablenum;
> >>>> #X msg 302 101 set x\$1;
> >>>> #X obj 399 324 tabread;
> >>>> #X obj 270 82 + 1;
> >>>> #X obj 461 322 tabwrite;
> >>>> #X obj 271 332 t f f;
> >>>> #X obj 292 437 tabwrite buffer;
> >>>> #X obj 327 393 swap;
> >>>> #X obj 222 135 metro 1;
> >>>> #X obj 222 165 f 0;
> >>>> #X obj 274 182 + 1;
> >>>> #X msg 85 156 0;
> >>>> #X obj 181 234 sel 99;
> >>>> #X obj 222 203 t f f;
> >>>> #X obj 584 137 f 0;
> >>>> #X obj 636 154 + 1;
> >>>> #X obj 588 191 mod 100;
> >>>> #X obj 600 233 t f f;
> >>>> #X obj 515 294 tabread buffer;
> >>>> #X obj 593 64 loadbang;
> >>>> #X obj 398 246 t a a;
> >>>> #X msg 515 54 1;
> >>>> #X msg 545 19 0;
> >>>> #X obj 584 107 metro 1;
> >>>> #X obj 236 54 t b f b;
> >>>> #X obj 128 96 t b f f;
> >>>> #X connect 0 0 24 0;
> >>>> #X connect 1 0 20 0;
> >>>> #X connect 2 0 7 1;
> >>>> #X connect 3 0 1 0;
> >>>> #X connect 5 0 7 0;
> >>>> #X connect 5 1 2 0;
> >>>> #X connect 7 0 6 0;
> >>>> #X connect 7 1 6 1;
> >>>> #X connect 8 0 9 0;
> >>>> #X connect 9 0 10 0;
> >>>> #X connect 9 0 13 0;
> >>>> #X connect 10 0 9 1;
> >>>> #X connect 11 0 25 0;
> >>>> #X connect 12 0 11 0;
> >>>> #X connect 13 0 12 0;
> >>>> #X connect 13 1 5 0;
> >>>> #X connect 14 0 15 0;
> >>>> #X connect 14 0 16 0;
> >>>> #X connect 15 0 14 1;
> >>>> #X connect 16 0 17 0;
> >>>> #X connect 17 0 18 0;
> >>>> #X connect 17 1 4 1;
> >>>> #X connect 18 0 4 0;
> >>>> #X connect 19 0 23 0;
> >>>> #X connect 20 0 2 0;
> >>>> #X connect 20 1 4 0;
> >>>> #X connect 21 0 23 0;
> >>>> #X connect 22 0 23 0;
> >>>> #X connect 23 0 14 0;
> >>>> #X connect 24 0 8 0;
> >>>> #X connect 24 1 3 0;
> >>>> #X connect 24 2 22 0;
> >>>> #X connect 25 0 21 0;
> >>>> #X connect 25 1 9 1;
> >>>> #X connect 25 2 8 0;
> >>>> #X restore 299 138 pd guts;
> >>>>
> >>>>
> >>>
> >>
> >>
> >>
> >> --
> >> Friedenstr. 58
> >> 10249 Berlin (Deutschland)
> >> Tel +49 30 42020091 | Mob +49 162 6843570
> >> Studio +49 30 69509190
> >> jmmmpais at gmail.com | skype: jmmmpjmmmp
> >>
> >
> >
> > _______________________________________________
> > Pd-list at iem.at mailing list
> > UNSUBSCRIBE and account-management ->
> > http://lists.puredata.info/listinfo/pd-list
> >
> >

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




More information about the Pd-list mailing list