max v2; #N vpatcher 594 115 971 533; #N comlet slave frequency (signal); #P hidden inlet 136 290 15 0; #P window setfont "Sans Serif" 9.; #P comment 7 151 58 9109513 slave frequency on/off; #P toggle 40 141 20 0; #N comlet phasor output; #P outlet 162 363 15 0; #N comlet pitch output; #P outlet 201 364 15 0; #N comlet main output; #P outlet 123 363 15 0; #P hidden newex 278 72 28 9109513 ftom; #P number 233 92 35 9 0 0 256 139 0 0 0 221 221 221 222 222 222 0 0 0; #P flonum 233 72 39 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0; #P hidden message 235 52 23 9109513 250; #P comment 180 51 58 9109513 Freq (fine); #P user uslider 181 72 49 129 500 1 0 0; #P hidden newex 235 29 44 9109513 loadbang; #P hidden message 235 132 14 9109513 2; #P toggle 93 264 25 0; #N vpatcher 148 86 746 650; #P window setfont "Sans Serif" 9.; #P newex 11 404 27 9109513 + 1; #P message 168 379 14 9109513 1; #P newex 168 357 44 9109513 loadbang; #N comlet slave frequcny? (1 is slave \, 0 is normal); #P inlet 11 384 15 0; #P newex 215 424 53 9109513 selector~ 2; #N comlet explicit frequency input (signal); #P inlet 35 384 15 0; #N comlet phasor output; #P outlet 131 518 15 0; #N comlet pitch out; #P outlet 310 512 15 0; #P newex 45 254 34 9109513 *~ 136; #N comlet sah wave output; #P outlet 76 520 15 0; #P newex 311 393 27 9109513 +~; #P comment 129 266 152 9109513 this argument sets the maximum FM allowed to 20*the current pitch. may want to tweak; #P newex 73 297 34 9109513 *~ 100; #P newex 448 283 49 9109513 pvar pitch; #P newex 475 126 52 9109513 pvar range; #P newex 97 268 29 9109513 *~ 20; #P newex 329 351 32 9109513 mtof~; #P newex 164 177 27 9109513 + 1; #P newex 329 329 27 9109513 +~; #P newex 346 304 27 9109513 line~; #P newex 346 282 54 9109513 append 100; #P newex 432 197 27 9109513 t b f; #P newex 446 169 114 9109513 if $i1==1 then 68 else 136; #P newex 432 149 128 9109513 if $i1==0 then 0 else out2 $i1; #P newex 373 228 27 9109513 - 0.; #N comlet note center (freq); #P outlet 422 283 15 0; #P newex 396 119 27 9109513 t b f; #P newex 373 150 27 9109513 + 0.; #P newex 396 97 84 9109513 expr $f1*136/5000.; #P newex 373 53 82 9109513 expr $f1*136/500.; #P newex 373 253 28 9109513 mtof; #P newex 131 457 40 9109513 phasor~; #P newex 76 485 28 9109513 sah~; #P newex 76 385 34 9109513 noise~; #P message 25 182 14 9109513 1; #P newex 25 160 44 9109513 loadbang; #P newex 45 220 38 9109513 gate~ 2; #P newex 123 125 27 9109513 t b f; #P newex 89 156 27 9109513 * 1.; #P newex 142 72 27 9109513 t b f; #P newex 89 103 27 9109513 * 1.; #P newex 142 50 108 9109513 if $i1==1 then 0.1 else 1; #P newex 123 103 103 9109513 if $i1==1 then -1 else 1; #N comlet range button; #P inlet 432 125 15 0; #N comlet fine control slider; #P inlet 396 75 15 0; #N comlet speed slider; #P inlet 373 34 15 0; #P newex 89 58 31 9109513 / 500.; #P newex 72 179 27 9109513 *~ 1; #N comlet log/lin FM; #P inlet 164 156 15 0; #N comlet CV decimate; #P inlet 142 32 15 0; #N comlet CV invert; #P inlet 123 32 15 0; #N comlet CV amount slider; #P inlet 89 32 15 0; #N comlet CV in (sig); #P inlet 72 32 15 0; #P comment 86 213 61 9109513 send before mtof~ (1) or after (2); #P comment 251 197 97 9109513 range 0=fast \, 1=med \, 2=slow; #P connect 51 0 54 0; #P connect 19 0 20 0; #P fasten 37 0 18 0 169 204 50 204; #P connect 20 0 18 0; #P connect 18 0 46 0; #P connect 2 0 7 0; #P connect 7 0 18 1; #P connect 18 1 42 0; #P connect 21 0 22 0; #P connect 22 0 45 0; #P connect 3 0 8 0; #P connect 8 0 14 0; #P fasten 15 0 14 0 147 96 94 96; #P connect 14 0 16 0; #P fasten 17 0 16 0 128 149 94 149; #P connect 16 0 7 1; #P fasten 23 0 22 1 99 476; #P fasten 38 0 39 0 334 378 320 378 320 261 102 261; #P connect 39 0 42 1; #P fasten 15 1 14 1 164 99 111 99; #P fasten 17 1 16 1 145 152 111 152; #P connect 4 0 12 0; #P connect 12 0 17 0; #P fasten 50 0 23 0 220 450 136 450; #P connect 23 0 48 0; #P connect 5 0 13 0; #P connect 13 0 15 0; #P connect 6 0 37 0; #P connect 52 0 53 0; #P connect 53 0 50 0; #P connect 54 0 50 0; #P fasten 44 0 50 1 316 415 241 415; #P fasten 49 0 50 2 40 408 262 408; #P connect 44 0 47 0; #P fasten 42 0 44 0 78 333 303 333 303 386 316 386; #P connect 38 0 44 1; #P fasten 46 0 36 0 50 322 334 322; #P connect 36 0 38 0; #P fasten 30 0 34 0 378 250 351 250; #P connect 34 0 35 0; #P connect 35 0 36 1; #P connect 9 0 25 0; #P fasten 28 0 27 0 401 143 378 143; #P connect 25 0 27 0; #P fasten 33 0 30 0 437 220 378 220; #P connect 27 0 30 0; #P connect 30 0 24 0; #P fasten 28 1 27 1 418 146 395 146; #P fasten 33 1 30 1 454 224 395 224; #P connect 10 0 26 0; #P connect 26 0 28 0; #P fasten 24 0 29 0 378 277 427 277; #P connect 11 0 31 0; #P fasten 32 0 33 0 451 193 437 193; #P connect 31 0 33 0; #P connect 31 1 32 0; #P fasten 24 0 41 0 378 277 453 277; #P fasten 11 0 40 0 437 144 467 144 467 121 480 121; #P pop 1; #P newobj 123 329 128 9109513 p dirty work; #P comment 121 269 58 9109513 log/lin FM; #P comment 4 270 58 9109513 CV decimate; #P toggle 69 264 25 0; #P comment 254 192 58 9109513 Slow; #P comment 254 176 58 9109513 Medium; #P comment 254 160 58 9109513 Fast; #P user radiogroup 235 160 77 48; #X size 3; #X offset 16; #X inactive 0; #X itemtype 0; #X flagmode 0; #X set 2; #X done; #P comment 131 51 38 9109513 Freq; #P comment 4 241 58 9109513 CV invert; #P toggle 69 216 49 0; #P user uslider 125 72 49 129 500 1 0 0; #P user uslider 69 72 49 129 500 1 0 0; #N comlet speed CV; #P hidden inlet 149 290 15 0; #P comment 66 44 58 9109513 CV amount (FM); #P hidden fasten 27 0 14 0 45 325 128 325; #P connect 14 0 24 0; #P hidden fasten 20 0 3 0 141 69; #P hidden connect 29 0 14 1; #P hidden connect 1 0 14 2; #P hidden fasten 2 0 14 3 74 322 167 322; #P connect 14 1 26 0; #P hidden fasten 4 0 14 4 74 318 180 318; #P hidden connect 20 0 18 0; #P hidden fasten 11 0 14 5 74 314 193 314; #P hidden fasten 15 0 14 6 98 310 206 310; #P connect 14 2 25 0; #P hidden fasten 3 0 14 7 130 247 219 247; #P hidden fasten 18 0 14 8 186 243 232 243; #P hidden fasten 14 3 21 0 245 357 312 357 312 68 238 68; #P hidden connect 23 0 22 0; #P hidden connect 17 0 20 0; #P hidden connect 17 0 16 0; #P hidden connect 16 0 7 0; #P hidden connect 7 0 14 9; #P hidden fasten 14 3 23 0 245 357 312 357 312 68 283 68; #P pop;