max v2; harmonic wavetable generator - part of the set of Percolate externals... Give it a list of harmonic partial amplitudes and it will put out index/amplitude pairs that you can peek~ into a buffer~ to use with wave~; #N vpatcher 332 86 1526 597; #P window setfont "Sans Serif" 9.; #P window linecount 1; #P newex 637 55 31 196617 gen9; #P number 875 52 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P toggle 826 51 15 0; #P newex 833 150 51 196617 pack 0 0.; #P newex 880 107 52 196617 random 8; #P newex 807 181 105 196617 route 1 2 3 4 5 6 7; #P newex 775 130 40 196617 / 100.; #P newex 826 77 52 196617 metro 10; #P newex 775 107 64 196617 random 100; #P button 745 269 15 0; #P newex 744 357 55 196617 print pack; #P button 926 352 15 0; #P number 944 309 35 9 0 127 3 3 0 0 0 221 221 221 222 222 222 0 0 0; #P message 944 329 101 196617 set 176 \\\, 71 \\\, \$1; #P message 944 375 72 196617 176 \, 71 \, 0; #P flonum 982 235 35 9 0. 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0; #P flonum 941 235 35 9 0. 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0; #P flonum 900 235 35 9 0. 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0; #P flonum 860 235 35 9 0. 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0; #P flonum 816 235 35 9 0. 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0; #P flonum 772 235 35 9 0. 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0; #P flonum 729 235 35 9 0. 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 737 317 114 196617 pack 0. 0. 0. 0. 0. 0. 0.; #P user fpic 338 336 140 87 percolate.jpg 0 0 0 0. 0 0 0; #P newex 277 303 45 196617 *~ 0.99; #P window setfont "Sans Serif" 14.; #P comment 11 11 51 196622 gen10; #P window setfont "Sans Serif" 9.; #P message 224 356 27 196617 stop; #P message 210 338 65 196617 startwindow; #P newex 504 55 45 196617 loadbang; #P toggle 277 102 15 0; #P newex 277 127 80 196617 tempo 120 1 16; #P newex 277 190 29 196617 mtof; #P newex 277 242 44 196617 phasor~; #N coll ; #T flags 1 0; #T 0 60; #T 1 63; #T 2 67; #T 3 65; #T 4 58; #T 5 56; #T 6 48; #T 7 46; #T 8 55; #T 9 60; #T 10 68; #T 11 67; #T 12 63; #T 13 65; #T 14 58; #T 15 67; #P newobj 277 161 40 196617 coll; #P newex 12 107 27 196617 t b l; #P newex 424 241 35 196617 s timb; #P newex 12 86 35 196617 r timb; #P message 424 83 165 196617 1. 0.5 0.25 0.125 0.06 0.03 0.015; #P message 424 104 131 196617 1. 0.9 0.8 0.7 0.6 0.5 0.4; #P message 424 125 107 196617 0. 1. 0. 0.5 0. 0.25 0.; #P message 424 147 125 196617 1. 0. 0.5 0. 0.25 0. 0.125; #P message 424 169 131 196617 1. 0.7 0.7 0.7 0.7 0.7 0.7; #P message 424 191 131 196617 1. 0.5 0.9 0.4 0.8 0.3 0.7; #P message 423 214 179 196617 1. 0.1 0.5 0.333 0.25 0.666 0.0125; #P message 233 252 39 196617 set foo; #P newex 277 411 29 196617 dac~; #P user gain~ 277 336 25 35 158 0 1.071519 7.94321 10.; #P newex 277 276 125 196617 wave~ foo 0. 185.759644; #P newex 29 151 51 196617 peek~ foo; #P newex 423 55 80 196617 buffer~ foo 186; #P newex 29 128 71 196617 gen10 8192 0; #B color 12; #P window linecount 4; #P comment 21 254 190 196617 ¥ gen10 -- give it a list of harmonic partial amplitudes and it will put out index/amplitude pairs that you can peek~ into a buffer~ to use with wave~.; #P comment 480 337 100 196617 ¥ by r. luke dubois \, computer music center \, columbia university...; #P window linecount 1; #P comment 11 32 142 196617 harmonic wavetable generator; #P window linecount 9; #P comment 103 128 140 196617 arguments are buffer size (default 512) and offset into output buffer (default 0). you can change these with size N and offset N. the rescale N message turns on and off array rescaling. by default \, the array is rescaled to fit between -1 and 1.; #P window linecount 4; #P comment 320 56 100 196617 ¥ list of amplitudes of successive harmonics (begins with fundamental); #P window linecount 2; #P comment 210 320 62 196617 ¥ start audio; #P window linecount 1; #P comment 195 102 80 196617 ¥ start sequence; #P window linecount 2; #P comment 21 308 176 196617 ported from real-time cmix \, by brad garton and dave topper.; #P connect 22 0 24 0; #P connect 24 1 8 0; #P connect 8 0 10 0; #P fasten 24 0 14 0 17 245 238 245; #P connect 29 0 28 0; #P connect 28 0 25 0; #P connect 25 0 27 0; #P connect 27 0 26 0; #P connect 26 0 11 0; #P fasten 14 0 11 0 238 271 282 271; #P connect 11 0 34 0; #P connect 34 0 12 0; #P fasten 32 0 13 0 229 405 282 405; #P fasten 31 0 13 0 215 405 282 405; #P connect 12 0 13 0; #P connect 12 0 13 1; #P hidden connect 30 0 21 0; #P connect 36 0 23 0; #P hidden connect 21 0 23 0; #P hidden connect 20 0 23 0; #P hidden connect 19 0 23 0; #P hidden connect 18 0 23 0; #P hidden connect 17 0 23 0; #P hidden connect 16 0 23 0; #P hidden connect 15 0 23 0; #P connect 53 0 37 0; #P connect 37 0 36 0; #P connect 49 0 36 0; #P connect 43 0 49 0; #P connect 42 0 49 0; #P connect 40 0 49 0; #P connect 39 0 49 0; #P connect 38 0 49 0; #P connect 41 0 49 0; #P connect 38 0 36 1; #P connect 39 0 36 2; #P connect 53 1 38 0; #P connect 51 0 50 0; #P connect 50 0 52 0; #P connect 40 0 36 3; #P connect 41 0 36 4; #P connect 55 0 53 0; #P connect 53 2 39 0; #P connect 42 0 36 5; #P connect 56 0 51 0; #P connect 54 0 55 0; #P connect 43 0 36 6; #P connect 53 3 40 0; #P connect 57 0 51 1; #P connect 52 0 55 1; #P connect 51 0 54 0; #P connect 53 4 41 0; #P connect 45 0 47 0; #P connect 53 5 42 0; #P connect 46 0 45 0; #P connect 47 0 44 0; #P connect 45 0 44 0; #P connect 53 6 43 0; #P pop;