Using Multislider output data help

Nov 2, 2006 at 9:39am

Using Multislider output data help

Hi
Max newbie here with a couple of basic questions. I have created a simple sample playback device that rearranges the playback of a file within 16 steps using multi-sliders to change the start position of the file at each step.

How can I more elegantly send the multi-slider data into the line~ object as I want to be able to freely change the amount of steps while the file is playing (4,8,32, 64,128…).
I intend to add polyphony so the previous step will decay over the next step, would I be better off using sfplay~ or groove~?
Any advice would be much appreciated.
Kind regards
David

Patch below

max v2;
#N vpatcher 50 50 1060 779;
#P window setfont Monaco 12.;
#P window linecount 0;
#P message 683 191 66 262156;
#P flonum 690 151 75 12 0 0 0 4 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont Monaco 9.;
#P window linecount 2;
#P message 332 510 298 262153 0 0.0625 0.125 0.1875 0.25 0.3125 0.375 0.4375 0.5 0.5625 0.625 0.6875 0.75 0.8125 0.875 0.9375;
#P message 333 479 310 262153 0.9375 0.875 0.8125 0.75 0.6875 0.625 0.5625 0.5 0.4375 0.375 0.3125 0.25 0.1875 0.125 0.0625 0;
#P flonum 881 162 89 9 0 0 0 4 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont Monaco 12.;
#P window linecount 1;
#P comment 606 152 22 262156 16;
#P comment 580 152 22 262156 15;
#P comment 556 152 22 262156 14;
#P comment 531 152 22 262156 13;
#P comment 502 152 22 262156 12;
#P comment 479 152 22 262156 11;
#P comment 454 152 22 262156 10;
#P comment 431 152 15 262156 9;
#P comment 407 152 15 262156 8;
#P comment 382 152 15 262156 7;
#P comment 355 152 15 262156 6;
#P comment 331 152 15 262156 5;
#P comment 306 152 15 262156 4;
#P comment 281 152 15 262156 3;
#N vpreset 7;
#X append 1 1 15 40 226 multiSlider list 0. 0.133333 0.161905 0.247619 0.352381 0.380952 0.533333 0.619048 0.685714 0.704762 0.771429 0.828571 0.92381 0.961905 0.990476 1. ;;
#X append 2 1 15 40 226 multiSlider list 1. 0.871429 0.809524 0.657143 0.590476 0.552381 0.495238 0.419048 0.419048 0.380952 0.295238 0.266667 0.238095 0.133333 0.07619 0. ;;
#X append 3 1 15 40 226 multiSlider list 0.038095 0. 0. 0. 0. 0. 0. 0. 0. 0.004762 0.009524 0.014286 0.019048 0.009524 0.004762 0. ;;
#X append 4 1 15 40 226 multiSlider list 1. 0.961905 0.866667 0.638095 0.47619 0.342857 0.190476 0.104762 0. 0.180952 0.266667 0.47619 0.67619 0.866667 0.980952 1. ;;
#X append 5 1 15 40 226 multiSlider list 0.32381 1. 0.228571 1. 0.533333 1. 0.409524 1. 0.580952 1. 0.542857 1. 0.47619 1. 0.361905 0.552381 ;;
#X append 6 1 15 40 226 multiSlider list 0. 0.0625 0.125 0.1875 0.25 0.3125 0.375 0.4375 0.5 0.5625 0.625 0.6875 0.75 0.8125 0.875 0.9375 ;;
#X append 7 1 15 40 226 multiSlider list 0.9375 0.875 0.8125 0.75 0.6875 0.625 0.5625 0.5 0.4375 0.375 0.3125 0.25 0.1875 0.125 0.0625 0. ;;
#P preset 649 52 47 27;
#P window setfont “Sans Serif” 9.;
#P hidden message 158 12 32 196617 set 2;
#P hidden number 158 31 35 9 0 10 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden message 158 51 55 196617 spacing $1;
#P window setfont Monaco 12.;
#P comment 257 152 15 262156 2;
#P button 608 176 15 0;
#P button 581 176 15 0;
#P button 557 176 15 0;
#P button 534 176 15 0;
#P button 509 176 15 0;
#P button 483 176 15 0;
#P button 459 176 15 0;
#P button 432 176 15 0;
#P button 407 176 15 0;
#P button 382 176 15 0;
#P button 356 176 15 0;
#P button 332 176 15 0;
#P window setfont Monaco 9.;
#P message 696 371 58 262153 0.47619;
#P message 560 371 58 262153 0.485714;
#P message 425 371 58 262153 0.361905;
#P message 288 371 58 262153 0.190476;
#P hidden newex 696 294 76 262153 prepend set;
#P hidden newex 560 294 76 262153 prepend set;
#P hidden newex 425 294 76 262153 prepend set;
#P hidden newex 288 294 76 262153 prepend set;
#P message 662 352 58 262153 0.438095;
#P message 526 352 58 262153 0.485714;
#P message 391 352 58 262153 0.309524;
#P message 255 352 58 262153 0.12381;
#P hidden newex 662 273 76 262153 prepend set;
#P hidden newex 526 273 76 262153 prepend set;
#P hidden newex 391 273 76 262153 prepend set;
#P hidden newex 255 273 76 262153 prepend set;
#P message 628 332 58 262153 0.466667;
#P message 492 334 58 262153 0.457143;
#P message 356 332 58 262153 0.257143;
#P message 221 334 58 262153 0.238095;
#P hidden newex 628 254 76 262153 prepend set;
#P hidden newex 492 254 76 262153 prepend set;
#P hidden newex 356 254 76 262153 prepend set;
#P hidden newex 221 254 76 262153 prepend set;
#P button 306 176 15 0;
#P button 281 176 15 0;
#P button 256 176 15 0;
#P button 232 176 15 0;
#P hidden newex 230 156 393 262153 select 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16;
#P button 13 136 15 0;
#N counter 1 16;
#X flags 0 0;
#P newobj 13 158 82 262153 counter 1 16;
#P message 594 315 58 262153 0.47619;
#P message 458 315 58 262153 0.419048;
#P message 322 315 58 262153 0.2;
#P message 186 315 58 262153 0.295238;
#P hidden newex 594 235 76 262153 prepend set;
#P hidden newex 458 235 76 262153 prepend set;
#P hidden newex 322 235 76 262153 prepend set;
#P hidden newex 186 235 76 262153 prepend set;
#P button 130 475 15 0;
#P message 152 544 121 262153 3352 , 3852 500;
#P newex 152 521 87 262153 prepend set;
#P window setfont “Sans Serif” 9.;
#P user number~ 310 607 374 622 9 3 3 2 0. 0. 0 0. 250 0. 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 194 464 15 0;
#P window setfont Monaco 9.;
#P message 194 482 22 262153 44;
#P newex 152 501 136 262153 sprintf %d%c %d %d;
#P newex 194 440 27 262153 +;
#P newex 256 417 40 262153 / 16.;
#P hidden newex 240 394 94 262153 r samplelength;
#P window setfont Chicago 9.;
#P newex 152 417 99 1073676297 zmap 0. 1. 0. 3000.;
#P window setfont Monaco 9.;
#P newex 152 606 88 262153 play~ david 2;
#P button 226 24 15 0;
#P hidden newex 186 215 529 262153 unpack 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.;
#P user multiSlider 226 40 402 107 0. 1. 16 2937 15 0 2 2 16 0 0;
#M frgb 11 56 187;
#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 776 240 94 262153 s samplelength;
#P newex 776 154 76 262153 prepend set;
#P message 780 201 192 262153 ahkey.aiff;
#P flonum 780 181 89 9 0 0 0 4 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 780 119 105 262153 info~ david;
#P newex 152 638 46 262153 *~ 0.2;
#P user ezdac~ 152 669 196 702 0;
#P message 92 569 34 262153 stop;
#P message 51 543 76 262153 startwindow;
#P newex 152 579 40 262153 line~;
#P message 776 68 34 262153 read;
#P newex 776 90 88 262153 buffer~ david;
#P window setfont Monaco 12.;
#P comment 232 152 15 262156 1;
#P window linecount 19;
#P comment 706 410 134 262156 Future Implementation 1) Set Length for each bar. Allow Decay (more groove objects?) 2) Change between 8/16/32/64 etc 3) Volume 4) Tempo Feature that will play the parts faster or shorter. 5) Stop Clicking 6) reverse some steps 7) set presets for specific playback ie forward backward;
#P window linecount 1;
#P comment 263 23 100 262156 Sample Start;
#P hidden connect 5 1 39 0;
#P connect 39 0 38 0;
#P connect 23 0 29 0;
#P hidden fasten 34 0 19 0 191 374 157 374;
#P hidden connect 49 0 19 0;
#P hidden connect 57 0 19 0;
#P hidden connect 65 0 19 0;
#P hidden connect 35 0 19 0;
#P hidden connect 50 0 19 0;
#P hidden connect 58 0 19 0;
#P hidden connect 66 0 19 0;
#P hidden connect 36 0 19 0;
#P hidden connect 51 0 19 0;
#P hidden connect 59 0 19 0;
#P hidden connect 67 0 19 0;
#P hidden connect 37 0 19 0;
#P hidden connect 52 0 19 0;
#P hidden connect 60 0 19 0;
#P hidden connect 68 0 19 0;
#P connect 19 0 23 0;
#P connect 23 0 27 0;
#P connect 27 0 28 0;
#P connect 29 0 28 0;
#P connect 28 0 5 0;
#P connect 5 0 18 0;
#P connect 18 0 9 0;
#P fasten 9 0 8 0 157 662 157 662;
#P fasten 6 0 8 0 56 566 157 566;
#P fasten 7 0 8 0 97 622 157 622;
#P hidden connect 84 0 83 0;
#P connect 83 0 82 0;
#P hidden connect 15 0 16 0;
#P hidden connect 16 0 30 0;
#P hidden connect 30 0 34 0;
#P hidden connect 41 0 34 0;
#P fasten 9 0 8 1 157 662 191 662;
#P connect 19 0 22 0;
#P connect 22 0 25 0;
#P connect 25 0 24 0;
#P connect 24 0 23 1;
#P connect 21 0 22 1;
#P hidden connect 16 1 45 0;
#P hidden connect 45 0 49 0;
#P hidden connect 42 0 49 0;
#P connect 17 0 15 0;
#P connect 82 0 15 0;
#P connect 85 0 15 0;
#P connect 38 0 40 0;
#P connect 40 0 41 0;
#P connect 22 0 23 2;
#P connect 20 0 19 4;
#P hidden connect 16 2 53 0;
#P hidden connect 53 0 57 0;
#P hidden connect 43 0 57 0;
#P connect 40 1 42 0;
#P connect 20 0 21 0;
#P connect 21 0 23 3;
#P connect 40 2 43 0;
#P hidden connect 16 3 61 0;
#P hidden connect 61 0 65 0;
#P hidden connect 44 0 65 0;
#P connect 40 3 44 0;
#P connect 5 0 26 0;
#P hidden connect 16 4 31 0;
#P hidden connect 31 0 35 0;
#P hidden connect 69 0 35 0;
#P connect 40 4 69 0;
#P connect 40 5 70 0;
#P hidden connect 16 5 46 0;
#P hidden connect 46 0 50 0;
#P hidden connect 70 0 50 0;
#P connect 40 6 71 0;
#P hidden connect 16 6 54 0;
#P hidden connect 54 0 58 0;
#P hidden connect 71 0 58 0;
#P connect 40 7 72 0;
#P hidden connect 16 7 62 0;
#P hidden connect 62 0 66 0;
#P hidden connect 72 0 66 0;
#P connect 40 8 73 0;
#P hidden connect 16 8 32 0;
#P hidden connect 32 0 36 0;
#P hidden connect 73 0 36 0;
#P connect 40 9 74 0;
#P connect 40 10 75 0;
#P hidden connect 16 9 47 0;
#P hidden connect 47 0 51 0;
#P hidden connect 74 0 51 0;
#P connect 40 11 76 0;
#P hidden connect 16 10 55 0;
#P hidden connect 55 0 59 0;
#P hidden connect 75 0 59 0;
#P connect 40 12 77 0;
#P connect 40 13 78 0;
#P hidden connect 16 11 63 0;
#P hidden connect 63 0 67 0;
#P hidden connect 76 0 67 0;
#P connect 40 14 79 0;
#P hidden connect 16 12 33 0;
#P hidden connect 33 0 37 0;
#P hidden connect 77 0 37 0;
#P connect 40 15 80 0;
#P hidden connect 16 13 48 0;
#P hidden connect 48 0 52 0;
#P hidden connect 78 0 52 0;
#P hidden connect 16 14 56 0;
#P hidden connect 56 0 60 0;
#P hidden connect 79 0 60 0;
#P connect 10 1 104 0;
#P connect 10 0 103 0;
#P hidden connect 16 15 64 0;
#P hidden connect 64 0 68 0;
#P hidden connect 80 0 68 0;
#P connect 4 0 3 0;
#P connect 10 7 13 0;
#P fasten 11 0 14 0 785 222 781 222;
#P connect 3 1 10 0;
#P fasten 10 6 11 0 863 169 785 169;
#P hidden fasten 13 0 12 0 781 210 785 210;
#P connect 10 6 100 0;
#P pop;

#28479
Nov 2, 2006 at 12:33pm

Unless I’m mistakened in what you are trying to do – it seems you are trying to re-invent the wheel somewhat. There is loads of examples of ‘slicers’ – look in your max examples folder under sequencing/looping and find ModSquad Redux- a simple loop reslicer that cuts it into 16 equal parts.

If you want something more complex, I also have a few further examples somewhere including one which finds transient beats and plays them back in a given order – which is a more comprehensive way to do it. None the less if you want something simple the Redux example is well worth a look.

T

#87475

You must be logged in to reply to this topic.