Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 89fa73f7b5
Fetching contributors…

Cannot retrieve contributors at this time

273 lines (272 sloc) 8.599 kB
#N struct 1256-template float x float y float q array poswave 1256-array-element
array negwave 1256-array-element;
#N struct 1256-array-element float y;
#N struct 1212-template float x float y float q array poswave 1212-array-element
array negwave 1212-array-element;
#N struct 1212-array-element float y;
#N struct 1267-template float x float y float q array poswave 1267-array-element
array negwave 1267-array-element;
#N struct 1267-array-element float y;
#N struct 1278-template float x float y float q array poswave 1278-array-element
array negwave 1278-array-element;
#N struct 1278-array-element float y;
#N struct 1289-template float x float y float q array poswave 1289-array-element
array negwave 1289-array-element;
#N struct 1289-array-element float y;
#N canvas 242 22 1198 814 10;
#X declare -lib iem_tab;
#X declare -lib iem_tab;
#X declare -lib iem_tab;
#X declare -lib iem_tab;
#X declare -lib iem_tab;
#X obj 25 12 cnv 15 400 35 empty empty waveform.mmb 20 12 0 14 -4160
-203904 0;
#X obj 25 48 cnv 15 400 70 empty empty empty 20 12 0 14 -203904 -66577
0;
#N canvas 0 22 450 300 (subpatch) 0;
#X array \$0-array1 77333 float 2;
#X coords 0 1 77333 -1 200 70 1;
#X restore 680 121 graph;
#X text 465 31 arg1: <required> name of table or array containing the
audio to be displayed.;
#X text 465 71 arg3: <optional> height in pixels (default is 100);
#X text 465 57 arg2: <optional> width in pixels (default is 400);
#X text 448 18 [waveform.mmb tablename width height];
#X obj 262 162 openpanel;
#X obj 262 237 soundfiler;
#X obj 262 130 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 262 187 pack s \$0;
#X obj 325 322 s \$0-sample.length;
#X floatatom 422 367 5 0 0 0 - - -;
#X floatatom 553 367 5 0 0 0 - - -;
#X floatatom 684 367 5 0 0 0 - - -;
#X floatatom 815 367 5 0 0 0 - - -;
#X text 428 381 view start;
#X text 559 381 view end;
#X text 689 381 selection start;
#X text 821 381 selection end;
#X text 821 470 [waveform.mmb \$0-array1];
#X obj 262 258 t b f;
#X text 298 255 <-- bang forces a redraw and should be done after a
sample is loaded;
#X floatatom 325 297 0 0 0 0 - - -;
#X text 71 527 Inlet values are simply passed through to the outlets.
You can conveniently connect another [waveform.mmb] underneath with
these for multi-channel displays.;
#X text 45 48 An somewhat interactive waveform display. One can zoom
in on and out of the waveform \, select a region \, and modify the
color scheme. As of right now \, you can't zoom in any closer than
one sample per pixel.;
#N canvas 0 22 450 300 (subpatch) 0;
#X array \$0-array2 77333 float 2;
#X coords 0 1 77333 -1 200 70 1;
#X restore 680 211 graph;
#X msg 262 213 read -resize \$1 \$2-array1 \$2-array2;
#X text 278 130 LOAD SAMPLE (preferably stereo);
#X text 824 613 [waveform.mmb \$0-array2];
#X text 564 344 Units are in samples;
#N canvas 255 22 901 616 messages 0;
#N canvas 430 22 675 514 colors 0;
#N canvas 0 22 542 322 dropdown 0;
#X obj 101 102 popup 124 25 #ffffff --- bgcolor selectcolor;
#X obj 101 140 route bang;
#X msg 55 108 0;
#X obj 216 163 outlet;
#X msg 264 73 name ---;
#X msg 99 37 options bgcolor selectcolor;
#X connect 0 0 1 0;
#X connect 0 1 3 0;
#X connect 1 0 2 0;
#X connect 2 0 0 0;
#X connect 4 0 0 0;
#X connect 5 0 0 0;
#X coords 0 -1 1 1 125 29 2 100 100;
#X restore 295 81 pd dropdown;
#N canvas 0 22 483 390 rgb 0;
#X obj 40 256 rgb2pd.mmb;
#X floatatom 105 105 5 0 255 1 red - -;
#X floatatom 105 125 5 0 255 1 green - -;
#X floatatom 105 145 5 0 255 1 blue - -;
#X obj 98 203 t b f;
#X obj 57 185 t b f;
#X obj 47 299 outlet;
#X connect 0 0 6 0;
#X connect 1 0 0 0;
#X connect 2 0 5 0;
#X connect 3 0 4 0;
#X connect 4 0 0 0;
#X connect 4 1 0 2;
#X connect 5 0 0 0;
#X connect 5 1 0 1;
#X coords 0 -1 1 1 75 65 2 100 100;
#X restore 75 56 pd rgb;
#X floatatom 192 58 5 0 255 1 red - -;
#X floatatom 192 78 5 0 255 1 green - -;
#X floatatom 192 98 5 0 255 1 blue - -;
#X obj 175 158 t b f;
#X obj 213 158 t b f;
#X obj 159 278 list prepend;
#X obj 161 191 pack f f f;
#X text 428 86 color messages;
#X text 89 17 accepts single color value or list of separate rbg values
;
#X obj 159 307 list prepend set;
#X obj 159 328 list trim;
#X msg 159 394 selectcolor 81 0 0;
#X obj 159 351 t b a;
#X floatatom 39 149 5 0 0 0 - - -;
#X obj 159 428 outlet;
#X floatatom 368 228 5 0 9 1 red - -;
#X floatatom 368 248 5 0 9 1 green - -;
#X floatatom 368 268 5 0 9 1 blue - -;
#X obj 351 328 t b f;
#X obj 389 328 t b f;
#X obj 337 361 pack f f f;
#X msg 337 392 wavecolor \$1 \$2 \$3;
#X text 287 189 since the waveform is drawn using a data structure
\, it can only take RGB values in the range of 0-9;
#X connect 0 0 7 1;
#X connect 1 0 7 0;
#X connect 2 0 8 0;
#X connect 3 0 5 0;
#X connect 4 0 6 0;
#X connect 5 0 8 0;
#X connect 5 1 8 1;
#X connect 6 0 8 0;
#X connect 6 1 8 2;
#X connect 7 0 11 0;
#X connect 8 0 7 0;
#X connect 11 0 12 0;
#X connect 12 0 14 0;
#X connect 13 0 16 0;
#X connect 14 0 13 0;
#X connect 14 1 13 0;
#X connect 15 0 7 0;
#X connect 17 0 22 0;
#X connect 18 0 20 0;
#X connect 19 0 21 0;
#X connect 20 0 22 0;
#X connect 20 1 22 1;
#X connect 21 0 22 0;
#X connect 21 1 22 2;
#X connect 22 0 23 0;
#X connect 23 0 16 0;
#X restore 333 351 pd colors;
#X text 398 350 change colors;
#X msg 256 206 size \$1 \$2;
#X obj 256 184 pack f f;
#X floatatom 301 164 5 0 0 0 - - -;
#X floatatom 256 141 5 0 0 0 - - -;
#X text 289 140 width;
#X text 334 165 height;
#X msg 287 274 receive inlet1 inlet2 inlet3 inlet4;
#X msg 310 311 send outlet1 outlet2 outlet3 outlet4;
#X text 506 272 set internal receive names;
#X text 534 311 set internal send names;
#X msg 165 60 bang;
#X msg 198 106 table myTable;
#X text 285 107 change the table or array associated with [waveform.mmb]
;
#X text 328 200 change size. This will not be saved with the patch.
(default: 400 100);
#X text 201 54 force redraw (needed after a sample is loaded). Go on
\, click it.;
#X obj 249 244 speedlim 100;
#X obj 116 426 waveform.mmb \$0-array1;
#X connect 0 0 18 0;
#X connect 2 0 17 0;
#X connect 3 0 2 0;
#X connect 4 0 3 1;
#X connect 5 0 3 0;
#X connect 8 0 18 0;
#X connect 9 0 18 0;
#X connect 12 0 18 0;
#X connect 13 0 18 0;
#X connect 17 0 18 0;
#X restore 76 423 pd messages;
#N canvas 74 22 1329 665 with.rsliders 0;
#X text 847 310 select;
#X obj 418 124 r \$0-sample.length;
#X obj 522 258 pack f f;
#X msg 522 278 setminmax \$1 \$2;
#X msg 109 245 clipinput 0;
#X obj 109 221 loadbang;
#X msg 444 172 setminmax 0 \$1 \, 0 \$1;
#X obj 260 38 vradio 15 1 0 4 empty empty empty 0 -8 0 10 -262144 -1
-1 1;
#X msg 260 104 mode \$1;
#X text 277 38 0 = selection;
#X text 277 53 1 = shift;
#X text 277 68 2 = extend;
#X text 277 83 3 = expand (drag up/down);
#X obj 218 152 vradio 15 1 0 4 empty empty empty 0 -8 0 10 -262144
-1 -1 1;
#X msg 218 218 mode \$1;
#X text 235 152 0 = selection;
#X text 235 167 1 = shift;
#X text 235 182 2 = extend;
#X text 235 197 3 = expand (drag up/down);
#X text 785 259 <-- You can \, of course \, use the internal receives
to hide connections and stick calculations in subpatches to make a
cleaner gui.;
#X text 483 28 [hrslider.mmb] can be used as a convenient way to interact
with [waveform.mmb]. This illlustrates a basic way to do it.;
#X obj 444 312 hrslider.mmb 400 12;
#X obj 444 222 hrslider.mmb 400 12;
#X msg 338 318 bang;
#X text 846 219 view range;
#X obj 418 145 t f b;
#X obj 444 363 waveform.mmb \$0-array1;
#X obj 444 466 waveform.mmb \$0-array2;
#X connect 1 0 25 0;
#X connect 2 0 3 0;
#X connect 3 0 21 0;
#X connect 4 0 21 0;
#X connect 5 0 4 0;
#X connect 6 0 22 0;
#X connect 7 0 8 0;
#X connect 8 0 22 0;
#X connect 13 0 14 0;
#X connect 14 0 21 0;
#X connect 21 0 26 2;
#X connect 21 1 26 3;
#X connect 22 0 2 0;
#X connect 22 0 26 0;
#X connect 22 1 2 1;
#X connect 22 1 26 1;
#X connect 23 0 26 0;
#X connect 23 0 27 0;
#X connect 25 0 6 0;
#X connect 25 1 23 0;
#X connect 26 0 27 0;
#X connect 26 1 27 1;
#X connect 26 2 27 2;
#X connect 26 3 27 3;
#X restore 77 458 pd with.rsliders;
#X obj 63 285 tabplay~ \$0-array1;
#X obj 61 333 dac~;
#X msg 73 230 bang;
#X obj 422 427 waveform.mmb \$0-array1;
#X obj 422 572 waveform.mmb \$0-array2;
#X connect 7 0 10 0;
#X connect 8 0 21 0;
#X connect 9 0 7 0;
#X connect 10 0 27 0;
#X connect 12 0 36 0;
#X connect 13 0 36 1;
#X connect 14 0 36 2;
#X connect 15 0 36 3;
#X connect 21 0 36 0;
#X connect 21 0 37 0;
#X connect 21 1 23 0;
#X connect 23 0 11 0;
#X connect 27 0 8 0;
#X connect 33 0 34 0;
#X connect 33 0 34 1;
#X connect 33 1 35 0;
#X connect 35 0 33 0;
#X connect 36 0 37 0;
#X connect 36 1 37 1;
#X connect 36 2 37 2;
#X connect 36 3 37 3;
Jump to Line
Something went wrong with that request. Please try again.