Forums > MaxMSP

Using pipe…how do I…

February 9, 2007 | 8:07 pm

I have a multislider feeding into a pipe. When I bang the multislider it sends all its values into the pipe and delays them all at once, so the whole mess of numbers comes out after the ms setting.

What I am trying to do is get each of those values to come out after 1000ms between them.

Is this something where I should use metro and a counter to get the values out? I’m trying to understand what the best way to do this as I get myself thinking in ‘max’ ways of doing things.


February 9, 2007 | 8:33 pm


February 9, 2007 | 8:41 pm

> What I am trying to do is get each of those values to come out after
> 1000ms between them.

something like that ?

max v2;
#N vpatcher 322 293 922 693;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 62 202 79 196617 route 0 1 2 3 4;
#P number 63 181 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 70 97 50 196617 del 1000;
#N counter 4;
#X flags 0 0;
#P newobj 63 156 66 196617 counter 4;
#P newex 172 61 30 196617 t b b;
#P number 308 283 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 267 283 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 226 283 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 185 283 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 144 283 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 288 250 27 196617 int;
#P newex 256 250 27 196617 int;
#P newex 224 250 27 196617 int;
#P newex 192 250 27 196617 int;
#P newex 160 250 27 196617 int;
#P newex 69 124 64 196617 metro 1000;
#P newex 192 199 85 196617 unpack 0 0 0 0 0;
#P button 172 36 15 0;
#P user multiSlider 192 100 88 78 0. 50. 5 2681 15 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P connect 17 0 18 0;
#P connect 3 0 15 0;
#P fasten 15 0 17 0 70 173;
#P connect 16 0 3 0;
#P connect 14 0 16 0;
#P connect 4 0 9 0;
#P connect 18 0 4 0;
#P connect 1 0 14 0;
#P connect 2 0 4 1;
#P connect 5 0 10 0;
#P connect 14 1 0 0;
#P connect 0 0 2 0;
#P connect 18 1 5 0;
#P connect 2 1 5 1;
#P connect 18 2 6 0;
#P connect 6 0 11 0;
#P connect 2 2 6 1;
#P connect 18 3 7 0;
#P connect 7 0 12 0;
#P connect 2 3 7 1;
#P connect 18 4 8 0;
#P connect 2 4 8 1;
#P connect 8 0 13 0;
#P pop;

Best

Eryck


February 9, 2007 | 8:42 pm

It seems that speedlim would just then output the first and last value I send it as the documentation says that new messages will overwrite ones already there during that delay. Essentially filtering the number of messages out based on how many messages over time.


February 9, 2007 | 9:00 pm

On 9 Feb 2007, at 20:33, Patrick Delges wrote:

> [speedlim 1000] ?

That will throw away intermediate values.

A solution I’ve used: pump the values into a coll, indexed by a
timestamp counter. Have a metro/counter run through the timestamps,
triggering (and the deleting) entries from the coll. (I have the
patcher somewhere, but I wrote it 15 years ago, so it would take a
while to find it.)

– N.



_j
February 9, 2007 | 9:01 pm

there’s an L object that does this… hrm…. I do believe its called….

LQueue

It can be found in lobjects 2. Yes, it can.


February 9, 2007 | 9:18 pm


February 9, 2007 | 9:26 pm

Try this:

#P window setfont "Sans Serif" 9.;
#P number 178 337 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 147 147 62 196617 prepend set;
#P newex 148 125 61 196617 listfunnel 1;
#P user multiSlider 148 32 179 84 0. 127. 16 2921 15 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P newex 196 288 32 196617 print;
#P number 65 428 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 114 151 15 0;
#P message 114 315 37 196617 $2 $1;
#P newex 114 427 32 196617 print;
#P newex 114 399 40 196617 pipe;
#P newex 144 364 44 196617 * 1000;
#P newex 114 337 40 196617 unpack;
#P newex 114 287 61 196617 listfunnel 0;
#P user multiSlider 114 186 179 84 0. 127. 16 2921 15 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P window linecount 2;
#P comment 222 129 100 196617 fill without causing output;
#P window linecount 1;
#P comment 25 155 76 196617 bang to output;
#P comment 223 339 100 196617 vary time delay;
#P connect 16 0 6 1;
#P connect 7 0 11 0;
#P connect 7 0 8 0;
#P connect 3 0 4 0;
#P connect 3 0 12 0;
#P connect 15 0 3 0;
#P connect 14 0 15 0;
#P connect 13 0 14 0;
#P connect 5 0 7 0;
#P connect 10 0 3 0;
#P connect 9 0 5 0;
#P connect 4 0 9 0;
#P connect 5 1 6 0;
#P connect 6 0 7 1;
#P window clipboard copycount 17;

On 2/9/07 3:07 PM, "Rick Burnett" wrote:

>
> I have a multislider feeding into a pipe. When I bang the multislider it
> sends all its values into the pipe and delays them all at once, so the whole
> mess of numbers comes out after the ms setting.
>
> What I am trying to do is get each of those values to come out after 1000ms
> between them.
>
> Is this something where I should use metro and a counter to get the values
> out? I’m trying to understand what the best way to do this as I get myself
> thinking in ‘max’ ways of doing things.

Cheers
Gary Lee Nelson
Oberlin College
http://www.timara.oberlin.edu/GaryLeeNelson


February 9, 2007 | 9:42 pm


February 9, 2007 | 11:49 pm

if you need the values one by one, why dont you call single
values from the multisider instaed of a list?

c est un [pipe].

-110



jln
February 10, 2007 | 12:36 am

Just for the pleasure of trying to add my solution. Of course, not as
elegant as Gary Lee Nelson’s one, I’m afraid.

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 408 437 32 196617 print;
#P user multiSlider 367 29 100 58 -1. 1. 10 2681 15 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P newex 367 109 59 196617 t b b l;
#P message 367 148 21 196617 inc;
#P message 391 148 28 196617 set 0;
#P user incdec 391 233 15 15 0 0;
#P newex 391 258 41 196617 t b i;
#P newex 391 290 34 196617 zl reg;
#P newex 391 346 27 196617 t b l;
#P newex 391 323 41 196617 zl nth;
#P newex 391 381 50 196617 del 1000;
#P fasten 0 0 7 0 396 407 281 407 281 140 372 140;
#P connect 8 0 7 0;
#P connect 8 1 6 0;
#P connect 6 0 5 0;
#P fasten 7 0 5 0 372 198 396 198;
#P connect 4 0 3 0;
#P connect 3 0 1 0;
#P connect 1 0 2 0;
#P connect 2 0 0 0;
#P connect 8 2 3 1;
#P connect 4 1 1 1;
#P connect 5 0 4 0;
#P connect 9 0 8 0;
#P connect 2 1 10 0;
#P window clipboard copycount 11;

Best,

Julien.


February 10, 2007 | 10:32 am

jln wrote:
> Just for the pleasure of trying to add my solution. Of course, not as
> elegant as Gary Lee Nelson’s one, I’m afraid.

I am still in for another solution… ;-)
The mousefilter is for having it send only on releasing the mouse. If
you don’t want to delay the first output, connect the bang of [t b l]
directly to [zl queue]…

Stefan

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 99 164 67 196617 mousefilter;
#P newex 125 271 13 196617 b;
#P newex 99 218 55 196617 delay 500;
#P newex 156 285 50 196617 print;
#P newex 156 247 50 196617 zl queue;
#P newex 156 218 50 196617 iter;
#P user multiSlider 99 86 164 74 0. 127. 5 2665 15 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P newex 99 185 67 196617 t b l;
#P fasten 3 0 6 0 161 268 130 268;
#P connect 3 0 4 0;
#P connect 7 0 0 0;
#P connect 1 0 7 0;
#P fasten 6 0 5 0 130 293 80 293 80 211 104 211;
#P connect 0 0 5 0;
#P fasten 5 0 3 0 104 241 161 241;
#P connect 0 1 2 0;
#P connect 2 0 3 0;
#P window clipboard copycount 8;


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



jln
February 10, 2007 | 11:32 am


February 12, 2007 | 4:26 am

I know I’m late to this party, but iterating through the slider
values seems like a better approach to me.

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 201 357 116 196617 Current slider value;
#P comment 53 236 153 196617 Load some multislider values;
#P message 34 67 14 196617 1;
#P button 91 164 15 0;
#P message 50 67 14 196617 0;
#P button 34 28 24 0;
#P toggle 34 89 15 0;
#P newex 34 107 64 196617 metro 1000;
#P number 165 356 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 34 193 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 34 127 15 0;
#N counter 1 11;
#X flags 0 0;
#P newobj 34 145 68 196617 counter 1 11;
#P newex 34 211 71 196617 prepend fetch;
#P message 53 249 312 196617 set 1 127 2 97 3 63 4 39 5 15 6 0 7 32 8
64 9 92 10 110 11 126;
#P user multiSlider 34 274 141 77 0. 128. 11 2665 15 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P comment 51 89 39 196617 Running;
#P window linecount 2;
#P comment 58 27 89 196617 Step through multislider values;
#P window linecount 1;
#P comment 69 194 116 196617 Current slider number;
#P connect 12 0 15 0;
#P connect 15 0 11 0;
#P connect 13 0 11 0;
#P fasten 14 0 13 0 96 182 110 182 110 63 55 63;
#P connect 6 3 14 0;
#P connect 10 0 7 0;
#P connect 11 0 10 0;
#P connect 7 0 6 0;
#P connect 6 0 8 0;
#P connect 3 1 9 0;
#P connect 5 0 3 0;
#P connect 8 0 5 0;
#P connect 4 0 3 0;
#P window clipboard copycount 18;


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


Viewing 14 posts - 1 through 14 (of 14 total)