Forums > MaxMSP

machine gun bangs from multislider

November 11, 2007 | 10:51 pm

Hi

I’m trying to build a very simple 16 step sequencer using the multi-slider that triggers bangs on the startloop message of the groove~ object.

This should be very simple, I just want it to trigger anything that is higher that 0. The only problem is that each individual slider outputs many bangs at machine guns speed. So one of the things I did was to connect it to a counter object (that was set up to output a bang after N times). This enabled me to know that approx. 8 bangs for each sliders were being output. But with this set up there were major timming issues.

The other thing that I tried was to us a select with >=1, hooked up to a toggle object. But even though you see on and off’s being triggered at normal speed, you still get the machine gun speed triggering on the start loop message.

Why is this? And does anyone suggest I do, I’m a little out of ideas.

Thanks a million

phil


November 11, 2007 | 11:20 pm

you mean something like that?

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 416 155 51 196617 #steps;
#P comment 238 149 51 196617 start;
#P window linecount 2;
#P comment 233 285 51 196617 pitch , 0=silence;
#P window linecount 1;
#P newex 622 324 29 196617 t b f;
#P flonum 569 326 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 584 355 27 196617 f;
#P newex 641 356 29 196617 sig~;
#P newex 674 294 75 196617 buffer~ buffer;
#P number 379 154 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden message 379 180 42 196617 max $1;
#P toggle 293 151 15 0;
#P hidden newex 293 181 58 196617 metro 500;
#P user ezdac~ 641 441 685 474 0;
#P newex 641 410 78 196617 groove~ buffer;
#N counter 0 1 16;
#X flags 0 0;
#P hidden newobj 293 206 77 196617 counter 0 1 16;
#P hidden message 429 181 43 196617 size $1;
#P hidden message 293 232 48 196617 fetch $1;
#P user multiSlider 293 270 339 40 0. 10. 16 2681 39 0 1 19 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 517 325 51 196617 startloop;
#P connect 5 0 6 0;
#P fasten 5 0 6 1 646 433 680 433;
#P connect 15 0 13 0;
#P connect 15 1 12 0;
#P connect 1 1 15 0;
#P connect 14 0 13 1;
#P connect 13 0 5 0;
#P connect 12 0 5 0;
#P hidden connect 4 0 2 0;
#P hidden connect 10 0 9 0;
#P hidden connect 10 0 3 0;
#P hidden fasten 9 0 4 0 384 203 298 203;
#P hidden fasten 3 0 1 0 434 257 298 257;
#P hidden fasten 2 0 1 0 298 258 298 258;
#P hidden connect 7 0 4 0;
#P hidden connect 8 0 7 0;
#P window clipboard copycount 19;


November 11, 2007 | 11:23 pm

if i understand you correctly, speedlim or thresh may help you out.


November 12, 2007 | 12:48 am

thanks francesco

Sorry
I forgot to mention that I was using the [zl nth] object to extract to list from the multi-slider.

here is my patch (sorry for the mess);

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 750 601 35 196617 gate~;
#P toggle 707 542 29 0;
#P newex 747 581 35 196617 gate~;
#P user ezdac~ 805 591 849 624 0;
#P user meter~ 884 611 964 624 50 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3;
#P user gain~ 787 446 24 100 158 0 1.071519 7.94321 32.;
#P user gain~ 821 447 24 100 158 0 1.071519 7.94321 10.;
#P user gain~ 854 446 24 100 158 0 1.071519 7.94321 81.;
#P number 916 58 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 826 250 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user number~ 861 334 900 349 9 3 3 2 0. 0. 0 0. 250 0. 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 758 181 15 0;
#P newex 765 203 64 196617 metro 1000;
#P newex 897 265 27 196617 -;
#P message 862 60 43 196617 set hh2;
#P message 934 237 41 196617 min $1;
#P message 887 237 44 196617 max $1;
#P newex 803 282 41 196617 sig~ 1.;
#P message 759 310 29 196617 stop;
#P message 747 288 51 196617 startloop;
#P message 732 95 43 196617 replace;
#P number 899 291 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 821 181 35 9 110 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 887 206 35 9 0 1805 2 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 943 206 35 9 1430 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 802 307 75 196617 groove~ hh2 2;
#P newex 898 359 35 196617 sel 1.;
#P newex 735 117 63 196617 buffer~ hh2;
#P toggle 794 251 15 0;
#P number 603 330 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 582 278 42 196617 >= 126;
#P button 540 336 15 0;
#P newex 533 302 44 196617 sel 127;
#P button 663 252 15 0;
#P number 697 179 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 649 179 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 610 243 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N counter 8;
#X flags 0 0;
#P newobj 609 208 66 196617 counter 8;
#P number 529 212 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 525 166 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 530 189 39 196617 !- 127;
#P number 386 390 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 353 375 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 356 407 27 196617 * 3;
#P number 129 315 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user gswitch2 257 578 39 32 1 0;
#P user multiSlider 181 280 325 69 0. 127. 1 3945 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 button 271 478 15 0;
#P number 336 430 51 9 0 0 0 3 0 0 0 255 173 173 222 222 222 0 0 0;
#P message 269 503 50 196617 0 , 16 $1;
#P newex 289 539 40 196617 line;
#P toggle 274 397 40 0;
#P newex 272 452 64 196617 metro 1000;
#P user multiSlider 168 233 333 14 0. 16. 1 2680 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 user panel 258 371 152 196;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P user multiSlider 151 154 13 75 -1. 256. 253 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 138 278 35 196617 zl nth;
#P button 164 121 15 0;
#P user multiSlider 167 148 333 83 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 comment 301 585 100 196617 Freeze line;
#P user panel 249 574 164 49;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P user waveform~ 886 92 200 74 3 9;
#W mode select;
#W mouseoutput continuous;
#W unit ms;
#W grid 1000.;
#W ticks 0;
#W labels 1;
#W vlabels 0;
#W vticks 1;
#W bpm 120. 4.;
#W frgb 33 0 0;
#W brgb 60 178 173;
#W rgb2 0 95 255;
#W rgb3 0 0 0;
#W rgb4 0 0 0;
#W rgb5 190 137 255;
#W rgb6 100 100 100;
#W rgb7 100 100 100;
#P window linecount 2;
#P comment 633 147 100 196617 8 because 8 bangs per slider;
#P window linecount 4;
#P comment 540 85 100 196617 If does not pass trough counter , it outputs machine gun bangs;
#P connect 30 0 44 0;
#P connect 38 1 56 0;
#P connect 38 0 58 0;
#P connect 62 0 61 0;
#P connect 62 0 63 0;
#P connect 58 0 61 1;
#P connect 58 0 59 0;
#P connect 57 1 58 0;
#P fasten 57 1 56 0 866 444;
#P connect 56 0 63 1;
#P connect 56 0 59 0;
#P connect 63 0 60 1;
#P connect 61 0 60 0;
#P fasten 32 0 45 0 545 369 745 369 745 305 764 305;
#P connect 2 3 39 0;
#P connect 2 2 40 0;
#P connect 39 0 38 2;
#P connect 39 0 47 0;
#P connect 39 0 50 0;
#P connect 40 0 38 1;
#P connect 40 0 50 1;
#P connect 40 0 48 0;
#P fasten 42 0 41 0 904 314 885 314 885 179 826 179;
#P connect 19 0 24 0;
#P connect 19 0 26 0;
#P connect 26 3 30 0;
#P connect 26 0 27 0;
#P connect 28 0 26 3;
#P connect 29 0 26 4;
#P connect 49 0 2 0;
#P connect 55 0 2 1;
#P connect 48 0 39 0;
#P connect 50 0 42 0;
#P connect 53 1 37 0;
#P connect 47 0 40 0;
#P connect 38 2 53 0;
#P connect 41 0 51 1;
#P connect 54 0 46 0;
#P connect 35 0 46 0;
#P connect 46 0 38 0;
#P connect 45 0 38 0;
#P connect 44 0 38 0;
#P connect 52 0 51 0;
#P connect 51 0 44 0;
#P connect 43 0 36 0;
#P connect 20 0 15 0;
#P connect 21 0 20 0;
#P connect 22 0 20 1;
#P connect 24 0 23 0;
#P connect 23 0 25 0;
#P fasten 16 0 21 0 251 493 251 362 358 362;
#P fasten 16 0 15 0 341 422;
#P connect 15 0 14 0;
#P connect 15 0 11 1;
#P connect 14 0 13 0;
#P connect 12 0 11 0;
#P connect 11 0 16 0;
#P connect 16 0 14 0;
#P fasten 18 1 10 0 291 621 241 621 241 273 190 273;
#P connect 6 0 5 0;
#P connect 5 0 7 0;
#P connect 31 0 32 0;
#P connect 25 0 33 0;
#P connect 25 0 31 0;
#P connect 33 0 34 0;
#P connect 7 0 17 0;
#P fasten 7 0 8 0 135 295 135 266 140 266 140 148 156 148;
#P connect 7 0 19 0;
#P connect 13 0 18 1;
#P fasten 13 0 6 0 294 563 128 563 128 114 169 114;
#P fasten 13 0 7 1 294 499 230 499 215 499 215 277 168 277;
#P window clipboard copycount 64;


November 12, 2007 | 2:23 am

Hi robtherich
Thanks for suggesting the speedlim and thresh, but these don’t seem to work for my problem.

Any other suggestions

thanks again

phil


November 12, 2007 | 4:11 am

I have a simple example that illustrates one way to pull things out
of a multislider based on a counter and metro, called Multislider
Iterate. It can be found here: 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


November 12, 2007 | 11:16 am

could you send the patch in text format and ill have a look???

> Date: Sun, 11 Nov 2007 15:51:26 -0700
> From: philippehughes@hotmail.com
> Subject: [maxmsp] machine gun bangs from multislider
>
>
> Hi
>
> I’m trying to build a very simple 16 step sequencer using the multi-slider that triggers bangs on the startloop message of the groove~ object.
>
> This should be very simple, I just want it to trigger anything that is higher that 0. The only problem is that each individual slider outputs many bangs at machine guns speed. So one of the things I did was to connect it to a counter object (that was set up to output a bang after N times). This enabled me to know that approx. 8 bangs for each sliders were being output. But with this set up there were major timming issues.
>
> The other thing that I tried was to us a select with >=1, hooked up to a toggle object. But even though you see on and off’s being triggered at normal speed, you still get the machine gun speed triggering on the start loop message.
>
> Why is this? And does anyone suggest I do, I’m a little out of ideas.
>
> Thanks a million
>
>
> phil

Download 30 FREE Emoticons for your Windows Live Messenger!

http://www.livemessenger-emoticons.com/en-ie/


November 12, 2007 | 3:20 pm

Hi conorhiggins

I did post my patch in text format. It’s in my response at 17:48.
Thanks for your efforts.

As I mentioned in that same post, I forgot to include in my 1st message that I was using the zl nth object to extract the list from the muli-slider.

Now I will try chris muir’s approach using the counter object and see what comes up.

thanks again.

phil


November 13, 2007 | 2:20 am

Quote: philippehughes@hotmail.com wrote on Sun, 11 November 2007 18:23
—————————————————-
> Hi robtherich
> Thanks for suggesting the speedlim and thresh, but these don’t seem to work for my problem.
>
> Any other suggestions
>
> thanks again
>
> phil
—————————————————-

There’s a multislider-based drum machine in the CNMAT mmj depot. Look in /modules/mz.toys

http://www.cnmat.berkeley.edu/MAX/downloads/

mz


November 14, 2007 | 3:14 pm

mzed schrieb:
> There’s a multislider-based drum machine in the CNMAT mmj depot.
> Look in /modules/mz.toys
>
> http://www.cnmat.berkeley.edu/MAX/downloads/

How to look in /modules/mz.toys if there is no complete link on the site?

The downloads page will lead to

http://cnmat.berkeley.edu/mmjdepot/

But from there it goes back or to a PDF

The page also still claims:

"CNMAT Max/MSP/Jitter Depot Coming Soon!" (yes, I deleted my cache…)

Maybe a direct link could lead us there?…

I am very curious about the depot since quite a while now but…

Stefan


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


November 14, 2007 | 5:02 pm

Thanks for the links stefan and mzed.

Since my 1st post from this thread, I’ve tried a few options.
THe first is using zl nth/line/multislider to metro/startloop/groove~.
This is fine for when you have many sliders say 256. But I’ve come to realize that machine gun bang come from the line object bang out the multislider values.

THe second option come from chris muir’s multislider iterate patch.
Which uses metro/counter/prepend fetch/multi.
this approach is more accurate for 16 step slider. But is a little wierd with 256 sliders. It’s like counter is sort of lazy.

Thanks again for your help everybody

phil


November 16, 2007 | 1:44 pm

Is this something that works for you:

max v2;
#N vpatcher 10 59 1101 814;
#P window setfont "Sans Serif" 9.;
#P number 133 85 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 85 89 15 0;
#P user ezdac~ 372 555 416 588 0;
#P user gain~ 372 423 24 100 158 0 1.071519 7.94321 10.;
#P window linecount 1;
#P newex 372 390 40 196617 cycle~;
#P newex 372 367 31 196617 mtof;
#P number 85 197 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 85 216 45 196617 fetch $1;
#P user multiSlider 85 258 297 97 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 85 175 27 196617 + 1;
#N counter 15;
#X flags 0 0;
#P newobj 85 146 66 196617 counter 15;
#P newex 85 116 58 196617 metro 250;
#P connect 10 0 0 0;
#P connect 0 0 1 0;
#P connect 1 0 2 0;
#P connect 2 0 5 0;
#P connect 5 0 4 0;
#P connect 4 0 3 0;
#P connect 11 0 0 1;
#P connect 3 1 6 0;
#P connect 6 0 7 0;
#P connect 7 0 8 0;
#P connect 8 0 9 0;
#P connect 8 0 9 1;
#P pop;

Hope this helps.


November 16, 2007 | 5:56 pm

#P button 455 477 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 516 373 81 196617 loadmess loop 1;
#P newex 455 454 32 196617 sel 0;
#P newex 132 60 60 196617 loadmess 1;
#P newex 180 87 72 196617 loadmess 500;
#P number 455 418 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 86 367 27 196617 t b i;
#P number 132 203 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 143 230 48 196617 fetch $1;
#N counter 1 16;
#X flags 0 0;
#P newobj 132 180 68 196617 counter 1 16;
#P newex 610 608 35 196617 gate~;
#P toggle 576 558 14 0;
#P newex 576 586 35 196617 gate~;
#P user ezdac~ 576 656 620 689 0;
#P user gain~ 601 445 24 100 158 0 1.071519 7.94321 32.;
#P user gain~ 635 446 24 100 158 0 1.071519 7.94321 81.;
#P message 600 270 43 196617 set hh2;
#P newex 601 374 41 196617 sig~ 1.;
#P message 455 518 29 196617 stop;
#P message 477 499 51 196617 startloop;
#P message 532 295 43 196617 replace;
#P newex 601 406 79 196617 groove~ hh2 2;
#P newex 532 318 63 196617 buffer~ hh2;
#P button 477 477 15 0;
#P number 86 418 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 180 112 51 9 0 0 0 3 0 0 0 255 173 173 222 222 222 0 0 0;
#P toggle 132 88 40 0;
#P newex 132 138 58 196617 metro 500;
#P newex 86 392 35 196617 zl nth;
#P button 132 161 15 0;
#P user multiSlider 132 258 333 83 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 user waveform~ 600 292 200 74 3 9;
#W mode select;
#W mouseoutput continuous;
#W unit ms;
#W grid 1000.;
#W ticks 0;
#W labels 1;
#W vlabels 0;
#W vticks 1;
#W bpm 120. 4.;
#W frgb 33 0 0;
#W brgb 60 178 173;
#W rgb2 0 95 255;
#W rgb3 0 0 0;
#W rgb4 0 0 0;
#W rgb5 190 137 255;
#W rgb6 100 100 100;
#W rgb7 100 100 100;
#P user multiSlider 132 253 333 8 1. 16. 1 2664 0 0 0 2 0 0 0;
#M frgb 198 198 198;
#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 27 0 30 0;
#P connect 21 0 20 0;
#P connect 21 0 22 0;
#P connect 32 0 14 0;
#P connect 30 0 32 0;
#P connect 18 1 17 0;
#P connect 30 1 9 0;
#P fasten 31 0 11 0 521 400 606 400;
#P connect 1 3 11 2;
#P connect 1 2 11 1;
#P connect 18 0 20 1;
#P connect 17 0 22 1;
#P connect 29 0 6 0;
#P connect 28 0 7 0;
#P connect 5 0 3 0;
#P connect 7 0 5 1;
#P connect 6 0 5 0;
#P connect 2 1 27 0;
#P fasten 2 0 4 0 137 387 91 387;
#P connect 26 1 4 1;
#P connect 26 0 4 0;
#P fasten 25 0 26 0 137 237 91 237;
#P connect 25 0 0 0;
#P connect 25 0 24 0;
#P connect 23 0 25 0;
#P connect 3 0 23 0;
#P connect 24 0 2 0;
#P connect 4 0 8 0;
#P connect 12 0 10 0;
#P connect 13 0 11 0;
#P connect 14 0 11 0;
#P connect 15 0 11 0;
#P connect 16 0 1 0;
#P connect 20 0 19 0;
#P connect 22 0 19 1;
#P connect 11 0 18 0;
#P connect 11 1 17 0;
#P connect 9 0 13 0;
#P window clipboard copycount 33;


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