#N canvas 184 29 564 759 10; #X obj -21 25 +~ 1; #X obj -21 244 expr~ $v1 % 2; #X obj 37 178 pow; #X msg 37 156 2 \$1; #X floatatom 37 115 5 0 23 0 - - -; #X obj -21 220 *~; #X obj 37 75 loadbang; #N canvas 0 0 450 300 (subpatch) 0; #X array bit_x 500 float 2; #X coords 0 1.1 500 -0.1 500 42 1; #X restore -23 330 graph; #X obj -22 295 tabwrite~ bit_x; #X obj 95 262 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X text 117 263 <-show bitsignal in array; #X text 100 173 if you want to check \, if the incoming signal is really 16bit (and not higher) \, test against '17'. the output should be only zeros then.; #X obj -23 429 +~ 1; #X obj -23 450 *~ 0.5; #X text -36 377 _________________________________________________; #X text 33 34 <- change range from '-1 - 1' to '0 - 1'; #X obj -22 487 *~ 32768; #X obj 153 551 >~ 0.5; #X obj -8 508 wrap~; #X obj -23 529 -~; #X text 45 504 <- convert to 15bit; #X obj -23 571 *~ 2; #X obj -22 595 +~; #X obj -22 618 /~ 65536; #X text 21 593 <- add your own 1bit stream to replace lsb; #X text 208 552 <- make sure \, that we send only 0 or 1; #N canvas 0 0 446 296 your_own_fancy_stuff 0; #X obj 48 244 outlet; #X text 15 55 read data from a picture or whatever you want to mark your audiosignal with.; #X restore 153 470 pd your_own_fancy_stuff; #X obj -23 653 *~ 2; #X obj -23 675 -~ 1; #X obj -23 408 adc~ 1; #X obj -24 714 dac~ 1; #X text 15 664 <- switch range back to '-1 to 1'; #X text 101 443 *** THIS PART IS UNTESTED ***; #X text 55 4 __________GET N-TH BIT FROM AUDIO STREAM________; #X text 47 407 ________REPLACE LSB IN A 16BIT AUDIO STREAM______; #X text 343 716 Author: Roman Haefeli; #X text 343 732 Version: 2007-11-16; #X obj -21 2 adc~ 1; #X text 79 115 <- choose bit to display (msb=0 \, lsb=15@16bit); #X obj -21 48 *~ 0.5; #X msg 37 96 15; #X obj 37 134 + 1; #X connect 0 0 39 0; #X connect 1 0 8 0; #X connect 2 0 5 1; #X connect 3 0 2 0; #X connect 4 0 41 0; #X connect 5 0 1 0; #X connect 6 0 40 0; #X connect 9 0 8 0; #X connect 12 0 13 0; #X connect 13 0 16 0; #X connect 16 0 18 0; #X connect 16 0 19 0; #X connect 17 0 22 1; #X connect 18 0 19 1; #X connect 19 0 21 0; #X connect 21 0 22 0; #X connect 22 0 23 0; #X connect 23 0 27 0; #X connect 26 0 17 0; #X connect 27 0 28 0; #X connect 29 0 12 0; #X connect 37 0 0 0; #X connect 39 0 5 0; #X connect 40 0 4 0; #X connect 41 0 3 0;