Easy q – how to cycle through numbers?

May 22, 2007 at 9:48am

Easy q – how to cycle through numbers?

OK, so I have a multislider with 8 steps.

So it’s outputting numbers like 1 5 6 7 3 8 9 2 (8 numbers in total).

How can I get it so that it cycles through the numbers and synced to by master tempo (i’m using the sync~ object and 129bpm)?

So it will act kind of like a looped step sequencer or an envelope on loop.

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P hidden newex 92 21 123 196617 loadmess 0 1 2 3 4 5 6 7;
#P message 169 141 79 196617 0 1 2 3 4 5 6 7;
#P user multiSlider 1 41 248 98 0. 7. 8 2921 15 0 0 2 4 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 216 16 68;
#M rgb5 208 197 40;
#M rgb6 255 78 9;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P hidden newex 31 145 32 196617 print;
#P number 81 296 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 77 268 40 196617 accum;
#P number 112 214 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 297 28 60 196617 loadmess 7;
#P number 63 216 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 47 235 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 26 216 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 400 24 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N vpatcher 20 74 620 474;
#P outlet 64 153 15 0;
#P window setfont “Sans Serif” 9.;
#P newex 57 109 35 196617 * 16.;
#P comment 128 109 134 196617 * no of beats -> ms per bar;
#P flonum 57 86 49 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 57 57 55 196617 !/ 60000.;
#P comment 127 62 100 196617 bpm -> ms per beat;
#P inlet 57 37 15 0;
#P connect 0 0 2 0;
#P connect 2 0 3 0;
#P connect 3 0 5 0;
#P connect 3 0 6 0;
#P pop;
#P newobj 399 49 61 196617 p msberbar;
#P message 359 41 29 196617 stop;
#P newex 282 152 27 196617 + 1;
#P button 332 51 15 0;
#P number 282 175 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 340 100 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 293 92 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 327 77 37 196617 metro;
#N counter;
#X flags 0 0;
#P newobj 282 125 66 196617 counter;
#P newex 33 190 139 196617 unpack i i i i i i i i;
#P window linecount 6;
#P comment 376 74 167 196617 Thinking that counter driven by main tempo setting from MasterSync could drive the values coming out of the GraphSet in order to control effects , but it may be simpler than this.;
#P window linecount 2;
#P comment 51 163 146 196617 No.s coming out of GraphSet – but they are static!;
#P window linecount 4;
#P comment 29 327 133 196617 I want it to cycle through the numbers (so the GraphSet is like a step sequencer).;
#P window linecount 2;
#P comment 339 159 100 196617 Just messing about here.;
#P hidden connect 25 0 23 0;
#P hidden connect 24 0 23 0;
#P connect 4 0 15 0;
#P hidden connect 23 0 22 0;
#P connect 23 0 4 0;
#P connect 4 1 16 0;
#P connect 4 2 17 0;
#P connect 20 0 21 0;
#P connect 6 0 5 0;
#P connect 5 0 11 0;
#P connect 11 0 9 0;
#P connect 7 0 5 1;
#P connect 12 0 6 0;
#P connect 10 0 6 0;
#P connect 8 0 5 4;
#P hidden connect 18 0 8 0;
#P connect 13 0 6 1;
#P connect 14 0 13 0;
#P window clipboard copycount 26;

#32028
May 22, 2007 at 9:50am

(So I end up with a single number at a time that I can use to affect say Reverb Wet setting of Freeverb or whatever).

#104709
May 22, 2007 at 10:18am

#104710
May 22, 2007 at 12:08pm

Ah i see, but is there any way to do something after the multislider to get the same effec? As the patch I posted is very simplified, and what I have in the main one may be conflicted if I start messing around with fetch as a message going into the multislider.

#104711
May 22, 2007 at 12:14pm

OK, had a go with the fetch message:

#P window setfont “Sans Serif” 9.;
#P number 206 206 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P message 206 225 45 196617 fetch $1;
#P hidden newex 92 21 123 196617 loadmess 0 1 2 3 4 5 6 7;
#P message 169 141 79 196617 0 1 2 3 4 5 6 7;
#P user multiSlider 1 41 248 98 0. 7. 8 2921 15 0 0 2 4 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 216 16 68;
#M rgb5 208 197 40;
#M rgb6 255 78 9;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P hidden newex 31 145 92 196617 print Single_Value;
#P number 81 296 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 77 268 40 196617 accum;
#P number 112 214 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 297 28 60 196617 loadmess 7;
#P number 63 216 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 47 235 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 26 216 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 400 24 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N vpatcher 20 74 620 474;
#P outlet 64 153 15 0;
#P window setfont “Sans Serif” 9.;
#P newex 57 109 35 196617 * 16.;
#P comment 128 109 134 196617 * no of beats -> ms per bar;
#P flonum 57 86 49 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 57 57 55 196617 !/ 60000.;
#P comment 127 62 100 196617 bpm -> ms per beat;
#P inlet 57 37 15 0;
#P connect 0 0 2 0;
#P connect 2 0 3 0;
#P connect 3 0 5 0;
#P connect 3 0 6 0;
#P pop;
#P newobj 399 49 61 196617 p msberbar;
#P message 359 41 29 196617 stop;
#P newex 282 152 27 196617 + 1;
#P button 332 51 15 0;
#P number 282 175 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 340 100 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 293 92 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 327 77 37 196617 metro;
#N counter;
#X flags 0 0;
#P newobj 282 125 66 196617 counter;
#P newex 33 190 139 196617 unpack i i i i i i i i;
#P window linecount 6;
#P comment 376 74 167 196617 Thinking that counter driven by main tempo setting from MasterSync could drive the values coming out of the GraphSet in order to control effects , but it may be simpler than this.;
#P window linecount 2;
#P comment 51 163 146 196617 No.s coming out of GraphSet – but they are static!;
#P window linecount 4;
#P comment 29 327 133 196617 I want it to cycle through the numbers (so the GraphSet is like a step sequencer).;
#P window linecount 2;
#P comment 339 159 100 196617 Just messing about here.;
#P hidden connect 26 0 23 0;
#P hidden connect 24 0 23 0;
#P hidden connect 25 0 23 0;
#P connect 4 0 15 0;
#P connect 23 1 22 0;
#P connect 23 0 4 0;
#P connect 4 1 16 0;
#P connect 4 2 17 0;
#P connect 23 0 20 0;
#P connect 20 0 21 0;
#P connect 23 1 19 0;
#P connect 9 0 27 0;
#P connect 27 0 26 0;
#P connect 6 0 5 0;
#P connect 5 0 9 0;
#P connect 7 0 5 1;
#P connect 10 0 6 0;
#P connect 12 0 6 0;
#P connect 8 0 5 4;
#P hidden connect 18 0 8 0;
#P connect 13 0 6 1;
#P connect 14 0 13 0;
#P window clipboard copycount 28;

Looks like it may work, but will have to be careful putting it into my main version!

#104712
May 22, 2007 at 12:33pm

#104713
May 22, 2007 at 12:38pm

On 22 May 2007, at 14:08, Joe Bloggs wrote:

>
> Ah i see, but is there any way to do something after the
> multislider to get the same effec? As the patch I posted is very
> simplified, and what I have in the main one may be conflicted if I
> start messing around with fetch as a message going into the
> multislider.

don’t know exactly what you are after, but i usually write seq-data
from multislider into a buffer~ and read it back using peek~.
if you decide the max-event timing is not good enough for your
porposes you can easily switch to signal rate based playback.
volker.

#P window setfont “Sans Serif” 9.;
#P flonum 282 206 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 1 164 58 196617 peek~ data;
#P toggle 282 60 15 0;
#P newex 65 164 81 196617 buffer~ data 10;
#P newex 282 177 58 196617 peek~ data;
#P hidden newex 2 21 123 196617 loadmess 0 1 2 3 4 5 6 7;
#P user multiSlider 1 41 248 98 0. 7. 8 2921 15 0 0 2 4 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 216 16 68;
#M rgb5 208 197 40;
#M rgb6 255 78 9;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P number 282 153 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 282 91 58 196617 metro 120;
#N counter 0 7;
#X flags 0 0;
#P newobj 282 125 66 196617 counter 0 7;
#P newex 1 142 52 196617 listfunnel;
#P connect 1 0 3 0;
#P connect 2 0 1 0;
#P connect 6 0 10 0;
#P connect 3 0 6 0;
#P connect 0 0 9 0;
#P connect 4 0 0 0;
#P connect 8 0 2 0;
#P hidden connect 5 0 4 0;
#P window clipboard copycount 11;

#104714
May 22, 2007 at 4:30pm

At 10:48 AM +0100 5/22/07, Joe Bloggs wrote:
>OK, so I have a multislider with 8 steps.
>How can I get it so that it cycles through the numbers and synced to by master tempo (i’m using the sync~ object and 129bpm)?

I have an example called Multislider Iterate that more or less does this at:

http://www.xfade.com/max/examples/

-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

#104715
May 23, 2007 at 5:37pm

#104716

You must be logged in to reply to this topic.