aboutsummaryrefslogtreecommitdiff
path: root/sonogram~/rs-sonogram~.pd
diff options
context:
space:
mode:
Diffstat (limited to 'sonogram~/rs-sonogram~.pd')
-rw-r--r--sonogram~/rs-sonogram~.pd307
1 files changed, 307 insertions, 0 deletions
diff --git a/sonogram~/rs-sonogram~.pd b/sonogram~/rs-sonogram~.pd
new file mode 100644
index 0000000..864666f
--- /dev/null
+++ b/sonogram~/rs-sonogram~.pd
@@ -0,0 +1,307 @@
+#N canvas 43 28 986 681 10;
+#X msg 306 57 record;
+#X msg 19 34 bang;
+#X obj 19 54 openpanel;
+#X obj 21 152 soundfiler;
+#X msg 259 42 bang;
+#X obj 262 101 rfft~;
+#X floatatom 59 171 10 0 0;
+#X msg 20 211 resize \$1;
+#X obj 19 74 t s b;
+#X obj 22 114 pack s s;
+#X msg 21 135 read -resize \$1 \$2;
+#X obj 68 74 float \$0;
+#X text 21 9 Step 1 : Load a sound file;
+#X obj 775 595 table \$0-sonosample;
+#X msg 927 588 \; pd dsp 1;
+#X msg 484 36 play;
+#X obj 262 195 outlet~;
+#X text 491 10 Step 3 : Play the recorded sonogram;
+#X msg 992 589 \; pd dsp 0;
+#X obj 21 171 / 256;
+#X obj 486 59 hsl 128 15 0 100 0 0 empty empty empty 20 8 0 8 -262144
+-1 -1 0 1;
+#X text 460 59 0 %;
+#X text 620 58 100 %;
+#X obj 487 77 hsl 128 15 0 100 0 0 empty empty empty 20 8 0 8 -262144
+-1 -1 12700 1;
+#X text 461 80 0 %;
+#X text 622 76 100 %;
+#X msg 661 74 100;
+#X obj 691 74 loadbang;
+#X text 640 40 Playback positions;
+#X obj 783 93 hsl 128 15 0 100 0 0 empty empty empty 20 8 0 8 -262144
+-1 -1 0 1;
+#X text 756 94 0 %;
+#X text 917 92 100 %;
+#X obj 784 111 hsl 128 15 0 100 0 0 empty empty empty 20 8 0 8 -262144
+-1 -1 12700 1;
+#X text 756 114 0 %;
+#X text 919 110 100 %;
+#X text 783 76 Set portion of the sonogram to modify;
+#X msg 953 108 100;
+#N canvas 309 22 600 544 modifications 0;
+#X text 234 236 Filter a frequency;
+#X text 254 190 Enhance a frequency by 10% ( might be a range of frequencies
+with message 'enhance f1 f2 x' );
+#X text 180 309 Flip frequencies ( dogs love it );
+#X msg 108 265 swappoints 1000;
+#X obj 181 134 hdl 8 1 0 128 empty empty empty 20 8 0 8 -260818 -24198
+-128992 0;
+#X msg 108 153 swapfreqs \$1 \$2;
+#X obj 224 152 pack f f;
+#X text 220 267 Swap 1000 points ( rain effect );
+#X msg 153 131 \$1;
+#X obj 108 131 change;
+#X obj 181 114 hdl 8 1 0 128 empty empty empty 20 8 0 8 -260818 -24198
+-128992 0;
+#X msg 153 111 \$1;
+#X obj 108 111 change;
+#X obj 180 182 hdl 8 1 0 128 empty empty empty 20 8 0 8 -260818 -24198
+-128992 0;
+#X obj 180 223 hdl 8 1 0 128 empty empty empty 20 8 0 8 -260818 -24198
+-128992 0;
+#X text 285 152 Swap two frequencies ( set 2nd \, click 1st );
+#X msg 110 308 flipfreqs;
+#X msg 110 330 flipblocks;
+#X text 243 286 Swap section [0% \, 20%] and [50% \, 70%] of [start
+\, end];
+#X text 188 328 Flip blocks ( reverse effect );
+#X msg 110 287 swapblocks 0 50 20;
+#X text 228 66 Move frequencies up or down;
+#X msg 110 91 roll 2;
+#X msg 112 350 zswap;
+#X text 364 374 Change the phase;
+#X text 180 350 Exchange real and imaginery parts ( noisy filter )
+;
+#X msg 113 374 phase \$1;
+#X obj 200 373 hsl 128 15 0 90 0 0 empty empty empty 20 8 0 8 -262144
+-1 -1 0 1;
+#X text 184 373 0;
+#X text 339 374 90;
+#X obj 187 415 hdl 8 1 0 128 empty empty empty 20 8 0 8 -260818 -24198
+-128992 0;
+#X msg 113 429 add \$1 \$1 0.5;
+#X text 216 429 Add a constant to a frequency;
+#X obj 189 451 hdl 8 1 0 128 empty empty empty 20 8 0 8 -260818 -24198
+-128992 0;
+#X msg 115 466 add \$1 \$1 -0.5;
+#X text 218 465 Sub a constant from a frequency;
+#X msg 113 395 average 100;
+#X text 198 393 Average over 100 blocks ( smooth with some sounds )
+;
+#X obj 16 454 outlet;
+#X msg 109 69 goup 1;
+#X msg 159 69 godown 5;
+#X msg 107 198 enhance \$1 \$1 1.1 0;
+#X msg 116 488 threshold \$1;
+#X floatatom 208 489 5 0 0;
+#X msg 107 239 enhance \$1 \$1 0 0;
+#X text 249 488 Suppress all points below the threshold;
+#X text 159 91 Roll frequencies : same as above but without loss;
+#X connect 3 0 38 0;
+#X connect 4 0 8 0;
+#X connect 5 0 38 0;
+#X connect 6 0 5 0;
+#X connect 8 0 9 0;
+#X connect 9 0 6 1;
+#X connect 10 0 11 0;
+#X connect 11 0 12 0;
+#X connect 12 0 6 0;
+#X connect 13 0 41 0;
+#X connect 14 0 44 0;
+#X connect 16 0 38 0;
+#X connect 17 0 38 0;
+#X connect 20 0 38 0;
+#X connect 22 0 38 0;
+#X connect 23 0 38 0;
+#X connect 26 0 38 0;
+#X connect 27 0 26 0;
+#X connect 30 0 31 0;
+#X connect 31 0 38 0;
+#X connect 33 0 34 0;
+#X connect 34 0 38 0;
+#X connect 36 0 38 0;
+#X connect 39 0 38 0;
+#X connect 40 0 38 0;
+#X connect 41 0 38 0;
+#X connect 42 0 38 0;
+#X connect 43 0 42 0;
+#X connect 44 0 38 0;
+#X restore 861 131 pd modifications;
+#X text 513 609 Zoom factor (>1);
+#X msg 418 608 zoom 2;
+#X obj 256 79 tabplay~ \$0-sonosample;
+#X obj 80 275 sonogram~ 463 1 1 1;
+#X msg 467 608 zoom 1;
+#X msg 484 99 readspeed \$1;
+#X floatatom 617 99 5 0 0;
+#X text 487 121 Reading speed;
+#X obj 576 99 / 100;
+#X msg 661 99 100;
+#X obj 692 99 loadbang;
+#X msg 779 167 play;
+#X msg 780 186 open /tmp/sonogram.wav;
+#X obj 779 229 writesf~ 2;
+#X msg 780 207 start;
+#X msg 822 207 stop;
+#X msg 418 652 modstep \$1;
+#X floatatom 499 652 5 0 0;
+#X obj 525 36 spigot;
+#X obj 573 36 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 0 1
+;
+#X text 600 37 Loop;
+#X text 70 547 Mouse modifications :;
+#X text 557 656 ( default = 1.1 );
+#X text 558 646 Value added or multiplied ( can be < 0 );
+#X obj 527 588 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 0
+1;
+#X obj 19 93 route float;
+#X msg 418 587 enhancemode \$1;
+#X text 821 166 Record;
+#X text 89 562 Normal mode;
+#X text 30 579 <shift>click :;
+#X text 128 579 add modstep to the selected data;
+#X text 43 590 <alt>click :;
+#X text 161 590 erase selected data;
+#X text 154 645 erase selected data;
+#X text 88 615 Enhanced mode;
+#X text 2 600 <shift><alt>click :;
+#X text 162 601 paste selected data;
+#X text 129 656 add selected data at the new location;
+#X text 483 546 Graphic actions;
+#X text 128 632 multiply the selected data by modstep;
+#X obj 980 109 loadbang;
+#X text 73 21 ( a small one );
+#X text 417 569 Activate enhance mode;
+#X text 785 57 Step 4 : modify parts of the sonogram;
+#X obj 260 126 rifft~;
+#X msg 418 630 refresh;
+#X obj 829 571 block~ 256;
+#X text 239 10 Step 2 : Record the sonogram;
+#X obj 927 565 loadbang;
+#N canvas 0 1 682 488 envelop 0;
+#X obj 33 400 outlet;
+#X obj 46 327 tabread envelop;
+#X msg 23 263 bang;
+#X floatatom 23 299 5 0 0;
+#X obj 71 280 + 1;
+#X msg 23 281 0;
+#X text 25 239 Apply envelop;
+#X obj 68 300 delay 1000;
+#X obj 136 300 f;
+#X obj 34 354 pack f f;
+#X obj 368 349 loadbang;
+#X msg 425 349 bang;
+#X msg 370 374 \; envelop const 1;
+#X msg 203 381 refresh;
+#X floatatom 160 280 5 0 0;
+#X msg 163 300 bang;
+#X obj 98 280 moses 127;
+#X msg 485 347 bang;
+#X msg 486 372 \; envelop const 0.001;
+#X msg 33 377 enhance \$1 \$1 \$2 1;
+#X obj 202 358 delay 1000;
+#N canvas 0 0 450 300 graph2 0;
+#X array envelop 64 float 1;
+#A 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1;
+#X coords 0 10 63 0 300 200 1;
+#X restore 151 12 graph;
+#X connect 1 0 9 1;
+#X connect 2 0 5 0;
+#X connect 3 0 1 0;
+#X connect 3 0 8 1;
+#X connect 3 0 7 0;
+#X connect 3 0 9 0;
+#X connect 4 0 3 0;
+#X connect 5 0 3 0;
+#X connect 7 0 8 0;
+#X connect 8 0 16 0;
+#X connect 9 0 19 0;
+#X connect 10 0 12 0;
+#X connect 11 0 12 0;
+#X connect 13 0 0 0;
+#X connect 14 0 15 0;
+#X connect 15 0 20 0;
+#X connect 16 0 4 0;
+#X connect 16 1 14 0;
+#X connect 17 0 18 0;
+#X connect 19 0 0 0;
+#X connect 20 0 13 0;
+#X restore 780 131 pd envelop;
+#X obj 310 174 / 100;
+#X floatatom 309 147 5 0 0;
+#X obj 263 174 *~ 1;
+#X obj 261 149 /~ 256;
+#X text 332 129 Volume;
+#X text 31 631 <shift>click :;
+#X text 44 642 <alt>click :;
+#X text 3 652 <shift><alt>click :;
+#X msg 488 630 undo;
+#X text 526 630 One level undo;
+#X obj 21 192 makefilename %d-sonosample;
+#X connect 0 0 41 0;
+#X connect 1 0 2 0;
+#X connect 2 0 8 0;
+#X connect 3 0 19 0;
+#X connect 4 0 0 0;
+#X connect 4 0 40 0;
+#X connect 5 0 41 0;
+#X connect 5 1 41 1;
+#X connect 6 0 7 0;
+#X connect 7 0 41 0;
+#X connect 8 0 9 0;
+#X connect 8 1 11 0;
+#X connect 9 0 10 0;
+#X connect 10 0 3 0;
+#X connect 11 0 63 0;
+#X connect 15 0 41 0;
+#X connect 19 0 6 0;
+#X connect 20 0 41 2;
+#X connect 23 0 41 3;
+#X connect 26 0 23 0;
+#X connect 27 0 26 0;
+#X connect 29 0 41 4;
+#X connect 32 0 41 5;
+#X connect 36 0 32 0;
+#X connect 37 0 41 0;
+#X connect 39 0 41 0;
+#X connect 40 0 5 0;
+#X connect 40 0 90 0;
+#X connect 41 0 82 0;
+#X connect 41 1 82 1;
+#X connect 41 3 53 0;
+#X connect 41 3 56 0;
+#X connect 42 0 41 0;
+#X connect 43 0 41 0;
+#X connect 44 0 46 0;
+#X connect 46 0 43 0;
+#X connect 47 0 44 0;
+#X connect 48 0 47 0;
+#X connect 49 0 41 0;
+#X connect 49 0 50 0;
+#X connect 49 0 52 0;
+#X connect 50 0 51 0;
+#X connect 52 0 51 0;
+#X connect 53 0 51 0;
+#X connect 54 0 41 0;
+#X connect 55 0 54 0;
+#X connect 56 0 15 0;
+#X connect 57 0 56 1;
+#X connect 62 0 64 0;
+#X connect 63 0 98 0;
+#X connect 64 0 41 0;
+#X connect 78 0 36 0;
+#X connect 82 0 91 0;
+#X connect 83 0 41 0;
+#X connect 86 0 14 0;
+#X connect 87 0 41 0;
+#X connect 88 0 90 1;
+#X connect 89 0 88 0;
+#X connect 90 0 16 0;
+#X connect 90 0 51 0;
+#X connect 90 0 51 1;
+#X connect 91 0 90 0;
+#X connect 96 0 41 0;
+#X connect 98 0 9 1;