-
Notifications
You must be signed in to change notification settings - Fork 0
/
polySample.pd
85 lines (85 loc) · 2.84 KB
/
polySample.pd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#N canvas 105 22 1090 798 10;
#X obj 636 376 dac~;
#X obj 636 334 catch~ out;
#X obj 117 426 random 10;
#X obj 117 358 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
1;
#X obj 117 380 metro 300;
#X msg 634 442 \; pd dsp 1 \;;
#X obj 634 413 loadbang;
#X obj 117 337 loadbang;
#X obj 117 467 / 10;
#X text 113 669 first argument: < name of soundfile >;
#X text 113 686 second argument: < number of polyphony >;
#X text 630 487 turn on dsp;
#X text 722 333 output of the objects can be catched;
#X text 723 350 with the name "out";
#X text 114 267 Built with Pd Vanilla \, can be embedded into libPd
\, WebPd \, etc.;
#X text 493 27 --- POLYSAMPLE ---;
#X text 113 127 The system creates multiple instances of sample players
on creation of the [createPoly] object (name of sound file is set by
its first argument \, whereas number of parallell sounds are based
on its second argument). Beware: too much objects can take too much
performance especially on mobile devices & tablets.;
#X floatatom 401 601 5 0 0 0 - - -;
#X floatatom 924 186 5 0 0 0 - - -;
#X text 966 186 volume;
#X text 116 95 A Polyphonic sample player with adjustable pitch & volume.
;
#X text 624 113 3rd argument sets samplerate (optional);
#X text 623 133 (44100 by default);
#X text 114 704 optional third argument: < samplerate >;
#X obj 117 538 pack f f;
#X obj 117 402 t b b;
#X text 452 601 overall sampler volume;
#X obj 188 448 + 1;
#X text 114 212 Sample playback speed and individual sample volumes
are controlled by the first inlet via a list. First element: pitch
(1 = original speed \, 2 = double speed \, etc) Second element: volume
of each sample to be triggered;
#X obj 117 447 + 1;
#X text 262 426 create random pitch \, random volume;
#N canvas 0 22 722 472 send2OtherSample 0;
#X obj 217 122 inlet;
#X obj 442 120 inlet;
#X obj 315 279 pack f f;
#X obj 315 303 s otherSample;
#X obj 442 174 pipe 150;
#X obj 217 177 pipe 150;
#X connect 0 0 5 0;
#X connect 1 0 4 0;
#X connect 2 0 3 0;
#X connect 4 0 2 1;
#X connect 5 0 2 0;
#X restore 202 493 pd send2OtherSample;
#X obj 628 184 r otherSample;
#X text 431 631 create polyphonic sample player;
#X text 624 94 try with any other soundfile \, too..;
#X obj 188 469 / 30;
#X obj 188 426 random 30;
#X text 187 539 trigger sample 1st el: pitch \, 2nd el: vol;
#X text 112 109 (c) GPL3 [email protected] \, 2012 - 2015;
#X obj 117 630 patches/createPoly ../sounds/sound_44k.wav 10;
#X obj 628 212 patches/createPoly ../sounds/sound_22k.wav 10 22050
;
#X connect 1 0 0 0;
#X connect 1 0 0 1;
#X connect 2 0 29 0;
#X connect 3 0 4 0;
#X connect 4 0 25 0;
#X connect 6 0 5 0;
#X connect 7 0 3 0;
#X connect 8 0 24 0;
#X connect 8 0 31 0;
#X connect 17 0 39 1;
#X connect 18 0 40 1;
#X connect 24 0 39 0;
#X connect 25 0 2 0;
#X connect 25 1 36 0;
#X connect 27 0 35 0;
#X connect 29 0 8 0;
#X connect 32 0 40 0;
#X connect 35 0 24 1;
#X connect 35 0 31 1;
#X connect 36 0 27 0;