From c0c7359304c7bb54d794c74b260d9b0bd18f02ae Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Fri, 13 Jun 2003 02:45:16 +0000 Subject: "" svn path=/trunk/; revision=701 --- externals/grill/xsample/pd-ex/xplaydemo.pd | 79 ++++++++++++++++++++++++++++ externals/grill/xsample/pd-ex/xsampledemo.pd | 71 +++++++++++++++++++++++++ 2 files changed, 150 insertions(+) create mode 100644 externals/grill/xsample/pd-ex/xplaydemo.pd create mode 100644 externals/grill/xsample/pd-ex/xsampledemo.pd (limited to 'externals/grill/xsample/pd-ex') diff --git a/externals/grill/xsample/pd-ex/xplaydemo.pd b/externals/grill/xsample/pd-ex/xplaydemo.pd new file mode 100644 index 00000000..c2bb0478 --- /dev/null +++ b/externals/grill/xsample/pd-ex/xplaydemo.pd @@ -0,0 +1,79 @@ +#N canvas 126 119 739 716 12; +#N canvas 0 0 450 300 graph2 0; +#X array loop1 220000 float 0; +#X coords 0 0.5 219999 -0.5 200 140 1; +#X restore 449 285 graph; +#N canvas 0 0 450 300 graph3 0; +#X array loop2 220000 float 0; +#X coords 0 0.5 219999 -0.5 200 140 1; +#X restore 450 429 graph; +#X obj 131 309 xplay~ loop1; +#X obj 151 459 xplay~ loop2; +#X obj 32 697 dac~; +#X msg 16 240 start; +#X msg 15 267 stop; +#N canvas 0 0 450 300 graph1 0; +#X array loop3 220000 float 0; +#X coords 0 0.5 219999 -0.5 200 140 1; +#X restore 450 575 graph; +#X obj 242 623 xplay~ loop3; +#X msg 103 232 print; +#X msg 161 232 help; +#X msg 13 364 start; +#X msg 13 390 stop; +#X msg 9 498 start; +#X msg 11 524 stop; +#X obj 180 136 xrecord~ loop1; +#X msg 126 60 set loop2; +#X msg 42 60 set loop1; +#X msg 48 108 start; +#X msg 49 136 stop; +#X msg 209 60 set loop3; +#X msg 305 57 append 0; +#X obj 306 33 loadbang; +#X text 5 -59 Demo of xplay~ to play synchronized loops; +#X text 40 43 Click to choose loop to record; +#X obj 333 95 adc~; +#X obj 289 264 *~ 220000; +#X obj 290 226 phasor~ 0.2; +#X text 156 692 each loop array holds 220000 samples recorded at 44khz +; +#X text 5 91 record; +#X text 78 -34 Record something in each of the three loop arrays. Choose +(set) the loop to record \, then press start. There's room for up to +5 seconds in each loop.; +#X text 17 183 After you have recorded something into each loop \, +you can play them selectively using the start/stop controls; +#X text 389 224 <= this generates the position signal that xplay requires +at the proper rate for this sample size.; +#X text 379 48 <= We record from the beginning of the array each time. +; +#X text 370 96 <= Audio will be recorded from your sound card input +(e.g. microphone); +#X text 350 -60 (by Glenn Meader); +#X connect 2 0 4 0; +#X connect 2 0 4 1; +#X connect 3 0 4 1; +#X connect 3 0 4 0; +#X connect 5 0 2 0; +#X connect 6 0 2 0; +#X connect 8 0 4 0; +#X connect 8 0 4 1; +#X connect 9 0 2 0; +#X connect 10 0 2 0; +#X connect 11 0 3 0; +#X connect 12 0 3 0; +#X connect 13 0 8 0; +#X connect 14 0 8 0; +#X connect 16 0 15 0; +#X connect 17 0 15 0; +#X connect 18 0 15 0; +#X connect 19 0 15 0; +#X connect 20 0 15 0; +#X connect 21 0 15 0; +#X connect 22 0 21 0; +#X connect 25 0 15 0; +#X connect 26 0 2 0; +#X connect 26 0 3 0; +#X connect 26 0 8 0; +#X connect 27 0 26 0; diff --git a/externals/grill/xsample/pd-ex/xsampledemo.pd b/externals/grill/xsample/pd-ex/xsampledemo.pd new file mode 100644 index 00000000..d6962311 --- /dev/null +++ b/externals/grill/xsample/pd-ex/xsampledemo.pd @@ -0,0 +1,71 @@ +#N canvas 242 109 738 686 12; +#X text 13 3 xsample~ demo; +#N canvas 0 0 452 302 graph5 0; +#X array loop1 440000 float 0; +#X coords 0 0.2 439999 -0.2 200 140 1; +#X restore 516 184 graph; +#X obj 244 262 xrecord~ loop1; +#X msg 74 233 start; +#X msg 75 265 stop; +#X obj 111 108 adc~; +#X msg 225 158 help; +#X msg 237 184 print; +#X msg 165 122 append 0; +#X obj 246 297 snapshot~; +#X obj 218 279 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 165 96 loadbang; +#X floatatom 249 337 10 0 0 1 looplength - -; +#X text 4 214 Click to start recording; +#X text 24 294 need to send bang upon stop; +#X text 273 156 Click help prints info; +#X text 236 98 start from the beginning of the array each time; +#X obj 147 579 xgroove~ loop1; +#X msg 121 449 print; +#X msg 135 472 help; +#X msg 15 536 start; +#X msg 16 565 stop; +#X floatatom 172 526 8 0 0 2 speed - -; +#X floatatom 208 624 8 0 0 3 startsample - -; +#X floatatom 311 623 10 0 0 3 endsample - -; +#X obj 134 631 dac~; +#X obj 185 448 loadbang; +#X msg 188 470 1; +#X text 2 515 play the loop; +#X text 244 525 negative numbers play sample backwards; +#X text 259 356 The xrecord object puts out the current position so +we take a snapshot of it when we stop recording to get the number of +samples we have recorded.; +#X text 262 556 use the last sample number as the max position so loop +is played the right length; +#X text 78 23 This demo records sound coming from your sound card input +(e.g. microphone). It stores the sample in the array "loop1". The array +has 440000 elements so it can store a max of 10 seconds \, recording +at 44khz.; +#X text 285 182 print current status; +#X text 25 428 Playback of the sample stored in loop1 using the xgroove +object:; +#X text 136 4 (by Glenn Meader); +#X connect 2 0 9 0; +#X connect 3 0 2 0; +#X connect 4 0 2 0; +#X connect 4 0 10 0; +#X connect 5 0 2 0; +#X connect 6 0 2 0; +#X connect 7 0 2 0; +#X connect 8 0 2 0; +#X connect 9 0 12 0; +#X connect 10 0 9 0; +#X connect 11 0 8 0; +#X connect 12 0 17 2; +#X connect 17 0 25 0; +#X connect 17 0 25 1; +#X connect 17 2 23 0; +#X connect 17 3 24 0; +#X connect 18 0 17 0; +#X connect 19 0 17 0; +#X connect 20 0 17 0; +#X connect 21 0 17 0; +#X connect 22 0 17 0; +#X connect 26 0 27 0; +#X connect 27 0 22 0; -- cgit v1.2.1