[PD] changing the position of arrays dynamically

Julian Brooks jbeezez at gmail.com
Tue Nov 12 01:20:52 CET 2013


Hey Tim,

Nice clear coding style, thanks for that.

Now where's Jonathan to tell us how much faster the redraw could be...:)

Miller's comment reminded me that I should really get to grips with some of
the new 0.45 stuff.

Regards,

Julian


On 11 November 2013 22:44, tim vets <timvets at gmail.com> wrote:

> *zexy that is :)
>
>
> 2013/11/11 tim vets <timvets at gmail.com>
>
>> I got inspired to try out my take on this
>> so here's another variation
>> uses [list-splat] (list-abs), [tabdump] (sexy), and, although not
>> essential, [popup]
>> the redraw gets quite slow quite quickly with larger tables though...
>> gr,
>> Tim
>>
>>
>>
>> 2013/11/10 peiman khosravi <peimankhosravi at gmail.com>
>>
>>> Thanks for the info. I didn't know this object. Very useful.
>>>
>>> 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 16:50, Miller Puckette <msp at ucsd.edu> wrote:
>>>
>>>> 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
>>>>
>>>>
>>>
>>> _______________________________________________
>>> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20131112/71a4de23/attachment-0001.htm>


More information about the Pd-list mailing list