diff options
Diffstat (limited to 'pvgrain~-help.pd')
-rw-r--r-- | pvgrain~-help.pd | 361 |
1 files changed, 361 insertions, 0 deletions
diff --git a/pvgrain~-help.pd b/pvgrain~-help.pd new file mode 100644 index 0000000..25b844b --- /dev/null +++ b/pvgrain~-help.pd @@ -0,0 +1,361 @@ +#N canvas 772 607 490 340 10; +#N canvas 0 22 482 332 pvgrain-block 0; +#X obj 9 110 outlet; +#X obj 9 15 inlet~; +#X obj 94 15 inlet; +#X obj 8 140 block~ 256; +#X text 12 90 args: grains/frame \, odds \, topfreq \, overlap \, window-factor +; +#X obj 9 68 pvgrain~ 4 0.01 2000 4 2; +#X connect 1 0 5 0; +#X connect 2 0 5 0; +#X connect 5 0 0 0; +#X restore 13 103 pd pvgrain-block; +#X obj 220 158 dac~; +#X obj 13 172 print; +#X msg 110 242 \; pd dsp \$1; +#X obj 110 221 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 +1; +#N canvas 368 141 902 629 messages 0; +#X obj 111 523 outlet; +#X msg 105 115 probability \$1; +#X obj 108 68 hsl 128 15 0 0.1 0 0 empty empty empty -2 -6 0 8 -43542 +-1 -1 1270 1; +#X floatatom 105 94 5 0 0 0 - - -; +#X obj 198 179 hsl 128 15 200 10000 0 0 empty empty empty -2 -6 0 8 +-43542 -1 -1 2333 1; +#X floatatom 195 205 5 0 0 0 - - -; +#X msg 195 226 topfreq \$1; +#X obj 439 388 hsl 128 15 0 20 0 0 empty empty empty -2 -6 0 8 -43542 +-1 -1 5080 1; +#X floatatom 436 414 5 0 0 0 - - -; +#X msg 436 435 framegrains \$1; +#X obj 105 1 loadbang; +#X obj 283 284 hsl 128 15 0 1500 0 0 empty empty empty -2 -6 0 8 -43542 +-1 -1 423 1; +#X floatatom 280 310 5 0 0 0 - - -; +#X msg 280 331 bottomfreq \$1; +#X obj 105 40 unpack f f f f; +#X msg 105 21 0.01 2000 50 8; +#X obj 300 492 fftease-system; +#X text 436 363 maximum data grains per FFT frame; +#X text 197 157 top frequency to listen to in source sound; +#X text 283 263 ditto for bottom frequency; +#X text 221 48 odds for a grain appearing from an active bin; +#X connect 1 0 0 0; +#X connect 2 0 3 0; +#X connect 3 0 1 0; +#X connect 4 0 5 0; +#X connect 5 0 6 0; +#X connect 6 0 0 0; +#X connect 7 0 8 0; +#X connect 8 0 9 0; +#X connect 9 0 0 0; +#X connect 10 0 15 0; +#X connect 11 0 12 0; +#X connect 12 0 13 0; +#X connect 13 0 0 0; +#X connect 14 0 2 0; +#X connect 14 1 4 0; +#X connect 14 2 11 0; +#X connect 14 3 7 0; +#X connect 15 0 14 0; +#X connect 16 0 0 0; +#X restore 120 62 pd messages; +#X obj 50 129 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 +; +#X obj 13 149 spigot; +#X text 69 131 see amp/freq info; +#X text 42 277 spectral granular (re)synthesis; +#N canvas 0 22 478 328 resynth-engine 0; +#X obj 12 28 inlet; +#N canvas 0 22 450 300 graph1 0; +#X array piano-sample 46383 float 2; +#X coords 0 1 46382 -1 200 140 1; +#X restore 215 4 graph; +#X obj 17 242 soundfiler; +#X msg 17 205 read -resize Piano.aif piano-sample; +#X obj 17 169 loadbang; +#N canvas 578 40 566 745 choir 0; +#X obj 79 103 inlet; +#X obj 79 141 t l b; +#X obj 25 199 float; +#X obj 25 228 + 1; +#X obj 25 252 % 8; +#X floatatom 25 276 5 0 0 0 - - -; +#X obj 47 367 pack f f f; +#X obj 79 315 unpack f f; +#X obj 47 395 route 0 1 2 3 4 5 6 7; +#X obj 112 343 / 261; +#X text 156 345 <- piano sample base frequency; +#N canvas 74 88 1066 749 playit 0; +#X obj 21 47 unpack f f; +#X obj 21 222 outlet~; +#X floatatom 131 120 5 0 0 0 - - -; +#X floatatom 88 118 5 0 0 0 - - -; +#X obj 21 119 impulse~; +#X obj 21 146 *~; +#X obj 21 80 t b f; +#X obj 21 182 player~ piano-sample; +#X obj 21 8 inlet; +#X connect 0 0 6 0; +#X connect 0 1 2 0; +#X connect 2 0 7 1; +#X connect 3 0 5 1; +#X connect 4 0 5 0; +#X connect 5 0 7 0; +#X connect 6 0 4 0; +#X connect 6 1 3 0; +#X connect 7 0 1 0; +#X connect 8 0 0 0; +#X restore 47 430 pd playit; +#X obj 123 595 outlet~; +#X obj 123 572 *~ 0.25; +#N canvas 74 88 1062 745 playit 0; +#X obj 21 47 unpack f f; +#X obj 21 222 outlet~; +#X floatatom 131 120 5 0 0 0 - - -; +#X floatatom 88 118 5 0 0 0 - - -; +#X obj 21 119 impulse~; +#X obj 21 146 *~; +#X obj 21 80 t b f; +#X obj 21 182 player~ piano-sample; +#X obj 21 8 inlet; +#X connect 0 0 6 0; +#X connect 0 1 2 0; +#X connect 2 0 7 1; +#X connect 3 0 5 1; +#X connect 4 0 5 0; +#X connect 5 0 7 0; +#X connect 6 0 4 0; +#X connect 6 1 3 0; +#X connect 7 0 1 0; +#X connect 8 0 0 0; +#X restore 64 451 pd playit; +#N canvas 74 88 1062 745 playit 0; +#X obj 21 47 unpack f f; +#X obj 21 222 outlet~; +#X floatatom 131 120 5 0 0 0 - - -; +#X floatatom 88 118 5 0 0 0 - - -; +#X obj 21 119 impulse~; +#X obj 21 146 *~; +#X obj 21 80 t b f; +#X obj 21 182 player~ piano-sample; +#X obj 21 8 inlet; +#X connect 0 0 6 0; +#X connect 0 1 2 0; +#X connect 2 0 7 1; +#X connect 3 0 5 1; +#X connect 4 0 5 0; +#X connect 5 0 7 0; +#X connect 6 0 4 0; +#X connect 6 1 3 0; +#X connect 7 0 1 0; +#X connect 8 0 0 0; +#X restore 83 472 pd playit; +#N canvas 74 88 1062 745 playit 0; +#X obj 21 47 unpack f f; +#X obj 21 222 outlet~; +#X floatatom 131 120 5 0 0 0 - - -; +#X floatatom 88 118 5 0 0 0 - - -; +#X obj 21 119 impulse~; +#X obj 21 146 *~; +#X obj 21 80 t b f; +#X obj 21 182 player~ piano-sample; +#X obj 21 8 inlet; +#X connect 0 0 6 0; +#X connect 0 1 2 0; +#X connect 2 0 7 1; +#X connect 3 0 5 1; +#X connect 4 0 5 0; +#X connect 5 0 7 0; +#X connect 6 0 4 0; +#X connect 6 1 3 0; +#X connect 7 0 1 0; +#X connect 8 0 0 0; +#X restore 101 493 pd playit; +#N canvas 74 88 1062 745 playit 0; +#X obj 21 47 unpack f f; +#X obj 21 222 outlet~; +#X floatatom 131 120 5 0 0 0 - - -; +#X floatatom 88 118 5 0 0 0 - - -; +#X obj 21 119 impulse~; +#X obj 21 146 *~; +#X obj 21 80 t b f; +#X obj 21 182 player~ piano-sample; +#X obj 21 8 inlet; +#X connect 0 0 6 0; +#X connect 0 1 2 0; +#X connect 2 0 7 1; +#X connect 3 0 5 1; +#X connect 4 0 5 0; +#X connect 5 0 7 0; +#X connect 6 0 4 0; +#X connect 6 1 3 0; +#X connect 7 0 1 0; +#X connect 8 0 0 0; +#X restore 118 421 pd playit; +#N canvas 74 88 1062 745 playit 0; +#X obj 21 47 unpack f f; +#X obj 21 222 outlet~; +#X floatatom 131 120 5 0 0 0 - - -; +#X floatatom 88 118 5 0 0 0 - - -; +#X obj 21 119 impulse~; +#X obj 21 146 *~; +#X obj 21 80 t b f; +#X obj 21 182 player~ piano-sample; +#X obj 21 8 inlet; +#X connect 0 0 6 0; +#X connect 0 1 2 0; +#X connect 2 0 7 1; +#X connect 3 0 5 1; +#X connect 4 0 5 0; +#X connect 5 0 7 0; +#X connect 6 0 4 0; +#X connect 6 1 3 0; +#X connect 7 0 1 0; +#X connect 8 0 0 0; +#X restore 135 442 pd playit; +#N canvas 74 88 1062 745 playit 0; +#X obj 21 47 unpack f f; +#X obj 21 222 outlet~; +#X floatatom 131 120 5 0 0 0 - - -; +#X floatatom 88 118 5 0 0 0 - - -; +#X obj 21 119 impulse~; +#X obj 21 146 *~; +#X obj 21 80 t b f; +#X obj 21 182 player~ piano-sample; +#X obj 21 8 inlet; +#X connect 0 0 6 0; +#X connect 0 1 2 0; +#X connect 2 0 7 1; +#X connect 3 0 5 1; +#X connect 4 0 5 0; +#X connect 5 0 7 0; +#X connect 6 0 4 0; +#X connect 6 1 3 0; +#X connect 7 0 1 0; +#X connect 8 0 0 0; +#X restore 154 463 pd playit; +#N canvas 74 88 1062 745 playit 0; +#X obj 21 47 unpack f f; +#X obj 21 222 outlet~; +#X floatatom 131 120 5 0 0 0 - - -; +#X floatatom 88 118 5 0 0 0 - - -; +#X obj 21 119 impulse~; +#X obj 21 146 *~; +#X obj 21 80 t b f; +#X obj 21 182 player~ piano-sample; +#X obj 21 8 inlet; +#X connect 0 0 6 0; +#X connect 0 1 2 0; +#X connect 2 0 7 1; +#X connect 3 0 5 1; +#X connect 4 0 5 0; +#X connect 5 0 7 0; +#X connect 6 0 4 0; +#X connect 6 1 3 0; +#X connect 7 0 1 0; +#X connect 8 0 0 0; +#X restore 172 484 pd playit; +#X connect 0 0 1 0; +#X connect 1 0 7 0; +#X connect 1 1 2 0; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 4 0 2 1; +#X connect 4 0 5 0; +#X connect 5 0 6 0; +#X connect 6 0 8 0; +#X connect 7 0 6 1; +#X connect 7 1 9 0; +#X connect 8 0 11 0; +#X connect 8 1 14 0; +#X connect 8 2 15 0; +#X connect 8 3 16 0; +#X connect 8 4 17 0; +#X connect 8 5 18 0; +#X connect 8 6 19 0; +#X connect 8 7 20 0; +#X connect 9 0 6 2; +#X connect 11 0 13 0; +#X connect 13 0 12 0; +#X connect 14 0 13 0; +#X connect 15 0 13 0; +#X connect 16 0 13 0; +#X connect 17 0 13 0; +#X connect 18 0 13 0; +#X connect 19 0 13 0; +#X connect 20 0 13 0; +#X restore 12 97 pd choir; +#X obj 12 121 outlet~; +#X text 13 269 this is one example of what you can do with the analysis +data; +#X obj 12 63 spigot; +#X obj 49 44 inlet; +#X obj 113 27 loadbang; +#X msg 113 47 0; +#X connect 0 0 8 0; +#X connect 3 0 2 0; +#X connect 4 0 3 0; +#X connect 5 0 6 0; +#X connect 8 0 5 0; +#X connect 9 0 8 1; +#X connect 10 0 11 0; +#X connect 11 0 8 1; +#X restore 220 119 pd resynth-engine; +#N canvas 408 408 482 332 sound-source 0; +#X obj -34 240 outlet~; +#X obj -34 215 *~ 0.3; +#X floatatom -34 72 5 0 0 0 - - -; +#X obj 149 119 * 1.5; +#X floatatom 51 142 5 0 0 0 - - -; +#X floatatom 149 143 5 0 0 0 - - -; +#X obj 51 161 phasor~ 586.6; +#X obj 149 161 phasor~ 660; +#X obj -34 161 phasor~ 440; +#X obj 51 119 * 1.25; +#X msg -34 41 440; +#X obj -34 15 loadbang; +#X text -18 262 a soundfile or live mic would be more interesting here +; +#X connect 1 0 0 0; +#X connect 2 0 3 0; +#X connect 2 0 8 0; +#X connect 2 0 9 0; +#X connect 3 0 5 0; +#X connect 4 0 6 0; +#X connect 5 0 7 0; +#X connect 6 0 1 0; +#X connect 7 0 1 0; +#X connect 8 0 1 0; +#X connect 9 0 4 0; +#X connect 10 0 2 0; +#X connect 11 0 10 0; +#X restore 13 41 pd sound-source; +#N canvas 180 51 470 320 what's-going-on-here? 0; +#X text 18 26 Input sound is analyzed and a certain number of bin snapshots +are taken \, based on the probability and framegrains parameters. Each +bin grain snapshot is sent out as a list with two members: [amplitude +\, frequency]. In this example the grain data is used to drive a sample +player. One could easily replace this with a synth or even drive an +external MIDI synth. This is something like a pitch-follower except +that it follows the entire spectrum (limited by the topfreq parameter) +rather than just looking for the fundamental. Since this is based on +FFT analysis the resolution is worse for lower frequencies. Frequency +resolution can be improved by upping the FFT size.; +#X restore 269 203 pd what's-going-on-here?; +#X obj 334 96 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 +; +#X text 356 98 <- turn me on; +#X text 204 64 <- check me out; +#X connect 0 0 7 0; +#X connect 0 0 10 0; +#X connect 4 0 3 0; +#X connect 5 0 0 1; +#X connect 6 0 7 1; +#X connect 7 0 2 0; +#X connect 10 0 1 0; +#X connect 10 0 1 1; +#X connect 11 0 0 0; +#X connect 13 0 10 1; |