max v2; #N vpatcher 66 44 1236 867; #P window setfont "Sans Serif" 9.; #P window linecount 1; #P comment 831 37 216 196617 Most up-to-date versions of templates:; #P window linecount 3; #P message 831 51 314 196617 \; max launch_browser http://rhoadley.net/cgi/courses/tech_resources/max-msp/examples/PERFORMANCE_TEMPLATES/; #P toggle 886 711 15 0; #P window linecount 1; #P message 909 711 27 196617 open; #P newex 909 746 63 196617 sfrecord~ 2; #P newex 909 655 53 196617 adoutput~; #P comment 879 625 99 196617 record a demo...; #P window linecount 9; #P comment 1006 656 113 196617 1. Click on open to open a file for recording. Save the file in one of your own directories to which you know you have access. 2. Use the toggle to turn recording on and \, when finished \, off.; #P user panel 879 644 263 133; #X brgb 191 191 191; #X frgb 0 0 0; #X border 1; #X rounded 0; #X shadow 0; #X done; #P window linecount 1; #P comment 599 337 36 196617 = orig; #P message 567 335 32 196617 zero; #P comment 554 308 60 196617 Pitch Bend; #P user hslider 521 321 14 106 128 1 0 13; #N vpatcher 60 55 420 300; #P window setfont "Sans Serif" 9.; #P message 147 175 38 196617 set \$1; #N comlet zero pitch end (bang or whatever); #P inlet 193 34 15 0; #P newex 205 152 54 196617 r loadbang; #P message 205 175 23 196617 64; #P button 193 54 15 0; #N comlet to fader inlet; #P outlet 147 201 15 0; #N comlet fader bend (0-127); #P inlet 97 32 15 0; #P comment 43 149 151 196617 pitch bend ratio (1=no change); #P outlet 17 149 15 0; #P newex 17 126 55 196617 transRatio; #P flonum 34 80 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #N vpatcher 60 55 444 345; #P outlet 28 221 15 0; #P inlet 28 82 15 0; #P window setfont "Sans Serif" 9.; #P number 28 107 43 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P flonum 28 195 56 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 87 154 66 196617 zmap 64 127 0. 1; #P newex 28 155 55 196617 zmap 0 64 -1. 0.; #P newex 87 132 65 196617 split 64 127; #P newex 28 132 50 196617 split 0 64; #P comment 93 94 247 196617 here's one way to force 64 to be a center value.; #P comment 93 36 247 196617 remaining MIDI compatible by using controllers that go from 0-127 makes it difficult to have a center control value \, which is important for panning and pitch bend. (cf. MSP tutorial 22); #P comment 216 131 45 196617 - les; #P connect 9 0 8 0; #P connect 8 0 3 0; #P connect 3 0 5 0; #P connect 5 0 7 0; #P connect 6 0 7 0; #P connect 7 0 10 0; #P connect 3 1 4 0; #P connect 4 0 6 0; #P pop; #P newobj 17 60 65 196617 p MIDImiddle; #P newex 17 101 27 196617 * 7.; #P newex 17 32 35 196617 bendin; #P comment 74 80 100 196617 pitch bend range; #P comment 114 32 55 196617 fader bend (0-127); #P comment 176 204 77 196617 to fader inlet; #P comment 211 34 100 196617 zero pitch bend (bang or whatever); #P connect 4 0 6 0; #P fasten 11 0 6 0 102 53 22 53; #P connect 6 0 5 0; #P connect 5 0 8 0; #P connect 8 0 9 0; #P connect 7 0 5 1; #P fasten 4 0 17 0 22 55 152 55; #P connect 17 0 12 0; #P fasten 14 0 12 0 210 195 152 195; #P connect 16 0 13 0; #P fasten 13 0 14 0 198 172 210 172; #P connect 15 0 14 0; #P pop; #P newobj 521 353 88 196617 p midi-pitch-bend; #P comment 196 381 165 196617 the phasor period is set by the bpm; #P window linecount 2; #P comment 692 737 108 196617 ©2003 atau tanaka used with permission; #P comment 449 701 287 196617 - Now Redux brings in all back into the pure signal domain \, ultratight \, and ultrasimple.; #P window linecount 1; #P comment 449 668 287 196617 - Then there was Les Stuck's scheduler version using seq~; #P hidden message 182 513 14 196617 0; #P hidden newex 182 492 60 196617 r loadbang2; #P window linecount 2; #P comment 631 166 144 196617 ¥ click "jongly" again if patch doesn't start up by itself; #P window linecount 1; #P comment 431 521 83 196617 The Guts; #P number 428 194 35 9 1 32 7 3 0 0 0 221 221 221 222 222 222 0 0 0; #P message 460 252 20 196617 64; #P comment 452 236 69 196617 Quick Tempo; #P hidden button 640 252 15 0; #P hidden message 604 252 35 196617 set 64; #P hidden newex 604 231 54 196617 r loadbang; #P user dial 460 268 40 40 128 1 0 0 7 270 1 1. 170 170 170 221 221 221 120 120 120 225 225 225 0 0 0 0 0 0; #P user dial 460 268 40 40 128 1 0 0 7 270 1 1. 170 170 170 221 221 221 120 120 120 225 225 225 0 0 0 0 0 0; #P window linecount 2; #P comment 402 584 66 196617 transposition (cents); #P window linecount 1; #P comment 211 565 35 196617 in/out; #P number 356 583 45 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P toggle 246 562 19 0; #P flonum 356 544 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 356 523 65 196617 r temporatio; #N vpatcher 40 55 540 414; #P toggle 134 175 15 0; #P window setfont "Sans Serif" 9.; #P message 134 197 54 196617 mute 1 \$1; #P newex 119 151 30 196617 == 0; #N vpatcher 40 55 326 305; #P outlet 57 180 15 0; #P inlet 57 63 15 0; #P window setfont "Sans Serif" 9.; #P newex 57 92 52 196617 ftom 0.; #P newex 57 158 52 196617 i; #P newex 57 137 52 196617 * 100.; #P newex 57 115 52 196617 - 24.; #P comment 151 102 100 196617 turn freq Hz value into Cents; #P connect 5 0 4 0; #P connect 4 0 1 0; #P connect 1 0 2 0; #P connect 2 0 3 0; #P connect 3 0 6 0; #P pop; #P newobj 264 113 34 196617 p ftoc; #P message 401 279 28 196617 bang; #P newex 428 299 27 196617 i; #P newex 367 260 44 196617 select 0; #P message 368 280 14 196617 0; #N comlet harmo in/out; #P inlet 119 29 15 0; #P message 253 294 35 196617 set \$1; #P newex 264 174 29 196617 * -1; #N comlet transposition (cents); #P outlet 368 321 15 0; #N comlet harmo in/out indicator; #P outlet 253 321 15 0; #N comlet tempo ratio; #P inlet 198 33 15 0; #P comment 308 175 100 196617 cent transposition represented by tempo ratio; #P comment 234 53 100 196617 tempo ratio; #P number 264 193 39 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P comment 308 156 149 196617 center around reference 400Hz; #P newex 264 155 40 196617 - 4335; #P newex 264 71 39 196617 * 400.; #P comment 306 136 29 196617 cent; #P flonum 264 93 41 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P number 264 135 39 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P flonum 198 52 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #N comlet audio out; #P outlet 156 321 15 0; #N comlet audio in; #P inlet 102 29 15 0; #P toggle 119 121 26 0; #P newex 119 219 27 196617 f; #P flonum 119 240 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 102 262 27 196617 *~; #P toggle 253 267 15 0; #P hidden message 281 236 14 196617 1; #P hidden newex 281 215 54 196617 r loadbang; #P toggle 262 214 15 0; #N vpatcher 40 436 636 744; #P origin 0 -56; #P window setfont "Sans Serif" 9.; #P newex 179 196 125 196617 poly~ transposer-poly 1; #P newex 60 67 29 196617 / 10; #P newex 60 47 45 196617 * 1000.; #P button 97 128 15 0; #P button 44 128 15 0; #N comlet set button out; #P outlet 208 254 15 0; #N comlet harmonizer in/out; #P inlet 275 85 15 0; #N comlet harmonize in (cents); #P inlet 236 86 15 0; #N comlet audio in; #P inlet 179 85 15 0; #N comlet audio out; #P outlet 140 253 15 0; #N comlet tempo adj in; #P inlet 60 25 15 0; #P message 113 128 28 196617 bang; #P message 60 128 14 196617 0; #P newex 70 185 40 196617 change; #P message 70 213 35 196617 set \$1; #P newex 60 106 71 196617 select 100 99; #P newex 81 164 27 196617 i; #P newex 140 186 27 196617 + 0; #P toggle 140 148 15 0; #P number 236 176 39 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P comment 229 240 103 196617 compensating harmonizer in/out; #P comment 110 30 63 196617 auto-cut harmonizer when tempo ratio = 1.; #P comment 308 197 160 196617 poly~ transposer-poly~ 1 down 2; #P comment 308 167 255 196617 you can also save on processing by downsampling the transposer. (it won't sound as clean.); #P connect 8 0 19 0; #P connect 8 1 19 0; #P connect 13 0 21 0; #P connect 21 0 22 0; #P connect 22 0 8 0; #P connect 8 1 11 0; #P connect 8 0 11 0; #P connect 11 0 10 0; #P connect 7 0 10 0; #P connect 10 0 9 0; #P connect 12 0 7 0; #P connect 8 2 20 0; #P connect 5 0 7 1; #P connect 8 2 12 0; #P fasten 9 0 5 0 75 232 113 232 113 145 145 145; #P fasten 17 0 5 0 280 124 145 124; #P fasten 10 0 6 0 75 208 128 208 128 183 145 183; #P connect 5 0 6 0; #P connect 23 0 14 0; #P connect 15 0 23 0; #P connect 6 0 18 0; #P connect 16 0 4 0; #P connect 4 0 23 1; #P pop; #P newobj 198 237 65 196617 p harmonizer; #P comment 312 74 100 196617 put into artificial freq range good for freq2cent object; #P comment 151 153 22 196617 not; #P connect 11 0 7 0; #P connect 6 0 10 0; #P connect 28 0 10 0; #P connect 10 0 34 0; #P connect 34 0 9 0; #P connect 9 0 8 0; #P connect 8 0 7 1; #P connect 34 0 36 0; #P connect 36 0 35 0; #P connect 7 0 12 0; #P connect 2 0 12 0; #P connect 23 0 13 0; #P connect 13 0 2 0; #P connect 35 0 2 1; #P connect 11 0 2 1; #P connect 20 0 2 2; #P connect 3 0 2 3; #P connect 2 1 6 0; #P connect 6 0 27 0; #P connect 27 0 24 0; #P hidden connect 5 0 3 0; #P connect 13 0 17 0; #P connect 17 0 15 0; #P connect 15 0 33 0; #P connect 33 0 14 0; #P connect 14 0 18 0; #P connect 18 0 26 0; #P connect 26 0 20 0; #P hidden connect 4 0 5 0; #P connect 28 0 30 0; #P connect 6 0 30 0; #P connect 30 0 29 0; #P connect 29 0 25 0; #P connect 31 0 25 0; #P connect 30 1 32 0; #P connect 32 0 31 0; #P fasten 20 0 31 0 269 211 433 211; #P pop; #P newobj 266 563 100 196617 p pitch-compensator; #P window linecount 6; #P comment 393 331 125 196617 The tempo is set initially \, plus you can play with it. The pitch compensator kicks in/out automatically. You can bypass it too.; #P window linecount 1; #N vpatcher 40 55 825 351; #P origin 0 -2; #P window setfont "Sans Serif" 9.; #P flonum 523 182 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P message 523 200 35 196617 set \$1; #N comlet to bpm display; #P outlet 523 218 15 0; #P comment 297 182 125 196617 sent to pitch-compensator; #P comment 128 248 102 196617 sets the actual speed; #N comlet to tempo knob; #P outlet 655 218 15 0; #P message 655 200 35 196617 set \$1; #P number 655 182 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 634 151 28 196617 - 64; #P newex 676 151 27 196617 / 2; #P newex 634 131 58 196617 split 0 127; #P user dial 502 0 40 40 128 1 0 0 7 270 1 1. 170 170 170 221 221 221 120 120 120 225 225 225 0 0 0 0 0 0; #P number 634 110 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 634 87 39 196617 * 128.; #P newex 634 65 65 196617 r temporatio; #P newex 523 149 39 196617 * 120.; #N comlet tempo knob \, 0-127; #P inlet 481 24 15 0; #P newex 481 84 41 196617 / 128.; #P newex 481 64 32 196617 + 64; #P flonum 523 116 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 523 64 35 196617 / 64.; #P newex 481 44 52 196617 split 0 63; #P newex 296 162 65 196617 s temporatio; #P flonum 296 138 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 296 113 38 196617 / 170.; #P flonum 324 88 61 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 324 61 61 196617 r origtempo; #P newex 126 220 55 196617 s totaltime; #N comlet ms/loop (phasor freq); #P outlet 96 220 15 0; #P comment 162 195 83 196617 ms/loop; #P comment 151 167 83 196617 ms/min; #P comment 149 138 83 196617 minutes/loop; #P comment 170 55 83 196617 beats/loop; #P flonum 96 194 60 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 96 165 51 196617 * 60000.; #P newex 96 137 27 196617 / 1.; #P newex 132 96 27 196617 i; #P newex 96 66 27 196617 t b f; #N comlet beats per loop; #P inlet 149 36 15 0; #N comlet bpm; #P inlet 96 36 15 0; #P comment 10 55 83 196617 beats/min (bpm); #P comment 182 220 80 196617 sent to patcher "time-modes"; #P comment 348 138 100 196617 0.5 = half tempo 2. = double tempo; #P comment 604 39 154 196617 reconstitute 0-127 to set knob upon numerical bpm change; #P fasten 28 0 6 0 528 174 457 174 457 26 127 26 127 57 101 57; #P connect 4 0 6 0; #P connect 7 0 8 0; #P connect 8 0 9 0; #P connect 9 0 10 0; #P connect 10 0 15 0; #P connect 6 1 8 1; #P connect 10 0 16 0; #P connect 6 0 7 0; #P connect 5 0 7 1; #P connect 6 1 19 0; #P connect 19 0 20 0; #P connect 20 0 21 0; #P connect 17 0 18 0; #P connect 18 0 19 1; #P connect 32 0 22 0; #P connect 27 0 22 0; #P connect 22 0 25 0; #P connect 25 0 26 0; #P connect 22 1 23 0; #P connect 23 0 24 0; #P connect 26 0 24 0; #P connect 24 0 28 0; #P connect 28 0 43 0; #P connect 43 0 42 0; #P connect 42 0 41 0; #P connect 18 0 28 1; #P connect 29 0 30 0; #P connect 30 0 31 0; #P connect 31 0 33 0; #P connect 33 0 35 0; #P connect 34 0 36 0; #P connect 35 0 36 0; #P connect 36 0 37 0; #P connect 37 0 38 0; #P connect 33 1 34 0; #P pop; #P newobj 395 311 55 196617 p settempo; #P button 198 397 15 0; #N vpatcher 40 55 204 205; #P outlet 60 104 15 0; #P inlet 60 40 15 0; #P window setfont "Sans Serif" 9.; #P newex 76 104 41 196617 s triglp; #P button 43 104 15 0; #P newex 60 80 34 196617 edge~; #P newex 60 60 49 196617 >~ 0.001; #P connect 1 0 2 0; #P connect 4 0 0 0; #P connect 0 0 1 0; #P connect 1 0 5 0; #P connect 1 0 3 0; #P pop; #P newobj 214 396 51 196617 p looptick; #P comment 733 270 68 196617 samples/loop; #N vpatcher 752 83 1195 485; #P origin 0 -37; #P window setfont "Sans Serif" 9.; #P newex 98 44 40 196617 change; #P newex 98 24 27 196617 i; #P newex 98 4 41 196617 r triglp; #P comment 190 303 61 196617 calculation of phasor~ frequency; #P comment 59 109 37 196617 normal; #P comment 346 48 72 196617 2 - "cut-time" doubles the theoretical loop length (in ms) \, so each step is twice as far down the sample. This is compensated by dividing the index to wave~ by 2 \, thus keeping the pitch the same as original.; #P comment 223 48 72 196617 1 - "half-loop" divides phasor~ output by 2 \, making the loop go only through half the number of steps; #P flonum 215 182 60 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 215 163 55 196617 r totaltime; #P newex 131 86 28 196617 t b b; #P newex 164 86 28 196617 t b b; #N comlet menu select mode; #P inlet 141 5 15 0; #N comlet multiply wave~ output; #P outlet 277 372 15 0; #N comlet divide phasor~ output; #P outlet 126 371 15 0; #N comlet to phasor~; #P outlet 109 371 15 0; #P message 182 107 14 196617 1; #P message 164 107 14 196617 2; #P message 149 107 14 196617 1; #P message 131 107 14 196617 2; #P message 98 107 14 196617 1; #P newex 98 64 109 196617 select 0 1 2; #P newex 277 311 55 196617 t b f; #P newex 277 351 55 196617 / 1.; #P newex 259 332 36 196617 f; #P window setfont "Sans Serif" 12.; #P number 139 148 27 12 1 4 7 3 0 0 0 221 221 221 222 222 222 0 0 0; #P window setfont "Sans Serif" 9.; #P newex 139 171 41 196617 t b f f; #P comment 165 146 27 196617 cut time; #P newex 109 330 55 196617 * 1.; #P newex 109 310 27 196617 f; #P window setfont "Sans Serif" 12.; #P number 110 148 27 12 1 4 7 3 0 0 0 221 221 221 222 222 222 0 0 0; #P window setfont "Sans Serif" 9.; #P newex 109 170 27 196617 t b f; #P comment 68 148 37 196617 divide total steps; #P flonum 277 182 60 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 277 162 65 196617 r totalsamps; #P flonum 109 351 65 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P message 166 263 14 196617 1; #P newex 166 241 53 196617 r exprInit; #P newex 166 284 89 196617 expr (1000./$f1); #P comment 16 11 80 196617 do time-mode change only on loop boundary; #P connect 36 0 37 0; #P connect 37 0 38 0; #P connect 38 0 18 0; #P connect 18 0 19 0; #P connect 9 0 8 0; #P connect 13 0 10 0; #P connect 8 0 10 0; #P connect 1 0 10 0; #P connect 10 0 11 0; #P connect 11 0 4 0; #P connect 4 0 24 0; #P connect 19 0 9 0; #P connect 23 0 9 0; #P connect 20 0 9 0; #P connect 27 0 37 1; #P connect 8 1 25 0; #P connect 18 1 29 0; #P connect 29 0 20 0; #P connect 19 0 14 0; #P connect 22 0 14 0; #P connect 21 0 14 0; #P connect 14 0 13 0; #P connect 29 1 21 0; #P connect 8 1 11 1; #P connect 13 1 11 1; #P connect 18 2 28 0; #P connect 28 0 22 0; #P connect 2 0 3 0; #P connect 31 0 1 0; #P connect 3 0 1 0; #P connect 28 1 23 0; #P connect 30 0 31 0; #P connect 17 0 15 0; #P connect 6 0 15 0; #P connect 5 0 6 0; #P connect 13 2 17 0; #P connect 15 0 16 0; #P connect 16 0 26 0; #P connect 17 1 16 1; #P pop; #P newobj 516 289 69 196617 p time-modes; #P user umenu 516 269 67 196647 1 64 285 1; #X add normal; #X add half-loop; #X add cut-time; #P flonum 319 492 60 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 266 416 32 196617 /~ 1.; #P hidden newex 297 107 53 196617 delay 500; #P hidden message 203 614 26 196617 127; #P hidden newex 197 586 60 196617 r loadbang2; #P hidden newex 224 129 60 196617 s loadbang2; #P hidden newex 164 129 59 196617 delay 2000; #P window linecount 2; #P comment 379 463 134 196617 ... double click after playing w/ the multislider to see.; #P comment 449 635 287 196617 - First there was OldSchool based on a huge matrix of signal comparisons.; #P window linecount 1; #N vpatcher 78 100 747 680; #P origin -69 -33; #N comlet bend input (float ratio); #P inlet 567 83 15 0; #P window setfont "Sans Serif" 9.; #P comment 585 81 67 196617 "pitch bend" 1.0=no bend; #P comment 428 398 160 196617 scaling the slope of this ramp locally gives us a "pitch bend." Since it's local \, the loop slice point remains constant; #P newex 410 246 27 196617 - 1.; #P newex 249 107 35 196617 zl reg; #P newex 567 125 27 196617 t b f; #P flonum 567 107 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 337 400 27 196617 * 1.; #P comment 428 334 160 196617 (this is because a staircase in the multislider is equivalent to a phasor ramp. Changing multislider in effect "shuffles" a phasor in 16 segments - see Read-Me); #P comment 428 450 152 196617 To do this \, take each step and add a fraction of 32 to it \, going through the 32 substeps; #P comment 279 158 308 196617 iterate multislider to give the levels of the individual steps (0-15); #N vpatcher 40 55 510 364; #P origin 88 157; #P window setfont "Sans Serif" 9.; #P comment 210 231 222 196617 By doing so \, keeping the sequence going in order; #P comment 210 217 222 196617 So slider values of "5 0 0" come out as "5 6 7"; #P comment 210 191 222 196617 If there is a 0 \, we count successive 0's \, and we add 1 to the previous slider value for each 0; #P comment 202 130 222 196617 And reset the counter so that the next 0 is counted as the first 0 if there is a series of 0's; #P comment 202 103 194 196617 But remember the last slider value just in case the next slider is a 0; #P outlet 190 257 15 0; #P comment 204 83 194 196617 If not 0 \, just let the slider value through; #P inlet 84 32 15 0; #P comment 147 53 165 196617 this feature indicates continuing and going through to the next slice; #P newex 84 60 56 196617 select 0; #P newex 143 108 27 196617 i; #P newex 143 227 27 196617 + 1; #N counter 1 16; #X flags 0 0; #P newobj 102 153 66 196617 counter 1 16; #P newex 84 81 28 196617 t b b; #P button 102 134 15 0; #P number 102 175 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P message 130 134 14 196617 1; #P newex 130 81 71 196617 t b i i; #P comment 100 35 168 196617 trap for multislider sliders set to 0; #P connect 11 0 9 0; #P connect 9 0 5 0; #P connect 5 1 4 0; #P connect 4 0 6 0; #P connect 6 0 3 0; #P connect 9 1 1 0; #P connect 1 0 2 0; #P connect 2 0 6 2; #P connect 5 0 8 0; #P connect 8 0 7 0; #P connect 1 1 8 1; #P connect 3 0 7 1; #P connect 1 2 13 0; #P connect 7 0 13 0; #P pop; #P newobj 410 216 55 196617 p trapzero; #P comment 148 222 100 196617 move in 16 chunks of 32 \, makes 512; #P comment 148 173 100 196617 for each of the 16 steps in the loop...; #P comment 133 288 116 196617 for each of the 32 samples within a step...; #P comment 3 226 100 196617 this is the value that goes into wave~; #P comment 439 43 100 196617 meaning 32 samples per step - that need to ramp up. By interpolation in wave \, this is reconstituted to the correct time scale to give a sample index to index~; #P comment 331 107 100 196617 These 512 samples represent the 16 steps of the multislider...; #P comment 331 64 100 196617 This determines the size of wave~ in the main patch; #P comment 331 37 100 196617 The lookup table is a 512 sample table; #P inlet 249 83 15 0; #P comment 3 62 100 196617 we take the multislider output and formulate a lookup table (a sort of signal equivalent of the multislider) that will be the "reordered" phasor; #P comment 148 321 100 196617 16 steps across 512 samples means 32 samples per step; #P newex 298 529 62 196617 peek~ steps; #P newex 249 134 25 196617 iter; #N counter 0 15; #X flags 0 0; #P newobj 249 179 66 196617 counter 0 15; #P newex 249 156 27 196617 t b i; #P number 249 201 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 249 225 30 196617 * 32; #P newex 337 479 32 196617 / 16.; #P newex 249 270 40 196617 Uzi 32; #N counter 0 31; #X flags 0 0; #P newobj 249 294 66 196617 counter 0 31; #P newex 249 248 27 196617 t b i; #P newex 249 323 27 196617 +; #P number 249 344 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 298 506 49 196617 pack 0 0.; #P comment 370 488 100 196617 scale the 16 step ramp to 0-1.0 continuous (to be interpolated on playback out of wave~); #P comment 3 163 100 196617 512 samples = 11.609978ms at 44.1Hz sampling rate (change using dspstatus if needed); #P number 337 329 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 337 355 32 196617 / 32.; #P flonum 337 378 50 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 337 440 83 196617 + 0.; #P flonum 337 460 41 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P comment 288 201 100 196617 ramp up through the 32 samples in each of the 16 steps; #P comment 469 218 84 196617 step level (0-15); #P window setfont "Sans Serif" 14.; #P comment 3 23 137 196622 Here is the crux of this patch :; #P window setfont "Sans Serif" 9.; #P comment 428 306 153 196617 Now each of the 16 steps needs to be turned into a little ramp; #P connect 26 0 42 0; #P fasten 41 0 42 0 572 147 562 147 562 103 254 103; #P connect 42 0 22 0; #P connect 22 0 20 0; #P connect 20 0 21 0; #P connect 21 0 19 0; #P connect 19 0 18 0; #P connect 18 0 14 0; #P connect 14 0 16 0; #P connect 16 0 15 0; #P connect 15 0 13 0; #P connect 13 0 12 0; #P connect 14 1 13 1; #P connect 12 0 11 0; #P connect 11 0 23 0; #P connect 15 0 8 0; #P connect 8 0 7 0; #P connect 7 0 6 0; #P connect 6 0 39 0; #P connect 39 0 5 0; #P connect 5 0 4 0; #P connect 4 0 17 0; #P connect 17 0 11 1; #P fasten 41 1 39 1 589 396 359 396; #P fasten 20 1 35 0 271 175 415 175; #P connect 35 0 43 0; #P connect 43 0 5 1; #P connect 46 0 40 0; #P connect 40 0 41 0; #P pop; #P newobj 419 490 98 196617 p peeker~; #P comment 300 425 178 196617 wave~ stores a "reordered" phasor...; #P hidden message 222 430 44 196617 interp 1; #P flonum 671 268 60 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 266 510 63 196617 *~ 125766.; #P newex 266 533 80 196617 index~ buf; #P hidden newex 416 464 33 196617 * 16.; #P hidden newex 347 464 68 196617 snapshot~ 20; #P hidden message 428 175 14 196617 8; #P hidden newex 428 156 54 196617 r loadbang; #P window linecount 2; #P comment 466 191 152 196617 beats per loop (just to calculate bpm based on the soundfile); #P flonum 672 286 59 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P window linecount 1; #P comment 402 242 44 196617 bpm; #P flonum 395 268 57 9 1. 0 5 3 0 0 0 221 221 221 222 222 222 0 0 0; #N vpatcher 594 145 1043 510; #P window setfont "Sans Serif" 9.; #P hidden message 23 117 32 196617 set 1; #P newex 254 294 61 196617 r origtempo; #P newex 254 276 61 196617 s origtempo; #P message 254 314 35 196617 set \$1; #N comlet beats per loop; #P inlet 274 91 15 0; #N comlet tempo in bpm; #P outlet 254 335 15 0; #P inlet 61 51 15 0; #P hidden newex 165 57 50 196617 s looplen1; #P hidden newex 101 56 53 196617 t b b b b; #P hidden message 165 38 14 196617 1; #P hidden message 346 166 14 196617 1; #P hidden newex 346 146 53 196617 r exprInit; #P window setfont "Sans Serif" 12.; #P number 101 97 27 12 1 4 7 3 0 0 0 221 221 221 222 222 222 0 0 0; #P window setfont "Sans Serif" 9.; #P hidden newex 274 205 27 196617 t b f; #P hidden message 101 79 20 196617 1; #P hidden message 134 128 20 196617 16; #P hidden newex 101 34 54 196617 r loadbang; #P newex 108 207 40 196617 t b f f; #P newex 84 121 27 196617 t b f; #P flonum 100 250 65 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P window setfont "Sans Serif" 12.; #P flonum 110 187 35 12 0 0 4 3 0 0 0 221 221 221 222 222 222 0 0 0; #P window setfont "Sans Serif" 9.; #P comment 148 187 52 196617 steps per loop; #P newex 100 230 35 196617 / 16.; #P comment 311 100 73 196617 beats per loop (just to calculate bpm); #P newex 254 230 27 196617 * 8.; #P window setfont "Sans Serif" 12.; #P flonum 274 111 35 12 0 0 4 3 0 0 0 221 221 221 222 222 222 0 0 0; #P window setfont "Sans Serif" 9.; #P flonum 100 166 65 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P comment 167 158 51 196617 samples per loop; #P window setfont Helvetica 18.; #P comment 310 252 44 1376274 bpm; #P window setfont "Sans Serif" 12.; #P flonum 254 252 55 12 0 0 4 3 0 0 0 221 221 221 222 222 222 0 0 0; #P window setfont "Sans Serif" 9.; #P newex 254 182 115 196617 expr (60./$f1)*44100.; #P newex 84 143 29 196617 / 1.; #P comment 130 91 86 196617 divide file by 2 to go into cut time. Default is 1.; #P comment 244 142 100 196617 sampling rate here assumed again to be 44100...; #P hidden connect 25 3 33 0; #P connect 21 0 15 0; #P hidden connect 27 0 2 0; #P connect 15 0 2 0; #P hidden connect 33 0 2 0; #P connect 2 0 7 0; #P connect 7 0 11 0; #P connect 16 0 11 0; #P connect 11 0 14 0; #P hidden connect 17 0 25 0; #P hidden connect 25 0 19 0; #P hidden connect 19 0 21 0; #P connect 15 1 2 1; #P connect 13 0 16 0; #P hidden connect 18 0 13 0; #P connect 16 1 11 1; #P hidden connect 25 1 18 0; #P hidden connect 25 2 24 0; #P hidden connect 24 0 26 0; #P connect 7 0 3 0; #P hidden connect 23 0 3 0; #P connect 3 0 9 0; #P hidden connect 20 0 9 0; #P connect 9 0 4 0; #P connect 4 0 31 0; #P connect 32 0 30 0; #P connect 30 0 28 0; #P hidden connect 20 1 9 1; #P connect 29 0 8 0; #P hidden connect 8 0 20 0; #P hidden connect 22 0 23 0; #P pop; #P newobj 395 217 43 196617 p tempo; #P message 197 654 65 196617 startwindow; #P newex 180 445 84 196617 buffer~ steps 12; #P newex 266 439 198 196617 wave~ steps 0. 11.61; #P message 630 193 115 196617 replace jongly.aif; #P message 681 227 41 196617 replace; #N vpatcher 191 289 536 563; #P origin 0 11; #P window setfont "Sans Serif" 9.; #P newex 27 105 61 196617 r loadbang2; #P newex 163 232 55 196617 s totaltime; #P newex 246 232 65 196617 s totalsamps; #N comlet looplength in samples; #P outlet 227 232 15 0; #P newex 173 208 64 196617 mstosamps~; #N comlet looplength in ms; #P outlet 144 232 15 0; #P newex 82 171 27 196617 f; #P comment 46 191 91 196617 use f if sample has loop markers.; #P inlet 14 21 15 0; #P newex 10 131 178 196617 info~ buf; #B color 5; #P newex 14 65 68 196617 buffer~ buf; #B color 5; #P fasten 0 1 1 0 77 96 15 96; #P connect 10 0 1 0; #P connect 2 0 0 0; #P connect 1 3 4 0; #P connect 1 6 5 0; #P connect 1 6 9 0; #P connect 1 6 6 0; #P connect 6 1 7 0; #P connect 6 1 8 0; #P pop; #P newobj 672 247 41 196617 p sound; #P message 681 227 41 196617 replace; #P newex 266 680 39 196617 *~ 0.3; #P hidden message 512 735 14 196617 1; #P comment 352 738 32 196617 Poll; #P user radiogroup 337 736 18 16; #X size 1; #X offset 16; #X inactive 0; #X itemtype 1; #X flagmode 0; #X set 1; #X done; #P comment 189 738 75 196617 CPU Utilization; #P hidden newex 527 734 45 196617 loadbang; #P hidden newex 453 735 55 196617 metro 250; #P flonum 266 736 48 9 0 0 160 3 0 0 0 221 221 221 222 222 222 0 0 0; #P hidden newex 385 735 64 196617 adstatus cpu; #P comment 314 738 23 196617 % !; #P hidden newex 221 110 52 196617 s exprInit; #P hidden newex 164 88 67 196617 t b b; #P user hslider 537 490 10 109 16 1 0 6; #P hidden newex 415 422 33 196617 * 16.; #P hidden message 361 396 14 196617 0; #P hidden button 361 376 15 0; #P user gain~ 266 598 48 56 158 0 1.071519 7.94321 10.; #P hidden newex 347 422 68 196617 snapshot~ 20; #P newex 266 395 92 196617 phasor~ 0.350651; #B color 13; #P user uslider 662 401 13 73 16 1 0 13; #P user multiSlider 537 407 125 82 0. 16. 16 2921 15 0 0 2 0 0 1; #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 673 516 83 196617 numeric display of slider position; #P window linecount 1; #P comment 674 484 22 196617 - 0; #P comment 518 484 22 196617 0 -; #P window linecount 5; #P comment 537 563 161 196617 the loop is sliced up into 16 steps. Each step can be reassigned to any slice. A zero means the slice continues and plays through from the previous step.; #P window setfont Helvetica 12.; #P window linecount 1; #P comment 153 190 224 1376268 this version based on wave~ and peek~; #P window setfont Helvetica 18.; #P comment 152 168 204 1376274 Atau's Relooper Redux; #P window setfont "Sans Serif" 9.; #P window linecount 3; #P comment 274 294 103 196617 just click the presets or mess with the Multislider; #P window linecount 1; #P hidden message 172 280 14 196617 1; #P hidden newex 172 259 54 196617 r loadbang; #N vpreset 35; #P preset 172 297 96 46; #P message 234 685 28 196617 open; #P hidden newex 164 67 45 196617 loadbang; #P hidden newex 164 110 54 196617 s loadbang; #P comment 518 476 22 196617 1 -; #P window linecount 2; #P message 537 379 101 196617 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16; #P window linecount 1; #P hidden message 642 359 56 196617 cont_data; #P hidden newex 642 339 54 196617 r loadbang; #P hidden newex 698 490 256 196617 unpack 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16; #P number 533 513 18 9 0 16 35 3 0 0 0 221 221 221 222 222 222 0 0 0; #P number 541 529 18 9 0 16 35 3 0 0 0 221 221 221 222 222 222 0 0 0; #P number 549 513 18 9 0 16 35 3 0 0 0 221 221 221 222 222 222 0 0 0; #P number 557 529 18 9 0 16 35 3 0 0 0 221 221 221 222 222 222 0 0 0; #P number 565 513 18 9 0 16 35 3 0 0 0 221 221 221 222 222 222 0 0 0; #P number 573 529 18 9 0 16 35 3 0 0 0 221 221 221 222 222 222 0 0 0; #P number 581 513 18 9 0 16 35 3 0 0 0 221 221 221 222 222 222 0 0 0; #P number 589 529 18 9 0 16 35 3 0 0 0 221 221 221 222 222 222 0 0 0; #P number 653 529 18 9 0 16 35 3 0 0 0 221 221 221 222 222 222 0 0 0; #P number 645 513 18 9 0 16 35 3 0 0 0 221 221 221 222 222 222 0 0 0; #P number 637 529 18 9 0 16 35 3 0 0 0 221 221 221 222 222 222 0 0 0; #P number 629 513 18 9 0 16 35 3 0 0 0 221 221 221 222 222 222 0 0 0; #P number 621 529 18 9 0 16 35 3 0 0 0 221 221 221 222 222 222 0 0 0; #P number 613 513 18 9 0 16 35 3 0 0 0 221 221 221 222 222 222 0 0 0; #P number 605 529 18 9 0 16 35 3 0 0 0 221 221 221 222 222 222 0 0 0; #P number 597 513 18 9 0 16 35 3 0 0 0 221 221 221 222 222 222 0 0 0; #P comment 518 466 22 196617 3 -; #P comment 518 447 22 196617 7 -; #P comment 518 457 22 196617 5 -; #P comment 512 418 28 196617 13 -; #P comment 512 408 28 196617 15 -; #P comment 512 427 28 196617 11 -; #P comment 518 437 22 196617 9 -; #P comment 674 437 22 196617 - 9; #P comment 674 427 28 196617 - 11; #P comment 674 408 28 196617 - 15; #P comment 674 418 28 196617 - 13; #P comment 674 457 22 196617 - 5; #P comment 674 447 22 196617 - 7; #P comment 674 466 22 196617 - 3; #P comment 674 476 22 196617 - 1; #P comment 598 501 14 196617 9; #P comment 611 501 20 196617 11; #P comment 567 501 14 196617 5; #P comment 582 501 14 196617 7; #P comment 552 501 14 196617 3; #P comment 537 501 14 196617 1; #P comment 625 501 20 196617 13; #P comment 641 501 20 196617 15; #P user ezdac~ 266 701 310 734 0; #P comment 641 378 78 196617 reset to normal; #P comment 537 547 83 196617 basic idea:; #P hidden comment 235 88 466 196617 exprInit provides default values for expr \, thus avoiding "expr: divide by zero" error messages.; #P comment 343 708 65 196617 ¥ start audio; #P hidden comment 273 466 74 196617 to time display; #P comment 680 213 92 196617 ¥ load a new sound; #P comment 733 287 60 196617 msec/loop; #P comment 179 549 90 196617 pitch compensator; #P comment 481 252 36 196617 = orig; #P window linecount 2; #P comment 524 236 49 196617 Rhythm modes; #P window setfont "American Typewriter" 18.; #P window linecount 1; #P comment 11 30 331 199491602 Performance Template 5: Rhythm; #P window setfont "Sans Serif" 9.; #P comment 11 62 100 196617 v0.2 RH 2006-7; #P comment 12 82 100 196617 under construction; #P window linecount 2; #P comment 12 98 100 196617 see BBCut task/project; #P comment 11 131 100 196617 This patch from the Max/MSP Examples; #P comment 11 162 100 196617 Of course \, also see BBCut in SC; #P comment 11 193 100 196617 Also see Karlheinz Essl's RTC Library; #P hidden connect 63 0 84 0; #P hidden connect 84 0 62 0; #P hidden connect 84 0 120 0; #P hidden connect 66 0 67 0; #P hidden connect 67 0 65 0; #P hidden connect 151 0 152 0; #P hidden connect 122 0 102 0; #P hidden connect 130 0 131 0; #P hidden connect 122 0 123 0; #P hidden connect 77 0 130 0; #P hidden connect 84 1 85 0; #P hidden connect 120 0 121 0; #P hidden connect 65 2 137 0; #P hidden connect 134 1 137 0; #P hidden connect 152 0 137 0; #P hidden connect 128 0 77 0; #P connect 77 0 125 0; #P connect 125 0 100 0; #P connect 100 0 113 0; #P connect 113 0 112 0; #P connect 112 0 134 0; #P hidden connect 123 0 79 0; #P connect 134 0 79 0; #P connect 79 0 95 0; #P connect 95 0 17 0; #P connect 102 0 17 0; #P connect 64 0 17 0; #P hidden connect 87 0 88 0; #P hidden fasten 128 1 125 1 550 410 293 410; #P hidden connect 84 0 124 0; #P connect 95 0 17 1; #P hidden connect 137 0 134 1; #P hidden fasten 128 2 126 0 579 484 324 484; #P connect 126 0 113 1; #P hidden connect 94 0 92 0; #P hidden connect 125 0 78 0; #P hidden connect 100 0 110 0; #P hidden connect 81 0 77 1; #P hidden connect 65 2 136 0; #P connect 135 0 136 0; #P connect 136 0 134 2; #P connect 134 2 138 0; #P hidden connect 80 0 81 0; #P hidden connect 89 0 87 0; #P hidden connect 97 1 103 0; #P connect 103 0 104 0; #P hidden connect 132 1 104 0; #P connect 104 0 132 0; #P hidden connect 78 0 82 0; #P hidden connect 110 0 111 0; #P hidden connect 148 0 132 1; #P connect 75 0 117 0; #P hidden connect 108 0 109 0; #P hidden connect 65 2 148 0; #P hidden connect 109 0 148 0; #P connect 148 0 103 1; #P fasten 142 0 132 2 465 309 444 309; #P hidden connect 92 0 89 0; #P hidden connect 132 2 142 0; #P hidden connect 144 0 142 0; #P hidden connect 147 0 142 0; #P hidden connect 157 0 117 1; #P hidden connect 90 0 94 0; #P hidden connect 65 2 127 0; #P connect 127 0 128 0; #P hidden connect 157 1 158 0; #P connect 158 0 157 0; #P hidden connect 57 0 56 0; #P hidden connect 58 0 60 0; #P hidden connect 59 0 75 0; #P hidden connect 60 0 75 0; #P hidden connect 82 0 83 0; #P hidden connect 57 1 55 0; #P hidden connect 57 2 54 0; #P hidden connect 57 3 53 0; #P hidden connect 57 4 52 0; #P hidden connect 57 5 51 0; #P hidden connect 57 6 50 0; #P hidden connect 57 7 49 0; #P hidden connect 57 8 41 0; #P fasten 160 0 157 1 572 351 604 351; #P hidden connect 145 0 144 0; #P hidden connect 143 0 144 0; #P hidden connect 57 9 42 0; #P hidden connect 57 10 43 0; #P hidden connect 57 11 44 0; #P hidden connect 57 12 45 0; #P hidden connect 124 0 99 0; #P hidden connect 57 13 46 0; #P hidden connect 97 1 145 0; #P hidden connect 58 0 59 0; #P hidden connect 57 14 47 0; #P hidden connect 57 15 48 0; #P hidden connect 111 0 76 0; #P connect 97 1 114 0; #P connect 98 0 97 0; #P fasten 99 0 97 0 635 230 677 230; #P connect 97 0 106 0; #P hidden connect 132 0 106 0; #P hidden connect 75 0 57 0; #P fasten 168 0 166 0 891 736 914 736; #P connect 167 0 166 0; #P connect 165 0 166 0; #P fasten 165 1 166 1 957 728 967 728; #P pop;