From 7da1d644ff98078ad2a78d940ec991abff440b00 Mon Sep 17 00:00:00 2001 From: Tom Schouten Date: Wed, 5 Feb 2003 06:05:39 +0000 Subject: pdp 0.8.3 svn path=/trunk/externals/pdp/; revision=382 --- CHANGES.LOG | 15 +- Makefile | 10 +- Makefile.config | 18 +- Makefile.linux | 2 +- Makefile.linux_mmx | 2 +- README | 66 +++--- TODO | 25 ++- abstractions/pdp_phase.pd | 2 +- debug/gdb_pdp_load | 4 +- debug/quicktime_crashtest.pd | 164 +++++++++++++++ doc/control.pd | 17 -- doc/examples/example03.pd | 12 +- doc/examples/example04.pd | 85 ++++++++ doc/examples/example05.pd | 142 +++++++++++++ doc/examples/example06.pd | 76 +++++++ doc/input_output.pd | 53 ----- doc/introduction/control.pd | 17 ++ doc/introduction/input_output.pd | 75 +++++++ doc/introduction/quicktime.pd | 101 +++++++++ doc/introduction/traffic.pd | 101 +++++++++ doc/objects/README | 4 + doc/objects/help_pdp_add.pd | 24 +++ doc/objects/help_pdp_affine.pd | 18 ++ doc/objects/help_pdp_bq.pd | 149 ++++++++++++++ doc/objects/help_pdp_bqt.pd | 95 +++++++++ doc/objects/help_pdp_cheby.pd | 47 +++++ doc/objects/help_pdp_chrot.pd | 13 ++ doc/objects/help_pdp_control.pd | 37 ++++ doc/objects/help_pdp_conv.pd | 44 ++++ doc/objects/help_pdp_del.pd | 24 +++ doc/objects/help_pdp_gain.pd | 32 +++ doc/objects/help_pdp_gradient.pd | 29 +++ doc/objects/help_pdp_grey.pd | 17 ++ doc/objects/help_pdp_mix.pd | 21 ++ doc/objects/help_pdp_mix2.pd | 25 +++ doc/objects/help_pdp_mul.pd | 24 +++ doc/objects/help_pdp_noise.pd | 21 ++ doc/objects/help_pdp_qt.pd | 71 +++++++ doc/objects/help_pdp_qt~.pd | 25 +++ doc/objects/help_pdp_randmix.pd | 21 ++ doc/objects/help_pdp_reg.pd | 20 ++ doc/objects/help_pdp_rotate.pd | 30 +++ doc/objects/help_pdp_route.pd | 22 ++ doc/objects/help_pdp_scale.pd | 32 +++ doc/objects/help_pdp_scan~.pd | 41 ++++ doc/objects/help_pdp_scope~.pd | 23 +++ doc/objects/help_pdp_snap.pd | 21 ++ doc/objects/help_pdp_trigger.pd | 14 ++ doc/objects/help_pdp_v4l.pd | 54 +++++ doc/objects/help_pdp_xv.pd | 29 +++ doc/objects/help_pdp_zoom.pd | 41 ++++ doc/objects/help_pdp_zrot.pd | 47 +++++ doc/objects/pdp_help_input.pd | 63 ++++++ doc/objects/pdp_help_output.pd | 8 + doc/quicktime.pd | 101 --------- doc/reference.txt | 10 +- doc/traffic.pd | 101 --------- include/pdp.h | 19 +- include/pdp_imageproc.h | 20 ++ include/pdp_mmx.h | 13 ++ include/pdp_resample.h | 4 +- modules/Makefile | 2 +- modules/pdp_cheby.c | 233 +++++++++++++++++++++ modules/pdp_mul.c | 5 - modules/pdp_route.c | 2 +- modules/pdp_scan.c | 231 +++++++++++++++++++++ modules/pdp_sdl.c | 427 +++++++++++++++++++++++++++++++++++++++ modules/pdp_zoom.c | 112 ++++++---- scaf/Makefile.config | 4 +- scaf/TODO | 3 + scaf/include/pdp_ca.h | 1 + scaf/pdp/pdp_ca.c | 206 +++++++++++++++++-- scaf/pdp/pdp_ca_system.c | 16 +- scaf/test/test_pdp_ca3.pd | 155 ++++++++++++++ system/mmx/Makefile | 5 +- system/mmx/pixel_cheby_s16.s | 90 +++++++++ system/mmx/pixel_resample_s16.s | 314 ++++++++++++++++++++++++++++ system/pdp.c | 8 + system/pdp_control.c | 4 +- system/pdp_imageproc_mmx.c | 235 +++++++++++++++++++++ system/pdp_imageproc_portable.c | 171 ++++++++++++++++ system/pdp_queue.c | 5 +- system/pdp_resample.c | 8 +- test/pdp_abstractions.pd | 22 -- test/test_oscil.pd | 69 ------- test/test_pdp_add.pd | 96 --------- test/test_pdp_affine.pd | 80 -------- test/test_pdp_bq.pd | 136 ------------- test/test_pdp_bq2.pd | 146 ------------- test/test_pdp_bqt.pd | 91 --------- test/test_pdp_chrot.pd | 32 --- test/test_pdp_conv.pd | 115 ----------- test/test_pdp_debug.pd | 18 -- test/test_pdp_del.pd | 41 ---- test/test_pdp_gain.pd | 46 ----- test/test_pdp_gradient.pd | 52 ----- test/test_pdp_mix.pd | 114 ----------- test/test_pdp_mul.pd | 44 ---- test/test_pdp_noise.pd | 40 ---- test/test_pdp_pctv.pd | 47 ----- test/test_pdp_portable.pd | 41 ---- test/test_pdp_qt_read.pd | 164 --------------- test/test_pdp_qt_read2.pd | 45 ----- test/test_pdp_randmix.pd | 31 --- test/test_pdp_reg.pd | 21 -- test/test_pdp_scale.pd | 38 ---- test/test_pdp_scope.pd | 21 -- test/test_pdp_snap.pd | 16 -- test/test_pdp_thread.pd | 33 --- test/test_pdp_trigger.pd | 13 -- test/test_pdp_v4l.pd | 91 --------- test/test_pdp_v4l_2.pd | 26 --- test/test_pdp_xv.pd | 44 ---- test/test_pdp_zoom.pd | 73 ------- test/test_warpfeedback.pd | 49 ----- 115 files changed, 4261 insertions(+), 2312 deletions(-) create mode 100644 debug/quicktime_crashtest.pd delete mode 100644 doc/control.pd create mode 100644 doc/examples/example04.pd create mode 100644 doc/examples/example05.pd create mode 100644 doc/examples/example06.pd delete mode 100644 doc/input_output.pd create mode 100644 doc/introduction/control.pd create mode 100644 doc/introduction/input_output.pd create mode 100644 doc/introduction/quicktime.pd create mode 100644 doc/introduction/traffic.pd create mode 100644 doc/objects/README create mode 100644 doc/objects/help_pdp_add.pd create mode 100644 doc/objects/help_pdp_affine.pd create mode 100644 doc/objects/help_pdp_bq.pd create mode 100644 doc/objects/help_pdp_bqt.pd create mode 100644 doc/objects/help_pdp_cheby.pd create mode 100644 doc/objects/help_pdp_chrot.pd create mode 100644 doc/objects/help_pdp_control.pd create mode 100644 doc/objects/help_pdp_conv.pd create mode 100644 doc/objects/help_pdp_del.pd create mode 100644 doc/objects/help_pdp_gain.pd create mode 100644 doc/objects/help_pdp_gradient.pd create mode 100644 doc/objects/help_pdp_grey.pd create mode 100644 doc/objects/help_pdp_mix.pd create mode 100644 doc/objects/help_pdp_mix2.pd create mode 100644 doc/objects/help_pdp_mul.pd create mode 100644 doc/objects/help_pdp_noise.pd create mode 100644 doc/objects/help_pdp_qt.pd create mode 100644 doc/objects/help_pdp_qt~.pd create mode 100644 doc/objects/help_pdp_randmix.pd create mode 100644 doc/objects/help_pdp_reg.pd create mode 100644 doc/objects/help_pdp_rotate.pd create mode 100644 doc/objects/help_pdp_route.pd create mode 100644 doc/objects/help_pdp_scale.pd create mode 100644 doc/objects/help_pdp_scan~.pd create mode 100644 doc/objects/help_pdp_scope~.pd create mode 100644 doc/objects/help_pdp_snap.pd create mode 100644 doc/objects/help_pdp_trigger.pd create mode 100644 doc/objects/help_pdp_v4l.pd create mode 100644 doc/objects/help_pdp_xv.pd create mode 100644 doc/objects/help_pdp_zoom.pd create mode 100644 doc/objects/help_pdp_zrot.pd create mode 100644 doc/objects/pdp_help_input.pd create mode 100644 doc/objects/pdp_help_output.pd delete mode 100644 doc/quicktime.pd delete mode 100644 doc/traffic.pd create mode 100644 modules/pdp_cheby.c create mode 100644 modules/pdp_scan.c create mode 100644 modules/pdp_sdl.c create mode 100644 scaf/TODO create mode 100644 scaf/test/test_pdp_ca3.pd create mode 100644 system/mmx/pixel_cheby_s16.s create mode 100644 system/mmx/pixel_resample_s16.s delete mode 100644 test/pdp_abstractions.pd delete mode 100644 test/test_oscil.pd delete mode 100644 test/test_pdp_add.pd delete mode 100644 test/test_pdp_affine.pd delete mode 100644 test/test_pdp_bq.pd delete mode 100644 test/test_pdp_bq2.pd delete mode 100644 test/test_pdp_bqt.pd delete mode 100644 test/test_pdp_chrot.pd delete mode 100644 test/test_pdp_conv.pd delete mode 100644 test/test_pdp_debug.pd delete mode 100644 test/test_pdp_del.pd delete mode 100644 test/test_pdp_gain.pd delete mode 100644 test/test_pdp_gradient.pd delete mode 100644 test/test_pdp_mix.pd delete mode 100644 test/test_pdp_mul.pd delete mode 100644 test/test_pdp_noise.pd delete mode 100644 test/test_pdp_pctv.pd delete mode 100644 test/test_pdp_portable.pd delete mode 100644 test/test_pdp_qt_read.pd delete mode 100644 test/test_pdp_qt_read2.pd delete mode 100644 test/test_pdp_randmix.pd delete mode 100644 test/test_pdp_reg.pd delete mode 100644 test/test_pdp_scale.pd delete mode 100644 test/test_pdp_scope.pd delete mode 100644 test/test_pdp_snap.pd delete mode 100644 test/test_pdp_thread.pd delete mode 100644 test/test_pdp_trigger.pd delete mode 100644 test/test_pdp_v4l.pd delete mode 100644 test/test_pdp_v4l_2.pd delete mode 100644 test/test_pdp_xv.pd delete mode 100644 test/test_pdp_zoom.pd delete mode 100644 test/test_warpfeedback.pd diff --git a/CHANGES.LOG b/CHANGES.LOG index 1c16d49..e7562bc 100644 --- a/CHANGES.LOG +++ b/CHANGES.LOG @@ -1,4 +1,4 @@ -last modified: 2003/01/12 +last modified: 2003/02/03 ChangeLog: @@ -48,7 +48,16 @@ v0.7: 2003/01/12 added mmx code for pdp_gain fixed bug in pdp_mix/pdp_mix2 fixed bug in pdp_bq (removed state reset) - move CA stuff to separate lib (see scaf/) + moved CA stuff to separate lib (see scaf/) (0.7.1) fixed rgb colour conversion bug -v0.8: added pdp_scale, pdp_zoom +v0.8: 2003/02/02 + added pdp_scale, pdp_zoom, pdp_rotate, pdp_zrot, pdp_scan~, pdp_cheby + added support for 1D ca's + shift compensation in pdp_ca + thread processing is off by default now + added cursor method to pdp_xv, freq method to pdp_v4l (thanks CK) + added pdp_sdl (thanks Martin Pi) + added some example patches in doc/examples + (0.8.1) fixed scaf + gcc<3 compilation problem + (0.8.2) fixed compile prob + added documentation + (0.8.3) completed documentation diff --git a/Makefile b/Makefile index 14ae460..2679d0e 100644 --- a/Makefile +++ b/Makefile @@ -22,13 +22,18 @@ clean: buildclean rm -f pdp.pd_linux rm -f *~ +distroclean: buildclean + make -C scaf clean + tags: etags --language=auto include/*.h system/mmx/*.s system/*.c modules/*.c tagsclean: rm -f TAGS -distro: clean + + +distro: distroclean rm -rf $(PDP_DISTRO) mkdir $(PDP_DISTRO) cp -av $(PDP_DIR)/* $(PDP_DISTRO) @@ -44,6 +49,9 @@ distro: clean www: $(PDP_TARBALL) cp -av $(PDP_TARBALL) $(PDP_WWWDIR) cp -av $(PDP_DIR)/README $(PDP_WWWDIR)/README.txt + cp -av $(PDP_DIR)/doc/reference.txt $(PDP_WWWDIR)/REFERENCE.txt + cp -av $(PDP_DIR)/CHANGES.LOG $(PDP_WWWDIR)/CHANGELOG.txt + www-test:$(PDP_TARBALL) cp -av $(PDP_TARBALL) $(PDP_WWWTESTDIR) diff --git a/Makefile.config b/Makefile.config index 9aa1fcc..694b79e 100644 --- a/Makefile.config +++ b/Makefile.config @@ -1,9 +1,9 @@ # pd's directory -#PD_DIR = /home/tom/pd/distro/pd -#PDP_DIR = /home/tom/pd/packet +PD_DIR = /home/tom/pd/distro/pd +PDP_DIR = /home/tom/pd/packet -PD_DIR = /usr/local/pd -PDP_DIR = /usr/local/pdp +#PD_DIR = /usr/local/pd +#PDP_DIR = /usr/local/pdp # uncomment for philips webcam support # PDP_PWC = -DHAVE_V4LPWC @@ -16,20 +16,24 @@ PDP_TARGET = linux_mmx ################################################# -PDP_VERSION = 0.8-test-2 +PDP_VERSION = 0.8.3 PDP_DEFINES = $(PDP_PWC) # build flags +#SDL_CFLAGS := $(shell sdl-config --cflags) +#SDL_LDFLAGS := $(shell sdl-config --libs) +SDL_FLAGS = -D_REENTRANT +SDL_LDFLAGS = -lSDL PDP_INCLUDE = -I$(PD_DIR)/src -I. -I/usr/X11R6/include -I../include -PDP_LIBS = -L/usr/X11R6/lib -lX11 -lXv -lXext -lm -lquicktime -ldl +PDP_LIBS = -L/usr/X11R6/lib -lX11 -lXv -lXext -lm -lquicktime -ldl $(SDL_LDFLAGS) PDP_AFLAGS = #--gstabs PDP_CFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer -ffast-math \ -Wall -W -Wstrict-prototypes -Werror \ -Wno-unused -Wno-parentheses -Wno-switch $(PDP_DEFINES)\ -DPDP_VERSION=\"$(PDP_VERSION)\" \ - -g + -g $(SDL_CFLAGS) # -Wshadow # compiler and assembler diff --git a/Makefile.linux b/Makefile.linux index 156a5e6..0c4a748 100644 --- a/Makefile.linux +++ b/Makefile.linux @@ -1,4 +1,4 @@ pdp.pd_linux: pdp_all rm -f pdp.pd_linux - gcc -export_dynamic -shared -o pdp.pd_linux modules/*.o system/*.o $(PDP_LIBS) + $(CC) -export_dynamic -shared -o pdp.pd_linux modules/*.o system/*.o $(PDP_LIBS) #strip --strip-unneeded pdp.pd_linux diff --git a/Makefile.linux_mmx b/Makefile.linux_mmx index 2d988ec..2adbb1c 100644 --- a/Makefile.linux_mmx +++ b/Makefile.linux_mmx @@ -1,4 +1,4 @@ pdp.pd_linux: pdp_all rm -f pdp.pd_linux - gcc -export_dynamic -shared -o pdp.pd_linux modules/*.o system/*.o system/mmx/*.o $(PDP_LIBS) + $(CC) -export_dynamic -shared -o pdp.pd_linux modules/*.o system/*.o system/mmx/*.o $(PDP_LIBS) #strip --strip-unneeded pdp.pd_linux diff --git a/README b/README index eb53d0c..efc6ae6 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -PDP - Pure Data Packet v0.7 +PDP - Pure Data Packet v0.8.3 a packet processing library for pure data Copyright (c) by Tom Schouten @@ -32,13 +32,6 @@ compilablility yet. So if some of the requirements are missing on your system, you'll have to tinker a bit to get it working until i move to automatic configuration and building... -The goal (for now) is not to write a general purpose video processing -tool for pd, the goal is to experiment with cache optimization, mmx -integer processing, time and space feedback in video, nonlinear -difference equations, cellular automata, computer vision, and other -buzzwords... - - Features: * packet formats: greyscale and YV12 encoded images, @@ -46,6 +39,7 @@ Features: * sources: noise, video4linux and quicktime (with audio), CA * sink: xvideo display * filters: convolution, biquad time, biquad space, CA +* warping: rotate, zoom, stretch * transforms: colour translation/scaling, grey->palette * add, mul, mix, random pixel mix * utility objs: packet register, snapshot, trigger @@ -67,15 +61,20 @@ Requirements: philips webcam included. * libquicktime (not quicktime4linux!) for quicktime playback. * an X display with XVideo extension for video display +* libsdl Documentation: -Have a look in doc/ for documentation. It is not finished yet. More info -in modules/README, scaf/README, the files in abstractions/ and test/ and -the code. If you wan't to make your own pdp modules, you can take the -simplest one (modules/pdp_add.c) as an example. -The file doc/reference.txt contains a list of all objects. +Have a look in doc/ for documentation. The file doc/reference.txt +contains a list of all objects. doc/introduction has some basic +facts on using pdp. doc/objects is a reference doc for all the +objects and doc/examples contains some more example patches. + +The directory abstractions/ has some abstractions using the pdp +objects (some specific filters) that can serve as example. + +For developer docs see modules/README, scaf/README. Building: @@ -102,8 +101,8 @@ Additional Remarks: * If some of the modules don't compile due to some missing libraries, you can try to comment out the offending code in modules/Makefile and system/pdp.c If compilation or linking fails due to other reasons, -please let me know. if you have both libquicktime and quicktime4linux -installed. make sure pdp.pd_linux loads the right library. +please let me know. If you have both libquicktime and quicktime4linux +installed, make sure pdp.pd_linux loads the right library. * The reason i use YV12 and not RGB is simple: it's faster, and for linear operations it doesn't make much difference. Most camera's and @@ -123,13 +122,12 @@ processing. * Packets can be processed in a low priority thread with a dropping mechanism to prevent overload or audio drops, or they can be processed in the main pd thread. This can be set/unset by sending a "thread x" -message to pdp_control. Processing in thread is on by default. If you -don't need audio, (i.e. if you are using 2 pd's, one for audio and one -for video) having threads disabled can have advantages, since no pdp -frames are dropped and no extra delays are introduced. Even when you use -audio and pdp in the same pd session, it is possible to run with threads -disabled and without audio dropouts by tuning pd's fragsize and keeping -the frame rate low. +message to pdp_control. Processing in pdp thread is off by default. +Use the pd thread for rock solid video timing. Increase the audio +latency to avoid dropouts. If you want low audio latency, and don't +care about a dropped video frame here and there, switch on the pdp +thread. Note that when using the pdp thread, the control flow is no +longer depth first. Additinal delays will be introduced. * There have been some requests for an osx port, but i wil probably not do this myself (at least not right now). However, i've ported all @@ -137,7 +135,8 @@ the mmx code to c, so it should work on other architectures as well. This should ease porting a bit for anyone who wants to give it a try. Also i've moved all the image conversion routines to pdp_llconv.c This means porting is reduced to writing new objects for the os specific -stuff like video/movie input/output. +stuff like movie playback&record and live video input. Thanks to Martin +Pi we now have sdl support for video output. * Have a look at Yves Degoyon's PiDiP library. It contains some extra effects (from EffecTV and FreeJ), a quicktime recording object, some @@ -161,15 +160,16 @@ Experimental relases are in the subdirectory test/ Directory structure: -abstractions/ some abstractions that use the pdp objects -doc/ start of a decent set of document patches -debug/ debug scripts -include/ header files -modules/ pdp module code -scaf/ CA extension lib (needs to be compiled separately) -system/ core pdp system -system/mmx/ mmx assembler files -test/ some test patches (pretty complete doc but cryptic) +abstractions/ some abstractions that use the pdp objects +doc/introduction/ getting started with pdp +doc/examples/ some example patches +doc/objects/ pd style reference documentation +debug/ debug scripts +include/ header files +modules/ pdp module code +scaf/ CA extension lib (needs to be compiled separately) +system/ core pdp system +system/mmx/ mmx assembler files @@ -182,4 +182,4 @@ Have Fun, Tom -last modified: 2003/01/19 +last modified: 2003/02/03 diff --git a/TODO b/TODO index 62929c4..8d60c06 100644 --- a/TODO +++ b/TODO @@ -5,29 +5,34 @@ bugs: (workaround: use a multiple of 8x8 to prevent this. ca dims should be a multiple of 64x2) * pdp_xv: catch sigpipe when window is closed (workaround: don't close the video windows manually ;) -todo 0.8: -* rotate -* crop, shift (pad+scroll) +todo 0.9: + +* improve scanned synthesis (method to specify scanning path) +* solve image dimension problenms for sources +* ascii art packet stuff (yves?) +* add real trigger object (problem with 3 phase protocol ?) +* add shear -> simplify code to use general affine 2d transformations +* displacement warp, substitution warp * efficient rescalers: pdp_double pdp_halve * move float color conversion and float<->fixed point conv code to system -* thresholding / color "waveshaping" -* documentation (+cleanup) +* add mouse pointer code to pdp_xv +* crop, shift (pad+scroll) todo: +* thresholding +* find out why resampling code (warping) is so slow (reg->mem->reg->mem stalls?) * add audio resampling in pdp_qt~ -* clean up and add some ca rules -* add some more abstractions to have faster acces to different modes of all the modules +* add some more abstractions * fix dimension problems on input (for now, make sure images have correct dim, else generate error) * use pd_error instead of post for errors -* finish documentation -* add developer documentation * move to autoconf/automake/libtool * interface with gem * think about the memory allocation strategy (there is no garbage collection right now) -* add general x window display code (hmm, this is more hassle than i thought..) wish list: + * colour keying * camera controller (motion tracking ?) +* moebius transforms (integer inverse square root??) & other complex plane stuff diff --git a/abstractions/pdp_phase.pd b/abstractions/pdp_phase.pd index 2927fd9..c615d2e 100644 --- a/abstractions/pdp_phase.pd +++ b/abstractions/pdp_phase.pd @@ -27,7 +27,7 @@ #X msg 463 191 tb 0; #X msg 501 191 bt 0; #X text 99 235 this uses pdp_bq as an allpass filter to produce a phase -shift effect. 2nd inlet sets amount. 3rd and 4t inlets set directions. +shift effect. 2nd inlet sets amount. 3rd and 4th inlets set directions. ; #X connect 0 0 2 0; #X connect 2 0 1 0; diff --git a/debug/gdb_pdp_load b/debug/gdb_pdp_load index 552372b..ec57816 100644 --- a/debug/gdb_pdp_load +++ b/debug/gdb_pdp_load @@ -1,14 +1,14 @@ cd ~/pd/packet file ~/pd/distro/pd/bin/pd.debug # file ~/pd/distro/pd/bin/pd -set args -r 44100 -alsa -frags 64 -lib pdp -nodac -noadc -path abstractions test/test_pdp_scale.pd +set args -r 44100 -alsa -frags 64 -lib pdp -nodac -noadc -path abstractions test/test_pdp_zoom2.pd # set args -lib pdp -nodac -noadc -path abstractions test/test_pdp_thread.pd # set args -lib pdp -nodac -noadc test/test_pdp_ca.pd # set args -r 44100 -alsa -frags 64 -lib pdp -nodac -noadc test/test_pdp_qt_read.pd # dir ~/pd/distro/pd/src dir modules dir system -dir mmx +dir system/mmx dir scaf dir scaf/modules dir scaf/system diff --git a/debug/quicktime_crashtest.pd b/debug/quicktime_crashtest.pd new file mode 100644 index 0000000..b4bb088 --- /dev/null +++ b/debug/quicktime_crashtest.pd @@ -0,0 +1,164 @@ +#N canvas 190 294 862 660 10; +#X obj 122 506 pdp_xv; +#X msg 135 81 bang; +#X floatatom 54 78 5 0 0; +#X msg 222 90 open /home/ben/MOV/test1.mov; +#X msg 418 369 open /home/ben/MOV/eye.mov; +#X obj 126 26 i 0; +#X obj 182 37 + 1; +#X obj 217 47 metro 40; +#X obj 262 17 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1 +-1; +#X msg 25 47 0; +#X msg 64 49 9999; +#X msg 25 149 loop \$1; +#X obj 21 123 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 0 1 +; +#X floatatom 264 231 5 0 0; +#X floatatom 538 184 5 0 0; +#X msg 370 44 open \$1; +#X obj 369 20 openpanel; +#X obj 354 3 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1 +-1; +#X floatatom 192 459 5 0 0; +#X floatatom 309 9 5 0 0; +#X msg 298 135 open /home/ben/MOV/nogeseenfilmke.mov; +#X obj 346 406 table tab1; +#X msg 56 23 close; +#X obj 250 542 dac~; +#X msg 315 390 0; +#X obj 316 427 tabplay~ tab1; +#X msg 332 325 importaudio tab1; +#X obj 26 185 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 0 1 +; +#X floatatom 180 83 5 0 0; +#X msg 215 7 stop; +#X obj 478 213 i; +#X obj 490 276 mod; +#X obj 494 244 + 1; +#X floatatom 558 226 5 0 0; +#X msg 30 211 autoplay \$1; +#X floatatom 501 321 5 0 0; +#X obj 119 331 pdp_del 10; +#X floatatom 194 289 5 0 0; +#X obj 384 221 *; +#X obj 288 159 hsl 300 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144 +-1 -1 0 1; +#X obj 305 44 hsl 300 15 0 1000 0 0 empty empty empty -2 -6 0 8 -262144 +-1 -1 0 1; +#X msg 329 254 loop \$1; +#X obj 325 228 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 0 +1; +#X obj 236 258 pdp_trigger; +#X obj 117 421 pdp_mix; +#X floatatom 182 390 5 0 0; +#X obj 278 349 hsl 300 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144 +-1 -1 0 1; +#X msg 434 394 open /home/ben/MOV/nogeseenfilmke.mov; +#X obj 241 175 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 0 +1; +#X msg 245 201 autoplay \$1; +#X obj 408 254 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X msg 65 281 close; +#X obj 352 484 vol~; +#X obj 221 497 vol~; +#X floatatom 252 470 5 0 0; +#X floatatom 382 460 5 0 0; +#X msg 418 281 close; +#X msg 121 145 play; +#X msg 347 229 play; +#X msg 447 13 bang; +#X msg 564 13 stop; +#X msg 540 97 \; pd dsp 1; +#X msg 616 98 \; pd dsp 0; +#X floatatom 608 13 5 0 0; +#X msg 732 104 close; +#X msg 778 105 close; +#X obj 470 66 route 0 1 2 3 4 5 6 7; +#X msg 675 13 140; +#X obj 489 42 random 6; +#X obj 483 12 metro 140; +#X obj 715 46 loadbang; +#X msg 750 76 \; pd dsp 1; +#X obj 133 205 pdp_qt~; +#X obj 322 283 pdp_qt~; +#X obj 207 71 random 250; +#X connect 1 0 72 0; +#X connect 2 0 72 0; +#X connect 3 0 72 0; +#X connect 4 0 73 0; +#X connect 5 0 6 0; +#X connect 5 0 1 0; +#X connect 6 0 5 1; +#X connect 7 0 74 0; +#X connect 8 0 7 0; +#X connect 9 0 2 0; +#X connect 10 0 2 0; +#X connect 11 0 72 0; +#X connect 12 0 11 0; +#X connect 14 0 31 1; +#X connect 14 0 38 1; +#X connect 15 0 72 0; +#X connect 16 0 15 0; +#X connect 17 0 16 0; +#X connect 18 0 0 1; +#X connect 19 0 7 1; +#X connect 20 0 72 0; +#X connect 22 0 72 0; +#X connect 24 0 25 0; +#X connect 26 0 72 0; +#X connect 27 0 34 0; +#X connect 28 0 72 1; +#X connect 29 0 7 0; +#X connect 30 0 32 0; +#X connect 31 0 35 0; +#X connect 32 0 31 0; +#X connect 33 0 32 1; +#X connect 34 0 72 0; +#X connect 36 0 44 0; +#X connect 37 0 36 1; +#X connect 38 0 28 0; +#X connect 39 0 38 0; +#X connect 40 0 19 0; +#X connect 41 0 73 0; +#X connect 42 0 41 0; +#X connect 44 0 0 0; +#X connect 45 0 44 2; +#X connect 46 0 45 0; +#X connect 47 0 73 0; +#X connect 48 0 49 0; +#X connect 49 0 73 0; +#X connect 50 0 73 0; +#X connect 51 0 72 0; +#X connect 56 0 73 0; +#X connect 57 0 72 0; +#X connect 58 0 73 0; +#X connect 59 0 69 0; +#X connect 59 0 58 0; +#X connect 59 0 57 0; +#X connect 60 0 69 0; +#X connect 63 0 69 1; +#X connect 64 0 72 0; +#X connect 65 0 73 0; +#X connect 66 0 3 0; +#X connect 66 1 20 0; +#X connect 66 2 4 0; +#X connect 66 3 47 0; +#X connect 66 6 64 0; +#X connect 66 7 65 0; +#X connect 67 0 63 0; +#X connect 68 0 66 0; +#X connect 69 0 68 0; +#X connect 70 0 59 0; +#X connect 70 0 71 0; +#X connect 72 0 43 0; +#X connect 72 0 36 0; +#X connect 72 1 13 0; +#X connect 72 2 14 0; +#X connect 72 3 23 1; +#X connect 72 4 23 0; +#X connect 73 0 44 1; +#X connect 73 3 23 0; +#X connect 73 4 23 1; +#X connect 74 0 28 0; diff --git a/doc/control.pd b/doc/control.pd deleted file mode 100644 index 3898e1e..0000000 --- a/doc/control.pd +++ /dev/null @@ -1,17 +0,0 @@ -#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/example03.pd b/doc/examples/example03.pd index 85f1c01..90b74c0 100644 --- a/doc/examples/example03.pd +++ b/doc/examples/example03.pd @@ -8,16 +8,16 @@ #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; +-1 -1 5600 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; +-1 -1 500 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; +-1 -1 12700 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; +-1 -1 8700 1; #X msg 15 460 reset; #X obj 68 459 pdp_add; #X obj 68 357 pdp_gain; @@ -49,8 +49,8 @@ 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.; +additional temporal filtering isn'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; diff --git a/doc/examples/example04.pd b/doc/examples/example04.pd new file mode 100644 index 0000000..501d283 --- /dev/null +++ b/doc/examples/example04.pd @@ -0,0 +1,85 @@ +#N canvas 89 39 931 736 10; +#X obj 68 204 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 112 303 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 6500 1; +#X floatatom 240 233 5 0 0; +#X obj 243 208 hsl 128 15 0 5 0 1 empty empty empty -2 -6 0 8 -262144 +-1 -1 0 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 5000 1; +#X floatatom 239 307 5 0 0; +#X obj 242 288 hsl 128 15 -5 5 0 1 empty empty empty -2 -6 0 8 -262144 +-1 -1 8920 1; +#X msg 15 339 reset; +#X obj 68 338 pdp_add; +#X obj 68 243 pdp_gain; +#X text 393 286 a |gain| > 1 ensures regeneration; +#X floatatom 119 56 5 0 0; +#X obj 68 582 pdp_motion_phase; +#X floatatom 133 338 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 146 119 type grey; +#X msg 147 90 type yv12; +#X obj 68 619 pdp_xv; +#X text 393 206 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 obj 68 363 pdp_del 50; +#X text 242 14 this example is like example03 with a zoom / rotation +object thrown in; +#X obj 68 480 pdp_zrot; +#X floatatom 239 377 5 0 0; +#X obj 242 358 hsl 128 15 0.1 10 1 1 empty empty empty -2 -6 0 8 -262144 +-1 -1 8567 1; +#X floatatom 239 446 5 0 0; +#X obj 242 426 hsl 128 15 0 360 0 1 empty empty empty -2 -6 0 8 -262144 +-1 -1 300 1; +#X text 393 357 zoom; +#X msg 239 334 1; +#X msg 239 403 0; +#X msg 239 261 1; +#X text 392 420 rotation; +#X connect 0 0 15 0; +#X connect 1 0 0 0; +#X connect 2 0 1 0; +#X connect 3 0 14 1; +#X connect 5 0 18 0; +#X connect 6 0 4 0; +#X connect 6 0 5 1; +#X connect 8 0 7 0; +#X connect 8 0 15 1; +#X connect 10 0 9 0; +#X connect 10 0 18 1; +#X connect 12 0 11 0; +#X connect 12 0 3 1; +#X connect 13 0 28 0; +#X connect 14 0 28 0; +#X connect 15 0 14 0; +#X connect 17 0 1 1; +#X connect 18 0 3 0; +#X connect 18 0 26 0; +#X connect 19 0 28 1; +#X connect 22 0 17 0; +#X connect 23 0 17 0; +#X connect 24 0 0 0; +#X connect 25 0 0 0; +#X connect 28 0 30 0; +#X connect 30 0 5 0; +#X connect 31 0 30 1; +#X connect 32 0 31 0; +#X connect 33 0 30 2; +#X connect 34 0 33 0; +#X connect 36 0 32 0; +#X connect 37 0 34 0; +#X connect 38 0 12 0; diff --git a/doc/examples/example05.pd b/doc/examples/example05.pd new file mode 100644 index 0000000..02bc688 --- /dev/null +++ b/doc/examples/example05.pd @@ -0,0 +1,142 @@ +#N canvas 584 220 538 637 10; +#X obj 10 11 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 120 117 pdp_grey; +#X obj 435 194 pdp_control; +#X msg 435 167 thread 0; +#X obj 121 224 pdp_reg; +#X floatatom 81 7 5 0 0; +#X msg 35 10 stop; +#X floatatom 187 341 5 0 0; +#X obj 120 410 pdp_zrot; +#X floatatom 188 389 5 0 0; +#X obj 120 453 pdp_blur; +#X floatatom 188 435 5 0 0; +#X obj 120 92 pdp_noise; +#X obj 120 70 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#N canvas 623 175 567 478 nlmap 0; +#X obj 89 138 pdp_affine; +#X msg 123 108 -1; +#X msg 156 108 1; +#X obj 92 161 pdp_mul; +#X obj 95 189 pdp_gain; +#X floatatom 234 159 5 0 0; +#X msg 259 119 3.73; +#X obj 100 272 pdp_affine; +#X msg 134 242 -1; +#X msg 167 242 1; +#X obj 103 295 pdp_mul; +#X obj 106 323 pdp_gain; +#X floatatom 168 299 5 0 0; +#X msg 185 271 3.73; +#X obj 254 54 inlet; +#X obj 79 55 inlet; +#X obj 98 405 outlet; +#X obj 164 60 loadbang; +#X obj 190 84 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X text 260 220 this computes f(f(image)); +#X text 261 236 with f(x) = k*x*(1-x); +#X text 286 160 k; +#X text 260 253 the logistic map; +#X text 173 353 2 iterations are used to eliminate most of the high +frequency flickering; +#X connect 0 0 3 0; +#X connect 1 0 0 1; +#X connect 2 0 0 2; +#X connect 3 0 4 0; +#X connect 4 0 10 1; +#X connect 4 0 7 0; +#X connect 5 0 4 1; +#X connect 5 0 12 0; +#X connect 6 0 5 0; +#X connect 7 0 10 0; +#X connect 8 0 7 1; +#X connect 9 0 7 2; +#X connect 10 0 11 0; +#X connect 11 0 16 0; +#X connect 12 0 11 1; +#X connect 13 0 12 0; +#X connect 14 0 5 0; +#X connect 15 0 3 1; +#X connect 15 0 0 0; +#X connect 17 0 18 0; +#X connect 18 0 2 0; +#X connect 18 0 1 0; +#X connect 18 0 6 0; +#X connect 18 0 8 0; +#X connect 18 0 9 0; +#X restore 121 274 pd nlmap; +#X obj 73 576 pdp_xv; +#X floatatom 180 232 5 0 0; +#X text 196 275 2 iterations of the logistic map function; +#X obj 121 143 pdp_mul; +#X obj 297 94 pdp_noise; +#X obj 297 72 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 297 121 pdp_mul; +#X obj 73 521 pdp_saturation; +#X floatatom 166 490 5 0 0; +#X obj 30 36 metro 70; +#X msg 181 206 3.8; +#X msg 186 318 1.17; +#X msg 188 368 -2.33; +#X text 242 341 zoom; +#X text 241 391 rotate; +#X msg 188 414 0.33; +#X text 139 12 feedback with nonlinear mapping + zoom + rotate + blur +; +#X msg 82 -15 40; +#X msg 116 -15 500; +#X text 111 47 grey1; +#X obj 212 119 pdp_grey; +#X obj 212 94 pdp_noise; +#X obj 212 72 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X text 203 49 grey2; +#X text 287 50 colour1; +#X obj 388 95 pdp_noise; +#X obj 388 73 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X text 378 51 colour2; +#X msg 238 463 -0.5; +#X msg 282 463 0.5; +#X connect 0 0 24 0; +#X connect 1 0 18 1; +#X connect 1 0 18 0; +#X connect 3 0 2 0; +#X connect 4 0 14 0; +#X connect 5 0 24 1; +#X connect 6 0 24 0; +#X connect 7 0 8 1; +#X connect 8 0 10 0; +#X connect 9 0 8 2; +#X connect 10 0 4 1; +#X connect 11 0 10 1; +#X connect 12 0 1 0; +#X connect 13 0 12 0; +#X connect 14 0 8 0; +#X connect 14 0 22 0; +#X connect 16 0 14 1; +#X connect 18 0 4 0; +#X connect 19 0 21 1; +#X connect 19 0 21 0; +#X connect 20 0 19 0; +#X connect 21 0 4 0; +#X connect 22 0 15 0; +#X connect 23 0 22 1; +#X connect 24 0 4 0; +#X connect 25 0 16 0; +#X connect 26 0 7 0; +#X connect 27 0 9 0; +#X connect 30 0 11 0; +#X connect 32 0 5 0; +#X connect 33 0 5 0; +#X connect 35 0 4 0; +#X connect 36 0 35 0; +#X connect 37 0 36 0; +#X connect 40 0 4 0; +#X connect 41 0 40 0; +#X connect 43 0 23 0; +#X connect 44 0 23 0; diff --git a/doc/examples/example06.pd b/doc/examples/example06.pd new file mode 100644 index 0000000..82de63b --- /dev/null +++ b/doc/examples/example06.pd @@ -0,0 +1,76 @@ +#N canvas 92 197 605 585 10; +#X obj 24 85 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X msg 42 25 stop; +#X msg 80 24 bang; +#X floatatom 122 25 5 0 0; +#X obj 60 485 pdp_xv; +#X obj 60 439 pdp_bq; +#X obj 111 334 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 +1; +#X obj 169 332 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 +1; +#X obj 97 278 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 +; +#X obj 154 277 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 +1; +#X msg 95 303 lr \$1; +#X msg 150 304 rl \$1; +#X msg 99 350 tb \$1; +#X msg 154 351 bt \$1; +#X obj 392 240 hsl 128 15 0.05 0.5 1 1 empty empty empty -2 -6 0 8 +-262144 -1 -1 3000 1; +#X obj 450 280 hsl 128 15 0.1 10 1 1 empty empty empty -2 -6 0 8 -262144 +-1 -1 1900 1; +#X obj 391 307 t b f; +#X obj 394 345 pack s 0 0; +#X msg 391 378 \$1 \$2 \$3; +#X obj 447 310 t b f; +#X msg 301 199 lpf; +#X msg 333 200 apf; +#X obj 130 198 random 2; +#X obj 195 198 random 2; +#X obj 60 147 pdp_trigger; +#X obj 128 235 random 2; +#X obj 193 235 random 2; +#X obj 60 111 pdp_v4l; +#X obj 301 121 loadbang; +#X obj 60 53 metro 40; +#X text 388 219 frequency; +#X text 447 261 Q; +#X text 312 175 filter type; +#X connect 0 0 27 0; +#X connect 1 0 29 0; +#X connect 2 0 29 0; +#X connect 3 0 29 1; +#X connect 5 0 4 0; +#X connect 6 0 12 0; +#X connect 7 0 13 0; +#X connect 8 0 10 0; +#X connect 9 0 11 0; +#X connect 10 0 5 0; +#X connect 11 0 5 0; +#X connect 12 0 5 0; +#X connect 13 0 5 0; +#X connect 14 0 16 0; +#X connect 15 0 19 0; +#X connect 16 0 17 0; +#X connect 16 1 17 1; +#X connect 17 0 18 0; +#X connect 18 0 5 0; +#X connect 19 0 17 0; +#X connect 19 1 17 2; +#X connect 20 0 17 0; +#X connect 21 0 17 0; +#X connect 22 0 8 0; +#X connect 23 0 9 0; +#X connect 24 0 5 0; +#X connect 24 1 23 0; +#X connect 24 1 22 0; +#X connect 24 1 26 0; +#X connect 24 1 25 0; +#X connect 25 0 6 0; +#X connect 26 0 7 0; +#X connect 27 0 24 0; +#X connect 28 0 20 0; +#X connect 29 0 27 0; diff --git a/doc/input_output.pd b/doc/input_output.pd deleted file mode 100644 index fe6ccc1..0000000 --- a/doc/input_output.pd +++ /dev/null @@ -1,53 +0,0 @@ -#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/introduction/control.pd b/doc/introduction/control.pd new file mode 100644 index 0000000..3898e1e --- /dev/null +++ b/doc/introduction/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/introduction/input_output.pd b/doc/introduction/input_output.pd new file mode 100644 index 0000000..afb1fa6 --- /dev/null +++ b/doc/introduction/input_output.pd @@ -0,0 +1,75 @@ +#N canvas 215 217 894 722 10; +#X obj 107 427 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 661 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 556 dim 320 240; +#X msg 210 579 dim 640 480; +#X text 349 559 dim sets the window dimensions; +#X msg 210 510 create; +#X msg 210 531 destroy; +#X text 208 447 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 513 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 msg 212 627 cursor \$1; +#X obj 212 607 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 +1; +#X text 348 627 enables/disables cursor in xv window; +#X msg 210 319 channel \$1; +#X floatatom 210 295 5 0 0; +#X text 347 320 sets the v4l channel (like tuner \, composite \, svideo +\, ...); +#X floatatom 210 359 5 0 0; +#X msg 210 383 freq \$1; +#X floatatom 271 359 5 0 0; +#X msg 271 383 freqMHz \$1; +#X text 346 359 sets the v4l tuner frequency (in v4l units and MHz) +; +#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; +#X connect 25 0 5 0; +#X connect 26 0 25 0; +#X connect 28 0 0 0; +#X connect 29 0 28 0; +#X connect 31 0 32 0; +#X connect 32 0 0 0; +#X connect 33 0 34 0; +#X connect 34 0 0 0; diff --git a/doc/introduction/quicktime.pd b/doc/introduction/quicktime.pd new file mode 100644 index 0000000..2f32cfd --- /dev/null +++ b/doc/introduction/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/introduction/traffic.pd b/doc/introduction/traffic.pd new file mode 100644 index 0000000..40f102d --- /dev/null +++ b/doc/introduction/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; diff --git a/doc/objects/README b/doc/objects/README new file mode 100644 index 0000000..94f8bb5 --- /dev/null +++ b/doc/objects/README @@ -0,0 +1,4 @@ +This directory contains help patches for the individual pdp modules and abstractions. +Use the pdp_help_input.pd and pdp_help_output.pd patches to setup your desired in/out for +the help patches. + diff --git a/doc/objects/help_pdp_add.pd b/doc/objects/help_pdp_add.pd new file mode 100644 index 0000000..4105dcf --- /dev/null +++ b/doc/objects/help_pdp_add.pd @@ -0,0 +1,24 @@ +#N canvas 180 63 511 383 10; +#X msg 77 38 start; +#X msg 124 38 stop; +#X obj 77 70 pdp_help_input; +#X obj 77 322 pdp_help_output; +#X obj 77 279 pdp_add; +#X obj 121 246 pdp_reg; +#X obj 196 183 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X text 229 181 click here; +#X obj 77 163 pdp_gain; +#X floatatom 128 135 5 0 0; +#X msg 128 109 0.5; +#X text 229 283 adds (and saturates) 2 packets; +#X connect 0 0 2 0; +#X connect 1 0 2 0; +#X connect 2 0 8 0; +#X connect 4 0 3 0; +#X connect 5 0 4 1; +#X connect 6 0 5 0; +#X connect 8 0 4 0; +#X connect 8 0 5 1; +#X connect 9 0 8 1; +#X connect 10 0 9 0; diff --git a/doc/objects/help_pdp_affine.pd b/doc/objects/help_pdp_affine.pd new file mode 100644 index 0000000..3386fb8 --- /dev/null +++ b/doc/objects/help_pdp_affine.pd @@ -0,0 +1,18 @@ +#N canvas 278 50 576 226 10; +#X obj 31 121 pdp_affine 1; +#X obj 31 44 pdp_help_input; +#X obj 31 175 pdp_help_output; +#X floatatom 70 95 5 0 0; +#X floatatom 118 95 5 0 0; +#X msg 31 15 start; +#X msg 77 15 stop; +#X text 76 79 a; +#X text 128 80 b; +#X text 200 103 pdp_affine computes ax+b on an image x; +#X text 200 121 its use is depreciated. use pdp_cheby instead.; +#X connect 0 0 2 0; +#X connect 1 0 0 0; +#X connect 3 0 0 1; +#X connect 4 0 0 2; +#X connect 5 0 1 0; +#X connect 6 0 1 0; diff --git a/doc/objects/help_pdp_bq.pd b/doc/objects/help_pdp_bq.pd new file mode 100644 index 0000000..06c05da --- /dev/null +++ b/doc/objects/help_pdp_bq.pd @@ -0,0 +1,149 @@ +#N canvas 364 134 765 779 10; +#X floatatom 100 598 5 0 0; +#X msg 28 361 ver \$1; +#X msg 28 393 hor \$1; +#X obj 96 362 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 +; +#X obj 95 389 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 +; +#X obj 28 629 pdp_bq; +#X floatatom 89 495 5 0 0; +#X msg 28 495 onep \$1; +#X floatatom 89 526 5 0 0; +#X msg 28 530 twop \$1; +#X obj 85 272 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 +; +#X obj 87 304 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 +; +#X obj 79 209 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 +; +#X obj 82 244 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 +; +#X msg 28 209 lr \$1; +#X msg 28 244 rl \$1; +#X msg 28 277 tb \$1; +#X msg 28 305 bt \$1; +#X obj 454 406 t b f; +#X floatatom 489 369 5 0 0; +#X floatatom 488 317 5 0 0; +#X obj 454 436 pack s 0 0; +#X msg 454 469 \$1 \$2 \$3; +#X obj 489 405 t b f; +#X msg 410 370 lpf; +#X msg 409 344 hpf; +#X msg 409 398 apf; +#X msg 409 425 bsf; +#X obj 461 38 pdp_help_input; +#X msg 461 13 start; +#X msg 507 13 stop; +#X obj 28 746 pdp_help_output; +#X text 159 598 right inlet sets number of passes; +#X text 37 16 pdp_bq: a spatial biquad filter; +#X obj 495 196 pdp_blur; +#X obj 598 194 pdp_phase; +#X obj 461 93 pdp_route 3; +#X obj 533 65 hdl 15 1 0 3 empty empty empty 0 -6 0 8 -262144 -1 -1 +0; +#X obj 41 670 r \$0-out; +#X obj 495 246 s \$0-out; +#X floatatom 544 119 5 0 0; +#X floatatom 617 117 5 0 0; +#X text 312 358 high pass; +#X text 313 382 low pass; +#X text 314 410 all pass; +#X text 313 439 band stop; +#X text 541 367 pole Q; +#X text 94 31 it is a bit awkward to use directly; +#X text 94 45 try one of the abstractions (pdp_blur and; +#X text 95 61 pdp_phase); +#X text 122 208 left->right; +#X text 124 242 right->left; +#X text 126 272 top->bottom; +#X text 126 300 bottom->top; +#X text 133 359 bt and tb; +#X text 132 383 lr and rl; +#X text 147 494 one pole filter; +#X text 146 524 double one pole filter; +#X msg 89 464 0.1; +#X msg 556 95 0.5; +#X msg 616 94 0.5; +#X text 588 62 choose example here; +#X msg 672 118 1; +#X msg 673 140 0; +#X msg 673 163 -1; +#X msg 712 116 1; +#X msg 713 138 0; +#X msg 713 161 -1; +#X text 93 91 "unstable" behaviour is possible; +#X msg 490 347 0.1; +#X msg 488 293 0.3; +#X obj 28 720 pdp_gain; +#X floatatom 112 693 5 0 0; +#X msg 112 671 1; +#X text 95 107 when frequency and Q are outside their; +#X text 96 122 sensible ranges; +#X text 122 180 set filter direction:; +#X text 264 342 set the filter type:; +#X text 137 476 set the filter type:; +#X text 538 319 (between 0 and 1 \, 0.5 = nyquist); +#X text 540 333; +#X text 540 305 pole frequency; +#X msg 100 572 1; +#X connect 0 0 5 1; +#X connect 1 0 5 0; +#X connect 2 0 5 0; +#X connect 3 0 1 0; +#X connect 4 0 2 0; +#X connect 5 0 71 0; +#X connect 6 0 7 0; +#X connect 7 0 5 0; +#X connect 8 0 9 0; +#X connect 8 0 9 0; +#X connect 9 0 5 0; +#X connect 10 0 16 0; +#X connect 11 0 17 0; +#X connect 12 0 14 0; +#X connect 13 0 15 0; +#X connect 14 0 5 0; +#X connect 15 0 5 0; +#X connect 16 0 5 0; +#X connect 17 0 5 0; +#X connect 18 0 21 0; +#X connect 18 1 21 1; +#X connect 19 0 23 0; +#X connect 20 0 18 0; +#X connect 21 0 22 0; +#X connect 22 0 5 0; +#X connect 23 0 21 0; +#X connect 23 1 21 2; +#X connect 24 0 21 0; +#X connect 25 0 21 0; +#X connect 26 0 21 0; +#X connect 27 0 21 0; +#X connect 28 0 36 0; +#X connect 29 0 28 0; +#X connect 30 0 28 0; +#X connect 34 0 39 0; +#X connect 35 0 39 0; +#X connect 36 0 5 0; +#X connect 36 1 34 0; +#X connect 36 2 35 0; +#X connect 37 0 36 1; +#X connect 38 0 71 0; +#X connect 40 0 34 1; +#X connect 41 0 35 1; +#X connect 58 0 6 0; +#X connect 59 0 40 0; +#X connect 60 0 41 0; +#X connect 62 0 35 2; +#X connect 63 0 35 2; +#X connect 64 0 35 2; +#X connect 65 0 35 3; +#X connect 66 0 35 3; +#X connect 67 0 35 3; +#X connect 69 0 19 0; +#X connect 70 0 20 0; +#X connect 71 0 31 0; +#X connect 72 0 71 1; +#X connect 73 0 72 0; +#X connect 82 0 0 0; diff --git a/doc/objects/help_pdp_bqt.pd b/doc/objects/help_pdp_bqt.pd new file mode 100644 index 0000000..a2f483e --- /dev/null +++ b/doc/objects/help_pdp_bqt.pd @@ -0,0 +1,95 @@ +#N canvas 384 88 785 659 10; +#X floatatom 88 211 5 0 0; +#X msg 27 211 onep \$1; +#X floatatom 88 242 5 0 0; +#X msg 27 246 twop \$1; +#X obj 454 406 t b f; +#X floatatom 489 369 5 0 0; +#X floatatom 488 317 5 0 0; +#X obj 454 436 pack s 0 0; +#X msg 454 469 \$1 \$2 \$3; +#X obj 489 405 t b f; +#X msg 410 370 lpf; +#X msg 409 344 hpf; +#X msg 409 398 apf; +#X msg 409 425 bsf; +#X obj 461 38 pdp_help_input; +#X msg 461 13 start; +#X msg 507 13 stop; +#X obj 27 616 pdp_help_output; +#X obj 461 93 pdp_route 3; +#X obj 533 65 hdl 15 1 0 3 empty empty empty 0 -6 0 8 -262144 -1 -1 +0; +#X obj 40 540 r \$0-out; +#X obj 558 231 s \$0-out; +#X floatatom 490 157 5 0 0; +#X floatatom 601 156 5 0 0; +#X text 312 358 high pass; +#X text 313 382 low pass; +#X text 314 410 all pass; +#X text 313 439 band stop; +#X text 541 367 pole Q; +#X text 99 31 it is a bit awkward to use directly; +#X text 146 210 one pole filter; +#X text 145 240 double one pole filter; +#X msg 88 180 0.1; +#X msg 502 133 0.5; +#X msg 600 133 0.5; +#X text 588 62 choose example here; +#X text 93 91 "unstable" behaviour is possible; +#X msg 490 347 0.1; +#X msg 488 293 0.3; +#X obj 27 590 pdp_gain; +#X floatatom 118 564 5 0 0; +#X msg 118 542 1; +#X text 95 107 when frequency and Q are outside their; +#X text 96 122 sensible ranges; +#X text 264 342 set the filter type:; +#X text 136 192 set the filter type:; +#X text 538 319 (between 0 and 1 \, 0.5 = nyquist); +#X text 540 333; +#X text 540 305 pole frequency; +#X text 37 16 pdp_bqt: a temporal biquad filter; +#X text 99 45 try one of the abstractions (pdp_motion_blur and; +#X text 100 61 pdp_motion_phase); +#X obj 434 190 pdp_motion_blur; +#X obj 558 190 pdp_motion_phase; +#X obj 27 499 pdp_bqt; +#X connect 0 0 1 0; +#X connect 1 0 54 0; +#X connect 2 0 3 0; +#X connect 2 0 3 0; +#X connect 3 0 54 0; +#X connect 4 0 7 0; +#X connect 4 1 7 1; +#X connect 5 0 9 0; +#X connect 6 0 4 0; +#X connect 7 0 8 0; +#X connect 8 0 54 0; +#X connect 9 0 7 0; +#X connect 9 1 7 2; +#X connect 10 0 7 0; +#X connect 11 0 7 0; +#X connect 12 0 7 0; +#X connect 13 0 7 0; +#X connect 14 0 18 0; +#X connect 15 0 14 0; +#X connect 16 0 14 0; +#X connect 18 0 54 0; +#X connect 18 1 52 0; +#X connect 18 2 53 0; +#X connect 19 0 18 1; +#X connect 20 0 39 0; +#X connect 22 0 52 1; +#X connect 23 0 53 1; +#X connect 32 0 0 0; +#X connect 33 0 22 0; +#X connect 34 0 23 0; +#X connect 37 0 5 0; +#X connect 38 0 6 0; +#X connect 39 0 17 0; +#X connect 40 0 39 1; +#X connect 41 0 40 0; +#X connect 52 0 21 0; +#X connect 53 0 21 0; +#X connect 54 0 39 0; diff --git a/doc/objects/help_pdp_cheby.pd b/doc/objects/help_pdp_cheby.pd new file mode 100644 index 0000000..ada420b --- /dev/null +++ b/doc/objects/help_pdp_cheby.pd @@ -0,0 +1,47 @@ +#N canvas 57 353 672 516 10; +#X msg 81 108 coef 0 \$1; +#X floatatom 113 78 5 0 0; +#X floatatom 180 81 5 0 0; +#X msg 160 109 coef 1 \$1; +#X floatatom 276 78 5 0 0; +#X msg 244 108 coef 2 \$1; +#X floatatom 356 77 5 0 0; +#X msg 324 107 coef 3 \$1; +#X obj 51 372 pdp_cheby 3; +#X floatatom 338 324 5 0 0; +#X msg 340 194 chan 1; +#X text 216 52 coefficients; +#X msg 339 233 chan 0; +#X msg 394 194 chan 2; +#X msg 448 194 chan 3; +#X text 152 363 creation arg: order (nb coefs = order + 1); +#X text 153 379 (default = minimal order = 2); +#X msg 338 274 reset; +#X obj 51 41 pdp_help_input; +#X msg 51 11 start; +#X msg 100 11 stop; +#X obj 51 414 pdp_help_output; +#X text 392 234 all channels; +#X text 391 324 right inlet: number of iterations; +#X text 390 273 set all coefs to 0; +#X msg 338 303 1; +#X text 340 173 select colour channel to be processed; +#X connect 0 0 8 0; +#X connect 1 0 0 0; +#X connect 2 0 3 0; +#X connect 3 0 8 0; +#X connect 4 0 5 0; +#X connect 5 0 8 0; +#X connect 6 0 7 0; +#X connect 7 0 8 0; +#X connect 8 0 21 0; +#X connect 9 0 8 1; +#X connect 10 0 8 0; +#X connect 12 0 8 0; +#X connect 13 0 8 0; +#X connect 14 0 8 0; +#X connect 17 0 8 0; +#X connect 18 0 8 0; +#X connect 19 0 18 0; +#X connect 20 0 18 0; +#X connect 25 0 9 0; diff --git a/doc/objects/help_pdp_chrot.pd b/doc/objects/help_pdp_chrot.pd new file mode 100644 index 0000000..fb59ed5 --- /dev/null +++ b/doc/objects/help_pdp_chrot.pd @@ -0,0 +1,13 @@ +#N canvas 355 66 554 208 10; +#X obj 74 64 pdp_help_input; +#X msg 74 31 start; +#X msg 124 31 stop; +#X obj 74 121 pdp_chrot; +#X obj 74 157 pdp_help_output; +#X floatatom 151 99 5 0 0; +#X text 204 100 rotate the chroma components by this angle; +#X connect 0 0 3 0; +#X connect 1 0 0 0; +#X connect 2 0 0 0; +#X connect 3 0 4 0; +#X connect 5 0 3 1; diff --git a/doc/objects/help_pdp_control.pd b/doc/objects/help_pdp_control.pd new file mode 100644 index 0000000..fccb5e9 --- /dev/null +++ b/doc/objects/help_pdp_control.pd @@ -0,0 +1,37 @@ +#N canvas 259 276 579 567 10; +#X obj 237 316 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 +1; +#X obj 237 406 pdp_control; +#X msg 237 357 thread \$1; +#X obj 48 54 pdp_help_input; +#X msg 48 24 start; +#X msg 105 24 stop; +#X obj 48 205 pdp_help_output; +#X obj 48 154 pdp_conv; +#X floatatom 117 86 5 0 0; +#X obj 79 350 osc~; +#X floatatom 79 315 5 0 0; +#X obj 79 419 osc~; +#X floatatom 112 391 5 0 0; +#X obj 79 449 dac~; +#X obj 237 445 print; +#X text 276 314 switch thread processing on or of; +#X text 291 446 a pdp_drop message will be sent out; +#X text 291 462 when a package is dropped; +#X text 175 82 increase this with thread processing enabled \, no audio +should be dropped. if you do it with thread processing enabled \, increasing +it too much can lock up the machine when real time scheduling is enabled. +; +#X text 119 155 a convolution object to burn cycles; +#X connect 0 0 2 0; +#X connect 1 0 14 0; +#X connect 2 0 1 0; +#X connect 3 0 7 0; +#X connect 4 0 3 0; +#X connect 5 0 3 0; +#X connect 7 0 6 0; +#X connect 8 0 7 1; +#X connect 9 0 11 0; +#X connect 10 0 9 0; +#X connect 11 0 13 0; +#X connect 12 0 11 1; diff --git a/doc/objects/help_pdp_conv.pd b/doc/objects/help_pdp_conv.pd new file mode 100644 index 0000000..aed62e2 --- /dev/null +++ b/doc/objects/help_pdp_conv.pd @@ -0,0 +1,44 @@ +#N canvas 450 114 702 535 10; +#X obj 39 353 pdp_conv; +#X floatatom 90 326 5 0 0; +#X msg 87 195 hor \$1; +#X msg 86 137 ver \$1; +#X obj 87 170 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 1 1 +; +#X obj 86 112 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 1 1 +; +#X msg 89 264 vmask 0.25 0.5 0.25; +#X msg 89 291 hmask 0.25 0.5 0.25; +#X msg 88 239 vmask 0.25 -0.5 0.25; +#X obj 39 63 pdp_help_input; +#X msg 39 24 start; +#X msg 86 24 stop; +#X obj 39 480 pdp_help_output; +#X obj 39 436 pdp_gain; +#X floatatom 90 409 5 0 0; +#X msg 90 386 1; +#X text 162 327 right inlet sets number of iterations; +#X text 263 239 these messages set the horizontal and vertical convolution +masks. note that there is no support for 2 dimensional masks. if you +want that you'll need to factor things out. (see the pdp_conv_* abstractions +for examples); +#X text 264 157 enable/disable horizontal and vertical masks; +#X text 162 428 note: mask coefficents are between -1 and 1; +#X text 162 441 use a gain object to compensate for this; +#X msg 128 385 9; +#X connect 0 0 13 0; +#X connect 1 0 0 1; +#X connect 2 0 0 0; +#X connect 3 0 0 0; +#X connect 4 0 2 0; +#X connect 5 0 3 0; +#X connect 6 0 0 0; +#X connect 7 0 0 0; +#X connect 8 0 0 0; +#X connect 9 0 0 0; +#X connect 10 0 9 0; +#X connect 11 0 9 0; +#X connect 13 0 12 0; +#X connect 14 0 13 1; +#X connect 15 0 14 0; +#X connect 21 0 14 0; diff --git a/doc/objects/help_pdp_del.pd b/doc/objects/help_pdp_del.pd new file mode 100644 index 0000000..cc68094 --- /dev/null +++ b/doc/objects/help_pdp_del.pd @@ -0,0 +1,24 @@ +#N canvas 414 20 609 368 10; +#X floatatom 107 116 5 0 0; +#X floatatom 64 207 5 0 0; +#X obj 20 60 pdp_help_input; +#X msg 20 31 start; +#X msg 72 30 stop; +#X obj 42 147 pdp_del 50; +#X obj 20 236 pdp_mix; +#X obj 20 268 pdp_help_output; +#X msg 64 183 0.5; +#X text 164 116 right inlet sets current delay length; +#X text 164 149 a packet delay line.; +#X text 164 165 creation arg = max delay length; +#X text 164 180 (dont make this too large \, packets are not compressed!) +; +#X connect 0 0 5 1; +#X connect 1 0 6 2; +#X connect 2 0 5 0; +#X connect 2 0 6 0; +#X connect 3 0 2 0; +#X connect 4 0 2 0; +#X connect 5 0 6 1; +#X connect 6 0 7 0; +#X connect 8 0 1 0; diff --git a/doc/objects/help_pdp_gain.pd b/doc/objects/help_pdp_gain.pd new file mode 100644 index 0000000..eec7e76 --- /dev/null +++ b/doc/objects/help_pdp_gain.pd @@ -0,0 +1,32 @@ +#N canvas 317 409 546 403 10; +#X msg 91 25 start; +#X msg 139 25 stop; +#X obj 91 56 pdp_help_input; +#X obj 91 350 pdp_help_output; +#X obj 91 274 pdp_gain; +#X floatatom 142 245 5 0 0; +#X text 201 243 right inlet sets overal gain; +#X msg 127 159 y \$1; +#X msg 176 159 v \$1; +#X msg 224 158 u \$1; +#X floatatom 127 122 5 0 0; +#X floatatom 176 122 5 0 0; +#X floatatom 224 122 5 0 0; +#X text 281 121 set individual channel gains; +#X text 301 144 y: luma; +#X text 301 160 v: chroma red; +#X text 301 175 u: chroma blue; +#X text 201 290 creation argument sets initial gain; +#X text 200 308 (default = 1); +#X text 202 274 pdp_gain clips when overdriven; +#X connect 0 0 2 0; +#X connect 1 0 2 0; +#X connect 2 0 4 0; +#X connect 4 0 3 0; +#X connect 5 0 4 1; +#X connect 7 0 4 0; +#X connect 8 0 4 0; +#X connect 9 0 4 0; +#X connect 10 0 7 0; +#X connect 11 0 8 0; +#X connect 12 0 9 0; diff --git a/doc/objects/help_pdp_gradient.pd b/doc/objects/help_pdp_gradient.pd new file mode 100644 index 0000000..ece3876 --- /dev/null +++ b/doc/objects/help_pdp_gradient.pd @@ -0,0 +1,29 @@ +#N canvas 489 317 590 374 10; +#X obj 46 291 pdp_gradient; +#X floatatom 188 114 5 0 0; +#X obj 145 143 t b f; +#X floatatom 140 114 5 0 0; +#X obj 104 144 t b f; +#X floatatom 93 114 5 0 0; +#X obj 46 40 pdp_help_input; +#X msg 46 10 start; +#X msg 95 10 stop; +#X obj 46 337 pdp_help_output; +#X text 150 283 apply a color gradient to a greyscale image or the +luma channel of a colour image; +#X obj 93 181 pack 0 0 0; +#X msg 93 216 rgb \$1 \$2 \$3; +#X text 107 91 red green blue; +#X connect 0 0 9 0; +#X connect 1 0 2 0; +#X connect 2 0 11 0; +#X connect 2 1 11 2; +#X connect 3 0 4 0; +#X connect 4 0 11 0; +#X connect 4 1 11 1; +#X connect 5 0 11 0; +#X connect 6 0 0 0; +#X connect 7 0 6 0; +#X connect 8 0 6 0; +#X connect 11 0 12 0; +#X connect 12 0 0 0; diff --git a/doc/objects/help_pdp_grey.pd b/doc/objects/help_pdp_grey.pd new file mode 100644 index 0000000..cd8d4e2 --- /dev/null +++ b/doc/objects/help_pdp_grey.pd @@ -0,0 +1,17 @@ +#N canvas 556 468 575 277 10; +#X obj 46 40 pdp_help_input; +#X msg 46 10 start; +#X msg 95 10 stop; +#X obj 46 225 pdp_help_output; +#X obj 118 69 hdl 15 1 0 2 empty empty empty 0 -6 0 8 -262144 -1 -1 +0; +#X obj 46 90 pdp_route 2; +#X obj 118 154 pdp_grey; +#X text 194 155 convert a packet to greyscale; +#X connect 0 0 5 0; +#X connect 1 0 0 0; +#X connect 2 0 0 0; +#X connect 4 0 5 1; +#X connect 5 0 3 0; +#X connect 5 1 6 0; +#X connect 6 0 3 0; diff --git a/doc/objects/help_pdp_mix.pd b/doc/objects/help_pdp_mix.pd new file mode 100644 index 0000000..92ed2bc --- /dev/null +++ b/doc/objects/help_pdp_mix.pd @@ -0,0 +1,21 @@ +#N canvas 314 353 576 288 10; +#X obj 103 132 pdp_reg; +#X obj 201 86 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X floatatom 200 155 5 0 0; +#X obj 81 48 pdp_help_input; +#X msg 81 18 start; +#X msg 130 18 stop; +#X obj 81 238 pdp_help_output; +#X text 268 80 click here; +#X text 268 175 0 = left \, 1 = right; +#X obj 81 184 pdp_mix; +#X text 268 159 crossfade between 2 packets; +#X connect 0 0 9 1; +#X connect 1 0 0 0; +#X connect 2 0 9 2; +#X connect 3 0 0 1; +#X connect 3 0 9 0; +#X connect 4 0 3 0; +#X connect 5 0 3 0; +#X connect 9 0 6 0; diff --git a/doc/objects/help_pdp_mix2.pd b/doc/objects/help_pdp_mix2.pd new file mode 100644 index 0000000..aa492b1 --- /dev/null +++ b/doc/objects/help_pdp_mix2.pd @@ -0,0 +1,25 @@ +#N canvas 314 353 576 288 10; +#X obj 98 132 pdp_reg; +#X obj 201 86 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X floatatom 205 138 5 0 0; +#X obj 81 48 pdp_help_input; +#X msg 81 18 start; +#X msg 130 18 stop; +#X obj 81 238 pdp_help_output; +#X text 268 80 click here; +#X obj 81 201 pdp_mix2; +#X floatatom 205 161 5 0 0; +#X text 158 199 pdp_mix2 adds two packets after applying attenuation +; +#X text 268 136 left packet attenuation; +#X text 268 159 right packet attenuation; +#X connect 0 0 8 1; +#X connect 1 0 0 0; +#X connect 2 0 8 2; +#X connect 3 0 0 1; +#X connect 3 0 8 0; +#X connect 4 0 3 0; +#X connect 5 0 3 0; +#X connect 8 0 6 0; +#X connect 9 0 8 3; diff --git a/doc/objects/help_pdp_mul.pd b/doc/objects/help_pdp_mul.pd new file mode 100644 index 0000000..596c1cb --- /dev/null +++ b/doc/objects/help_pdp_mul.pd @@ -0,0 +1,24 @@ +#N canvas 224 229 462 390 10; +#X msg 77 38 start; +#X msg 124 38 stop; +#X obj 77 70 pdp_help_input; +#X obj 77 330 pdp_help_output; +#X obj 121 164 pdp_reg; +#X obj 195 127 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X text 228 125 click here; +#X obj 77 295 pdp_gain; +#X floatatom 128 267 5 0 0; +#X text 229 201 multiplies 2 packets; +#X obj 77 197 pdp_mul; +#X msg 128 241 2; +#X connect 0 0 2 0; +#X connect 1 0 2 0; +#X connect 2 0 10 0; +#X connect 2 0 4 1; +#X connect 4 0 10 1; +#X connect 5 0 4 0; +#X connect 7 0 3 0; +#X connect 8 0 7 1; +#X connect 10 0 7 0; +#X connect 11 0 8 0; diff --git a/doc/objects/help_pdp_noise.pd b/doc/objects/help_pdp_noise.pd new file mode 100644 index 0000000..732d4a1 --- /dev/null +++ b/doc/objects/help_pdp_noise.pd @@ -0,0 +1,21 @@ +#N canvas 614 448 575 277 10; +#X obj 46 231 pdp_help_output; +#X obj 46 198 pdp_noise; +#X obj 46 149 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X msg 174 71 dim 320 240; +#X text 270 71 set packet dimensions; +#X msg 174 98 type grey; +#X msg 174 121 type yv12; +#X text 270 100 generate greyscale; +#X text 270 119 generate colour (default); +#X msg 174 152 seed 123; +#X text 270 152 set seed value; +#X text 167 21 pdp_noise creates a random image (with uniform distribution +between -1 and 1) when a bang is received; +#X connect 1 0 0 0; +#X connect 2 0 1 0; +#X connect 3 0 1 0; +#X connect 5 0 1 0; +#X connect 6 0 1 0; +#X connect 9 0 1 0; diff --git a/doc/objects/help_pdp_qt.pd b/doc/objects/help_pdp_qt.pd new file mode 100644 index 0000000..9ff6154 --- /dev/null +++ b/doc/objects/help_pdp_qt.pd @@ -0,0 +1,71 @@ +#N canvas 400 126 740 623 10; +#X obj 59 391 pdp_qt; +#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 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 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 text 249 137 float on right inlet selects the frame to be read on +the next sync event (bang message / internal sync).; +#X obj 59 462 pdp_help_output; +#X obj 335 535 table array; +#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 connect 0 0 31 0; +#X connect 0 1 1 0; +#X connect 0 2 2 0; +#X connect 3 0 0 0; +#X connect 4 0 3 0; +#X connect 5 0 3 0; +#X connect 6 0 0 0; +#X connect 7 0 8 0; +#X connect 8 0 0 0; +#X connect 9 0 7 0; +#X connect 10 0 0 0; +#X connect 12 0 0 0; +#X connect 13 0 0 1; +#X connect 15 0 0 0; +#X connect 16 0 15 0; +#X connect 20 0 0 0; +#X connect 22 0 0 0; +#X connect 24 0 0 0; +#X connect 25 0 0 0; +#X connect 27 0 0 0; +#X connect 33 0 34 0; +#X connect 33 0 34 1; +#X connect 35 0 33 0; diff --git a/doc/objects/help_pdp_qt~.pd b/doc/objects/help_pdp_qt~.pd new file mode 100644 index 0000000..b03e4e1 --- /dev/null +++ b/doc/objects/help_pdp_qt~.pd @@ -0,0 +1,25 @@ +#N canvas 400 126 692 254 10; +#X obj 62 122 pdp_qt~; +#X obj 90 164 dac~; +#X msg 39 51 play; +#X obj 133 42 openpanel; +#X msg 133 67 open \$1; +#X msg 133 14 bang; +#X text 257 67 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 15 24 loop 1; +#X floatatom 84 52 5 0 0; +#X obj 62 214 pdp_help_output; +#X connect 0 0 9 0; +#X connect 0 3 1 0; +#X connect 0 4 1 1; +#X connect 2 0 0 0; +#X connect 3 0 4 0; +#X connect 4 0 0 0; +#X connect 5 0 3 0; +#X connect 7 0 0 0; +#X connect 8 0 0 1; diff --git a/doc/objects/help_pdp_randmix.pd b/doc/objects/help_pdp_randmix.pd new file mode 100644 index 0000000..75f12fc --- /dev/null +++ b/doc/objects/help_pdp_randmix.pd @@ -0,0 +1,21 @@ +#N canvas 314 353 584 288 10; +#X obj 81 184 pdp_randmix; +#X obj 117 132 pdp_reg; +#X obj 200 87 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X floatatom 200 155 5 0 0; +#X obj 81 48 pdp_help_input; +#X msg 81 18 start; +#X msg 130 18 stop; +#X obj 81 238 pdp_help_output; +#X text 268 80 click here; +#X text 268 159 random crossfade between 2 packets; +#X text 268 175 0 = left \, 1 = right; +#X connect 0 0 7 0; +#X connect 1 0 0 1; +#X connect 2 0 1 0; +#X connect 3 0 0 2; +#X connect 4 0 0 0; +#X connect 4 0 1 1; +#X connect 5 0 4 0; +#X connect 6 0 4 0; diff --git a/doc/objects/help_pdp_reg.pd b/doc/objects/help_pdp_reg.pd new file mode 100644 index 0000000..9a78e66 --- /dev/null +++ b/doc/objects/help_pdp_reg.pd @@ -0,0 +1,20 @@ +#N canvas 623 480 596 300 10; +#X obj 41 171 pdp_reg; +#X obj 41 140 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1 +-1; +#X msg 85 15 start; +#X msg 135 15 stop; +#X obj 85 53 pdp_help_input; +#X obj 41 240 pdp_help_output; +#X text 113 144 pdp_reg works in the same way as the pd float or int +objects; +#X text 263 178 bang: sends stored packet to output; +#X text 263 163 pdp: stores packet and sends to output; +#X text 263 199 pdp: stores a new packet; +#X text 112 164 left intlet (hot):; +#X text 112 199 right intlet (cold):; +#X connect 0 0 5 0; +#X connect 1 0 0 0; +#X connect 2 0 4 0; +#X connect 3 0 4 0; +#X connect 4 0 0 1; diff --git a/doc/objects/help_pdp_rotate.pd b/doc/objects/help_pdp_rotate.pd new file mode 100644 index 0000000..6c60c60 --- /dev/null +++ b/doc/objects/help_pdp_rotate.pd @@ -0,0 +1,30 @@ +#N canvas 467 414 562 448 10; +#X msg 195 174 centerx \$1; +#X floatatom 195 145 5 0 0; +#X floatatom 279 145 5 0 0; +#X msg 279 174 centery \$1; +#X obj 46 40 pdp_help_input; +#X msg 46 10 start; +#X msg 95 10 stop; +#X obj 46 401 pdp_help_output; +#X text 194 70 (0 \, 0) = top left; +#X text 194 84 (1 \, 1) = bottom right; +#X msg 247 113 0.5; +#X floatatom 187 318 5 0 0; +#X msg 187 288 0; +#X text 192 6 pdp_zrot: zoom and rotation; +#X obj 46 363 pdp_rotate; +#X text 239 319 right inlet sets rotation angle; +#X text 194 54 set rotation center; +#X connect 0 0 14 0; +#X connect 1 0 0 0; +#X connect 2 0 3 0; +#X connect 3 0 14 0; +#X connect 4 0 14 0; +#X connect 5 0 4 0; +#X connect 6 0 4 0; +#X connect 10 0 1 0; +#X connect 10 0 2 0; +#X connect 11 0 14 1; +#X connect 12 0 11 0; +#X connect 14 0 7 0; diff --git a/doc/objects/help_pdp_route.pd b/doc/objects/help_pdp_route.pd new file mode 100644 index 0000000..c9d341d --- /dev/null +++ b/doc/objects/help_pdp_route.pd @@ -0,0 +1,22 @@ +#N canvas 614 448 575 277 10; +#X obj 46 40 pdp_help_input; +#X msg 46 10 start; +#X msg 95 10 stop; +#X obj 46 225 pdp_help_output; +#X obj 46 172 pdp_gain 1; +#X obj 130 172 pdp_gain 2; +#X obj 118 69 hdl 15 1 0 2 empty empty empty 0 -6 0 8 -262144 -1 -1 +0; +#X text 155 88 routes a packet to a specified outlet \, determined +by the right inlet; +#X text 155 124 creation argument = number of outlets (default = 2) +; +#X obj 46 90 pdp_route 2; +#X connect 0 0 9 0; +#X connect 1 0 0 0; +#X connect 2 0 0 0; +#X connect 4 0 3 0; +#X connect 5 0 3 0; +#X connect 6 0 9 1; +#X connect 9 0 4 0; +#X connect 9 1 5 0; diff --git a/doc/objects/help_pdp_scale.pd b/doc/objects/help_pdp_scale.pd new file mode 100644 index 0000000..9ed7996 --- /dev/null +++ b/doc/objects/help_pdp_scale.pd @@ -0,0 +1,32 @@ +#N canvas 475 141 635 386 10; +#X msg 76 207 dim 256 256; +#X msg 76 235 dim 320 240; +#X obj 28 275 pdp_scale 320 240; +#X msg 75 181 dim 32 32; +#X msg 259 234 quality \$1; +#X obj 28 65 pdp_help_input; +#X msg 28 36 start; +#X msg 80 35 stop; +#X obj 28 317 pdp_help_output; +#X text 347 225 0 = nearest neighbour; +#X text 347 240 1 = bilinear; +#X text 74 154 set new packet dimensions; +#X text 161 28 pdp_scale rescales the packet format.; +#X text 161 56 use this if you want to combine different packet sizes. +or have movies that don't have a legal size (not a multiple of 8x8) +; +#X msg 259 204 0; +#X msg 294 204 1; +#X text 159 103 (try to avoid rescaling by using movies with equal +(legal) dimensions \, it is not a cheap operation and can easily be +done in advance); +#X connect 0 0 2 0; +#X connect 1 0 2 0; +#X connect 2 0 8 0; +#X connect 3 0 2 0; +#X connect 4 0 2 0; +#X connect 5 0 2 0; +#X connect 6 0 5 0; +#X connect 7 0 5 0; +#X connect 14 0 4 0; +#X connect 15 0 4 0; diff --git a/doc/objects/help_pdp_scan~.pd b/doc/objects/help_pdp_scan~.pd new file mode 100644 index 0000000..fb3b749 --- /dev/null +++ b/doc/objects/help_pdp_scan~.pd @@ -0,0 +1,41 @@ +#N canvas 387 370 666 499 10; +#X obj 73 140 pdp_scan~; +#X obj 73 113 phasor~; +#X floatatom 73 86 5 0 0; +#X obj 73 353 dac~; +#X obj 13 48 pdp_help_input; +#X msg 13 19 start; +#X obj 13 397 pdp_help_output; +#X obj 73 311 *~; +#X floatatom 89 282 5 0 0; +#X obj 73 251 hip~ 20; +#X floatatom 117 224 5 0 0; +#X floatatom 131 171 5 0 0; +#X obj 73 198 lop~ 1000; +#X text 214 43 pdp_scan~: scanned synthesis; +#X msg 217 102 interpolate \$1; +#X obj 217 76 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 +; +#X text 216 124 set interpolation between consecutive packets on/off +; +#X text 216 142 (the audio crossfade size is determined by the pd blocksize. +so you can use a block~ object to set this); +#X text 218 236 it works like osc~ \, only the waveform is scanned +from the luma plane of an image. the path is an oval centered at the +middle of the image with axes equal to 60% of the image width/height +; +#X connect 0 0 12 0; +#X connect 1 0 0 0; +#X connect 2 0 1 0; +#X connect 4 0 0 0; +#X connect 4 0 6 0; +#X connect 5 0 4 0; +#X connect 7 0 3 0; +#X connect 7 0 3 1; +#X connect 8 0 7 1; +#X connect 9 0 7 0; +#X connect 10 0 9 1; +#X connect 11 0 12 1; +#X connect 12 0 9 0; +#X connect 14 0 0 0; +#X connect 15 0 14 0; diff --git a/doc/objects/help_pdp_scope~.pd b/doc/objects/help_pdp_scope~.pd new file mode 100644 index 0000000..eeeaabe --- /dev/null +++ b/doc/objects/help_pdp_scope~.pd @@ -0,0 +1,23 @@ +#N canvas 526 43 567 300 10; +#X obj 37 200 pdp_scope~; +#X obj 37 44 metro 40; +#X obj 37 19 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X floatatom 94 18 5 0 0; +#X msg 131 131 type grey; +#X msg 131 109 type yv12; +#X obj 37 256 pdp_help_output; +#X msg 131 157 dim 320 240; +#X obj 59 121 osc~; +#X floatatom 59 88 5 0 0; +#X text 131 66 a very simple oscilloscope; +#X text 227 132 set output image type and dimensions; +#X connect 0 0 6 0; +#X connect 1 0 0 0; +#X connect 2 0 1 0; +#X connect 3 0 1 1; +#X connect 4 0 0 0; +#X connect 5 0 0 0; +#X connect 7 0 0 0; +#X connect 8 0 0 0; +#X connect 9 0 8 0; diff --git a/doc/objects/help_pdp_snap.pd b/doc/objects/help_pdp_snap.pd new file mode 100644 index 0000000..b5c2752 --- /dev/null +++ b/doc/objects/help_pdp_snap.pd @@ -0,0 +1,21 @@ +#N canvas 623 480 596 300 10; +#X msg 92 15 start; +#X msg 142 15 stop; +#X obj 92 53 pdp_help_input; +#X obj 41 240 pdp_help_output; +#X text 140 172 bang: sends stored packet to output; +#X text 113 143 left intlet (hot):; +#X text 112 202 right intlet (cold):; +#X obj 41 171 pdp_snap; +#X text 115 103 pdp_reg takes a snapshot from a pdp stream.; +#X text 263 201 pdp inlet; +#X text 139 157 snap: stores the next packet that arrives on second +inlet; +#X msg 8 130 bang; +#X msg 49 130 snap; +#X connect 0 0 2 0; +#X connect 1 0 2 0; +#X connect 2 0 7 1; +#X connect 7 0 3 0; +#X connect 11 0 7 0; +#X connect 12 0 7 0; diff --git a/doc/objects/help_pdp_trigger.pd b/doc/objects/help_pdp_trigger.pd new file mode 100644 index 0000000..f8b5461 --- /dev/null +++ b/doc/objects/help_pdp_trigger.pd @@ -0,0 +1,14 @@ +#N canvas 526 379 575 277 10; +#X obj 46 40 pdp_help_input; +#X msg 46 10 start; +#X msg 95 10 stop; +#X obj 46 225 pdp_help_output; +#X obj 46 91 pdp_trigger; +#X obj 118 145 print; +#X text 154 90 outputs a bang on the right output before sending packet +to the left output; +#X connect 0 0 4 0; +#X connect 1 0 0 0; +#X connect 2 0 0 0; +#X connect 4 0 3 0; +#X connect 4 1 5 0; diff --git a/doc/objects/help_pdp_v4l.pd b/doc/objects/help_pdp_v4l.pd new file mode 100644 index 0000000..5f5ebb4 --- /dev/null +++ b/doc/objects/help_pdp_v4l.pd @@ -0,0 +1,54 @@ +#N canvas 238 181 882 542 10; +#X obj 107 427 pdp_v4l; +#X obj 107 53 metro 40; +#X msg 159 14 stop; +#X msg 107 14 bang; +#X msg 51 14 bang; +#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 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 msg 210 319 channel \$1; +#X floatatom 210 295 5 0 0; +#X text 347 320 sets the v4l channel (like tuner \, composite \, svideo +\, ...); +#X floatatom 210 359 5 0 0; +#X msg 210 383 freq \$1; +#X floatatom 271 359 5 0 0; +#X msg 271 383 freqMHz \$1; +#X text 346 359 sets the v4l tuner frequency (in v4l units and MHz) +; +#X obj 107 480 pdp_help_output; +#X connect 0 0 25 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 5 0 0 0; +#X connect 6 0 0 0; +#X connect 8 0 0 0; +#X connect 10 0 0 0; +#X connect 11 0 0 0; +#X connect 13 0 0 0; +#X connect 14 0 0 0; +#X connect 17 0 0 0; +#X connect 18 0 17 0; +#X connect 20 0 21 0; +#X connect 21 0 0 0; +#X connect 22 0 23 0; +#X connect 23 0 0 0; diff --git a/doc/objects/help_pdp_xv.pd b/doc/objects/help_pdp_xv.pd new file mode 100644 index 0000000..5c0b371 --- /dev/null +++ b/doc/objects/help_pdp_xv.pd @@ -0,0 +1,29 @@ +#N canvas 303 183 708 385 10; +#X obj 29 328 pdp_xv; +#X msg 132 223 dim 320 240; +#X msg 132 246 dim 640 480; +#X text 271 226 dim sets the window dimensions; +#X msg 132 177 create; +#X msg 132 198 destroy; +#X text 130 114 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 271 180 use these messages to explicitly create/destroy the +window; +#X msg 134 294 cursor \$1; +#X obj 134 274 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 +1; +#X text 270 294 enables/disables cursor in xv window; +#X obj 29 61 pdp_help_input; +#X msg 29 25 start; +#X msg 78 24 stop; +#X connect 1 0 0 0; +#X connect 2 0 0 0; +#X connect 4 0 0 0; +#X connect 5 0 0 0; +#X connect 8 0 0 0; +#X connect 9 0 8 0; +#X connect 11 0 0 0; +#X connect 12 0 11 0; +#X connect 13 0 11 0; diff --git a/doc/objects/help_pdp_zoom.pd b/doc/objects/help_pdp_zoom.pd new file mode 100644 index 0000000..19ec1a7 --- /dev/null +++ b/doc/objects/help_pdp_zoom.pd @@ -0,0 +1,41 @@ +#N canvas 467 414 562 448 10; +#X obj 46 288 pdp_zoom; +#X floatatom 121 264 5 0 0; +#X floatatom 174 130 5 0 0; +#X msg 87 160 zoomx \$1; +#X msg 174 160 zoomy \$1; +#X floatatom 87 129 5 0 0; +#X msg 282 162 centerx \$1; +#X floatatom 282 133 5 0 0; +#X floatatom 366 133 5 0 0; +#X msg 366 162 centery \$1; +#X obj 46 40 pdp_help_input; +#X msg 46 10 start; +#X msg 95 10 stop; +#X obj 46 341 pdp_help_output; +#X text 173 265 right inlet sets zoom amount; +#X text 281 42 set zoom center; +#X text 281 58 (0 \, 0) = top left; +#X text 281 72 (1 \, 1) = bottom right; +#X text 71 79 set individual axis zoom; +#X msg 142 102 1; +#X msg 334 101 0.5; +#X msg 121 234 1; +#X connect 0 0 13 0; +#X connect 1 0 0 1; +#X connect 2 0 4 0; +#X connect 3 0 0 0; +#X connect 4 0 0 0; +#X connect 5 0 3 0; +#X connect 6 0 0 0; +#X connect 7 0 6 0; +#X connect 8 0 9 0; +#X connect 9 0 0 0; +#X connect 10 0 0 0; +#X connect 11 0 10 0; +#X connect 12 0 10 0; +#X connect 19 0 2 0; +#X connect 19 0 5 0; +#X connect 20 0 7 0; +#X connect 20 0 8 0; +#X connect 21 0 1 0; diff --git a/doc/objects/help_pdp_zrot.pd b/doc/objects/help_pdp_zrot.pd new file mode 100644 index 0000000..f3937a0 --- /dev/null +++ b/doc/objects/help_pdp_zrot.pd @@ -0,0 +1,47 @@ +#N canvas 467 414 562 448 10; +#X floatatom 257 275 5 0 0; +#X floatatom 174 130 5 0 0; +#X msg 87 160 zoomx \$1; +#X msg 174 160 zoomy \$1; +#X floatatom 87 129 5 0 0; +#X msg 282 162 centerx \$1; +#X floatatom 282 133 5 0 0; +#X floatatom 366 133 5 0 0; +#X msg 366 162 centery \$1; +#X obj 46 40 pdp_help_input; +#X msg 46 10 start; +#X msg 95 10 stop; +#X obj 46 401 pdp_help_output; +#X text 281 58 (0 \, 0) = top left; +#X text 281 72 (1 \, 1) = bottom right; +#X text 71 79 set individual axis zoom; +#X msg 142 102 1; +#X msg 334 101 0.5; +#X msg 257 245 1; +#X obj 46 363 pdp_zrot; +#X text 309 276 second inlet sets zoom amount; +#X floatatom 257 333 5 0 0; +#X msg 257 303 0; +#X text 309 334 third inlet sets rotation angle; +#X text 281 42 set zoom/rotation center; +#X text 192 6 pdp_zrot: zoom and rotation; +#X connect 0 0 19 1; +#X connect 1 0 3 0; +#X connect 2 0 19 0; +#X connect 3 0 19 0; +#X connect 4 0 2 0; +#X connect 5 0 19 0; +#X connect 6 0 5 0; +#X connect 7 0 8 0; +#X connect 8 0 19 0; +#X connect 9 0 19 0; +#X connect 10 0 9 0; +#X connect 11 0 9 0; +#X connect 16 0 1 0; +#X connect 16 0 4 0; +#X connect 17 0 6 0; +#X connect 17 0 7 0; +#X connect 18 0 0 0; +#X connect 19 0 12 0; +#X connect 21 0 19 2; +#X connect 22 0 21 0; diff --git a/doc/objects/pdp_help_input.pd b/doc/objects/pdp_help_input.pd new file mode 100644 index 0000000..a4bc76e --- /dev/null +++ b/doc/objects/pdp_help_input.pd @@ -0,0 +1,63 @@ +#N canvas 394 33 741 756 10; +#X obj 23 524 pdp_v4l; +#X text 17 11 this abstraction is used as an input module in most of +the documentation patches. change it to reflect your preferred input +object.; +#X obj 262 248 inlet; +#X obj 262 276 route start stop; +#X msg 315 309 stop; +#X obj 258 672 outlet; +#X obj 262 385 metro; +#X obj 292 360 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10 +-262144 -1 -1 40 256; +#X msg 23 287 open /dev/video0; +#X obj 260 88 loadbang; +#X obj 199 169 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 315 167 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X text 171 189 connect here; +#X text 291 187 connect here; +#X obj 187 470 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 334 468 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X text 45 329 v4l device; +#X text 18 312 change this to your; +#X obj 492 515 pdp_qt; +#X obj 260 137 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 262 426 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X msg 492 288 open /somedirectory/mydemo.mov; +#X text 520 308 change this to the movie; +#X text 519 323 you want to use; +#X msg 520 379 loop 1; +#X msg 262 310 bang; +#X text 163 203 for video4linux; +#X text 294 201 for quicktime; +#X text 156 497 connect here; +#X text 148 511 for video4linux; +#X text 302 497 connect here; +#X text 305 511 for quicktime; +#X text 308 377 set framerate here; +#X connect 0 0 5 0; +#X connect 2 0 3 0; +#X connect 3 0 25 0; +#X connect 3 1 4 0; +#X connect 4 0 6 0; +#X connect 6 0 20 0; +#X connect 7 0 6 1; +#X connect 8 0 0 0; +#X connect 9 0 19 0; +#X connect 10 0 8 0; +#X connect 11 0 21 0; +#X connect 14 0 0 0; +#X connect 15 0 18 0; +#X connect 18 0 5 0; +#X connect 19 0 10 0; +#X connect 20 0 14 0; +#X connect 21 0 18 0; +#X connect 21 0 24 0; +#X connect 24 0 18 0; +#X connect 25 0 6 0; diff --git a/doc/objects/pdp_help_output.pd b/doc/objects/pdp_help_output.pd new file mode 100644 index 0000000..b3cf6cf --- /dev/null +++ b/doc/objects/pdp_help_output.pd @@ -0,0 +1,8 @@ +#N canvas 664 342 450 300 10; +#X obj 158 71 inlet; +#X obj 59 178 pdp_xv; +#X obj 162 180 pdp_sdl; +#X text 17 11 this abstraction is used as an output module in most +of the documentation patches. change it to reflect your preferred output +object.; +#X connect 0 0 1 0; diff --git a/doc/quicktime.pd b/doc/quicktime.pd deleted file mode 100644 index 2f32cfd..0000000 --- a/doc/quicktime.pd +++ /dev/null @@ -1,101 +0,0 @@ -#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 index 1def808..b6b8ff3 100644 --- a/doc/reference.txt +++ b/doc/reference.txt @@ -1,6 +1,6 @@ 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.) +(Messy doc & test patches can be found in the test/ directory.) general purpose pdp modules: @@ -22,6 +22,8 @@ pdp_add adds two images pdp_bq spatial biquad filter pdp_bqt temporal biquad filter pdp_conv horizontal/vertical seperable convolution filter +pdp_cheby chebyshev color shaper +pdp_chrot rotates the chroma components pdp_gradient converts a greyscale image using a colour palette pdp_grey converts an image to greyscale pdp_mul multiplies two images @@ -30,10 +32,12 @@ 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_rotate tiled rotate pdp_scope~ a very simple oscilloscope -pdp_chrot rotates the chroma components pdp_scale rescale an image +pdp_scan~ scanned synthesis oscillator pdp_zoom tiled zoom +pdp_zrot tiled zoom + rotate utility abstractions @@ -56,7 +60,7 @@ 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: +cellular automata (separate lib): pdp_ca computes a cellular automaton (as a generator or a filter) pdp_ca2image converts a CA packet to a greyscale image diff --git a/doc/traffic.pd b/doc/traffic.pd deleted file mode 100644 index 40f102d..0000000 --- a/doc/traffic.pd +++ /dev/null @@ -1,101 +0,0 @@ -#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; diff --git a/include/pdp.h b/include/pdp.h index 4cfd789..2695402 100644 --- a/include/pdp.h +++ b/include/pdp.h @@ -76,6 +76,20 @@ typedef struct #define PDP_IMAGE_RGBP 3 /* 48bpp: 16 bit planar RGB */ #define PDP_IMAGE_MCHP 4 /* generic 16bit multi channel planar */ +/* ascii data packet */ +typedef struct +{ + unsigned int encoding; /* image encoding (data format ) */ + unsigned int width; /* image width in pixels */ + unsigned int height; /* image height in pixels */ +} t_ascii; + + +/* image encodings */ +#define PDP_ASCII_BW 1 /* 8 bit per character black and white.*/ +#define PDP_ASCII_IBM 2 /* 16 bit per character colour (8 bit character, 8 bit colour, like good old text framebuffers.*/ +#define PDP_ASCII_RGB 3 /* 64 bit per character colour (8 bit character, 3x8 bit RGB */ + /* PDP_IMAGE_GREY = PDP_IMAGE_MCHP, channels = 1 PDP_IMAGE_RGBP = PDP_IMAGE_MCHP, channels = 3 @@ -95,12 +109,13 @@ typedef struct unsigned int type; /* datatype of this object */ unsigned int size; /* datasize including header */ unsigned int users; /* nb users of this object, readonly if > 1 */ - unsigned int __pad__; + unsigned int __pad__; /* pad to quad word size */ union { t_raw raw; /* raw subheader (for extensions unkown to pdp core system) */ t_image image; /* bitmap image */ //t_ca ca; /* cellular automaton state data */ + t_ascii ascii; /* ascii packet */ } info; } t_pdp; @@ -108,7 +123,7 @@ typedef struct /* pdp data packet types */ #define PDP_IMAGE 1 /* 16bit signed planar scanline encoded image packet */ //RESERVED: #define PDP_CA 2 /* 1bit toroidial shifted scanline encoded cellular automaton */ - +#define PDP_ASCII 3 /* ascii packet */ diff --git a/include/pdp_imageproc.h b/include/pdp_imageproc.h index 4921612..09825dc 100644 --- a/include/pdp_imageproc.h +++ b/include/pdp_imageproc.h @@ -141,10 +141,30 @@ void pdp_imageproc_bqt_process(void *x, s16 *image, s16 *state0, s16 *state1, u3 +// zoom object +void *pdp_imageproc_resample_affinemap_new(void); +void pdp_imageproc_resample_affinemap_delete(void *x); +void pdp_imageproc_resample_affinemap_setcenterx(void *x, float f); +void pdp_imageproc_resample_affinemap_setcentery(void *x, float f); +void pdp_imageproc_resample_affinemap_setzoomx(void *x, float f); +void pdp_imageproc_resample_affinemap_setzoomy(void *x, float f); +void pdp_imageproc_resample_affinemap_setangle(void *x, float f); +void pdp_imageproc_resample_affinemap_process(void *x, s16 *srcimage, s16 *dstimage, u32 width, u32 height); + + + +//chebyshev poly +void *pdp_imageproc_cheby_new(int order); +void pdp_imageproc_cheby_delete(void *x); +void pdp_imageproc_cheby_setcoef(void *x, u32 n, float f); +void pdp_imageproc_cheby_process(void *x, s16 *image, u32 width, u32 height, u32 iterations); + + /* #ifdef __cplusplus } #endif */ + #endif //PDP_IMAGEPROC_H diff --git a/include/pdp_mmx.h b/include/pdp_mmx.h index 8e70779..8181ff0 100644 --- a/include/pdp_mmx.h +++ b/include/pdp_mmx.h @@ -150,6 +150,19 @@ void pixel_crot2d_s16(short int *pixel_array, short int *row_encoded_vector_matrix); +/********************************** RESAMPLE OPERATIONS *******************************************/ + +// affine transformation (called linear map, but that's flou terminology) +void pixel_resample_linmap_s16(void *x); + + + +/********************************** POLYNOMIAL OPERATIONS *****************************************/ +// chebychev polynomial +void pixel_cheby_s16_3plus(short int *buf, int nb_8pixel_vectors, int orderplusone, short int *coefs); + + + #ifdef __cplusplus } #endif diff --git a/include/pdp_resample.h b/include/pdp_resample.h index 773c12c..cc77d04 100644 --- a/include/pdp_resample.h +++ b/include/pdp_resample.h @@ -28,15 +28,17 @@ void pdp_resample_scale_bilin(s16 *src_image, s16 *dst_image, s32 src_w, s32 src_h, s32 dst_w, s32 dst_h); void pdp_resample_scale_nn(s16 *src_image, s16 *dst_image, s32 src_w, s32 src_h, s32 dst_w, s32 dst_h); +/* USE pdp_imageproc_resample_affinemap void pdp_resample_zoom_tiled_bilin(s16 *src_image, s16 *dst_image, s32 w, s32 h, float zoom_x, float zoom_y, float center_x_relative, float center_y_relative); +*/ //void pdp_resample_zoom_tiled_nn(s16 *src_image, s16 *dst_image, s32 w, s32 h, float zoom_x, float zoom_y); /* core routines */ -s32 pdp_resample_bilin(s16 *image, s32 width, s32 height, s32 virt_x, s32 virt_y); +//s32 pdp_resample_bilin(s16 *image, s32 width, s32 height, s32 virt_x, s32 virt_y); #endif diff --git a/modules/Makefile b/modules/Makefile index 3b5d402..8f743aa 100644 --- a/modules/Makefile +++ b/modules/Makefile @@ -6,7 +6,7 @@ OBJECTS = pdp_xv.o pdp_qt.o pdp_add.o pdp_reg.o pdp_conv.o \ pdp_mix.o pdp_v4l.o pdp_affine.o pdp_del.o pdp_mul.o pdp_randmix.o \ pdp_snap.o pdp_trigger.o pdp_bq.o pdp_noise.o pdp_gradient.o \ pdp_route.o pdp_gain.o pdp_grey.o pdp_chrot.o pdp_scope.o \ - pdp_scale.o pdp_zoom.o + pdp_scale.o pdp_zoom.o pdp_scan.o pdp_sdl.o pdp_cheby.o all_modules: $(OBJECTS) diff --git a/modules/pdp_cheby.c b/modules/pdp_cheby.c new file mode 100644 index 0000000..4ba32a3 --- /dev/null +++ b/modules/pdp_cheby.c @@ -0,0 +1,233 @@ +/* + * Pure Data Packet module. + * Copyright (c) by Tom Schouten + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + + + +#include "pdp.h" +#include "pdp_mmx.h" + + +typedef struct pdp_cheby_struct +{ + t_object x_obj; + t_float x_f; + + t_outlet *x_outlet0; + + int x_packet0; + int x_queue_id; + int x_dropped; // indicate if a packet was dropped during register_rw cycle + + int x_channel; + + void *x_cheby; + + int x_iterations; + int x_order; + +} t_pdp_cheby; + + + +static void pdp_cheby_process_yv12(t_pdp_cheby *x) +{ + t_pdp *header0 = pdp_packet_header(x->x_packet0); + void *data0 = pdp_packet_data (x->x_packet0); + + unsigned int w = header0->info.image.width; + unsigned int h = header0->info.image.height; + + unsigned int size = w*h; + unsigned int v_offset = size; + unsigned int u_offset = size + (size >> 2) ; + unsigned int i,j; + + short int * idata = (short int *)data0; + int ch = x->x_channel; + + if((ch == 0) || (ch==1)) pdp_imageproc_cheby_process(x->x_cheby, &idata[0], w, h, x->x_iterations ); + if((ch == 0) || (ch==2)) pdp_imageproc_cheby_process(x->x_cheby, &idata[v_offset], w>>1, h>>1, x->x_iterations); + if((ch == 0) || (ch==3)) pdp_imageproc_cheby_process(x->x_cheby, &idata[u_offset], w>>1, h>>1, x->x_iterations); + + return; + + +} + +static void pdp_cheby_process_grey(t_pdp_cheby *x) +{ + t_pdp *header0 = pdp_packet_header(x->x_packet0); + void *data0 = pdp_packet_data (x->x_packet0); + + unsigned int w = header0->info.image.width; + unsigned int h = header0->info.image.height; + + short int * idata = (short int *)data0; + int ch = x->x_channel; + + if((ch == 0) || (ch==1)) pdp_imageproc_cheby_process(x->x_cheby, &idata[0], w, h, x->x_iterations); + + return; + + +} + +static void pdp_cheby_process(t_pdp_cheby *x) +{ + t_pdp *header0 = pdp_packet_header(x->x_packet0); + + /* check data packets */ + + if ((header0) && (PDP_IMAGE == header0->type)){ + + /* pdp_cheby_process inputs and write into active inlet */ + switch(header0->info.image.encoding){ + + case PDP_IMAGE_YV12: + pdp_cheby_process_yv12(x); + break; + + case PDP_IMAGE_GREY: + pdp_cheby_process_grey(x); + break; + + default: + break; + /* don't know the type, so dont pdp_cheby_process */ + + } + } + +} + +static void pdp_cheby_sendpacket(t_pdp_cheby *x) +{ + /* unregister and propagate if valid packet */ + pdp_pass_if_valid(x->x_outlet0, &x->x_packet0); +} + +static void pdp_cheby_input_0(t_pdp_cheby *x, t_symbol *s, t_floatarg f) +{ + + int p = (int)f; + + if (s== gensym("register_rw")) x->x_dropped = pdp_packet_copy_rw_or_drop(&x->x_packet0, p); + + + if ((s == gensym("process")) && (-1 != x->x_packet0) && (!x->x_dropped)){ + + + /* add the process method and callback to the process queue */ + + pdp_queue_add(x, pdp_cheby_process, pdp_cheby_sendpacket, &x->x_queue_id); + } + +} + + + +static void pdp_cheby_coef(t_pdp_cheby *x, t_floatarg c, t_floatarg f) +{ + pdp_imageproc_cheby_setcoef(x->x_cheby, (int)c, f); +} + +static void pdp_cheby_reset(t_pdp_cheby *x) +{ + int i; + for (i = 0; i <= x->x_order; i++) + pdp_imageproc_cheby_setcoef(x->x_cheby, i, 0); +} + +static void pdp_cheby_channel(t_pdp_cheby *x, t_floatarg f) +{ + int ch = (int)f; + if ((ch < 1) || (ch > 3)) ch = 0; + x->x_channel = ch; +} + +static void pdp_cheby_iterations(t_pdp_cheby *x, t_floatarg f) +{ + int i = (int)f; + if (i<0) i = 0; + x->x_iterations = i; + +} +static void pdp_cheby_free(t_pdp_cheby *x) +{ + pdp_queue_finish(x->x_queue_id); + pdp_imageproc_cheby_delete(x->x_cheby); + pdp_packet_mark_unused(x->x_packet0); + +} + +t_class *pdp_cheby_class; + + + +void *pdp_cheby_new(t_floatarg f) +{ + t_pdp_cheby *x = (t_pdp_cheby *)pd_new(pdp_cheby_class); + int order = (int)(f); + + if (order < 2) order = 2; + + inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("iterations")); + + x->x_outlet0 = outlet_new(&x->x_obj, &s_anything); + + x->x_packet0 = -1; + x->x_queue_id = -1; + + x->x_cheby = pdp_imageproc_cheby_new(order); + + // default: process all channels + x->x_channel = 0; + x->x_iterations = 1; + x->x_order = order; + + return (void *)x; +} + + +#ifdef __cplusplus +extern "C" +{ +#endif + + +void pdp_cheby_setup(void) +{ + + + pdp_cheby_class = class_new(gensym("pdp_cheby"), (t_newmethod)pdp_cheby_new, + (t_method)pdp_cheby_free, sizeof(t_pdp_cheby), 0, A_DEFFLOAT, A_NULL); + + + class_addmethod(pdp_cheby_class, (t_method)pdp_cheby_coef, gensym("coef"), A_FLOAT, A_FLOAT, A_NULL); + class_addmethod(pdp_cheby_class, (t_method)pdp_cheby_iterations, gensym("iterations"), A_FLOAT, A_NULL); + class_addmethod(pdp_cheby_class, (t_method)pdp_cheby_channel, gensym("chan"), A_FLOAT, A_NULL); + class_addmethod(pdp_cheby_class, (t_method)pdp_cheby_input_0, gensym("pdp"), A_SYMBOL, A_DEFFLOAT, A_NULL); + class_addmethod(pdp_cheby_class, (t_method)pdp_cheby_reset, gensym("reset"), A_NULL); + +} + +#ifdef __cplusplus +} +#endif diff --git a/modules/pdp_mul.c b/modules/pdp_mul.c index 8c06087..822a862 100644 --- a/modules/pdp_mul.c +++ b/modules/pdp_mul.c @@ -70,15 +70,10 @@ static void pdp_mul_process_grey(t_pdp_mul *x) unsigned int w = header0->info.image.width; unsigned int h = header0->info.image.height; - // set hight so it includes the chroma frames - h = h + (h>>1); pdp_imageproc_mul_process((short int*)data0, (short int*)data1, w, h); return; - - - } static void pdp_mul_process(t_pdp_mul *x) diff --git a/modules/pdp_route.c b/modules/pdp_route.c index 7b0a0a9..02197ad 100644 --- a/modules/pdp_route.c +++ b/modules/pdp_route.c @@ -116,7 +116,7 @@ void pdp_route_setup(void) pdp_route_class = class_new(gensym("pdp_route"), (t_newmethod)pdp_route_new, - (t_method)pdp_route_free, sizeof(t_pdp_route), 0, A_FLOAT, A_NULL); + (t_method)pdp_route_free, sizeof(t_pdp_route), 0, A_DEFFLOAT, A_NULL); class_addmethod(pdp_route_class, (t_method)pdp_route_input_0, gensym("pdp"), A_SYMBOL, A_DEFFLOAT, A_NULL); diff --git a/modules/pdp_scan.c b/modules/pdp_scan.c new file mode 100644 index 0000000..49a985c --- /dev/null +++ b/modules/pdp_scan.c @@ -0,0 +1,231 @@ +/* + * Pure Data Packet module. + * Copyright (c) by Tom Schouten + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + + + +#include "pdp.h" +#include "pdp_mmx.h" +#include + +#define PDP_SCAN_COSTABLE_SIZE 1024 +static float pdp_cos[PDP_SCAN_COSTABLE_SIZE]; + +typedef struct pdp_scan_struct +{ + t_object x_obj; + t_float x_f; + + t_outlet *x_outlet0; + t_outlet *x_outlet1; + + float x_centerx; + float x_centery; + float x_sizeh; + float x_sizev; + + int x_packet0; + int x_packet1; + + int x_interpolate; + + +} t_pdp_scan; + + +static t_int *pdp_scan_perform(t_int *w) +{ + + t_pdp_scan *x = (t_pdp_scan *)(w[1]); + t_int n = (t_int)(w[2]); + t_float *in = (float *)(w[3]); + t_float *out = (float *)(w[4]); + + + /* check if valid image */ + if (-1 == x->x_packet0){ + while (n--) *out++ = 0; + return (w+5); + } + else{ + + t_pdp *header0 = pdp_packet_header(x->x_packet0); + short int *data0 = (short int *)pdp_packet_data (x->x_packet0); + short int *data1 = (short int *)pdp_packet_data (x->x_packet1); + int width = (float)header0->info.image.width; + float widthm1 = (float)header0->info.image.width - 1; + float heightm1 = (float)header0->info.image.height - 1; + int i; + + float scale = 1.0f / 32767.0f; + + if (x->x_interpolate && (-1 != x->x_packet1)){ + float a_old = 1.0f; + float a_new = 0.0f; + float a_inc = 1.0f / (float)n; + float old, new; + + while(n--){ + float phase = *in++; + int iphase = (int)(phase * PDP_SCAN_COSTABLE_SIZE); + float c = pdp_cos[iphase & (PDP_SCAN_COSTABLE_SIZE - 1)]; + float s = pdp_cos[(iphase - (PDP_SCAN_COSTABLE_SIZE>>1)) & (PDP_SCAN_COSTABLE_SIZE - 1)]; + int xxx = (int)((x->x_centerx + x->x_sizeh * c) * widthm1); + int yyy = (int)((x->x_centery + x->x_sizev * c) * heightm1); + int offset = yyy*width+xxx; + new = ((float)(data0[offset])) * scale; + old = ((float)(data1[offset])) * scale; + *out++ = a_old * old + a_new * new; + a_new += a_inc; + a_old -= a_inc; + } + + pdp_packet_mark_unused(x->x_packet1); + x->x_packet1 = -1; + } + else{ + while(n--){ + float phase = *in++; + int iphase = (int)(phase * PDP_SCAN_COSTABLE_SIZE); + float c = pdp_cos[iphase & (PDP_SCAN_COSTABLE_SIZE - 1)]; + float s = pdp_cos[(iphase - (PDP_SCAN_COSTABLE_SIZE>>1)) & (PDP_SCAN_COSTABLE_SIZE - 1)]; + int xxx = (int)((x->x_centerx + x->x_sizeh * c) * widthm1); + int yyy = (int)((x->x_centery + x->x_sizev * c) * heightm1); + *out++ = ((float)(data0[yyy*width+xxx])) * scale; + } + } + + return (w+5); + + } +} + + + + +static void pdp_scan_input_0(t_pdp_scan *x, t_symbol *s, t_floatarg f) +{ + int packet = (int)f; + + /* register */ + if (s== gensym("register_ro")){ + t_pdp *header = pdp_packet_header(packet); + if (!header) return; + if (PDP_IMAGE != header->type) return; + if ((header->info.image.encoding != PDP_IMAGE_YV12) && (header->info.image.encoding != PDP_IMAGE_GREY)) return; + + /* replace if not compatible or we are not interpolating */ + if (!x->x_interpolate || (!pdp_type_compat_image(x->x_packet0, packet))){ + pdp_packet_mark_unused(x->x_packet0); + x->x_packet0 = pdp_packet_copy_ro(packet); + } + /* otherwize keep the old one */ + else{ + pdp_packet_mark_unused(x->x_packet1); + x->x_packet1 = x->x_packet0; + x->x_packet0 = pdp_packet_copy_ro(packet); + } + } + + /* pass packet */ + if (s== gensym("process")){ + //if (-1 != x->x_packet0) outlet_pdp (x->x_outlet0, x->x_packet0); + } + + +} + + + + +static void pdp_scan_dsp (t_pdp_scan *x, t_signal **sp) +{ + dsp_add(pdp_scan_perform, 4, x, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); + +} + + +static void pdp_scan_interpolate(t_pdp_scan *x, t_floatarg f) +{ + if (0.0 == f){ + x->x_interpolate = 0; + pdp_packet_mark_unused(x->x_packet1); + } + if (1.0 == f) x->x_interpolate = 1; +} + +static void pdp_scan_free(t_pdp_scan *x) +{ + pdp_packet_mark_unused(x->x_packet0); +} + + +t_class *pdp_scan_class; + + + +void *pdp_scan_new(void) +{ + t_pdp_scan *x = (t_pdp_scan *)pd_new(pdp_scan_class); + + + //x->x_outlet0 = outlet_new(&x->x_obj, &s_anything); + x->x_outlet1 = outlet_new(&x->x_obj, &s_signal); + x->x_packet0 = -1; + x->x_packet1 = -1; + + x->x_centerx = 0.5f; + x->x_centery = 0.5f; + x->x_sizeh = 0.3; + x->x_sizev = 0.3; + + pdp_scan_interpolate(x, 0); + + return (void *)x; +} + + +#ifdef __cplusplus +extern "C" +{ +#endif + + +void pdp_scan_setup(void) +{ + int i; + for (i=0; i + * Copyright (c) by Tom Schouten + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + +/* + +pdp sdl output + +DONE: + +TODO: + * close window (event) + * fullscreen chose resolution + * event handling in different object (and look at mplayer for that!) + +*/ + + + +#include +#include +#include +#include + +#include + +#include +#include + +#include "pdp.h" +#include "pdp_llconv.h" + + +/* initial image dimensions */ +#define PDP_SDL_W 320 +#define PDP_SDL_H 240 + +#define PDP_AUTOCREATE_RETRY 3 + + +typedef struct pdp_sdl_struct { + t_object x_obj; + t_float x_f; + + int x_packet0; + int x_queue_id; + + SDL_Surface *x_sdl_surface; + SDL_Overlay *x_sdl_overlay; + SDL_Rect x_sdl_rect; + + Uint32 x_sdl_format; + + int x_winwidth; + int x_winheight; + + unsigned int x_width; + unsigned int x_height; + int x_last_encoding; + + int x_initialized; + int x_backfromthread; + int x_autocreate; + + + int x_fullscreen; + +} t_pdp_sdl; + +static SDL_Surface *pdp_sdl_getSurface(char* title, int width, int height, int bits, int fullscreenflag) { + Uint32 flags; + int size,i; + SDL_Surface *screen; + + /* Initialize SDL */ + if (!SDL_WasInit(SDL_INIT_VIDEO)) { + if (SDL_Init (SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE)) { + printf("SDL: Initializing of SDL failed: %s.\n", SDL_GetError()); + return (SDL_Surface *)-1; + } + } + + + +/* +gem : SDL_OPENGL|SDL_DOUBLEBUF|SDL_HWSURFACE|SDL_ANYFORMAT|SDL_OPENGLBLIT; +working: SDL_ANYFORMAT|SDL_RESIZABLE|SDL_RLEACCEL; +*/ + + flags = SDL_HWSURFACE|SDL_RESIZABLE|SDL_ASYNCBLIT|SDL_HWACCEL; + if ( fullscreenflag>0 ) { + flags |= SDL_FULLSCREEN|SDL_DOUBLEBUF; + } + + /* Have a preference for 8-bit, but accept any depth */ + screen = SDL_SetVideoMode(width, height, bits, flags); + if ( screen == NULL ) { + fprintf(stderr, "Couldn't set video mode: %s\n", + SDL_GetError()); + return NULL; + } + + SDL_WM_SetCaption (title, title); + + /* ignore events :: only keys and wm_quit */ + for ( i=SDL_NOEVENT; ix_sdl_overlay = SDL_CreateYUVOverlay(x->x_width, x->x_height, x->x_sdl_format, x->x_sdl_surface); +} + +static inline void pdp_sdl_freeOverlay(t_pdp_sdl* x) { + SDL_FreeYUVOverlay(x->x_sdl_overlay); +} + +static int pdp_sdl_drawImage(t_pdp_sdl* x, t_image *image, short int *pixels) { + + unsigned int width = image->width; + unsigned int height = image->height; + int encoding = image->encoding; + unsigned int* uintdata; + int i; + + + /* 8bit y fulscale and 8bit u,v 2x2 subsampled */ + //static short int gain[4] = {0x0100, 0x0100, 0x0100, 0x0100}; + int nbpixels = width * height; + long size = (width * height + (((width>>1)*(height>>1))<<1)); + + /* check if xvimage needs to be recreated */ + if ((width != x->x_width) || (height != x->x_height)){ + post("pdp_xv: replace image"); + x->x_width = width; + x->x_height = height; + pdp_sdl_freeOverlay(x); + pdp_sdl_getOverlay(x); + } + + SDL_LockYUVOverlay(x->x_sdl_overlay); + if (pixels) { + pdp_llconv(pixels,RIF_YVU__P411_S16, (Uint8 *)(* x->x_sdl_overlay->pixels), RIF_YVU__P411_U8, x->x_width, x->x_height); + } else bzero((Uint8 *)(* x->x_sdl_overlay->pixels), size); + SDL_UnlockYUVOverlay(x->x_sdl_overlay); + + return 1; +} + +static void pdp_sdl_resize(t_pdp_sdl* x, t_floatarg width, t_floatarg height) { + + if (x->x_initialized && (!x->x_fullscreen) && (width>0) && (height>0)){ +// disabled for now +// if media size is different to the one set, it will resize (yet never dither) + } +} + +static void pdp_sdl_fullscreen(t_pdp_sdl *x, t_floatarg f); + +static int pdp_sdl_create(t_pdp_sdl *x) { + if (x->x_initialized){ + return 0; + } + x->x_initialized = 0; + + x->x_sdl_surface = pdp_sdl_getSurface("pdp-sdl", x->x_winwidth, x->x_winheight, 16, x->x_fullscreen); + if (x->x_sdl_surface != NULL) { + pdp_sdl_getOverlay(x); + if (x->x_sdl_overlay != NULL) { + x->x_sdl_rect.x = 0; + x->x_sdl_rect.y = 0; + x->x_sdl_rect.w = x->x_width; + x->x_sdl_rect.h = x->x_height; + x->x_initialized = 1; + post("created successfully"); + } + } + x->x_backfromthread = 1; + + return x->x_initialized; +} + +static void pdp_sdl_destroy(t_pdp_sdl *x); + +static void pdp_sdl_checkEvents(t_pdp_sdl *x) { + Uint8 *keys; + SDL_Event event; + + if (!SDL_PollEvent(&event)) return; + + switch( event.type ){ + case SDL_KEYDOWN: + case SDL_KEYUP: + keys = SDL_GetKeyState(NULL); + + if(keys[SDLK_UP]) { post("up"); } + if(keys[SDLK_DOWN]) { post("down"); } + + if(keys[SDLK_ESCAPE]) pdp_sdl_fullscreen(x,0); + break; + + case SDL_QUIT: + pdp_sdl_destroy(x); + break; + default: + break; + } + + +} + +static int pdp_sdl_try_autocreate(t_pdp_sdl *x) +{ + + if (x->x_autocreate){ + post("pdp_sdl: autocreate window"); + pdp_sdl_create(x); + if (!(x->x_initialized)){ + x->x_autocreate--; + if (!x->x_autocreate){ + post ("pdp_sdl: autocreate failed %d times: disabled", PDP_AUTOCREATE_RETRY); + post ("pdp_sdl: send [autocreate 1] message to re-enable"); + return 0; + } + } + else return 1; + + } + return 0; +} + +static void pdp_sdl_bang(t_pdp_sdl *x); + +static void pdp_sdl_process(t_pdp_sdl *x) +{ + t_pdp *header = pdp_packet_header(x->x_packet0); + void *data = pdp_packet_data (x->x_packet0); + + + if (!x->x_backfromthread) return; + + /* check if window is initialized */ + if (!(x->x_initialized)){ + post("trying to autocreate"); + if (!pdp_sdl_try_autocreate(x)) return; + } + + /* check for pending sdl events */ + pdp_sdl_checkEvents(x); + + /* check data packet */ + if (!(header)) { + post("pdp_sdl: invalid packet header"); + return; + } + if (PDP_IMAGE != header->type) { + post("pdp_sdl: packet is not a PDP_IMAGE"); + return; + } + if (header->info.image.encoding != PDP_IMAGE_YV12) { + post("pdp_sdl: packet is not a PDP_IMAGE_YV12"); + return; + } + + /* copy the packet to the sdlimage */ + pdp_sdl_drawImage(x, &header->info.image, (short int *)data); + + /* display the new image */ + pdp_sdl_bang(x); +} + +static void pdp_sdl_destroy(t_pdp_sdl *x) { + if (x->x_initialized){ + pdp_sdl_freeOverlay(x); + SDL_FreeSurface(x->x_sdl_surface); + x->x_initialized = 0; + } +} + +static void pdp_sdl_random(t_pdp_sdl *x) { + unsigned int i; + long *intdata = (long *)(* x->x_sdl_overlay->pixels); + SDL_LockYUVOverlay(x->x_sdl_overlay); + for(i=0; ix_width*x->x_height/4; i++) intdata[i]=random(); + SDL_UnlockYUVOverlay(x->x_sdl_overlay); +} + +/* redisplays image */ +static void pdp_sdl_bang_thread(t_pdp_sdl *x) { +// if (x->x_sdl_overlay->pixels) { + if (SDL_DisplayYUVOverlay(x->x_sdl_overlay, &(* x).x_sdl_rect) <0) + post("pdp_sdl: __LINE__ cannot display"); +// } +} + +static void pdp_sdl_bang_callback(t_pdp_sdl *x) +{ + x->x_backfromthread = 1; + + /* release the packet if there is one */ + pdp_packet_mark_unused(x->x_packet0); + x->x_packet0 = -1;} + +static void pdp_sdl_bang(t_pdp_sdl *x) { + + /* if previous queued method returned + schedule a new one, else ignore */ + if (x->x_backfromthread) { + x->x_backfromthread = 0; + pdp_queue_add(x, pdp_sdl_bang_thread, pdp_sdl_bang_callback, &x->x_queue_id); + } +} + +static void pdp_sdl_input_0(t_pdp_sdl *x, t_symbol *s, t_floatarg f) { + + if (s == gensym("register_ro")) pdp_packet_copy_ro_or_drop(&x->x_packet0, (int)f); + if (s == gensym("process")) pdp_sdl_process(x); + +} + +static void pdp_sdl_autocreate(t_pdp_sdl *x, t_floatarg f) { + if (f != 0.0f) x->x_autocreate = PDP_AUTOCREATE_RETRY; + else x->x_autocreate = 0; +} + +static void pdp_sdl_fullscreen(t_pdp_sdl *x, t_floatarg f) { + if (f == x->x_fullscreen) return; + + x->x_fullscreen = (f != 0.0f); + + pdp_sdl_destroy(x); + pdp_sdl_create(x); + SDL_ShowCursor(0); +} + +static void pdp_sdl_free(t_pdp_sdl *x) +{ + pdp_queue_finish(x->x_queue_id); + pdp_sdl_destroy(x); + pdp_packet_mark_unused(x->x_packet0); + SDL_Quit(); +} + + +t_class *pdp_sdl_class; + +void *pdp_sdl_new(void) +{ + t_pdp_sdl *x = (t_pdp_sdl *)pd_new(pdp_sdl_class); + + x->x_packet0 = -1; + x->x_queue_id = -1; + + x->x_sdl_surface = NULL; + x->x_sdl_overlay = NULL; + x->x_sdl_format = SDL_YV12_OVERLAY; + + x->x_winwidth = PDP_SDL_W; + x->x_winheight = PDP_SDL_H; + + x->x_width = PDP_SDL_W; + x->x_height = PDP_SDL_H; + + x->x_backfromthread = 1; + x->x_initialized = 0; + pdp_sdl_autocreate(x,1); + + x->x_fullscreen = 0; + + return (void *)x; +} + + + +#ifdef __cplusplus +extern "C" +{ +#endif + + +void pdp_sdl_setup(void) +{ + + + pdp_sdl_class = class_new(gensym("pdp_sdl"), (t_newmethod)pdp_sdl_new, + (t_method)pdp_sdl_free, sizeof(t_pdp_sdl), 0, A_NULL); + + + class_addmethod(pdp_sdl_class, (t_method)pdp_sdl_bang, gensym("bang"), A_NULL); + class_addmethod(pdp_sdl_class, (t_method)pdp_sdl_random, gensym("random"), A_NULL); + class_addmethod(pdp_sdl_class, (t_method)pdp_sdl_create, gensym("create"), A_NULL); + class_addmethod(pdp_sdl_class, (t_method)pdp_sdl_autocreate, gensym("autocreate"), A_FLOAT, A_NULL); + class_addmethod(pdp_sdl_class, (t_method)pdp_sdl_destroy, gensym("destroy"), A_NULL); + class_addmethod(pdp_sdl_class, (t_method)pdp_sdl_destroy, gensym("close"), A_NULL); +// class_addmethod(pdp_sdl_class, (t_method)pdp_sdl_resize, gensym("dim"), A_FLOAT, A_FLOAT, A_NULL); +// class_addmethod(pdp_sdl_class, (t_method)pdp_sdl_resize, gensym("size"), A_FLOAT, A_FLOAT, A_NULL); + class_addmethod(pdp_sdl_class, (t_method)pdp_sdl_fullscreen, gensym("fullscreen"), A_FLOAT, A_NULL); +// class_addmethod(pdp_sdl_class, (t_method)pdp_sdl_display, gensym("display"), A_SYMBOL, A_NULL); + class_addmethod(pdp_sdl_class, (t_method)pdp_sdl_input_0, gensym("pdp"), A_SYMBOL, A_DEFFLOAT, A_NULL); + +} + +#ifdef __cplusplus +} +#endif diff --git a/modules/pdp_zoom.c b/modules/pdp_zoom.c index 33207ce..c89efb1 100644 --- a/modules/pdp_zoom.c +++ b/modules/pdp_zoom.c @@ -38,11 +38,7 @@ typedef struct pdp_zoom_struct int x_dropped; int x_queue_id; - float x_zoom_x; - float x_zoom_y; - - float x_center_x; - float x_center_y; + void *x_zoom; int x_quality; //not used @@ -67,10 +63,10 @@ static void pdp_zoom_process_yv12(t_pdp_zoom *x) unsigned int voffset = size; unsigned int uoffset = size + (size>>2); + pdp_imageproc_resample_affinemap_process(x->x_zoom, src_image, dst_image, w, h); + pdp_imageproc_resample_affinemap_process(x->x_zoom, src_image+voffset, dst_image+voffset, w>>1, h>>1); + pdp_imageproc_resample_affinemap_process(x->x_zoom, src_image+uoffset, dst_image+uoffset, w>>1, h>>1); - pdp_resample_zoom_tiled_bilin(src_image, dst_image, w, h, x->x_zoom_x, x->x_zoom_y, x->x_center_x, x->x_center_y); - pdp_resample_zoom_tiled_bilin(src_image+voffset, dst_image+voffset, w>>1, h>>1, x->x_zoom_x, x->x_zoom_y, x->x_center_x, x->x_center_y); - pdp_resample_zoom_tiled_bilin(src_image+uoffset, dst_image+uoffset, w>>1, h>>1, x->x_zoom_x, x->x_zoom_y, x->x_center_x, x->x_center_y); return; } @@ -89,7 +85,7 @@ static void pdp_zoom_process_grey(t_pdp_zoom *x) short int *src_image = (short int *)data0; short int *dst_image = (short int *)data1; - pdp_resample_zoom_tiled_bilin(src_image, dst_image, w, h, x->x_zoom_x, x->x_zoom_y, x->x_center_x, x->x_center_y); + pdp_imageproc_resample_affinemap_process(x->x_zoom, src_image, dst_image, w, h); return; @@ -160,30 +156,35 @@ static void pdp_zoom_input_0(t_pdp_zoom *x, t_symbol *s, t_floatarg f) -static void pdp_zoom_x(t_pdp_zoom *x, t_floatarg f) +static void pdp_zoom_zoom_x(t_pdp_zoom *x, t_floatarg f) { - x->x_zoom_x = f; + pdp_imageproc_resample_affinemap_setzoomx(x->x_zoom, f); } -static void pdp_zoom_y(t_pdp_zoom *x, t_floatarg f) +static void pdp_zoom_angle(t_pdp_zoom *x, t_floatarg f) { - x->x_zoom_y = f; + pdp_imageproc_resample_affinemap_setangle(x->x_zoom, f); } -static void pdp_zoom(t_pdp_zoom *x, t_floatarg f) +static void pdp_zoom_zoom_y(t_pdp_zoom *x, t_floatarg f) { - pdp_zoom_x(x, f); - pdp_zoom_y(x, f); + pdp_imageproc_resample_affinemap_setzoomy(x->x_zoom, f); +} + +static void pdp_zoom_zoom(t_pdp_zoom *x, t_floatarg f) +{ + pdp_zoom_zoom_x(x, f); + pdp_zoom_zoom_y(x, f); } static void pdp_zoom_center_x(t_pdp_zoom *x, t_floatarg f) { - x->x_center_x = (f + 0.5f); + pdp_imageproc_resample_affinemap_setcenterx(x->x_zoom, f); } static void pdp_zoom_center_y(t_pdp_zoom *x, t_floatarg f) { - x->x_center_y = (f + 0.5f); + pdp_imageproc_resample_affinemap_setcentery(x->x_zoom, f); } static void pdp_zoom_center(t_pdp_zoom *x, t_floatarg fx, t_floatarg fy) { @@ -191,6 +192,7 @@ static void pdp_zoom_center(t_pdp_zoom *x, t_floatarg fx, t_floatarg fy) pdp_zoom_center_y(x, fy); } +// not used static void pdp_zoom_quality(t_pdp_zoom *x, t_floatarg f) { if (f==0) x->x_quality = 0; @@ -205,30 +207,69 @@ t_class *pdp_zoom_class; void pdp_zoom_free(t_pdp_zoom *x) { pdp_queue_finish(x->x_queue_id); + pdp_imageproc_resample_affinemap_delete(x->x_zoom); pdp_packet_mark_unused(x->x_packet0); pdp_packet_mark_unused(x->x_packet1); } -void *pdp_zoom_new(t_floatarg fw, t_floatarg zoom) + +void pdp_zoom_init_common(t_pdp_zoom *x) +{ + x->x_outlet0 = outlet_new(&x->x_obj, &s_anything); + x->x_packet0 = -1; + x->x_packet1 = -1; + x->x_queue_id = -1; + + x->x_zoom = pdp_imageproc_resample_affinemap_new(); + + //quality is not used: all routines are "high quality" bilinear + //pdp_zoom_quality(x, 1); + pdp_zoom_center_x(x, 0.5f); + pdp_zoom_center_y(x, 0.5f); + +} + + +void *pdp_zoom_new(t_floatarg zoom) { t_pdp_zoom *x = (t_pdp_zoom *)pd_new(pdp_zoom_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("zoom")); - + pdp_zoom_init_common(x); - x->x_outlet0 = outlet_new(&x->x_obj, &s_anything); + if (zoom == 0.0f) zoom = 1.0f; + pdp_zoom_zoom(x, zoom); + pdp_zoom_angle(x, 0.0f); - x->x_packet0 = -1; - x->x_packet1 = -1; - x->x_queue_id = -1; + return (void *)x; +} + +void *pdp_zrot_new(t_floatarg zoom, t_floatarg angle) +{ + t_pdp_zoom *x = (t_pdp_zoom *)pd_new(pdp_zoom_class); - pdp_zoom_quality(x, 1); - pdp_zoom_center_x(x, 0); - pdp_zoom_center_y(x, 0); + inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("zoom")); + inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("angle")); - if (zoom = 0.0f) zoom = 1.0f; - pdp_zoom(x, zoom); + pdp_zoom_init_common(x); + + if (zoom == 0.0f) zoom = 1.0f; + pdp_zoom_zoom(x, zoom); + pdp_zoom_angle(x, angle); + + return (void *)x; +} + +void *pdp_rotate_new(t_floatarg angle) +{ + t_pdp_zoom *x = (t_pdp_zoom *)pd_new(pdp_zoom_class); + + inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("angle")); + + pdp_zoom_init_common(x); + pdp_zoom_zoom(x, 1.0f); + pdp_zoom_angle(x, angle); return (void *)x; } @@ -243,18 +284,21 @@ extern "C" void pdp_zoom_setup(void) { - pdp_zoom_class = class_new(gensym("pdp_zoom"), (t_newmethod)pdp_zoom_new, - (t_method)pdp_zoom_free, sizeof(t_pdp_zoom), 0, A_DEFFLOAT, A_DEFFLOAT, A_NULL); + (t_method)pdp_zoom_free, sizeof(t_pdp_zoom), 0, A_DEFFLOAT, A_NULL); + + class_addcreator((t_newmethod)pdp_zrot_new, gensym("pdp_zrot"), A_DEFFLOAT, A_DEFFLOAT, A_NULL); + class_addcreator((t_newmethod)pdp_rotate_new, gensym("pdp_rotate"), A_DEFFLOAT, A_NULL); class_addmethod(pdp_zoom_class, (t_method)pdp_zoom_quality, gensym("quality"), A_FLOAT, A_NULL); class_addmethod(pdp_zoom_class, (t_method)pdp_zoom_center_x, gensym("centerx"), A_FLOAT, A_NULL); class_addmethod(pdp_zoom_class, (t_method)pdp_zoom_center_y, gensym("centery"), A_FLOAT, A_NULL); class_addmethod(pdp_zoom_class, (t_method)pdp_zoom_center, gensym("center"), A_FLOAT, A_FLOAT, A_NULL); - class_addmethod(pdp_zoom_class, (t_method)pdp_zoom_x, gensym("zoomx"), A_FLOAT, A_NULL); - class_addmethod(pdp_zoom_class, (t_method)pdp_zoom_y, gensym("zoomy"), A_FLOAT, A_NULL); - class_addmethod(pdp_zoom_class, (t_method)pdp_zoom, gensym("zoom"), A_FLOAT, A_NULL); + class_addmethod(pdp_zoom_class, (t_method)pdp_zoom_zoom_x, gensym("zoomx"), A_FLOAT, A_NULL); + class_addmethod(pdp_zoom_class, (t_method)pdp_zoom_zoom_y, gensym("zoomy"), A_FLOAT, A_NULL); + class_addmethod(pdp_zoom_class, (t_method)pdp_zoom_zoom, gensym("zoom"), A_FLOAT, A_NULL); + class_addmethod(pdp_zoom_class, (t_method)pdp_zoom_angle, gensym("angle"), A_FLOAT, A_NULL); class_addmethod(pdp_zoom_class, (t_method)pdp_zoom_input_0, gensym("pdp"), A_SYMBOL, A_DEFFLOAT, A_NULL); } diff --git a/scaf/Makefile.config b/scaf/Makefile.config index 7106a9f..c41fd37 100644 --- a/scaf/Makefile.config +++ b/scaf/Makefile.config @@ -22,8 +22,8 @@ PDP_CA_CFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer -ffast-math \ # -Wshadow # compiler and assembler -CC = gcc-3.2 -#CC = gcc +#CC = gcc-3.2 +CC = gcc AS = as # build rules diff --git a/scaf/TODO b/scaf/TODO new file mode 100644 index 0000000..bbeebec --- /dev/null +++ b/scaf/TODO @@ -0,0 +1,3 @@ +* add decimating to pdp_ca2image +* clean up library +* add translation option to pdp_ca (modify so horizontal shifts by 1 are possible) diff --git a/scaf/include/pdp_ca.h b/scaf/include/pdp_ca.h index acaeea7..5bcdf65 100644 --- a/scaf/include/pdp_ca.h +++ b/scaf/include/pdp_ca.h @@ -32,6 +32,7 @@ typedef struct unsigned int width; /* CA width (in 1 bit cells) */ unsigned int height; /* CA height (in 1 bit cells) */ unsigned int offset; /* bit offset of upper left corner */ + unsigned int currow; /* current row to compute for 1D CA */ } t_ca; diff --git a/scaf/pdp/pdp_ca.c b/scaf/pdp/pdp_ca.c index 391b235..f9180cb 100644 --- a/scaf/pdp/pdp_ca.c +++ b/scaf/pdp/pdp_ca.c @@ -35,6 +35,8 @@ t_class *pdp_image2ca_class; // converter from grey/yv12 -> ca #define PDP_CA_STACKSIZE 256 +#define PDP_CA_MODE_1D 1 +#define PDP_CA_MODE_2D 2 typedef struct pdp_ca_data_struct { @@ -66,7 +68,13 @@ typedef struct pdp_ca_struct /* nb of iterations */ int x_iterations; + /* shift ca on output */ + int x_horshift; + int x_vershift; + /* operation mode */ + int x_mode; + int x_fullscreen1d; /* aligned vector data */ t_pdp_ca_data *x_data; @@ -77,9 +85,95 @@ typedef struct pdp_ca_struct } t_pdp_ca; +/* 1D: process from packet0 -> packet0 */ +static void pdp_ca_process_ca_1D(t_pdp_ca *x) +{ + t_pdp *header = pdp_packet_header(x->x_packet0); + unsigned int *data = (unsigned int *)pdp_packet_data (x->x_packet0); + + int width = pdp_type_ca_info(header)->width; + int height = pdp_type_ca_info(header)->height; + int i; + + unsigned int saved; + + /* load TOS in middle of buffer to limit the effect of stack errors */ + unsigned int *tos = &x->x_data->stack[2*(PDP_CA_STACKSIZE/2)]; + unsigned int *env = &x->x_data->env[0]; + unsigned int *reg = &x->x_data->reg[0]; + void *ca_routine = x->x_ca_routine; + unsigned int rtos; + + /* double word width: number of unsigned ints per row */ + int dwwidth = width >> 5; + int currow = pdp_type_ca_info(header)->currow; + + unsigned long long result = 0; + + unsigned short temp; + unsigned short *usdata; + + /* set destination row to 4th row from top (ca time horizon is 3 deep) */ + int dwrow0 = (((currow + height - 3) % height) * width) >> 5; + int dwrow1 = (((currow + height - 2) % height) * width) >> 5; + int dwrow2 = (((currow + height - 1) % height) * width) >> 5; + int dwrow3 = (currow * width) >> 5; + + /* exit if there isn't a valid routine */ + if(!ca_routine) return; + + + /* compute new row */ + for(i=0; i < (dwwidth-1) ; i+=1){ + env[0] = data[dwrow0 + i]; + env[1] = data[dwrow0 + i + 1]; + env[2] = data[dwrow1 + i]; + env[3] = data[dwrow1 + i + 1]; + env[4] = data[dwrow2 + i]; + env[5] = data[dwrow2 + i + 1]; + result = scaf_feeder(tos, reg, ca_routine, env); + data[dwrow3 + i] = result & 0xffffffff; + } + // i == dwwidth-1 + + /* compute last column in row */ + env[0] = data[dwrow0 + i]; + env[1] = data[dwrow0]; + env[2] = data[dwrow1 + i]; + env[3] = data[dwrow1]; + env[4] = data[dwrow2 + i]; + env[5] = data[dwrow2]; + result = scaf_feeder(tos, reg, ca_routine, env); + data[dwrow3 + i] = result & 0xffffffff; + + + /* undo the shift */ + usdata = (unsigned short *)(&data[dwrow3]); + temp = usdata[(dwwidth*2)-1]; + for (i = (dwwidth*2 - 1); i > 0; i--){ + usdata[i] = usdata[i-1]; + } + usdata[0] = temp; + + /* check data stack pointer */ + rtos = (unsigned int)tos; + + if (env[0] != rtos){ + if (env[0] > rtos) post("pdp_ca: ERROR: stack underflow detected in ca routine"); + if (env[0] < rtos) post("pdp_ca: ERROR: ca routine returned more than one item"); + x->x_ca_routine = 0; + post("pdp_ca: rule disabled"); + + } + + /* save current row */ + pdp_type_ca_info(header)->currow = (currow + 1) % height; -/* process from packet0 -> packet1 */ -static void pdp_ca_process_ca(t_pdp_ca *x) +} + + +/* 2D: process from packet0 -> packet1 */ +static void pdp_ca_process_ca_2D(t_pdp_ca *x) { t_pdp *header0 = pdp_packet_header(x->x_packet0); t_pdp *header1 = pdp_packet_header(x->x_packet1); @@ -216,25 +310,66 @@ static void pdp_ca_bang_thread(t_pdp_ca *x) int encoding; int packet; int i; + int iterations = x->x_iterations; /* invariant: the two packets are allways valid and compatible so a bang is allways possible. this means that in the pdp an invalid packet needs to be converted to a valid one */ - for(i=0; i < x->x_iterations; i++){ - - /* process form packet0 -> packet1 and propagate */ - pdp_ca_process_ca(x); - /* swap */ - pdp_ca_swappackets(x); + if (PDP_CA_MODE_2D == x->x_mode){ + for(i=0; i < iterations; i++){ + + /* process form packet0 -> packet1 */ + pdp_ca_process_ca_2D(x); + /* swap */ + pdp_ca_swappackets(x); + } + } + else if (PDP_CA_MODE_1D == x->x_mode){ + if (x->x_fullscreen1d){ + t_pdp *header0 = pdp_packet_header(x->x_packet0); + pdp_type_ca_info(header0)->currow = 0; + pdp_type_ca_info(header0)->offset = 0; + iterations = pdp_type_ca_info(header0)->height; + } + for(i=0; i < iterations; i++){ + + pdp_ca_process_ca_1D(x); + } } } static void pdp_ca_sendpacket(t_pdp_ca *x) { + + /* adjust offset before sending */ + t_pdp *header0 = pdp_packet_header(x->x_packet0); + + int offset = pdp_type_ca_info(header0)->offset; + int width = pdp_type_ca_info(header0)->width; + int height = pdp_type_ca_info(header0)->height; + int xoffset = offset % width; + int yoffset = offset / width; + + int horshift = x->x_horshift; + int vershift = x->x_vershift; + + horshift %= width; + if (horshift < 0) horshift += width; + vershift %= height; + if (vershift < 0) vershift += height; + + xoffset = (xoffset + horshift) % width; + yoffset = (yoffset + vershift) % height; + offset = yoffset * width + xoffset; + + pdp_type_ca_info(header0)->offset = offset; + + + /* output the packet */ outlet_pdp(x->x_outlet0, x->x_packet0); } @@ -330,23 +465,22 @@ static void pdp_ca_input_1(t_pdp_ca *x, t_symbol *s, t_floatarg f) static void pdp_ca_rule_string(t_pdp_ca *x, char *c) { char tmp[256]; - void (*prev_routine)(void); + void (*ca_routine)(void); - /* save previous routine ptr */ - prev_routine = x->x_ca_routine; /* check if we can find string */ sprintf(tmp, "rule_%s", c); - if (!(x->x_ca_routine = dlsym(x->x_ca_libhandle, tmp))){ + if (!(ca_routine = dlsym(x->x_ca_libhandle, tmp))){ post("pdp_ca: can't fine ca rule %s (symbol: %s)", c, tmp); - x->x_ca_routine = x->x_ca_routine; return; } - - /* all seems ok */ - //post("pdp_ca: using ca rule %s", c); - + /* ok, so store routine address */ + else{ + x->x_ca_routine = ca_routine; + } } + + static void pdp_ca_rule(t_pdp_ca *x, t_symbol *s) { /* make sure lib is loaded */ @@ -494,6 +628,8 @@ static void pdp_ca_newca(t_pdp_ca *x, t_float width, t_float height) pdp_type_ca_info(header)->width = w; pdp_type_ca_info(header)->height = h; pdp_type_ca_info(header)->offset = 0; + pdp_type_ca_info(header)->currow = 0; /* only used for 1D ca */ + x->x_packet1 = pdp_packet_clone_rw(x->x_packet0); @@ -537,6 +673,32 @@ static void pdp_ca_iterations(t_pdp_ca *x, t_float f) x->x_iterations = i; } +static void pdp_ca_horshift16(t_pdp_ca *x, t_float f) +{ + x->x_horshift = 16 * (int)f; +} + +static void pdp_ca_vershift(t_pdp_ca *x, t_float f) +{ + x->x_vershift = (int)f; +} + +static void pdp_ca_set1d(t_pdp_ca *x) +{ + x->x_mode = PDP_CA_MODE_1D; +} + +static void pdp_ca_set2d(t_pdp_ca *x) +{ + x->x_mode = PDP_CA_MODE_2D; +} + +static void pdp_ca_fullscreen1d(t_pdp_ca *x, t_floatarg f) +{ + if (f == 0.0f) x->x_fullscreen1d = 0; + if (f == 1.0f) x->x_fullscreen1d = 1; +} + static void pdp_ca_free(t_pdp_ca *x) { pdp_packet_mark_unused(x->x_packet0); @@ -565,8 +727,13 @@ void *pdp_ca_new(void) x->x_ca_libhandle = 0; x->x_ca_rulename = 0; + x->x_horshift = 0; + x->x_vershift = 0; + pdp_ca_newca(x, 64, 64); pdp_ca_iterations(x, 1); + pdp_ca_set2d(x); + pdp_ca_fullscreen1d(x, 0); x->x_packet_type = gensym("grey"); @@ -711,12 +878,17 @@ void pdp_ca_setup(void) class_addmethod(pdp_ca_class, (t_method)pdp_ca_printrules, gensym("rules"), A_NULL); class_addmethod(pdp_ca_class, (t_method)pdp_ca_rand, gensym("random"), A_NULL); class_addmethod(pdp_ca_class, (t_method)pdp_ca_newca, gensym("ca"), A_FLOAT, A_FLOAT, A_NULL); + class_addmethod(pdp_ca_class, (t_method)pdp_ca_horshift16, gensym("hshift16"), A_FLOAT, A_NULL); + class_addmethod(pdp_ca_class, (t_method)pdp_ca_vershift, gensym("vshift"), A_FLOAT, A_NULL); class_addmethod(pdp_ca_class, (t_method)pdp_ca_close, gensym("close"), A_NULL); class_addmethod(pdp_ca_class, (t_method)pdp_ca_open, gensym("open"), A_SYMBOL, A_NULL); class_addmethod(pdp_ca_class, (t_method)pdp_ca_rule, gensym("rule"), A_SYMBOL, A_NULL); class_addmethod(pdp_ca_class, (t_method)pdp_ca_rule_index, gensym("ruleindex"), A_FLOAT, A_NULL); class_addmethod(pdp_ca_class, (t_method)pdp_ca_input_0, gensym("pdp"), A_SYMBOL, A_DEFFLOAT, A_NULL); class_addmethod(pdp_ca_class, (t_method)pdp_ca_input_1, gensym("pdp1"), A_SYMBOL, A_DEFFLOAT, A_NULL); + class_addmethod(pdp_ca_class, (t_method)pdp_ca_set1d, gensym("1D"), A_NULL); + class_addmethod(pdp_ca_class, (t_method)pdp_ca_set2d, gensym("2D"), A_NULL); + class_addmethod(pdp_ca_class, (t_method)pdp_ca_fullscreen1d, gensym("fullscreen1D"), A_FLOAT, A_NULL); } diff --git a/scaf/pdp/pdp_ca_system.c b/scaf/pdp/pdp_ca_system.c index 0800380..5e30850 100644 --- a/scaf/pdp/pdp_ca_system.c +++ b/scaf/pdp/pdp_ca_system.c @@ -87,16 +87,16 @@ if (srcindex >= (s >> 4)) post ("pdp_type_ca2grey: srcindex out of bound"); if ((x+y) >= s) post ("pdp_type_ca2grey: dstindex out of bound"); - /* dont' shift offset */ + /* debug : dont' shift offset if (0){ - for(y=0; y< (h*w); y+=w){ - for(x=0; x>4], &dest[x+y]); - } - } - return newpacket; + for(y=0; y< (h*w); y+=w){ + for(x=0; x>4], &dest[x+y]); + } + } + return newpacket; } - + */ /* create top left */ for (y=0; y < (h*w) - yoffset; y+=w) { diff --git a/scaf/test/test_pdp_ca3.pd b/scaf/test/test_pdp_ca3.pd new file mode 100644 index 0000000..969d41b --- /dev/null +++ b/scaf/test/test_pdp_ca3.pd @@ -0,0 +1,155 @@ +#N canvas 495 177 625 557 10; +#X obj 325 83 openpanel; +#X msg 325 57 bang; +#X msg 326 111 open \$1; +#X obj 427 212 pdp_ca; +#X obj 202 87 metro 40; +#X msg 211 56 bang; +#X msg 247 56 stop; +#X obj 391 414 pdp_xv; +#X obj 28 31 t b b b; +#X obj 11 7 loadbang; +#X msg 391 99 ca 256 256; +#X msg 394 78 ca 64 64; +#X msg 229 230 random; +#X msg 251 321 rule gameoflife; +#X floatatom 490 187 5 0 0; +#X msg 420 50 ca 512 512; +#X obj 97 127 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X msg 243 348 rule w110; +#X msg 245 371 rule w110mod; +#X msg 258 403 rule golmod; +#X msg 272 430 rule golmod2; +#X msg 273 467 rule golmod3; +#X msg 277 494 rule golmod4; +#X msg 280 515 rule golmod5; +#X msg 283 537 rule golmod6; +#X obj 481 167 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 +1; +#X msg 526 55 ca 1024 512; +#X msg 105 4 open /home/tom/pd/packet/scaf/modules/carules.scafo; +#X obj 427 236 pdp_ca2image; +#X floatatom 530 253 5 0 0; +#X msg 468 416 rule gameoflife; +#X msg 450 455 rule golmod6; +#X msg 380 440 rule golmod3; +#X msg 159 287 rules; +#X floatatom 27 213 5 0 0; +#X msg 40 319 ruleindex \$1; +#X obj 31 254 t b f; +#X msg 52 78 rule gameoflife; +#X msg 504 143 close; +#X msg 149 448 rule test1; +#X obj 156 51 pdp_qt; +#X msg 174 23 open /home/ben/MOV/test1.mov; +#X floatatom 93 31 5 0 0; +#X msg 65 56 autoplay 1; +#X obj 144 25 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X floatatom 282 57 5 0 0; +#X msg 503 113 ca 32 32; +#X obj 39 399 pdp_control; +#X obj 83 476 pdp_control; +#X obj 84 519 print two; +#X obj 39 438 print one; +#X msg 38 374 thread \$1; +#X obj 32 349 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 +; +#X obj 428 352 pdp_zrot; +#X obj 428 324 pdp_mix; +#X floatatom 523 305 5 0 0; +#X floatatom 523 327 5 0 0; +#X floatatom 523 349 5 0 0; +#X obj 427 264 pdp_blur; +#X obj 428 289 pdp_gain; +#X floatatom 530 277 5 0 0; +#X floatatom 260 120 5 0 0; +#X obj 433 159 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 375 364 pdp_xv; +#X floatatom 144 162 5 0 0; +#X msg 144 191 vshift \$1; +#X msg 549 160 1D; +#X msg 579 160 2D; +#X msg 253 183 fullscreen1D \$1; +#X obj 253 164 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 +1; +#X msg 583 272 3; +#X msg 586 324 1.05; +#X msg 586 351 2; +#X msg 588 297 0.97; +#X msg 581 243 0.1; +#X msg 444 25 ca 512 256; +#X obj 434 385 pdp_gain; +#X floatatom 507 380 5 0 0; +#X connect 0 0 2 0; +#X connect 1 0 0 0; +#X connect 2 0 3 0; +#X connect 3 0 28 0; +#X connect 4 0 3 0; +#X connect 5 0 4 0; +#X connect 6 0 4 0; +#X connect 8 1 37 0; +#X connect 8 2 27 0; +#X connect 9 0 8 0; +#X connect 10 0 3 0; +#X connect 11 0 3 0; +#X connect 12 0 3 0; +#X connect 13 0 3 0; +#X connect 14 0 3 2; +#X connect 15 0 3 0; +#X connect 17 0 3 0; +#X connect 18 0 3 0; +#X connect 19 0 3 0; +#X connect 20 0 3 0; +#X connect 21 0 3 0; +#X connect 22 0 3 0; +#X connect 23 0 3 0; +#X connect 24 0 3 0; +#X connect 25 0 14 0; +#X connect 26 0 3 0; +#X connect 27 0 3 0; +#X connect 28 0 58 0; +#X connect 28 0 63 0; +#X connect 29 0 58 1; +#X connect 33 0 3 0; +#X connect 34 0 36 0; +#X connect 35 0 3 0; +#X connect 36 0 12 0; +#X connect 36 1 35 0; +#X connect 37 0 3 0; +#X connect 38 0 3 0; +#X connect 39 0 3 0; +#X connect 41 0 40 0; +#X connect 42 0 40 0; +#X connect 43 0 40 0; +#X connect 44 0 40 0; +#X connect 45 0 4 1; +#X connect 46 0 3 0; +#X connect 51 0 47 0; +#X connect 52 0 51 0; +#X connect 53 0 54 1; +#X connect 53 0 76 0; +#X connect 54 0 53 0; +#X connect 55 0 54 2; +#X connect 56 0 53 1; +#X connect 57 0 53 2; +#X connect 58 0 59 0; +#X connect 59 0 54 0; +#X connect 60 0 59 1; +#X connect 62 0 3 0; +#X connect 64 0 65 0; +#X connect 65 0 3 0; +#X connect 66 0 3 0; +#X connect 67 0 3 0; +#X connect 68 0 3 0; +#X connect 69 0 68 0; +#X connect 70 0 60 0; +#X connect 71 0 56 0; +#X connect 72 0 57 0; +#X connect 73 0 55 0; +#X connect 74 0 29 0; +#X connect 75 0 3 0; +#X connect 76 0 7 0; +#X connect 77 0 76 1; diff --git a/system/mmx/Makefile b/system/mmx/Makefile index 0f8f836..51e5052 100644 --- a/system/mmx/Makefile +++ b/system/mmx/Makefile @@ -14,7 +14,9 @@ pixel_biquad_s16.o \ pixel_ca_s1.o \ pixel_rand_s16.o \ pixel_crot_s16.o \ -pixel_gain_s16.o +pixel_gain_s16.o \ +pixel_resample_s16.o \ +pixel_cheby_s16.o all: $(OBJ) @@ -27,3 +29,4 @@ clean: rm -f pdp_mmx.a rm -f pdp_mmx_test + diff --git a/system/mmx/pixel_cheby_s16.s b/system/mmx/pixel_cheby_s16.s new file mode 100644 index 0000000..2afe9e2 --- /dev/null +++ b/system/mmx/pixel_cheby_s16.s @@ -0,0 +1,90 @@ +# Pure Data Packet mmx routine. +# Copyright (c) by Tom Schouten +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# +.globl pixel_cheby_s16_3plus +.type pixel_cheby_s16_3plus,@function + +# void pixel_cheby_s16(int *buf, int nb_8pixel_vectors, int order+1, short int *coefs) + + +# coefs are s2.13 fixed point (-4->4) +pixel_cheby_s16_3plus: + pushl %ebp + movl %esp, %ebp + push %esi + push %edi + push %edx + + movl 8(%ebp), %esi # input array + movl 12(%ebp), %ecx # vector count + movl 16(%ebp), %eax # get order+1 + + shll $3, %eax + movl 20(%ebp), %edx + addl %eax, %edx # edx = coef endx address + +# jmp skip + + .align 16 + .loop_cheby: + + movl 20(%ebp), %edi # get coefs + movq (%esi), %mm0 # load 4 pixels from memory (mm0 = x) + pcmpeqw %mm2, %mm2 + movq %mm0, %mm1 # mm1 (T_n-1) <- x + psrlw $1, %mm2 # mm2 (T_n-2) <- 1 + + + movq (%edi), %mm4 # mm4 (acc) == a0 + psraw $1, %mm4 # mm4 == a0/2 + movq %mm0, %mm5 # mm5 (intermediate) + pmulhw 8(%edi), %mm5 # mm5 == (x * a1)/2 + paddsw %mm5, %mm4 # acc = c0 + c1 x + addl $16, %edi + + .loop_cheby_inner: + movq %mm1, %mm3 # mm3 == T_n-1 + psraw $2, %mm2 # mm2 == T_n-2 / 4 + pmulhw %mm0, %mm3 # mm3 == (2 x T_n-1) / 4 + psubsw %mm2, %mm3 # mm3 == (2 x T_n-1 - T_n-2) / 4 + paddsw %mm3, %mm3 + paddsw %mm3, %mm3 # mm3 == T_n + movq %mm1, %mm2 # mm2 == new T_n-1 + movq %mm3, %mm1 # mm3 == new T_n-2 + pmulhw (%edi), %mm3 # mm3 = a_n * T_n / 2 + paddsw %mm3, %mm4 # accumulate + addl $8, %edi + cmpl %edx, %edi + jne .loop_cheby_inner + + paddsw %mm4, %mm4 # compensate for 0.125 factor + paddsw %mm4, %mm4 + paddsw %mm4, %mm4 + movq %mm4, (%esi) # store result in memory + addl $8, %esi # increment source/dest pointer + decl %ecx + jnz .loop_cheby # loop + +skip: + emms + + pop %edx + pop %edi + pop %esi + leave + ret + diff --git a/system/mmx/pixel_resample_s16.s b/system/mmx/pixel_resample_s16.s new file mode 100644 index 0000000..3959f9c --- /dev/null +++ b/system/mmx/pixel_resample_s16.s @@ -0,0 +1,314 @@ + + +#interpolation data: +#* 4 vectors: neighbourhood for samples (TL, TR, BL, BR) +#* 2 vectors: fractional part (unsigned) +#* 2 vectors: addresses of pixel blocks + +#coord conversion data: +#1 vector: 32bit splatted address +#1 vector: 16bit splatted w-1 +#1 vector: 16bit splatted h-1 +#1 vector: 16bit splatted w (reuse w-1 with add?) +#1 dword: 32 bit line offset + +#coord generation data: several vectors for parameter update stuff.. + +#coordinate systems: 16 bit virtual coordinates (signed, center relative) +#* 2 vectors: virtual coordinates +#(evt tussenstap + conversie naar 16 bit virtual) + + +#step 1: generate virtual coords + + +#step 2: virtual coords -> block adresses + fractional adresses +#* mulhigh: real coords (x,y) (center relative) +#* add center -> unsigned (top left relative) +#* mullow: fractional part (x_frac, y_frac) +#* mulhigh, mullow, pack 32bit: y_offset +#* pack 32bit: x_offset +#* add, shift, add start address: real addresses + + +#step3: data fetch using generated addresses: +# this step would be much simpler in 4x16bit rgba. life's a bitch.. + +#step4: billinear interpolation + +#stat5: store + + + + # this can be simplified by doing 32 bit unaligned moves + # and vector unpacking on the data + + + + # cooked image data structure + # pixel environment temp storage + TL1 = 0x00 + TL2 = 0x02 + TL3 = 0x04 + TL4 = 0x06 + TR1 = 0x08 + TR2 = 0x0A + TR3 = 0x0C + TR4 = 0x0E + BL1 = 0x10 + BL2 = 0x12 + BL3 = 0x14 + BL4 = 0x16 + BR1 = 0x18 + BR2 = 0x1A + BR3 = 0x1C + BR4 = 0x1E + # addresses of pixel blocks + ADDRESS1 = 0x20 + ADDRESS2 = 0x24 + ADDRESS3 = 0x28 + ADDRESS4 = 0x2C + + # second env + address buffer (testing: not used) + SECONDBUFFER = 0x30 + + # 32bit splatted bitmap address + V2PLANEADDRESS = 0x60 + # 16bit splatted image constants + V4TWOWIDTHM1 = 0x68 + V4TWOHEIGHTM1 = 0x70 + V4LINEOFFSET = 0x78 + # data struct size + RESAMPLEDATASIZE = 0x80 + + + + # interpolation routine + # input: %mm0, %mm1 4 x 16bit unsigned top left relative virtual x and y coordinates + # %esi: temp & algo data structure + +getpixelsbilin: psrlw $1, %mm0 # convert to range 0->0x7fff [0,0.5[ + psrlw $1, %mm1 + movq %mm0, %mm2 + movq %mm1, %mm3 + movq V4TWOWIDTHM1(%esi), %mm4 # 2 * (width - 1) + movq V4TWOHEIGHTM1(%esi), %mm5 # 2 * (height - 1) + pmulhw %mm5, %mm3 # mm3 == y coord (topleft relative) + pmulhw %mm4, %mm2 # mm2 == x coord (topleft relative) + pmullw %mm5, %mm1 # mm1 == y frac (unsigned) + pmullw %mm4, %mm0 # mm0 == x frac (unsigned) + + movq %mm3, %mm5 # copy y coord + pmullw V4LINEOFFSET(%esi), %mm3 # low part of line offset + pmulhw V4LINEOFFSET(%esi), %mm5 # high part of line offset + + movq %mm2, %mm7 # copy x coord vector + pxor %mm4, %mm4 + punpcklwd %mm4, %mm2 # low part in %mm2 + punpckhwd %mm4, %mm7 # hight part in %mm7 + + movq %mm3, %mm6 # copy + punpcklwd %mm5, %mm3 # unpack low part in %mm3 + punpckhwd %mm5, %mm6 # high part int %mm6 + + paddd %mm2, %mm3 + paddd %mm7, %mm6 + pslld $1, %mm3 # convert to word adresses + pslld $1, %mm6 + + paddd V2PLANEADDRESS(%esi), %mm3 # add pixel plane address + paddd V2PLANEADDRESS(%esi), %mm6 + + movq %mm3, ADDRESS1(%esi) # store adresses + movq %mm6, ADDRESS3(%esi) + + pcmpeqw %mm2, %mm2 # all ones + movq %mm0, %mm4 # copy x frac + movq %mm1, %mm5 # copy y frac + pxor %mm2, %mm4 # compute compliment (approx negative) + pxor %mm2, %mm5 + + psrlw $1, %mm0 # shift right (0.5 * (frac x) + psrlw $1, %mm1 # shift right (0.5 * (frac y) + psrlw $1, %mm4 # shift right (0.5 * (1 - frac x) + psrlw $1, %mm5 # shift right (0.5 * (1 - frac y) + + movq %mm0, %mm2 # copy of frac x + movq %mm4, %mm3 # copy of (1-frac x) + # fetch data + + #jmp skipfetch # seems the fetch is the real killer. try to optimize this + # using 32 bit accesses & shifts + + # the src image data struct is padded to the cooked data struct + movl RESAMPLEDATASIZE(%esi), %edi + shll $1, %edi + + movl ADDRESS1(%esi), %ecx + movl ADDRESS2(%esi), %edx + + movw (%ecx), %ax + movw (%edx), %bx + movw %ax, TL1(%esi) + movw %bx, TL2(%esi) + movw 2(%ecx), %ax + movw 2(%edx), %bx + movw %ax, TR1(%esi) + movw %bx, TR2(%esi) + + addl %edi, %ecx + addl %edi, %edx + + movw (%ecx), %ax + movw (%edx), %bx + movw %ax, BL1(%esi) + movw %bx, BL2(%esi) + movw 2(%ecx), %ax + movw 2(%edx), %bx + movw %ax, BR1(%esi) + movw %bx, BR2(%esi) + + + movl ADDRESS3(%esi), %ecx + movl ADDRESS4(%esi), %edx + + + movw (%ecx), %ax + movw (%edx), %bx + movw %ax, TL3(%esi) + movw %bx, TL4(%esi) + movw 2(%ecx), %ax + movw 2(%edx), %bx + movw %ax, TR3(%esi) + movw %bx, TR4(%esi) + + addl %edi, %ecx + addl %edi, %edx + + movw (%ecx), %ax + movw (%edx), %bx + movw %ax, BL3(%esi) + movw %bx, BL4(%esi) + movw 2(%ecx), %ax + movw 2(%edx), %bx + movw %ax, BR3(%esi) + movw %bx, BR4(%esi) + + +skipfetch: + pmulhw TL1(%esi), %mm4 # bilin interpolation + pmulhw TR1(%esi), %mm0 + pmulhw BL1(%esi), %mm3 + pmulhw BR1(%esi), %mm2 + + + paddw %mm4, %mm0 + paddw %mm3, %mm2 + + pmulhw %mm5, %mm0 + pmulhw %mm1, %mm2 + + paddw %mm2, %mm0 + psllw $2, %mm0 # compensate for gain reduction + + ret + + + // linear mapping data struct + ROWSTATEX = 0x0 + ROWSTATEY = 0x8 + COLSTATEX = 0x10 + COLSTATEY = 0x18 + ROWINCX = 0x20 + ROWINCY = 0x28 + COLINCX = 0x30 + COLINCY = 0x38 + + // image data struct + LINEOFFSET = 0x0 + IMAGEADDRESS = 0x4 + WIDTH = 0x8 + HEIGHT = 0xC + IMAGEDATASIZE = 0x10 + + + +# pixel_resample_linmap_s16(void *x) +.globl pixel_resample_linmap_s16 +.type pixel_resample_linmap_s16,@function + + SOURCEIMAGE = RESAMPLEDATASIZE + DESTIMAGE = SOURCEIMAGE + IMAGEDATASIZE + LINMAPDATA = DESTIMAGE + IMAGEDATASIZE + +pixel_resample_linmap_s16: + pushl %ebp + movl %esp, %ebp + pushl %esi + pushl %edi + pushl %ebx + + + movl 8(%ebp), %esi # get data struct + movl DESTIMAGE+HEIGHT(%esi), %edx # image height + movl DESTIMAGE+IMAGEADDRESS(%esi), %edi # dest image address + movl DESTIMAGE+WIDTH(%esi), %ecx # image width + shrl $2, %ecx # vector count + .align 16 + +linmap_looprow: + movq LINMAPDATA+ROWSTATEX(%esi), %mm0 # get current coordinates + movq LINMAPDATA+ROWSTATEY(%esi), %mm1 + +linmap_loopcol: + movq %mm0, %mm4 # copy + movq %mm1, %mm5 + paddd LINMAPDATA+ROWINCX(%esi), %mm4 # increment + paddd LINMAPDATA+ROWINCY(%esi), %mm5 + movq %mm4, %mm6 # copy + movq %mm5, %mm7 + paddd LINMAPDATA+ROWINCX(%esi), %mm6 # increment + paddd LINMAPDATA+ROWINCY(%esi), %mm7 + movq %mm6, LINMAPDATA+ROWSTATEX(%esi) # store next state + movq %mm7, LINMAPDATA+ROWSTATEY(%esi) + + psrad $16, %mm0 # round to 16 bit + psrad $16, %mm1 + psrad $16, %mm4 + psrad $16, %mm5 + packssdw %mm4, %mm0 # pack new coordinates + packssdw %mm5, %mm1 + + push %ecx + push %edx + push %edi + + call getpixelsbilin # do interpolation + + pop %edi + pop %edx + pop %ecx + movq %mm0, (%edi) # store 4 pixels + addl $0x8, %edi # point to next 4 pixels + decl %ecx # dec row counter + jnz linmap_looprow + + movq LINMAPDATA+COLSTATEX(%esi), %mm0 # get column state vector + movq LINMAPDATA+COLSTATEY(%esi), %mm1 + movl DESTIMAGE+WIDTH(%esi), %ecx # image width + shrl $2, %ecx # vector count + paddd LINMAPDATA+COLINCX(%esi), %mm0 # increment + paddd LINMAPDATA+COLINCY(%esi), %mm1 + movq %mm0, LINMAPDATA+COLSTATEX(%esi) # store + movq %mm1, LINMAPDATA+COLSTATEY(%esi) + decl %edx # dec column counter + jnz linmap_loopcol + + emms + popl %ebx + popl %edi + popl %esi + leave + ret + + diff --git a/system/pdp.c b/system/pdp.c index 8651971..e3c311b 100644 --- a/system/pdp.c +++ b/system/pdp.c @@ -62,6 +62,10 @@ void pdp_chrot_setup(void); void pdp_scope_setup(void); void pdp_scale_setup(void); void pdp_zoom_setup(void); +void pdp_scan_setup(void); +void pdp_sdl_setup(void); +void pdp_cheby_setup(void); + /* library setup routine */ @@ -107,6 +111,10 @@ void pdp_setup(void){ pdp_scope_setup(); pdp_scale_setup(); pdp_zoom_setup(); + pdp_scan_setup(); + pdp_sdl_setup(); + pdp_cheby_setup(); + } diff --git a/system/pdp_control.c b/system/pdp_control.c index a7ee0c7..1053f6d 100644 --- a/system/pdp_control.c +++ b/system/pdp_control.c @@ -64,11 +64,11 @@ static void pdp_control_thread(t_pdp_control *x, t_floatarg f) int t = (int)f; if (t){ - post("pdp_control: switching on processing in thread"); + post("pdp_control: pdp is now using its own processing thread"); pdp_queue_use_thread(1); } else { - post("pdp_control: switching off processing in thread"); + post("pdp_control: pdp is now using the main pd thread"); pdp_queue_use_thread(0); } } diff --git a/system/pdp_imageproc_mmx.c b/system/pdp_imageproc_mmx.c index 2f32c3f..4c347c6 100644 --- a/system/pdp_imageproc_mmx.c +++ b/system/pdp_imageproc_mmx.c @@ -21,8 +21,10 @@ /* this is a c wrapper around platform specific (mmx) code */ #include +#include #include "pdp_mmx.h" #include "pdp_imageproc.h" +#include "m_pd.h" // utility stuff inline static s16 float2fixed(float f) @@ -317,3 +319,236 @@ void pdp_imageproc_random_process(void *x, s16 *image, u32 width, u32 height) } +/* resampling stuff + this is quite a zoo of data structures + the major point is this: the resampler mmx code is shared for all resampling code + it uses data specified in t_resample_cbrd (Cooked Bilinear Resampler Data) + + then the there are several feeder algorithms. one is the linear mapper. it's + data is specified in t_resample_clrd (Cooked Linear Remapper Data) + + for each feeder algorithm, there are several high level algorithms. like zoom, + rotate, ... +*/ + +typedef struct +{ + u32 lineoffset; + s16 *image; + u32 width; + u32 height; + +} t_resample_id; // Image Data + +/* initialize image meta data (dimensions + location) */ +static void pdp_imageproc_resample_init_id(t_resample_id *x, u32 offset, s16* image, u32 w, u32 h) +{ + x->lineoffset = offset; + x->image = image; + x->width = w; + x->height = h; +} + +// mmx resampling source image resampling data + coefs +typedef struct +{ + // vector data for resampling routine (resampling computation) + u8 reserved[0x60]; //internal data + s16 *address[2]; //64 bit splatted offset address + s16 twowidthm1[4]; //64 bit splatted 2*(width-1) + s16 twoheightm1[4]; //64 bit splatted 2*(height-1) + s16 lineoffset[4]; //64 bit splatted line offset in pixels + +} t_resample_cid; // Cooked Image Data + +/* convert image meta data into a cooked format used by the resampler routine */ +static void pdp_imageproc_resample_init_cid(t_resample_cid *r, t_resample_id *i) +{ + u32 twowm1 = (i->width-1)<<1; + u32 twohm1 = (i->height-1)<<1; + r->address[0] = i->image; + r->address[1] = i->image; + r->twowidthm1[0] = twowm1; + r->twowidthm1[1] = twowm1; + r->twowidthm1[2] = twowm1; + r->twowidthm1[3] = twowm1; + r->twoheightm1[0] = twohm1; + r->twoheightm1[1] = twohm1; + r->twoheightm1[2] = twohm1; + r->twoheightm1[3] = twohm1; + r->lineoffset[0] = i->lineoffset; + r->lineoffset[1] = i->lineoffset; + r->lineoffset[2] = i->lineoffset; + r->lineoffset[3] = i->lineoffset; +} + +// linear mapping data struct (zoom, scale, rotate, shear, ...) +typedef struct +{ + s32 rowstatex[2]; // row state x coord + s32 rowstatey[2]; // row state y coord + s32 colstatex[2]; // column state x coord + s32 colstatey[2]; // column state y coord + s32 rowincx[2]; // row inc vector x coord + s32 rowincy[2]; // row inc vector y coord + s32 colincx[2]; // column inc vector x coord + s32 colincy[2]; // column inc vector y coord +} t_resample_clmd; // Cooked Linear Mapping Data + +/* convert incremental linear remapping vectors to internal cooked format */ +static void pdp_imageproc_resample_cookedlinmap_init(t_resample_clmd *l, s32 sx, s32 sy, s32 rix, s32 riy, s32 cix, s32 ciy) +{ + l->colstatex[0] = l->rowstatex[0] = sx; + l->colstatex[1] = l->rowstatex[1] = sx + rix; + l->colstatey[0] = l->rowstatey[0] = sy; + l->colstatey[1] = l->rowstatey[1] = sy + riy; + l->rowincx[0] = rix << 1; + l->rowincx[1] = rix << 1; + l->rowincy[0] = riy << 1; + l->rowincy[1] = riy << 1; + l->colincx[0] = cix; + l->colincx[1] = cix; + l->colincy[0] = ciy; + l->colincy[1] = ciy; +} + + +/* this struct contains all the data necessary for + bilin interpolation from src -> dst image + (src can be == dst) */ +typedef struct +{ + t_resample_cid csrc; //cooked src image meta data for bilinear interpolator + t_resample_id src; //src image meta + t_resample_id dst; //dst image meta +} t_resample_cbrd; //Bilinear Resampler Data + + +/* this struct contains high level zoom parameters, + all image relative */ +typedef struct +{ + float centerx; + float centery; + float zoomx; + float zoomy; + float angle; +} t_resample_zrd; + + +/* convert floating point center and zoom data to incremental linear remapping vectors */ +static void pdp_imageproc_resample_clmd_init_from_id_zrd(t_resample_clmd *l, t_resample_id *i, t_resample_zrd *z) +{ + double izx = 1.0f / (z->zoomx); + double izy = 1.0f / (z->zoomy); + double scale = (double)0xffffffff; + double scalew = scale / ((double)(i->width - 1)); + double scaleh = scale / ((double)(i->height - 1)); + double cx = ((double)z->centerx) * ((double)(i->width - 1)); + double cy = ((double)z->centery) * ((double)(i->height - 1)); + double angle = z->angle * (-M_PI / 180.0); + double c = cos(angle); + double s = sin(angle); + + /* affine x, y mappings in screen coordinates */ + double mapx(double x, double y){return cx + izx * ( c * (x-cx) + s * (y-cy));} + double mapy(double x, double y){return cy + izy * (-s * (x-cx) + c * (y-cy));} + + u32 tl_x = (u32)(scalew * mapx(0,0)); + u32 tl_y = (u32)(scaleh * mapy(0,0)); + + + u32 row_inc_x = (u32)(scalew * (mapx(1,0)-mapx(0,0))); + u32 row_inc_y = (u32)(scaleh * (mapy(1,0)-mapy(0,0))); + u32 col_inc_x = (u32)(scalew * (mapx(0,1)-mapx(0,0))); + u32 col_inc_y = (u32)(scaleh * (mapy(0,1)-mapy(0,0))); + + + pdp_imageproc_resample_cookedlinmap_init(l, tl_x, tl_y, row_inc_x, row_inc_y, col_inc_x, col_inc_y); +} + +/* this struct contains all data for the zoom object */ +typedef struct +{ + t_resample_cbrd cbrd; // Bilinear Resampler Data + t_resample_clmd clmd; // Cooked Linear Mapping data + t_resample_zrd zrd; // Zoom / Rotate Data +} t_resample_zoom_rotate; + +// zoom + rotate +void *pdp_imageproc_resample_affinemap_new(void) +{ + t_resample_zoom_rotate *z = (t_resample_zoom_rotate *)malloc(sizeof(t_resample_zoom_rotate)); + z->zrd.centerx = 0.5; + z->zrd.centery = 0.5; + z->zrd.zoomx = 1.0; + z->zrd.zoomy = 1.0; + z->zrd.angle = 0.0f; + return (void *)z; +} +void pdp_imageproc_resample_affinemap_delete(void *x){free(x);} +void pdp_imageproc_resample_affinemap_setcenterx(void *x, float f){((t_resample_zoom_rotate *)x)->zrd.centerx = f;} +void pdp_imageproc_resample_affinemap_setcentery(void *x, float f){((t_resample_zoom_rotate *)x)->zrd.centery = f;} +void pdp_imageproc_resample_affinemap_setzoomx(void *x, float f){((t_resample_zoom_rotate *)x)->zrd.zoomx = f;} +void pdp_imageproc_resample_affinemap_setzoomy(void *x, float f){((t_resample_zoom_rotate *)x)->zrd.zoomy = f;} +void pdp_imageproc_resample_affinemap_setangle(void *x, float f){((t_resample_zoom_rotate *)x)->zrd.angle = f;} +void pdp_imageproc_resample_affinemap_process(void *x, s16 *srcimage, s16 *dstimage, u32 width, u32 height) +{ + t_resample_zoom_rotate *z = (t_resample_zoom_rotate *)x; + + /* setup resampler image meta data */ + pdp_imageproc_resample_init_id(&(z->cbrd.src), width, srcimage, width, height); + pdp_imageproc_resample_init_id(&(z->cbrd.dst), width, dstimage, width, height); + pdp_imageproc_resample_init_cid(&(z->cbrd.csrc),&(z->cbrd.src)); + + /* setup linmap data from zoom_rotate parameters */ + pdp_imageproc_resample_clmd_init_from_id_zrd(&(z->clmd), &(z->cbrd.src), &(z->zrd)); + + + /* call assembler routine */ + pixel_resample_linmap_s16(z); +} + + + +// polynomials + + +typedef struct +{ + u32 order; + u8 pad[4]; + s16 coefs[0]; +} t_cheby; + +void *pdp_imageproc_cheby_new(int order) +{ + t_cheby *z; + int i; + if (order < 2) order = 2; + z = (t_cheby *)malloc(sizeof(t_cheby) + (order + 1) * sizeof(s16[4])); + z->order = order; + setvec(z->coefs + 0*4, 0); + setvec(z->coefs + 1*4, 0.25); + for (i=2; i<=order; i++) setvec(z->coefs + i*4, 0); + + return z; +} +void pdp_imageproc_cheby_delete(void *x){free(x);} +void pdp_imageproc_cheby_setcoef(void *x, u32 n, float f) +{ + t_cheby *z = (t_cheby *)x; + if (n <= z->order){ + setvec(z->coefs + n*4, f * 0.25); // coefs are in s2.13 format + } +} +void pdp_imageproc_cheby_process(void *x, s16 *image, u32 width, u32 height, u32 iterations) +{ + t_cheby *z = (t_cheby *)x; + u32 i,j; + for (j=0; j < (height*width); j += width) + for (i=0; i>2, z->order+1, z->coefs); + + //pixel_cheby_s16_3plus(image, (width*height)>>2, z->order+1, z->coefs); +} diff --git a/system/pdp_imageproc_portable.c b/system/pdp_imageproc_portable.c index 60062d6..6feddd3 100644 --- a/system/pdp_imageproc_portable.c +++ b/system/pdp_imageproc_portable.c @@ -21,6 +21,7 @@ #include +#include #include "pdp_imageproc.h" // utility stuff @@ -490,3 +491,173 @@ void pdp_imageproc_random_process(void *x, s16 *image, u32 width, u32 height) } + + +/* resampling code */ +// zoom + rotate + +/* bilinear resampling core routine */ +/* virtual coordinates are the lowest 16 bits in virt_x and virt_y*/ +static inline s32 pdp_resample_bilin(s16 *image, s32 width, s32 height, s32 virt_x, s32 virt_y) +{ + + s32 fp_x, fp_y, frac_x, frac_y, f, offset, r_1, r_2; + + //virt_x &= 0xffff; + //virt_y &= 0xffff; + + fp_x = virt_x * (width - 1); + fp_y = virt_y * (height - 1); + + frac_x = fp_x & (0xffff); + frac_y = fp_y & (0xffff); + + offset = (fp_x >> 16) + (fp_y >> 16) * width; + image += offset; + + f = 0x10000 - frac_x; + + r_1 = ((f * (s32)(image[0]) + frac_x * (s32)(image[1])))>>16; + + image += width; + + r_2 = ((f * (s32)(image[0]) + frac_x * (s32)(image[1])))>>16; + + f = 0x10000 - frac_y; + + return ((f * r_1 + frac_y * r_2)>>16); + +} + +typedef struct +{ + float centerx; + float centery; + float zoomx; + float zoomy; + float angle; +} t_affine_map; + + +void *pdp_imageproc_resample_affinemap_new(void) +{ + + t_affine_map *a = (t_affine_map *)malloc(sizeof(t_affine_map)); + a->centerx = 0.5; + a->centery = 0.5; + a->zoomx = 1.0; + a->zoomy = 1.0; + a->angle = 0.0f; + return (void *)a; +} +void pdp_imageproc_resample_affinemap_delete(void *x){free(x);} +void pdp_imageproc_resample_affinemap_setcenterx(void *x, float f){((t_affine_map *)x)->centerx = f;} +void pdp_imageproc_resample_affinemap_setcentery(void *x, float f){((t_affine_map *)x)->centery = f;} +void pdp_imageproc_resample_affinemap_setzoomx(void *x, float f){((t_affine_map *)x)->zoomx = f;} +void pdp_imageproc_resample_affinemap_setzoomy(void *x, float f){((t_affine_map *)x)->zoomy = f;} +void pdp_imageproc_resample_affinemap_setangle(void *x, float f){((t_affine_map *)x)->angle = f;} +void pdp_imageproc_resample_affinemap_process(void *x, s16 *src_image, s16 *dst_image, u32 width, u32 height) +{ + t_affine_map *a = (t_affine_map *)x; + double izx = 1.0f / (a->zoomx); + double izy = 1.0f / (a->zoomy); + double scale = (double)0xffffffff; + double scalew = scale / ((double)(width - 1)); + double scaleh = scale / ((double)(height - 1)); + double cx = ((double)a->centerx) * ((double)(width - 1)); + double cy = ((double)a->centery) * ((double)(height - 1)); + double angle = a->angle * (-M_PI / 180.0); + double c = cos(angle); + double s = sin(angle); + + /* affine x, y mappings in screen coordinates */ + double mapx(double x, double y){return cx + izx * ( c * (x-cx) + s * (y-cy));} + double mapy(double x, double y){return cy + izy * (-s * (x-cx) + c * (y-cy));} + + u32 colstate_x = (u32)(scalew * mapx(0,0)); + u32 colstate_y = (u32)(scaleh * mapy(0,0)); + u32 rowstate_x = colstate_x; + u32 rowstate_y = colstate_y; + + u32 row_inc_x = (u32)(scalew * (mapx(1,0)-mapx(0,0))); + u32 row_inc_y = (u32)(scaleh * (mapy(1,0)-mapy(0,0))); + u32 col_inc_x = (u32)(scalew * (mapx(0,1)-mapx(0,0))); + u32 col_inc_y = (u32)(scaleh * (mapy(0,1)-mapy(0,0))); + + u32 i,j; + + for (j=0; j>16, rowstate_y>>16); + rowstate_x += row_inc_x; + rowstate_y += row_inc_y; + } + colstate_x += col_inc_x; + colstate_y += col_inc_y; + rowstate_x = colstate_x; + rowstate_y = colstate_y; + } + +} + + + + + +// polynomials + + + + +typedef struct +{ + u32 order; + s32 coefs[0]; +} t_cheby; + +void *pdp_imageproc_cheby_new(int order) +{ + t_cheby *z; + int i; + if (order < 2) order = 2; + z = (t_cheby *)malloc(sizeof(t_cheby) + (order + 1) * sizeof(s32)); + z->order = order; + z->coefs[0] = 0; + z->coefs[1] = 0x7fff; + for (i=2; i<=order; i++) z->coefs[i] = 0; + return z; +} +void pdp_imageproc_cheby_delete(void *x){free(x);} +void pdp_imageproc_cheby_setcoef(void *x, u32 n, float f) +{ + + t_cheby *z = (t_cheby *)x; + if (n <= z->order){ + z->coefs[n] = (s32)(f * 32767.0f); // coefs are in s16.15 format + } + +} +void pdp_imageproc_cheby_process(void *x, s16 *image, u32 width, u32 height, u32 iterations) +{ + + t_cheby *z = (t_cheby *)x; + u32 i,j,k; + s32 *c = z->coefs; + for (j=0; j < (height*width); j++){ + s32 acc = (s32)image[j]; + for (i=0; i>15); + for (k=2; k<=z->order; k++){ + t = ((T1*in)>>14) - T2; /* T_n = 2 x T_n-1 - T_n-2 */ + T2 = T1; + T1 = t; + acc += ((c[k] * t)>>15); + } + } + image[j] = (s16)(CLAMP16(acc)); + } +} diff --git a/system/pdp_queue.c b/system/pdp_queue.c index 2932728..fe3748e 100644 --- a/system/pdp_queue.c +++ b/system/pdp_queue.c @@ -297,7 +297,7 @@ void pdp_queue_setup(void) curr = 0; q = getbytes(PDP_QUEUE_SIZE * sizeof(*q)); - /* use threads by default */ + /* enable threads */ use_thread = 1; /* setup synchro stuff */ @@ -324,6 +324,9 @@ void pdp_queue_setup(void) + /* set default disable/enable thread here */ + pdp_queue_use_thread(0); + } diff --git a/system/pdp_resample.c b/system/pdp_resample.c index 2b5a9de..12bc639 100644 --- a/system/pdp_resample.c +++ b/system/pdp_resample.c @@ -31,7 +31,10 @@ i.e. 16 bit virtual coordinates: easy modular addressing */ -s32 pdp_resample_bilin(s16 *image, s32 width, s32 height, s32 virt_x, s32 virt_y) + +/* code in this file should go out to be replaced by code in pdp_imageproc */ + +static s32 pdp_resample_bilin(s16 *image, s32 width, s32 height, s32 virt_x, s32 virt_y) { s32 fp_x, fp_y, frac_x, frac_y, f, offset, r_1, r_2; @@ -106,6 +109,7 @@ void pdp_resample_scale_nn(s16 *src_image, s16 *dst_image, s32 src_w, s32 src_h, } +/* USE pdp_resample_affinemap void pdp_resample_zoom_tiled_bilin(s16 *src_image, s16 *dst_image, s32 w, s32 h, float zoom_x, float zoom_y, float center_x_relative, float center_y_relative) { @@ -132,4 +136,4 @@ void pdp_resample_zoom_tiled_bilin(s16 *src_image, s16 *dst_image, s32 w, s32 h, } } - +*/ diff --git a/test/pdp_abstractions.pd b/test/pdp_abstractions.pd deleted file mode 100644 index 27a5d48..0000000 --- a/test/pdp_abstractions.pd +++ /dev/null @@ -1,22 +0,0 @@ -#N canvas 606 93 450 300 10; -#X obj 68 71 pdp_v4l; -#X obj 69 163 pdp_xv; -#X obj 71 11 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X msg 184 13 stop; -#X obj 143 44 metro 20; -#X msg 133 13 bang; -#X floatatom 189 103 5 0 0; -#X floatatom 243 102 5 0 0; -#X msg 17 47 type grey; -#X obj 388 25 vsl 15 128 -1 1 0 0 empty empty empty 0 -8 0 8 -262144 --1 -1 4500 1; -#X obj 69 125 pdp_phase_hor; -#X connect 0 0 10 0; -#X connect 2 0 0 0; -#X connect 3 0 4 0; -#X connect 4 0 0 0; -#X connect 5 0 4 0; -#X connect 8 0 0 0; -#X connect 9 0 10 1; -#X connect 10 0 1 0; diff --git a/test/test_oscil.pd b/test/test_oscil.pd deleted file mode 100644 index 4455732..0000000 --- a/test/test_oscil.pd +++ /dev/null @@ -1,69 +0,0 @@ -#N canvas 144 73 626 492 10; -#X obj 86 75 pdp_v4l; -#X obj 69 268 pdp_xv; -#X obj 186 40 metro 40; -#X obj 185 13 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 85 24 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X msg 258 148 1; -#X obj 296 180 hsl 128 15 -1 1 0 1 empty empty empty -2 -6 0 8 -262144 --1 -1 12700 1; -#X obj 240 229 pdp_mix2; -#X obj 302 203 hsl 128 15 -1 1 0 1 empty empty empty -2 -6 0 8 -262144 --1 -1 800 1; -#X floatatom 146 237 5 0 0; -#X floatatom 236 122 5 0 0; -#X obj 211 177 pdp_del 50; -#X obj 257 261 pdp_conv; -#X msg 290 34 dim 160 120; -#X floatatom 310 229 5 0 0; -#X floatatom 177 107 5 0 0; -#X obj 194 81 hsl 128 15 0 1 0 1 empty empty empty -2 -6 0 8 -262144 --1 -1 10800 1; -#X msg 211 10 stop; -#X obj 126 140 pdp_randmix; -#X obj 312 289 hsl 128 15 -1 1 0 1 empty empty empty -2 -6 0 8 -262144 --1 -1 12700 1; -#X obj 318 312 hsl 128 15 -1 1 0 1 empty empty empty -2 -6 0 8 -262144 --1 -1 800 1; -#X obj 319 343 hsl 128 15 -1 1 0 1 empty empty empty -2 -6 0 8 -262144 --1 -1 12700 1; -#X obj 325 366 hsl 128 15 -1 1 0 1 empty empty empty -2 -6 0 8 -262144 --1 -1 800 1; -#X obj 219 421 pdp_affine; -#X obj 328 394 hsl 128 15 -1 1 0 1 empty empty empty -2 -6 0 8 -262144 --1 -1 12700 1; -#X obj 334 417 hsl 128 15 -1 1 0 1 empty empty empty -2 -6 0 8 -262144 --1 -1 800 1; -#X obj 217 325 pdp_affine 1; -#X obj 217 368 pdp_affine 2; -#X connect 0 0 18 0; -#X connect 2 0 0 0; -#X connect 3 0 2 0; -#X connect 4 0 0 0; -#X connect 5 0 11 1; -#X connect 6 0 7 2; -#X connect 7 0 12 0; -#X connect 7 0 18 1; -#X connect 8 0 7 3; -#X connect 9 0 1 1; -#X connect 10 0 11 1; -#X connect 11 0 7 1; -#X connect 12 0 11 0; -#X connect 12 0 26 0; -#X connect 13 0 0 0; -#X connect 14 0 12 1; -#X connect 15 0 18 2; -#X connect 16 0 15 0; -#X connect 17 0 2 0; -#X connect 18 0 7 0; -#X connect 19 0 26 1; -#X connect 20 0 26 2; -#X connect 21 0 27 1; -#X connect 22 0 27 2; -#X connect 23 0 1 0; -#X connect 24 0 23 1; -#X connect 25 0 23 2; -#X connect 26 0 27 0; -#X connect 27 0 23 0; diff --git a/test/test_pdp_add.pd b/test/test_pdp_add.pd deleted file mode 100644 index e44df2d..0000000 --- a/test/test_pdp_add.pd +++ /dev/null @@ -1,96 +0,0 @@ -#N canvas 180 63 814 601 10; -#X obj 152 101 pdp_qt; -#X msg 173 63 bang; -#X floatatom 92 60 5 0 0; -#X msg 258 62 open /home/ben/MOV/test1.mov; -#X obj 164 8 i 0; -#X obj 220 19 + 1; -#X obj 303 24 metro 40; -#X obj 300 -1 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1 --1; -#X msg 63 29 0; -#X msg 102 31 9999; -#X msg 63 131 loop \$1; -#X obj 59 105 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 0 1 -; -#X floatatom 178 136 5 0 0; -#X floatatom 235 137 5 0 0; -#X obj 413 229 pdp_qt; -#X msg 446 190 bang; -#X floatatom 365 187 5 0 0; -#X msg 531 189 open /home/ben/MOV/test1.mov; -#X obj 437 135 i 0; -#X obj 493 146 + 1; -#X obj 576 151 metro 40; -#X obj 573 126 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1 --1; -#X msg 336 156 0; -#X msg 375 158 9999; -#X msg 336 258 loop \$1; -#X obj 332 232 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 0 -1; -#X floatatom 451 263 5 0 0; -#X floatatom 508 264 5 0 0; -#X floatatom 383 3 5 0 0; -#X floatatom 634 128 5 0 0; -#X msg 327 106 0; -#X obj 181 222 pdp_add; -#X obj 196 550 pdp_xv; -#X obj 76 200 print p1; -#X obj 411 286 print p2; -#X obj 180 301 print p; -#X obj 201 453 pdp_v4l; -#X obj 176 399 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 261 381 metro 40; -#X obj 263 352 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X floatatom 244 480 5 0 0; -#X obj 332 546 pdp_del 8; -#X floatatom 305 479 5 0 0; -#X obj 191 519 pdp_affine; -#X connect 0 0 31 0; -#X connect 0 0 33 0; -#X connect 0 1 12 0; -#X connect 0 2 13 0; -#X connect 1 0 0 0; -#X connect 2 0 0 0; -#X connect 3 0 0 0; -#X connect 4 0 5 0; -#X connect 4 0 1 0; -#X connect 5 0 4 1; -#X connect 6 0 0 0; -#X connect 7 0 6 0; -#X connect 8 0 2 0; -#X connect 9 0 2 0; -#X connect 10 0 0 0; -#X connect 11 0 10 0; -#X connect 14 0 31 1; -#X connect 14 0 34 0; -#X connect 14 1 26 0; -#X connect 14 2 27 0; -#X connect 15 0 14 0; -#X connect 16 0 14 0; -#X connect 17 0 14 0; -#X connect 18 0 19 0; -#X connect 18 0 15 0; -#X connect 19 0 18 1; -#X connect 20 0 14 0; -#X connect 21 0 20 0; -#X connect 22 0 16 0; -#X connect 23 0 16 0; -#X connect 24 0 14 0; -#X connect 25 0 24 0; -#X connect 28 0 6 1; -#X connect 29 0 20 1; -#X connect 30 0 22 0; -#X connect 30 0 8 0; -#X connect 31 0 35 0; -#X connect 36 0 41 0; -#X connect 36 0 43 0; -#X connect 37 0 36 0; -#X connect 38 0 36 0; -#X connect 39 0 38 0; -#X connect 40 0 43 2; -#X connect 42 0 43 1; -#X connect 43 0 32 0; diff --git a/test/test_pdp_affine.pd b/test/test_pdp_affine.pd deleted file mode 100644 index 3e4afc9..0000000 --- a/test/test_pdp_affine.pd +++ /dev/null @@ -1,80 +0,0 @@ -#N canvas 278 50 629 562 10; -#X obj 130 454 pdp_xv; -#X obj 265 42 metro 40; -#X obj 262 17 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1 --1; -#X floatatom 309 9 5 0 0; -#X obj 115 119 pdp_v4l; -#X msg 220 80 open /dev/video0; -#X msg 83 57 close; -#X obj 142 56 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X msg 233 127 dim 160 120; -#X msg 238 162 dim 320 240; -#X floatatom 177 418 5 0 0; -#X msg 350 123 dim 640 480; -#X obj 264 341 hsl 128 15 -1 1 0 0 empty empty empty -2 -6 0 8 -262144 --1 -1 6350 1; -#X obj 404 340 hsl 128 15 -1 1 0 0 empty empty empty -2 -6 0 8 -262144 --1 -1 7750 1; -#X obj 265 365 hsl 128 15 -1 1 0 0 empty empty empty -2 -6 0 8 -262144 --1 -1 6350 1; -#X obj 405 364 hsl 128 15 -1 1 0 0 empty empty empty -2 -6 0 8 -262144 --1 -1 2650 1; -#X obj 263 316 hsl 128 15 -1 1 0 0 empty empty empty -2 -6 0 8 -262144 --1 -1 12700 1; -#X obj 403 315 hsl 128 15 -1 1 0 0 empty empty empty -2 -6 0 8 -262144 --1 -1 5250 1; -#X obj 136 332 pdp_affine 1; -#X obj 137 357 pdp_affine 2; -#X obj 138 381 pdp_affine 3; -#X msg 260 278 1; -#X msg 399 275 0; -#X msg 236 409 1; -#X obj 415 223 sin; -#X obj 448 223 cos; -#X obj 346 192 f 0; -#X obj 346 223 +; -#X floatatom 382 188 5 0 0; -#X obj 463 259 *; -#X obj 427 258 *; -#X floatatom 496 230 5 0 0; -#X connect 1 0 7 0; -#X connect 1 0 26 0; -#X connect 2 0 1 0; -#X connect 3 0 1 1; -#X connect 4 0 18 0; -#X connect 5 0 4 0; -#X connect 6 0 4 0; -#X connect 7 0 4 0; -#X connect 8 0 4 0; -#X connect 9 0 4 0; -#X connect 10 0 0 1; -#X connect 11 0 4 0; -#X connect 12 0 19 1; -#X connect 13 0 19 2; -#X connect 14 0 20 1; -#X connect 15 0 20 2; -#X connect 16 0 18 1; -#X connect 17 0 18 2; -#X connect 18 0 19 0; -#X connect 19 0 20 0; -#X connect 20 0 0 0; -#X connect 21 0 16 0; -#X connect 21 0 12 0; -#X connect 21 0 14 0; -#X connect 22 0 17 0; -#X connect 22 0 13 0; -#X connect 22 0 15 0; -#X connect 23 0 10 0; -#X connect 24 0 30 0; -#X connect 25 0 29 0; -#X connect 26 0 27 0; -#X connect 27 0 26 1; -#X connect 27 0 24 0; -#X connect 27 0 25 0; -#X connect 28 0 27 1; -#X connect 29 0 14 0; -#X connect 30 0 12 0; -#X connect 31 0 29 1; -#X connect 31 0 30 1; diff --git a/test/test_pdp_bq.pd b/test/test_pdp_bq.pd deleted file mode 100644 index c7b48d4..0000000 --- a/test/test_pdp_bq.pd +++ /dev/null @@ -1,136 +0,0 @@ -#N canvas 8 69 765 701 10; -#X obj 128 85 pdp_v4l; -#X obj 127 53 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X msg 178 30 stop; -#X msg 216 29 bang; -#X msg 291 64 dim 160 120; -#X msg 289 29 dim 32 32; -#X msg 283 5 dim 80 60; -#X msg 313 94 dim 320 240; -#X msg 334 117 dim 768 576; -#X floatatom 222 3 5 0 0; -#X msg 253 144 dim 640 240; -#X msg 364 45 dim 640 480; -#X msg 32 38 type grey; -#X msg 31 14 type yv12; -#X floatatom 193 228 5 0 0; -#X msg 36 218 ver \$1; -#X msg 91 219 hor \$1; -#X obj 38 193 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 -; -#X obj 95 192 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 -; -#X obj 168 319 pdp_bq; -#X floatatom 243 346 5 0 0; -#X floatatom 130 10 5 0 0; -#X obj 196 58 metro 5; -#X floatatom 313 209 5 0 0; -#X msg 312 233 onep \$1; -#X obj 318 178 hsl 128 15 0.01 1 1 1 empty empty empty -2 -6 0 8 -262144 --1 -1 4900 1; -#X floatatom 389 244 5 0 0; -#X obj 394 213 hsl 128 15 0.03 1 1 1 empty empty empty -2 -6 0 8 -262144 --1 -1 9400 1; -#X msg 388 267 twop \$1; -#X floatatom 203 155 5 0 0; -#X msg 18 303 u1 \$1; -#X msg 20 334 u2 \$1; -#X floatatom 51 273 5 0 0; -#X floatatom 90 306 5 0 0; -#X obj 44 156 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 -; -#X obj 102 154 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; -#X obj 30 100 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 -; -#X obj 87 99 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 -; -#X msg 28 125 lr \$1; -#X msg 83 126 rl \$1; -#X msg 32 172 tb \$1; -#X msg 87 173 bt \$1; -#X obj 461 368 hsl 128 15 0.05 0.5 1 1 empty empty empty -2 -6 0 8 --262144 -1 -1 0 1; -#X obj 537 403 hsl 128 15 0.1 10 1 1 empty empty empty -2 -6 0 8 -262144 --1 -1 5200 1; -#X obj 490 477 t b f; -#X floatatom 556 438 5 0 0; -#X floatatom 393 426 5 0 0; -#X obj 495 529 pack s 0 0; -#X msg 492 562 \$1 \$2 \$3; -#X obj 548 482 t b f; -#X msg 402 505 lpf; -#X msg 402 484 hpf; -#X msg 400 533 apf; -#X msg 397 566 bsf; -#X obj 157 181 pdp_mix; -#X obj 545 98 random 2; -#X obj 610 98 random 2; -#X obj 548 61 pdp_trigger; -#X obj 543 135 random 2; -#X obj 608 135 random 2; -#X connect 0 0 54 0; -#X connect 0 0 57 0; -#X connect 1 0 0 0; -#X connect 2 0 22 0; -#X connect 3 0 22 0; -#X connect 4 0 0 0; -#X connect 5 0 0 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X connect 8 0 0 0; -#X connect 9 0 22 1; -#X connect 10 0 0 0; -#X connect 11 0 0 0; -#X connect 12 0 0 0; -#X connect 13 0 0 0; -#X connect 14 0 19 1; -#X connect 15 0 19 0; -#X connect 16 0 19 0; -#X connect 17 0 15 0; -#X connect 18 0 16 0; -#X connect 19 0 54 1; -#X connect 22 0 0 0; -#X connect 23 0 24 0; -#X connect 24 0 19 0; -#X connect 25 0 23 0; -#X connect 26 0 28 0; -#X connect 27 0 26 0; -#X connect 28 0 19 0; -#X connect 29 0 54 2; -#X connect 30 0 19 0; -#X connect 31 0 19 0; -#X connect 32 0 30 0; -#X connect 33 0 31 0; -#X connect 34 0 40 0; -#X connect 35 0 41 0; -#X connect 36 0 38 0; -#X connect 37 0 39 0; -#X connect 38 0 19 0; -#X connect 39 0 19 0; -#X connect 40 0 19 0; -#X connect 41 0 19 0; -#X connect 42 0 46 0; -#X connect 43 0 45 0; -#X connect 44 0 47 0; -#X connect 44 1 47 1; -#X connect 45 0 49 0; -#X connect 46 0 44 0; -#X connect 47 0 48 0; -#X connect 48 0 19 0; -#X connect 49 0 47 0; -#X connect 49 1 47 2; -#X connect 50 0 47 0; -#X connect 51 0 47 0; -#X connect 52 0 47 0; -#X connect 53 0 47 0; -#X connect 54 0 19 0; -#X connect 55 0 36 0; -#X connect 56 0 37 0; -#X connect 57 0 55 0; -#X connect 57 0 56 0; -#X connect 57 0 58 0; -#X connect 57 0 59 0; -#X connect 58 0 34 0; -#X connect 59 0 35 0; diff --git a/test/test_pdp_bq2.pd b/test/test_pdp_bq2.pd deleted file mode 100644 index a13b11b..0000000 --- a/test/test_pdp_bq2.pd +++ /dev/null @@ -1,146 +0,0 @@ -#N canvas 116 11 765 631 10; -#X obj 128 85 pdp_v4l; -#X obj 127 53 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X msg 178 30 stop; -#X msg 216 29 bang; -#X msg 291 64 dim 160 120; -#X msg 289 29 dim 32 32; -#X msg 283 5 dim 80 60; -#X msg 313 94 dim 320 240; -#X msg 334 117 dim 768 576; -#X floatatom 222 3 5 0 0; -#X msg 253 144 dim 640 240; -#X msg 364 45 dim 640 480; -#X obj 90 507 pdp_xv; -#X msg 32 38 type grey; -#X msg 31 14 type yv12; -#X floatatom 193 228 5 0 0; -#X msg 36 218 ver \$1; -#X msg 91 219 hor \$1; -#X obj 38 193 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 -; -#X obj 95 192 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 -; -#X obj 168 319 pdp_bq; -#X floatatom 243 346 5 0 0; -#X floatatom 130 10 5 0 0; -#X obj 196 58 metro 5; -#X floatatom 313 209 5 0 0; -#X msg 312 233 onep \$1; -#X obj 318 178 hsl 128 15 0.01 1 1 1 empty empty empty -2 -6 0 8 -262144 --1 -1 2800 1; -#X floatatom 389 244 5 0 0; -#X obj 394 213 hsl 128 15 0.03 1 1 1 empty empty empty -2 -6 0 8 -262144 --1 -1 6900 1; -#X msg 388 267 twop \$1; -#X floatatom 203 155 5 0 0; -#X msg 18 303 u1 \$1; -#X msg 20 334 u2 \$1; -#X floatatom 51 273 5 0 0; -#X floatatom 90 306 5 0 0; -#X obj 44 156 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 -; -#X obj 102 154 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 -1; -#X obj 30 100 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 -; -#X obj 87 99 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 -; -#X msg 28 125 lr \$1; -#X msg 83 126 rl \$1; -#X msg 32 172 tb \$1; -#X msg 87 173 bt \$1; -#X obj 461 368 hsl 128 15 0.05 0.5 1 1 empty empty empty -2 -6 0 8 --262144 -1 -1 2400 1; -#X obj 537 403 hsl 128 15 0.1 10 1 1 empty empty empty -2 -6 0 8 -262144 --1 -1 2700 1; -#X obj 490 477 t b f; -#X floatatom 556 438 5 0 0; -#X floatatom 393 426 5 0 0; -#X obj 495 529 pack s 0 0; -#X msg 492 562 \$1 \$2 \$3; -#X obj 548 482 t b f; -#X msg 402 505 lpf; -#X msg 402 484 hpf; -#X msg 400 533 apf; -#X msg 397 566 bsf; -#X obj 157 181 pdp_mix; -#X obj 545 98 random 2; -#X obj 610 98 random 2; -#X obj 548 61 pdp_trigger; -#X obj 543 135 random 2; -#X obj 608 135 random 2; -#X obj 155 128 pdp_reg; -#X msg 201 511 create :0; -#X msg 204 475 close; -#X connect 0 0 58 0; -#X connect 0 0 61 0; -#X connect 1 0 0 0; -#X connect 2 0 23 0; -#X connect 3 0 23 0; -#X connect 4 0 0 0; -#X connect 5 0 0 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X connect 8 0 0 0; -#X connect 9 0 23 1; -#X connect 10 0 0 0; -#X connect 11 0 0 0; -#X connect 13 0 0 0; -#X connect 14 0 0 0; -#X connect 15 0 20 1; -#X connect 16 0 20 0; -#X connect 17 0 20 0; -#X connect 18 0 16 0; -#X connect 19 0 17 0; -#X connect 20 0 55 1; -#X connect 20 0 12 0; -#X connect 21 0 12 1; -#X connect 22 0 0 1; -#X connect 23 0 0 0; -#X connect 24 0 25 0; -#X connect 25 0 20 0; -#X connect 26 0 24 0; -#X connect 27 0 29 0; -#X connect 28 0 27 0; -#X connect 29 0 20 0; -#X connect 30 0 55 2; -#X connect 31 0 20 0; -#X connect 32 0 20 0; -#X connect 33 0 31 0; -#X connect 34 0 32 0; -#X connect 35 0 41 0; -#X connect 36 0 42 0; -#X connect 37 0 39 0; -#X connect 38 0 40 0; -#X connect 39 0 20 0; -#X connect 40 0 20 0; -#X connect 41 0 20 0; -#X connect 42 0 20 0; -#X connect 43 0 47 0; -#X connect 44 0 46 0; -#X connect 45 0 48 0; -#X connect 45 1 48 1; -#X connect 46 0 50 0; -#X connect 47 0 45 0; -#X connect 48 0 49 0; -#X connect 49 0 20 0; -#X connect 50 0 48 0; -#X connect 50 1 48 2; -#X connect 51 0 48 0; -#X connect 52 0 48 0; -#X connect 53 0 48 0; -#X connect 54 0 48 0; -#X connect 55 0 20 0; -#X connect 56 0 37 0; -#X connect 57 0 38 0; -#X connect 58 0 56 0; -#X connect 58 0 57 0; -#X connect 58 0 59 0; -#X connect 58 0 60 0; -#X connect 59 0 35 0; -#X connect 60 0 36 0; -#X connect 61 0 55 0; -#X connect 62 0 12 0; -#X connect 63 0 12 0; diff --git a/test/test_pdp_bqt.pd b/test/test_pdp_bqt.pd deleted file mode 100644 index b52edf1..0000000 --- a/test/test_pdp_bqt.pd +++ /dev/null @@ -1,91 +0,0 @@ -#N canvas 28 181 765 631 10; -#X obj 128 85 pdp_v4l; -#X obj 127 53 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X msg 178 30 stop; -#X msg 216 29 bang; -#X msg 291 64 dim 160 120; -#X msg 289 29 dim 32 32; -#X msg 283 5 dim 80 60; -#X msg 313 94 dim 320 240; -#X msg 334 117 dim 768 576; -#X floatatom 222 3 5 0 0; -#X msg 253 144 dim 640 240; -#X msg 364 45 dim 640 480; -#X obj 90 507 pdp_xv; -#X msg 32 38 type grey; -#X msg 31 14 type yv12; -#X floatatom 141 464 5 0 0; -#X floatatom 130 10 5 0 0; -#X obj 196 58 metro 5; -#X floatatom 313 209 5 0 0; -#X msg 312 233 onep \$1; -#X obj 318 178 hsl 128 15 0.01 1 1 1 empty empty empty -2 -6 0 8 -262144 --1 -1 4900 1; -#X floatatom 389 244 5 0 0; -#X obj 394 213 hsl 128 15 0.03 1 1 1 empty empty empty -2 -6 0 8 -262144 --1 -1 9400 1; -#X msg 388 267 twop \$1; -#X msg 18 303 u1 \$1; -#X msg 20 334 u2 \$1; -#X floatatom 51 273 5 0 0; -#X floatatom 90 306 5 0 0; -#X obj 461 368 hsl 128 15 0.001 0.5 1 1 empty empty empty -2 -6 0 8 --262144 -1 -1 100 1; -#X obj 537 403 hsl 128 15 0.1 10 1 1 empty empty empty -2 -6 0 8 -262144 --1 -1 9800 1; -#X obj 490 477 t b f; -#X floatatom 556 438 5 0 0; -#X floatatom 393 426 5 0 0; -#X obj 495 529 pack s 0 0; -#X msg 492 562 \$1 \$2 \$3; -#X obj 548 482 t b f; -#X msg 402 505 lpf; -#X msg 402 484 hpf; -#X msg 400 533 apf; -#X msg 397 566 bsf; -#X obj 168 319 pdp_bqt; -#X msg 171 237 reset; -#X connect 0 0 40 0; -#X connect 1 0 0 0; -#X connect 2 0 17 0; -#X connect 3 0 17 0; -#X connect 4 0 0 0; -#X connect 5 0 0 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X connect 8 0 0 0; -#X connect 9 0 17 1; -#X connect 10 0 0 0; -#X connect 11 0 0 0; -#X connect 13 0 0 0; -#X connect 14 0 0 0; -#X connect 15 0 12 1; -#X connect 16 0 0 1; -#X connect 17 0 0 0; -#X connect 18 0 19 0; -#X connect 19 0 40 0; -#X connect 20 0 18 0; -#X connect 21 0 23 0; -#X connect 22 0 21 0; -#X connect 23 0 40 0; -#X connect 24 0 40 0; -#X connect 25 0 40 0; -#X connect 26 0 24 0; -#X connect 27 0 25 0; -#X connect 28 0 32 0; -#X connect 29 0 31 0; -#X connect 30 0 33 0; -#X connect 30 1 33 1; -#X connect 31 0 35 0; -#X connect 32 0 30 0; -#X connect 33 0 34 0; -#X connect 34 0 40 0; -#X connect 35 0 33 0; -#X connect 35 1 33 2; -#X connect 36 0 33 0; -#X connect 37 0 33 0; -#X connect 38 0 33 0; -#X connect 39 0 33 0; -#X connect 40 0 12 0; -#X connect 41 0 40 0; diff --git a/test/test_pdp_chrot.pd b/test/test_pdp_chrot.pd deleted file mode 100644 index 308b21e..0000000 --- a/test/test_pdp_chrot.pd +++ /dev/null @@ -1,32 +0,0 @@ -#N canvas 7 0 629 658 10; -#X obj 169 525 pdp_xv; -#X obj 265 42 metro 40; -#X obj 262 17 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1 --1; -#X floatatom 309 9 5 0 0; -#X obj 158 156 pdp_v4l; -#X msg 83 57 close; -#X obj 142 56 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 119 430 pdp_add; -#X obj 156 305 pdp_gain; -#X msg 266 272 y \$1; -#X msg 315 272 v \$1; -#X msg 363 271 u \$1; -#X floatatom 265 235 5 0 0; -#X floatatom 315 235 5 0 0; -#X floatatom 367 235 5 0 0; -#X connect 1 0 6 0; -#X connect 2 0 1 0; -#X connect 3 0 1 1; -#X connect 4 0 8 0; -#X connect 5 0 4 0; -#X connect 6 0 4 0; -#X connect 7 0 0 0; -#X connect 8 0 7 0; -#X connect 9 0 8 0; -#X connect 10 0 8 0; -#X connect 11 0 8 0; -#X connect 12 0 9 0; -#X connect 13 0 10 0; -#X connect 14 0 11 0; diff --git a/test/test_pdp_conv.pd b/test/test_pdp_conv.pd deleted file mode 100644 index 2de317a..0000000 --- a/test/test_pdp_conv.pd +++ /dev/null @@ -1,115 +0,0 @@ -#N canvas 255 202 713 686 10; -#X obj 152 101 pdp_qt; -#X msg 173 63 bang; -#X floatatom 92 60 5 0 0; -#X msg 258 62 open /home/ben/MOV/test1.mov; -#X obj 164 8 i 0; -#X obj 220 19 + 1; -#X obj 303 24 metro 40; -#X obj 300 -1 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1 --1; -#X msg 63 29 0; -#X msg 102 31 9999; -#X msg 63 131 loop \$1; -#X obj 59 105 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 0 1 -; -#X floatatom 178 136 5 0 0; -#X floatatom 235 137 5 0 0; -#X floatatom 383 3 5 0 0; -#X obj 179 488 pdp_xv; -#X obj 263 331 pdp_conv; -#X msg 348 92 open /home/ben/MOV/neuskoter90.mov; -#X obj 267 206 pdp_mix; -#X floatatom 313 174 5 0 0; -#X floatatom 234 454 5 0 0; -#X msg 530 54 open \$1; -#X obj 526 28 openpanel; -#X obj 520 8 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1 --1; -#X obj 408 164 * -1; -#X obj 406 192 + 1; -#X obj 405 137 hsl 128 15 1e-04 1 1 0 empty empty empty 20 8 0 8 -262144 --1 -1 0 1; -#X floatatom 317 299 5 0 0; -#X msg 119 257 hor \$1; -#X msg 173 257 ver \$1; -#X obj 123 231 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 0 -1; -#X obj 176 228 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 0 -1; -#X obj 212 395 pdp_mix; -#X obj 463 283 pack 0 0; -#X obj 485 253 t b f; -#X floatatom 462 222 5 0 0; -#X floatatom 511 223 5 0 0; -#X msg 462 310 mix2 \$1 \$2; -#X obj 357 417 pdp_xv; -#X floatatom 399 387 5 0 0; -#X msg 323 2 stop; -#X msg 40 416 size 1024 768; -#X floatatom 272 367 5 0 0; -#X msg 305 250 vmask 0.25 0.5 0.25; -#X msg 306 272 hmask 0.25 0.5 0.25; -#X msg 300 226 vmask 0.25 -0.5 0.25; -#X obj 476 654 pdp_xv; -#X floatatom 531 620 5 0 0; -#X obj 446 535 pdp_v4l; -#X obj 446 499 metro 40; -#X obj 443 471 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X floatatom 514 554 5 0 0; -#X obj 450 585 pdp_chrot; -#X connect 0 0 18 0; -#X connect 0 0 32 0; -#X connect 0 1 12 0; -#X connect 0 2 13 0; -#X connect 1 0 0 0; -#X connect 2 0 0 0; -#X connect 3 0 0 0; -#X connect 4 0 5 0; -#X connect 4 0 1 0; -#X connect 5 0 4 1; -#X connect 6 0 1 0; -#X connect 7 0 6 0; -#X connect 8 0 2 0; -#X connect 9 0 2 0; -#X connect 10 0 0 0; -#X connect 11 0 10 0; -#X connect 14 0 6 1; -#X connect 16 0 32 1; -#X connect 17 0 0 0; -#X connect 18 0 16 0; -#X connect 19 0 18 2; -#X connect 20 0 15 1; -#X connect 21 0 0 0; -#X connect 22 0 21 0; -#X connect 23 0 22 0; -#X connect 24 0 25 0; -#X connect 25 0 19 0; -#X connect 26 0 24 0; -#X connect 27 0 16 1; -#X connect 28 0 16 0; -#X connect 29 0 16 0; -#X connect 30 0 28 0; -#X connect 31 0 29 0; -#X connect 32 0 15 0; -#X connect 32 0 18 1; -#X connect 33 0 37 0; -#X connect 34 0 33 0; -#X connect 34 1 33 1; -#X connect 35 0 33 0; -#X connect 36 0 34 0; -#X connect 37 0 32 0; -#X connect 39 0 38 1; -#X connect 40 0 6 0; -#X connect 41 0 15 0; -#X connect 42 0 32 2; -#X connect 43 0 16 0; -#X connect 44 0 16 0; -#X connect 45 0 16 0; -#X connect 47 0 46 1; -#X connect 48 0 52 0; -#X connect 49 0 48 0; -#X connect 50 0 49 0; -#X connect 51 0 52 1; -#X connect 52 0 46 0; diff --git a/test/test_pdp_debug.pd b/test/test_pdp_debug.pd deleted file mode 100644 index 54ccb66..0000000 --- a/test/test_pdp_debug.pd +++ /dev/null @@ -1,18 +0,0 @@ -#N canvas 649 12 317 300 10; -#X obj 102 33 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 94 208 pdp_xv; -#X floatatom 173 149 5 0 0; -#X floatatom 199 64 5 0 0; -#X obj 93 112 pdp_mix; -#X obj 34 35 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 29 59 pdp_noise; -#X obj 105 59 pdp_noise; -#X connect 0 0 7 0; -#X connect 2 0 1 1; -#X connect 3 0 4 2; -#X connect 4 0 1 0; -#X connect 5 0 6 0; -#X connect 6 0 4 0; -#X connect 7 0 4 1; diff --git a/test/test_pdp_del.pd b/test/test_pdp_del.pd deleted file mode 100644 index b363936..0000000 --- a/test/test_pdp_del.pd +++ /dev/null @@ -1,41 +0,0 @@ -#N canvas 0 0 498 481 10; -#X obj 163 121 pdp_v4l; -#X obj 115 58 metro 40; -#X obj 118 25 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 75 454 pdp_xv; -#X obj 94 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X floatatom 283 93 5 0 0; -#X floatatom 163 21 5 0 0; -#X msg 232 25 2000; -#X floatatom 220 198 5 0 0; -#X floatatom 132 406 5 0 0; -#X obj 133 248 pdp_mix2 0.5 -0.5; -#X obj 291 308 pdp_conv; -#X obj 73 360 pdp_mul; -#X floatatom 283 337 5 0 0; -#X floatatom 354 273 5 0 0; -#X obj 186 359 pdp_mix; -#X obj 181 175 pdp_del 100; -#X msg 295 215 mask 0.33333 0.33333 0.33333; -#X connect 0 0 10 0; -#X connect 0 0 15 0; -#X connect 0 0 16 0; -#X connect 1 0 0 0; -#X connect 2 0 1 0; -#X connect 4 0 0 0; -#X connect 5 0 16 1; -#X connect 6 0 1 1; -#X connect 7 0 1 1; -#X connect 8 0 10 2; -#X connect 9 0 3 1; -#X connect 10 0 11 0; -#X connect 11 0 15 1; -#X connect 12 0 3 0; -#X connect 13 0 15 2; -#X connect 14 0 11 1; -#X connect 15 0 12 0; -#X connect 15 0 12 1; -#X connect 16 0 10 1; -#X connect 17 0 11 0; diff --git a/test/test_pdp_gain.pd b/test/test_pdp_gain.pd deleted file mode 100644 index 4387b7e..0000000 --- a/test/test_pdp_gain.pd +++ /dev/null @@ -1,46 +0,0 @@ -#N canvas 7 0 629 658 10; -#X obj 169 525 pdp_xv; -#X obj 265 42 metro 40; -#X obj 262 17 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1 --1; -#X floatatom 309 9 5 0 0; -#X obj 158 156 pdp_v4l; -#X msg 83 57 close; -#X obj 142 56 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 119 430 pdp_add; -#X obj 156 305 pdp_gain; -#X msg 266 272 y \$1; -#X msg 315 272 v \$1; -#X msg 363 271 u \$1; -#X floatatom 265 235 5 0 0; -#X floatatom 315 235 5 0 0; -#X floatatom 367 235 5 0 0; -#X floatatom 327 184 5 0 0; -#X floatatom 212 259 5 0 0; -#X obj 266 212 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; -#X obj 332 213 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 -1; -#X obj 372 208 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; -#X connect 1 0 6 0; -#X connect 2 0 1 0; -#X connect 3 0 1 1; -#X connect 4 0 8 0; -#X connect 5 0 4 0; -#X connect 6 0 4 0; -#X connect 7 0 0 0; -#X connect 8 0 7 0; -#X connect 9 0 8 0; -#X connect 10 0 8 0; -#X connect 11 0 8 0; -#X connect 12 0 9 0; -#X connect 13 0 10 0; -#X connect 14 0 11 0; -#X connect 15 0 13 0; -#X connect 15 0 14 0; -#X connect 16 0 8 1; -#X connect 17 0 12 0; -#X connect 18 0 13 0; -#X connect 19 0 14 0; diff --git a/test/test_pdp_gradient.pd b/test/test_pdp_gradient.pd deleted file mode 100644 index 831fd4d..0000000 --- a/test/test_pdp_gradient.pd +++ /dev/null @@ -1,52 +0,0 @@ -#N canvas 0 0 592 507 10; -#X obj 128 85 pdp_v4l; -#X obj 127 53 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X msg 178 30 stop; -#X msg 216 29 bang; -#X msg 307 9 dim 160 120; -#X msg 305 64 dim 320 240; -#X floatatom 222 3 5 0 0; -#X msg 303 36 dim 640 480; -#X obj 126 360 pdp_xv; -#X obj 196 58 metro 20; -#X msg 32 38 type grey; -#X msg 31 14 type yv12; -#X obj 129 268 pdp_gradient; -#X obj 224 174 pack s 0 0 0; -#X msg 171 142 rgb; -#X floatatom 337 105 5 0 0; -#X msg 222 209 \$1 \$2 \$3 \$4; -#X obj 339 139 t b f; -#X floatatom 287 105 5 0 0; -#X obj 289 139 t b f; -#X floatatom 232 106 5 0 0; -#X obj 234 140 t b f; -#X obj 125 118 pdp_trigger; -#X msg 170 179 yuv; -#X connect 0 0 22 0; -#X connect 1 0 0 0; -#X connect 2 0 9 0; -#X connect 3 0 9 0; -#X connect 4 0 0 0; -#X connect 5 0 0 0; -#X connect 6 0 9 1; -#X connect 7 0 0 0; -#X connect 9 0 0 0; -#X connect 10 0 0 0; -#X connect 11 0 0 0; -#X connect 12 0 8 0; -#X connect 13 0 16 0; -#X connect 14 0 13 0; -#X connect 15 0 17 0; -#X connect 16 0 12 0; -#X connect 17 0 13 0; -#X connect 17 1 13 3; -#X connect 18 0 19 0; -#X connect 19 0 13 0; -#X connect 19 1 13 2; -#X connect 20 0 21 0; -#X connect 21 0 13 0; -#X connect 21 1 13 1; -#X connect 22 0 12 0; -#X connect 23 0 13 0; diff --git a/test/test_pdp_mix.pd b/test/test_pdp_mix.pd deleted file mode 100644 index 8f9599e..0000000 --- a/test/test_pdp_mix.pd +++ /dev/null @@ -1,114 +0,0 @@ -#N canvas 341 641 822 286 10; -#X obj 152 101 pdp_qt; -#X msg 173 63 bang; -#X floatatom 92 60 5 0 0; -#X msg 258 62 open /home/ben/MOV/test1.mov; -#X obj 164 8 i 0; -#X obj 220 19 + 1; -#X obj 303 24 metro 40; -#X obj 300 -1 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1 --1; -#X msg 63 29 0; -#X msg 102 31 9999; -#X msg 63 131 loop \$1; -#X obj 59 105 toggle 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 -1 1; -#X floatatom 178 136 5 0 0; -#X floatatom 235 137 5 0 0; -#X obj 413 229 pdp_qt; -#X msg 446 190 bang; -#X floatatom 365 187 5 0 0; -#X msg 531 189 open /home/ben/MOV/test1.mov; -#X obj 437 135 i 0; -#X obj 493 146 + 1; -#X obj 576 151 metro 40; -#X obj 573 126 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1 --1; -#X msg 336 156 0; -#X msg 375 158 9999; -#X msg 336 258 loop \$1; -#X obj 332 232 toggle 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 -1 1; -#X floatatom 451 263 5 0 0; -#X floatatom 508 264 5 0 0; -#X floatatom 383 3 5 0 0; -#X floatatom 634 128 5 0 0; -#X msg 327 106 0; -#X obj 289 565 pdp_xv; -#X obj 232 390 pdp_mix; -#X floatatom 313 352 5 0 0; -#X obj 356 326 hslider 300 15 0 1 0 0 empty empty empty 20 8 0 8 -241291 --1 -1 27200 1; -#X obj 236 437 pdp_reg; -#X obj 297 519 pdp_mix; -#X obj 397 437 hslider 300 15 0 1 0 0 empty empty empty 20 8 0 8 -241291 --1 -1 10100 1; -#X msg 396 517 mix2 \$1 \$2; -#X obj 394 410 hslider 300 15 0 1 0 0 empty empty empty 20 8 0 8 -241291 --1 -1 8900 1; -#X obj 437 465 t b f; -#X obj 417 493 pack 0 0; -#X floatatom 241 215 5 0 0; -#X floatatom 350 541 5 0 0; -#X floatatom 549 226 5 0 0; -#X msg 470 33 open /home/ben/MOV/neuskoter90.mov; -#X msg 555 80 open /home/ben/MOV/neuskoter90.mov; -#X msg 480 101 open \$1; -#X obj 479 79 openpanel; -#X obj 480 59 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1 --1; -#X connect 0 0 32 0; -#X connect 0 1 12 0; -#X connect 0 2 13 0; -#X connect 1 0 0 0; -#X connect 2 0 0 0; -#X connect 3 0 0 0; -#X connect 4 0 5 0; -#X connect 4 0 1 0; -#X connect 5 0 4 1; -#X connect 6 0 0 0; -#X connect 7 0 6 0; -#X connect 8 0 2 0; -#X connect 9 0 2 0; -#X connect 10 0 0 0; -#X connect 11 0 10 0; -#X connect 14 0 36 1; -#X connect 14 1 26 0; -#X connect 14 2 27 0; -#X connect 15 0 14 0; -#X connect 16 0 14 0; -#X connect 17 0 14 0; -#X connect 18 0 19 0; -#X connect 18 0 15 0; -#X connect 19 0 18 1; -#X connect 20 0 15 0; -#X connect 21 0 20 0; -#X connect 22 0 16 0; -#X connect 23 0 16 0; -#X connect 24 0 14 0; -#X connect 25 0 24 0; -#X connect 28 0 6 1; -#X connect 29 0 20 1; -#X connect 30 0 22 0; -#X connect 30 0 8 0; -#X connect 32 0 35 0; -#X connect 32 0 36 0; -#X connect 33 0 32 2; -#X connect 34 0 33 0; -#X connect 35 0 32 1; -#X connect 36 0 31 0; -#X connect 37 0 40 0; -#X connect 38 0 36 0; -#X connect 39 0 41 0; -#X connect 40 0 41 0; -#X connect 40 1 41 1; -#X connect 41 0 38 0; -#X connect 42 0 0 1; -#X connect 43 0 31 1; -#X connect 44 0 14 1; -#X connect 45 0 0 0; -#X connect 46 0 14 0; -#X connect 47 0 14 0; -#X connect 47 0 0 0; -#X connect 48 0 47 0; -#X connect 49 0 48 0; diff --git a/test/test_pdp_mul.pd b/test/test_pdp_mul.pd deleted file mode 100644 index 3fc0902..0000000 --- a/test/test_pdp_mul.pd +++ /dev/null @@ -1,44 +0,0 @@ -#N canvas 0 0 450 373 10; -#X obj 128 85 pdp_v4l; -#X obj 128 215 pdp_xv; -#X obj 127 53 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 340 167 pdp_reg; -#X obj 211 93 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X floatatom 178 195 5 0 0; -#X obj 95 167 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X msg 178 30 stop; -#X obj 196 58 metro 40; -#X msg 216 29 bang; -#X obj 291 193 pdp_mul; -#X msg 291 64 dim 160 120; -#X msg 289 29 dim 32 32; -#X msg 283 5 dim 80 60; -#X msg 313 94 dim 320 240; -#X msg 334 117 dim 768 576; -#X floatatom 222 3 5 0 0; -#X obj 262 245 timer; -#X floatatom 261 271 5 0 0; -#X obj 148 121 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X connect 0 0 1 0; -#X connect 0 0 19 0; -#X connect 2 0 0 0; -#X connect 3 0 10 1; -#X connect 4 0 3 0; -#X connect 5 0 1 1; -#X connect 6 0 1 0; -#X connect 7 0 8 0; -#X connect 8 0 0 0; -#X connect 9 0 8 0; -#X connect 11 0 0 0; -#X connect 12 0 0 0; -#X connect 13 0 0 0; -#X connect 14 0 0 0; -#X connect 15 0 0 0; -#X connect 16 0 8 1; -#X connect 17 0 18 0; -#X connect 19 0 17 1; -#X connect 19 0 17 0; diff --git a/test/test_pdp_noise.pd b/test/test_pdp_noise.pd deleted file mode 100644 index 7302692..0000000 --- a/test/test_pdp_noise.pd +++ /dev/null @@ -1,40 +0,0 @@ -#N canvas 0 0 450 300 10; -#X obj 132 150 pdp_noise; -#X obj 128 258 pdp_xv; -#X obj 133 21 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X msg 171 92 type grey; -#X msg 173 114 type yv12; -#X msg 243 35 dim 32 32; -#X msg 244 10 dim 320 240; -#X msg 246 61 dim 640 480; -#X msg 243 216 lpf \$1 \$2; -#X obj 242 179 pack 0 0; -#X floatatom 247 117 5 0 0; -#X floatatom 299 123 5 0 0; -#X obj 264 150 t b f; -#X floatatom 174 184 5 0 0; -#X msg 340 33 dim 512 256; -#X obj 134 57 metro 100; -#X msg 205 158 2; -#X msg 358 71 dim 1024 1024; -#X obj 132 212 pdp_bq; -#X connect 0 0 18 0; -#X connect 2 0 15 0; -#X connect 3 0 0 0; -#X connect 4 0 0 0; -#X connect 5 0 0 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X connect 8 0 18 0; -#X connect 9 0 8 0; -#X connect 10 0 9 0; -#X connect 11 0 12 0; -#X connect 12 0 9 0; -#X connect 12 1 9 1; -#X connect 13 0 18 1; -#X connect 14 0 0 0; -#X connect 15 0 0 0; -#X connect 16 0 13 0; -#X connect 17 0 0 0; -#X connect 18 0 1 0; diff --git a/test/test_pdp_pctv.pd b/test/test_pdp_pctv.pd deleted file mode 100644 index 379a8e0..0000000 --- a/test/test_pdp_pctv.pd +++ /dev/null @@ -1,47 +0,0 @@ -#N canvas 0 0 458 400 10; -#X obj 128 85 pdp_v4l; -#X obj 127 53 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X msg 178 30 stop; -#X msg 216 29 bang; -#X msg 291 64 dim 160 120; -#X msg 289 29 dim 32 32; -#X msg 283 5 dim 80 60; -#X msg 313 94 dim 320 240; -#X msg 334 117 dim 768 576; -#X floatatom 222 3 5 0 0; -#X msg 253 144 dim 640 240; -#X msg 364 45 dim 640 480; -#X obj 126 360 pdp_xv; -#X obj 196 58 metro 20; -#X msg 32 38 type grey; -#X msg 31 14 type yv12; -#X obj 129 268 pdp_conv; -#X floatatom 193 228 5 0 0; -#X msg 36 218 ver \$1; -#X msg 91 219 hor \$1; -#X obj 38 193 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 -; -#X obj 95 192 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 -; -#X connect 0 0 16 0; -#X connect 1 0 0 0; -#X connect 2 0 13 0; -#X connect 3 0 13 0; -#X connect 4 0 0 0; -#X connect 5 0 0 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; -#X connect 8 0 0 0; -#X connect 9 0 13 1; -#X connect 10 0 0 0; -#X connect 11 0 0 0; -#X connect 13 0 0 0; -#X connect 14 0 0 0; -#X connect 15 0 0 0; -#X connect 16 0 12 0; -#X connect 17 0 16 1; -#X connect 18 0 16 0; -#X connect 19 0 16 0; -#X connect 20 0 18 0; -#X connect 21 0 19 0; diff --git a/test/test_pdp_portable.pd b/test/test_pdp_portable.pd deleted file mode 100644 index 5da41be..0000000 --- a/test/test_pdp_portable.pd +++ /dev/null @@ -1,41 +0,0 @@ -#N canvas 281 443 562 448 10; -#X obj 60 370 pdp_xv; -#X obj 76 103 pdp_v4l; -#X obj 78 76 metro 20; -#X obj 78 41 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X floatatom 211 158 5 0 0; -#X obj 71 238 pdp_gain; -#X floatatom 146 219 5 0 0; -#X msg 18 79 close; -#X msg 22 156 channel \$1; -#X floatatom 24 123 5 0 0; -#X msg 190 97 freqMHz \$1; -#X obj 167 8 hsl 201 15 -100 100 0 0 empty empty empty -2 -6 0 8 -262144 --1 -1 0 1; -#X floatatom 215 36 5 0 0; -#X obj 331 90 +; -#X obj 333 61 t b f; -#X obj 169 37 * 8; -#X floatatom 330 33 5 0 0; -#X msg 86 336 cursor \$1; -#X obj 98 315 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 -; -#X connect 1 0 5 0; -#X connect 2 0 1 0; -#X connect 3 0 2 0; -#X connect 5 0 0 0; -#X connect 6 0 5 1; -#X connect 7 0 1 0; -#X connect 8 0 1 0; -#X connect 9 0 8 0; -#X connect 10 0 1 0; -#X connect 11 0 12 0; -#X connect 11 0 15 0; -#X connect 13 0 10 0; -#X connect 14 0 13 0; -#X connect 14 1 13 1; -#X connect 15 0 13 0; -#X connect 16 0 14 0; -#X connect 17 0 0 0; -#X connect 18 0 17 0; diff --git a/test/test_pdp_qt_read.pd b/test/test_pdp_qt_read.pd deleted file mode 100644 index b4bb088..0000000 --- a/test/test_pdp_qt_read.pd +++ /dev/null @@ -1,164 +0,0 @@ -#N canvas 190 294 862 660 10; -#X obj 122 506 pdp_xv; -#X msg 135 81 bang; -#X floatatom 54 78 5 0 0; -#X msg 222 90 open /home/ben/MOV/test1.mov; -#X msg 418 369 open /home/ben/MOV/eye.mov; -#X obj 126 26 i 0; -#X obj 182 37 + 1; -#X obj 217 47 metro 40; -#X obj 262 17 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1 --1; -#X msg 25 47 0; -#X msg 64 49 9999; -#X msg 25 149 loop \$1; -#X obj 21 123 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 0 1 -; -#X floatatom 264 231 5 0 0; -#X floatatom 538 184 5 0 0; -#X msg 370 44 open \$1; -#X obj 369 20 openpanel; -#X obj 354 3 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1 --1; -#X floatatom 192 459 5 0 0; -#X floatatom 309 9 5 0 0; -#X msg 298 135 open /home/ben/MOV/nogeseenfilmke.mov; -#X obj 346 406 table tab1; -#X msg 56 23 close; -#X obj 250 542 dac~; -#X msg 315 390 0; -#X obj 316 427 tabplay~ tab1; -#X msg 332 325 importaudio tab1; -#X obj 26 185 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 0 1 -; -#X floatatom 180 83 5 0 0; -#X msg 215 7 stop; -#X obj 478 213 i; -#X obj 490 276 mod; -#X obj 494 244 + 1; -#X floatatom 558 226 5 0 0; -#X msg 30 211 autoplay \$1; -#X floatatom 501 321 5 0 0; -#X obj 119 331 pdp_del 10; -#X floatatom 194 289 5 0 0; -#X obj 384 221 *; -#X obj 288 159 hsl 300 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144 --1 -1 0 1; -#X obj 305 44 hsl 300 15 0 1000 0 0 empty empty empty -2 -6 0 8 -262144 --1 -1 0 1; -#X msg 329 254 loop \$1; -#X obj 325 228 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 0 -1; -#X obj 236 258 pdp_trigger; -#X obj 117 421 pdp_mix; -#X floatatom 182 390 5 0 0; -#X obj 278 349 hsl 300 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144 --1 -1 0 1; -#X msg 434 394 open /home/ben/MOV/nogeseenfilmke.mov; -#X obj 241 175 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 0 -1; -#X msg 245 201 autoplay \$1; -#X obj 408 254 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X msg 65 281 close; -#X obj 352 484 vol~; -#X obj 221 497 vol~; -#X floatatom 252 470 5 0 0; -#X floatatom 382 460 5 0 0; -#X msg 418 281 close; -#X msg 121 145 play; -#X msg 347 229 play; -#X msg 447 13 bang; -#X msg 564 13 stop; -#X msg 540 97 \; pd dsp 1; -#X msg 616 98 \; pd dsp 0; -#X floatatom 608 13 5 0 0; -#X msg 732 104 close; -#X msg 778 105 close; -#X obj 470 66 route 0 1 2 3 4 5 6 7; -#X msg 675 13 140; -#X obj 489 42 random 6; -#X obj 483 12 metro 140; -#X obj 715 46 loadbang; -#X msg 750 76 \; pd dsp 1; -#X obj 133 205 pdp_qt~; -#X obj 322 283 pdp_qt~; -#X obj 207 71 random 250; -#X connect 1 0 72 0; -#X connect 2 0 72 0; -#X connect 3 0 72 0; -#X connect 4 0 73 0; -#X connect 5 0 6 0; -#X connect 5 0 1 0; -#X connect 6 0 5 1; -#X connect 7 0 74 0; -#X connect 8 0 7 0; -#X connect 9 0 2 0; -#X connect 10 0 2 0; -#X connect 11 0 72 0; -#X connect 12 0 11 0; -#X connect 14 0 31 1; -#X connect 14 0 38 1; -#X connect 15 0 72 0; -#X connect 16 0 15 0; -#X connect 17 0 16 0; -#X connect 18 0 0 1; -#X connect 19 0 7 1; -#X connect 20 0 72 0; -#X connect 22 0 72 0; -#X connect 24 0 25 0; -#X connect 26 0 72 0; -#X connect 27 0 34 0; -#X connect 28 0 72 1; -#X connect 29 0 7 0; -#X connect 30 0 32 0; -#X connect 31 0 35 0; -#X connect 32 0 31 0; -#X connect 33 0 32 1; -#X connect 34 0 72 0; -#X connect 36 0 44 0; -#X connect 37 0 36 1; -#X connect 38 0 28 0; -#X connect 39 0 38 0; -#X connect 40 0 19 0; -#X connect 41 0 73 0; -#X connect 42 0 41 0; -#X connect 44 0 0 0; -#X connect 45 0 44 2; -#X connect 46 0 45 0; -#X connect 47 0 73 0; -#X connect 48 0 49 0; -#X connect 49 0 73 0; -#X connect 50 0 73 0; -#X connect 51 0 72 0; -#X connect 56 0 73 0; -#X connect 57 0 72 0; -#X connect 58 0 73 0; -#X connect 59 0 69 0; -#X connect 59 0 58 0; -#X connect 59 0 57 0; -#X connect 60 0 69 0; -#X connect 63 0 69 1; -#X connect 64 0 72 0; -#X connect 65 0 73 0; -#X connect 66 0 3 0; -#X connect 66 1 20 0; -#X connect 66 2 4 0; -#X connect 66 3 47 0; -#X connect 66 6 64 0; -#X connect 66 7 65 0; -#X connect 67 0 63 0; -#X connect 68 0 66 0; -#X connect 69 0 68 0; -#X connect 70 0 59 0; -#X connect 70 0 71 0; -#X connect 72 0 43 0; -#X connect 72 0 36 0; -#X connect 72 1 13 0; -#X connect 72 2 14 0; -#X connect 72 3 23 1; -#X connect 72 4 23 0; -#X connect 73 0 44 1; -#X connect 73 3 23 0; -#X connect 73 4 23 1; -#X connect 74 0 28 0; diff --git a/test/test_pdp_qt_read2.pd b/test/test_pdp_qt_read2.pd deleted file mode 100644 index 0071f4b..0000000 --- a/test/test_pdp_qt_read2.pd +++ /dev/null @@ -1,45 +0,0 @@ -#N canvas 388 475 450 300 10; -#X msg 120 29 open /home/ben/MOV/nogeseenfilmke.mov; -#X obj 79 52 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 119 156 pdp_xv; -#X obj 222 166 dac~; -#X obj 200 137 *~ 0.2; -#X obj 253 135 *~ 0.2; -#X obj 122 100 pdp_qt~; -#X msg 50 98 stop; -#X msg 119 7 open /home/ben/MOV/test1.mov; -#X floatatom 322 77 5 0 0; -#X obj 362 139 osc~ 1000; -#X msg 56 215 thread \$1; -#X obj 58 185 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 -; -#X obj 271 51 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 -; -#X obj 289 75 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 -; -#X msg 205 73 autoplay \$1; -#X msg 205 47 loop \$1; -#X obj 14 25 metro; -#X obj 11 1 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1 -; -#X floatatom 47 2 5 0 0; -#X connect 0 0 6 0; -#X connect 1 0 6 0; -#X connect 4 0 3 0; -#X connect 5 0 3 1; -#X connect 6 0 2 0; -#X connect 6 3 4 0; -#X connect 6 4 5 0; -#X connect 7 0 6 0; -#X connect 8 0 6 0; -#X connect 9 0 6 1; -#X connect 11 0 6 0; -#X connect 12 0 11 0; -#X connect 13 0 16 0; -#X connect 14 0 15 0; -#X connect 15 0 6 0; -#X connect 16 0 6 0; -#X connect 17 0 1 0; -#X connect 18 0 17 0; -#X connect 19 0 17 1; diff --git a/test/test_pdp_randmix.pd b/test/test_pdp_randmix.pd deleted file mode 100644 index c3c3023..0000000 --- a/test/test_pdp_randmix.pd +++ /dev/null @@ -1,31 +0,0 @@ -#N canvas 0 0 569 226 10; -#X obj 137 194 pdp_randmix; -#X obj 135 98 pdp_v4l; -#X obj 167 151 pdp_reg; -#X obj 225 113 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 135 70 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 137 241 pdp_xv; -#X floatatom 232 167 5 0 0; -#X msg 130 30 stop; -#X obj 182 15 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 181 43 metro 40; -#X obj 260 134 hsl 128 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144 --1 -1 9800 1; -#X obj 254 214 pdp_conv; -#X floatatom 316 184 5 0 0; -#X connect 0 0 5 0; -#X connect 0 0 11 0; -#X connect 1 0 0 0; -#X connect 2 0 0 1; -#X connect 3 0 2 0; -#X connect 4 0 1 0; -#X connect 6 0 0 2; -#X connect 7 0 9 0; -#X connect 8 0 9 0; -#X connect 9 0 4 0; -#X connect 10 0 6 0; -#X connect 11 0 2 0; -#X connect 12 0 11 1; diff --git a/test/test_pdp_reg.pd b/test/test_pdp_reg.pd deleted file mode 100644 index 6e5424b..0000000 --- a/test/test_pdp_reg.pd +++ /dev/null @@ -1,21 +0,0 @@ -#N canvas 0 0 450 300 10; -#X obj 152 123 pdp_reg; -#X obj 152 180 pdp_xv; -#X obj 108 89 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1 --1; -#X obj 149 64 pdp_qt; -#X msg 180 34 open /home/ben/MOV/test1.mov; -#X obj 119 21 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1 --1; -#X msg 300 71 loop 1; -#X obj 301 126 metro 40; -#X obj 299 101 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1 --1; -#X connect 0 0 1 0; -#X connect 2 0 0 0; -#X connect 3 0 0 1; -#X connect 4 0 3 0; -#X connect 5 0 3 0; -#X connect 6 0 3 0; -#X connect 7 0 3 0; -#X connect 8 0 7 0; diff --git a/test/test_pdp_scale.pd b/test/test_pdp_scale.pd deleted file mode 100644 index 41a16ee..0000000 --- a/test/test_pdp_scale.pd +++ /dev/null @@ -1,38 +0,0 @@ -#N canvas 103 210 562 448 10; -#X obj 60 370 pdp_xv; -#X obj 78 76 metro 20; -#X obj 78 41 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X floatatom 211 158 5 0 0; -#X floatatom 206 277 5 0 0; -#X msg 18 79 close; -#X msg 22 156 channel \$1; -#X floatatom 24 123 5 0 0; -#X msg 86 336 cursor \$1; -#X obj 98 315 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 -; -#X msg 109 178 dim 256 256; -#X msg 113 202 dim 320 240; -#X obj 71 238 pdp_scale 320 240; -#X obj 152 78 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 76 103 pdp_v4l; -#X msg 121 144 dim 32 32; -#X msg 280 221 quality \$1; -#X obj 282 193 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 -1; -#X connect 1 0 14 0; -#X connect 2 0 1 0; -#X connect 5 0 14 0; -#X connect 6 0 14 0; -#X connect 7 0 6 0; -#X connect 8 0 0 0; -#X connect 9 0 8 0; -#X connect 10 0 12 0; -#X connect 11 0 12 0; -#X connect 12 0 0 0; -#X connect 13 0 14 0; -#X connect 14 0 12 0; -#X connect 15 0 12 0; -#X connect 16 0 12 0; -#X connect 17 0 16 0; diff --git a/test/test_pdp_scope.pd b/test/test_pdp_scope.pd deleted file mode 100644 index d441ebb..0000000 --- a/test/test_pdp_scope.pd +++ /dev/null @@ -1,21 +0,0 @@ -#N canvas 504 346 450 300 10; -#X obj 107 108 pdp_scope~; -#X obj 81 45 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 109 161 pdp_xv; -#X msg 118 23 type grey; -#X obj 253 58 metro 40; -#X obj 249 37 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X floatatom 198 29 5 0 0; -#X obj 127 55 noise~ 50; -#X obj 248 175 r~ scope; -#X msg 270 113 dim 1024 512; -#X connect 0 0 2 0; -#X connect 1 0 0 0; -#X connect 3 0 0 0; -#X connect 4 0 0 0; -#X connect 5 0 4 0; -#X connect 6 0 7 0; -#X connect 8 0 0 0; -#X connect 9 0 0 0; diff --git a/test/test_pdp_snap.pd b/test/test_pdp_snap.pd deleted file mode 100644 index b8b5e8b..0000000 --- a/test/test_pdp_snap.pd +++ /dev/null @@ -1,16 +0,0 @@ -#N canvas 0 0 450 300 10; -#X obj 130 211 pdp_xv; -#X obj 74 97 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1 --1; -#X obj 189 38 metro 40; -#X obj 187 13 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1 --1; -#X obj 118 131 pdp_snap; -#X msg 103 96 snap; -#X obj 185 72 pdp_v4l; -#X connect 1 0 4 0; -#X connect 2 0 6 0; -#X connect 3 0 2 0; -#X connect 4 0 0 0; -#X connect 5 0 4 0; -#X connect 6 0 4 1; diff --git a/test/test_pdp_thread.pd b/test/test_pdp_thread.pd deleted file mode 100644 index 2110c12..0000000 --- a/test/test_pdp_thread.pd +++ /dev/null @@ -1,33 +0,0 @@ -#N canvas 512 101 579 567 10; -#X msg 86 6 stop; -#X obj 61 6 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1 -; -#X floatatom 130 3 5 0 0; -#X obj 88 30 metro 40; -#X obj 174 125 pdp_v4l; -#X floatatom 207 93 5 0 0; -#X obj 93 407 pdp_xv; -#X msg 162 66 type grey; -#X msg 242 63 type yv12; -#X obj 332 322 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; -#X obj 346 413 pdp_control; -#X msg 332 363 thread \$1; -#X obj 153 408 pdp_xv; -#X obj 212 408 pdp_xv; -#X floatatom 213 289 5 0 0; -#X obj 124 329 pdp_route 3; -#X connect 0 0 3 0; -#X connect 1 0 3 0; -#X connect 2 0 3 1; -#X connect 3 0 4 0; -#X connect 4 0 15 0; -#X connect 5 0 4 1; -#X connect 7 0 4 0; -#X connect 8 0 4 0; -#X connect 9 0 11 0; -#X connect 11 0 10 0; -#X connect 14 0 15 1; -#X connect 15 0 6 0; -#X connect 15 1 12 0; -#X connect 15 2 13 0; diff --git a/test/test_pdp_trigger.pd b/test/test_pdp_trigger.pd deleted file mode 100644 index 877d7eb..0000000 --- a/test/test_pdp_trigger.pd +++ /dev/null @@ -1,13 +0,0 @@ -#N canvas 661 462 467 193 10; -#X obj 33 137 pdp_xv; -#X obj 33 57 pdp_v4l; -#X msg 33 12 bang; -#X obj 33 92 pdp_trigger; -#X obj 33 35 metro 1000; -#X obj 105 138 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#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; diff --git a/test/test_pdp_v4l.pd b/test/test_pdp_v4l.pd deleted file mode 100644 index 0bff99b..0000000 --- a/test/test_pdp_v4l.pd +++ /dev/null @@ -1,91 +0,0 @@ -#N canvas 7 0 629 658 10; -#X obj 130 454 pdp_xv; -#X obj 265 42 metro 40; -#X obj 262 17 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1 --1; -#X floatatom 309 9 5 0 0; -#X obj 115 119 pdp_v4l; -#X msg 220 80 open /dev/video0; -#X msg 83 57 close; -#X obj 142 56 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X msg 233 127 dim 160 120; -#X msg 238 162 dim 320 240; -#X floatatom 177 418 5 0 0; -#X obj 161 239 pdp_conv; -#X floatatom 228 237 5 0 0; -#X obj 157 325 pdp_mix2; -#X floatatom 191 293 5 0 0; -#X floatatom 241 293 5 0 0; -#X obj 315 259 hsl 128 15 -1 1 0 0 empty empty empty -2 -6 0 8 -262144 --1 -1 0 1; -#X obj 316 280 hsl 128 15 -1 1 0 0 empty empty empty -2 -6 0 8 -262144 --1 -1 0 1; -#X msg 350 123 dim 640 480; -#X obj 252 372 pdp_mix; -#X obj 257 435 pdp_reg; -#X floatatom 307 340 5 0 0; -#X obj 253 405 pdp_conv; -#X floatatom 319 388 5 0 0; -#X obj 313 314 hsl 128 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144 --1 -1 0 1; -#X msg 64 391 size 1024 768; -#X msg 62 363 size 320 240; -#X obj 357 453 hsl 128 15 -1 1 0 0 empty empty empty -2 -6 0 8 -262144 --1 -1 0 1; -#X obj 358 474 hsl 128 15 -1 1 0 0 empty empty empty -2 -6 0 8 -262144 --1 -1 0 1; -#X obj 357 500 hsl 128 15 -1 1 0 0 empty empty empty -2 -6 0 8 -262144 --1 -1 0 1; -#X obj 358 521 hsl 128 15 -1 1 0 0 empty empty empty -2 -6 0 8 -262144 --1 -1 0 1; -#X obj 230 528 pdp_affine 2; -#X obj 357 544 hsl 128 15 -1 1 0 0 empty empty empty -2 -6 0 8 -262144 --1 -1 0 1; -#X obj 358 565 hsl 128 15 -1 1 0 0 empty empty empty -2 -6 0 8 -262144 --1 -1 0 1; -#X obj 228 570 pdp_affine 3; -#X obj 228 479 pdp_affine 1; -#X obj 499 372 osc~; -#X obj 490 408 dac~; -#X floatatom 486 335 5 0 0; -#X connect 1 0 7 0; -#X connect 2 0 1 0; -#X connect 3 0 1 1; -#X connect 4 0 11 0; -#X connect 4 0 13 0; -#X connect 5 0 4 0; -#X connect 6 0 4 0; -#X connect 7 0 4 0; -#X connect 8 0 4 0; -#X connect 9 0 4 0; -#X connect 10 0 0 1; -#X connect 11 0 13 1; -#X connect 12 0 11 1; -#X connect 13 0 19 0; -#X connect 14 0 13 2; -#X connect 15 0 13 3; -#X connect 16 0 14 0; -#X connect 17 0 15 0; -#X connect 18 0 4 0; -#X connect 19 0 22 0; -#X connect 20 0 19 1; -#X connect 20 0 35 0; -#X connect 21 0 19 2; -#X connect 22 0 20 0; -#X connect 23 0 22 1; -#X connect 24 0 21 0; -#X connect 25 0 0 0; -#X connect 26 0 0 0; -#X connect 27 0 35 1; -#X connect 28 0 35 2; -#X connect 29 0 31 1; -#X connect 30 0 31 2; -#X connect 31 0 34 0; -#X connect 32 0 34 1; -#X connect 33 0 34 2; -#X connect 34 0 0 0; -#X connect 35 0 31 0; -#X connect 36 0 37 0; -#X connect 36 0 37 1; -#X connect 38 0 36 0; diff --git a/test/test_pdp_v4l_2.pd b/test/test_pdp_v4l_2.pd deleted file mode 100644 index 905e850..0000000 --- a/test/test_pdp_v4l_2.pd +++ /dev/null @@ -1,26 +0,0 @@ -#N canvas 207 394 450 300 10; -#X obj 112 96 pdp_v4l; -#X obj 111 177 pdp_xv; -#X obj 111 48 metro 40; -#X obj 110 21 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X msg 232 76 channel \$1; -#X floatatom 227 45 5 0 0; -#X msg 135 22 stop; -#X msg 52 78 close; -#X msg 222 147 dim 1280 1024; -#X obj 63 35 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X msg 223 120 dim 320 240; -#X obj 110 121 pdp_grey; -#X connect 0 0 11 0; -#X connect 2 0 0 0; -#X connect 3 0 2 0; -#X connect 4 0 0 0; -#X connect 5 0 4 0; -#X connect 6 0 2 0; -#X connect 7 0 0 0; -#X connect 8 0 1 0; -#X connect 9 0 0 0; -#X connect 10 0 1 0; -#X connect 11 0 1 0; diff --git a/test/test_pdp_xv.pd b/test/test_pdp_xv.pd deleted file mode 100644 index ebd2258..0000000 --- a/test/test_pdp_xv.pd +++ /dev/null @@ -1,44 +0,0 @@ -#N canvas 451 201 473 511 10; -#X obj 57 83 pdp_xv; -#X msg 51 35 create; -#X msg 105 41 bang; -#X floatatom 195 37 5 0 0; -#X msg 151 30 bang; -#X obj 155 78 metro 40; -#X obj 75 248 pdp_xv; -#X msg 69 200 create; -#X msg 123 206 bang; -#X obj 237 244 pdp_xv; -#X msg 231 196 create; -#X msg 285 202 bang; -#X floatatom 188 134 5 0 0; -#X msg 144 127 bang; -#X obj 148 175 metro 40; -#X floatatom 330 121 5 0 0; -#X msg 286 114 bang; -#X obj 290 162 metro 40; -#X msg 76 8 destroy; -#X msg 283 27 size 300 300; -#X msg 285 58 size 320 240; -#X msg 227 326 size 1280 1024; -#X msg 147 7 random; -#X connect 1 0 0 0; -#X connect 2 0 0 0; -#X connect 3 0 5 1; -#X connect 4 0 5 0; -#X connect 5 0 0 0; -#X connect 7 0 6 0; -#X connect 8 0 6 0; -#X connect 10 0 9 0; -#X connect 11 0 9 0; -#X connect 12 0 14 1; -#X connect 13 0 14 0; -#X connect 14 0 8 0; -#X connect 15 0 17 1; -#X connect 16 0 17 0; -#X connect 17 0 11 0; -#X connect 18 0 0 0; -#X connect 19 0 0 0; -#X connect 20 0 0 0; -#X connect 21 0 0 0; -#X connect 22 0 0 0; diff --git a/test/test_pdp_zoom.pd b/test/test_pdp_zoom.pd deleted file mode 100644 index eab3826..0000000 --- a/test/test_pdp_zoom.pd +++ /dev/null @@ -1,73 +0,0 @@ -#N canvas 58 235 562 448 10; -#X obj 104 418 pdp_xv; -#X obj 78 76 metro 20; -#X obj 78 41 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X msg 18 79 close; -#X msg 22 156 channel \$1; -#X floatatom 24 123 5 0 0; -#X msg 129 344 cursor \$1; -#X obj 129 325 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; -#X obj 152 78 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 76 103 pdp_v4l; -#X obj 108 301 pdp_zoom; -#X floatatom 157 257 5 0 0; -#X obj 134 193 pdp_mix; -#X floatatom 195 130 5 0 0; -#X obj 245 179 hsl 300 15 0.01 100 1 1 empty empty empty -2 -6 0 8 --262144 -1 -1 17104 1; -#X floatatom 211 304 5 0 0; -#X obj 235 244 hsl 300 15 0.01 100 1 1 empty empty empty -2 -6 0 8 --262144 -1 -1 14200 1; -#X msg 254 279 zoomx \$1; -#X msg 253 305 zoomy \$1; -#X floatatom 213 280 5 0 0; -#X obj 239 217 hsl 300 15 0.01 100 1 1 empty empty empty -2 -6 0 8 --262144 -1 -1 17200 1; -#X obj 238 91 hsl 300 15 0 1 0 1 empty empty empty -2 -6 0 8 -262144 --1 -1 22600 1; -#X msg 367 345 centerx \$1; -#X floatatom 370 319 5 0 0; -#X floatatom 452 317 5 0 0; -#X msg 449 343 centery \$1; -#X obj 378 265 hsl 128 15 -1 1 0 1 empty empty empty -2 -6 0 8 -262144 --1 -1 7700 1; -#X obj 396 284 hsl 128 15 -1 1 0 1 empty empty empty -2 -6 0 8 -262144 --1 -1 7700 1; -#X msg 381 386 center 0 0; -#X obj 129 148 pdp_grey; -#X obj 108 382 pdp_saturation; -#X floatatom 212 359 5 0 0; -#X connect 1 0 9 0; -#X connect 2 0 1 0; -#X connect 3 0 9 0; -#X connect 4 0 9 0; -#X connect 5 0 4 0; -#X connect 7 0 6 0; -#X connect 8 0 9 0; -#X connect 9 0 29 0; -#X connect 9 0 12 0; -#X connect 10 0 12 1; -#X connect 10 0 30 0; -#X connect 11 0 10 1; -#X connect 12 0 10 0; -#X connect 13 0 12 2; -#X connect 14 0 11 0; -#X connect 15 0 18 0; -#X connect 16 0 15 0; -#X connect 17 0 10 0; -#X connect 18 0 10 0; -#X connect 19 0 17 0; -#X connect 20 0 19 0; -#X connect 21 0 13 0; -#X connect 22 0 10 0; -#X connect 23 0 22 0; -#X connect 24 0 25 0; -#X connect 25 0 10 0; -#X connect 26 0 23 0; -#X connect 27 0 24 0; -#X connect 28 0 10 0; -#X connect 30 0 0 0; -#X connect 31 0 30 1; diff --git a/test/test_warpfeedback.pd b/test/test_warpfeedback.pd deleted file mode 100644 index 4ae32ef..0000000 --- a/test/test_warpfeedback.pd +++ /dev/null @@ -1,49 +0,0 @@ -#N canvas 723 178 450 461 10; -#X obj 107 108 pdp_scope~; -#X obj 81 45 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 120 374 pdp_xv; -#X msg 118 23 type grey; -#X obj 253 58 metro 40; -#X obj 249 37 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X floatatom 198 29 5 0 0; -#X obj 127 55 noise~ 50; -#X obj 248 175 r~ scope; -#X msg 270 113 dim 1024 512; -#X obj 162 215 pdp_gain; -#X floatatom 224 192 5 0 0; -#X floatatom 121 157 5 0 0; -#X obj 216 264 pdp_warp; -#X obj 77 197 pdp_mix; -#X floatatom 266 320 5 0 0; -#X floatatom 293 287 5 0 0; -#X obj 32 135 pdp_v4l; -#X floatatom 230 367 5 0 0; -#X obj 320 226 pdp_control; -#X msg 321 194 thread 0; -#X obj 193 303 pdp_phase; -#X floatatom 247 213 5 0 0; -#X obj 183 243 pdp_blur; -#X connect 1 0 0 0; -#X connect 3 0 0 0; -#X connect 4 0 0 0; -#X connect 4 0 17 0; -#X connect 5 0 4 0; -#X connect 6 0 7 0; -#X connect 8 0 0 0; -#X connect 9 0 0 0; -#X connect 10 0 23 0; -#X connect 11 0 10 1; -#X connect 12 0 14 2; -#X connect 13 0 21 0; -#X connect 14 0 10 0; -#X connect 15 0 13 1; -#X connect 16 0 21 1; -#X connect 17 0 14 0; -#X connect 18 0 2 1; -#X connect 20 0 19 0; -#X connect 21 0 14 1; -#X connect 21 0 2 0; -#X connect 22 0 23 1; -#X connect 23 0 13 0; -- cgit v1.2.1