aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2010-11-21 04:53:44 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2010-11-21 04:53:44 +0000
commitd94369cd874ac65309d8e4f9de8b81125c66e27a (patch)
treef6b8d2b4636bb35efbe1db4d185f264d6c19cdd6 /examples
parentbc60633962d91501bca7d556eca0b639f825a2ef (diff)
ported to library template and updated version to 1.0.3.1 to reflect bugfixes and doc updates
svn path=/trunk/externals/vbap/; revision=14453
Diffstat (limited to 'examples')
-rw-r--r--examples/graph-to-aziele.pd51
-rw-r--r--examples/high.pd27
-rw-r--r--examples/playsample~.pd56
-rw-r--r--examples/recent.pd14
-rw-r--r--examples/vbap-demo.pd38
-rw-r--r--examples/vbap-level-config.pd23
-rw-r--r--examples/vbapmodule.pd22
7 files changed, 231 insertions, 0 deletions
diff --git a/examples/graph-to-aziele.pd b/examples/graph-to-aziele.pd
new file mode 100644
index 0000000..0597f8a
--- /dev/null
+++ b/examples/graph-to-aziele.pd
@@ -0,0 +1,51 @@
+#N canvas 549 17 647 652 12;
+#X obj 42 505 expr acos($f1/$f3) * 180 / 3.1415 * $f2;
+#X obj 323 366 expr sqrt($f1);
+#X obj 323 338 + 0;
+#X obj 78 313 * 0;
+#X obj 343 276 * 0;
+#X msg 460 505 0;
+#X msg 233 265 -1;
+#X msg 268 265 1;
+#X obj 42 249 expr ($f1-0.5)/0.5;
+#X obj 233 145 expr ($f1-0.5)/0.5;
+#X obj 42 16 inlet;
+#X obj 42 570 outlet;
+#X obj 488 569 outlet;
+#X obj 407 431 expr 90 - ($f1*90.0);
+#X obj 460 479 moses 0;
+#X obj 233 238 moses 0;
+#X obj 42 279 t f f f;
+#X obj 233 179 t f f f;
+#X obj 42 99 unpack f f;
+#X msg 42 67 \$2 \$1;
+#X text 101 66 reverse order;
+#X text 101 16 float x \, float y;
+#X obj 323 393 t f f;
+#X connect 0 0 11 0;
+#X connect 1 0 22 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 0;
+#X connect 4 0 2 1;
+#X connect 5 0 12 0;
+#X connect 6 0 0 1;
+#X connect 7 0 0 1;
+#X connect 8 0 16 0;
+#X connect 9 0 17 0;
+#X connect 10 0 19 0;
+#X connect 13 0 14 0;
+#X connect 14 0 5 0;
+#X connect 14 1 12 0;
+#X connect 15 0 6 0;
+#X connect 15 1 7 0;
+#X connect 16 0 0 0;
+#X connect 16 1 3 0;
+#X connect 16 2 3 1;
+#X connect 17 0 15 0;
+#X connect 17 1 4 0;
+#X connect 17 2 4 1;
+#X connect 18 0 8 0;
+#X connect 18 1 9 0;
+#X connect 19 0 18 0;
+#X connect 22 0 0 2;
+#X connect 22 1 13 0;
diff --git a/examples/high.pd b/examples/high.pd
new file mode 100644
index 0000000..f6bbfba
--- /dev/null
+++ b/examples/high.pd
@@ -0,0 +1,27 @@
+#N canvas 0 0 576 425 10;
+#X obj 102 43 inlet;
+#X obj 124 188 f 0;
+#X obj 102 239 >;
+#X obj 102 281 sel 1;
+#X obj 201 158 f;
+#X obj 203 354 outlet;
+#X obj 203 267 f;
+#X obj 292 42 inlet;
+#X text 339 42 reset to float;
+#X text 148 44 test against high;
+#X obj 102 91 t b f b f;
+#X obj 292 89 t b f;
+#X connect 0 0 10 0;
+#X connect 1 0 2 1;
+#X connect 1 0 6 1;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 4 0 1 0;
+#X connect 6 0 5 0;
+#X connect 7 0 11 0;
+#X connect 10 0 6 0;
+#X connect 10 1 2 0;
+#X connect 10 2 1 0;
+#X connect 10 3 4 1;
+#X connect 11 0 6 0;
+#X connect 11 1 1 0;
diff --git a/examples/playsample~.pd b/examples/playsample~.pd
new file mode 100644
index 0000000..bf2b06e
--- /dev/null
+++ b/examples/playsample~.pd
@@ -0,0 +1,56 @@
+#N canvas 27 300 849 403 10;
+#X obj 38 354 table \$0music;
+#X obj 148 160 soundfiler;
+#X floatatom 148 183 5 0 0;
+#X obj 243 207 phasor~ 1;
+#X floatatom 266 181 8 0 0;
+#X obj 243 237 *~ 0;
+#X msg 148 137 read -resize \$1 \$2;
+#X obj 199 83 symbol \$0music;
+#X obj 148 110 pack s s;
+#X obj 199 48 loadbang;
+#X obj 12 13 inlet;
+#X text 59 12 .aiff file name;
+#X obj 311 15 inlet;
+#X text 356 15 phasor speed;
+#X obj 243 334 outlet~;
+#X obj 243 267 tabread4~ \$0music;
+#X obj 302 83 samplerate~;
+#X floatatom 310 107 5 0 0;
+#X obj 460 14 inlet;
+#X text 505 14 gain;
+#X obj 243 306 *~ 1;
+#X obj 148 210 t b f;
+#X obj 148 232 f;
+#X obj 148 254 /;
+#X obj 419 334 outlet~;
+#X text 303 333 sample signal;
+#X text 483 334 phasor signal;
+#X msg 557 41 0;
+#X obj 557 16 inlet;
+#X text 601 16 restart;
+#X connect 1 0 2 0;
+#X connect 2 0 5 1;
+#X connect 2 0 21 0;
+#X connect 3 0 5 0;
+#X connect 3 0 24 0;
+#X connect 4 0 3 0;
+#X connect 5 0 15 0;
+#X connect 6 0 1 0;
+#X connect 7 0 8 1;
+#X connect 8 0 6 0;
+#X connect 9 0 7 0;
+#X connect 9 0 16 0;
+#X connect 10 0 8 0;
+#X connect 12 0 3 0;
+#X connect 15 0 20 0;
+#X connect 16 0 17 0;
+#X connect 16 0 22 1;
+#X connect 18 0 20 1;
+#X connect 20 0 14 0;
+#X connect 21 0 22 0;
+#X connect 21 1 23 1;
+#X connect 22 0 23 0;
+#X connect 23 0 4 0;
+#X connect 27 0 3 1;
+#X connect 28 0 27 0;
diff --git a/examples/recent.pd b/examples/recent.pd
new file mode 100644
index 0000000..add6c7d
--- /dev/null
+++ b/examples/recent.pd
@@ -0,0 +1,14 @@
+#N canvas 399 148 452 302 12;
+#X obj 56 55 inlet;
+#X msg 91 123 clear;
+#X obj 59 252 outlet;
+#X obj 166 54 inlet;
+#X text 8 5 output only most "recent" messages;
+#X obj 56 89 t a b;
+#X obj 59 202 pipe \$1;
+#X connect 0 0 5 0;
+#X connect 1 0 6 0;
+#X connect 3 0 6 1;
+#X connect 5 0 6 0;
+#X connect 5 1 1 0;
+#X connect 6 0 2 0;
diff --git a/examples/vbap-demo.pd b/examples/vbap-demo.pd
new file mode 100644
index 0000000..27095db
--- /dev/null
+++ b/examples/vbap-demo.pd
@@ -0,0 +1,38 @@
+#N canvas 11 22 871 352 10;
+#X obj 50 80 playsample~;
+#X obj 50 55 openpanel;
+#X msg 50 31 bang;
+#X text 96 30 click to load and play a sample;
+#X floatatom 133 80 5 0 0 0 - - -;
+#X floatatom 133 101 5 0 0 0 - - -;
+#X text 182 80 pitch;
+#X text 182 102 volume;
+#X floatatom 76 142 5 0 0 0 - - -;
+#X floatatom 122 142 5 0 0 0 - - -;
+#X floatatom 168 142 5 0 0 0 - - -;
+#X text 218 143 set azimuth \, elevation \, spread;
+#N canvas 152 420 615 353 using 0;
+#X obj 59 258 graph-to-aziele;
+#X obj 59 233 pack f f;
+#X floatatom 59 281 5 0 0 0 - - -;
+#X obj 59 78 grid grid1 144 0 1 144 0 1 0 0.001 0.001 10 10 103 91
+;
+#X floatatom 159 281 5 0 0 0 - - -;
+#X text 21 17 To use Yves Degoyon's GRID (http://ydegoyon.free.fr)
+use graph-to-aziele.pd to count the azimuth and elevation.;
+#X text 25 49 (note: GRID must output values between 0 - 1);
+#X connect 0 0 2 0;
+#X connect 0 1 4 0;
+#X connect 1 0 0 0;
+#X connect 3 0 1 0;
+#X connect 3 1 1 1;
+#X restore 506 112 pd using GRID with vbap;
+#X obj 50 174 vbapmodule 1;
+#X connect 0 0 13 0;
+#X connect 1 0 0 0;
+#X connect 2 0 1 0;
+#X connect 4 0 0 1;
+#X connect 5 0 0 2;
+#X connect 8 0 13 1;
+#X connect 9 0 13 2;
+#X connect 10 0 13 3;
diff --git a/examples/vbap-level-config.pd b/examples/vbap-level-config.pd
new file mode 100644
index 0000000..3448c19
--- /dev/null
+++ b/examples/vbap-level-config.pd
@@ -0,0 +1,23 @@
+#N canvas 334 22 636 372 10;
+#X obj 19 100 noise~;
+#X obj 19 153 *~ 0.01;
+#X obj 61 128 hsl 128 15 0.01 1 1 0 empty empty empty -2 -8 0 10 -262144
+-1 -1 0 1;
+#X floatatom 71 149 5 0 0 0 - - -;
+#X obj 19 183 cyclone/reson~ 1 1000 20;
+#X obj 18 269 dac~ 1 2 3 4 5 6 7 8;
+#X text 217 131 B. Measure loudspeaker distances. Delay all loudspeakers
+to mimic the distance between listener and farthest loudspeaker. The
+amount of delay can be calculated as t = ((d - x) / 330) * 1000 \,
+where d is the distance in metres between listener and one particular
+loudspeaker \, and t is the amount of delay in milliseconds. Apply
+the delay to function function ls-delays to corresponding channel.
+;
+#X text 217 80 A. Adjust gain each speaker's channel same level sweet
+spot using this file. You use a sound pressure meter or your ears.
+;
+#X text 265 287 based on an example by Ville Pulkki 1999-2006;
+#X connect 0 0 1 0;
+#X connect 1 0 4 0;
+#X connect 2 0 1 1;
+#X connect 2 0 3 0;
diff --git a/examples/vbapmodule.pd b/examples/vbapmodule.pd
new file mode 100644
index 0000000..01484a8
--- /dev/null
+++ b/examples/vbapmodule.pd
@@ -0,0 +1,22 @@
+#N canvas 94 380 450 300 10;
+#X obj 30 44 inlet~;
+#X obj 62 158 send matrix;
+#X obj 46 183 throw~ \$1chan;
+#X floatatom 180 186 5 0 0;
+#X floatatom 225 186 5 0 0;
+#X floatatom 270 186 5 0 0;
+#X text 137 217 actual azi / ele / spread;
+#X obj 82 44 inlet;
+#X obj 122 44 inlet;
+#X obj 162 44 inlet;
+#X text 210 44 azi / ele / spread;
+#X obj 46 112 vbapsnd \$1;
+#X connect 0 0 11 0;
+#X connect 7 0 11 1;
+#X connect 8 0 11 2;
+#X connect 9 0 11 3;
+#X connect 11 0 2 0;
+#X connect 11 1 1 0;
+#X connect 11 2 3 0;
+#X connect 11 3 4 0;
+#X connect 11 4 5 0;