diff options
Diffstat (limited to 'pd')
-rw-r--r-- | pd/doc/5.reference/abs~-help.pd | 20 | ||||
-rw-r--r-- | pd/doc/7.stuff/tools/testtone.pd | 267 | ||||
-rw-r--r-- | pd/doc/7.stuff/tools/testtone16.pd | 716 | ||||
-rw-r--r-- | pd/extra/bonk~/bonk~-help.pd | 62 | ||||
-rw-r--r-- | pd/extra/lrshift~/lrshift~-help.pd | 20 | ||||
-rw-r--r-- | pd/extra/lrshift~/lrshift~.c | 4 | ||||
-rw-r--r-- | pd/extra/pd~/pd~.c | 73 | ||||
-rw-r--r-- | pd/src/d_math.c | 4 | ||||
-rw-r--r-- | pd/src/m_pd.h | 4 | ||||
-rw-r--r-- | pd/src/notes.txt | 6 | ||||
-rw-r--r-- | pd/src/s_audio_pa.c | 24 | ||||
-rw-r--r-- | pd/src/s_midi_oss.c | 39 |
12 files changed, 1025 insertions, 214 deletions
diff --git a/pd/doc/5.reference/abs~-help.pd b/pd/doc/5.reference/abs~-help.pd new file mode 100644 index 00000000..95032e39 --- /dev/null +++ b/pd/doc/5.reference/abs~-help.pd @@ -0,0 +1,20 @@ +#N canvas 286 197 499 284 10; +#X obj 19 108 sig~; +#X obj 71 133 loadbang; +#X obj 71 157 metro 100; +#X obj 71 181 snapshot~; +#X floatatom 19 87 5 0 0 0 - - -; +#X floatatom 71 206 7 0 0 0 - - -; +#X text 316 257 updated for Pd version 0.42.; +#X obj 20 132 abs~; +#X obj 21 14 abs~; +#X text 60 14 - absolute value; +#X text 82 33 Passes nonnegative values unchanged \, but replaces negative +ones with their (positive) inverses.; +#X text 81 66 (turn DSP on to test):; +#X connect 0 0 7 0; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X connect 3 0 5 0; +#X connect 4 0 0 0; +#X connect 7 0 3 0; diff --git a/pd/doc/7.stuff/tools/testtone.pd b/pd/doc/7.stuff/tools/testtone.pd index f65dc812..2208aaed 100644 --- a/pd/doc/7.stuff/tools/testtone.pd +++ b/pd/doc/7.stuff/tools/testtone.pd @@ -1,17 +1,14 @@ -#N canvas 90 35 581 402 12; -#X floatatom 93 305 3 0 0 0 - - -; -#X obj 43 254 notein; -#X obj 43 280 stripnote; -#X floatatom 43 305 3 0 0 0 - - -; -#X text 35 5 Welcome to Pd ("Pure Data"). This window can test your -audio and MIDI connections. To see Pd's DOCUMENTATION select "getting -started" in the Help menu.; -#X text 228 251 MIDI OUT; -#X text 43 230 MIDI IN; -#X floatatom 175 304 3 0 0 0 - - -; -#X floatatom 136 304 3 0 0 0 - - -; -#X obj 136 279 ctlin; -#N canvas 0 0 484 446 midi 0; +#N canvas 130 55 494 364 12; +#X floatatom 84 288 3 0 0 0 - - -; +#X obj 34 237 notein; +#X obj 34 263 stripnote; +#X floatatom 34 288 3 0 0 0 - - -; +#X text 219 234 MIDI OUT; +#X text 34 213 MIDI IN; +#X floatatom 166 287 3 0 0 0 - - -; +#X floatatom 127 287 3 0 0 0 - - -; +#X obj 127 262 ctlin; +#N canvas 0 22 484 446 midi 0; #X obj 96 65 inlet; #X obj 96 262 noteout; #X floatatom 96 92 0 0 0 0 - - -; @@ -52,133 +49,162 @@ started" in the Help menu.; #X connect 13 0 9 0; #X connect 14 0 10 0; #X connect 20 0 19 0; -#X restore 228 301 pd midi; -#X floatatom 137 185 3 0 0 0 - tone-vu1 -; -#X floatatom 168 185 3 0 0 0 - tone-vu2 -; -#X obj 135 117 tgl 20 0 tone-ch1 tone-ch1 1 5 -8 0 12 -262144 -1 -1 +#X restore 219 284 pd midi; +#X floatatom 178 93 3 0 0 0 - tone-vu1 -; +#X floatatom 205 93 3 0 0 0 - tone-vu2 -; +#X obj 177 126 tgl 20 0 tone-ch1 tone-ch1 1 5 -8 0 12 -262144 -1 -1 1 1; -#X obj 160 117 tgl 20 0 tone-ch2 tone-ch2 2 5 -8 0 12 -262144 -1 -1 +#X obj 202 126 tgl 20 0 tone-ch2 tone-ch2 2 5 -8 0 12 -262144 -1 -1 1 1; -#X obj 228 275 tgl 20 0 empty empty empty 20 8 0 8 -262144 -1 -1 0 +#X obj 219 258 tgl 20 0 empty empty empty 20 8 0 8 -262144 -1 -1 0 1; -#X obj 399 97 tgl 20 0 tone-monitor set-tone-monitor monitor 25 10 -0 12 -262144 -1 -1 0 1; -#X text 69 133 OFF; -#X text 68 118 -40; -#X text 68 101 -20; -#N canvas 0 0 536 251 more 0; +#X obj 184 192 tgl 15 0 tone-monitor set-tone-monitor monitor-inputs +23 8 0 12 -262144 -1 -1 0 1; +#X text 40 120 OFF; +#X text 39 105 -40; +#X text 39 88 -20; +#N canvas 0 22 524 326 more 0; #X floatatom 42 209 0 0 0 0 - - -; #X obj 42 183 f; #X obj 79 183 + 1; #X obj 42 150 metro 1000; #X obj 42 123 tgl 20 0 empty empty empty 20 8 0 8 -262144 -1 -1 0 1 ; -#X msg 264 142 \; pd restart-audio; #X text 24 30 this window has various wierd debugging stuff...; -#X text 218 97 ALSA gets twisted after a few; -#X text 216 118 hours sometimes... use this to fix:; #X text 22 74 see if Pd's time; #X text 22 93 measurement works:; +#X obj 227 127 adc~; +#X obj 226 224 print~; +#X obj 235 201 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 227 152 *~ 1; +#X obj 302 138 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X obj 302 158 sel 0 1; +#X obj 301 183 1; +#X obj 333 185 1000; +#X text 226 94 print out literal values from ADC 1; +#X text 323 136 optionally multiply by 1000; #X connect 1 0 2 0; #X connect 1 0 0 0; #X connect 2 0 1 1; #X connect 3 0 1 0; #X connect 4 0 3 0; -#X restore 459 298 pd more; -#X obj 399 135 tgl 20 0 tone-hipass set-tone-hipass input-hipass 25 -10 0 12 -262144 -1 -1 0 1; -#X obj 185 117 tgl 20 0 tone-ch3 tone-ch3 3 5 -8 0 12 -262144 -1 -1 +#X connect 8 0 11 0; +#X connect 10 0 9 0; +#X connect 11 0 9 0; +#X connect 12 0 13 0; +#X connect 13 0 14 0; +#X connect 13 1 15 0; +#X connect 14 0 11 1; +#X connect 15 0 11 1; +#X restore 388 266 pd more; +#X obj 343 193 tgl 15 0 tone-hipass tone-hipass-set input-hipass 23 +8 0 12 -262144 -1 -1 1 1; +#X obj 243 126 tgl 20 0 tone-ch3 tone-ch3 3 5 -8 0 12 -262144 -1 -1 1 1; -#X obj 210 117 tgl 20 0 tone-ch4 tone-ch4 4 5 -8 0 12 -262144 -1 -1 +#X obj 268 126 tgl 20 0 tone-ch4 tone-ch4 4 5 -8 0 12 -262144 -1 -1 1 1; -#X obj 235 117 tgl 20 0 tone-ch5 tone-ch5 5 5 -8 0 12 -262144 -1 -1 +#X obj 309 126 tgl 20 0 tone-ch5 tone-ch5 5 5 -8 0 12 -262144 -1 -1 1 1; -#X obj 260 117 tgl 20 0 tone-ch6 tone-ch6 6 5 -8 0 12 -262144 -1 -1 +#X obj 334 126 tgl 20 0 tone-ch6 tone-ch6 6 5 -8 0 12 -262144 -1 -1 1 1; -#X obj 331 108 bng 15 250 50 0 tone-all empty ALL 20 8 0 12 -262144 +#X obj 428 117 bng 15 250 50 0 tone-all empty ALL 20 8 0 12 -262144 -1 -1; -#X obj 331 129 bng 15 250 50 0 tone-none empty NONE 20 8 0 12 -262144 +#X obj 428 138 bng 15 250 50 0 tone-none empty NONE 20 8 0 12 -262144 -1 -1; -#X floatatom 203 185 3 0 0 0 - tone-vu3 -; -#X floatatom 234 185 3 0 0 0 - tone-vu4 -; -#X floatatom 269 185 3 0 0 0 - tone-vu5 -; -#X floatatom 300 185 3 0 0 0 - tone-vu6 -; -#X text 168 205 AUDIO INPUT (RMS dB); -#X text 45 62 TEST; -#X text 70 171 noise; -#X text 69 188 tone; -#X text 44 80 SIGNAL; -#X text 138 78 test signal channels:; -#X obj 51 174 vradio 15 1 0 2 tone-type tone-type-set empty 0 -6 0 +#X floatatom 244 93 3 0 0 0 - tone-vu3 -; +#X floatatom 272 93 3 0 0 0 - tone-vu4 -; +#X floatatom 310 93 3 0 0 0 - tone-vu5 -; +#X floatatom 338 93 3 0 0 0 - tone-vu6 -; +#X text 237 73 AUDIO INPUT (RMS dB); +#X text 101 88 noise; +#X text 100 105 tone; +#X obj 84 90 vradio 15 1 0 2 tone-type tone-type-set empty 0 -6 0 8 +-262144 -1 -1 1; +#X obj 22 91 vradio 15 1 0 3 tone-radio tone-radio-set empty 0 -6 0 8 -262144 -1 -1 1; -#X obj 51 104 vradio 15 1 0 3 tone-radio tone-radio-set empty 0 -6 -0 8 -262144 -1 -1 0; -#X obj 460 193 adc~; -#X obj 459 240 print~; -#X obj 468 217 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X floatatom 335 185 3 0 0 0 - tone-vu7 -; -#X floatatom 366 185 3 0 0 0 - tone-vu8 -; -#X obj 283 117 tgl 20 0 tone-ch7 tone-ch7 7 5 -8 0 12 -262144 -1 -1 +#X floatatom 376 93 3 0 0 0 - tone-vu7 -; +#X floatatom 404 93 3 0 0 0 - tone-vu8 -; +#X obj 375 126 tgl 20 0 tone-ch7 tone-ch7 7 5 -8 0 12 -262144 -1 -1 1 1; -#X obj 308 117 tgl 20 0 tone-ch8 tone-ch8 8 5 -8 0 12 -262144 -1 -1 +#X obj 400 126 tgl 20 0 tone-ch8 tone-ch8 8 5 -8 0 12 -262144 -1 -1 1 1; -#N canvas 233 399 321 422 audio 0; +#N canvas 233 346 321 422 audio 0; #X obj 25 303 s~ tone-mon; #X obj 25 277 line~; #X obj 25 249 pack 0 50; #X obj 25 223 r tone-monitor; -#X obj 28 140 * 5; -#X obj 28 165 s tone-hip; +#X obj 28 139 * 5; +#X obj 28 164 s tone-hip; #X obj 28 114 r tone-hipass; -#N canvas 499 63 548 519 glue+loadbang 0; +#N canvas 424 104 548 519 glue+loadbang 0; #X obj 8 20 loadbang; #X obj 175 18 r tone-all; #X obj 285 16 r tone-none; -#X msg 8 48 \; pd dsp 1 \; tone-pitch 69 \; tone-radio 2 \; tone-radio-set -2 \; tone-type 1 \; tone-type-set 1 \; tone-all 1 \;; #X msg 175 46 \; tone-ch1 1 \; tone-ch2 1 \; tone-ch3 1 \; tone-ch4 1 \; tone-ch5 1 \; tone-ch6 1 \; tone-ch7 1 \; tone-ch8 1; #X msg 285 47 \; tone-ch1 0 \; tone-ch2 0 \; tone-ch3 0 \; tone-ch4 0 \; tone-ch5 0 \; tone-ch6 0 \; tone-ch7 0 \; tone-ch8 0; -#X connect 0 0 3 0; -#X connect 1 0 4 0; -#X connect 2 0 5 0; +#X msg 8 48 \; pd dsp 1 \; tone-pitch 69 \; tone-radio 2 \; tone-radio-set +set 2 \; tone-type 1 \; tone-type-set 1 \; tone-all 1 \; tone-hipass-set +set 1 \;; +#X connect 0 0 5 0; +#X connect 1 0 3 0; +#X connect 2 0 4 0; #X restore 22 332 pd glue+loadbang; -#N canvas 487 35 468 559 tone-generator 0; -#X obj 22 134 osc~; -#X obj 22 66 mtof; -#X floatatom 22 43 0 0 0 0 - - -; -#X floatatom 22 88 0 0 0 0 - - -; -#X obj 22 110 sig~; -#X obj 22 18 r tone-pitch; -#X obj 119 60 noise~; -#X obj 65 196 +~; -#X obj 282 87 - 1; -#X obj 282 119 * -1; -#X obj 191 175 line~; -#X obj 281 176 line~; -#X obj 22 158 *~; -#X obj 119 157 *~; -#X msg 191 146 \$1 20; -#X msg 281 147 \$1 20; -#X floatatom 239 54 0 0 0 0 - - -; -#X obj 64 451 *~; -#X obj 86 424 line~; -#X obj 86 397 pack 0 50; -#X floatatom 86 345 0 0 0 0 - - -; -#X obj 86 370 dbtorms; -#X obj 64 477 s~ tone-osc; -#X obj 86 262 r tone-radio; -#X obj 86 290 sel 0 1 2; -#X msg 155 313 0; -#X msg 86 315 80; -#X msg 119 315 60; -#X obj 239 31 r tone-type; +#N canvas 462 84 468 559 tone-generator 0; +#X obj 22 187 osc~; +#X obj 22 81 mtof; +#X floatatom 22 58 0 0 0 0 - - -; +#X floatatom 22 103 0 0 0 0 - - -; +#X obj 22 163 sig~; +#X obj 22 33 r tone-pitch; +#X obj 119 179 noise~; +#X obj 65 249 +~; +#X obj 282 140 - 1; +#X obj 282 172 * -1; +#X obj 191 228 line~; +#X obj 281 229 line~; +#X obj 22 211 *~; +#X obj 119 210 *~; +#X msg 191 199 \$1 20; +#X msg 281 200 \$1 20; +#X floatatom 273 109 0 0 0 0 - - -; +#X obj 64 504 *~; +#X obj 86 477 line~; +#X obj 86 450 pack 0 50; +#X floatatom 201 365 0 0 0 0 - - -; +#X obj 86 423 dbtorms; +#X obj 64 530 s~ tone-osc; +#X obj 201 282 r tone-radio; +#X obj 201 310 sel 0 1 2; +#X msg 270 333 0; +#X msg 201 335 80; +#X msg 234 335 60; +#X obj 273 86 r tone-type; +#X obj 89 359 r tone-level; +#X obj 178 453 s tone-level-set; +#X msg 177 428 set \$1; +#X obj 329 452 s tone-radio-set; +#X obj 327 369 sel 80 60 0; +#X msg 327 394 0; +#X msg 360 394 1; +#X msg 393 394 2; +#X msg 329 426 set \$1; +#X msg 423 394 2; +#X obj 72 89 s tone-pitch-set; +#X msg 72 66 set \$1; +#X obj 177 29 r tone-hz; +#X msg 75 117 set \$1; +#X obj 75 140 s tone-hz-set; +#X obj 177 55 ftom; #X connect 0 0 12 0; #X connect 1 0 3 0; #X connect 2 0 1 0; +#X connect 2 0 40 0; #X connect 3 0 4 0; +#X connect 3 0 42 0; #X connect 4 0 0 0; #X connect 5 0 2 0; #X connect 6 0 13 0; @@ -197,6 +223,7 @@ started" in the Help menu.; #X connect 18 0 17 1; #X connect 19 0 18 0; #X connect 20 0 21 0; +#X connect 20 0 31 0; #X connect 21 0 19 0; #X connect 23 0 24 0; #X connect 24 0 26 0; @@ -206,6 +233,22 @@ started" in the Help menu.; #X connect 26 0 20 0; #X connect 27 0 20 0; #X connect 28 0 16 0; +#X connect 29 0 31 0; +#X connect 29 0 21 0; +#X connect 31 0 30 0; +#X connect 33 0 34 0; +#X connect 33 1 35 0; +#X connect 33 2 36 0; +#X connect 33 3 38 0; +#X connect 34 0 37 0; +#X connect 35 0 37 0; +#X connect 36 0 37 0; +#X connect 37 0 32 0; +#X connect 38 0 37 0; +#X connect 40 0 39 0; +#X connect 41 0 44 0; +#X connect 42 0 43 0; +#X connect 44 0 2 0; #X restore 24 68 pd tone-generator; #N canvas 76 157 975 436 assigns 0; #X obj 12 71 hip~ 5; @@ -441,21 +484,31 @@ started" in the Help menu.; #X connect 110 0 90 0; #X connect 111 0 101 0; #X restore 38 387 pd assigns; +#X obj 178 87 loadbang; +#X obj 178 111 0; #X connect 1 0 0 0; #X connect 2 0 1 0; #X connect 3 0 2 0; #X connect 4 0 5 0; #X connect 6 0 4 0; -#X restore 459 275 pd audio; -#X text 24 341 PD is under copyright by Miller Puckette and others -but is free for you to use for any reasonable purpose. See the file -\, LICENSE.txt in the distribution.; +#X connect 10 0 11 0; +#X connect 11 0 4 0; +#X restore 388 243 pd audio; +#X floatatom 22 144 3 0 100 1 - tone-level-set tone-level; +#X floatatom 84 123 5 0 100 1 pitch tone-pitch-set tone-pitch; +#X floatatom 84 145 5 0 20000 1 HZ tone-hz-set tone-hz; +#X text 48 145 dB; +#X text 28 67 TEST TONES; +#X text 233 156 AUDIO OUTPUT ON/OFF; +#X text 18 5 Welcome to Pd ("Pure Data"). You can use this window to +test audio and MIDI connections. To see Pd's DOCUMENTATION \, select +"getting started" in the Help menu.; +#X text 18 323 Pd is Free software under the BSD license. See LICENSE.txt +in the distribution for details.; #X connect 1 0 2 0; #X connect 1 1 2 1; #X connect 2 0 3 0; #X connect 2 1 0 0; -#X connect 9 0 8 0; -#X connect 9 1 7 0; -#X connect 15 0 10 0; -#X connect 40 0 41 0; -#X connect 42 0 41 0; +#X connect 8 0 7 0; +#X connect 8 1 6 0; +#X connect 14 0 9 0; diff --git a/pd/doc/7.stuff/tools/testtone16.pd b/pd/doc/7.stuff/tools/testtone16.pd new file mode 100644 index 00000000..b54c470c --- /dev/null +++ b/pd/doc/7.stuff/tools/testtone16.pd @@ -0,0 +1,716 @@ +#N canvas 153 160 822 395 12; +#X floatatom 93 305 3 0 0 0 - - -; +#X obj 43 254 notein; +#X obj 43 280 stripnote; +#X floatatom 43 305 3 0 0 0 - - -; +#X text 186 8 Welcome to Pd ("Pure Data"). This window can test your +audio and MIDI connections. To see Pd's DOCUMENTATION select "getting +started" in the Help menu.; +#X text 228 251 MIDI OUT; +#X text 43 230 MIDI IN; +#X floatatom 175 304 3 0 0 0 - - -; +#X floatatom 136 304 3 0 0 0 - - -; +#X obj 136 279 ctlin; +#N canvas 0 0 484 446 midi 0; +#X obj 96 65 inlet; +#X obj 96 262 noteout; +#X floatatom 96 92 0 0 0 0 - - -; +#X obj 338 113 loadbang; +#X obj 96 184 metro; +#X obj 96 236 makenote; +#X floatatom 189 166 0 0 0 0 - - -; +#X obj 96 210 f; +#X floatatom 145 166 0 0 0 0 - - -; +#X floatatom 233 166 0 0 0 0 - - -; +#X floatatom 276 166 0 0 0 0 - - -; +#X msg 338 148 500; +#X msg 370 148 60; +#X msg 399 148 64; +#X msg 427 148 250; +#X text 144 145 rate; +#X text 187 145 pitch; +#X text 232 145 vel; +#X text 268 146 length; +#X obj 230 257 ctlout 1; +#X floatatom 230 228 0 0 0 0 - - -; +#X connect 0 0 2 0; +#X connect 2 0 4 0; +#X connect 3 0 11 0; +#X connect 3 0 12 0; +#X connect 3 0 13 0; +#X connect 3 0 14 0; +#X connect 4 0 7 0; +#X connect 5 0 1 0; +#X connect 5 1 1 1; +#X connect 6 0 7 1; +#X connect 7 0 5 0; +#X connect 8 0 4 1; +#X connect 9 0 5 1; +#X connect 10 0 5 2; +#X connect 11 0 8 0; +#X connect 12 0 6 0; +#X connect 13 0 9 0; +#X connect 14 0 10 0; +#X connect 20 0 19 0; +#X restore 228 301 pd midi; +#X floatatom 137 185 3 0 0 0 - tone-vu1 -; +#X floatatom 164 185 3 0 0 0 - tone-vu2 -; +#X obj 138 158 tgl 20 0 tone-ch1 tone-ch1 1 5 -8 0 12 -262144 -1 -1 +1 1; +#X obj 163 158 tgl 20 0 tone-ch2 tone-ch2 2 5 -8 0 12 -262144 -1 -1 +1 1; +#X obj 228 275 tgl 20 0 empty empty empty 20 8 0 8 -262144 -1 -1 0 +1; +#X obj 698 154 tgl 20 0 tone-monitor set-tone-monitor monitor 25 10 +0 12 -262144 -1 -1 0 1; +#X text 69 133 OFF; +#X text 68 118 -40; +#X text 68 101 -20; +#N canvas 0 0 662 344 more 0; +#X floatatom 42 209 0 0 0 0 - - -; +#X obj 42 183 f; +#X obj 79 183 + 1; +#X obj 42 150 metro 1000; +#X obj 42 123 tgl 20 0 empty empty empty 20 8 0 8 -262144 -1 -1 0 1 +; +#X msg 264 142 \; pd restart-audio; +#X text 24 30 this window has various wierd debugging stuff...; +#X text 218 97 ALSA gets twisted after a few; +#X text 216 118 hours sometimes... use this to fix:; +#X text 22 74 see if Pd's time; +#X text 22 93 measurement works:; +#X obj 516 159 adc~; +#X obj 515 206 print~; +#X obj 524 183 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X connect 1 0 2 0; +#X connect 1 0 0 0; +#X connect 2 0 1 1; +#X connect 3 0 1 0; +#X connect 4 0 3 0; +#X connect 11 0 12 0; +#X connect 13 0 12 0; +#X restore 663 326 pd more; +#X obj 698 186 tgl 20 0 tone-hipass set-tone-hipass input-hipass 25 +10 0 12 -262144 -1 -1 0 1; +#X obj 196 158 tgl 20 0 tone-ch3 tone-ch3 3 5 -8 0 12 -262144 -1 -1 +1 1; +#X obj 221 158 tgl 20 0 tone-ch4 tone-ch4 4 5 -8 0 12 -262144 -1 -1 +1 1; +#X obj 254 158 tgl 20 0 tone-ch5 tone-ch5 5 5 -8 0 12 -262144 -1 -1 +1 1; +#X obj 279 158 tgl 20 0 tone-ch6 tone-ch6 6 5 -8 0 12 -262144 -1 -1 +1 1; +#X obj 628 145 bng 15 250 50 0 tone-all empty ALL 20 8 0 12 -262144 +-1 -1; +#X obj 628 166 bng 15 250 50 0 tone-none empty NONE 20 8 0 12 -262144 +-1 -1; +#X floatatom 195 185 3 0 0 0 - tone-vu3 -; +#X floatatom 222 185 3 0 0 0 - tone-vu4 -; +#X floatatom 253 185 3 0 0 0 - tone-vu5 -; +#X floatatom 280 185 3 0 0 0 - tone-vu6 -; +#X text 307 207 AUDIO INPUT (RMS dB); +#X text 45 62 TEST; +#X text 70 171 noise; +#X text 69 188 tone; +#X text 44 80 SIGNAL; +#X text 317 104 test signal channels:; +#X obj 51 174 vradio 15 1 0 2 tone-type tone-type-set empty 0 -6 0 +8 -262144 -1 -1 1; +#X obj 51 104 vradio 15 1 0 3 tone-radio tone-radio-set empty 0 -6 +0 8 -262144 -1 -1 2; +#X floatatom 313 185 3 0 0 0 - tone-vu7 -; +#X floatatom 340 185 3 0 0 0 - tone-vu8 -; +#X obj 313 158 tgl 20 0 tone-ch7 tone-ch7 7 5 -8 0 12 -262144 -1 -1 +1 1; +#X obj 338 158 tgl 20 0 tone-ch8 tone-ch8 8 5 -8 0 12 -262144 -1 -1 +1 1; +#N canvas 233 399 321 422 audio 0; +#X obj 25 303 s~ tone-mon; +#X obj 25 277 line~; +#X obj 25 249 pack 0 50; +#X obj 25 223 r tone-monitor; +#X obj 28 140 * 5; +#X obj 28 165 s tone-hip; +#X obj 28 114 r tone-hipass; +#N canvas 499 63 548 519 glue+loadbang 0; +#X obj 8 20 loadbang; +#X obj 175 18 r tone-all; +#X obj 285 16 r tone-none; +#X msg 8 48 \; pd dsp 1 \; tone-pitch 69 \; tone-radio 2 \; tone-radio-set +2 \; tone-type 1 \; tone-type-set 1 \; tone-all 1 \;; +#X msg 175 46 \; tone-ch1 1 \; tone-ch2 1 \; tone-ch3 1 \; tone-ch4 +1 \; tone-ch5 1 \; tone-ch6 1 \; tone-ch7 1 \; tone-ch8 1; +#X msg 285 47 \; tone-ch1 0 \; tone-ch2 0 \; tone-ch3 0 \; tone-ch4 +0 \; tone-ch5 0 \; tone-ch6 0 \; tone-ch7 0 \; tone-ch8 0; +#X connect 0 0 3 0; +#X connect 1 0 4 0; +#X connect 2 0 5 0; +#X restore 22 332 pd glue+loadbang; +#N canvas 487 35 468 559 tone-generator 0; +#X obj 22 134 osc~; +#X obj 22 66 mtof; +#X floatatom 22 43 0 0 0 0 - - -; +#X floatatom 22 88 0 0 0 0 - - -; +#X obj 22 110 sig~; +#X obj 22 18 r tone-pitch; +#X obj 119 60 noise~; +#X obj 65 196 +~; +#X obj 282 87 - 1; +#X obj 282 119 * -1; +#X obj 191 175 line~; +#X obj 281 176 line~; +#X obj 22 158 *~; +#X obj 119 157 *~; +#X msg 191 146 \$1 20; +#X msg 281 147 \$1 20; +#X floatatom 239 54 0 0 0 0 - - -; +#X obj 64 451 *~; +#X obj 86 424 line~; +#X obj 86 397 pack 0 50; +#X floatatom 86 345 0 0 0 0 - - -; +#X obj 86 370 dbtorms; +#X obj 64 477 s~ tone-osc; +#X obj 86 262 r tone-radio; +#X obj 86 290 sel 0 1 2; +#X msg 155 313 0; +#X msg 86 315 80; +#X msg 119 315 60; +#X obj 239 31 r tone-type; +#X connect 0 0 12 0; +#X connect 1 0 3 0; +#X connect 2 0 1 0; +#X connect 3 0 4 0; +#X connect 4 0 0 0; +#X connect 5 0 2 0; +#X connect 6 0 13 0; +#X connect 7 0 17 0; +#X connect 8 0 9 0; +#X connect 9 0 15 0; +#X connect 10 0 12 1; +#X connect 11 0 13 1; +#X connect 12 0 7 0; +#X connect 13 0 7 1; +#X connect 14 0 10 0; +#X connect 15 0 11 0; +#X connect 16 0 8 0; +#X connect 16 0 14 0; +#X connect 17 0 22 0; +#X connect 18 0 17 1; +#X connect 19 0 18 0; +#X connect 20 0 21 0; +#X connect 21 0 19 0; +#X connect 23 0 24 0; +#X connect 24 0 26 0; +#X connect 24 1 27 0; +#X connect 24 2 25 0; +#X connect 25 0 20 0; +#X connect 26 0 20 0; +#X connect 27 0 20 0; +#X connect 28 0 16 0; +#X restore 24 68 pd tone-generator; +#N canvas 184 0 1014 892 assigns 0; +#X obj 12 71 hip~ 5; +#X obj 20 122 int; +#X obj 20 96 env~ 8192; +#X obj 12 18 adc~ 1; +#X obj 22 171 r~ tone-mon; +#X obj 31 306 line~; +#X obj 12 196 *~; +#X obj 31 279 pack 0 50; +#X obj 31 253 r tone-ch1; +#X obj 22 226 r~ tone-osc; +#X obj 22 331 *~; +#X obj 12 386 dac~ 1; +#X obj 12 361 +~; +#X obj 20 44 r tone-hip; +#X obj 132 70 hip~ 5; +#X obj 140 121 int; +#X obj 140 95 env~ 8192; +#X obj 142 170 r~ tone-mon; +#X obj 151 305 line~; +#X obj 132 195 *~; +#X obj 151 278 pack 0 50; +#X obj 142 225 r~ tone-osc; +#X obj 142 330 *~; +#X obj 132 360 +~; +#X obj 140 43 r tone-hip; +#X obj 132 17 adc~ 2; +#X obj 132 385 dac~ 2; +#X obj 151 252 r tone-ch2; +#X obj 254 72 hip~ 5; +#X obj 262 123 int; +#X obj 262 97 env~ 8192; +#X obj 264 172 r~ tone-mon; +#X obj 273 307 line~; +#X obj 254 197 *~; +#X obj 273 280 pack 0 50; +#X obj 264 227 r~ tone-osc; +#X obj 264 332 *~; +#X obj 254 362 +~; +#X obj 262 45 r tone-hip; +#X obj 370 68 hip~ 5; +#X obj 378 119 int; +#X obj 378 93 env~ 8192; +#X obj 380 168 r~ tone-mon; +#X obj 389 303 line~; +#X obj 370 193 *~; +#X obj 389 276 pack 0 50; +#X obj 380 223 r~ tone-osc; +#X obj 380 328 *~; +#X obj 370 358 +~; +#X obj 378 41 r tone-hip; +#X obj 487 68 hip~ 5; +#X obj 495 119 int; +#X obj 495 93 env~ 8192; +#X obj 497 168 r~ tone-mon; +#X obj 506 303 line~; +#X obj 487 193 *~; +#X obj 506 276 pack 0 50; +#X obj 497 223 r~ tone-osc; +#X obj 497 328 *~; +#X obj 487 358 +~; +#X obj 495 41 r tone-hip; +#X obj 607 67 hip~ 5; +#X obj 615 118 int; +#X obj 615 92 env~ 8192; +#X obj 617 167 r~ tone-mon; +#X obj 626 302 line~; +#X obj 607 192 *~; +#X obj 626 275 pack 0 50; +#X obj 617 222 r~ tone-osc; +#X obj 617 327 *~; +#X obj 607 357 +~; +#X obj 615 40 r tone-hip; +#X obj 254 19 adc~ 3; +#X obj 370 15 adc~ 4; +#X obj 487 15 adc~ 5; +#X obj 607 14 adc~ 6; +#X obj 273 254 r tone-ch3; +#X obj 389 249 r tone-ch4; +#X obj 506 250 r tone-ch5; +#X obj 626 249 r tone-ch6; +#X obj 254 387 dac~ 3; +#X obj 369 382 dac~ 4; +#X obj 487 383 dac~ 5; +#X obj 607 382 dac~ 6; +#X obj 725 72 hip~ 5; +#X obj 733 123 int; +#X obj 733 97 env~ 8192; +#X obj 735 172 r~ tone-mon; +#X obj 744 307 line~; +#X obj 725 197 *~; +#X obj 744 280 pack 0 50; +#X obj 735 227 r~ tone-osc; +#X obj 735 332 *~; +#X obj 725 362 +~; +#X obj 733 45 r tone-hip; +#X obj 845 71 hip~ 5; +#X obj 853 122 int; +#X obj 853 96 env~ 8192; +#X obj 855 171 r~ tone-mon; +#X obj 864 306 line~; +#X obj 845 196 *~; +#X obj 864 279 pack 0 50; +#X obj 855 226 r~ tone-osc; +#X obj 855 331 *~; +#X obj 845 361 +~; +#X obj 853 44 r tone-hip; +#X obj 725 19 adc~ 7; +#X obj 845 18 adc~ 8; +#X obj 725 387 dac~ 7; +#X obj 845 386 dac~ 8; +#X obj 744 254 r tone-ch7; +#X obj 864 253 r tone-ch8; +#X obj 20 148 s tone-vu1; +#X obj 140 147 s tone-vu2; +#X obj 262 149 s tone-vu3; +#X obj 378 145 s tone-vu4; +#X obj 495 145 s tone-vu5; +#X obj 615 144 s tone-vu6; +#X obj 733 149 s tone-vu7; +#X obj 853 148 s tone-vu8; +#X obj 11 482 hip~ 5; +#X obj 19 533 int; +#X obj 19 507 env~ 8192; +#X obj 21 582 r~ tone-mon; +#X obj 30 717 line~; +#X obj 11 607 *~; +#X obj 30 690 pack 0 50; +#X obj 21 637 r~ tone-osc; +#X obj 21 742 *~; +#X obj 11 772 +~; +#X obj 19 455 r tone-hip; +#X obj 131 481 hip~ 5; +#X obj 139 532 int; +#X obj 139 506 env~ 8192; +#X obj 141 581 r~ tone-mon; +#X obj 150 716 line~; +#X obj 131 606 *~; +#X obj 150 689 pack 0 50; +#X obj 141 636 r~ tone-osc; +#X obj 141 741 *~; +#X obj 131 771 +~; +#X obj 139 454 r tone-hip; +#X obj 253 483 hip~ 5; +#X obj 261 534 int; +#X obj 261 508 env~ 8192; +#X obj 263 583 r~ tone-mon; +#X obj 272 718 line~; +#X obj 253 608 *~; +#X obj 272 691 pack 0 50; +#X obj 263 638 r~ tone-osc; +#X obj 263 743 *~; +#X obj 253 773 +~; +#X obj 261 456 r tone-hip; +#X obj 369 479 hip~ 5; +#X obj 377 530 int; +#X obj 377 504 env~ 8192; +#X obj 379 579 r~ tone-mon; +#X obj 388 714 line~; +#X obj 369 604 *~; +#X obj 388 687 pack 0 50; +#X obj 379 634 r~ tone-osc; +#X obj 379 739 *~; +#X obj 369 769 +~; +#X obj 377 452 r tone-hip; +#X obj 486 479 hip~ 5; +#X obj 494 530 int; +#X obj 494 504 env~ 8192; +#X obj 496 579 r~ tone-mon; +#X obj 505 714 line~; +#X obj 486 604 *~; +#X obj 505 687 pack 0 50; +#X obj 496 634 r~ tone-osc; +#X obj 496 739 *~; +#X obj 486 769 +~; +#X obj 494 452 r tone-hip; +#X obj 606 478 hip~ 5; +#X obj 614 529 int; +#X obj 614 503 env~ 8192; +#X obj 616 578 r~ tone-mon; +#X obj 625 713 line~; +#X obj 606 603 *~; +#X obj 625 686 pack 0 50; +#X obj 616 633 r~ tone-osc; +#X obj 616 738 *~; +#X obj 606 768 +~; +#X obj 614 451 r tone-hip; +#X obj 724 483 hip~ 5; +#X obj 732 534 int; +#X obj 732 508 env~ 8192; +#X obj 734 583 r~ tone-mon; +#X obj 743 718 line~; +#X obj 724 608 *~; +#X obj 743 691 pack 0 50; +#X obj 734 638 r~ tone-osc; +#X obj 734 743 *~; +#X obj 724 773 +~; +#X obj 732 456 r tone-hip; +#X obj 844 482 hip~ 5; +#X obj 852 533 int; +#X obj 852 507 env~ 8192; +#X obj 854 582 r~ tone-mon; +#X obj 863 717 line~; +#X obj 844 607 *~; +#X obj 863 690 pack 0 50; +#X obj 854 637 r~ tone-osc; +#X obj 854 742 *~; +#X obj 844 772 +~; +#X obj 852 455 r tone-hip; +#X obj 11 429 adc~ 9; +#X obj 131 428 adc~ 10; +#X obj 253 430 adc~ 11; +#X obj 369 426 adc~ 12; +#X obj 486 426 adc~ 13; +#X obj 606 425 adc~ 14; +#X obj 724 430 adc~ 15; +#X obj 844 429 adc~ 16; +#X obj 11 797 dac~ 9; +#X obj 131 796 dac~ 10; +#X obj 253 798 dac~ 11; +#X obj 368 793 dac~ 12; +#X obj 486 794 dac~ 13; +#X obj 606 793 dac~ 14; +#X obj 724 798 dac~ 15; +#X obj 844 797 dac~ 16; +#X obj 19 559 s tone-vu9; +#X obj 139 558 s tone-vu10; +#X obj 261 560 s tone-vu11; +#X obj 377 556 s tone-vu12; +#X obj 494 556 s tone-vu13; +#X obj 614 555 s tone-vu14; +#X obj 732 560 s tone-vu15; +#X obj 852 559 s tone-vu16; +#X obj 30 664 r tone-ch9; +#X obj 150 663 r tone-ch10; +#X obj 272 665 r tone-ch11; +#X obj 388 660 r tone-ch12; +#X obj 505 661 r tone-ch13; +#X obj 625 660 r tone-ch14; +#X obj 743 665 r tone-ch15; +#X obj 863 664 r tone-ch16; +#X connect 0 0 6 0; +#X connect 0 0 2 0; +#X connect 1 0 112 0; +#X connect 2 0 1 0; +#X connect 3 0 0 0; +#X connect 4 0 6 1; +#X connect 5 0 10 1; +#X connect 6 0 12 0; +#X connect 7 0 5 0; +#X connect 8 0 7 0; +#X connect 9 0 10 0; +#X connect 10 0 12 1; +#X connect 12 0 11 0; +#X connect 13 0 0 1; +#X connect 14 0 19 0; +#X connect 14 0 16 0; +#X connect 15 0 113 0; +#X connect 16 0 15 0; +#X connect 17 0 19 1; +#X connect 18 0 22 1; +#X connect 19 0 23 0; +#X connect 20 0 18 0; +#X connect 21 0 22 0; +#X connect 22 0 23 1; +#X connect 23 0 26 0; +#X connect 24 0 14 1; +#X connect 25 0 14 0; +#X connect 27 0 20 0; +#X connect 28 0 33 0; +#X connect 28 0 30 0; +#X connect 29 0 114 0; +#X connect 30 0 29 0; +#X connect 31 0 33 1; +#X connect 32 0 36 1; +#X connect 33 0 37 0; +#X connect 34 0 32 0; +#X connect 35 0 36 0; +#X connect 36 0 37 1; +#X connect 37 0 80 0; +#X connect 38 0 28 1; +#X connect 39 0 44 0; +#X connect 39 0 41 0; +#X connect 40 0 115 0; +#X connect 41 0 40 0; +#X connect 42 0 44 1; +#X connect 43 0 47 1; +#X connect 44 0 48 0; +#X connect 45 0 43 0; +#X connect 46 0 47 0; +#X connect 47 0 48 1; +#X connect 48 0 81 0; +#X connect 49 0 39 1; +#X connect 50 0 55 0; +#X connect 50 0 52 0; +#X connect 51 0 116 0; +#X connect 52 0 51 0; +#X connect 53 0 55 1; +#X connect 54 0 58 1; +#X connect 55 0 59 0; +#X connect 56 0 54 0; +#X connect 57 0 58 0; +#X connect 58 0 59 1; +#X connect 59 0 82 0; +#X connect 60 0 50 1; +#X connect 61 0 66 0; +#X connect 61 0 63 0; +#X connect 62 0 117 0; +#X connect 63 0 62 0; +#X connect 64 0 66 1; +#X connect 65 0 69 1; +#X connect 66 0 70 0; +#X connect 67 0 65 0; +#X connect 68 0 69 0; +#X connect 69 0 70 1; +#X connect 70 0 83 0; +#X connect 71 0 61 1; +#X connect 72 0 28 0; +#X connect 73 0 39 0; +#X connect 74 0 50 0; +#X connect 75 0 61 0; +#X connect 76 0 34 0; +#X connect 77 0 45 0; +#X connect 78 0 56 0; +#X connect 79 0 67 0; +#X connect 84 0 89 0; +#X connect 84 0 86 0; +#X connect 85 0 118 0; +#X connect 86 0 85 0; +#X connect 87 0 89 1; +#X connect 88 0 92 1; +#X connect 89 0 93 0; +#X connect 90 0 88 0; +#X connect 91 0 92 0; +#X connect 92 0 93 1; +#X connect 93 0 108 0; +#X connect 94 0 84 1; +#X connect 95 0 100 0; +#X connect 95 0 97 0; +#X connect 96 0 119 0; +#X connect 97 0 96 0; +#X connect 98 0 100 1; +#X connect 99 0 103 1; +#X connect 100 0 104 0; +#X connect 101 0 99 0; +#X connect 102 0 103 0; +#X connect 103 0 104 1; +#X connect 104 0 109 0; +#X connect 105 0 95 1; +#X connect 106 0 84 0; +#X connect 107 0 95 0; +#X connect 110 0 90 0; +#X connect 111 0 101 0; +#X connect 120 0 125 0; +#X connect 120 0 122 0; +#X connect 121 0 224 0; +#X connect 122 0 121 0; +#X connect 123 0 125 1; +#X connect 124 0 128 1; +#X connect 125 0 129 0; +#X connect 126 0 124 0; +#X connect 127 0 128 0; +#X connect 128 0 129 1; +#X connect 129 0 216 0; +#X connect 130 0 120 1; +#X connect 131 0 136 0; +#X connect 131 0 133 0; +#X connect 132 0 225 0; +#X connect 133 0 132 0; +#X connect 134 0 136 1; +#X connect 135 0 139 1; +#X connect 136 0 140 0; +#X connect 137 0 135 0; +#X connect 138 0 139 0; +#X connect 139 0 140 1; +#X connect 140 0 217 0; +#X connect 141 0 131 1; +#X connect 142 0 147 0; +#X connect 142 0 144 0; +#X connect 143 0 226 0; +#X connect 144 0 143 0; +#X connect 145 0 147 1; +#X connect 146 0 150 1; +#X connect 147 0 151 0; +#X connect 148 0 146 0; +#X connect 149 0 150 0; +#X connect 150 0 151 1; +#X connect 151 0 218 0; +#X connect 152 0 142 1; +#X connect 153 0 158 0; +#X connect 153 0 155 0; +#X connect 154 0 227 0; +#X connect 155 0 154 0; +#X connect 156 0 158 1; +#X connect 157 0 161 1; +#X connect 158 0 162 0; +#X connect 159 0 157 0; +#X connect 160 0 161 0; +#X connect 161 0 162 1; +#X connect 162 0 219 0; +#X connect 163 0 153 1; +#X connect 164 0 169 0; +#X connect 164 0 166 0; +#X connect 165 0 228 0; +#X connect 166 0 165 0; +#X connect 167 0 169 1; +#X connect 168 0 172 1; +#X connect 169 0 173 0; +#X connect 170 0 168 0; +#X connect 171 0 172 0; +#X connect 172 0 173 1; +#X connect 173 0 220 0; +#X connect 174 0 164 1; +#X connect 175 0 180 0; +#X connect 175 0 177 0; +#X connect 176 0 229 0; +#X connect 177 0 176 0; +#X connect 178 0 180 1; +#X connect 179 0 183 1; +#X connect 180 0 184 0; +#X connect 181 0 179 0; +#X connect 182 0 183 0; +#X connect 183 0 184 1; +#X connect 184 0 221 0; +#X connect 185 0 175 1; +#X connect 186 0 191 0; +#X connect 186 0 188 0; +#X connect 187 0 230 0; +#X connect 188 0 187 0; +#X connect 189 0 191 1; +#X connect 190 0 194 1; +#X connect 191 0 195 0; +#X connect 192 0 190 0; +#X connect 193 0 194 0; +#X connect 194 0 195 1; +#X connect 195 0 222 0; +#X connect 196 0 186 1; +#X connect 197 0 202 0; +#X connect 197 0 199 0; +#X connect 198 0 231 0; +#X connect 199 0 198 0; +#X connect 200 0 202 1; +#X connect 201 0 205 1; +#X connect 202 0 206 0; +#X connect 203 0 201 0; +#X connect 204 0 205 0; +#X connect 205 0 206 1; +#X connect 206 0 223 0; +#X connect 207 0 197 1; +#X connect 208 0 120 0; +#X connect 209 0 131 0; +#X connect 210 0 142 0; +#X connect 211 0 153 0; +#X connect 212 0 164 0; +#X connect 213 0 175 0; +#X connect 214 0 186 0; +#X connect 215 0 197 0; +#X connect 232 0 126 0; +#X connect 233 0 137 0; +#X connect 234 0 148 0; +#X connect 235 0 159 0; +#X connect 236 0 170 0; +#X connect 237 0 181 0; +#X connect 238 0 192 0; +#X connect 239 0 203 0; +#X restore 38 387 pd assigns; +#X connect 1 0 0 0; +#X connect 2 0 1 0; +#X connect 3 0 2 0; +#X connect 4 0 5 0; +#X connect 6 0 4 0; +#X restore 663 303 pd audio; +#X floatatom 376 186 3 0 0 0 - tone-vu9 -; +#X floatatom 403 186 3 0 0 0 - tone-vu10 -; +#X floatatom 434 186 3 0 0 0 - tone-vu11 -; +#X floatatom 461 186 3 0 0 0 - tone-vu12 -; +#X floatatom 492 186 3 0 0 0 - tone-vu13 -; +#X floatatom 519 186 3 0 0 0 - tone-vu14 -; +#X floatatom 552 186 3 0 0 0 - tone-vu15 -; +#X floatatom 579 186 3 0 0 0 - tone-vu16 -; +#X obj 376 158 tgl 20 0 tone-ch9 tone-ch9 9 5 -8 0 12 -262144 -1 -1 +0 1; +#X obj 401 158 tgl 20 0 tone-ch10 tone-ch10 10 5 -8 0 12 -262144 -1 +-1 0 1; +#X obj 434 158 tgl 20 0 tone-ch11 tone-ch11 11 5 -8 0 12 -262144 -1 +-1 0 1; +#X obj 459 158 tgl 20 0 tone-ch12 tone-ch12 12 5 -8 0 12 -262144 -1 +-1 0 1; +#X obj 492 158 tgl 20 0 tone-ch13 tone-ch13 13 5 -8 0 12 -262144 -1 +-1 0 1; +#X obj 517 158 tgl 20 0 tone-ch14 tone-ch14 14 5 -8 0 12 -262144 -1 +-1 0 1; +#X obj 551 158 tgl 20 0 tone-ch15 tone-ch15 15 5 -8 0 12 -262144 -1 +-1 0 1; +#X obj 576 158 tgl 20 0 tone-ch116 tone-ch16 16 5 -8 0 12 -262144 -1 +-1 0 1; +#X text 24 341 PD is BSD licensed. See the file \, LICENSE.txt in the +distribution.; +#X connect 1 0 2 0; +#X connect 1 1 2 1; +#X connect 2 0 3 0; +#X connect 2 1 0 0; +#X connect 9 0 8 0; +#X connect 9 1 7 0; +#X connect 15 0 10 0; diff --git a/pd/extra/bonk~/bonk~-help.pd b/pd/extra/bonk~/bonk~-help.pd index b1b93f62..e52b7c50 100644 --- a/pd/extra/bonk~/bonk~-help.pd +++ b/pd/extra/bonk~/bonk~-help.pd @@ -1,9 +1,9 @@ -#N canvas 33 37 964 579 12; +#N canvas 43 123 1054 583 12; #X obj 382 492 spigot; -#X msg 452 292 bang; -#X obj 452 456 bonk~; -#X msg 452 359 print; -#X obj 396 429 adc~; +#X msg 484 293 bang; +#X obj 483 454 bonk~; +#X msg 483 357 print; +#X obj 435 428 adc~; #X msg 637 506 \; pd dsp 1; #X obj 300 492 spigot; #N canvas 366 126 604 404 synth 0; @@ -63,30 +63,30 @@ #X msg 900 470 90; #X text 625 472 click here; #X text 626 485 to start DSP; -#X text 5 284 In this patch \, after starting DSP \, you can print +#X text 5 285 In this patch \, after starting DSP \, you can print out the raw or cooked output using the two "spigots" or listen to a synthesizer output by raising its volume.; #X text 770 469 output volume; #X text 784 487 (0-100); -#X msg 452 140 mask 4 0.7; -#X text 547 122 Describes how energy in each frequency band masks later +#X msg 483 138 mask 4 0.7; +#X text 578 120 Describes how energy in each frequency band masks later energy in the band. Here the masking is total for 4 analysis periods and then drops by 0.7 each period.; -#X text 497 288 Poll the current spectrum via "raw" outlet \, You can +#X text 528 286 Poll the current spectrum via "raw" outlet \, You can set a very high threshold if you don't want attacks mixed in.; -#X msg 452 333 debug 0; -#X text 530 333 turn debugging on or off.; +#X msg 483 331 debug 0; +#X text 561 331 turn debugging on or off.; #X obj 349 493 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X obj 431 493 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X obj 382 522 print cooked; #X obj 300 522 print raw; -#X text 182 493 enable printout:; -#X text 529 204 Minimum "velocity" to output (quieter notes are ignored.) +#X text 162 491 enable printout:; +#X text 560 202 Minimum "velocity" to output (quieter notes are ignored.) ; #X obj 485 481 s bonk-cooked; -#X text 8 144 Bonk's two outputs are the raw spectrum of the attack +#X text 8 145 Bonk's two outputs are the raw spectrum of the attack (provided as a list of 11 numbers giving the signal "loudness" in the 11 frequency bands used) \, and the "cooked" output which gives only an instrument number (counting up from zero) and a "velocity". This @@ -94,20 +94,20 @@ an instrument number (counting up from zero) and a "velocity". This bands \, normalized so that 100 is an attack of amplitude of about 1 The instrument number is significant only if Bonk has a "template set" in memory.; -#X text 549 37 Set low and high thresholds. Signal growth must exceed +#X text 580 35 Set low and high thresholds. Signal growth must exceed the high one and then fall to the low one to make an attack. The unit is the sum of the proportional growth in the 11 filter bands. Proportional growth is essentially the logarithmic time derivative.; -#X msg 452 386 print 1; -#X text 520 388 print out filterbank settings; -#X text 9 32 The Bonk object takes an audio signal input and looks +#X msg 483 384 print 1; +#X text 551 386 print out filterbank settings; +#X text 9 33 The Bonk object takes an audio signal input and looks for "attacks" defined as sharp changes in the spectral envelope of the incoming sound. Optionally \, and less reliably \, you can have Bonk check the attack against a collection of stored templates to try to guess which of two or more instruments was hit. Bonk is described theoretically in the 1998 ICMC proceedings \, reprinted on crca.ucsd.edu/~msp .; -#N canvas 422 63 701 719 creation-arguments 0; +#N canvas 723 241 701 719 creation-arguments 0; #X text 228 14 creation arguments for bonk~; #X text 70 272 -npts 256; #X text 44 244 default value:; @@ -167,24 +167,24 @@ to erase and record over a template.; #X connect 3 0 6 0; #X connect 4 0 6 0; #X connect 5 0 6 0; -#X restore 469 423 pd templates; -#X msg 452 70 thresh 2.5 5; -#X msg 452 175 attack-frames 1; -#X text 574 176 number of frames over which to measure growth; -#X text 564 423 more messages for managing templates; -#X msg 452 203 minvel 7; -#X msg 452 230 spew 0; -#X text 519 232 Turn spew mode on/off; -#X msg 452 257 useloudness 0; -#X text 558 265 experimental: use alternative loudness units; +#X restore 500 421 pd templates; +#X msg 483 68 thresh 2.5 5; +#X msg 483 173 attack-frames 1; +#X text 608 174 number of frames over which to measure growth; +#X text 605 422 more messages for managing templates; +#X msg 483 201 minvel 7; +#X msg 483 228 spew 0; +#X text 550 230 Turn spew mode on/off; +#X msg 483 255 useloudness 0; +#X text 597 254 experimental: use alternative loudness units; #X text 212 9 BONK~ - attack detection and spectral envelope measurement ; #X text 734 552 Updated for Pd version 0.42; -#X text 5 343 By default bonk's analysis is carried out on a 256-point +#X text 5 344 By default bonk's analysis is carried out on a 256-point window (6 msec at 44.1 kHz) and the analysis period is 128 samples. These and other parameters may be overridden using creation arguments as shown in the subpatch below:; -#X text 521 358 Print out settings and templates.; +#X text 552 356 Print out settings and templates.; #X connect 0 0 23 0; #X connect 1 0 2 0; #X connect 2 0 6 0; diff --git a/pd/extra/lrshift~/lrshift~-help.pd b/pd/extra/lrshift~/lrshift~-help.pd index cdfd8830..fdf7b0c5 100644 --- a/pd/extra/lrshift~/lrshift~-help.pd +++ b/pd/extra/lrshift~/lrshift~-help.pd @@ -10,20 +10,24 @@ #X text 243 224 shift right; #X obj 161 252 lrshift~ 1; #X obj 244 251 lrshift~ -1; -#X text 39 37 Acting at whatever vector size the window is running at \, lrshift~ shifts samples to the left (toward the beginning sample) or to the right. The argument gives the direction and the amount of the shift. The rightmost (or leftmost) samples are set to zero.; -#X graph graph2 0 0 63 1 448 258 648 118; -#X array shiftin 64 float; -#X pop; -#X obj 47 11 rlshift~; +#X text 39 37 Acting at whatever vector size the window is running +at \, lrshift~ shifts samples to the left (toward the beginning sample) +or to the right. The argument gives the direction and the amount of +the shift. The rightmost (or leftmost) samples are set to zero.; +#N canvas 0 0 450 300 (subpatch) 0; +#X array shiftin 64 float 0; +#X coords 0 1 63 0 200 140 1; +#X restore 448 118 graph; #X text 115 11 -- shift signal vector elements left or right; #X msg 54 138 \; pd dsp 1 \; shiftin 1 1; #X obj 48 204 tabreceive~ shiftin; #X text 525 308 Updated for Pd 0.31.; +#X obj 47 11 lrshift~; #X connect 0 0 1 0; #X connect 2 0 3 0; #X connect 5 0 6 0; #X connect 9 0 3 0; #X connect 10 0 1 0; -#X connect 16 0 6 0; -#X connect 16 0 9 0; -#X connect 16 0 10 0; +#X connect 15 0 6 0; +#X connect 15 0 9 0; +#X connect 15 0 10 0; diff --git a/pd/extra/lrshift~/lrshift~.c b/pd/extra/lrshift~/lrshift~.c index ba1d5eeb..166facc1 100644 --- a/pd/extra/lrshift~/lrshift~.c +++ b/pd/extra/lrshift~/lrshift~.c @@ -8,6 +8,7 @@ typedef struct _lrshift_tilde { t_object x_obj; int x_n; + float x_f; } t_lrshift_tilde; static t_int *leftshift_perform(t_int *w) @@ -59,6 +60,7 @@ static void *lrshift_tilde_new(t_floatarg f) { t_lrshift_tilde *x = (t_lrshift_tilde *)pd_new(lrshift_tilde_class); x->x_n = f; + x->x_f = 0; outlet_new(&x->x_obj, gensym("signal")); return (x); } @@ -68,7 +70,7 @@ void lrshift_tilde_setup(void) lrshift_tilde_class = class_new(gensym("lrshift~"), (t_newmethod)lrshift_tilde_new, 0, sizeof(t_lrshift_tilde), 0, A_DEFFLOAT, 0); - class_addmethod(lrshift_tilde_class, nullfn, gensym("signal"), 0); + CLASS_MAINSIGNALIN(lrshift_tilde_class, t_lrshift_tilde, x_f); class_addmethod(lrshift_tilde_class, (t_method)lrshift_tilde_dsp, gensym("dsp"), 0); } diff --git a/pd/extra/pd~/pd~.c b/pd/extra/pd~/pd~.c index eba594c8..165065f8 100644 --- a/pd/extra/pd~/pd~.c +++ b/pd/extra/pd~/pd~.c @@ -289,7 +289,9 @@ static t_int *pd_tilde_perform(t_int *w) if (!infd) goto zeroit; fprintf(x->x_outfd, ";\n"); - for (i = 0; i < x->x_ninsig; i++) + if (!x->x_ninsig) + fprintf(x->x_outfd, "0\n"); + else for (i = 0; i < x->x_ninsig; i++) { t_sample *fp = x->x_insig[i]; for (j = 0; j < n; j++) @@ -373,7 +375,7 @@ static void pd_tilde_pdtilde(t_pd_tilde *x, t_symbol *s, int argc, t_atom *argv) { t_symbol *sel = ((argc > 0 && argv->a_type == A_SYMBOL) ? - argv->a_w.w_symbol : gensym("?")); + argv->a_w.w_symbol : gensym("?")), *schedlibdir; char *patchdir; if (sel == gensym("start")) { @@ -392,11 +394,14 @@ static void pd_tilde_pdtilde(t_pd_tilde *x, t_symbol *s, } patchdir = canvas_getdir(x->x_canvas)->s_name; #endif -#ifdef MAX +#ifdef MSP while (argc--) { + /* because Mac pathnames sometimes have an evil preceeding + colon character, we test for and silently eat them */ if (argv->a_type == A_SYM) - strncat(pdargstring, argv->a_w.w_sym->s_name, + strncat(pdargstring, (*argv->a_w.w_sym->s_name == ':'? + argv->a_w.w_sym->s_name+1 : argv->a_w.w_sym->s_name), MAXPDSTRING - strlen(pdargstring)-3); else if (argv->a_type == A_LONG) snprintf(pdargstring+strlen(pdargstring), @@ -411,7 +416,17 @@ static void pd_tilde_pdtilde(t_pd_tilde *x, t_symbol *s, } patchdir = "."; #endif - pd_tilde_donew(x, x->x_pddir->s_name, x->x_schedlibdir->s_name, + schedlibdir = x->x_schedlibdir; + if (schedlibdir == gensym(".") && x->x_pddir != gensym(".")) + { + char *pds = x->x_pddir->s_name, scheddirstring[MAXPDSTRING]; + int l = strlen(pds); + if (l >= 4 && (!strcmp(pds+l-3, "bin") || !strcmp(pds+l-4, "bin/"))) + snprintf(scheddirstring, MAXPDSTRING, "%s/../extra/pd~", pds); + else snprintf(scheddirstring, MAXPDSTRING, "%s/extra/pd~", pds); + schedlibdir = gensym(scheddirstring); + } + pd_tilde_donew(x, x->x_pddir->s_name, schedlibdir->s_name, patchdir, pdargstring, x->x_ninsig, x->x_noutsig, x->x_fifo, x->x_sr); } @@ -420,6 +435,19 @@ static void pd_tilde_pdtilde(t_pd_tilde *x, t_symbol *s, if (x->x_infd) pd_tilde_close(x); } + else if (sel == gensym("pddir")) + { + if ((argc > 1) && argv[1].a_type == A_SYMBOL) + { + t_symbol *sym = argv[1].a_w.w_symbol; +#ifdef MSP + if (sym->s_name[0] == ':') + sym = gensym(s->s_name+1); +#endif + x->x_pddir = sym; + } + else ERROR "pd~ pddir: needs symbol argument"); + } else ERROR "pd~: unknown control message: %s", sel->s_name); } @@ -594,20 +622,15 @@ static void pd_tilde_tick(t_pd_tilde *x) if (i > messstart + 1) { void *whom; - if (vec[messstart].a_type != A_SYM) - ERROR "pd_tilde_tick got non-symbol?"); - else if (!(whom = vec[messstart].a_w.w_sym->s_thing)) - ERROR "%s: no such object", - vec[messstart].a_w.w_sym->s_name); - else if (vec[messstart+1].a_type == A_SYM) - typedmess(whom, vec[messstart+1].a_w.w_sym, - i-messstart-2, vec+(messstart+2)); - else if (vec[messstart+1].a_type == A_FLOAT && i == messstart+2) - typedmess(whom, gensym("float"), 1, vec+(messstart+1)); - else if (vec[messstart+1].a_type == A_LONG && i == messstart+2) - typedmess(whom, gensym("int"), 1, vec+(messstart+1)); - else typedmess(whom, gensym("list"), - i-messstart-1, vec+(messstart+1)); + if (vec[messstart].a_type == A_SYM) + outlet_anything(x->x_outlet1, vec[messstart].a_w.w_sym, + i-messstart-1, vec+(messstart+1)); + else if (vec[messstart].a_type == A_FLOAT && i == messstart+1) + outlet_float(x->x_outlet1, vec[messstart].a_w.w_float); + else if (vec[messstart].a_type == A_LONG && i == messstart+1) + outlet_int(x->x_outlet1, vec[messstart].a_w.w_long); + else outlet_list(x->x_outlet1, gensym("list"), + i-messstart, vec+(messstart)); } messstart = i+1; } @@ -711,20 +734,10 @@ static void *pd_tilde_new(t_symbol *s, long ac, t_atom *av) } else break; } - if (scheddir == gensym(".") && pddir != gensym(".")) - { - char *pds = pddir->s_name, scheddirstring[MAXPDSTRING]; - int l = strlen(pds); - if (l >= 4 && (!strcmp(pds+l-3, "bin") || !strcmp(pds+l-4, "bin/"))) - snprintf(scheddirstring, MAXPDSTRING, "%s/../extra/pd~", pds); - else snprintf(scheddirstring, MAXPDSTRING, "%s/extra/pd~", pds); - scheddir = gensym(scheddirstring); - } if (ac) post("pd~: warning: ignoring extra arguments"); - post("pd~: pddir %s scheddir %s", - pddir->s_name, scheddir->s_name); dsp_setup((t_pxobject *)x, ninsig); + x->x_outlet1 = outlet_new(&x->x_obj, 0); for (j = 0; j < noutsig; j++) outlet_new((t_pxobject *)x, "signal"); x->x_clock = clock_new(x, (method)pd_tilde_tick); diff --git a/pd/src/d_math.c b/pd/src/d_math.c index 738f2d6c..31c6c655 100644 --- a/pd/src/d_math.c +++ b/pd/src/d_math.c @@ -627,7 +627,7 @@ t_int *exp_tilde_perform(t_int *w) t_sample *out = (t_sample *)(w[2]); int n = (int)(w[3]); while (n--) - *out = exp(*in1); + *out++ = exp(*in1++); return (w+4); } @@ -720,7 +720,7 @@ t_int *abs_tilde_perform(t_int *w) while (n--) { float f = *in1++; - *out = (f >= 0 ? f : -f); + *out++ = (f >= 0 ? f : -f); } return (w+4); } diff --git a/pd/src/m_pd.h b/pd/src/m_pd.h index 534faac0..e3504c26 100644 --- a/pd/src/m_pd.h +++ b/pd/src/m_pd.h @@ -10,8 +10,8 @@ extern "C" { #define PD_MAJOR_VERSION 0 #define PD_MINOR_VERSION 42 -#define PD_BUGFIX_VERSION 4 -#define PD_TEST_VERSION "" +#define PD_BUGFIX_VERSION 5 +#define PD_TEST_VERSION "test1" /* old name for "MSW" flag -- we have to take it for the sake of many old "nmakefiles" for externs, which will define NT and not MSW */ diff --git a/pd/src/notes.txt b/pd/src/notes.txt index c11ef4e8..6c98ca0a 100644 --- a/pd/src/notes.txt +++ b/pd/src/notes.txt @@ -1,8 +1,10 @@ -bug: go to ~/rep/rand, start pd, use open panel to open ../mark/mark.pd - crash ---------------- dolist -------------------- -test: +doc: +exp~, abs~ fixes +pd~ -ninsig 0 bug fixed + compile on various versions of linux windows: modal dialogs confuse watchdog diff --git a/pd/src/s_audio_pa.c b/pd/src/s_audio_pa.c index 66618d46..de5fe711 100644 --- a/pd/src/s_audio_pa.c +++ b/pd/src/s_audio_pa.c @@ -13,9 +13,12 @@ #include <stdlib.h> #include <portaudio.h> #include "s_audio_pablio.h" +#ifdef MSW +#include <malloc.h> +#else +#include <alloca.h> +#endif -#define MAX_PA_CHANS 32 -#define MAX_SAMPLES_PER_FRAME (MAX_PA_CHANS * DEFDACBLKSIZE) /* LATER try to figure out how to handle default devices in portaudio; the way s_audio.c handles them isn't going to work here. */ @@ -196,16 +199,6 @@ int pa_open_audio(int inchans, int outchans, int rate, t_sample *soundin, /* fprintf(stderr, "open callback %d\n", (callbackfn != 0)); */ pa_init(); /* post("in %d out %d rate %d device %d", inchans, outchans, rate, deviceno); */ - if (inchans > MAX_PA_CHANS) - { - post("input channels reduced to maximum %d", MAX_PA_CHANS); - inchans = MAX_PA_CHANS; - } - if (outchans > MAX_PA_CHANS) - { - post("output channels reduced to maximum %d", MAX_PA_CHANS); - outchans = MAX_PA_CHANS; - } if (inchans > 0) { @@ -288,10 +281,15 @@ void pa_close_audio( void) int pa_send_dacs(void) { - float samples[MAX_SAMPLES_PER_FRAME], *fp1, *fp2; + unsigned int framesize = (sizeof(float) * DEFDACBLKSIZE) * + (pa_inchans > pa_outchans ? pa_inchans:pa_outchans); + float *samples, *fp1, *fp2; int i, j; double timebefore; + + samples = alloca(framesize); + timebefore = sys_getrealtime(); if ((pa_inchans && GetAudioStreamReadable(pa_stream) < DEFDACBLKSIZE) || (pa_outchans && GetAudioStreamWriteable(pa_stream) < DEFDACBLKSIZE)) diff --git a/pd/src/s_midi_oss.c b/pd/src/s_midi_oss.c index e1f7c8c6..5c11bae3 100644 --- a/pd/src/s_midi_oss.c +++ b/pd/src/s_midi_oss.c @@ -17,6 +17,8 @@ #include "m_pd.h" #include "s_stuff.h" +#define NSEARCH 10 +static int oss_nmidiindevs, oss_nmidioutdevs, oss_initted, oss_onebased; static int oss_nmidiin; static int oss_midiinfd[MAXMIDIINDEV]; static int oss_nmidiout; @@ -41,7 +43,7 @@ void sys_do_open_midi(int nmidiin, int *midiinvec, { int fd = -1, j, outdevindex = -1; char namebuf[80]; - int devno = midiinvec[i]; + int devno = midiinvec[i] + oss_onebased; for (j = 0; j < nmidiout; j++) if (midioutvec[j] == midiinvec[i]) @@ -115,7 +117,7 @@ void sys_do_open_midi(int nmidiin, int *midiinvec, { int fd = oss_midioutfd[i]; char namebuf[80]; - int devno = midioutvec[i]; + int devno = midioutvec[i] + oss_onebased; if (devno == 0 && fd < 0) { sys_setalarm(1000000); @@ -266,23 +268,26 @@ void sys_close_midi() oss_nmidiin = oss_nmidiout = 0; } -#define NSEARCH 10 -static int oss_nmidiindevs, oss_nmidioutdevs, oss_initted; - void midi_oss_init(void) { - int i; + int i, fd, devno; + struct stat statbuf; + char namebuf[80]; + if (oss_initted) return; oss_initted = 1; + /* at some point, Fedora started counting MIDI devices from one - + catch that here: */ + oss_onebased = (stat("/dev/midi1", &statbuf) >= 0 && + stat("/dev/midi0", &statbuf) < 0); + for (i = 0; i < NSEARCH; i++) { - int fd; - char namebuf[80]; - oss_nmidiindevs = i; + devno = i + oss_onebased; /* try to open the device for reading */ - if (i == 0) + if (devno == 0) { fd = open("/dev/midi", O_RDONLY | O_NDELAY); if (fd >= 0) @@ -291,14 +296,14 @@ void midi_oss_init(void) continue; } } - sprintf(namebuf, "/dev/midi%2.2d", i); + sprintf(namebuf, "/dev/midi%2.2d", devno); fd = open(namebuf, O_RDONLY | O_NDELAY); if (fd >= 0) { close(fd); continue; } - sprintf(namebuf, "/dev/midi%d", i); + sprintf(namebuf, "/dev/midi%d", devno); fd = open(namebuf, O_RDONLY | O_NDELAY); if (fd >= 0) { @@ -309,12 +314,10 @@ void midi_oss_init(void) } for (i = 0; i < NSEARCH; i++) { - int fd; - char namebuf[80]; - oss_nmidioutdevs = i; + devno = i + oss_onebased; /* try to open the device for writing */ - if (i == 0) + if (devno == 0) { fd = open("/dev/midi", O_WRONLY | O_NDELAY); if (fd >= 0) @@ -323,14 +326,14 @@ void midi_oss_init(void) continue; } } - sprintf(namebuf, "/dev/midi%2.2d", i); + sprintf(namebuf, "/dev/midi%2.2d", devno); fd = open(namebuf, O_WRONLY | O_NDELAY); if (fd >= 0) { close(fd); continue; } - sprintf(namebuf, "/dev/midi%d", i); + sprintf(namebuf, "/dev/midi%d", devno); fd = open(namebuf, O_WRONLY | O_NDELAY); if (fd >= 0) { |