Forums > MaxMSP

Can this patch be used with wave~?

February 16, 2008 | 9:27 pm



kjg
February 16, 2008 | 11:38 pm

playback position times file length goes out, divide loop size by file length comes in. that’s about it.

regards,
kjg

#P origin 0 21;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 768 208 27 196617 / 1.;
#B color 14;
#P button 328 68 15 0;
#P comment 563 154 100 196617 playbackposition;
#P newex 768 239 29 196617 sig~;
#P newex 768 322 35 196617 sah~;
#P user multiSlider 509 169 197 21 0. 1. 1 2680 47 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 206 206 206;
#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 flonum 623 129 58 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 793 291 39 196617 < ~ 0.5;
#P flonum 635 252 56 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 671 322 35 196617 sah~;
#P newex 635 285 29 196617 sig~;
#P newex 671 372 79 196617 +~;
#P newex 852 200 49 196617 !/ 1000.;
#P flonum 768 167 54 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 852 224 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 852 244 46 196617 phasor~;
#P toggle 690 485 15 0;
#P newex 723 518 31 196617 dac~;
#P newex 723 473 33 196617 *~;
#P newex 740 349 38 196617 *~ 10;
#P newex 852 413 100 196617 trapezoid~ 0.01 0.9;
#P newex 723 418 51 196617 wave~ pi;
#P comment 829 169 100 196617 loop size;
#P comment 125 154 100 196617 playbackposition;
#P newex 330 239 29 196617 sig~;
#P newex 330 322 35 196617 sah~;
#P newex 166 215 29 196617 * 1.;
#B color 14;
#P user multiSlider 71 169 197 21 0. 1. 1 2680 47 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 206 206 206;
#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 flonum 185 129 58 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 347 93 105 196617 info~ pi;
#P newex 355 291 39 196617 < ~ 0.5;
#P flonum 197 252 56 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 233 322 35 196617 sah~;
#P newex 197 285 29 196617 sig~;
#P newex 233 372 79 196617 +~;
#P newex 414 200 49 196617 !/ 1000.;
#P flonum 330 167 54 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 414 224 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 414 244 46 196617 phasor~;
#P newex 618 67 66 196617 loadmess 77;
#P toggle 252 485 15 0;
#P newex 285 518 31 196617 dac~;
#P newex 285 473 33 196617 *~;
#P newex 302 349 38 196617 *~ 10;
#P newex 414 413 100 196617 trapezoid~ 0.01 0.9;
#P message 363 48 43 196617 replace;
#P newex 363 67 82 196617 buffer~ pi 1000;
#P newex 285 418 46 196617 play~ pi;
#P comment 391 169 100 196617 loop size;
#P window linecount 3;
#P comment 181 406 100 196617 How would this idea work with the wave~ object?;
#P connect 22 0 23 0;
#P connect 20 6 21 0;
#P connect 21 0 23 1;
#P fasten 23 0 18 0 171 241 202 241;
#P connect 18 0 16 0;
#P connect 16 0 17 0;
#P connect 17 0 15 0;
#P connect 19 0 17 1;
#P fasten 15 0 2 0 238 399 290 399;
#P connect 2 0 7 0;
#P fasten 9 0 8 0 257 505 290 505;
#P fasten 11 0 6 0 419 280 307 280;
#P connect 6 0 15 1;
#P fasten 5 0 7 1 419 463 313 463;
#P connect 10 0 13 0;
#P connect 13 0 25 0;
#P connect 25 0 24 0;
#P connect 24 0 6 1;
#P connect 48 0 20 0;
#P connect 3 1 20 0;
#P connect 11 0 19 0;
#P connect 19 0 24 1;
#P connect 4 0 3 0;
#P connect 13 0 14 0;
#P connect 14 0 12 0;
#P connect 12 0 11 0;
#P connect 11 0 5 0;
#P connect 20 6 43 0;
#P connect 44 0 41 0;
#P connect 41 0 39 0;
#P connect 39 0 40 0;
#P connect 40 0 38 0;
#P connect 42 0 40 1;
#P fasten 38 0 28 0 676 399 728 399;
#P connect 28 0 31 0;
#P connect 31 0 32 0;
#P fasten 33 0 32 0 695 505 728 505;
#P fasten 34 0 30 0 857 280 745 280;
#P connect 30 0 38 1;
#P fasten 31 0 32 1 728 502 749 502;
#P fasten 29 0 31 1 857 463 751 463;
#P connect 10 0 36 0;
#P connect 36 0 49 0;
#P connect 49 0 46 0;
#P connect 46 0 45 0;
#P connect 45 0 30 1;
#P connect 43 0 49 1;
#P connect 34 0 42 0;
#P connect 42 0 45 1;
#P connect 36 0 37 0;
#P connect 37 0 35 0;
#P connect 35 0 34 0;
#P connect 34 0 29 0;


February 17, 2008 | 2:12 am

Thanks for the help kjg.

I’m currently trying to implement it in my patch but it doesn’t seem to work with the setup I want to have.

Can anyone tell me where I’ve gone wrong and how I can keep this setup but still include the new sah~ elements?

max v2;
#N vpatcher 206 44 942 492;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 87 130 66 196617 mstosamps~;
#P newex 9 96 105 196617 info~ Drum1;
#P newex 168 263 32 196617 *~ 1;
#P comment 99 268 100 196617 no. of samples;
#P user scope~ 492 207 622 337 256 3 128 -1. 1. 0 0. 0 0. 102 255 51 135 135 135 0;
#P newex 12 229 48 196617 loadbang;
#P newex 12 375 51 196617 pack 0 0.;
#P newex 53 350 40 196617 / 511.;
#P newex 12 329 51 196617 t i f;
#P button 12 252 15 0;
#P newex 12 279 44 196617 uzi 512;
#N counter 0 511;
#X flags 0 0;
#P newobj 12 302 77 196617 counter 0 511;
#P newex 12 398 76 196617 peek~ Phasor1;
#P user ezdac~ 168 342 212 375 0;
#P flonum 360 99 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 9 47 89 196617 replace jongly.aif;
#P comment 301 239 187 196617 11.61ms = 512 samples for lookup table;
#P newex 6 180 114 196617 buffer~ Phasor1 11.61;
#P newex 9 73 77 196617 buffer~ Drum1;
#P newex 168 191 31 196617 sah~;
#P newex 168 213 52 196617 +~;
#P newex 268 288 139 196617 trapezoid~ 0.01 0.9;
#P newex 238 154 42 196617 sah~;
#P newex 270 129 39 196617 < ~ 0.5;
#P newex 210 190 38 196617 *~ 10;
#P newex 238 98 34 196617 /~ 1.;
#P newex 360 118 29 196617 sig~;
#P newex 335 161 37 196617 %~ 1.;
#P newex 335 141 35 196617 *~ 4.;
#P newex 168 311 110 196617 *~;
#P flonum 168 54 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 168 286 73 196617 index~ Drum1;
#P newex 168 237 134 196617 wave~ Phasor1 0. 0. 11.61;
#P newex 168 98 64 196617 phasor~ 0.2;
#P window linecount 3;
#P comment 408 100 100 196617 Loops size as division of main phasor;
#P connect 19 0 16 0;
#P connect 16 1 33 0;
#P connect 29 0 25 0;
#P connect 25 0 24 0;
#P connect 24 0 23 0;
#P connect 23 0 26 0;
#P connect 26 0 28 0;
#P connect 28 0 22 0;
#P connect 26 1 27 0;
#P connect 27 0 28 1;
#P connect 33 6 34 0;
#P connect 4 0 1 0;
#P connect 1 0 15 0;
#P connect 15 0 14 0;
#P connect 14 0 2 0;
#P connect 2 0 32 0;
#P connect 32 0 3 0;
#P connect 3 0 5 0;
#P connect 5 0 21 0;
#P fasten 11 0 15 1 275 150 194 150;
#P fasten 34 1 32 1 148 259 195 259;
#P connect 5 0 21 1;
#P fasten 7 0 10 0 340 183 215 183;
#P connect 10 0 14 1;
#P fasten 7 0 9 0 340 195 405 195 405 75 243 75;
#P connect 9 0 12 0;
#P connect 12 0 10 1;
#P fasten 7 0 13 0 340 277 273 277;
#P connect 13 0 5 1;
#P fasten 7 0 11 0 340 187 400 187 400 93 275 93;
#P connect 11 0 12 1;
#P fasten 1 0 6 0 173 122 340 122;
#P connect 6 0 7 0;
#P connect 20 0 8 0;
#P connect 8 0 6 1;
#P connect 7 0 30 0;
#P pop;

Thanks again,

Rhys



kjg
February 17, 2008 | 4:13 am

I’d be happy to look at it but it would help if you define your goal _and_ the problem you’re having with your current patch.

Regards,
kjg


February 17, 2008 | 10:35 am

Thanks dude.

I’m trying to use volker’s method of sampling and holding with the trapezoid envelope to create "clickless" loops. In this case using that method with this current setup only results in a weird output.

I’m after the same output as the previous patches using a the phasor~ => wave~ => index~ method.

Using this method I can then write weird and wonderful waveforms to the buffer~ Phasor1 using peek~ and use the sah~ method to have loops complete with a no click envelope but with a twist.

Looking forward to hearing your thoughts on the matter,

Rhys


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