#N canvas 840 132 766 710 12; #X obj 269 -7 osc~ 440; #X text 341 -9 <-- 440 Hz. sine wave at full blast; #X msg 441 351 \; pd dsp 1; #X msg 443 304 \; pd dsp 0; #X text 530 360 ON; #X text 531 312 OFF; #X text 568 310 <-- click these; #X text 348 89 <----- send to the audio output device; #X floatatom 270 -47 5 0 0 0 - - -; #X floatatom 318 -46 5 0 1 0 - - -; #X text 371 -47 <-- shift-click and drag to change by hundredths; #X msg 327 220 print; #X msg 234 124 bang; #X msg 326 172 start; #X msg 328 198 stop; #X text 388 225 writesf~ -- write audio signals to a soundfile; #X text 326 281 creation argument is number of channels; #X text 355 303 (1 to 64).; #X text 382 169 start streaming audio; #X text 379 197 stop streaming audio; #X obj 301 258 writesf~ 2; #X text 413 117 create a new 16-bit soundfile; #X obj 225 169 del 30000; #X obj 295 89 dac~; #X msg 303 128 open osc1.wav; #X obj 273 353 print done; #X obj 216 216 print wait; #X text 223 -130 Use: Click ON \, then click open \, then click bang to start file writing.; #X text 98 -140 MAKING AND WRITING A SINE WAVE; #X text 414 -62 change amplitude here. Max is 1; #X obj 265 318 del 60000; #X floatatom 129 79 0 0 0 0 - - -; #X msg 59 -43 bang; #X obj 128 33 + 1; #X obj 55 22 float; #X msg 128 -9 200; #X text 246 -92 change frequency here:; #X obj 151 107 moses 800; #X obj 161 213 bang; #X obj 167 261 s init; #X obj 129 -37 r init; #X obj 42 -18 metro 500; #X msg 40 -76 stop; #X obj 275 27 *~ 0.25; #X text 357 14 <-- reduce amplitude to 0.25; #X text 126 324 wait twice as long as song length; #X text 89 250 send bang to init receiver; #X text 159 -13 init counter using message box; #X text 95 -72 bang starts metro stop stops it; #X msg 216 -92 bang; #X text 170 73 value greater than 800?; #X msg 201 -44 797; #X text 18 52 connect +1 outlet to float first Then connect it to number box that goes to moses. pd computes depth first along first connected patch cord.; #X connect 0 0 43 0; #X connect 8 0 0 0; #X connect 11 0 20 0; #X connect 12 0 13 0; #X connect 12 0 22 0; #X connect 13 0 20 0; #X connect 14 0 20 0; #X connect 22 0 14 0; #X connect 22 0 26 0; #X connect 22 0 30 0; #X connect 24 0 20 0; #X connect 30 0 25 0; #X connect 31 0 8 0; #X connect 31 0 37 0; #X connect 32 0 41 0; #X connect 33 0 34 1; #X connect 33 0 31 0; #X connect 34 0 33 0; #X connect 35 0 34 1; #X connect 37 1 38 0; #X connect 38 0 39 0; #X connect 40 0 35 0; #X connect 41 0 34 0; #X connect 42 0 41 0; #X connect 43 0 20 0; #X connect 43 0 23 0; #X connect 49 0 51 0; #X connect 51 0 34 1;