aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorTom Schouten <doelie@users.sourceforge.net>2003-01-21 10:27:33 +0000
committerTom Schouten <doelie@users.sourceforge.net>2003-01-21 10:27:33 +0000
commit9b8745d5250c9d0b60c9aa5a77f58a3fcddf1076 (patch)
tree8372b6a414a7124cec57efc9c80845e2bc1b157d /doc
This commit was generated by cvs2svn to compensate for changes in r352,svn2git-root
which included commits to RCS files with non-trunk default branches. svn path=/trunk/externals/pdp/; revision=353
Diffstat (limited to 'doc')
-rw-r--r--doc/control.pd17
-rw-r--r--doc/examples/example01.pd45
-rw-r--r--doc/examples/example02.pd44
-rw-r--r--doc/examples/example03.pd78
-rw-r--r--doc/input_output.pd53
-rw-r--r--doc/quicktime.pd101
-rw-r--r--doc/reference.txt64
-rw-r--r--doc/traffic.pd101
8 files changed, 503 insertions, 0 deletions
diff --git a/doc/control.pd b/doc/control.pd
new file mode 100644
index 0000000..3898e1e
--- /dev/null
+++ b/doc/control.pd
@@ -0,0 +1,17 @@
+#N canvas 372 355 668 154 10;
+#X obj 33 107 pdp_xv;
+#X obj 33 57 pdp_v4l;
+#X msg 33 12 bang;
+#X obj 33 81 pdp_trigger;
+#X obj 33 35 metro 1000;
+#X obj 105 108 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X text 140 20 pdp_trigger sends out a bang message on the right outlet
+before it passes the incoming pdp message on the left outlet.;
+#X msg 73 12 stop;
+#X connect 1 0 3 0;
+#X connect 2 0 4 0;
+#X connect 3 0 0 0;
+#X connect 3 1 5 0;
+#X connect 4 0 1 0;
+#X connect 7 0 4 0;
diff --git a/doc/examples/example01.pd b/doc/examples/example01.pd
new file mode 100644
index 0000000..d4afc19
--- /dev/null
+++ b/doc/examples/example01.pd
@@ -0,0 +1,45 @@
+#N canvas 142 294 518 446 10;
+#X obj 133 414 pdp_xv;
+#X obj 177 76 pdp_v4l;
+#X obj 177 33 metro 40;
+#X obj 176 8 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 35 149 pdp_conv;
+#X obj 35 173 pdp_conv_sobel_edge;
+#X obj 412 60 pdp_control;
+#X msg 412 32 thread \$1;
+#X obj 412 8 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+;
+#X obj 133 352 pdp_gradient;
+#X obj 133 288 pdp_motion_phase;
+#X msg 254 30 type grey;
+#X obj 35 125 pdp_del 8;
+#X obj 35 198 pdp_gain 6;
+#X msg 240 252 0.45;
+#X text 223 125 8 frames delay;
+#X text 223 149 smooth;
+#X text 223 174 edge detect;
+#X text 222 200 amplify;
+#X text 232 6 process in greyscale;
+#X obj 133 252 pdp_add;
+#X text 322 287 motion phase shifter;
+#X text 320 354 grey -> colour palette;
+#X msg 36 323 rgb 1 0.5 0;
+#X floatatom 170 386 5 0 0;
+#X connect 1 0 12 0;
+#X connect 1 0 20 1;
+#X connect 2 0 1 0;
+#X connect 3 0 2 0;
+#X connect 4 0 5 0;
+#X connect 5 0 13 0;
+#X connect 7 0 6 0;
+#X connect 8 0 7 0;
+#X connect 9 0 0 0;
+#X connect 10 0 9 0;
+#X connect 11 0 1 0;
+#X connect 12 0 4 0;
+#X connect 13 0 20 0;
+#X connect 14 0 10 1;
+#X connect 20 0 10 0;
+#X connect 23 0 9 0;
+#X connect 24 0 0 1;
diff --git a/doc/examples/example02.pd b/doc/examples/example02.pd
new file mode 100644
index 0000000..0a46e04
--- /dev/null
+++ b/doc/examples/example02.pd
@@ -0,0 +1,44 @@
+#N canvas 85 437 473 316 10;
+#X obj 91 268 pdp_xv;
+#X obj 91 73 pdp_v4l;
+#X obj 91 30 metro 40;
+#X obj 90 5 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1
+;
+#X obj 326 57 pdp_control;
+#X msg 326 29 thread \$1;
+#X obj 326 5 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+;
+#X text 146 3 process in greyscale;
+#X obj 135 195 pdp_gain;
+#X obj 135 222 pdp_gain;
+#X msg 168 27 type yv12;
+#X obj 91 129 pdp_mix;
+#X msg 169 51 type grey;
+#X obj 216 194 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10
+-262144 -1 -1 0.62 256;
+#X obj 139 103 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10
+-262144 -1 -1 0.82 256;
+#X obj 215 133 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10
+-262144 -1 -1 8 256;
+#X obj 135 162 pdp_del 25;
+#X obj 216 173 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10
+-262144 -1 -1 1.5 256;
+#X text 289 177 gains clip at -1 \, 1;
+#X msg 159 129 reset;
+#X connect 1 0 11 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 0;
+#X connect 5 0 4 0;
+#X connect 6 0 5 0;
+#X connect 8 0 9 0;
+#X connect 9 0 11 1;
+#X connect 10 0 1 0;
+#X connect 11 0 0 0;
+#X connect 11 0 16 0;
+#X connect 12 0 1 0;
+#X connect 13 0 9 1;
+#X connect 14 0 11 2;
+#X connect 15 0 16 1;
+#X connect 16 0 8 0;
+#X connect 17 0 8 1;
+#X connect 19 0 16 0;
diff --git a/doc/examples/example03.pd b/doc/examples/example03.pd
new file mode 100644
index 0000000..85f1c01
--- /dev/null
+++ b/doc/examples/example03.pd
@@ -0,0 +1,78 @@
+#N canvas 326 208 841 704 10;
+#X obj 68 318 pdp_noise;
+#X obj 68 85 metro 40;
+#X obj 68 58 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 68 484 pdp_del 50;
+#X obj 112 424 pdp_gain;
+#X floatatom 240 518 5 0 0;
+#X obj 68 514 pdp_blur;
+#X obj 243 499 hsl 128 15 0 1 0 1 empty empty empty -2 -6 0 8 -262144
+-1 -1 2400 1;
+#X floatatom 240 367 5 0 0;
+#X obj 243 342 hsl 128 15 0 5 0 1 empty empty empty -2 -6 0 8 -262144
+-1 -1 4400 1;
+#X floatatom 240 587 5 0 0;
+#X obj 243 567 hsl 128 15 0 1 0 1 empty empty empty -2 -6 0 8 -262144
+-1 -1 5400 1;
+#X floatatom 239 428 5 0 0;
+#X obj 242 409 hsl 128 15 -5 5 0 1 empty empty empty -2 -6 0 8 -262144
+-1 -1 4200 1;
+#X msg 15 460 reset;
+#X obj 68 459 pdp_add;
+#X obj 68 357 pdp_gain;
+#X text 203 7 this example shows how to use a delay line with a loop
+gain > 1 and some processing inside the loop to produce a plasma like
+effect. (WARNING: this can produce a very intense strobe effect \,
+so if you're sensitive to flashing lights please be careful...);
+#X text 391 407 a |gain| > 1 ensures regeneration;
+#X floatatom 119 56 5 0 0;
+#X obj 68 582 pdp_motion_phase;
+#X floatatom 133 459 5 0 0;
+#X text 392 495 blur ensures spatial coupling (determines the speed
+at which "blobs" move around the screen);
+#X text 392 565 a motion phase effect to spice it up (this causes local
+negative feedback around suddon changes);
+#X msg 109 13 40;
+#X msg 144 13 1000;
+#X msg 109 250 type grey;
+#X msg 109 135 type yv12;
+#X obj 68 619 pdp_xv;
+#X text 201 247 it also works for black and white \, but all negative
+colours will be clipped to 0 (black) on output.;
+#X text 393 340 mix in some noise to get it going (set blur to minimal
+when starting so the added noise won't be blurred to black);
+#X text 202 96 it illustrates one of the advantages of working in an
+additive/subtractive colour space. (here yuv or YCrCb). since legal
+colours can be both positive and negative \, the analogy with audio
+signals is easily drawn. this network can be seen as a nonlinear feedback
+delay network. (nonlinear because of the saturating gain). the image
+delay line can be seen as a parallel delay line \, one for each pixel.
+coupling between the delays is done using a spatial blur effect. the
+additional temporal filtering in't necessary \, but it produces a nice
+additional effect.;
+#X connect 0 0 16 0;
+#X connect 1 0 0 0;
+#X connect 2 0 1 0;
+#X connect 3 0 6 0;
+#X connect 4 0 15 1;
+#X connect 6 0 20 0;
+#X connect 7 0 5 0;
+#X connect 7 0 6 1;
+#X connect 9 0 8 0;
+#X connect 9 0 16 1;
+#X connect 11 0 10 0;
+#X connect 11 0 20 1;
+#X connect 13 0 12 0;
+#X connect 13 0 4 1;
+#X connect 14 0 3 0;
+#X connect 15 0 3 0;
+#X connect 16 0 15 0;
+#X connect 19 0 1 1;
+#X connect 20 0 4 0;
+#X connect 20 0 28 0;
+#X connect 21 0 3 1;
+#X connect 24 0 19 0;
+#X connect 25 0 19 0;
+#X connect 26 0 0 0;
+#X connect 27 0 0 0;
diff --git a/doc/input_output.pd b/doc/input_output.pd
new file mode 100644
index 0000000..fe6ccc1
--- /dev/null
+++ b/doc/input_output.pd
@@ -0,0 +1,53 @@
+#N canvas 182 220 831 596 10;
+#X obj 107 307 pdp_v4l;
+#X obj 107 53 metro 40;
+#X msg 159 14 stop;
+#X msg 107 14 bang;
+#X msg 51 14 bang;
+#X obj 107 538 pdp_xv;
+#X msg 209 93 open /dev/video0;
+#X msg 209 117 open /dev/video1;
+#X text 347 95 you can choose the input device using the 'open' message.
+the default is /dev/video0;
+#X msg 209 142 close;
+#X text 348 143 closes the video port;
+#X msg 209 168 type yv12;
+#X msg 209 192 type grey;
+#X text 348 171 type sets the ouput image package type. currently only
+yv12 (luma/chroma color) and greyscale are supported.;
+#X msg 210 221 dim 320 240;
+#X msg 210 244 dim 640 480;
+#X text 348 215 dim sets the dimensions of the captured frame. please
+note that in all objects dimensions and packet type (color/greyscale)
+have to be the same to be combined (i.e. mixed);
+#X msg 210 433 dim 320 240;
+#X msg 210 456 dim 640 480;
+#X text 349 436 dim sets the window dimensions;
+#X msg 210 387 create;
+#X msg 210 408 destroy;
+#X text 208 324 pdp_xv ouputs video in a window using the xVideo extension.
+if your graphics card/driver supports it you can have multiple output
+windows. if a pdp message is received and a window is not open \, one
+is created automaticly.;
+#X text 349 390 use these messages to explicitly create/destroy the
+window;
+#X text 207 18 pdp_v4l grabs video from the video4linux device. it
+grabs a frame whenever a bang message is received. the output rate
+is limited by the maximum framerate of the video device. if there is
+no device opened \, it will attempt to open /dev/video0;
+#X connect 0 0 5 0;
+#X connect 1 0 0 0;
+#X connect 2 0 1 0;
+#X connect 3 0 1 0;
+#X connect 4 0 0 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 9 0 0 0;
+#X connect 11 0 0 0;
+#X connect 12 0 0 0;
+#X connect 14 0 0 0;
+#X connect 15 0 0 0;
+#X connect 17 0 5 0;
+#X connect 18 0 5 0;
+#X connect 20 0 5 0;
+#X connect 21 0 5 0;
diff --git a/doc/quicktime.pd b/doc/quicktime.pd
new file mode 100644
index 0000000..2f32cfd
--- /dev/null
+++ b/doc/quicktime.pd
@@ -0,0 +1,101 @@
+#N canvas 400 126 715 814 10;
+#X obj 59 391 pdp_qt;
+#X obj 59 462 pdp_xv;
+#X floatatom 77 429 5 0 0;
+#X floatatom 127 430 5 0 0;
+#X obj 56 41 metro 40;
+#X msg 56 13 bang;
+#X msg 97 13 stop;
+#X msg 15 13 bang;
+#X obj 140 41 openpanel;
+#X msg 140 66 open \$1;
+#X msg 140 13 bang;
+#X msg 140 92 close;
+#X text 249 66 open/close for file access;
+#X floatatom 140 120 5 0 0;
+#X floatatom 140 146 5 0 0;
+#X text 248 117 float on left inlet selects a frame for output;
+#X msg 140 197 loop \$1;
+#X obj 203 182 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X text 250 198 automatic looping can be enabled/disabled;
+#X text 251 9 pdp_qt plays a quicktime movie.;
+#X text 250 221 this enables automatic playback at the frame rate specified
+in the movie file. in pdp_qt~ playback is synchronized to the audio
+stream.;
+#X obj 335 535 table array;
+#X msg 142 341 dump array 0;
+#X text 252 330 if the movie contains audio \, this command dumps the
+audio data into an array specified by the first argument. the second
+argument is the audio channel (default = 0 = left);
+#X msg 142 291 stop;
+#X text 251 289 stops automatic playback (same as autoplay 0);
+#X msg 141 222 autoplay 1;
+#X msg 142 267 play;
+#X text 252 432 the second outlet outputs the current frame number.
+the third outlet outputs the total number of frames in a movie when
+it is opened.;
+#X obj 56 786 pdp_xv;
+#X obj 56 715 pdp_qt~;
+#X obj 84 757 dac~;
+#X msg 33 644 play;
+#X obj 127 635 openpanel;
+#X msg 127 660 open \$1;
+#X msg 127 607 bang;
+#X msg 9 760 close;
+#X text 251 660 pdp_qt~ is the same as pdp_qt exept that it also outputs
+the audio data corresponding to the current frame on its 2 rightmost
+outlets. if there is a lag between audio and video a pdp_del object
+can be inserted to delay the image. note that in order to get acceptable
+audio quality with relatively few dropouts you might need to increase
+the pd audio latency.;
+#X msg 7 429 close;
+#X msg 142 315 cont;
+#X text 251 269 starts automatic playback (same as 0 \, autplay 1 \,
+bang);
+#X text 251 310 resumes automatic playback (same as autplay 1 \, bang)
+;
+#X msg 9 617 loop 1;
+#X floatatom 78 645 5 0 0;
+#X obj 448 535 tabplay~ array;
+#X obj 448 576 dac~;
+#X obj 448 506 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X msg 126 685 dump array 0;
+#X text 249 137 float on right inlet selects the frame to be read on
+the next sync event (bang message / internal sync).;
+#X connect 0 0 1 0;
+#X connect 0 1 2 0;
+#X connect 0 2 3 0;
+#X connect 4 0 0 0;
+#X connect 5 0 4 0;
+#X connect 6 0 4 0;
+#X connect 7 0 0 0;
+#X connect 8 0 9 0;
+#X connect 9 0 0 0;
+#X connect 10 0 8 0;
+#X connect 11 0 0 0;
+#X connect 13 0 0 0;
+#X connect 14 0 0 1;
+#X connect 16 0 0 0;
+#X connect 17 0 16 0;
+#X connect 22 0 0 0;
+#X connect 24 0 0 0;
+#X connect 26 0 0 0;
+#X connect 27 0 0 0;
+#X connect 30 0 29 0;
+#X connect 30 3 31 0;
+#X connect 30 4 31 1;
+#X connect 32 0 30 0;
+#X connect 33 0 34 0;
+#X connect 34 0 30 0;
+#X connect 35 0 33 0;
+#X connect 36 0 29 0;
+#X connect 38 0 1 0;
+#X connect 39 0 0 0;
+#X connect 42 0 30 0;
+#X connect 43 0 30 1;
+#X connect 44 0 45 0;
+#X connect 44 0 45 1;
+#X connect 46 0 44 0;
+#X connect 47 0 30 0;
diff --git a/doc/reference.txt b/doc/reference.txt
new file mode 100644
index 0000000..1def808
--- /dev/null
+++ b/doc/reference.txt
@@ -0,0 +1,64 @@
+This is a list of all pdp objects and abstractions with a minimal description.
+Take a look at the patches in the doc/ directory for more info.
+(Messy doc/test patches can be found in the test/ directory.)
+
+general purpose pdp modules:
+
+pdp_del a packet delay line
+pdp_reg a packet register
+pdp_snap takes a snapshot of a packet stream
+pdp_trigger sends out a bang message when a packet is recieved
+pdp_route routes a packet to a specific outlet
+
+image inputs/outputs:
+
+pdp_xv displays images using the xvideo extension
+pdp_v4l reads images from a video4linux device
+pdp_qt reads quicktime movies
+
+image processors:
+
+pdp_add adds two images
+pdp_bq spatial biquad filter
+pdp_bqt temporal biquad filter
+pdp_conv horizontal/vertical seperable convolution filter
+pdp_gradient converts a greyscale image using a colour palette
+pdp_grey converts an image to greyscale
+pdp_mul multiplies two images
+pdp_affine shifts and scales a colour plane
+pdp_mix crossfade between 2 images
+pdp_mix2 mixes 2 images after applying a gain to each of them
+pdp_randmix crossfades 2 images by taking random pixels
+pdp_noise a noise generator
+pdp_scope~ a very simple oscilloscope
+pdp_chrot rotates the chroma components
+pdp_scale rescale an image
+pdp_zoom tiled zoom
+
+utility abstractions
+
+pdp_pps computes the packet rate in packets/sec
+
+image abstractions:
+
+pdp_blur blurs an image
+pdp_blur_hor horizontal blur
+pdp_blur_ver vertical blur
+pdp_phase applies an allpass filter to an image
+pdp_phase_hor horizontal allpass
+pdp_phase_ver vertical allpass
+pdp_motion_blur blurs motion
+pdp_motion_phase phase shifts motion
+pdp_alledge an all edge detector
+pdp_conv_emboss emboss
+pdp_conv_sobel_hor horizontal sobel edge detector
+pdp_conv_sobel_ver vertical sobel edge detector
+pdp_conv_sobel_edge sum of squares of hor and ver
+pdp_saturation change colour saturation
+
+cellular automata:
+
+pdp_ca computes a cellular automaton (as a generator or a filter)
+pdp_ca2image converts a CA packet to a greyscale image
+pdp_image2ca converts an image to a CA packet (black and white)
+
diff --git a/doc/traffic.pd b/doc/traffic.pd
new file mode 100644
index 0000000..40f102d
--- /dev/null
+++ b/doc/traffic.pd
@@ -0,0 +1,101 @@
+#N canvas 155 92 978 574 10;
+#X msg 362 2 stop;
+#X obj 362 27 metro 40;
+#X obj 362 53 pdp_v4l;
+#X obj 32 524 pdp_xv;
+#X obj 847 336 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X obj 847 388 pdp_control;
+#X msg 847 361 thread \$1;
+#X obj 434 56 hdl 15 1 1 4 empty empty empty 0 -6 0 8 -262144 -1 -1
+2;
+#X obj 432 278 pdp_del 25;
+#X obj 410 332 pdp_mix;
+#X obj 457 305 hsl 128 15 0 1 0 1 empty empty empty -2 -6 0 8 -262144
+-1 -1 6500 1;
+#X floatatom 497 249 5 0 0;
+#X text 457 83 packet router. second inlet sets destination outlet.
+creation argument sets number of outlets.;
+#X obj 240 333 pdp_snap;
+#X obj 240 302 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X text 249 357 packet snapshot;
+#X msg 262 301 snap;
+#X obj 410 456 pdp_trigger;
+#X text 508 463 before it passes the packet;
+#X text 507 450 trigger sends a bang on right outlet;
+#X obj 482 487 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X text 248 389 bang sends out packet;
+#X obj 434 146 send packet;
+#X text 524 138 pdp packets can be sent over send/receive pairs;
+#X text 523 152 (not over netsend/netreceive pairs!);
+#X obj 451 382 pdp_pps;
+#X floatatom 451 412 5 0 0;
+#X text 513 381 packet rate calculator;
+#X obj 32 21 receive packet;
+#X obj 203 254 pdp_reg;
+#X text 68 222 a packet register;
+#X text 58 235 (like int and float);
+#X obj 32 81 pdp_mix;
+#X obj 79 51 hsl 128 15 0 1 0 1 empty empty empty -2 -6 0 8 -262144
+-1 -1 10500 1;
+#X obj 32 136 pdp_conv;
+#X obj 203 227 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X text 115 70 feedback;
+#X obj 362 87 pdp_route 4;
+#X text 107 82 is allowed;
+#X obj 335 3 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X text 754 292 enable or disable processing;
+#X text 754 307 in separate thread;
+#X text 471 342 second inlet 0->1;
+#X text 472 328 mix (crossfade) 2 packets.;
+#X floatatom 83 111 5 0 0;
+#X text 58 253 left: hot packet;
+#X text 58 267 right: cold packet;
+#X floatatom 847 449 5 0 0;
+#X obj 847 420 route pdp_drop;
+#X text 801 473 dropped packet counter;
+#X text 43 159 convolution: default is blur;
+#X text 135 110 number of passes;
+#X text 248 373 snap takes snapshot;
+#X text 134 118 comment;
+#X text 431 185 packet delay line. second inlet sets delay. creation
+argument sets total delay line length. WARNING: this uses a lot of
+memory. keep the size small to prevent the system to start swapping
+to disk.;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X connect 2 0 37 0;
+#X connect 4 0 6 0;
+#X connect 5 0 48 0;
+#X connect 6 0 5 0;
+#X connect 7 0 37 1;
+#X connect 8 0 9 1;
+#X connect 9 0 17 0;
+#X connect 9 0 25 0;
+#X connect 10 0 9 2;
+#X connect 11 0 8 1;
+#X connect 13 0 3 0;
+#X connect 14 0 13 0;
+#X connect 16 0 13 0;
+#X connect 17 0 3 0;
+#X connect 17 1 20 0;
+#X connect 25 0 26 0;
+#X connect 28 0 32 0;
+#X connect 29 0 3 0;
+#X connect 32 0 34 0;
+#X connect 33 0 32 2;
+#X connect 34 0 32 1;
+#X connect 34 0 3 0;
+#X connect 35 0 29 0;
+#X connect 37 0 29 1;
+#X connect 37 1 13 1;
+#X connect 37 2 8 0;
+#X connect 37 2 9 0;
+#X connect 37 3 22 0;
+#X connect 39 0 1 0;
+#X connect 44 0 34 1;
+#X connect 48 0 47 0;