chris@164: #N canvas 436 490 738 494 10; chris@163: #X obj 135 167 loadbang; chris@163: #X msg 135 212 1; chris@163: #X obj 183 234 / 44.1; chris@163: #X obj 135 253 metro; chris@163: #X obj 135 286 f; chris@163: #X obj 160 286 + 64; chris@163: #X obj 160 308 % 65536, f 8; chris@163: #X msg 160 329 start \$1; chris@163: #X obj 160 351 tabwrite~ circbuf; chris@163: #X obj 363 303 - 32768; chris@163: #X obj 363 325 + 65536; chris@163: #X obj 363 347 % 65536; chris@163: #X obj 342 371 +~ 0; chris@163: #X msg 381 236 0; chris@163: #X obj 342 258 phasor~; chris@163: #X obj 342 392 tabread4~ circbuf; chris@163: #X obj 341 415 dac~; chris@163: #N canvas 422 781 312 126 buf 0; chris@163: #N canvas 0 22 450 278 (subpatch) 0; chris@163: #X array circbuf 65536 float 2; chris@163: #X coords 0 1 65535 -1 256 64 1 0 0; chris@163: #X restore 23 28 graph; chris@163: #X restore 129 441 pd buf; chris@163: #X obj 32 101 osc~ 440; chris@163: #X obj 342 213 samplerate~; chris@163: #X obj 134 189 t b b b b; chris@163: #X text 30 82 audio input; chris@163: #X text 219 310 write pointer; chris@163: #X text 412 349 read pointer; chris@163: #X obj 342 282 *~ 16; chris@163: #X obj 342 236 / 16; chris@163: #X obj 183 214 f 16; chris@163: #X obj 363 189 r \$0-blocksize; chris@163: #X obj 204 186 r \$0-blocksize; chris@163: #X obj 394 259 r \$0-blocksize; chris@163: #X obj 390 123 s \$0-blocksize; chris@163: #X text 34 13 VIRTUAL CIRCULAR BUFFER; chris@163: #X text 34 23 =======================; chris@164: #X obj 390 55 loadbang; chris@164: #X msg 390 77 16; chris@164: #X text 517 454 ---------------------------------; chris@164: #X text 517 444 @krighxz / BELA / heavy / 12/2015; chris@164: #X text 541 463 beaglert.cc / enzienaudio.com; chris@164: #X text 426 78 << replace with target blocksize; chris@164: #X text 446 90 BELA default: 16; chris@164: #X text 446 102 PD default: 64; chris@163: #X connect 0 0 20 0; chris@163: #X connect 1 0 3 0; chris@163: #X connect 2 0 3 1; chris@163: #X connect 3 0 4 0; chris@163: #X connect 4 0 5 0; chris@163: #X connect 5 0 6 0; chris@163: #X connect 5 0 9 0; chris@163: #X connect 6 0 7 0; chris@163: #X connect 6 0 4 1; chris@163: #X connect 7 0 8 0; chris@163: #X connect 9 0 10 0; chris@163: #X connect 10 0 11 0; chris@163: #X connect 11 0 12 1; chris@163: #X connect 12 0 15 0; chris@163: #X connect 13 0 14 1; chris@163: #X connect 14 0 24 0; chris@163: #X connect 15 0 16 0; chris@163: #X connect 15 0 16 1; chris@163: #X connect 18 0 8 0; chris@163: #X connect 19 0 25 0; chris@163: #X connect 20 0 1 0; chris@163: #X connect 20 1 26 0; chris@163: #X connect 20 2 13 0; chris@163: #X connect 20 3 19 0; chris@163: #X connect 24 0 12 0; chris@163: #X connect 25 0 14 0; chris@163: #X connect 26 0 2 0; chris@163: #X connect 27 0 25 1; chris@163: #X connect 28 0 26 1; chris@163: #X connect 29 0 24 1; chris@164: #X connect 33 0 34 0; chris@164: #X connect 34 0 30 0;