File: 13.array.controls.pd

package info (click to toggle)
puredata 0.55.2%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 20,508 kB
  • sloc: ansic: 118,824; tcl: 10,221; cpp: 9,327; makefile: 1,632; sh: 1,476; python: 152; xml: 98; awk: 13
file content (23 lines) | stat: -rw-r--r-- 1,589 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#N struct template12 float x float y array a template12a;
#N struct template12a float x float amp float w1 float w2;
#N canvas 325 78 497 300 12;
#N canvas 401 128 496 337 template12 0;
#X obj 51 22 struct template12 float x float y array a template12a;
#X obj 48 273 filledpolygon 0 0 0 0 0 3 0 3 30 0 30 0 0;
#X text 55 63 Graph (x \, amp) pairs (using "amp" as the "y" field):;
#X text 51 127 Graph "w1" as width ("y" is zero);
#X text 53 183 also "w2" \, at (5 \, 15) to disambiguate the one at (5 \, 0);
#X text 45 250 Mark the scalar itself;
#X obj 56 205 plot -w w2 a 0 0 5 15;
#X obj 54 85 plot -y amp(0:100)(0:200) a 500 2 5 30;
#X obj 55 142 plot -w w1 a 0 0 5 -10;
#X restore 88 190 pd template12;
#N canvas 872 124 344 205 data12 1;
#X scalar template12 41 87 \; 16 0 0 0 \; 52 6 16 0 \; 133 23 0 12 \; 268 4 0 0 \; \;;
#X coords 0 205 1 204 0 0 0;
#X restore 88 252 pd data12;
#N canvas 364 422 481 86 template12a 0;
#X obj 39 30 struct template12a float x float amp float w1 float w2;
#X restore 88 219 pd template12a;
#X text 27 15 You can control which variable is used as "x" \, "y" \, and "width" when plotting an array. In this example a single array "a" is plotted three times \, to show the values of the "amp" \, "w1" and "w2" fields. This is convenient when you want to have several variables in each point of the array and need several traces of the same array to visualize it all., f 63;
#X text 26 120 In this example the array points have no "y" field at all \, so if no variable is supplied to use instead of "y" \, the array is flat along its "x" axis., f 63;