endless cycle number box

Aug 14, 2007 at 7:55pm

endless cycle number box

how to do ?
it’s ok when up but i can’t do it when down.
i mean:
1, 2, 3, 4, 1, 2, 3, 4, etc is ok
but i can’t find how to do 1, 4, 3, 2, 1, etc…

help please.

#P window setfont “Sans Serif” 9.;
#P number 66 166 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P message 91 134 39 196617 set $1;
#P newex 69 115 32 196617 sel 0;
#P newex 69 95 34 196617 % 10;
#P newex 69 76 23 196617 abs;
#P number 69 59 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P connect 3 1 5 0;
#P connect 3 1 4 0;
#P fasten 4 0 0 0 96 154 131 154 131 54 74 54;
#P connect 0 0 1 0;
#P connect 1 0 2 0;
#P connect 2 0 3 0;
#P window clipboard copycount 6;

#33258
Aug 14, 2007 at 8:09pm

Have you tried “counter”? Gives you various directions.

On 14/08/07, fp wrote:
>
> how to do ?
> it’s ok when up but i can’t do it when down.
> i mean:
> 1, 2, 3, 4, 1, 2, 3, 4, etc is ok
> but i can’t find how to do 1, 4, 3, 2, 1, etc…
>
> help please.
>
> #P window setfont “Sans Serif” 9.;
> #P number 66 166 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P window linecount 1;
> #P message 91 134 39 196617 set $1;
> #P newex 69 115 32 196617 sel 0;
> #P newex 69 95 34 196617 % 10;
> #P newex 69 76 23 196617 abs;
> #P number 69 59 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P connect 3 1 5 0;
> #P connect 3 1 4 0;
> #P fasten 4 0 0 0 96 154 131 154 131 54 74 54;
> #P connect 0 0 1 0;
> #P connect 1 0 2 0;
> #P connect 2 0 3 0;
> #P window clipboard copycount 6;
>
> –
> ————————
> – http://www.pan-etc.net -
> ————————
>


Pere Josep Villez
Course Leader
Creative and Computational Sound (Max/Msp)
Department of Creative Technologies
University of Portsmouth
36-40 Middle Street
Portsmouth
PO5
Tel 00 44 23 9284 8484

http://www.centuryofnoise.com
http://www.perevillez.com

#110560
Aug 14, 2007 at 8:10pm

Hi,

something like this?

Falk

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 355 151 27 196617 – 1;
#P number 355 125 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 355 177 33 196617 !- 10;
#P number 355 281 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 355 203 35 196617 t b i;
#P newex 355 255 44 196617 zl nth 1;
#B color 5;
#P message 246 176 103 196617 1 2 3 4 5 6 7 8 9 10;
#P newex 355 229 35 196617 zl rot;
#P connect 6 0 7 0;
#P connect 7 0 5 0;
#P connect 2 0 4 0;
#P connect 0 0 2 0;
#P connect 5 0 3 0;
#P fasten 1 0 0 0 251 226 360 226;
#P connect 3 0 0 0;
#P connect 3 1 0 1;
#P window clipboard copycount 8;

Am 14.08.2007 um 21:55 schrieb fp:

>
> how to do ?
> it’s ok when up but i can’t do it when down.
> i mean:
> 1, 2, 3, 4, 1, 2, 3, 4, etc is ok
> but i can’t find how to do 1, 4, 3, 2, 1, etc…
>
> help please.
>
> #P window setfont “Sans Serif” 9.;
> #P number 66 166 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P window linecount 1;
> #P message 91 134 39 196617 set $1;
> #P newex 69 115 32 196617 sel 0;
> #P newex 69 95 34 196617 % 10;
> #P newex 69 76 23 196617 abs;
> #P number 69 59 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P connect 3 1 5 0;
> #P connect 3 1 4 0;
> #P fasten 4 0 0 0 96 154 131 154 131 54 74 54;
> #P connect 0 0 1 0;
> #P connect 1 0 2 0;
> #P connect 2 0 3 0;
> #P window clipboard copycount 6;
>
> –
> ————————
> – http://www.pan-etc.net -
> ————————

#110561
Aug 14, 2007 at 8:11pm

yes naturally.
i’m on it.
thx.

#110562
Aug 14, 2007 at 8:22pm

yes but i have a %ld in the max window.
???

with counter i can’t find how to do too ?
tired ?

#P button 66 144 15 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 96 187 61 196617 zl group 10;
#P newex 66 165 40 196617 uzi 10;
#P message 158 88 39 196617 set $1;
#P newex 158 135 27 196617 – 1;
#P number 158 110 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 158 161 33 196617 !- 10;
#P number 158 265 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 158 187 35 196617 t b i;
#P newex 158 239 44 196617 zl nth 1;
#B color 5;
#P newex 158 213 35 196617 zl rot;
#P connect 5 0 6 0;
#P connect 6 0 4 0;
#P connect 1 0 3 0;
#P connect 0 0 1 0;
#P connect 4 0 2 0;
#P connect 2 0 0 0;
#P connect 2 1 0 1;
#P connect 7 0 5 0;
#P connect 8 2 9 0;
#P connect 10 0 8 0;
#P fasten 9 0 0 0 101 208 163 208;
#P fasten 3 0 7 0 163 288 214 288 214 81 163 81;
#P window clipboard copycount 11;

>
> something like this?
>
> Falk
>
>

#110563
Aug 14, 2007 at 8:26pm

in fact i have this %od in the max window with the help file of zl rot too.
what’s happen ?

#110564
Aug 14, 2007 at 8:30pm

ok, incremental update of zl fixed it.

thx for your quick help.

#110565
Aug 14, 2007 at 9:58pm

#110566
Aug 15, 2007 at 4:44pm

fp schrieb:
> how to do ? it’s ok when up but i can’t do it when down. i mean: 1,
> 2, 3, 4, 1, 2, 3, 4, etc is ok but i can’t find how to do 1, 4, 3, 2,
> 1, etc…

I’d do it with my mod abstraction, an de-encapsulated version below…
(I don’t know why you skipped the zero in your patch, seems unecessary…)

#P window setfont “Sans Serif” 9.;
#P number 104 59 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P message 91 151 39 196617 set $1;
#P number 58 59 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 58 185 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 58 125 56 196617 % 10;
#P newex 58 103 56 196617 + 10;
#P newex 58 82 56 196617 % 10;
#P connect 6 0 0 1;
#P connect 6 0 1 1;
#P connect 6 0 2 1;
#P connect 2 0 3 0;
#P connect 2 0 5 0;
#P connect 4 0 0 0;
#P connect 1 0 2 0;
#P connect 0 0 1 0;
#P fasten 5 0 4 0 96 174 146 174 146 49 63 49;
#P window clipboard copycount 7;


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com

#110567
Aug 15, 2007 at 8:38pm

#110568
Aug 16, 2007 at 7:43am

#110569
Aug 16, 2007 at 12:39pm

how bout this

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P message 163 142 33 196617 set 1;
#P message 126 142 33 196617 set 4;
#P newex 81 113 41 196617 sel 0 5;
#P number 77 61 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P fasten 3 0 0 0 147 67;
#P connect 1 1 3 0;
#P connect 1 0 2 0;
#P connect 0 0 1 0;
#P fasten 2 0 0 0 140 57;
#P window clipboard copycount 4;

#110570
Aug 16, 2007 at 1:18pm

Le 16 août 07 à 09:43, Stefan Tiedje a écrit :

> Then you should add 1 to the result and have the range by one
> smaller…
>
> Stefan
yep, but in that case i continue to have 0 on the UI number box

Le 16 août 07 à 14:39, Derek Franz a écrit :
> how bout this
>
>
> #P window setfont “Sans Serif” 9.;
> #P window linecount 1;
> #P message 163 142 33 196617 set 1;
> #P message 126 142 33 196617 set 4;
> #P newex 81 113 41 196617 sel 0 5;
> #P number 77 61 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P fasten 3 0 0 0 147 67;
> #P connect 1 1 3 0;
> #P connect 1 0 2 0;
> #P connect 0 0 1 0;
> #P fasten 2 0 0 0 140 57;
> #P window clipboard copycount 4;

nice too. thx.
:-)
but how to change maximum value ?

f./

#110571
Aug 16, 2007 at 4:04pm

On 8/16/07, Derek Franz wrote:
>
> how bout this
>
>
> #P window setfont “Sans Serif” 9.;
> #P window linecount 1;
> #P message 163 142 33 196617 set 1;
> #P message 126 142 33 196617 set 4;
> #P newex 81 113 41 196617 sel 0 5;
> #P number 77 61 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P fasten 3 0 0 0 147 67;
> #P connect 1 1 3 0;
> #P connect 1 0 2 0;
> #P connect 0 0 1 0;
> #P fasten 2 0 0 0 140 57;
> #P window clipboard copycount 4;

This one doesn’t work if it’s triggered fast :

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P message 224 328 21 9109513 set;
#P window linecount 0;
#P message 110 361 103 9109513;
#P window linecount 1;
#P newex 110 335 57 9109513 prepend set;
#P button 86 72 15 0;
#P newex 86 101 40 9109513 uzi 8;
#P newex 110 311 48 9109513 zl group 8;
#P message 204 242 29 9109513 set 1;
#P message 167 242 29 9109513 set 4;
#P newex 122 213 41 9109513 sel 0 5;
#P number 110 155 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P connect 5 2 0 0;
#P connect 0 0 4 0;
#P connect 0 0 1 0;
#P connect 4 0 7 0;
#P connect 9 0 8 0;
#P connect 7 0 8 0;
#P connect 6 0 5 0;
#P fasten 2 0 0 0 181 157;
#P connect 1 0 2 0;
#P connect 1 1 3 0;
#P fasten 3 0 0 0 188 167;
#P window clipboard copycount 10;

#110572
Aug 16, 2007 at 5:15pm

At 9:43 AM +0200 8/16/07, Stefan Tiedje wrote:
>Then you should add 1 to the result and have the range by one smaller…

Here’s an edit of your patch, with the visible number pretty much de-coupled from the changing number. I stack two number boxes, the top most set to ignore click. This way the bottom number gets the click and changes, driving your modulo stuff, but the range of the visible top number can be set to anything. It could be a menu or some other display object, as long as it was set to ignore clicks.

#P window setfont “Sans Serif” 9.;
#P window linecount 3;
#P comment 133 130 308 196617 < - This number is not really the one you're changing by dragging it. The visible number is set to ignore clicks , and there is a second number box behind it that is actually changing.;
#P window linecount 1;
#P newex 17 82 27 196617 + 1;
#P window setfont “Sans Serif” 18.;
#P number 58 132 71 18 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P noclick;
#P number 58 132 71 18 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont “Sans Serif” 9.;
#P number 108 180 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 17 103 39 196617 set $1;
#P newex 58 211 27 196617 % 9;
#P newex 58 189 27 196617 + 9;
#P newex 58 168 27 196617 % 9;
#P comment 134 107 212 196617 This is Stefan Tiedje’s patch with one tweak:;
#P fasten 3 0 8 0 63 235 8 235 8 75 22 75;
#P connect 5 0 1 1;
#P connect 5 0 2 1;
#P connect 5 0 3 1;
#P connect 6 0 1 0;
#P connect 4 0 7 0;
#P connect 8 0 4 0;
#P connect 2 0 3 0;
#P connect 1 0 2 0;
#P window clipboard copycount 10;

-C


Chris Muir | “There are many futures and only one status quo.
cbm@well.com | This is why conservatives mostly agree,
http://www.xfade.com | and radicals always argue.” – Brian Eno

#110573
Aug 16, 2007 at 6:51pm

>
franz,

hmmm…
i don’t understand at all what you mean.
sorry.

chris,

yes it’s a work around.
why not.
thx.

#110574
Aug 16, 2007 at 7:42pm

Here is an abstraction (called “rollo”) I built a little while ago as an experiment to create a number box whose places don’t jump. I ended up with an lcd solution to that problem, but you might find this patch useful. It is also designed to increment/decrement a neighboring number box. Included below also is an example patch:

#N comlet edge (-1 1);
#P outlet 29 284 15 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 13 236 27 196617 -1;
#P newex 42 236 27 196617 1;
#P newex 244 173 45 196617 onebang;
#P message 278 268 44 196617 max $1;
#P message 218 247 41 196617 min $1;
#P newex 248 221 27 196617 + 1;
#P newex 218 221 27 196617 – 1;
#P newex 218 196 40 196617 unpack;
#P newex 218 150 82 196617 patcherargs 0 9;
#P newex 75 218 33 196617 sel -1;
#P newex 75 243 27 196617 9;
#P newex 113 50 27 196617 t i i;
#P newex 148 155 13 196617 2;
#P newex 130 155 13 196617 1;
#P newex 130 132 46 196617 sel -1 1;
#P newex 75 195 48 196617 gate 2;
#P newex 160 100 58 196617 change 0 +;
#P newex 130 78 57 196617 change 0 -;
#P newex 113 243 27 196617 0;
#P newex 113 218 38 196617 sel 10;
#N comlet in from numberbox;
#P inlet 113 30 15 0;
#N comlet out to number box;
#P outlet 94 284 15 0;
#P connect 13 1 19 1;
#P connect 16 0 2 1;
#P connect 16 0 18 0;
#P connect 14 1 11 1;
#P connect 14 1 16 0;
#P connect 1 0 10 0;
#P connect 1 0 19 0;
#P connect 15 0 12 1;
#P connect 15 0 17 0;
#P connect 14 0 3 1;
#P connect 14 0 15 0;
#P connect 13 0 14 0;
#P connect 19 0 14 0;
#P connect 10 1 4 0;
#P connect 10 1 5 0;
#P connect 7 1 9 0;
#P connect 7 0 8 0;
#P connect 5 0 7 0;
#P connect 4 0 7 0;
#P connect 2 0 20 0;
#P connect 2 0 3 0;
#P connect 6 1 2 0;
#P connect 10 0 6 1;
#P connect 11 0 0 0;
#P connect 18 0 0 0;
#P connect 17 0 0 0;
#P connect 3 0 0 0;
#P connect 12 0 21 0;
#P connect 12 0 11 0;
#P connect 6 0 12 0;
#P connect 9 0 6 0;
#P connect 8 0 6 0;
#P connect 20 0 22 0;
#P connect 21 0 22 0;
#P window clipboard copycount 23;

Here is a small example patch. It looks for the above abstraction to be called “rollo”.

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 103 174 27 196617 +;
#P newex 103 146 31 196617 rollo;
#P newex 145 174 27 196617 +;
#P newex 145 146 31 196617 rollo;
#P number 62 117 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 103 117 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 145 117 35 9 -1 10 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P connect 5 1 1 0;
#P connect 1 0 5 0;
#P connect 1 0 4 1;
#P connect 2 0 6 1;
#P connect 6 0 2 0;
#P connect 5 0 6 0;
#P connect 4 0 1 0;
#P connect 3 0 4 0;
#P connect 3 1 0 0;
#P connect 0 0 3 0;
#P window clipboard copycount 7;

#110575
Aug 17, 2007 at 7:50am

elt schrieb:
> yep, but in that case i continue to have 0 on the UI number box

not me…
my punishment for you is to post the patch, next time try harder… ;-)

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 40 226 27 196617 + 1;
#P message 40 247 39 196617 set $1;
#P newex 40 142 32 196617 – 1;
#P window setfont “Sans Serif” 18.;
#P number 40 111 71 18 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont “Sans Serif” 9.;
#P number 108 180 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 40 205 32 196617 % 10;
#P newex 40 184 32 196617 + 10;
#P newex 40 163 32 196617 % 10;
#P connect 3 0 0 1;
#P connect 3 0 1 1;
#P connect 3 0 2 1;
#P fasten 6 0 4 0 45 266 31 266 31 106 45 106;
#P connect 2 0 7 0;
#P connect 7 0 6 0;
#P connect 1 0 2 0;
#P connect 0 0 1 0;
#P connect 5 0 0 0;
#P connect 4 0 5 0;
#P window clipboard copycount 8;


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com

#110576
Aug 17, 2007 at 12:52pm

ach, stefan… yes…
i tried like that but didn’t think to minus 1…
merde.
i go too quickly.

thx all.

f./

#110577

You must be logged in to reply to this topic.