aboutsummaryrefslogtreecommitdiff
path: root/Patches/10.example-waveformdisplay.pd
blob: f44763aaf646a520063e30697afe7c685e00eab0 (plain)
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
#N canvas 197 11 743 561 12;
#X obj 5 34 fs.main;
#X msg 5 7 6001;
#X msg 45 7 reset;
#X text 155 394 drag & drop a SOUND FILE to one of the frames above
...;
#X text 234 413 then make a selection with mouse;
#N canvas 0 0 1002 426 implementation 0;
#X obj 26 260 table snd;
#X obj 108 206 fs.event;
#X msg 108 234 read -resize \$1 snd;
#X obj 159 286 soundfiler;
#X obj 125 105 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 206 161 fs.waveform snd 512 256;
#X obj 197 101 fs.waveform snd 512 32;
#X obj 230 134 t b f;
#X floatatom 295 192 8 0 0;
#X floatatom 368 192 8 0 0;
#X text 288 230 selection in samples;
#N canvas 35 295 458 308 init 0;
#X obj 105 91 init;
#X obj 92 209 outlet;
#X obj 145 209 outlet;
#X msg 83 125 dock waveformd \, 118+105 \, bang;
#X msg 74 151 dock waveformd \, 118+138 \, bang;
#X connect 0 0 3 0;
#X connect 0 0 4 0;
#X connect 3 0 2 0;
#X connect 4 0 1 0;
#X restore 146 74 pd init;
#X msg 394 97 118 + 105;
#X msg 406 153 118 + 138;
#X obj 108 260 t b b a;
#X msg 128 286 0;
#X text 499 72 fs.waveform -- array display with range selection;
#X text 513 104 args: <array name> <width> <height>;
#X text 513 130 inlet 1: bang or command to fs.frame;
#X text 513 166 inlet 3: endpoint of display in samples;
#X text 513 148 inlet 2: startpoint of display in samples;
#X text 513 184 inlet 4: display selection in inverse (0 or 1);
#X text 513 217 outlets 1 & 2: first two outlets of the fs.frame inside
;
#X text 513 235 outlets 3 & 4: start and end of selected range in samples
;
#X text 513 254 outlet 5: third outlet of the fs.frame inside;
#N canvas 0 0 481 421 playselection 0;
#X obj 302 117 inlet;
#X obj 348 117 inlet;
#X obj 302 182 -;
#X obj 302 210 abs;
#X obj 94 185 *~;
#X obj 94 214 +~;
#X obj 94 151 phasor~;
#X obj 334 310 /;
#X obj 327 277 samplerate~;
#X obj 302 237 t f b f;
#X obj 94 245 tabread4~ snd;
#X obj 149 283 r vol;
#X obj 94 319 dac~;
#X obj 94 283 *~ 0.1;
#X obj 123 50 inlet;
#X text 74 24 mouseup from fs.event;
#X text 301 94 range;
#X obj 94 127 f;
#X obj 123 185 f;
#X obj 123 214 f;
#X connect 0 0 2 0;
#X connect 0 0 19 1;
#X connect 1 0 2 1;
#X connect 2 0 3 0;
#X connect 3 0 9 0;
#X connect 4 0 5 0;
#X connect 5 0 10 0;
#X connect 6 0 4 0;
#X connect 7 0 17 1;
#X connect 8 0 7 0;
#X connect 9 0 18 1;
#X connect 9 1 8 0;
#X connect 9 2 7 1;
#X connect 10 0 13 0;
#X connect 11 0 13 1;
#X connect 13 0 12 0;
#X connect 13 0 12 1;
#X connect 14 0 17 0;
#X connect 14 0 18 0;
#X connect 14 0 19 0;
#X connect 17 0 6 0;
#X connect 18 0 4 1;
#X connect 19 0 5 1;
#X restore 294 299 pd playselection;
#X text 195 353 Sorry about the mess..;
#X connect 1 0 2 0;
#X connect 1 2 25 0;
#X connect 2 0 14 0;
#X connect 4 0 6 0;
#X connect 5 0 1 0;
#X connect 5 2 8 0;
#X connect 5 2 25 1;
#X connect 5 3 9 0;
#X connect 5 3 25 2;
#X connect 5 4 13 0;
#X connect 6 0 1 0;
#X connect 6 2 7 0;
#X connect 6 3 5 2;
#X connect 6 4 12 0;
#X connect 7 0 5 0;
#X connect 7 1 5 1;
#X connect 11 0 5 0;
#X connect 11 1 6 0;
#X connect 14 0 6 0;
#X connect 14 0 5 0;
#X connect 14 1 15 0;
#X connect 14 2 3 0;
#X connect 15 0 6 1;
#X connect 15 0 6 2;
#X connect 15 0 5 1;
#X connect 15 0 5 2;
#X restore 252 475 pd implementation and docs;
#X obj 32 388 vsl 15 128 0 1 0 0 vol empty volume 0 -8 128 8 -262144
-1 -1 7800 1;
#X msg 54 497 \; pd dsp 1;
#X text 57 472 play it ...;
#X connect 1 0 0 0;
#X connect 1 0 2 0;
#X connect 2 0 0 1;