aboutsummaryrefslogtreecommitdiff
path: root/externals/gridflow
diff options
context:
space:
mode:
Diffstat (limited to 'externals/gridflow')
-rw-r--r--externals/gridflow/base/bitpacking.c313
-rw-r--r--externals/gridflow/base/flow_objects.c1195
-rw-r--r--externals/gridflow/base/flow_objects.rb1457
-rw-r--r--externals/gridflow/base/flow_objects_for_image.c619
-rw-r--r--externals/gridflow/base/flow_objects_for_matrix.c77
-rw-r--r--externals/gridflow/base/grid.c616
-rw-r--r--externals/gridflow/base/grid.h1146
-rw-r--r--externals/gridflow/base/main.c648
-rw-r--r--externals/gridflow/base/main.rb384
-rw-r--r--externals/gridflow/base/number.c374
-rw-r--r--externals/gridflow/base/source_filter.rb276
-rw-r--r--externals/gridflow/base/test.rb1074
-rwxr-xr-xexternals/gridflow/bin/backtrace18
-rwxr-xr-xexternals/gridflow/bin/demangle4
-rwxr-xr-xexternals/gridflow/bin/jmax2pd29
-rwxr-xr-xexternals/gridflow/bin/plusminus39
-rw-r--r--externals/gridflow/bridge/placebo.rb46
-rw-r--r--externals/gridflow/bridge/puredata.c773
-rw-r--r--externals/gridflow/bridge/puredata.rb194
-rw-r--r--externals/gridflow/bundled/pd/g_canvas.h645
-rw-r--r--externals/gridflow/cpu/mmx.rb225
-rw-r--r--externals/gridflow/devices4ruby/ChangeLog12
-rw-r--r--externals/gridflow/devices4ruby/ParallelPort.rb72
-rw-r--r--externals/gridflow/devices4ruby/README27
-rw-r--r--externals/gridflow/devices4ruby/SoundMixer.rb152
-rw-r--r--externals/gridflow/devices4ruby/SoundPCM.rb102
-rw-r--r--externals/gridflow/devices4ruby/extconf.rb112
-rw-r--r--externals/gridflow/devices4ruby/ioctl.rb66
-rw-r--r--externals/gridflow/doc/Makefile2
-rw-r--r--externals/gridflow/doc/architecture.html217
-rw-r--r--externals/gridflow/doc/architecture.xml395
-rw-r--r--externals/gridflow/doc/flow_classes/#+-help.pd364
-rw-r--r--externals/gridflow/doc/flow_classes/#-help.pd309
-rw-r--r--externals/gridflow/doc/flow_classes/#-icon.pngbin198 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#apply_colormap_channelwise-icon.pngbin521 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#cast-help.pd45
-rw-r--r--externals/gridflow/doc/flow_classes/#cast-icon.pngbin307 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#checkers-icon.pngbin294 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#clip-help.pd67
-rw-r--r--externals/gridflow/doc/flow_classes/#color-icon.pngbin549 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#complex_sq-icon.pngbin319 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#contrast-help.pd46
-rw-r--r--externals/gridflow/doc/flow_classes/#contrast-icon.pngbin289 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#convolve-icon.pngbin281 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#dim-help.pd32
-rw-r--r--externals/gridflow/doc/flow_classes/#dim-icon.pngbin223 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#downscale_by-icon.pngbin353 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#draw_image-icon.pngbin367 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#draw_polygon-icon.pngbin404 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#export-icon.pngbin263 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#export_list-icon.pngbin337 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#export_symbol-icon.pngbin366 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#fade-help.pd80
-rw-r--r--externals/gridflow/doc/flow_classes/#fade-icon.pngbin242 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#fade_lin-icon.pngbin295 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#finished-icon.pngbin291 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#fold-icon.pngbin255 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#for-icon.pngbin305 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#grade-icon.pngbin256 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#greyscale_to_rgb-icon.pngbin393 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#import-icon.pngbin428 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#in-help.pd135
-rw-r--r--externals/gridflow/doc/flow_classes/#inner-icon.pngbin287 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#join-icon.pngbin265 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#layer-icon.pngbin268 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#numop-help.pd366
-rw-r--r--externals/gridflow/doc/flow_classes/#outer-icon.pngbin270 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#pack-help.pd75
-rw-r--r--externals/gridflow/doc/flow_classes/#pack-icon.pngbin252 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#pack_and_#unpack-help.pd85
-rw-r--r--externals/gridflow/doc/flow_classes/#perspective-icon.pngbin337 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#posterize-icon.pngbin309 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#print-help.pd68
-rw-r--r--externals/gridflow/doc/flow_classes/#print-help2.pd113
-rw-r--r--externals/gridflow/doc/flow_classes/#print-icon.pngbin250 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#ravel-icon.pngbin258 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#redim-icon.pngbin326 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#remap_image-help.pd73
-rw-r--r--externals/gridflow/doc/flow_classes/#remap_image-icon.pngbin323 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#reverse-help.pd46
-rw-r--r--externals/gridflow/doc/flow_classes/#rgb_to_greyscale-icon.pngbin407 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#rgb_to_yuv-help.pd11
-rw-r--r--externals/gridflow/doc/flow_classes/#rgb_to_yuv-icon.pngbin328 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#rgb_to_yuv_and_#yuv_to_rgb-help.pd44
-rw-r--r--externals/gridflow/doc/flow_classes/#rotate-icon.pngbin261 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#scale_by-icon.pngbin311 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#scale_to-icon.pngbin287 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#scan-icon.pngbin262 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#solarize-icon.pngbin294 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#spread-icon.pngbin279 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#store-icon.pngbin253 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#transpose-icon.pngbin311 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#type-icon.pngbin253 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/#unpack-#pack-help.pd45
-rw-r--r--externals/gridflow/doc/flow_classes/#yuv_to_rgb-icon.pngbin315 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/@complex_sq-icon.pngbin336 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/@global-icon.pngbin264 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/@join-icon.pngbin242 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/bindpatcher-icon.pngbin299 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/demux-icon.pngbin235 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/exec-help.pd13
-rw-r--r--externals/gridflow/doc/flow_classes/exec-icon.pngbin219 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/foreach-icon.pngbin255 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/fork-icon.pngbin218 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/fps-icon.pngbin317 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/inv+-icon.pngbin219 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/inv_mul-icon.pngbin226 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/listappend-icon.pngbin302 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/listelement-help.pd61
-rw-r--r--externals/gridflow/doc/flow_classes/listelement-icon.pngbin331 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/listflatten-icon.pngbin305 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/listlength-icon.pngbin308 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/listmake-icon.pngbin287 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/listprepend-icon.pngbin320 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/listreverse-icon.pngbin312 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/listsublist-icon.pngbin375 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/ls-help.pd21
-rw-r--r--externals/gridflow/doc/flow_classes/ls-icon.pngbin203 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/messageappend-icon.pngbin329 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/messageprepend-icon.pngbin344 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/oneshot-icon.pngbin261 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/pd_netreceive-icon.pngbin400 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/pd_netsend-icon.pngbin476 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/pingpong-icon.pngbin248 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/plotter_control-help.pd64
-rw-r--r--externals/gridflow/doc/flow_classes/plotter_control-icon.pngbin327 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/printargs-icon.pngbin285 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/range-icon.pngbin230 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/renamefile-help.pd9
-rw-r--r--externals/gridflow/doc/flow_classes/renamefile-icon.pngbin280 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/rubyarray.pngbin288 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/rubyprint-icon.pngbin285 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/rubysprintf-icon.pngbin339 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/shunt-icon.pngbin265 -> 0 bytes
-rw-r--r--externals/gridflow/doc/flow_classes/unix_time-help.pd29
-rw-r--r--externals/gridflow/doc/flow_classes/unix_time-icon.pngbin292 -> 0 bytes
-rw-r--r--externals/gridflow/doc/format.html485
-rw-r--r--externals/gridflow/doc/format.xml780
-rw-r--r--externals/gridflow/doc/format/#camera-icon.pngbin302 -> 0 bytes
-rw-r--r--externals/gridflow/doc/format/#in-help.pd189
-rw-r--r--externals/gridflow/doc/format/#in-icon.pngbin252 -> 0 bytes
-rw-r--r--externals/gridflow/doc/format/#mouse-icon.pngbin287 -> 0 bytes
-rw-r--r--externals/gridflow/doc/format/#out-icon.pngbin215 -> 0 bytes
-rw-r--r--externals/gridflow/doc/format/#peephole-icon.pngbin319 -> 0 bytes
-rw-r--r--externals/gridflow/doc/format/#quicktime-help.pd10
-rw-r--r--externals/gridflow/doc/format/#videodev-help.pd15
-rw-r--r--externals/gridflow/doc/format/aalib-icon.pngbin338 -> 0 bytes
-rw-r--r--externals/gridflow/doc/format/jpeg-icon.pngbin474 -> 0 bytes
-rw-r--r--externals/gridflow/doc/format/opengrid-icon.pngbin406 -> 0 bytes
-rw-r--r--externals/gridflow/doc/format/openmpeg-icon.pngbin409 -> 0 bytes
-rw-r--r--externals/gridflow/doc/format/openppm-icon.pngbin394 -> 0 bytes
-rw-r--r--externals/gridflow/doc/format/opentarga-icon.pngbin418 -> 0 bytes
-rw-r--r--externals/gridflow/doc/format/openx11-icon.pngbin336 -> 0 bytes
-rw-r--r--externals/gridflow/doc/format/png-icon.pngbin451 -> 0 bytes
-rw-r--r--externals/gridflow/doc/format/quartz-icon.pngbin360 -> 0 bytes
-rw-r--r--externals/gridflow/doc/format/quicktime-icon.pngbin528 -> 0 bytes
-rw-r--r--externals/gridflow/doc/format/sdl-icon.pngbin331 -> 0 bytes
-rw-r--r--externals/gridflow/doc/format/videodev-icon.pngbin425 -> 0 bytes
-rw-r--r--externals/gridflow/doc/format/window-icon.pngbin299 -> 0 bytes
-rw-r--r--externals/gridflow/doc/format/window2-icon.pngbin358 -> 0 bytes
-rw-r--r--externals/gridflow/doc/gridflow.css15
-rw-r--r--externals/gridflow/doc/images/black.pngbin85 -> 0 bytes
-rw-r--r--externals/gridflow/doc/images/crop_icons12
-rw-r--r--externals/gridflow/doc/images/pingpong.pngbin765 -> 0 bytes
-rw-r--r--externals/gridflow/doc/images/see_screenshot.pngbin870 -> 0 bytes
-rw-r--r--externals/gridflow/doc/images/titre_gridflow.pngbin2530 -> 0 bytes
-rw-r--r--externals/gridflow/doc/index.html149
-rw-r--r--externals/gridflow/doc/install.html122
-rw-r--r--externals/gridflow/doc/install.xml140
-rw-r--r--externals/gridflow/doc/internals.html206
-rw-r--r--externals/gridflow/doc/internals.xml228
-rw-r--r--externals/gridflow/doc/introduction.html125
-rw-r--r--externals/gridflow/doc/license.html75
-rw-r--r--externals/gridflow/doc/moulinette.rb660
-rw-r--r--externals/gridflow/doc/op/abs-icon.pngbin268 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/add-icon.pngbin198 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/and-icon.pngbin209 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/atan-icon.pngbin248 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/avg-icon.pngbin243 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/bus-icon.pngbin247 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/clip+-icon.pngbin263 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/clip--icon.pngbin255 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/cmp-icon.pngbin240 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/cos-icon.pngbin250 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/div-icon.pngbin203 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/div2-icon.pngbin236 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/dom-icon.pngbin286 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/eq-icon.pngbin205 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/gamma-icon.pngbin258 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/gcd-icon.pngbin241 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/ge-icon.pngbin212 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/gt-icon.pngbin197 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/hypot-icon.pngbin273 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/ignore-icon.pngbin276 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/lcm-icon.pngbin227 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/le-icon.pngbin214 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/log-icon.pngbin248 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/lt-icon.pngbin196 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/max-icon.pngbin238 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/mer-icon.pngbin293 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/min-icon.pngbin233 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/mod-icon.pngbin213 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/mul-icon.pngbin203 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/ne-icon.pngbin209 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/or-icon.pngbin185 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/pow-icon.pngbin210 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/put-icon.pngbin227 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/rand-icon.pngbin246 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/rem-icon.pngbin236 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/sc_and-icon.pngbin228 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/sc_or-icon.pngbin183 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/shl-icon.pngbin204 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/shr-icon.pngbin204 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/sin-icon.pngbin257 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/sq-icon.pngbin241 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/sqrt-icon.pngbin264 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/sub-icon.pngbin189 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/tanh-icon.pngbin264 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/vid-icon.pngbin250 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/vid2-icon.pngbin313 -> 0 bytes
-rw-r--r--externals/gridflow/doc/op/xor-icon.pngbin200 -> 0 bytes
-rw-r--r--externals/gridflow/doc/profiling.html151
-rw-r--r--externals/gridflow/doc/project_policy.html98
-rw-r--r--externals/gridflow/doc/project_policy.xml99
-rw-r--r--externals/gridflow/doc/reference.html1165
-rw-r--r--externals/gridflow/doc/reference.xml1607
-rwxr-xr-xexternals/gridflow/doc/tutorials/0-0-intro_page.pd89
-rwxr-xr-xexternals/gridflow/doc/tutorials/2-3-4-image-modification-2-remap-image.pd55
-rwxr-xr-xexternals/gridflow/doc/tutorials/2-3-5-image-modification-2-convolve.pd120
-rwxr-xr-xexternals/gridflow/doc/tutorials/2-3-6-image-modification-2-cross-fade.pd93
-rwxr-xr-xexternals/gridflow/doc/tutorials/2nd-part-numop.pd80
-rwxr-xr-xexternals/gridflow/doc/tutorials/3-1-0-open-video.pd38
-rwxr-xr-xexternals/gridflow/doc/tutorials/3-2-video-manipulation.pd1
-rwxr-xr-xexternals/gridflow/doc/tutorials/3-3-record-video.pd51
-rwxr-xr-xexternals/gridflow/doc/tutorials/4-0-open-live-stream.pd24
-rwxr-xr-xexternals/gridflow/doc/tutorials/4-1-2-simple-motion-detection-absolute-value.pd31
-rwxr-xr-xexternals/gridflow/doc/tutorials/4-1-3-motion-detection-more-advanced-and-more-options.pd49
-rwxr-xr-xexternals/gridflow/doc/tutorials/4-1-simple-motion-detection.pd37
-rwxr-xr-xexternals/gridflow/doc/tutorials/PD-GF-Lecture.pd80
-rwxr-xr-xexternals/gridflow/doc/tutorials/PD-Lecture.pd64
-rwxr-xr-xexternals/gridflow/doc/tutorials/colors.pd12
-rw-r--r--externals/gridflow/doc/tutorials/d_gf_2_0-Intro_to_images_open_image.pd62
-rw-r--r--externals/gridflow/doc/tutorials/d_gf_2_2_1-image-modification-1-numop-all-in-one2.pd127
-rw-r--r--externals/gridflow/doc/tutorials/d_gf_2_2_2.pd68
-rwxr-xr-xexternals/gridflow/doc/tutorials/gf_1_0-Introduction_to_grids.pd98
-rw-r--r--externals/gridflow/doc/tutorials/gf_2-2-3-resize-image_dec_2005.pd60
-rw-r--r--externals/gridflow/doc/tutorials/gf_2-2-4-greyscale_dec_2005.pd27
-rwxr-xr-xexternals/gridflow/doc/tutorials/gf_2_0-Intro_to_images_open_image.pd62
-rwxr-xr-xexternals/gridflow/doc/tutorials/gf_2_2_1-image-modification-1-numop-all-in-one2.pd127
-rw-r--r--externals/gridflow/doc/tutorials/gf_2_2_2.pd68
-rwxr-xr-xexternals/gridflow/doc/tutorials/grid-intro.pd10
-rwxr-xr-xexternals/gridflow/doc/tutorials/probably_not_good_2-3-0-1-image-modification-1-numop-all-in-one.pd123
-rw-r--r--externals/gridflow/doc/tutorials/probably_not_good_2-3-0-2.pd61
-rwxr-xr-xexternals/gridflow/doc/tutorials/pure-data-1.pd71
-rwxr-xr-xexternals/gridflow/doc/tutorials/pure-data-2.pd73
-rwxr-xr-xexternals/gridflow/doc/tutorials/pure-data-3.pd70
-rwxr-xr-xexternals/gridflow/doc/tutorials/pure-data-4.pd87
-rwxr-xr-xexternals/gridflow/doc/tutorials/pure-data-5.pd108
-rwxr-xr-xexternals/gridflow/doc/tutorials/pure-data-6.pd92
-rwxr-xr-xexternals/gridflow/doc/tutorials/pure-data-7.pd106
-rwxr-xr-xexternals/gridflow/doc/tutorials/pure-data-8.pd89
-rwxr-xr-xexternals/gridflow/doc/tutorials/pure-data-9.pd43
-rwxr-xr-xexternals/gridflow/doc/tutorials/randomly-select-an-image.pd53
-rwxr-xr-xexternals/gridflow/doc/tutorials/title-page-pd-gf-in-one.pd129
-rwxr-xr-xexternals/gridflow/doc/tutorials/txt-for-resize-image.pd3
-rw-r--r--externals/gridflow/examples/bounce.pd32
-rw-r--r--externals/gridflow/examples/doodle.pd31
-rw-r--r--externals/gridflow/examples/heat.pd173
-rw-r--r--externals/gridflow/examples/markov.pd133
-rw-r--r--externals/gridflow/examples/mechanics.pd121
-rw-r--r--externals/gridflow/extra/gf.valgrind242
-rw-r--r--externals/gridflow/extra/jmax_format.rb167
-rw-r--r--externals/gridflow/extra/puredata_format.rb129
-rw-r--r--externals/gridflow/extra/ruby.valgrind82
-rw-r--r--externals/gridflow/extra/server_1_grid.rb26
-rw-r--r--externals/gridflow/extra/server_1_ppm.rb20
-rw-r--r--externals/gridflow/extra/server_2.rb65
-rw-r--r--externals/gridflow/extra/smpte.rb23
-rw-r--r--externals/gridflow/format/aalib.c168
-rw-r--r--externals/gridflow/format/dc1394.c346
-rw-r--r--externals/gridflow/format/jpeg.c138
-rw-r--r--externals/gridflow/format/main.rb807
-rw-r--r--externals/gridflow/format/mpeg3.c98
-rw-r--r--externals/gridflow/format/opengl.c181
-rw-r--r--externals/gridflow/format/png.c138
-rw-r--r--externals/gridflow/format/quartz.m241
-rw-r--r--externals/gridflow/format/quicktimeapple.c500
-rw-r--r--externals/gridflow/format/quicktimehw.c243
-rw-r--r--externals/gridflow/format/sdl.c123
-rw-r--r--externals/gridflow/format/videodev.c544
-rw-r--r--externals/gridflow/format/x11.c669
-rw-r--r--externals/gridflow/images/README53
-rw-r--r--externals/gridflow/images/b001.jpgbin29530 -> 0 bytes
-rw-r--r--externals/gridflow/images/babbage.jpgbin41468 -> 0 bytes
-rw-r--r--externals/gridflow/images/bluemarble.jpgbin29054 -> 0 bytes
-rw-r--r--externals/gridflow/images/g001.jpgbin53775 -> 0 bytes
-rw-r--r--externals/gridflow/images/lada.jpgbin121288 -> 0 bytes
-rw-r--r--externals/gridflow/images/lena.jpgbin69363 -> 0 bytes
-rw-r--r--externals/gridflow/images/lucida-typewriter-12.grid.gzbin2203 -> 0 bytes
-rw-r--r--externals/gridflow/images/opensource.pngbin76504 -> 0 bytes
-rw-r--r--externals/gridflow/images/r001.jpgbin25505 -> 0 bytes
-rw-r--r--externals/gridflow/images/rose.jpgbin5756 -> 0 bytes
-rw-r--r--externals/gridflow/images/ruby0216.jpgbin66462 -> 0 bytes
-rw-r--r--externals/gridflow/images/teapot.pngbin34407 -> 0 bytes
-rw-r--r--externals/gridflow/images/test.mpegbin345 -> 0 bytes
-rw-r--r--externals/gridflow/images/tux.tga.gzbin20629 -> 0 bytes
-rw-r--r--externals/gridflow/optional/lti.rb5
-rw-r--r--externals/gridflow/optional/rblti/LICENSE462
-rw-r--r--externals/gridflow/optional/rblti/Makefile47
-rw-r--r--externals/gridflow/optional/rblti/gen_ltilib_classes.py354
-rw-r--r--externals/gridflow/optional/rblti/lti_manual.h7
-rw-r--r--externals/gridflow/optional/rblti/rblti.i775
-rw-r--r--externals/gridflow/optional/rblti/std_list_ruby.i28
-rw-r--r--externals/gridflow/optional/usb.c359
-rw-r--r--externals/gridflow/optional/usb.rb107
-rw-r--r--externals/gridflow/pd_abstractions/#apply_colormap_channelwise.pd12
-rw-r--r--externals/gridflow/pd_abstractions/#camera.pd149
-rw-r--r--externals/gridflow/pd_abstractions/#camera_control.pd129
-rw-r--r--externals/gridflow/pd_abstractions/#centre_of_gravity.pd113
-rw-r--r--externals/gridflow/pd_abstractions/#centroid.pd80
-rw-r--r--externals/gridflow/pd_abstractions/#checkers.pd18
-rw-r--r--externals/gridflow/pd_abstractions/#clip.pd20
-rw-r--r--externals/gridflow/pd_abstractions/#color.pd75
-rw-r--r--externals/gridflow/pd_abstractions/#contrast.pd20
-rw-r--r--externals/gridflow/pd_abstractions/#fade.pd37
-rw-r--r--externals/gridflow/pd_abstractions/#fade_lin.pd29
-rw-r--r--externals/gridflow/pd_abstractions/#greyscale_to_rgb.pd8
-rw-r--r--externals/gridflow/pd_abstractions/#hueshift.pd31
-rw-r--r--externals/gridflow/pd_abstractions/#motion_detection.pd64
-rw-r--r--externals/gridflow/pd_abstractions/#mouse.pd93
-rw-r--r--externals/gridflow/pd_abstractions/#posterize.pd15
-rw-r--r--externals/gridflow/pd_abstractions/#ravel.pd15
-rw-r--r--externals/gridflow/pd_abstractions/#remap_image.pd21
-rw-r--r--externals/gridflow/pd_abstractions/#rgb_to_greyscale.pd10
-rw-r--r--externals/gridflow/pd_abstractions/#rgb_to_yuv.pd10
-rw-r--r--externals/gridflow/pd_abstractions/#solarize.pd14
-rw-r--r--externals/gridflow/pd_abstractions/#spread.pd22
-rw-r--r--externals/gridflow/pd_abstractions/#text_to_image.pd41
-rw-r--r--externals/gridflow/pd_abstractions/#yuv_to_rgb.pd10
-rw-r--r--externals/gridflow/pd_abstractions/@complex_sq.pd8
-rw-r--r--externals/gridflow/pd_abstractions/count.pd44
-rw-r--r--externals/gridflow/pd_abstractions/pingpong.pd27
-rw-r--r--externals/gridflow/pd_examples/binary_operations.pd73
-rw-r--r--externals/gridflow/pd_examples/blob.pd106
-rw-r--r--externals/gridflow/pd_examples/cellular_1d.pd160
-rw-r--r--externals/gridflow/pd_examples/color_correction.pd154
-rw-r--r--externals/gridflow/pd_examples/color_detect.pd218
-rw-r--r--externals/gridflow/pd_examples/convolve.pd94
-rw-r--r--externals/gridflow/pd_examples/cross_fade.pd74
-rw-r--r--externals/gridflow/pd_examples/drag_rectangle.pd110
-rw-r--r--externals/gridflow/pd_examples/eclipse.pd80
-rw-r--r--externals/gridflow/pd_examples/epicycloid.pd125
-rw-r--r--externals/gridflow/pd_examples/feedback_fractal.pd147
-rw-r--r--externals/gridflow/pd_examples/fire.pd289
-rw-r--r--externals/gridflow/pd_examples/game_of_life.pd65
-rw-r--r--externals/gridflow/pd_examples/goop.pd138
-rw-r--r--externals/gridflow/pd_examples/hello-world.pd50
-rw-r--r--externals/gridflow/pd_examples/image_stats.pd62
-rw-r--r--externals/gridflow/pd_examples/linear_transform.pd215
-rw-r--r--externals/gridflow/pd_examples/motion_detect.pd44
-rw-r--r--externals/gridflow/pd_examples/nervous_video.pd154
-rw-r--r--externals/gridflow/pd_examples/photo_pianoroll.pd158
-rw-r--r--externals/gridflow/pd_examples/plot.pd73
-rw-r--r--externals/gridflow/pd_examples/polygon.pd123
-rw-r--r--externals/gridflow/pd_examples/ripple.pd190
-rw-r--r--externals/gridflow/pd_examples/sand.pd415
-rw-r--r--externals/gridflow/pd_examples/saturation.pd81
-rw-r--r--externals/gridflow/pd_examples/scratch_video.pd121
-rw-r--r--externals/gridflow/pd_examples/spectrogram.pd108
-rw-r--r--externals/gridflow/pd_examples/threshold.pd78
-rw-r--r--externals/gridflow/pd_examples/transform.pd61
-rw-r--r--externals/gridflow/pd_examples/videodev_effects.pd313
-rw-r--r--externals/gridflow/pd_examples/waves.pd360
-rw-r--r--externals/gridflow/pd_help/@!.pd65
-rw-r--r--externals/gridflow/pd_help/@.pd115
-rw-r--r--externals/gridflow/pd_help/@apply_colormap_channelwise.pd29
-rw-r--r--externals/gridflow/pd_help/@cast.pd57
-rw-r--r--externals/gridflow/pd_help/@checkers.pd13
-rw-r--r--externals/gridflow/pd_help/@complex_sq.pd27
-rw-r--r--externals/gridflow/pd_help/@convolve.pd40
-rw-r--r--externals/gridflow/pd_help/@downscale_by.pd26
-rw-r--r--externals/gridflow/pd_help/@draw_polygon.pd36
-rw-r--r--externals/gridflow/pd_help/@finished.pd15
-rw-r--r--externals/gridflow/pd_help/@fold.pd39
-rw-r--r--externals/gridflow/pd_help/@foldinnerouter.pd94
-rw-r--r--externals/gridflow/pd_help/@for.pd16
-rw-r--r--externals/gridflow/pd_help/@global.pd9
-rw-r--r--externals/gridflow/pd_help/@grade.pd20
-rw-r--r--externals/gridflow/pd_help/@greyscale_to_rgb.pd21
-rw-r--r--externals/gridflow/pd_help/@importexport.pd51
-rw-r--r--externals/gridflow/pd_help/@inner2.pd17
-rw-r--r--externals/gridflow/pd_help/@inout.pd63
-rw-r--r--externals/gridflow/pd_help/@join.pd42
-rw-r--r--externals/gridflow/pd_help/@layer.pd46
-rw-r--r--externals/gridflow/pd_help/@perspective.pd29
-rw-r--r--externals/gridflow/pd_help/@posterize.pd36
-rw-r--r--externals/gridflow/pd_help/@print.pd28
-rw-r--r--externals/gridflow/pd_help/@ravel.pd31
-rw-r--r--externals/gridflow/pd_help/@redim.pd21
-rw-r--r--externals/gridflow/pd_help/@rgb_to_greyscale.pd19
-rw-r--r--externals/gridflow/pd_help/@scale_by.pd30
-rw-r--r--externals/gridflow/pd_help/@scale_to.pd34
-rw-r--r--externals/gridflow/pd_help/@scan.pd26
-rw-r--r--externals/gridflow/pd_help/@solarize.pd25
-rw-r--r--externals/gridflow/pd_help/@spread.pd64
-rw-r--r--externals/gridflow/pd_help/@store.pd48
-rw-r--r--externals/gridflow/pd_help/@twothreefour.pd70
-rw-r--r--externals/gridflow/pd_help/help_count.pd15
-rw-r--r--externals/gridflow/pd_help/help_fade.pd19
-rw-r--r--externals/gridflow/pd_help/help_motion_detect.pd76
-rw-r--r--externals/gridflow/pd_help/help_mouse.pd55
-rw-r--r--externals/gridflow/pd_help/help_record.pd29
-rw-r--r--externals/gridflow/pd_help/live_video_feed.pd38
-rw-r--r--externals/gridflow/pd_help/modify_an_image.pd33
-rw-r--r--externals/gridflow/pd_help/printargs.pd10
-rw-r--r--externals/gridflow/pd_help/rubyprint.pd26
416 files changed, 0 insertions, 37076 deletions
diff --git a/externals/gridflow/base/bitpacking.c b/externals/gridflow/base/bitpacking.c
deleted file mode 100644
index cb09a812..00000000
--- a/externals/gridflow/base/bitpacking.c
+++ /dev/null
@@ -1,313 +0,0 @@
-/*
- $Id: bitpacking.c,v 1.2 2006-03-15 04:37:06 matju Exp $
-
- GridFlow
- Copyright (c) 2001,2002,2003,2004 by Mathieu Bouchard
-
- 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.
-
- See file ../COPYING for further informations on licensing terms.
-
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include "grid.h.fcs"
-#include <math.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-//#define CONVERT0(z) (((in[z] << hb[z]) >> 7) & mask[z])
-#define CONVERT0(z) ((in[z] >> chop[z]) << slide[z])
-
-#define CONVERT1 t = \
- CONVERT0(0) | CONVERT0(1) | CONVERT0(2)
-
-#define CONVERT2 \
- for (t=0,i=0; i<self->size; i++) t |= CONVERT0(i);
-
-#define CONVERT3 \
- for (t=0,i=0; i<self->size; i++) \
- t |= (((unsigned)in[i]>>(7-hb[i]))|(in[i]<<(hb[i]-7))) & mask[i];
-
-#define WRITE_LE \
- for (int bytes = self->bytes; bytes; bytes--, t>>=8) *out++ = t;
-
-#define WRITE_BE { int bytes; \
- bytes = self->bytes; \
- while (bytes--) { out[bytes] = t; t>>=8; }\
- out += self->bytes; }
-
-/* this macro would be faster if the _increment_
- was done only once every loop. or maybe gcc does it, i dunno */
-#define NTIMES(_x_) \
- for (; n>=4; n-=4) { _x_ _x_ _x_ _x_ } \
- for (; n; n--) { _x_ }
-
-/* this could be faster (use asm) */
-void swap32 (int n, Pt<uint32> data) {
- NTIMES({
- uint32 x = *data;
- x = (x<<16) | (x>>16);
- x = ((x&0xff00ff)<<8) | ((x>>8)&0xff00ff);
- *data++ = x;
- })
-}
-
-/* this could be faster (use asm or do it in int32 chunks) */
-void swap16 (int n, Pt<uint16> data) {
- NTIMES({ uint16 x = *data; *data++ = (x<<8) | (x>>8); })
-}
-
-/* **************************************************************** */
-
-template <class T>
-static void default_pack(BitPacking *self, int n, Pt<T> in, Pt<uint8> out) {
- uint32 t;
- int i;
- int sameorder = self->endian==2 || self->endian==::is_le();
- int size = self->size;
- uint32 mask[4]; memcpy(mask,self->mask,size*sizeof(uint32));
- uint32 hb[4]; for (i=0; i<size; i++) hb[i] = highest_bit(mask[i]);
- uint32 span[4]; for (i=0; i<size; i++) span[i] = hb[i] - lowest_bit(mask[i]);
- uint32 chop[4]; for (i=0; i<size; i++) chop[i] = 7-span[i];
- uint32 slide[4]; for (i=0; i<size; i++) slide[i] = hb[i]-span[i];
-
- if (sameorder && size==3) {
- switch(self->bytes) {
- case 2: NTIMES(CONVERT1; *((int16 *)out)=t; out+=2; in+=3;) return;
- case 4: NTIMES(CONVERT1; *((int32 *)out)=t; out+=4; in+=3;) return;
- }
- }
- if (self->is_le()) {
- switch (size) {
- case 3: for (; n--; in+=3) {CONVERT1; WRITE_LE;} break;
- case 4: for (; n--; in+=4) {CONVERT1; WRITE_LE;} break;
- default:for (; n--; in+=size) {CONVERT2; WRITE_LE;}}
- } else {
- switch (size) {
- case 3: for (; n--; in+=3) {CONVERT1; WRITE_BE;} break;
- case 4: for (; n--; in+=4) {CONVERT1; WRITE_BE;} break;
- default:for (; n--; in+=size) {CONVERT2; WRITE_BE;}}
- }
-}
-
-#define LOOP_UNPACK(_reader_) \
- for (; n; n--) { \
- int bytes=0; uint32 temp=0; _reader_; \
- for (int i=0; i<self->size; i++, out++) { \
- uint32 t=temp&self->mask[i]; \
- *out = (t<<(7-hb[i]))|(t>>(hb[i]-7)); \
- } \
- }
-// *out++ = ((temp & self->mask[i]) << 7) >> hb[i];
-
-template <class T>
-static void default_unpack(BitPacking *self, int n, Pt<uint8> in, Pt<T> out) {
- int hb[4];
- for (int i=0; i<self->size; i++) hb[i] = highest_bit(self->mask[i]);
- if (is_le()) { // smallest byte first
- LOOP_UNPACK(
- for(; self->bytes>bytes; bytes++, in++) temp |= *in<<(8*bytes);
- )
- } else { // biggest byte first
- LOOP_UNPACK(
- bytes=self->bytes; for (; bytes; bytes--, in++) temp=(temp<<8)|*in;
- )
- }
-}
-
-/* **************************************************************** */
-
-template <class T>
-static void pack2_565(BitPacking *self, int n, Pt<T> in, Pt<uint8> out) {
- const int hb[3] = {15,10,4};
- const uint32 mask[3] = {0x0000f800,0x000007e0,0x0000001f};
- uint32 span[3] = {4,5,4};
- uint32 chop[3] = {3,2,3};
- uint32 slide[3] = {11,5,0};
- uint32 t;
- NTIMES(CONVERT1; *((short *)out)=t; out+=2; in+=3;)
-}
-
-template <class T>
-static void pack3_888(BitPacking *self, int n, Pt<T> in, Pt<uint8> out) {
- Pt<int32> o32 = (Pt<int32>)out;
- while (n>=4) {
- o32[0] = (in[5]<<24) | (in[ 0]<<16) | (in[ 1]<<8) | in[2];
- o32[1] = (in[7]<<24) | (in[ 8]<<16) | (in[ 3]<<8) | in[4];
- o32[2] = (in[9]<<24) | (in[10]<<16) | (in[11]<<8) | in[6];
- o32+=3; in+=12;
- n-=4;
- }
- out = (Pt<uint8>)o32;
- NTIMES( out[2]=in[0]; out[1]=in[1]; out[0]=in[2]; out+=3; in+=3; )
-}
-
-/*
-template <>
-static void pack3_888(BitPacking *self, int n, Pt<uint8> in, Pt<uint8> out) {
- Pt<uint32> o32 = Pt<uint32>((uint32 *)out.p,n*3/4);
- Pt<uint32> i32 = Pt<uint32>((uint32 *)in.p,n*3/4);
- while (n>=4) {
-#define Z(w,i) ((word##w>>(i*8))&255)
- uint32 word0 = i32[0];
- uint32 word1 = i32[1];
- uint32 word2 = i32[2];
- o32[0] = (Z(1,1)<<24) | (Z(0,0)<<16) | (Z(0,1)<<8) | Z(0,2);
- o32[1] = (Z(1,3)<<24) | (Z(2,0)<<16) | (Z(0,3)<<8) | Z(1,0);
- o32[2] = (Z(2,1)<<24) | (Z(2,2)<<16) | (Z(2,3)<<8) | Z(1,2);
- o32+=3; i32+=3;
- n-=4;
- }
-#undef Z
- out = (Pt<uint8>)o32;
- in = (Pt<uint8>)i32;
- NTIMES( out[2]=in[0]; out[1]=in[1]; out[0]=in[2]; out+=3; in+=3; )
-}
-*/
-
-template <class T>
-static void pack3_888b(BitPacking *self, int n, Pt<T> in, Pt<uint8> out) {
- Pt<int32> o32 = (Pt<int32>)out;
- while (n>=4) {
- o32[0] = (in[0]<<16) | (in[1]<<8) | in[2];
- o32[1] = (in[3]<<16) | (in[4]<<8) | in[5];
- o32[2] = (in[6]<<16) | (in[7]<<8) | in[8];
- o32[3] = (in[9]<<16) | (in[10]<<8) | in[11];
- o32+=4; in+=12;
- n-=4;
- }
- NTIMES( o32[0] = (in[0]<<16) | (in[1]<<8) | in[2]; o32++; in+=3; )
-}
-
-// (R,G,B,?) -> B:8,G:8,R:8,0:8
-// fishy
-template <class T>
-static void pack3_bgrn8888(BitPacking *self, int n, Pt<T> in, Pt<uint8> out) {
-/* NTIMES( out[2]=in[0]; out[1]=in[1]; out[0]=in[2]; out+=4; in+=4; ) */
- Pt<int32> i32 = (Pt<int32>)in;
- Pt<int32> o32 = (Pt<int32>)out;
- while (n>=4) {
- o32[0] = ((i32[0]&0xff)<<16) | (i32[0]&0xff00) | ((i32[0]>>16)&0xff);
- o32[1] = ((i32[1]&0xff)<<16) | (i32[1]&0xff00) | ((i32[1]>>16)&0xff);
- o32[2] = ((i32[2]&0xff)<<16) | (i32[2]&0xff00) | ((i32[2]>>16)&0xff);
- o32[3] = ((i32[3]&0xff)<<16) | (i32[3]&0xff00) | ((i32[3]>>16)&0xff);
- o32+=4; i32+=4; n-=4;
- }
- NTIMES( o32[0] = ((i32[0]&0xff)<<16) | (i32[0]&0xff00) | ((i32[0]>>16)&0xff); o32++; i32++; )
-}
-
-static uint32 bp_masks[][4] = {
- {0x0000f800,0x000007e0,0x0000001f,0},
- {0x00ff0000,0x0000ff00,0x000000ff,0},
-};
-
-static Packer bp_packers[] = {
- {default_pack, default_pack, default_pack},
- {pack2_565, pack2_565, pack2_565},
- {pack3_888, pack3_888, pack3_888},
- {pack3_888b, default_pack, default_pack},
- {pack3_bgrn8888, default_pack, default_pack},
-};
-
-static Unpacker bp_unpackers[] = {
- {default_unpack, default_unpack, default_unpack},
-};
-
-static BitPacking builtin_bitpackers[] = {
- BitPacking(2, 2, 3, bp_masks[0], &bp_packers[1], &bp_unpackers[0]),
- BitPacking(1, 3, 3, bp_masks[1], &bp_packers[2], &bp_unpackers[0]),
- BitPacking(1, 4, 3, bp_masks[1], &bp_packers[3], &bp_unpackers[0]),
- BitPacking(1, 4, 4, bp_masks[1], &bp_packers[4], &bp_unpackers[0]),
-};
-
-/* **************************************************************** */
-
-bool BitPacking::eq(BitPacking *o) {
- if (!(bytes == o->bytes)) return false;
- if (!(size == o->size)) return false;
- for (int i=0; i<size; i++) {
- if (!(mask[i] == o->mask[i])) return false;
- }
- if (endian==o->endian) return true;
- /* same==little on a little-endian; same==big on a big-endian */
- return (endian ^ o->endian ^ ::is_le()) == 2;
-}
-
-BitPacking::BitPacking(int endian, int bytes, int size, uint32 *mask,
-Packer *packer, Unpacker *unpacker) {
- this->endian = endian;
- this->bytes = bytes;
- this->size = size;
- for (int i=0; i<size; i++) this->mask[i] = mask[i];
- if (packer) {
- this->packer = packer;
- this->unpacker = unpacker;
- return;
- }
- int packeri=-1;
- this->packer = &bp_packers[0];
- this->unpacker = &bp_unpackers[0];
-
- for (int i=0; i<(int)(sizeof(builtin_bitpackers)/sizeof(BitPacking)); i++) {
- BitPacking *bp = &builtin_bitpackers[i];
- if (this->eq(bp)) {
- this->packer = bp->packer;
- this->unpacker = bp->unpacker;
- packeri=i;
- goto end;
- }
- }
-end:;
-/*
- ::gfpost("Bitpacking: endian=%d bytes=%d size=%d packeri=%d",
- endian, bytes, size, packeri);
- ::gfpost(" packer=0x%08x unpacker=0x%08x",this->packer,this->unpacker);
- ::gfpost(" mask=[0x%08x,0x%08x,0x%08x,0x%08x]",mask[0],mask[1],mask[2],mask[3]);
-*/
-}
-
-bool BitPacking::is_le() {
- return endian==1 || (endian ^ ::is_le())==3;
-}
-
-template <class T>
-void BitPacking::pack(int n, Pt<T> in, Pt<uint8> out) {
- switch (NumberTypeE_type_of(*in)) {
- case uint8_e: packer->as_uint8(this,n,(Pt<uint8>)in,out); break;
- case int16_e: packer->as_int16(this,n,(Pt<int16>)in,out); break;
- case int32_e: packer->as_int32(this,n,(Pt<int32>)in,out); break;
- default: RAISE("argh");
- }
-}
-
-template <class T>
-void BitPacking::unpack(int n, Pt<uint8> in, Pt<T> out) {
- switch (NumberTypeE_type_of(*out)) {
- case uint8_e: unpacker->as_uint8(this,n,in,(Pt<uint8>)out); break;
- case int16_e: unpacker->as_int16(this,n,in,(Pt<int16>)out); break;
- case int32_e: unpacker->as_int32(this,n,in,(Pt<int32>)out); break;
- default: RAISE("argh");
- }
-}
-
-// i'm sorry... see the end of grid.c for an explanation...
-//static
-void make_hocus_pocus () {
-// exit(1);
-#define FOO(S) \
- ((BitPacking*)0)->pack(0,Pt<S>(),Pt<uint8>()); \
- ((BitPacking*)0)->unpack(0,Pt<uint8>(),Pt<S>());
-EACH_NUMBER_TYPE(FOO)
-#undef FOO
-}
diff --git a/externals/gridflow/base/flow_objects.c b/externals/gridflow/base/flow_objects.c
deleted file mode 100644
index f971553d..00000000
--- a/externals/gridflow/base/flow_objects.c
+++ /dev/null
@@ -1,1195 +0,0 @@
-/*
- $Id: flow_objects.c,v 1.2 2006-03-15 04:37:08 matju Exp $
-
- GridFlow
- Copyright (c) 2001,2002,2003,2004,2005 by Mathieu Bouchard
-
- 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.
-
- See file ../COPYING for further informations on licensing terms.
-
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include <sys/time.h>
-#include <stdlib.h>
-#include <math.h>
-#include "grid.h.fcs"
-
-// BAD HACK: GCC complains: unimplemented (--debug|--debug-harder mode only)
-#ifdef HAVE_DEBUG
-#define SCOPY(a,b,n) COPY(a,b,n)
-#else
-#define SCOPY(a,b,n) SCopy<n>::f(a,b)
-#endif
-
-template <int n> class SCopy {
-public: template <class T> static inline void __attribute__((always_inline)) f(Pt<T> a, Pt<T> b) {
- *a=*b; SCopy<n-1>::f(a+1,b+1);}};
-template <> class SCopy<0> {
-public: template <class T> static inline void __attribute__((always_inline)) f(Pt<T> a, Pt<T> b) {}};
-
-/*template <> class SCopy<4> {
-public: template <class T>
- static inline void __attribute__((always_inline)) f(Pt<T> a, Pt<T> b) {
- *a=*b; SCopy<3>::f(a+1,b+1);}
- // wouldn't gcc 2.95 complain here?
- static inline void __attribute__((always_inline)) f(Pt<uint8> a, Pt<uint8> b)
- { *(int32 *)a=*(int32 *)b; }
-};*/
-
-Numop *op_add, *op_sub, *op_mul, *op_div, *op_mod, *op_shl, *op_and, *op_put;
-
-static void expect_dim_dim_list (P<Dim> d) {
- if (d->n!=1) RAISE("dimension list should be Dim[n], not %s",d->to_s());}
-//static void expect_min_one_dim (P<Dim> d) {
-// if (d->n<1) RAISE("minimum 1 dimension");}
-static void expect_max_one_dim (P<Dim> d) {
- if (d->n>1) { RAISE("expecting Dim[] or Dim[n], got %s",d->to_s()); }}
-//static void expect_exactly_one_dim (P<Dim> d) {
-// if (d->n!=1) { RAISE("expecting Dim[n], got %s",d->to_s()); }}
-
-//****************************************************************
-\class GridCast < GridObject
-struct GridCast : GridObject {
- \attr NumberTypeE nt;
- \decl void initialize (NumberTypeE nt);
- \grin 0
-};
-
-GRID_INLET(GridCast,0) {
- out = new GridOutlet(this,0,in->dim,nt);
-} GRID_FLOW {
- out->send(n,data);
-} GRID_END
-
-\def void initialize (NumberTypeE nt) {
- rb_call_super(argc,argv);
- this->nt = nt;
-}
-
-\classinfo { IEVAL(rself,"install '#cast',1,1"); }
-\end class GridCast
-
-//****************************************************************
-//{ ?,Dim[B] -> Dim[*Cs] }
-// out0 nt to be specified explicitly
-\class GridImport < GridObject
-struct GridImport : GridObject {
- \attr NumberTypeE cast;
- \attr P<Dim> dim; // size of grids to send
- PtrGrid dim_grid;
- GridImport() { dim_grid.constrain(expect_dim_dim_list); }
- ~GridImport() {}
- \decl void initialize(Ruby x, NumberTypeE cast=int32_e);
- \decl void _0_cast(NumberTypeE cast);
- \decl void _0_reset();
- \decl void _0_symbol(Symbol x);
- \decl void _0_list(...);
- \decl void _1_per_message();
- \grin 0
- \grin 1 int32
- template <class T> void process (int n, Pt<T> data) {
- while (n) {
- if (!out || !out->dim) out = new GridOutlet(this,0,dim?dim:in[0]->dim,cast);
- int32 n2 = min((int32)n,out->dim->prod()-out->dex);
- out->send(n2,data);
- n-=n2; data+=n2;
- }
- }
-};
-
-GRID_INLET(GridImport,0) {} GRID_FLOW { process(n,data); } GRID_END
-GRID_INPUT(GridImport,1,dim_grid) { dim = dim_grid->to_dim(); } GRID_END
-
-\def void _0_symbol(Symbol x) {
- const char *name = rb_sym_name(argv[0]);
- int n = strlen(name);
- if (!dim) out=new GridOutlet(this,0,new Dim(n));
- process(n,Pt<uint8>((uint8 *)name,n));
-}
-
-\def void _0_cast(NumberTypeE cast) { this->cast = cast; }
-
-\def void _0_list(...) {
- if (in.size()<1 || !in[0]) _0_grid(0,0); //HACK: enable grid inlet...
- in[0]->from_ruby_list(argc,argv,cast);
-}
-
-\def void _1_per_message() { dim=0; dim_grid=0; }
-
-\def void initialize(Ruby x, NumberTypeE cast) {
- rb_call_super(argc,argv);
- this->cast = cast;
- if (argv[0]!=SYM(per_message)) {
- dim_grid=new Grid(argv[0]);
- dim = dim_grid->to_dim();
- }
-}
-
-\def void _0_reset() {
- STACK_ARRAY(int32,foo,1); *foo=0;
- while (out->dim) out->send(1,foo);
-}
-
-\classinfo { IEVAL(rself,"install '#import',2,1"); }
-\end class GridImport
-
-//****************************************************************
-/*{ Dim[*As] -> ? }*/
-/* in0: integer nt */
-\class GridExport < GridObject
-struct GridExport : GridObject {
- \grin 0
-};
-
-template <class T>
-static Ruby INTORFLOAT2NUM(T value) {return INT2NUM(value);}
-static Ruby INTORFLOAT2NUM(int64 value) {return gf_ll2num(value);}
-static Ruby INTORFLOAT2NUM(float32 value) {return rb_float_new(value);}
-static Ruby INTORFLOAT2NUM(float64 value) {return rb_float_new(value);}
-static Ruby INTORFLOAT2NUM(ruby value) {return value.r;}
-
-GRID_INLET(GridExport,0) {
-} GRID_FLOW {
- for (int i=0; i<n; i++) {
- Ruby a[] = { INT2NUM(0), INTORFLOAT2NUM(data[i]) };
- send_out(COUNT(a),a);
- }
-} GRID_END
-\classinfo { IEVAL(rself,"install '#export',1,1"); }
-\end class GridExport
-
-/* **************************************************************** */
-/*{ Dim[*As] -> ? }*/
-/* in0: integer nt */
-\class GridExportList < GridObject
-struct GridExportList : GridObject {
- Ruby /*Array*/ list;
- int n;
- \grin 0
-};
-
-GRID_INLET(GridExportList,0) {
- int n = in->dim->prod();
- if (n>250000) RAISE("list too big (%d elements)", n);
- list = rb_ary_new2(n+2);
- this->n = n;
- rb_ivar_set(rself,SI(@list),list); // keep
- rb_ary_store(list,0,INT2NUM(0));
- rb_ary_store(list,1,bsym._list);
-} GRID_FLOW {
- for (int i=0; i<n; i++, data++)
- rb_ary_store(list,in->dex+i+2,INTORFLOAT2NUM(*data));
-} GRID_FINISH {
- send_out(rb_ary_len(list),rb_ary_ptr(list));
- list = 0;
- rb_ivar_set(rself,SI(@list),Qnil); // unkeep
-} GRID_END
-
-\classinfo { IEVAL(rself,"install '#export_list',1,1"); }
-\end class GridExportList
-
-/* **************************************************************** */
-// GridStore ("@store") is the class for storing a grid and restituting
-// it on demand. The right inlet receives the grid. The left inlet receives
-// either a bang (which forwards the whole image) or a grid describing what
-// to send.
-//{ Dim[*As,B],Dim[*Cs,*Ds] -> Dim[*As,*Ds] }
-// in0: integer nt
-// in1: whatever nt
-// out0: same nt as in1
-\class GridStore < GridObject
-struct GridStore : GridObject {
- PtrGrid r; // can't be \attr
- PtrGrid put_at; // can't be //\attr
- \attr Numop *op;
- int32 wdex [Dim::MAX_DIM]; // temporary buffer, copy of put_at
- int32 fromb[Dim::MAX_DIM];
- int32 to2 [Dim::MAX_DIM];
- int lsd; // lsd = Last Same Dimension (for put_at)
- int d; // goes with wdex
- \decl void initialize (Grid *r=0);
- \decl void _0_bang ();
- \decl void _0_op (Numop *op);
- \decl void _1_reassign ();
- \decl void _1_put_at (Grid *index);
- \grin 0 int
- \grin 1
- GridStore() { put_at.constrain(expect_max_one_dim); }
- template <class T> void compute_indices(Pt<T> v, int nc, int nd);
-};
-
-// takes the backstore of a grid and puts it back into place. a backstore
-// is a grid that is filled while the grid it would replace has not
-// finished being used.
-static void snap_backstore (PtrGrid &r) {
- if (r.next) {r=r.next.p; r.next=0;}
-}
-
-template <class T> void GridStore::compute_indices(Pt<T> v, int nc, int nd) {
- for (int i=0; i<nc; i++) {
- uint32 wrap = r->dim->v[i];
- bool fast = lowest_bit(wrap)==highest_bit(wrap); // is power of two?
- if (i) {
- if (fast) op_shl->map(nd,v,(T)highest_bit(wrap));
- else op_mul->map(nd,v,(T)wrap);
- }
- if (fast) op_and->map(nd,v+nd*i,(T)(wrap-1));
- else op_mod->map(nd,v+nd*i,(T)(wrap));
- if (i) op_add->zip(nd,v,v+nd*i);
- }
-}
-
-// !@#$ i should ensure that n is not exceedingly large
-// !@#$ worse: the size of the foo buffer may still be too large
-GRID_INLET(GridStore,0) {
- // snap_backstore must be done before *anything* else
- snap_backstore(r);
- int na = in->dim->n;
- int nb = r->dim->n;
- int nc = in->dim->get(na-1);
- STACK_ARRAY(int32,v,Dim::MAX_DIM);
- if (na<1) RAISE("must have at least 1 dimension.",na,1,1+nb);
- int lastindexable = r->dim->prod()/r->dim->prod(nc) - 1;
- int ngreatest = nt_greatest((T *)0);
- if (lastindexable > ngreatest) {
- RAISE("lastindexable=%d > ngreatest=%d (ask matju)",lastindexable,ngreatest);
- }
- if (nc > nb)
- RAISE("wrong number of elements in last dimension: "
- "got %d, expecting <= %d", nc, nb);
- int nd = nb - nc + na - 1;
- COPY(v,in->dim->v,na-1);
- COPY(v+na-1,r->dim->v+nc,nb-nc);
- out=new GridOutlet(this,0,new Dim(nd,v),r->nt);
- if (nc>0) in->set_factor(nc);
-} GRID_FLOW {
- int na = in->dim->n;
- int nc = in->dim->get(na-1);
- int size = r->dim->prod(nc);
- assert((n % nc) == 0);
- int nd = n/nc;
- STACK_ARRAY(T,w,n);
- Pt<T> v=w;
- if (sizeof(T)==1 && nc==1 && r->dim->v[0]<=256) {
- // bug? shouldn't modulo be done here?
- v=data;
- } else {
- COPY(v,data,n);
- for (int k=0,i=0; i<nc; i++) for (int j=0; j<n; j+=nc) v[k++] = data[i+j];
- compute_indices(v,nc,nd);
- }
-#define FOO(type) { \
- Pt<type> p = (Pt<type>)*r; \
- if (size<=16) { \
- Pt<type> foo = ARRAY_NEW(type,nd*size); \
- int i=0; \
- switch (size) { \
- case 1: for (; i<nd&-4; i+=4, foo+=4) { \
- foo[0] = p[v[i+0]]; \
- foo[1] = p[v[i+1]]; \
- foo[2] = p[v[i+2]]; \
- foo[3] = p[v[i+3]]; \
- } break; \
- case 2: for (; i<nd; i++, foo+=2) SCOPY(foo,p+2*v[i],2); break; \
- case 3: for (; i<nd; i++, foo+=3) SCOPY(foo,p+3*v[i],3); break; \
- case 4: for (; i<nd; i++, foo+=4) SCOPY(foo,p+4*v[i],4); break; \
- default:; }; \
- for (; i<nd; i++, foo+=size) COPY(foo,p+size*v[i],size); \
- out->give(size*nd,foo-size*nd); \
- } else { \
- for (int i=0; i<nd; i++) out->send(size,p+size*v[i]); \
- } \
-}
- TYPESWITCH(r->nt,FOO,)
-#undef FOO
-} GRID_FINISH {
- if (in->dim->prod()==0) {
- int n = in->dim->prod(0,-2);
- int size = r->dim->prod();
-#define FOO(T) while (n--) out->send(size,(Pt<T>)*r);
- TYPESWITCH(r->nt,FOO,)
-#undef FOO
- }
-} GRID_END
-
-GRID_INLET(GridStore,1) {
- NumberTypeE nt = NumberTypeE_type_of(*data);
- if (!put_at) { // reassign
- if (in[0].dim)
- r.next = new Grid(in->dim,nt);
- else
- r = new Grid(in->dim,nt);
- return;
- }
- // put_at ( ... )
- //!@#$ should check types. if (r->nt!=in->nt) RAISE("shoo");
- int nn=r->dim->n, na=put_at->dim->v[0], nb=in->dim->n;
- STACK_ARRAY(int32,sizeb,nn);
- for (int i=0; i<nn; i++) { fromb[i]=0; sizeb[i]=1; }
- COPY(Pt<int32>(wdex,nn) ,(Pt<int32>)*put_at ,put_at->dim->prod());
- COPY(Pt<int32>(fromb,nn)+nn-na,(Pt<int32>)*put_at ,na);
- COPY(Pt<int32>(sizeb,nn)+nn-nb,(Pt<int32>)in->dim->v,nb);
- for (int i=0; i<nn; i++) to2[i] = fromb[i]+sizeb[i];
- d=0;
- // find out when we can skip computing indices
- //!@#$ should actually also stop before blowing up packet size
- lsd=nn;
- while (lsd>=nn-in->dim->n) {
- lsd--;
- int cs = in->dim->prod(lsd-nn+in->dim->n);
- if (cs>GridOutlet::MAX_PACKET_SIZE || fromb[lsd]!=0 || sizeb[lsd]!=r->dim->v[lsd]) break;
- }
- lsd++;
- int cs = in->dim->prod(lsd-nn+in->dim->n);
- in->set_factor(cs);
-} GRID_FLOW {
- if (!put_at) { // reassign
- COPY(((Pt<T>)*(r.next ? r.next.p : &*r.p))+in->dex, data, n);
- return;
- }
- // put_at ( ... )
- int nn=r->dim->n;
- int cs = in->factor(); // chunksize
- STACK_ARRAY(int32,v,lsd);
- Pt<int32> x = Pt<int32>(wdex,nn);
- while (n) {
- // here d is the dim# to reset; d=n for none
- for(;d<lsd;d++) x[d]=fromb[d];
- COPY(v,x,lsd);
- compute_indices(v,lsd,1);
- op->zip(cs,(Pt<T>)*r+v[0]*cs,data);
- data+=cs;
- n-=cs;
- // find next set of indices; here d is the dim# to increment
- for(;;) {
- d--;
- if (d<0) goto end;
- x[d]++;
- if (x[d]<to2[d]) break;
- }
- end:; // why here ??? or why at all?
- d++;
- }
- //end:; // why not here ???
-} GRID_END
-\def void _0_op(Numop *op) { this->op=op; }
-\def void _0_bang () { rb_funcall(rself,SI(_0_list),3,INT2NUM(0),SYM(#),INT2NUM(0)); }
-\def void _1_reassign () { put_at=0; }
-\def void _1_put_at (Grid *index) { put_at=index; }
-\def void initialize (Grid *r) {
- rb_call_super(argc,argv);
- this->r = r?r:new Grid(new Dim(),int32_e,true);
- op = op_put;
-}
-\classinfo { IEVAL(rself,"install '#store',2,1"); }
-\end class GridStore
-
-//****************************************************************
-//{ Dim[*As]<T> -> Dim[*As]<T> } or
-//{ Dim[*As]<T>,Dim[*Bs]<T> -> Dim[*As]<T> }
-\class GridOp < GridObject
-struct GridOp : GridObject {
- \attr Numop *op;
- PtrGrid r;
- \decl void initialize(Numop *op, Grid *r=0);
- \grin 0
- \grin 1
- \decl void _0_op(Numop *op);
-};
-
-GRID_INLET(GridOp,0) {
- snap_backstore(r);
- SAME_TYPE(in,r);
- out=new GridOutlet(this,0,in->dim,in->nt);
- in->set_mode(6);
-} GRID_ALLOC {
- //out->ask(in->allocn,(Pt<T> &)in->alloc,in->allocfactor,in->allocmin,in->allocmax);
-} GRID_FLOW {
- Pt<T> rdata = (Pt<T>)*r;
- int loop = r->dim->prod();
- if (sizeof(T)==8) {
- fprintf(stderr,"1: data=%p rdata=%p\n",data.p,rdata.p);
- WATCH(n,data);
- }
- if (loop>1) {
- if (in->dex+n <= loop) {
- op->zip(n,data,rdata+in->dex);
- } else {
- // !@#$ should prebuild and reuse this array when "loop" is small
- STACK_ARRAY(T,data2,n);
- int ii = mod(in->dex,loop);
- int m = min(loop-ii,n);
- COPY(data2,rdata+ii,m);
- int nn = m+((n-m)/loop)*loop;
- for (int i=m; i<nn; i+=loop) COPY(data2+i,rdata,loop);
- if (n>nn) COPY(data2+nn,rdata,n-nn);
- if (sizeof(T)==8) {
- fprintf(stderr,"2: data=%p data2=%p\n",data.p,data2.p);
- WATCH(n,data); WATCH(n,data2);
- }
- op->zip(n,data,data2);
- if (sizeof(T)==8) {WATCH(n,data); WATCH(n,data2);}
- }
- } else {
- op->map(n,data,*rdata);
- }
- out->give(n,data);
-} GRID_END
-
-GRID_INPUT2(GridOp,1,r) {} GRID_END
-\def void _0_op(Numop *op) { this->op=op; }
-
-\def void initialize(Numop *op, Grid *r=0) {
- rb_call_super(argc,argv);
- this->op=op;
- this->r = r?r:new Grid(new Dim(),int32_e,true);
-}
-
-\classinfo { IEVAL(rself,"install '#',2,1"); }
-\end class GridOp
-
-//****************************************************************
-\class GridFold < GridObject
-struct GridFold : GridObject {
- \attr Numop *op;
- \attr PtrGrid seed;
- \decl void initialize (Numop *op);
- \decl void _0_op (Numop *op);
- \decl void _0_seed (Grid *seed);
- \grin 0
-};
-
-GRID_INLET(GridFold,0) {
- //{ Dim[*As,B,*Cs]<T>,Dim[*Cs]<T> -> Dim[*As,*Cs]<T> }
- if (seed) SAME_TYPE(in,seed);
- int an = in->dim->n;
- int bn = seed?seed->dim->n:0;
- if (an<=bn) RAISE("minimum 1 more dimension than the seed (%d vs %d)",an,bn);
- STACK_ARRAY(int32,v,an-1);
- int yi = an-bn-1;
- COPY(v,in->dim->v,yi);
- COPY(v+yi,in->dim->v+an-bn,bn);
- if (seed) SAME_DIM(an-(yi+1),in->dim,(yi+1),seed->dim,0);
- out=new GridOutlet(this,0,new Dim(an-1,v),in->nt);
- int k = seed ? seed->dim->prod() : 1;
- in->set_factor(in->dim->get(yi)*k);
-} GRID_FLOW {
- int an = in->dim->n;
- int bn = seed?seed->dim->n:0;
- int yn = in->dim->v[an-bn-1];
- int zn = in->dim->prod(an-bn);
- STACK_ARRAY(T,buf,n/yn);
- int nn=n;
- int yzn=yn*zn;
- for (int i=0; n; i+=zn, data+=yzn, n-=yzn) {
- if (seed) COPY(buf+i,((Pt<T>)*seed),zn);
- else CLEAR(buf+i,zn);
- op->fold(zn,yn,buf+i,data);
- }
- out->send(nn/yn,buf);
-} GRID_END
-
-\def void _0_op (Numop *op ) { this->op =op; }
-\def void _0_seed (Grid *seed) { this->seed=seed; }
-\def void initialize (Numop *op) { rb_call_super(argc,argv); this->op=op; }
-\classinfo { IEVAL(rself,"install '#fold',1,1"); }
-\end class GridFold
-
-\class GridScan < GridObject
-struct GridScan : GridObject {
- \attr Numop *op;
- \attr PtrGrid seed;
- \decl void initialize (Numop *op);
- \decl void _0_op (Numop *op);
- \decl void _0_seed (Grid *seed);
- \grin 0
-};
-
-GRID_INLET(GridScan,0) {
- //{ Dim[*As,B,*Cs]<T>,Dim[*Cs]<T> -> Dim[*As,B,*Cs]<T> }
- if (seed) SAME_TYPE(in,seed);
- int an = in->dim->n;
- int bn = seed?seed->dim->n:0;
- if (an<=bn) RAISE("minimum 1 more dimension than the right hand");
- if (seed) SAME_DIM(bn,in->dim,an-bn,seed->dim,0);
- out=new GridOutlet(this,0,in->dim,in->nt);
- in->set_factor(in->dim->prod(an-bn-1));
-} GRID_FLOW {
- int an = in->dim->n;
- int bn = seed?seed->dim->n:0;
- int yn = in->dim->v[an-bn-1];
- int zn = in->dim->prod(an-bn);
- int factor = in->factor();
- STACK_ARRAY(T,buf,n);
- COPY(buf,data,n);
- if (seed) {
- for (int i=0; i<n; i+=factor) op->scan(zn,yn,(Pt<T>)*seed,buf+i);
- } else {
- STACK_ARRAY(T,seed,zn);
- CLEAR(seed,zn);
- for (int i=0; i<n; i+=factor) op->scan(zn,yn,seed,buf+i);
- }
- out->send(n,buf);
-} GRID_END
-
-\def void _0_op (Numop *op ) { this->op =op; }
-\def void _0_seed (Grid *seed) { this->seed=seed; }
-\def void initialize (Numop *op) { rb_call_super(argc,argv); this->op = op; }
-\classinfo { IEVAL(rself,"install '#scan',1,1"); }
-\end class GridScan
-
-//****************************************************************
-//{ Dim[*As,C]<T>,Dim[C,*Bs]<T> -> Dim[*As,*Bs]<T> }
-\class GridInner < GridObject
-struct GridInner : GridObject {
- \attr Numop *op_para;
- \attr Numop *op_fold;
- \attr PtrGrid seed;
- PtrGrid r;
- PtrGrid r2;
- GridInner() {}
- \decl void initialize (Grid *r=0);
- \decl void _0_op (Numop *op);
- \decl void _0_fold (Numop *op);
- \decl void _0_seed (Grid *seed);
- \grin 0
- \grin 1
-};
-
-template <class T> void inner_child_a (Pt<T> buf, Pt<T> data, int rrows, int rcols, int chunk) {
- Pt<T> bt = buf, dt = data;
- for (int j=0; j<chunk; j++, bt+=rcols, dt+=rrows) op_put->map(rcols,bt,*dt);
-}
-template <class T, int rcols> void inner_child_b (Pt<T> buf, Pt<T> data, int rrows, int chunk) {
- Pt<T> bt = buf, dt = data;
- for (int j=0; j<chunk; j++, bt+=rcols, dt+=rrows) {
- for (int k=0; k<rcols; k++) bt[k] = *dt;
- }
-}
-GRID_INLET(GridInner,0) {
- SAME_TYPE(in,r);
- SAME_TYPE(in,seed);
- P<Dim> a = in->dim;
- P<Dim> b = r->dim;
- if (a->n<1) RAISE("a: minimum 1 dimension");
- if (b->n<1) RAISE("b: minimum 1 dimension");
- if (seed->dim->n != 0) RAISE("seed must be a scalar");
- int a_last = a->get(a->n-1);
- int n = a->n+b->n-2;
- SAME_DIM(1,a,a->n-1,b,0);
- STACK_ARRAY(int32,v,n);
- COPY(v,a->v,a->n-1);
- COPY(v+a->n-1,b->v+1,b->n-1);
- out=new GridOutlet(this,0,new Dim(n,v),in->nt);
- in->set_factor(a_last);
-
- int rrows = in->factor();
- int rsize = r->dim->prod();
- int rcols = rsize/rrows;
- Pt<T> rdata = (Pt<T>)*r;
- int chunk = GridOutlet::MAX_PACKET_SIZE/rsize;
- r2=new Grid(new Dim(chunk*rsize),r->nt);
- Pt<T> buf3 = (Pt<T>)*r2;
- for (int i=0; i<rrows; i++)
- for (int j=0; j<chunk; j++)
- COPY(buf3+(j+i*chunk)*rcols,rdata+i*rcols,rcols);
-} GRID_FLOW {
- int rrows = in->factor();
- int rsize = r->dim->prod();
- int rcols = rsize/rrows;
- int chunk = GridOutlet::MAX_PACKET_SIZE/rsize;
- STACK_ARRAY(T,buf ,chunk*rcols);
- STACK_ARRAY(T,buf2,chunk*rcols);
- int off = chunk;
- while (n) {
- if (chunk*rrows>n) chunk=n/rrows;
- op_put->map(chunk*rcols,buf2,*(T *)*seed);
- for (int i=0; i<rrows; i++) {
- switch (rcols) {
- case 1: inner_child_b<T,1>(buf,data+i,rrows,chunk); break;
- case 2: inner_child_b<T,2>(buf,data+i,rrows,chunk); break;
- case 3: inner_child_b<T,3>(buf,data+i,rrows,chunk); break;
- case 4: inner_child_b<T,4>(buf,data+i,rrows,chunk); break;
- default: inner_child_a(buf,data+i,rrows,rcols,chunk);
- }
- op_para->zip(chunk*rcols,buf,(Pt<T>)*r2+i*off*rcols);
- op_fold->zip(chunk*rcols,buf2,buf);
- }
- out->send(chunk*rcols,buf2);
- n-=chunk*rrows;
- data+=chunk*rrows;
- }
-} GRID_FINISH {
- r2=0;
-} GRID_END
-
-GRID_INPUT(GridInner,1,r) {} GRID_END
-
-\def void initialize (Grid *r) {
- rb_call_super(argc,argv);
- this->op_para = op_mul;
- this->op_fold = op_add;
- this->seed = new Grid(new Dim(),int32_e,true);
- this->r = r ? r : new Grid(new Dim(),int32_e,true);
-}
-
-\def void _0_op (Numop *op ) { this->op_para=op; }
-\def void _0_fold (Numop *op ) { this->op_fold=op; }
-\def void _0_seed (Grid *seed) { this->seed=seed; }
-\classinfo { IEVAL(rself,"install '#inner',2,1"); }
-\end class GridInner
-
-/* **************************************************************** */
-/*{ Dim[*As]<T>,Dim[*Bs]<T> -> Dim[*As,*Bs]<T> }*/
-\class GridOuter < GridObject
-struct GridOuter : GridObject {
- \attr Numop *op;
- PtrGrid r;
- \decl void initialize (Numop *op, Grid *r=0);
- \grin 0
- \grin 1
-};
-
-GRID_INLET(GridOuter,0) {
- SAME_TYPE(in,r);
- P<Dim> a = in->dim;
- P<Dim> b = r->dim;
- int n = a->n+b->n;
- STACK_ARRAY(int32,v,n);
- COPY(v,a->v,a->n);
- COPY(v+a->n,b->v,b->n);
- out=new GridOutlet(this,0,new Dim(n,v),in->nt);
-} GRID_FLOW {
- int b_prod = r->dim->prod();
- if (b_prod > 4) {
- STACK_ARRAY(T,buf,b_prod);
- while (n) {
- for (int j=0; j<b_prod; j++) buf[j] = *data;
- op->zip(b_prod,buf,(Pt<T>)*r);
- out->send(b_prod,buf);
- data++; n--;
- }
- return;
- }
- n*=b_prod;
- Pt<T> buf = ARRAY_NEW(T,n);
- STACK_ARRAY(T,buf2,b_prod*64);
- for (int i=0; i<64; i++) COPY(buf2+i*b_prod,(Pt<T>)*r,b_prod);
- switch (b_prod) {
- #define Z buf[k++]=data[i]
- case 1: for (int i=0,k=0; k<n; i++) {Z;} break;
- case 2: for (int i=0,k=0; k<n; i++) {Z;Z;} break;
- case 3: for (int i=0,k=0; k<n; i++) {Z;Z;Z;} break;
- case 4: for (int i=0,k=0; k<n; i++) {Z;Z;Z;Z;} break;
- default:for (int i=0,k=0; k<n; i++) for (int j=0; j<b_prod; j++, k++) Z;
- }
- #undef Z
- int ch=64*b_prod;
- int nn=(n/ch)*ch;
- for (int j=0; j<nn; j+=ch) op->zip(ch,buf+j,buf2);
- op->zip(n-nn,buf+nn,buf2);
- out->give(n,buf);
-} GRID_END
-
-GRID_INPUT(GridOuter,1,r) {} GRID_END
-
-\def void initialize (Numop *op, Grid *r) {
- rb_call_super(argc,argv);
- this->op = op;
- this->r = r ? r : new Grid(new Dim(),int32_e,true);
-}
-
-\classinfo { IEVAL(rself,"install '#outer',2,1"); }
-\end class GridOuter
-
-//****************************************************************
-//{ Dim[]<T>,Dim[]<T>,Dim[]<T> -> Dim[A]<T> } or
-//{ Dim[B]<T>,Dim[B]<T>,Dim[B]<T> -> Dim[*As,B]<T> }
-\class GridFor < GridObject
-struct GridFor : GridObject {
- \attr PtrGrid from;
- \attr PtrGrid to;
- \attr PtrGrid step;
- GridFor () {
- from.constrain(expect_max_one_dim);
- to .constrain(expect_max_one_dim);
- step.constrain(expect_max_one_dim);
- }
- \decl void initialize (Grid *from, Grid *to, Grid *step);
- \decl void _0_set (Grid *r=0);
- \decl void _0_bang ();
- \grin 0 int
- \grin 1 int
- \grin 2 int
- template <class T> void trigger (T bogus);
-};
-
-\def void initialize (Grid *from, Grid *to, Grid *step) {
- rb_call_super(argc,argv);
- this->from=from;
- this->to =to;
- this->step=step;
-}
-
-template <class T>
-void GridFor::trigger (T bogus) {
- int n = from->dim->prod();
- int32 nn[n+1];
- STACK_ARRAY(T,x,64*n);
- Pt<T> fromb = (Pt<T>)*from;
- Pt<T> tob = (Pt<T>)*to ;
- Pt<T> stepb = (Pt<T>)*step;
- STACK_ARRAY(T,to2,n);
-
- for (int i=step->dim->prod()-1; i>=0; i--)
- if (!stepb[i]) RAISE("step must not contain zeroes");
- for (int i=0; i<n; i++) {
- nn[i] = (tob[i] - fromb[i] + stepb[i] - cmp(stepb[i],(T)0)) / stepb[i];
- if (nn[i]<0) nn[i]=0;
- to2[i] = fromb[i]+stepb[i]*nn[i];
- }
- P<Dim> d;
- if (from->dim->n==0) { d = new Dim(*nn); }
- else { nn[n]=n; d = new Dim(n+1,nn); }
- int total = d->prod();
- out=new GridOutlet(this,0,d,from->nt);
- if (total==0) return;
- int k=0;
- for(int d=0;;d++) {
- // here d is the dim# to reset; d=n for none
- for(;d<n;d++) x[k+d]=fromb[d];
- k+=n;
- if (k==64*n) {out->send(k,x); k=0; COPY(x,x+63*n,n);}
- else { COPY(x+k,x+k-n,n);}
- d--;
- // here d is the dim# to increment
- for(;;d--) {
- if (d<0) goto end;
- x[k+d]+=stepb[d];
- if (x[k+d]!=to2[d]) break;
- }
- }
- end: if (k) out->send(k,x);
-}
-
-\def void _0_bang () {
- SAME_TYPE(from,to);
- SAME_TYPE(from,step);
- if (!from->dim->equal(to->dim) || !to->dim->equal(step->dim))
- RAISE("dimension mismatch");
-#define FOO(T) trigger((T)0);
- TYPESWITCH_JUSTINT(from->nt,FOO,);
-#undef FOO
-}
-
-\def void _0_set (Grid *r) { from=new Grid(argv[0]); }
-GRID_INPUT(GridFor,2,step) {} GRID_END
-GRID_INPUT(GridFor,1,to) {} GRID_END
-GRID_INPUT(GridFor,0,from) {_0_bang(0,0);} GRID_END
-\classinfo { IEVAL(rself,"install '#for',3,1"); }
-\end class GridFor
-
-//****************************************************************
-\class GridFinished < GridObject
-struct GridFinished : GridObject {
- \grin 0
-};
-GRID_INLET(GridFinished,0) {
- in->set_mode(0);
-} GRID_FINISH {
- Ruby a[] = { INT2NUM(0), bsym._bang };
- send_out(COUNT(a),a);
-} GRID_END
-\classinfo { IEVAL(rself,"install '#finished',1,1"); }
-\end class GridFinished
-
-\class GridDim < GridObject
-struct GridDim : GridObject {
- \grin 0
-};
-GRID_INLET(GridDim,0) {
- GridOutlet out(this,0,new Dim(in->dim->n));
- out.send(in->dim->n,Pt<int32>(in->dim->v,in->dim->n));
- in->set_mode(0);
-} GRID_END
-\classinfo { IEVAL(rself,"install '#dim',1,1"); }
-\end class GridDim
-
-\class GridType < GridObject
-struct GridType : GridObject {
- \grin 0
-};
-GRID_INLET(GridType,0) {
- Ruby a[] = { INT2NUM(0), SYM(symbol), number_type_table[in->nt].sym };
- send_out(COUNT(a),a);
- in->set_mode(0);
-} GRID_END
-\classinfo { IEVAL(rself,"install '#type',1,1"); }
-\end class GridType
-
-//****************************************************************
-//{ Dim[*As]<T>,Dim[B] -> Dim[*Cs]<T> }
-\class GridRedim < GridObject
-struct GridRedim : GridObject {
- \attr P<Dim> dim;
- PtrGrid dim_grid;
- PtrGrid temp; // temp->dim is not of the same shape as dim
- GridRedim() { dim_grid.constrain(expect_dim_dim_list); }
- ~GridRedim() {}
- \decl void initialize (Grid *d);
- \grin 0
- \grin 1 int32
-};
-
-GRID_INLET(GridRedim,0) {
- int a = in->dim->prod(), b = dim->prod();
- if (a<b) temp=new Grid(new Dim(a),in->nt);
- out=new GridOutlet(this,0,dim,in->nt);
-} GRID_FLOW {
- int i = in->dex;
- if (!temp) {
- int b = dim->prod();
- int n2 = min(n,b-i);
- if (n2>0) out->send(n2,data);
- // discard other values if any
- } else {
- int a = in->dim->prod();
- int n2 = min(n,a-i);
- COPY((Pt<T>)*temp+i,data,n2);
- if (n2>0) out->send(n2,data);
- }
-} GRID_FINISH {
- if (!!temp) {
- int a = in->dim->prod(), b = dim->prod();
- if (a) {
- for (int i=a; i<b; i+=a) out->send(min(a,b-i),(Pt<T>)*temp);
- } else {
- STACK_ARRAY(T,foo,1);
- foo[0]=0;
- for (int i=0; i<b; i++) out->send(1,foo);
- }
- }
- temp=0;
-} GRID_END
-
-GRID_INPUT(GridRedim,1,dim_grid) { dim = dim_grid->to_dim(); } GRID_END
-
-\def void initialize (Grid *d) {
- rb_call_super(argc,argv);
- dim_grid=d;
- dim = dim_grid->to_dim();
-}
-
-\classinfo { IEVAL(rself,"install '#redim',2,1"); }
-\end class GridRedim
-
-//****************************************************************
-\class GridJoin < GridObject
-struct GridJoin : GridObject {
- \attr int which_dim;
- PtrGrid r;
- \grin 0
- \grin 1
- \decl void initialize (int which_dim=-1, Grid *r=0);
-};
-
-GRID_INLET(GridJoin,0) {
- NOTEMPTY(r);
- SAME_TYPE(in,r);
- P<Dim> d = in->dim;
- if (d->n != r->dim->n) RAISE("wrong number of dimensions");
- int w = which_dim;
- if (w<0) w+=d->n;
- if (w<0 || w>=d->n)
- RAISE("can't join on dim number %d on %d-dimensional grids",
- which_dim,d->n);
- STACK_ARRAY(int32,v,d->n);
- for (int i=0; i<d->n; i++) {
- v[i] = d->get(i);
- if (i==w) {
- v[i]+=r->dim->v[i];
- } else {
- if (v[i]!=r->dim->v[i]) RAISE("dimensions mismatch: dim #%i, left is %d, right is %d",i,v[i],r->dim->v[i]);
- }
- }
- out=new GridOutlet(this,0,new Dim(d->n,v),in->nt);
- if (d->prod(w)) in->set_factor(d->prod(w));
-} GRID_FLOW {
- int w = which_dim;
- if (w<0) w+=in->dim->n;
- int a = in->factor();
- int b = r->dim->prod(w);
- Pt<T> data2 = (Pt<T>)*r + in->dex*b/a;
- if (a==3 && b==1) {
- int m = n+n*b/a;
- STACK_ARRAY(T,data3,m);
- Pt<T> data4 = data3;
- while (n) {
- SCOPY(data4,data,3); SCOPY(data4+3,data2,1);
- n-=3; data+=3; data2+=1; data4+=4;
- }
- out->send(m,data3);
- } else if (a+b<=16) {
- int m = n+n*b/a;
- STACK_ARRAY(T,data3,m);
- int i=0;
- while (n) {
- COPY(data3+i,data,a); data+=a; i+=a; n-=a;
- COPY(data3+i,data2,b); data2+=b; i+=b;
- }
- out->send(m,data3);
- } else {
- while (n) {
- out->send(a,data);
- out->send(b,data2);
- data+=a; data2+=b; n-=a;
- }
- }
-} GRID_FINISH {
- if (in->dim->prod()==0) out->send(r->dim->prod(),(Pt<T>)*r);
-} GRID_END
-
-GRID_INPUT(GridJoin,1,r) {} GRID_END
-
-\def void initialize (int which_dim, Grid *r) {
- rb_call_super(argc,argv);
- this->which_dim = which_dim;
- if (r) this->r=r;
-}
-
-\classinfo { IEVAL(rself,"install '@join',2,1"); }
-\end class GridJoin
-
-//****************************************************************
-\class GridGrade < GridObject
-struct GridGrade : GridObject {
- \grin 0
-};
-
-template <class T> struct GradeFunction {
- static int comparator (const void *a, const void *b) {
- return **(T**)a - **(T**)b;}};
-#define FOO(S) \
-template <> struct GradeFunction<S> { \
- static int comparator (const void *a, const void *b) { \
- S x = **(S**)a - **(S**)b; \
- return x<0 ? -1 : x>0;}};
-FOO(int64)
-FOO(float32)
-FOO(float64)
-#undef FOO
-
-GRID_INLET(GridGrade,0) {
- out=new GridOutlet(this,0,in->dim,in->nt);
- in->set_factor(in->dim->get(in->dim->n-1));
-} GRID_FLOW {
- int m = in->factor();
- STACK_ARRAY(T*,foo,m);
- STACK_ARRAY(T,bar,m);
- for (; n; n-=m,data+=m) {
- for (int i=0; i<m; i++) foo[i] = &data[i];
- qsort(foo,m,sizeof(T),GradeFunction<T>::comparator);
- for (int i=0; i<m; i++) bar[i] = foo[i]-(T *)data;
- out->send(m,bar);
- }
-} GRID_END
-
-\classinfo { IEVAL(rself,"install '#grade',1,1"); }
-\end class GridGrade
-
-//****************************************************************
-//\class GridMedian < GridObject
-//****************************************************************
-
-\class GridTranspose < GridObject
-struct GridTranspose : GridObject {
- \attr int dim1;
- \attr int dim2;
- int d1,d2,na,nb,nc,nd; // temporaries
- \decl void initialize (int dim1=0, int dim2=1);
- \decl void _1_float (int dim1);
- \decl void _2_float (int dim2);
- \grin 0
-};
-
-\def void _1_float (int dim1) { this->dim1=dim1; }
-\def void _2_float (int dim2) { this->dim2=dim2; }
-
-GRID_INLET(GridTranspose,0) {
- STACK_ARRAY(int32,v,in->dim->n);
- COPY(v,in->dim->v,in->dim->n);
- d1=dim1; d2=dim2;
- if (d1<0) d1+=in->dim->n;
- if (d2<0) d2+=in->dim->n;
- if (d1>=in->dim->n || d2>=in->dim->n || d1<0 || d2<0)
- RAISE("would swap dimensions %d and %d but this grid has only %d dimensions",
- dim1,dim2,in->dim->n);
- memswap(v+d1,v+d2,1);
- if (d1==d2) {
- out=new GridOutlet(this,0,new Dim(in->dim->n,v), in->nt);
- } else {
- nd = in->dim->prod(1+max(d1,d2));
- nc = in->dim->v[max(d1,d2)];
- nb = in->dim->prod(1+min(d1,d2))/nc/nd;
- na = in->dim->v[min(d1,d2)];
- out=new GridOutlet(this,0,new Dim(in->dim->n,v), in->nt);
- in->set_factor(na*nb*nc*nd);
- }
- // Turns a Grid[*,na,*nb,nc,*nd] into a Grid[*,nc,*nb,na,*nd].
-} GRID_FLOW {
- STACK_ARRAY(T,res,na*nb*nc*nd);
- if (dim1==dim2) { out->send(n,data); return; }
- int prod = na*nb*nc*nd;
- for (; n; n-=prod, data+=prod) {
- for (int a=0; a<na; a++)
- for (int b=0; b<nb; b++)
- for (int c=0; c<nc; c++)
- COPY(res +((c*nb+b)*na+a)*nd,
- data+((a*nb+b)*nc+c)*nd,nd);
- out->send(na*nb*nc*nd,res);
- }
-} GRID_END
-
-\def void initialize (int dim1=0, int dim2=1) {
- rb_call_super(argc,argv);
- this->dim1 = dim1;
- this->dim2 = dim2;
-}
-
-\classinfo { IEVAL(rself,"install '#transpose',3,1"); }
-\end class GridTranspose
-
-//****************************************************************
-\class GridReverse < GridObject
-struct GridReverse : GridObject {
- \attr int dim1; // dimension to act upon
- int d; // temporaries
- \decl void initialize (int dim1=0);
- \decl void _1_float (int dim1);
- \grin 0
-};
-
-\def void _1_float (int dim1) { this->dim1=dim1; }
-
-GRID_INLET(GridReverse,0) {
- d=dim1;
- if (d<0) d+=in->dim->n;
- if (d>=in->dim->n || d<0)
- RAISE("would reverse dimension %d but this grid has only %d dimensions",
- dim1,in->dim->n);
- out=new GridOutlet(this,0,new Dim(in->dim->n,in->dim->v), in->nt);
- in->set_factor(in->dim->prod(d));
-} GRID_FLOW {
- int f1=in->factor(), f2=in->dim->prod(d+1);
- while (n) {
- int hf1=f1/2;
- Pt<T> data2 = data+f1-f2;
- for (int i=0; i<hf1; i+=f2) memswap(data+i,data2-i,f2);
- out->send(f1,data);
- data+=f1; n-=f1;
- }
-} GRID_END
-
-\def void initialize (int dim1=0) {
- rb_call_super(argc,argv);
- this->dim1 = dim1;
-}
-
-\classinfo { IEVAL(rself,"install '#reverse',2,1"); }
-\end class GridReverse
-
-//****************************************************************
-\class GridCentroid < GridObject
-struct GridCentroid : GridObject {
- \decl void initialize ();
- \grin 0 int
- int sumx,sumy,sum,y; // temporaries
-};
-
-GRID_INLET(GridCentroid,0) {
- if (in->dim->n != 3) RAISE("expecting 3 dims");
- if (in->dim->v[2] != 1) RAISE("expecting 1 channel");
- in->set_factor(in->dim->prod(1));
- out=new GridOutlet(this,0,new Dim(2), in->nt);
- sumx=0; sumy=0; sum=0; y=0;
-} GRID_FLOW {
- int sx = in->dim->v[1];
- while (n) {
- for (int x=0; x<sx; x++) {
- sumx+=x*data[x];
- sumy+=y*data[x];
- sum += data[x];
- }
- n-=sx;
- data+=sx;
- y++;
- }
-} GRID_FINISH {
- STACK_ARRAY(int32,blah,2);
- blah[0] = sum ? sumy/sum : 0;
- blah[1] = sum ? sumx/sum : 0;
- out->send(2,blah);
- rb_funcall(rself,SI(send_out),2,INT2NUM(1),INT2NUM(blah[0]));
- rb_funcall(rself,SI(send_out),2,INT2NUM(2),INT2NUM(blah[1]));
-} GRID_END
-
-\def void initialize () {
- rb_call_super(argc,argv);
-}
-
-\classinfo { IEVAL(rself,"install '#centroid',1,3"); }
-\end class GridCentroid
-
-//****************************************************************
-\class GridPerspective < GridObject
-struct GridPerspective : GridObject {
- \attr int32 z;
- \grin 0
- \decl void initialize (int32 z=256);
-};
-
-GRID_INLET(GridPerspective,0) {
- int n = in->dim->n;
- STACK_ARRAY(int32,v,n);
- COPY(v,in->dim->v,n);
- v[n-1]--;
- in->set_factor(in->dim->get(in->dim->n-1));
- out=new GridOutlet(this,0,new Dim(n,v),in->nt);
-} GRID_FLOW {
- int m = in->factor();
- for (; n; n-=m,data+=m) {
- op_mul->map(m-1,data,(T)z);
- op_div->map(m-1,data,data[m-1]);
- out->send(m-1,data);
- }
-} GRID_END
-
-\def void initialize (int32 z) {rb_call_super(argc,argv); this->z=z; }
-\classinfo { IEVAL(rself,"install '#perspective',1,1"); }
-\end class GridPerspective
-
-static Numop *OP(Ruby x) { return FIX2PTR(Numop,rb_hash_aref(op_dict,x)); }
-
-void startup_flow_objects () {
- op_add = OP(SYM(+));
- op_sub = OP(SYM(-));
- op_mul = OP(SYM(*));
- op_shl = OP(SYM(<<));
- op_mod = OP(SYM(%));
- op_and = OP(SYM(&));
- op_div = OP(SYM(/));
- op_put = OP(SYM(put));
- \startall
-}
diff --git a/externals/gridflow/base/flow_objects.rb b/externals/gridflow/base/flow_objects.rb
deleted file mode 100644
index 8782ae21..00000000
--- a/externals/gridflow/base/flow_objects.rb
+++ /dev/null
@@ -1,1457 +0,0 @@
-=begin
- $Id: flow_objects.rb,v 1.2 2006-03-15 04:37:28 matju Exp $
-
- GridFlow
- Copyright (c) 2001,2002,2003,2004,2005 by Mathieu Bouchard
-
- 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.
-
- See file ../COPYING for further informations on licensing terms.
-
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-=end
-
-module GridFlow
-
-#-------- fClasses for: control + misc
-
-# a dummy class that gives access to any stuff global to GridFlow.
-FObject.subclass("gridflow",1,1) {
- def _0_profiler_reset
- GridFlow.fobjects.each {|o,*| o.total_time = 0 }
- GridFlow.profiler_reset2 if GridFlow.respond_to? :profiler_reset2
- end
- def _0_profiler_dump
- ol = []
- total=0
- post "-"*32
- post "microseconds percent pointer constructor"
- GridFlow.fobjects.each {|o,*| ol.push o }
-
- # HACK: BitPacking is not a real fobject
- # !@#$ is this still necessary?
- ol.delete_if {|o| not o.respond_to? :total_time }
-
- ol.sort! {|a,b| a.total_time <=> b.total_time }
- ol.each {|o| total += o.total_time }
- total=1 if total<1
- total_us = 0
- ol.each {|o|
- ppm = o.total_time * 1000000 / total
- us = (o.total_time*1E6/GridFlow.cpu_hertz).to_i
- total_us += us
- post "%12d %2d.%04d %08x %s", us,
- ppm/10000, ppm%10000, o.object_id, o.args
- }
- post "-"*32
- post "sum of accounted microseconds: #{total_us}"
- if GridFlow.respond_to? :memcpy_calls then
- post "memcpy calls: #{GridFlow.memcpy_calls} "+
- "; bytes: #{GridFlow.memcpy_bytes}"+
- "; time: #{GridFlow.memcpy_time}"
- end
- if GridFlow.respond_to? :malloc_calls then
- post "malloc calls: #{GridFlow.malloc_calls} "+
- "; bytes: #{GridFlow.malloc_bytes}"+
- "; time: #{GridFlow.malloc_time}"
- end
- post "-"*32
- end
- def _0_formats
- post "-"*32
- GridFlow.fclasses.each {|k,v|
- next if not /#io:/ =~ k
- modes = case v.flags
- when 2; "#out"
- when 4; "#in"
- when 6; "#in/#out"
- end
- post "%s %s: %s", modes, k, v.description
- if v.respond_to? :info then
- post "-> %s", v.info
- end
- }
- post "-"*32
- end
- # security issue if patches shouldn't be allowed to do anything they want
- def _0_eval(*l)
- s = l.map{|x|x.to_i.chr}.join""
- post "ruby: %s", s
- post "returns: %s", eval(s).inspect
- end
- add_creator "@global"
- GridFlow.bind "gridflow", "gridflow" rescue Exception
-}
-FObject.subclass("fps",1,1) {
- def initialize(*options)
- super
- @history = [] # list of delays between incoming messages
- @last = 0.0 # when was last time
- @duration = 0.0 # how much delay since last summary
- @period = 1 # minimum delay between summaries
- @detailed = false
- @mode = :real
- options.each {|o|
- case o
- when :detailed; @detailed=true
- when :real,:user,:system,:cpu; @mode=o
- end
- }
- def @history.moment(n=1)
- sum = 0
- each {|x| sum += x**n }
- sum/length
- end
- end
- def method_missing(*a) end # ignore non-bangs
- def _0_period x; @period=x end
- def publish
- @history.sort!
- n=@history.length
- fps = @history.length/@duration
- if not @detailed then send_out 0, fps; return end
- send_out 0, fps,
- 1000*@history.min,
- 500*(@history[n/2]+@history[(n-1)/2]),
- 1000*@history.max,
- 1000/fps,
- 1000*(@history.moment(2) - @history.moment(1)**2)**0.5
- end
- def _0_bang
- t = case @mode
- when :real; Time.new.to_f
- when :user; Process.times.utime
- when :system; Process.times.stime
- when :cpu; GridFlow.rdtsc/GridFlow.cpu_hertz
- end
- @history.push t-@last
- @duration += t-@last
- @last = t
- return if @duration<@period
- fps = @history.length/@duration
- publish if fps>0.001
- @history.clear
- @duration = 0
- end
-}
-
-# to see what the messages look like when they get on the Ruby side.
-FObject.subclass("rubyprint",1,0) {
- def initialize(*a)
- super
- @time = !!(a.length and a[0]==:time)
- end
-
- def method_missing(s,*a)
- s=s.to_s
- pre = if @time then sprintf "%10.6f ", Time.new.to_f else "" end
- case s
- when /^_0_/; post "%s","#{pre}#{s[3..-1]}: #{a.inspect}"
- else super
- end
- end
-}
-FObject.subclass("printargs",0,0) {
- def initialize(*a) super; post a.inspect end
-}
-GridObject.subclass("#print",1,0) {
- install_rgrid 0, true
- attr_accessor :name
- def initialize(name=nil)
- super # don't forget super!!!
- if name then @name = name.to_s+": " else @name="" end
- @base=10; @format="d"; @trunc=70; @maxrows=50
- end
- def end_hook; end # other hijackability
- def format
- case @nt
- when :float32; '%6.6f'
- when :float64; '%14.14f'
- else "%#{@columns}#{@format}" end
- end
- def _0_base(x)
- @format = (case x
- when 2; "b"
- when 8; "o"
- when 10; "d"
- when 16; "x"
- else raise "base #{x} not supported" end)
- @base = x
- end
- def _0_trunc(x)
- x=x.to_f
- (0..240)===x or raise "out of range (not in 0..240 range)"
- @trunc = x
- end
- def _0_maxrows(x) @maxrows = x.to_i end
- def make_columns udata
- min = udata.min
- max = udata.max
- @columns = "" # huh?
- @columns = [
- sprintf(format,min).length,
- sprintf(format,max).length].max
- end
- def unpack data
- ps = GridFlow.packstring_for_nt @nt
- data.unpack ps
- end
- def _0_rgrid_begin
- @dim = inlet_dim 0
- @nt = inlet_nt 0
- @data = ""
- end
- def _0_rgrid_flow(data) @data << data end
- def _0_rgrid_end
- head = "#{name}Dim[#{@dim.join','}]"
- head << "(#{@nt})" if @nt!=:int32
- head << ": "
- if @dim.length > 3 then
- post head+" (not printed)"
- elsif @dim.length < 2 then
- udata = unpack @data
- make_columns udata
- post trunc(head + dump(udata))
- elsif @dim.length == 2 then
- post head
- udata = unpack @data
- make_columns udata
- sz = udata.length/@dim[0]
- rown = 1
- for row in 0...@dim[0] do
- post trunc(dump(udata[sz*row,sz]))
- rown += 1
- (post "..."; break) if rown>@maxrows
- end
- elsif @dim.length == 3 then
- post head
- make_columns unpack(@data)
- sz = @data.length/@dim[0]
- sz2 = sz/@dim[1]
- rown = 1
- for row in 0...@dim[0]
- column=0; str=""
- for col in 0...@dim[1]
- str << "(" << dump(unpack(@data[sz*row+sz2*col,sz2])) << ")"
- break if str.length>@trunc
- end
- post trunc(str)
- rown += 1
- (post "..."; break) if rown>@maxrows
- end
- end
- @data,@dim,@nt = nil
- end_hook
- end
- def dump(udata,sep=" ")
- f = format
- udata.map{|x| sprintf f,x }.join sep
- end
- def trunc s
- if s.length>@trunc then s[0...@trunc]+" [...]" else s end
- end
-}
-GridPack =
-GridObject.subclass("#pack",1,1) {
- install_rgrid 0
- class<<self;attr_reader :ninlets;end
- def initialize(n=2,cast=:int32)
- n||=self.class.ninlets
- n>=16 and raise "too many inlets"
- super
- @data=[0]*n
- @cast=cast
- @ps =GridFlow.packstring_for_nt cast
- end
- def initialize2
- return if self.class.ninlets>1
- add_inlets @data.length-1
- end
- def _0_cast(cast)
- @ps = GridFlow.packstring_for_nt cast
- @cast = cast
- end
- def self.define_inlet i
- module_eval "
- def _#{i}_int x; @data[#{i}]=x; _0_bang; end
- def _#{i}_float x; @data[#{i}]=x; _0_bang; end
- "
- end
- (0...15).each {|x| define_inlet x }
- def _0_bang
- send_out_grid_begin 0, [@data.length], @cast
- send_out_grid_flow 0, @data.pack(@ps), @cast
- end
- self
-}
-
-# the install_rgrids in the following are hacks so that
-# outlets can work. (install_rgrid is supposed to be for receiving)
-# maybe GF-0.8 doesn't need that.
-GridPack.subclass("@two", 2,1) { install_rgrid 0; def initialize() super 2 end }
-GridPack.subclass("@three",3,1) { install_rgrid 0; def initialize() super 2 end }
-GridPack.subclass("@four", 4,1) { install_rgrid 0; def initialize() super 2 end }
-GridPack.subclass("@eight",8,1) { install_rgrid 0; def initialize() super 2 end }
-GridObject.subclass("#unpack",1,0) {
- install_rgrid 0, true
- def initialize(n=2)
- @n=n
- n>=10 and raise "too many outlets"
- super
- end
- def initialize2; add_outlets @n end
- def _0_rgrid_begin
- inlet_dim(0)==[@n] or raise "expecting Dim[#{@n}], got Dim#{@dim}"
- inlet_set_factor 0,@n
- end
- def _0_rgrid_flow data
- @ps = GridFlow.packstring_for_nt inlet_nt(0)
- duh = data.unpack(@ps)
- i=duh.size-1
- until i<0 do send_out i,duh[i]; i-=1 end
- end
- def _0_rgrid_end; end
-}
-
-GridObject.subclass("#export_symbol",1,1) {
- install_rgrid 0
- def _0_rgrid_begin; @data="" end
- def _0_rgrid_flow data; @data << data; end
- def _0_rgrid_end
- send_out 0, :symbol, @data.unpack("I*").pack("c*").intern
- end
-}
-GridObject.subclass("unix_time",1,3) {
- install_rgrid 0
- def _0_bang
- t = Time.new
- tt = t.to_s
- send_out_grid_begin 0, [tt.length], :uint8
- send_out_grid_flow 0, tt, :uint8
- send_out 1, t.to_i/86400, t.to_i%86400,
- ((t.to_f-t.to_f.floor)*1000000).to_i
- send_out 2, t.year, t.month, t.day, t.hour, t.min, t.day
- end
-}
-### test with "shell xlogo &" -> [exec]
-FObject.subclass("exec",1,0) {
- def _0_shell(*a) system(a.map!{|x| x.to_s }.join(" ")) end
-}
-FObject.subclass("renamefile",1,0) {
- def initialize; end
- def _0_list(a,b) File.rename(a.to_s,b.to_s) end
-}
-FObject.subclass("ls",1,1) {
- def _0_symbol(s) send_out 0, :list, *Dir.new(s.to_s).map {|x| x.intern } end
- def _0_glob (s) send_out 0, :list, *Dir[ s.to_s].map {|x| x.intern } end
-}
-
-#-------- fClasses for: math
-
-FPatcher.subclass("gfmessagebox",1,1) {
- def initialize(*a) @a=a end
- def _0_float(x) send_out 0, *@a.map {|y| if y=="$1".intern then x else y end } end
- def _0_symbol(x) send_out 0, *@a.map {|y| if y=="$1".intern then x else y end } end
-}
-
-FPatcher.subclass("@!",1,1) {
- @fobjects = ["# +","#type","gfmessagebox list $1 #"]
- @wires = [-1,0,1,0, 1,0,2,0, 2,0,0,1, -1,0,0,0, 0,0,-1,0]
- def initialize(sym)
- super
- @fobjects[0].send_in 0, case sym
- when :rand; "op rand"; when :sqrt; "op sqrt"
- when :abs; "op abs-"; when :sq; "op sq-"
- else raise "bork BORK bork" end
- end
-}
-FPatcher.subclass("@fold",2,1) {
- @fobjects = ["#fold +","gfmessagebox seed $1"]
- @wires = [-1,0,0,0, -1,1,1,0, 1,0,0,1, 0,0,-1,0]
- def initialize(op,seed=0) super; o=@fobjects[0]
- o.send_in 0, :op, op; o.send_in 0, :seed, seed end
-}
-FPatcher.subclass("@scan",2,1) {
- @fobjects = ["#scan +","gfmessagebox seed $1"]
- @wires = [-1,0,0,0, -1,1,1,0, 1,0,0,1, 0,0,-1,0]
- def initialize(op,seed=0) super; o=@fobjects[0]
- o.send_in 0, :op, op; o.send_in 0, :seed, seed end
-}
-FPatcher.subclass("@inner",3,1) {
- @fobjects = ["#inner","gfmessagebox seed $1"]
- @wires = [-1,0,0,0, -1,1,1,0, 1,0,0,0, 0,0,-1,0, -1,2,0,1]
- def initialize(op=:*,fold=:+,seed=0,r=0) super; o=@fobjects[0]
- o.send_in 0, :op, op; o.send_in 0, :fold, fold
- o.send_in 0, :seed, seed; o.send_in 1, r end
-}
-FPatcher.subclass("@convolve",2,1) {
- @fobjects = ["#convolve"]
- @wires = [-1,0,0,0, -1,2,0,1, 0,0,-1,0]
- def initialize(op=:*,fold=:+,seed=0,r=0) super; o=@fobjects[0]
- o.send_in 0, :op, op; o.send_in 0, :fold, fold
- o.send_in 0, :seed, seed; o.send_in 1, r end
-}
-
-#-------- fClasses for: video
-
-FPatcher.subclass("@scale_to",2,1) {
- @fobjects = [
- "@for {0 0} {42 42} {1 1}","@ *","@ /",
- "@store","#dim","@redim {2}","#finished",
- ]
- @wires = []
- for i in 1..3 do @wires.concat [i-1,0,i,0] end
- @wires.concat [3,0,-1,0, 4,0,5,0, 5,0,1,1, 6,0,0,0,
- -1,0,4,0, -1,0,3,1, -1,0,6,0, -1,1,0,1, -1,1,2,1]
- def initialize(size)
- (size.length==2 and Numeric===size[0] and Numeric===size[1]) or
- raise "expecting {height width}"
- super
- send_in 1, size
- end
-}
-
-#<vektor> told me to:
-# RGBtoYUV : @fobjects = ["#inner (3 3 # 66 -38 112 128 -74 -94 25 112 -18)",
-# "@ >> 8","@ + {16 128 128}"]
-# YUVtoRGB : @fobjects = ["@ - (16 128 128)",
-# "#inner (3 3 # 298 298 298 0 -100 516 409 -208 0)","@ >> 8"]
-
-FPatcher.subclass("#rotate",2,1) {
- @fobjects = ["#inner","# >> 8"]
- @wires = [-1,0,0,0, 0,0,1,0, 1,0,-1,0]
- def update_rotator
- n = @axis[2]
- rotator = (0...n).map {|i| (0...n).map {|j| if i==j then 256 else 0 end }}
- th = @angle * Math::PI / 18000
- scale = 1<<8
- (0...2).each {|i| (0...2).each {|j|
- a = @axis[i].to_i
- b = @axis[j].to_i
- #GridFlow.post "(#{a},#{b}) #{rotator[a].inspect}"
- rotator[a][b] = (scale*Math.cos(th+(j-i)*Math::PI/2)).to_i
- }}
- @fobjects[0].send_in 1,n,n,"#".intern,*rotator.flatten
- end
- def _0_axis(from,to,total)
- total>=0 or raise "total-axis number incorrect"
- from>=0 and from<total or raise "from-axis number incorrect"
- to >=0 and to <total or raise "to-axis number incorrect"
- @axis = [from.to_i,to.to_i,total.to_i]
- update_rotator
- end
- def initialize(rot=0,axis=[0,1,2])
- super
- @angle=0
- _0_axis(*axis)
- send_in 1, rot
- end
- def _1_int(angle) @angle = angle; update_rotator end
- alias _1_float _1_int
-}
-
-FObject.subclass("foreach",1,1) {
- def initialize() super end
- def _0_list(*a)
- a.each {|e|
- if Symbol===e then
- send_out 0,:symbol,e
- else
- send_out 0,e
- end
- }
- end
-}
-FObject.subclass("listflatten",1,1) {
- def initialize() super end
- def _0_list(*a) send_out 0,:list,*a.flatten end
-}
-FObject.subclass("rubysprintf",2,1) {
- def initialize(*format) _1_list(format) end
- def _0_list(*a) send_out 0, :symbol, (sprintf @format, *a).intern end
- alias _0_float _0_list
- alias _0_symbol _0_list
- def _1_list(*format) @format = format.join(" ") end
- alias _1_symbol _1_list
-}
-
-#-------- fClasses for: jMax compatibility
-
-class JMaxUDPSend < FObject
- def initialize(host,port)
- super
- @socket = UDPSocket.new
- @host,@port = host.to_s,port.to_i
- end
- def encode(x)
- case x
- when Integer; "\x03" + [x].pack("N")
- when Float; "\x04" + [x].pack("g")
- when Symbol, String; "\x01" + x.to_s + "\x02"
- end
- end
- def method_missing(sel,*args)
- sel=sel.to_s.sub(/^_\d_/, "")
- @socket.send encode(sel) +
- args.map{|arg| encode(arg) }.join("") + "\x0b",
- 0, @host, @port
- end
- def delete; @socket.close end
- install "jmax_udpsend", 1, 0
-end
-
-class JMaxUDPReceive < FObject
- def initialize(port)
- super
- @socket = UDPSocket.new
- @port = port.to_i
- @socket.bind nil, @port
- @clock = Clock.new self
- @clock.delay 0
- end
- def decode s
- n = s.length
- i=0
- m = []
- case s[i]
- when 3; i+=5; m << s[i-4,4].unpack("N")[0]
- when 4; i+=5; m << s[i-4,4].unpack("g")[0]
- when 1; i2=s.index("\x02",i); m << s[i+1..i2-1].intern; i=i2+1
- when 11; break
- else raise "unknown code in udp packet"
- end while i<n
- m
- end
- def call
- ready_to_read = IO.select [@socket],[],[],0
- return if not ready_to_read
- data,sender = @socket.recvfrom 1024
- return if not data
- send_out 1, sender.map {|x| x=x.intern if String===x; x }
- send_out 0, *(decode data)
- @clock.delay 50
- end
- def delete; @clock.unset; @socket.close end
- install "jmax_udpreceive", 0, 2
-end
-
-class JMax4UDPSend < FObject
- def initialize(host,port)
- super
- @socket = UDPSocket.new
- @host,@port = host.to_s,port.to_i
- @symbols = {}
- end
- def encode(x)
- case x
- when Integer; "\x01" + [x].pack("N")
- when Float; "\x02" + [x].pack("G")
- when Symbol, String
- x = x.to_s
- y = x.intern
- if not @symbols[y]
- @symbols[y]=true
- "\x04" + [y].pack("N") + x + "\0"
- else
- "\x03" + [y].pack("N")
- end
- end
- end
- def method_missing(sel,*args)
- sel=sel.to_s.sub(/^_\d_/, "")
- sel=(case sel; when "int","float"; ""; else encode(sel) end)
- args=args.map{|arg| encode(arg) }.join("")
- @socket.send(sel+args+"\x0f", 0, @host, @port)
- end
- def delete; @socket.close end
- install "jmax4_udpsend", 1, 0
-end
-
-class JMax4UDPReceive < FObject
- def initialize(port)
- super
- @socket = UDPSocket.new
- @port = port.to_i
- @socket.bind nil, @port
- @clock = Clock.new self
- @clock.delay 0
- @symbols = {}
- end
- def decode s
- n = s.length
- i=0
- m = []
- case s[i]
- when 1; i+=5; m << s[i-4,4].unpack("N")[0]
- when 2; i+=9; m << s[i-8,8].unpack("G")[0]
- when 3
- i+=5; sid = s[i-4,4].unpack("N")[0]
- m << @symbols[sid]
- when 4
- i+=5; sid = s[i-4,4].unpack("N")[0]
- i2=s.index("\x00",i)
- @symbols[sid] = s[i..i2-1].intern
- m << @symbols[sid]
- i=i2+1
- when 15; break
- else post "unknown code %d in udp packet %s", s[i], s.inspect; return m
- end while i<n
- m
- end
- def call
- ready_to_read = IO.select [@socket],[],[],0
- return if not ready_to_read
- data,sender = @socket.recvfrom 1024
- return if not data
- send_out 1, sender.map {|x| x=x.intern if String===x; x }
- send_out 0, *(decode data)
- @clock.delay 50
- end
- def delete; @clock.unset; @socket.close end
- install "jmax4_udpreceive", 0, 2
-end
-
-class PDNetSocket < FObject
- def initialize(host,port,protocol=:udp,*options)
- super
- _1_connect(host,port,protocol)
- @options = {}
- options.each {|k|
- k=k.intern if String===k
- @options[k]=true
- }
- end
- def _1_connect(host,port,protocol=:udp)
- host = host.to_s
- port = port.to_i
- @host,@port,@protocol = host.to_s,port.to_i,protocol
- case protocol
- when :udp
- @socket = UDPSocket.new
- if host=="-" then
- @socket.bind nil, port
- end
- when :tcp
- if host=="-" then
- @server = TCPServer.new("localhost",port)
- else
- @socket = TCPSocket.new(host,port)
- end
-
- end
- @clock = Clock.new self
- @clock.delay 0
- @data = ""
- end
- def encode(x)
- x=x.to_i if @options[:nofloat] and Float===x
- x.to_s
- end
- def method_missing(sel,*args)
- sel=sel.to_s
- sel.sub!(/^_\d_/, "") or return super
- sel=(case sel; when "int","float"; ""; else encode(sel) end)
- msg = [sel,*args.map{|arg| encode(arg) }].join(" ")
- if @options[:nosemicolon] then msg << "\n" else msg << ";\n" end
- post "encoding as: %s", msg.inspect if @options[:debug]
- case @protocol
- when :udp; @socket.send msg, 0, @host, @port
- when :tcp; @socket.send msg, 0
- end
- end
- def delete; @clock.unset; @socket.close end
- def decode s
- post "decoding from: %s", s.inspect if @options[:debug]
- s.chomp!("\n")
- s.chomp!("\r")
- s.chomp!(";")
- a=s.split(/[\s\0]+/)
- a.shift if a[0]==""
- a.map {|x|
- case x
- when /-?\d+$/; x.to_i
- when /-?\d/; x.to_f
- else x.intern
- end
- }
- end
- def call
- ready_to_accept = IO.select [@server],[],[],0 if @server
- if ready_to_accept
- @socket.close if @socket
- @socket = @server.accept
- end
- ready_to_read = IO.select [@socket],[],[],0 if @socket
- return if not ready_to_read
- case @protocol
- when :udp
- data,sender = @socket.recvfrom 1024
- send_out 1, sender.map {|x| x=x.intern if String===x; x }
- send_out 0, *(decode data)
- when :tcp
- @data << @socket.sysread(1024)
- sender = @socket.peeraddr
- loop do
- n = /\n/ =~ @data
- break if not n
- send_out 1, sender.map {|x| x=x.intern if String===x; x }
- send_out 0, *(decode @data.slice!(0..n))
- end
- end
- @clock.delay 50
- end
- install "pd_netsocket", 2, 2
-end
-
-PDNetSocket.subclass("pd_netsend",1,0) {}
-PDNetSocket.subclass("pd_netreceive",0,2) {
- def initialize(port) super("-",port) end
-}
-
-# bogus class for representing objects that have no recognized class.
-FObject.subclass("broken",0,0) {
- def args; a=@args.dup; a[7,0] = " "+classname; a end
-}
-
-FObject.subclass("fork",1,2) {
- def method_missing(sel,*args)
- sel.to_s =~ /^_(\d)_(.*)$/ or super
- send_out 1,$2.intern,*args
- send_out 0,$2.intern,*args
- end
-}
-FObject.subclass("shunt",2,0) {
- def initialize(n=2,i=0) super; @n=n; @i=i end
- def initialize2; add_outlets @n end
- def method_missing(sel,*args)
- sel.to_s =~ /^_(\d)_(.*)$/ or super
- send_out @i,$2.intern,*args
- end
- def _1_int i; @i=i.to_i % @n end
- alias :_1_float :_1_int
- # hack: this is an alias.
- class Demux < self; install "demux", 2, 0; end
-}
-
-#-------- fClasses for: jmax2pd
-
- FObject.subclass("button",1,1) {
- def method_missing(*) send_out 0 end
- }
- FObject.subclass("toggle",1,1) {
- def _0_bang; @state ^= true; trigger end
- def _0_int x; @state = x!=0; trigger end
- def trigger; send_out 0, (if @state then 1 else 0 end) end
- }
- FObject.subclass("jpatcher",0,0) {
- def initialize(*a) super; @subobjects={} end
- attr_accessor :subobjects
- }
- FObject.subclass("jcomment",0,0) {}
- FObject.subclass("loadbang",0,1) { def trigger; send_out 0 end }
- FObject.subclass("messbox",1,1) {
- def _0_bang; send_out 0, *@argv end
- def clear; @argv=[]; end
- def append(*argv) @argv<<argv; end
- }
-
-#-------- fClasses for: list manipulation (jMax-compatible)
-
- FObject.subclass("listmake",2,1) {
- def initialize(*a) @a=a end
- def _0_list(*a) @a=a; _0_bang end
- def _1_list(*a) @a=a end
- def _0_bang; send_out 0, :list, *@a end
- }
- FObject.subclass("listlength",1,1) {
- def initialize() super end
- def _0_list(*a) send_out 0, a.length end
- }
- FObject.subclass("listelement",2,1) {
- def initialize(i=0) super; @i=i.to_i end
- def _1_int(i) @i=i.to_i end; alias _1_float _1_int
- def _0_list(*a)
- e=a[@i]
- if Symbol===e then
- send_out 0, :symbol, e
- else
- send_out 0, e
- end
- end
- }
- FObject.subclass("listsublist",3,1) {
- def initialize(i=0,n=1) super; @i,@n=i.to_i,n.to_i end
- def _1_int(i) @i=i.to_i end; alias _1_float _1_int
- def _2_int(n) @n=n.to_i end; alias _2_float _2_int
- def _0_list(*a) send_out 0, :list, *a[@i,@n] end
- }
- FObject.subclass("listprepend",2,1) {
- def initialize(*b) super; @b=b end
- def _0_list(*a) a[0,0]=@b; send_out 0, :list, *a end
- def _1_list(*b) @b=b end
- }
- FObject.subclass("listappend",2,1) {
- def initialize(*b) super; @b=b end
- def _0_list(*a) a[a.length,0]=@b; send_out 0, :list, *a end
- def _1_list(*b) @b=b end
- }
- FObject.subclass("listreverse",1,1) {
- def initialize() super end
- def _0_list(*a) send_out 0,:list,*a.reverse end
- }
- FObject.subclass("messageprepend",2,1) {
- def initialize(*b) super; @b=b end
- def _0_(*a) a[0,0]=@b; send_out 0, *a end
- def _1_list(*b) @b=b end
- def method_missing(sym,*a)
- (m = /(_\d_)(.*)/.match sym.to_s) or return super
- _0_ m[2].intern, *a
- end
- }
- FObject.subclass("messageappend",2,1) {
- def initialize(*b) super; @b=b end
- def _0_(*a) a[a.length,0]=@b; send_out 0, *a end
- def _1_list(*b) @b=b end
- def method_missing(sym,*a)
- (m = /(_\d_)(.*)/.match sym.to_s) or return super
- _0_ m[2].intern, *a
- end
- }
-
-# this was the original demo for the Ruby/jMax/PureData bridges
-# FObjects are Ruby Objects that are exported to the PureData system.
-# _0_bang means bang message on inlet 0
-# FObject#send_out sends a message through an outlet
-FObject.subclass("for",3,1) {
- attr_accessor :start, :stop, :step
- def cast(key,val)
- val = Integer(val) if Float===val
- raise ArgumentError, "#{key} isn't a number" unless Integer===val
- end
- def initialize(start,stop,step)
- super
- cast("start",start)
- cast("stop",stop)
- cast("step",step)
- @start,@stop,@step = start,stop,step
- end
- def _0_bang
- x = start
- if step > 0
- (send_out 0, x; x += step) while x < stop
- elsif step < 0
- (send_out 0, x; x += step) while x > stop
- end
- end
- def _0_float(x) self.start=x; _0_bang end
- alias _1_float stop=
- alias _2_float stop=
-}
-FObject.subclass("oneshot",2,1) {
- def initialize(state=true) @state=state!=0 end
- def method_missing(sel,*a)
- m = /^_0_(.*)$/.match(sel.to_s) or return super
- send_out 0, m[1].intern, *a if @state
- @state=false
- end
- def _1_int(state) @state=state!=0 end
- alias _1_float _1_int
- def _1_bang; @state=true end
-}
-FObject.subclass("inv+",2,1) {
- def initialize(b=0) @b=b end; def _1_float(b) @b=b end
- def _0_float(a) send_out 0, :float, @b-a end
-}
-FObject.subclass("inv*",2,1) {
- def initialize(b=0) @b=b end; def _1_float(b) @b=b end
- def _0_float(a) send_out 0, :float, @b/a end
-}
-FObject.subclass("range",1,1) {
- def initialize(*a) @a=a end
- def initialize2
- add_inlets @a.length
- add_outlets @a.length
- end
- def _0_float(x) i=0; i+=1 until @a[i]==nil or x<@a[i]; send_out i,x end
- def method_missing(sel,*a)
- m = /^(_\d+_)(.*)/.match(sel.to_s) or return super
- m[2]=="float" or return super
- @a[m[1].to_i-1] = a[0]
- post "setting a[#{m[1].to_i-1}] = #{a[0]}"
- end
-}
-FObject.subclass("listfind",2,1) {
- def initialize(*a) _1_list(*a) end
- def _1_list(*a) @a = a end
- def _0_float(x)
- i=0
- while i<@a.length
- (send_out 0,i; return) if @a[i]==x
- i+=1
- end
- send_out 0,-1
- end
- doc:_1_list,"list to search into"
- doc:_0_float,"float to find in that list"
- doc_out:_0_float,"position of the incoming float in the stored list"
-}
-
-#-------- fClasses for: GUI
-
-module Gooey # to be included in any FObject class
- def initialize(*)
- super
- @selected=false
- @bg = "#ffffff" # white background
- @bgb = "#000000" # black border
- @bgs = "#0000ff" # blue border when selected
- @fg = "#000000" # black foreground
- @rsym = "#{self.class}#{self.object_id}".intern # unique id for use in Tcl
- @can = nil # the canvas number
- @canvas = nil # the canvas string
- @y,@x = 0,0 # position on canvas
- @sy,@sx = 16,16 # size on canvas
- @font = "Courier -12"
- @vis = nil
- end
- attr_reader :canvas
- attr_reader :selected
- def canvas=(can)
- @can = can if Integer===can
- @canvas = case can
- when String; can
- when Integer; ".x%x.c"%(4*can)
- else raise "huh?"
- end
- end
- def initialize2(*) GridFlow.bind self, @rsym.to_s end
- def pd_displace(can,x,y) self.canvas||=can; @x+=x; @y+=y; pd_show(can) end
- def pd_activate(can,*) self.canvas||=can end
- def quote(text) # for tcl (isn't completely right ?)
- text=text.gsub(/[\{\}]/) {|x| "\\"+x }
- "{#{text}}"
- end
- def pd_vis(can,vis)
- self.canvas||=can; @vis=vis!=0; update end
- def update; pd_show @can if @vis end
- def pd_getrect(can)
- self.canvas||=can
- @x,@y = get_position(can)
- # the extra one-pixel on each side was for #peephole only
- # not sure what to do with this
- [@x-1,@y-1,@x+@sx+1,@y+@sy+1]
- end
- def pd_click(can,x,y,shift,alt,dbl,doit) return 0 end
- def outline; if selected then @bgs else "#000000" end end
- def pd_select(can,sel)
- self.canvas||=can
- @selected=sel!=0
- GridFlow.gui %{ #{canvas} itemconfigure #{@rsym} -outline #{outline} \n }
- end
- def pd_delete(can) end
- def pd_show(can)
- self.canvas||=can
- @x,@y = get_position can if can
- end
- def highlight(color,ratio) # doesn't use self
- c = /^#(..)(..)(..)/.match(color)[1..3].map {|x| x.hex }
- c.map! {|x| [255,(x*ratio).to_i].min }
- "#%02x%02x%02x" % c
- end
-end
-
-class Display < FObject; include Gooey
- attr_accessor :text
- def initialize()
- super
- @sel = nil; @args = [] # contents of last received message
- @text = "..."
- @sy,@sx = 16,80 # default size of the widget
- @bg,@bgs,@fg = "#6774A0","#00ff80","#ffff80"
- end
- def _0_set_size(sy,sx) @sy,@sx=sy,sx end
- def atom_to_s a
- case a
- when Float; sprintf("%.5f",a).gsub(/\.?0+$/, "")
- else a.to_s
- end
- end
- def method_missing(sel,*args)
- m = /^(_\d+_)(.*)/.match(sel.to_s) or return super
- @sel,@args = m[2].intern,args
- @text = case @sel
- when nil; "..."
- when :float; atom_to_s @args[0]
- else @sel.to_s + ": " + @args.map{|a| atom_to_s a }.join(' ')
- end
- update
- end
- def pd_show(can)
- super
- return if not canvas or not @vis # can't show for now...
- GridFlow.gui %{
- set canvas #{canvas}
- $canvas delete #{@rsym}TEXT
- set y #{@y+2}
- foreach line [split #{quote @text} \\n] {
- $canvas create text #{@x+2} $y -fill #{@fg} -font #{quote @font}\
- -text $line -anchor nw -tag #{@rsym}TEXT
- set y [expr $y+14]
- }
- foreach {x1 y1 x2 y2} [$canvas bbox #{@rsym}TEXT] {}
- set sx [expr $x2-$x1+1]
- set sy [expr $y2-$y1+3]
- $canvas delete #{@rsym}
- $canvas create rectangle #{@x} #{@y} \
- [expr #{@x}+$sx] [expr #{@y}+$sy] -fill #{@bg} \
- -tags #{@rsym} -outline #{outline}
- $canvas lower #{@rsym} #{@rsym}TEXT
- pd \"#{@rsym} set_size $sy $sx;\n\";
- }
- end
- def pd_delete(can)
- if @vis
- GridFlow.gui %{ #{canvas} delete #{@rsym} #{@rsym}TEXT \n}
- end
- super
- end
- def delete; super end
- def _0_grid(*foo) # big hack!
- # hijacking a [#print]
- gp = FObject["#print"]
- @text = ""
- overlord = self
- gp.instance_eval { @overlord = overlord }
- def gp.post(fmt,*args) @overlord.text << sprintf(fmt,*args) << "\n" end
- def gp.end_hook
- @overlord.instance_eval{@text.chomp!}
- @overlord.update
- end
- #gp.send_in 0, :trunc, 70
- gp.send_in 0, :maxrows, 20
- gp.send_in 0, :grid, *foo
- end
-
- install "display", 1, 1
- gui_enable if GridFlow.bridge_name =~ /puredata/
-end
-
-class GridEdit < GridObject; include Gooey
- def initialize(grid)
- super
- @store = GridStore.new
- @store.connect 0,self,2
- @fin = GridFinished.new
- @fin.connect 0,self,3
- @bg,@bgs,@fg = "#609068","#0080ff","#ff80ff"
- @bghi = highlight(@bg,1.25) # "#80C891" # highlighted @bg
- #@bghihi = highlight(@bghi,1.5) # very highlighted @bg
- @cellsy,@cellsx = 16,48
- @i,@j = nil,nil # highlighted cell dex
- send_in 0, grid
- end
- def _0_cell_size(sy,sx) @cellsy,@cellsx=sy,sx; update end
- def _0_float(*a) @store.send_in 1,:float,*a; @store.send_in 0; update end
- def _0_list (*a) @store.send_in 1, :list,*a; @store.send_in 0; update end
- def _0_grid (*a) @store.send_in 1, :grid,*a; @fin.send_in 0, :grid,*a end
- def _3_bang; @store.send_in 0; update end
- def edit_start(i,j)
- edit_end if @i
- @i,@j=i,j
- GridFlow.gui %{
- set canvas #{canvas}
- $canvas itemconfigure #{@rsym}CELL_#{@i}_#{@j} -fill #{@bghi}
- }
- end
- def edit_end
- GridFlow.gui %{
- set canvas #{canvas}
- $canvas itemconfigure #{@rsym}CELL_#{@i}_#{@j} -fill #{@bg}
- }
- unfocus @can
- end
- def _2_rgrid_begin
- @data = []
- @dim = inlet_dim 2
- @nt = inlet_nt 2
- post "_2_rgrid_begin: dim=#{@dim.inspect} nt=#{@nt.inspect}"
- send_out_grid_begin 0, @dim, @nt
- end
- def _2_rgrid_flow data
- ps = GridFlow.packstring_for_nt @nt
- @data[@data.length,0] = data.unpack(ps)
- post "_2_rgrid_flow: data=#{@data.inspect}"
- send_out_grid_flow 0, data
- end
- def _2_rgrid_end
- post "_2_rgrid_end"
- end
- def pd_click(can,x,y,shift,alt,dbl,doit)
- post "pd_click: %s", [can,x,y,shift,alt,dbl,doit].inspect
- return 0 if not doit!=0
- i = (y-@y-1)/@cellsy
- j = (x-@x-1)/@cellsx
- post "%d,%d", i,j
- ny = @dim[0] || 1
- nx = @dim[1] || 1
- if (0...ny)===i and (0...nx)===j then
- focus @can,x,y
- edit_start i,j
- end
- return 0
- end
- def pd_key(key)
- post "pd_key: %s", [key].inspect
- if key==0 then unfocus @can; return end
- end
- def pd_motion(dx,dy)
- post "pd_motion: %s", [dx,dy].inspect
- ny = @dim[0] || 1
- nx = @dim[1] || 1
- k = @i*nx+@j
- post "@data[#{k}]=#{@data[k]} before"
- @data[k]-=dy
- @store.send_in 1, :put_at, [@i,@j]
- @store.send_in 1, @data[k]
- @store.send_in 0
- post "@data[#{k}]=#{@data[k]} after"
- update
- end
- def pd_show(can)
- super
- return if not can
- ny = @dim[0] || 1
- nx = @dim[1] || 1
- @sy = 2+@cellsy*ny
- @sx = 2+@cellsx*nx
- g = %{
- set canvas #{canvas}
- $canvas delete #{@rsym} #{@rsym}CELL
- $canvas create rectangle #{@x} #{@y} #{@x+@sx} #{@y+@sy} \
- -fill #{@bg} -tags #{@rsym} -outline #{outline}
- }
- ny.times {|i|
- nx.times {|j|
- y1 = @y+1+i*@cellsy; y2 = y1+@cellsy
- x1 = @x+1+j*@cellsx; x2 = x1+@cellsx
- v = @data[i*nx+j]
- g << %{
- $canvas create rectangle #{x1} #{y1} #{x2} #{y2} -fill #{@bg} \
- -tags {#{@rsym}CELL #{@rsym}CELL_#{i}_#{j}} -outline #{outline}
- $canvas create text #{x2-4} #{y1+2} -text "#{v}" -anchor ne -fill #ffffff \
- -tags {#{@rsym}CELL_#{i}_#{j}_T}
- }
- }
- }
- GridFlow.gui g
- end
- install "#edit", 2, 1
- install_rgrid 2, true
- gui_enable if GridFlow.bridge_name =~ /puredata/
-end
-
-class Peephole < FPatcher; include Gooey
- @fobjects = ["#dim","#export_list","#downscale_by 1 smoothly","#out","#scale_by 1",
- proc{Demux.new(2)}]
- @wires = [-1,0,0,0, 0,0,1,0, -1,0,5,0, 2,0,3,0, 4,0,3,0, 5,0,2,0, 5,1,4,0, 3,0,-1,0]
- def initialize(sy=32,sx=32,*args)
- super
- @fobjects[1].connect 0,self,2
- post "Peephole#initialize: #{sx} #{sy} #{args.inspect}"
- @scale = 1
- @down = false
- @sy,@sx = sy,sx # size of the widget
- @fy,@fx = 0,0 # size of last frame after downscale
- @bg,@bgs = "#A07467","#00ff80"
- end
- def pd_show(can)
- super
- return if not can
- if not @open
- GridFlow.gui %{
- pd \"#{@rsym} open [eval list [winfo id #{@canvas}]] 1;\n\";
- }
- @open=true
- end
- # round-trip to ensure this is done after the open
- GridFlow.gui %{
- pd \"#{@rsym} set_geometry #{@y} #{@x} #{@sy} #{@sx};\n\";
- }
- GridFlow.gui %{
- set canvas #{canvas}
- $canvas delete #{@rsym}
- $canvas create rectangle #{@x} #{@y} #{@x+@sx} #{@y+@sy} \
- -fill #{@bg} -tags #{@rsym} -outline #{outline}
- }
- set_geometry_for_real_now
- end
- def set_geometry_for_real_now
- @fy,@fx=@sy,@sx if @fy<1 or @fx<1
- @down = (@fx>@sx or @fy>@sx)
- if @down then
- @scale = [(@fy+@sy-1)/@sy,(@fx+@sx-1)/@sx].max
- @scale=1 if @scale<1 # what???
- @fobjects[2].send_in 1, @scale
- sy2 = @fy/@scale
- sx2 = @fx/@scale
- else
- @scale = [@sy/@fy,@sx/@fx].min
- @fobjects[4].send_in 1, @scale
- sy2 = @fy*@scale
- sx2 = @fx*@scale
- end
- begin
- @fobjects[5].send_in 1, (if @down then 0 else 1 end)
- x2=@y+(@sy-sy2)/2
- y2=@x+(@sx-sx2)/2
- @fobjects[3].send_in 0, :set_geometry,
- x2, y2, sy2, sx2
- rescue StandardError => e
- post "peeperr: %s", e.inspect
- end
- post "set_geometry_for_real_now (%d,%d) (%d,%d) (%d,%d) (%d,%d) (%d,%d)",
- @x+1,@y+1,@sx,@sy,@fx,@fy,sx2,sy2,x2,y2
- end
- def _0_open(wid,use_subwindow)
- post "%s", [wid,use_subwindow].inspect
- @use_subwindow = use_subwindow==0 ? false : true
- if @use_subwindow then
- @fobjects[3].send_in 0, :open,:x11,:here,:embed_by_id,wid
- end
- end
- def _0_set_geometry(y,x,sy,sx)
- @sy,@sx = sy,sx
- @y,@x = y,x
- set_geometry_for_real_now
- end
- def _0_fall_thru(flag) # never worked ?
- post "fall_thru: #{flag}"
- @fobjects[3].send_in 0, :fall_thru, flag
- end
- # note: the numbering here is a FPatcher gimmick... -1,0 goes to _1_.
- def _1_position(y,x,b)
- s=@scale
- if @down then y*=s;x*=s else y*=s;x*=s end
- send_out 0,:position,y,x,b
- end
- def _2_list(sy,sx,chans)
- @fy,@fx = sy,sx
- set_geometry_for_real_now
- end
- def _0_paint()
- post "paint()"
- @fobjects[3].send_in 0, "draw"
- end
- def delete
- post "deleting peephole"
- GridFlow.gui %{ #{canvas} delete #{@rsym} \n}
- @fobjects[3].send_in 0, :close
- super
- end
- def method_missing(s,*a)
- #post "%s: %s", s.to_s, a.inspect
- super rescue NameError
- end
-
- install "#peephole", 1, 1
- gui_enable if GridFlow.bridge_name =~ /puredata/
- #GridFlow.addtomenu "#peephole" # was this IMPD-specific ?
-end
-
-#-------- fClasses for: Hardware
-
-# requires Ruby 1.8.0 because of bug in Ruby 1.6.x
-FObject.subclass("joystick_port",0,1) {
- def initialize(port)
- raise "sorry, requires Ruby 1.8" if RUBY_VERSION<"1.8"
- @f = File.open(port.to_s,"r+")
- @status = nil
- @clock = Clock.new self
- @clock.delay 0
- @f.nonblock=true
- end
- def delete; @clock.unset; @f.close end
- def call
- loop{
- begin
- event = @f.read(8)
- rescue Errno::EAGAIN
- @clock.delay 0
- return
- end
- return if not event
- return if event.length<8
- send_out 0, *event.unpack("IsCC")
- }
- end
-}
-
-# plotter control (HPGL)
-FObject.subclass("plotter_control",1,1) {
- def puts(x)
- x<<"\n"
- x.each_byte {|b| send_out 0, b }
- send_out 0
- end
- def _0_pu; puts "PU;" end
- def _0_pd; puts "PD;" end
- def _0_pa x,y; puts "PA#{x},#{y};" end
- def _0_sp c; puts "SP#{c};"; end
- def _0_ip(*v) puts "IP#{v.join','};" end
- def _0_other(command,*v) puts "#{command.to_s.upcase}#{v.join','};" end
- def _0_print(*text) puts "LB#{text.join(' ')}\003;" end
- def _0_print_from_ascii(*codes)
- _0_print codes.map{|code| code.chr }.join("")
- end
-}
-
-# ASCII, useful for controlling pics
-FObject.subclass("ascii",1,1) {
- def puts(x)
- x.each_byte {|b| send_out 0, b }
- end
- def _0_float x; puts "#{x.to_i}" end
-}
-
-# System, similar to shell
-FObject.subclass("system",1,1) {
- def _0_system(*a)
- system(a.join(" "))
- end
-}
-
-(begin require "linux/ParallelPort"; true; rescue LoadError; false end) and
-FObject.subclass("parallel_port",1,3) {
- def initialize(port,manually=0)
- @f = File.open(port.to_s,"r+")
- @f.extend Linux::ParallelPort
- @status = nil
- @flags = nil
- @manually = manually!=0
- @clock = (if @manually then nil else Clock.new self end)
- @clock.delay 0 if @clock
- end
- def delete; @clock.unset unless @manually; @f.close end
- def _0_int(x) @f.write x.to_i.chr; @f.flush end
- alias _0_float _0_int
- def call
- flags = @f.port_flags
- send_out 2, flags if @flags != flags
- @flags = flags
- status = @f.port_status
- send_out 1, status if @status != status
- @status = status
- @clock.delay 20 if @clock
- end
- def _0_bang
- @status = @flags = nil
- call
- end
- # outlet 0 reserved (future use)
-}
-
-(begin require "linux/SoundMixer"; true; rescue LoadError; false end) and
-#FObject.subclass("SoundMixer",1,1) {
-class GFSoundMixer < FObject; install "SoundMixer",1,1
- # BUG? i may have the channels (left,right) backwards
- def initialize(filename)
- super
- @file = File.open filename.to_s, 0
- @file.extend Linux::SoundMixer
- $sm = self
- end
- @@vars = Linux::SoundMixer.instance_methods.grep(/=/)
- @@vars_h = {}
- @@vars.each {|attr|
- attr.chop!
- eval %{ def _0_#{attr}(x) @file.#{attr} = x[0]*256+x[1] end }
- @@vars_h[attr]=true
- }
- def _0_get(sel=nil)
- if sel then
- sels=sel.to_s
- sel=sels.intern
- raise if not @@vars_h.include? sel.to_s
- begin
- x = @file.send sel
- send_out 0, sel, "(".intern, (x>>8)&255, x&255, ")".intern
- rescue
- send_out 0, sel, "(".intern, -1, -1, ")".intern
- end
- else
- @@vars.each {|var| _0_get var }
- end
- end
-end#}
-
-# experimental
-FObject.subclass("rubyarray",2,1) {
- def initialize() @a=[]; @i=0; end
- def _0_float i; @i=i; send_out 0, *@a[@i]; end
- def _1_list(*l) @a[@i]=l; end
- def _0_save(filename,format=nil)
- f=File.open(filename.to_s,"w")
- if format then
- @a.each {|x| f.puts(format.to_s%x) }
- else
- @a.each {|x| f.puts(x.join(",")) }
- end
- f.close
- end
- def _0_load(filename)
- f=File.open(filename.to_s,"r")
- @a.clear
- f.each {|x| @a.push x.split(",").map {|y| Float(y) rescue y.intern }}
- f.close
- end
-}
-
-FObject.subclass("regsub",3,1) {
- def initialize(from,to) _1_symbol(from); _2_symbol(to) end
- def _0_symbol(s) send_out 0, :symbol, s.to_s.gsub(@from, @to).intern end
- def _1_symbol(from) @from = Regexp.new(from.to_s.gsub(/`/,"\\")) end
- def _2_symbol(to) @to = to.to_s.gsub(/`/,"\\") end
- doc:_0_symbol,"a string to transform"
- doc:_1_symbol,"a regexp pattern to be found inside of the string"
- doc:_2_symbol,"a replacement for the found pattern"
- doc_out:_0_symbol,"the transformed string"
-}
-
-FObject.subclass("memstat",1,1) {
- def _0_bang
- f = File.open("/proc/#{$$}/stat")
- send_out 0, Float(f.gets.split(" ")[22]) / 1024.0
- f.close
- end
- doc:_0_bang,"lookup process stats for the currently running pd+ruby "+
- "and figure out how much RAM it uses."
- doc_out:_0_float,"virtual size of RAM in kilobytes (includes swapped out and shared memory)"
-}
-
-FObject.subclass("sendgui",1,0) {
- def _0_list(*x)
- GridFlow.gui x.join(" ").gsub(/`/,";")+"\n"
- end
- install "sys_vgui", 1, 0
- doc:_0_list,"a Tcl/Tk command to send to the pd client."
-}
-
-end # module GridFlow
-
-begin
- require "gridflow/rblti"
- GridFlow.post "Ruby-LTI support loaded."
-rescue Exception => e
- #GridFlow.post "%s", e.inspect
- #GridFlow.post "(rblti not found)"
-end
diff --git a/externals/gridflow/base/flow_objects_for_image.c b/externals/gridflow/base/flow_objects_for_image.c
deleted file mode 100644
index f6d6398d..00000000
--- a/externals/gridflow/base/flow_objects_for_image.c
+++ /dev/null
@@ -1,619 +0,0 @@
-/*
- $Id: flow_objects_for_image.c,v 1.2 2006-03-15 04:37:08 matju Exp $
-
- GridFlow
- Copyright (c) 2001,2002,2003,2004,2005 by Mathieu Bouchard
-
- 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.
-
- See file ../COPYING for further informations on licensing terms.
-
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include <math.h>
-#include "grid.h.fcs"
-
-static void expect_picture (P<Dim> d) {
- if (d->n!=3) RAISE("(height,width,chans) dimensions please");}
-static void expect_rgb_picture (P<Dim> d) {
- expect_picture(d);
- if (d->get(2)!=3) RAISE("(red,green,blue) channels please");}
-static void expect_rgba_picture (P<Dim> d) {
- expect_picture(d);
- if (d->get(2)!=4) RAISE("(red,green,blue,alpha) channels please");}
-static void expect_max_one_dim (P<Dim> d) {
- if (d->n>1) { RAISE("expecting Dim[] or Dim[n], got %s",d->to_s()); }}
-
-//****************************************************************
-//{ Dim[A,B,*Cs]<T>,Dim[D,E]<T> -> Dim[A,B,*Cs]<T> }
-
-static void expect_convolution_matrix (P<Dim> d) {
- if (d->n != 2) RAISE("only exactly two dimensions allowed for now (got %d)",
- d->n);
-}
-
-// entry in a compiled convolution kernel
-struct PlanEntry { int y,x; bool neutral; };
-
-\class GridConvolve < GridObject
-struct GridConvolve : GridObject {
- \attr Numop *op_para;
- \attr Numop *op_fold;
- \attr PtrGrid seed;
- \attr PtrGrid b;
- PtrGrid a;
- int plann;
- PlanEntry *plan; //Pt?
- int margx,margy; // margins
- GridConvolve () : plan(0) { b.constrain(expect_convolution_matrix); plan=0; }
- \decl void initialize (Grid *r=0);
- \decl void _0_op (Numop *op);
- \decl void _0_fold (Numop *op);
- \decl void _0_seed (Grid *seed);
- \grin 0
- \grin 1
- template <class T> void copy_row (Pt<T> buf, int sx, int y, int x);
- template <class T> void make_plan (T bogus);
- ~GridConvolve () {if (plan) delete[] plan;}
-};
-
-template <class T> void GridConvolve::copy_row (Pt<T> buf, int sx, int y, int x) {
- int day = a->dim->get(0), dax = a->dim->get(1), dac = a->dim->prod(2);
- y=mod(y,day); x=mod(x,dax);
- Pt<T> ap = (Pt<T>)*a + y*dax*dac;
- while (sx) {
- int sx1 = min(sx,dax-x);
- COPY(buf,ap+x*dac,sx1*dac);
- x=0;
- buf += sx1*dac;
- sx -= sx1;
- }
-}
-
-static Numop *OP(Ruby x) {return FIX2PTR(Numop,rb_hash_aref(op_dict,x));}
-
-template <class T> void GridConvolve::make_plan (T bogus) {
- P<Dim> da = a->dim, db = b->dim;
- int dby = db->get(0);
- int dbx = db->get(1);
- if (plan) delete[] plan;
- plan = new PlanEntry[dbx*dby];
- int i=0;
- for (int y=0; y<dby; y++) {
- for (int x=0; x<dbx; x++) {
- T rh = ((Pt<T>)*b)[y*dbx+x];
- bool neutral = op_para->on(rh)->is_neutral(rh,at_right);
- bool absorbent = op_para->on(rh)->is_absorbent(rh,at_right);
- STACK_ARRAY(T,foo,1);
- if (absorbent) {
- foo[0] = 0;
- op_para->map(1,foo,rh);
- absorbent = op_fold->on(rh)->is_neutral(foo[0],at_right);
- }
- if (absorbent) continue;
- plan[i].y = y;
- plan[i].x = x;
- plan[i].neutral = neutral;
- i++;
- }
- }
- plann = i;
-}
-
-GRID_INLET(GridConvolve,0) {
- SAME_TYPE(in,b);
- SAME_TYPE(in,seed);
- P<Dim> da = in->dim, db = b->dim;
- if (!db) RAISE("right inlet has no grid");
- if (!seed) RAISE("seed missing");
- if (db->n != 2) RAISE("right grid must have two dimensions");
- if (da->n < 2) RAISE("left grid has less than two dimensions");
- if (seed->dim->n != 0) RAISE("seed must be scalar");
- if (da->get(0) < db->get(0)) RAISE("grid too small (y): %d < %d", da->get(0), db->get(0));
- if (da->get(1) < db->get(1)) RAISE("grid too small (x): %d < %d", da->get(1), db->get(1));
- margy = (db->get(0)-1)/2;
- margx = (db->get(1)-1)/2;
- a=new Grid(in->dim,in->nt);
- out=new GridOutlet(this,0,da,in->nt);
-} GRID_FLOW {
- COPY((Pt<T>)*a+in->dex, data, n);
-} GRID_FINISH {
- Numop *op_put = OP(SYM(put));
- make_plan((T)0);
- int dbx = b->dim->get(1);
- int day = a->dim->get(0);
- int n = a->dim->prod(1);
- int sx = a->dim->get(1)+dbx-1;
- int n2 = sx*a->dim->prod(2);
- STACK_ARRAY(T,buf,n);
- STACK_ARRAY(T,buf2,n2);
- T orh=0;
- for (int iy=0; iy<day; iy++) {
- op_put->map(n,buf,*(T *)*seed);
- for (int i=0; i<plann; i++) {
- int jy = plan[i].y;
- int jx = plan[i].x;
- T rh = ((Pt<T>)*b)[jy*dbx+jx];
- if (i==0 || plan[i].y!=plan[i-1].y || orh!=rh) {
- copy_row(buf2,sx,iy+jy-margy,-margx);
- if (!plan[i].neutral) op_para->map(n2,buf2,rh);
- }
- op_fold->zip(n,buf,buf2+jx*a->dim->prod(2));
- orh=rh;
- }
- out->send(n,buf);
- }
- a=0;
-} GRID_END
-
-GRID_INPUT(GridConvolve,1,b) {} GRID_END
-
-\def void _0_op (Numop *op ) { this->op_para=op; }
-\def void _0_fold (Numop *op ) { this->op_fold=op; }
-\def void _0_seed (Grid *seed) { this->seed=seed; }
-
-\def void initialize (Grid *r) {
- rb_call_super(argc,argv);
- this->op_para = op_mul;
- this->op_fold = op_add;
- this->seed = new Grid(new Dim(),int32_e,true);
- this->b= r ? r : new Grid(new Dim(1,1),int32_e,true);
-}
-
-\classinfo { IEVAL(rself,"install '#convolve',2,1"); }
-\end class GridConvolve
-
-/* ---------------------------------------------------------------- */
-/* "#scale_by" does quick scaling of pictures by integer factors */
-/*{ Dim[A,B,3]<T> -> Dim[C,D,3]<T> }*/
-\class GridScaleBy < GridObject
-struct GridScaleBy : GridObject {
- \attr PtrGrid scale; // integer scale factor
- int scaley;
- int scalex;
- \decl void initialize (Grid *factor=0);
- \grin 0
- \grin 1
- void prepare_scale_factor () {
- scaley = ((Pt<int32>)*scale)[0];
- scalex = ((Pt<int32>)*scale)[scale->dim->prod()==1 ? 0 : 1];
- if (scaley<1) scaley=2;
- if (scalex<1) scalex=2;
- }
-};
-
-GRID_INLET(GridScaleBy,0) {
- P<Dim> a = in->dim;
- expect_picture(a);
- out=new GridOutlet(this,0,new Dim(a->get(0)*scaley,a->get(1)*scalex,a->get(2)),in->nt);
- in->set_factor(a->get(1)*a->get(2));
-} GRID_FLOW {
- int rowsize = in->dim->prod(1);
- STACK_ARRAY(T,buf,rowsize*scalex);
- int chans = in->dim->get(2);
- #define Z(z) buf[p+z]=data[i+z]
- for (; n>0; data+=rowsize, n-=rowsize) {
- int p=0;
- #define LOOP(z) \
- for (int i=0; i<rowsize; i+=z) \
- for (int k=0; k<scalex; k++, p+=z)
- switch (chans) {
- case 3: LOOP(3) {Z(0);Z(1);Z(2);} break;
- case 4: LOOP(4) {Z(0);Z(1);Z(2);Z(3);} break;
- default: LOOP(chans) {for (int c=0; c<chans; c++) Z(c);}
- }
- #undef LOOP
- for (int j=0; j<scaley; j++) out->send(rowsize*scalex,buf);
- }
- #undef Z
-} GRID_END
-
-static void expect_scale_factor (P<Dim> dim) {
- if (dim->prod()!=1 && dim->prod()!=2)
- RAISE("expecting only one or two numbers");
-}
-
-GRID_INPUT(GridScaleBy,1,scale) { prepare_scale_factor(); } GRID_END
-
-\def void initialize (Grid *factor) {
- scale.constrain(expect_scale_factor);
- rb_call_super(argc,argv);
- scale=new Grid(INT2NUM(2));
- if (factor) scale=factor;
- prepare_scale_factor();
-}
-
-\classinfo { IEVAL(rself,"install '#scale_by',2,1"); }
-\end class GridScaleBy
-
-// ----------------------------------------------------------------
-//{ Dim[A,B,3]<T> -> Dim[C,D,3]<T> }
-\class GridDownscaleBy < GridObject
-struct GridDownscaleBy : GridObject {
- \attr PtrGrid scale;
- \attr bool smoothly;
- int scaley;
- int scalex;
- PtrGrid temp;
- \decl void initialize (Grid *factor=0, Symbol option=Qnil);
- \grin 0
- \grin 1
- void prepare_scale_factor () {
- scaley = ((Pt<int32>)*scale)[0];
- scalex = ((Pt<int32>)*scale)[scale->dim->prod()==1 ? 0 : 1];
- if (scaley<1) scaley=2;
- if (scalex<1) scalex=2;
- }
-};
-
-GRID_INLET(GridDownscaleBy,0) {
-
- P<Dim> a = in->dim;
- if (a->n!=3) RAISE("(height,width,chans) please");
- out=new GridOutlet(this,0,new Dim(a->get(0)/scaley,a->get(1)/scalex,a->get(2)),in->nt);
- in->set_factor(a->get(1)*a->get(2));
- // i don't remember why two rows instead of just one.
- temp=new Grid(new Dim(2,in->dim->get(1)/scalex,in->dim->get(2)),in->nt);
-} GRID_FLOW {
- int rowsize = in->dim->prod(1);
- int rowsize2 = temp->dim->prod(1);
- Pt<T> buf = (Pt<T>)*temp; //!@#$ maybe should be something else than T ?
- int xinc = in->dim->get(2)*scalex;
- int y = in->dex / rowsize;
- int chans=in->dim->get(2);
- #define Z(z) buf[p+z]+=data[i+z]
- if (smoothly) {
- while (n>0) {
- if (y%scaley==0) CLEAR(buf,rowsize2);
- #define LOOP(z) \
- for (int i=0,p=0; p<rowsize2; p+=z) \
- for (int j=0; j<scalex; j++,i+=z)
- switch (chans) {
- case 1: LOOP(1) {Z(0);} break;
- case 2: LOOP(2) {Z(0);Z(1);} break;
- case 3: LOOP(3) {Z(0);Z(1);Z(2);} break;
- case 4: LOOP(4) {Z(0);Z(1);Z(2);Z(3);} break;
- default:LOOP(chans) {for (int k=0; k<chans; k++) Z(k);} break;
- }
- #undef LOOP
- y++;
- if (y%scaley==0 && out->dim) {
- op_div->map(rowsize2,buf,(T)(scalex*scaley));
- out->send(rowsize2,buf);
- CLEAR(buf,rowsize2);
- }
- data+=rowsize;
- n-=rowsize;
- }
- #undef Z
- } else {
- #define Z(z) buf[p+z]=data[i+z]
- for (; n>0 && out->dim; data+=rowsize, n-=rowsize,y++) {
- if (y%scaley!=0) continue;
- #define LOOP(z) for (int i=0,p=0; p<rowsize2; i+=xinc, p+=z)
- switch(in->dim->get(2)) {
- case 1: LOOP(1) {Z(0);} break;
- case 2: LOOP(2) {Z(0);Z(1);} break;
- case 3: LOOP(3) {Z(0);Z(1);Z(2);} break;
- case 4: LOOP(4) {Z(0);Z(1);Z(2);Z(3);} break;
- default:LOOP(chans) {for (int k=0; k<chans; k++) Z(k);}break;
- }
- #undef LOOP
- out->send(rowsize2,buf);
- }
- }
- #undef Z
-} GRID_END
-
-GRID_INPUT(GridDownscaleBy,1,scale) { prepare_scale_factor(); } GRID_END
-
-\def void initialize (Grid *factor, Symbol option) {
- scale.constrain(expect_scale_factor);
- rb_call_super(argc,argv);
- scale=new Grid(INT2NUM(2));
- if (factor) scale=factor;
- prepare_scale_factor();
- smoothly = option==SYM(smoothly);
-}
-
-\classinfo { IEVAL(rself,"install '#downscale_by',2,1"); }
-\end class GridDownscaleBy
-
-//****************************************************************
-\class GridLayer < GridObject
-struct GridLayer : GridObject {
- PtrGrid r;
- GridLayer() { r.constrain(expect_rgb_picture); }
- \grin 0 int
- \grin 1 int
-};
-
-GRID_INLET(GridLayer,0) {
- NOTEMPTY(r);
- SAME_TYPE(in,r);
- P<Dim> a = in->dim;
- expect_rgba_picture(a);
- if (a->get(1)!=r->dim->get(1)) RAISE("same width please");
- if (a->get(0)!=r->dim->get(0)) RAISE("same height please");
- in->set_factor(a->prod(2));
- out=new GridOutlet(this,0,r->dim);
-} GRID_FLOW {
- Pt<T> rr = ((Pt<T>)*r) + in->dex*3/4;
- STACK_ARRAY(T,foo,n*3/4);
-#define COMPUTE_ALPHA(c,a) \
- foo[j+c] = (data[i+c]*data[i+a] + rr[j+c]*(256-data[i+a])) >> 8
- for (int i=0,j=0; i<n; i+=4,j+=3) {
- COMPUTE_ALPHA(0,3);
- COMPUTE_ALPHA(1,3);
- COMPUTE_ALPHA(2,3);
- }
-#undef COMPUTE_ALPHA
- out->send(n*3/4,foo);
-} GRID_END
-
-GRID_INPUT(GridLayer,1,r) {} GRID_END
-
-\classinfo { IEVAL(rself,"install '#layer',2,1"); }
-\end class GridLayer
-
-// ****************************************************************
-// pad1,pad2 only are there for 32-byte alignment
-struct Line { int32 y1,x1,y2,x2,x,m,pad1,pad2; };
-
-static void expect_polygon (P<Dim> d) {
- if (d->n!=2 || d->get(1)!=2) RAISE("expecting Dim[n,2] polygon");
-}
-
-\class DrawPolygon < GridObject
-struct DrawPolygon : GridObject {
- \attr Numop *op;
- \attr PtrGrid color;
- \attr PtrGrid polygon;
- PtrGrid color2;
- PtrGrid lines;
- int lines_start;
- int lines_stop;
- DrawPolygon() {
- color.constrain(expect_max_one_dim);
- polygon.constrain(expect_polygon);
- }
- \decl void initialize (Numop *op, Grid *color=0, Grid *polygon=0);
- \grin 0
- \grin 1
- \grin 2 int32
- void init_lines();
-
-};
-
-void DrawPolygon::init_lines () {
- int nl = polygon->dim->get(0);
- lines=new Grid(new Dim(nl,8), int32_e);
- Pt<Line> ld = Pt<Line>((Line *)(int32 *)*lines,nl);
- Pt<int32> pd = *polygon;
- for (int i=0,j=0; i<nl; i++) {
- ld[i].y1 = pd[j+0];
- ld[i].x1 = pd[j+1];
- j=(j+2)%(2*nl);
- ld[i].y2 = pd[j+0];
- ld[i].x2 = pd[j+1];
- if (ld[i].y1>ld[i].y2) memswap(Pt<int32>(ld+i)+0,Pt<int32>(ld+i)+2,2);
- }
-}
-
-static int order_by_starting_scanline (const void *a, const void *b) {
- return ((Line *)a)->y1 - ((Line *)b)->y1;
-}
-
-static int order_by_column (const void *a, const void *b) {
- return ((Line *)a)->x - ((Line *)b)->x;
-}
-
-GRID_INLET(DrawPolygon,0) {
- NOTEMPTY(color);
- NOTEMPTY(polygon);
- NOTEMPTY(lines);
- SAME_TYPE(in,color);
- if (in->dim->n!=3) RAISE("expecting 3 dimensions");
- if (in->dim->get(2)!=color->dim->get(0))
- RAISE("image does not have same number of channels as stored color");
- out=new GridOutlet(this,0,in->dim,in->nt);
- lines_start = lines_stop = 0;
- in->set_factor(in->dim->get(1)*in->dim->get(2));
- int nl = polygon->dim->get(0);
- qsort((int32 *)*lines,nl,sizeof(Line),order_by_starting_scanline);
- int cn = color->dim->prod();
- color2=new Grid(new Dim(cn*16), color->nt);
- for (int i=0; i<16; i++) COPY((Pt<T>)*color2+cn*i,(Pt<T>)*color,cn);
-} GRID_FLOW {
- int nl = polygon->dim->get(0);
- Pt<Line> ld = Pt<Line>((Line *)(int32 *)*lines,nl);
- int f = in->factor();
- int y = in->dex/f;
- int cn = color->dim->prod();
- Pt<T> cd = (Pt<T>)*color2;
-
- while (n) {
- while (lines_stop != nl && ld[lines_stop].y1<=y) lines_stop++;
- for (int i=lines_start; i<lines_stop; i++) {
- if (ld[i].y2<=y) {
- memswap(ld+i,ld+lines_start,1);
- lines_start++;
- }
- }
- if (lines_start == lines_stop) {
- out->send(f,data);
- } else {
- int32 xl = in->dim->get(1);
- Pt<T> data2 = ARRAY_NEW(T,f);
- COPY(data2,data,f);
- for (int i=lines_start; i<lines_stop; i++) {
- Line &l = ld[i];
- l.x = l.x1 + (y-l.y1)*(l.x2-l.x1+1)/(l.y2-l.y1+1);
- }
- qsort(ld+lines_start,lines_stop-lines_start,
- sizeof(Line),order_by_column);
- for (int i=lines_start; i<lines_stop-1; i+=2) {
- int xs = max(ld[i].x,(int32)0), xe = min(ld[i+1].x,xl);
- if (xs>=xe) continue; /* !@#$ WHAT? */
- while (xe-xs>=16) { op->zip(16*cn,data2+cn*xs,cd); xs+=16; }
- op->zip((xe-xs)*cn,data2+cn*xs,cd);
- }
- out->give(f,data2);
- }
- n-=f;
- data+=f;
- y++;
- }
-} GRID_END
-
-
-GRID_INPUT(DrawPolygon,1,color) {} GRID_END
-GRID_INPUT(DrawPolygon,2,polygon) {init_lines();} GRID_END
-
-\def void initialize (Numop *op, Grid *color, Grid *polygon) {
- rb_call_super(argc,argv);
- this->op = op;
- if (color) this->color=color;
- if (polygon) { this->polygon=polygon; init_lines(); }
-}
-
-\classinfo { IEVAL(rself,"install '#draw_polygon',3,1"); }
-\end class DrawPolygon
-
-//****************************************************************
-static void expect_position(P<Dim> d) {
- if (d->n!=1) RAISE("position should have 1 dimension, not %d", d->n);
- if (d->v[0]!=2) RAISE("position dim 0 should have 2 elements, not %d", d->v[0]);
-}
-
-\class DrawImage < GridObject
-struct DrawImage : GridObject {
- \attr Numop *op;
- \attr PtrGrid image;
- \attr PtrGrid position;
- \attr bool alpha;
- \attr bool tile;
-
- DrawImage() : alpha(false), tile(false) {
- position.constrain(expect_position);
- image.constrain(expect_picture);
- }
-
- \decl void initialize (Numop *op, Grid *image=0, Grid *position=0);
- \decl void _0_alpha (bool v=true);
- \decl void _0_tile (bool v=true);
- \grin 0
- \grin 1
- \grin 2 int32
- // draw row # ry of right image in row buffer buf, starting at xs
- // overflow on both sides has to be handled automatically by this method
- template <class T> void draw_segment(Pt<T> obuf, Pt<T> ibuf, int ry, int x0);
-};
-
-#define COMPUTE_ALPHA(c,a) obuf[j+(c)] = ibuf[j+(c)] + (rbuf[a])*(obuf[j+(c)]-ibuf[j+(c)])/256;
-#define COMPUTE_ALPHA4(b) \
- COMPUTE_ALPHA(b+0,b+3); \
- COMPUTE_ALPHA(b+1,b+3); \
- COMPUTE_ALPHA(b+2,b+3); \
- obuf[b+3] = rbuf[b+3] + (255-rbuf[b+3])*(ibuf[j+b+3])/256;
-
-template <class T> void DrawImage::draw_segment(Pt<T> obuf, Pt<T> ibuf, int ry, int x0) {
- if (ry<0 || ry>=image->dim->get(0)) return; // outside of image
- int sx = in[0]->dim->get(1), rsx = image->dim->get(1);
- int sc = in[0]->dim->get(2), rsc = image->dim->get(2);
- Pt<T> rbuf = (Pt<T>)*image + ry*rsx*rsc;
- if (x0>sx || x0<=-rsx) return; // outside of buffer
- int n=rsx;
- if (x0+n>sx) n=sx-x0;
- if (x0<0) { rbuf-=rsc*x0; n+=x0; x0=0; }
- if (alpha && rsc==4 && sc==3) { // RGB by RGBA //!@#$ optimise
- int j=sc*x0;
- for (; n; n--, rbuf+=4, j+=3) {
- op->zip(sc,obuf+j,rbuf); COMPUTE_ALPHA(0,3); COMPUTE_ALPHA(1,3); COMPUTE_ALPHA(2,3);
- }
- } else if (alpha && rsc==4 && sc==4) { // RGBA by RGBA
- op->zip(n*rsc,obuf+x0*rsc,rbuf);
- int j=sc*x0;
- for (; n>=4; n-=4, rbuf+=16, j+=16) {
- COMPUTE_ALPHA4(0);COMPUTE_ALPHA4(4);
- COMPUTE_ALPHA4(8);COMPUTE_ALPHA4(12);
- }
- for (; n; n--, rbuf+=4, j+=4) {
- COMPUTE_ALPHA4(0);
- }
- } else { // RGB by RGB, etc
- op->zip(n*rsc,obuf+sc*x0,rbuf);
- }
-}
-
-GRID_INLET(DrawImage,0) {
- NOTEMPTY(image);
- NOTEMPTY(position);
- SAME_TYPE(in,image);
- if (in->dim->n!=3) RAISE("expecting 3 dimensions");
- int lchan = in->dim->get(2);
- int rchan = image->dim->get(2);
- if (alpha && rchan!=4) {
- RAISE("alpha mode works only with 4 channels in right_hand");
- }
- if (lchan != rchan-(alpha?1:0) && lchan != rchan) {
- RAISE("right_hand has %d channels, alpha=%d, left_hand has %d, expecting %d or %d",
- rchan, alpha?1:0, lchan, rchan-(alpha?1:0), rchan);
- }
- out=new GridOutlet(this,0,in->dim,in->nt);
- in->set_factor(in->dim->get(1)*in->dim->get(2));
-} GRID_FLOW {
- int f = in->factor();
- int y = in->dex/f;
- if (position->nt != int32_e) RAISE("position has to be int32");
- int py = ((int32*)*position)[0], rsy = image->dim->v[0], sy=in->dim->get(0);
- int px = ((int32*)*position)[1], rsx = image->dim->v[1], sx=in->dim->get(1);
- for (; n; y++, n-=f, data+=f) {
- int ty = div2(y-py,rsy);
- if (tile || ty==0) {
- Pt<T> data2 = ARRAY_NEW(T,f);
- COPY(data2,data,f);
- if (tile) {
- for (int x=px-div2(px+rsx-1,rsx)*rsx; x<sx; x+=rsx) {
- draw_segment(data2,data,mod(y-py,rsy),x);
- }
- } else {
- draw_segment(data2,data,y-py,px);
- }
- out->give(f,data2);
- } else {
- out->send(f,data);
- }
- }
-} GRID_END
-
-GRID_INPUT(DrawImage,1,image) {} GRID_END
-GRID_INPUT(DrawImage,2,position) {} GRID_END
-\def void _0_alpha (bool v=true) { alpha = v; gfpost("ALPHA=%d",v); }
-\def void _0_tile (bool v=true) { tile = v; }
-
-\def void initialize (Numop *op, Grid *image, Grid *position) {
- rb_call_super(argc,argv);
- this->op = op;
- if (image) this->image=image;
- if (position) this->position=position;
- else this->position=new Grid(new Dim(2),int32_e,true);
-}
-
-\classinfo { IEVAL(rself,"install '#draw_image',3,1"); }
-\end class DrawImage
-
-void startup_flow_objects_for_image () {
- \startall
-}
diff --git a/externals/gridflow/base/flow_objects_for_matrix.c b/externals/gridflow/base/flow_objects_for_matrix.c
deleted file mode 100644
index b88accba..00000000
--- a/externals/gridflow/base/flow_objects_for_matrix.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- $Id: flow_objects_for_matrix.c,v 1.2 2006-03-15 04:37:08 matju Exp $
-
- GridFlow
- Copyright (c) 2001,2002,2003 by Mathieu Bouchard
-
- 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.
-
- See file ../COPYING for further informations on licensing terms.
-
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include <math.h>
-#include "grid.h.fcs"
-
-// produce an upper triangular matrix with ones on the diagonal
-// will also affect any additional columns using the same row-operations
-
-void expect_complete_matrix (P<Dim> d) {
- if (d->n!=2) RAISE("bletch");
- if (d->get(0)>d->get(1)) RAISE("argh");
-}
-
-\class GridMatrixSolve < GridObject
-struct GridMatrixSolve : GridObject {
- Numop *op_sub;
- Numop *op_mul;
- Numop *op_div;
- PtrGrid matrix;
- GridMatrixSolve() {
- matrix.constrain(expect_complete_matrix);
- }
- \decl void initialize ();
- \grin 0 float
-};
-
-GRID_INPUT(GridMatrixSolve,0,matrix) {
- int n = matrix->dim->get(0); // # rows
- int m = matrix->dim->get(1); // # columns
- Pt<T> mat = (Pt<T>)*matrix;
- for (int j=0; j<n; j++) {
- op_div->map(m,mat+j*m,mat[j*m+j]);
- for (int i=j+1; i<n; i++) {
- STACK_ARRAY(T,row,m);
- COPY(row,mat+j,m);
- op_mul->map(m,row,mat[i*m+j]);
- op_sub->zip(m,mat+i*m,row);
- }
- }
- GridOutlet out(this,0,matrix->dim);
- out.send(n*m,mat);
-} GRID_END
-
-\def void initialize () {
- rb_call_super(argc,argv);
- this->op_sub = op_sub;
- this->op_mul = op_mul;
- this->op_div = op_div;
-}
-
-\classinfo { IEVAL(rself,"install '#matrix_solve',1,1"); }
-\end class
-
-void startup_flow_objects_for_matrix () {
- \startall
-}
diff --git a/externals/gridflow/base/grid.c b/externals/gridflow/base/grid.c
deleted file mode 100644
index c3ec5932..00000000
--- a/externals/gridflow/base/grid.c
+++ /dev/null
@@ -1,616 +0,0 @@
-/*
- $Id: grid.c,v 1.2 2006-03-15 04:37:08 matju Exp $
-
- GridFlow
- Copyright (c) 2001,2002,2003,2004 by Mathieu Bouchard
-
- 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.
-
- See file ../COPYING for further informations on licensing terms.
-
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include <stdlib.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/time.h>
-#include "grid.h.fcs"
-#include <ctype.h>
-
-/* copied from bridge/puredata.c (sorry: linkage issue) */
-struct Pointer : CObject {
- void *p;
- Pointer(void *_p) : p(_p) {}
-};
-
-#define Pointer_s_new Pointer_s_new_2
-#define Pointer_get Pointer_get_2
-
-static Ruby Pointer_s_new (void *ptr) {
- Pointer *self = new Pointer(ptr);
- Ruby rself = Data_Wrap_Struct(EVAL("GridFlow::Pointer"), 0, CObject_free, self);
- self->rself = rself;
- return rself;
-}
-static void *Pointer_get (Ruby rself) {
- DGS(Pointer);
- return self->p;
-}
-
-//#define TRACE fprintf(stderr,"%s %s [%s:%d]\n",INFO(parent),__PRETTY_FUNCTION__,__FILE__,__LINE__);assert(this);
-#define TRACE assert(this);
-
-#define CHECK_TYPE(d) \
- if (NumberTypeE_type_of(d)!=this->nt) RAISE("%s(%s): " \
- "type mismatch during transmission (got %s expecting %s)", \
- INFO(parent), __PRETTY_FUNCTION__, \
- number_type_table[NumberTypeE_type_of(d)].name, \
- number_type_table[this->nt].name);
-
-#define CHECK_BUSY(s) \
- if (!dim) RAISE("%s: " #s " not busy",INFO(parent));
-
-#define CHECK_ALIGN(d) \
- {int bytes = number_type_table[nt].size/8; \
- int align = ((long)(void*)d)%bytes; \
- if (align) {L;gfpost("%s(%s): Alignment Warning: %p is not %d-aligned: %d", \
- INFO(parent), __PRETTY_FUNCTION__, (void*)d,bytes,align);}}
-
-#define CHECK_ALIGN2(d,nt) \
- {int bytes = number_type_table[nt].size/8; \
- int align = ((long)(void*)d)%bytes; \
- if (align) {L;gfpost("Alignment Warning: %p is not %d-aligned: %d", \
- (void*)d,bytes,align);}}
-
-// **************** Grid ******************************************
-
-#define FOO(S) static inline void NUM(Ruby x, S &y) {y=convert(x,(int32*)0);}
-EACH_INT_TYPE(FOO)
-#undef FOO
-
-#define FOO(S) \
-static inline void NUM(Ruby x, S &y) { \
- if (TYPE(x)==T_FLOAT) y = RFLOAT(x)->value; \
- else if (INTEGER_P(x)) y = convert(x,(S*)0); \
- else RAISE("expected Float (or at least Integer)");}
-EACH_FLOAT_TYPE(FOO)
-#undef FOO
-
-static inline void NUM(Ruby x, ruby &y) { y.r=x; }
-
-void Grid::init_from_ruby_list(int n, Ruby *a, NumberTypeE nt) {
- Ruby delim = SYM(#);
- for (int i=0; i<n; i++) {
- if (a[i] == delim) {
- STACK_ARRAY(int32,v,i);
- if (i!=0 && TYPE(a[i-1])==T_SYMBOL) nt=NumberTypeE_find(a[--i]);
- for (int j=0; j<i; j++) v[j] = convert(a[j],(int32*)0);
- init(new Dim(i,v),nt);
- CHECK_ALIGN2(this->data,nt);
- if (a[i] != delim) i++;
- i++; a+=i; n-=i;
- goto fill;
- }
- }
- if (n!=0 && TYPE(a[0])==T_SYMBOL) {
- nt = NumberTypeE_find(a[0]);
- a++, n--;
- }
- init(new Dim(n),nt);
- CHECK_ALIGN2(this->data,nt);
- fill:
- int nn = dim->prod();
- n = min(n,nn);
-#define FOO(type) { \
- Pt<type> p = (Pt<type>)*this; \
- if (n==0) CLEAR(p,nn); \
- else { \
- for (int i=0; i<n; i++) NUM(a[i],p[i]); \
- for (int i=n; i<nn; i+=n) COPY(p+i,p,min(n,nn-i)); }}
- TYPESWITCH(nt,FOO,)
-#undef FOO
-}
-
-void Grid::init_from_ruby(Ruby x) {
- if (TYPE(x)==T_ARRAY) {
- init_from_ruby_list(rb_ary_len(x),rb_ary_ptr(x));
- } else if (INTEGER_P(x) || FLOAT_P(x)) {
- init(new Dim(),int32_e);
- CHECK_ALIGN2(this->data,nt);
- ((Pt<int32>)*this)[0] = INT(x);
- } else {
- rb_funcall(
- EVAL("proc{|x| raise \"can't convert to grid: #{x.inspect}\"}"),
- SI(call),1,x);
- }
-}
-
-// **************** GridInlet *************************************
-
-// must be set before the end of GRID_BEGIN phase, and so cannot be changed
-// afterwards. This is to allow some optimisations. Anyway there is no good reason
-// why this would be changed afterwards.
-void GridInlet::set_factor(int factor) {
- if(!dim) RAISE("huh?");
- if(factor<=0) RAISE("%s: factor=%d should be >= 1",INFO(parent),factor);
- if (dim->prod() && dim->prod() % factor)
- RAISE("%s: set_factor: expecting divisor",INFO(parent));
- if (factor > 1) {
- buf=new Grid(new Dim(factor), nt);
- bufi=0;
- } else {
- buf=0;
- }
-}
-
-static Ruby GridInlet_begin_1(GridInlet *self) {
-#define FOO(T) self->gh->flow(self,-1,Pt<T>()); break;
- TYPESWITCH(self->nt,FOO,)
-#undef FOO
- return Qnil;
-}
-
-static Ruby GridInlet_begin_2(GridInlet *self) {
- self->dim = 0; // hack
- return (Ruby) 0;
-}
-
-bool GridInlet::supports_type(NumberTypeE nt) {
-#define FOO(T) return !! gh->flow_##T;
- TYPESWITCH(nt,FOO,return false)
-#undef FOO
-}
-
-Ruby GridInlet::begin(int argc, Ruby *argv) {TRACE;
- if (!argc) return PTR2FIX(this);
- GridOutlet *back_out = (GridOutlet *) Pointer_get(argv[0]);
- nt = (NumberTypeE) INT(argv[1]);
- argc-=2, argv+=2;
- PROF(parent) {
- if (dim) RAISE("%s: grid inlet conflict; aborting %s in favour of %s",
- INFO(parent), INFO(sender), INFO(back_out->parent));
- sender = back_out->parent;
- if ((int)nt<0 || (int)nt>=(int)number_type_table_end)
- RAISE("%s: inlet: unknown number type",INFO(parent));
- if (!supports_type(nt))
- RAISE("%s: number type %s not supported here",
- INFO(parent), number_type_table[nt].name);
- STACK_ARRAY(int32,v,argc);
- for (int i=0; i<argc; i++) v[i] = NUM2INT(argv[i]);
- P<Dim> dim = this->dim = new Dim(argc,v);
- dex=0;
- buf=0;
- int r = rb_ensure(
- (RMethod)GridInlet_begin_1,(Ruby)this,
- (RMethod)GridInlet_begin_2,(Ruby)this);
- if (!r) {abort(); goto hell;}
- this->dim = dim;
- back_out->callback(this);
- hell:;} // PROF
- return Qnil;
-}
-
-template <class T> void GridInlet::flow(int mode, int n, Pt<T> data) {TRACE;
- CHECK_BUSY(inlet);
- CHECK_TYPE(*data);
- CHECK_ALIGN(data);
- PROF(parent) {
- if (this->mode==0) {dex += n; return;} // ignore data
- if (n==0) return; // no data
- switch(mode) {
- case 4:{
- int d = dex + bufi;
- if (d+n > dim->prod()) {
- gfpost("grid input overflow: %d of %d from [%s] to [%s]",
- d+n, dim->prod(), INFO(sender), 0);
- n = dim->prod() - d;
- if (n<=0) return;
- }
- int bufn = factor();
- if (buf && bufi) {
- Pt<T> bufd = (Pt<T>)*buf;
- int k = min(n,bufn-bufi);
- COPY(bufd+bufi,data,k);
- bufi+=k; data+=k; n-=k;
- if (bufi==bufn) {
- int newdex = dex+bufn;
- if (this->mode==6) {
- Pt<T> data2 = ARRAY_NEW(T,bufn);
- COPY(data2,bufd,bufn);
- CHECK_ALIGN(data2);
- gh->flow(this,bufn,data2);
- } else {
- CHECK_ALIGN(bufd);
- gh->flow(this,bufn,bufd);
- }
- dex = newdex;
- bufi = 0;
- }
- }
- int m = (n/bufn)*bufn;
- if (m) {
- int newdex = dex + m;
- if (this->mode==6) {
- Pt<T> data2 = ARRAY_NEW(T,m);
- COPY(data2,data,m);
- CHECK_ALIGN(data2);
- gh->flow(this,m,data2);
- } else {
- gh->flow(this,m,data);
- }
- dex = newdex;
- }
- data += m;
- n -= m;
- if (buf && n>0) COPY((Pt<T>)*buf+bufi,data,n), bufi+=n;
- }break;
- case 6:{
- assert(!buf);
- int newdex = dex + n;
- gh->flow(this,n,data);
- if (this->mode==4) delete[] (T *)data;
- dex = newdex;
- }break;
- case 0: break; // ignore data
- default: RAISE("%s: unknown inlet mode",INFO(parent));
- }} // PROF
-}
-
-void GridInlet::end() {TRACE;
- assert(this);
- if (!dim) RAISE("%s: inlet not busy",INFO(parent));
- if (dim->prod() != dex) {
- gfpost("incomplete grid: %d of %d from [%s] to [%s]",
- dex, dim->prod(), INFO(sender), INFO(parent));
- }
- PROF(parent) {
-#define FOO(T) gh->flow(this,-2,Pt<T>());
- TYPESWITCH(nt,FOO,)
-#undef FOO
- } // PROF
- dim=0;
- buf=0;
- dex=0;
-}
-
-template <class T> void GridInlet::from_grid2(Grid *g, T foo) {TRACE;
- nt = g->nt;
- dim = g->dim;
- int n = g->dim->prod();
- gh->flow(this,-1,Pt<T>());
- if (n>0 && this->mode!=0) {
- Pt<T> data = (Pt<T>)*g;
- CHECK_ALIGN(data);
- int size = g->dim->prod();
- if (this->mode==6) {
- Pt<T> d = data;
- data = ARRAY_NEW(T,size); // problem with int64,float64 here.
- COPY(data,d,size);
- CHECK_ALIGN(data);
- gh->flow(this,n,data);
- } else {
- int ntsz = number_type_table[nt].size;
- int m = GridOutlet::MAX_PACKET_SIZE/*/ntsz*//factor();
- if (!m) m++;
- m *= factor();
- while (n) {
- if (m>n) m=n;
- CHECK_ALIGN(data);
- gh->flow(this,m,data);
- data+=m; n-=m; dex+=m;
- }
- }
- }
- gh->flow(this,-2,Pt<T>());
- //!@#$ add error handling.
- // rescue; abort(); end ???
- dim = 0;
- dex = 0;
-}
-
-void GridInlet::from_grid(Grid *g) {TRACE;
- if (!supports_type(g->nt))
- RAISE("%s: number type %s not supported here",
- INFO(parent), number_type_table[g->nt].name);
-#define FOO(T) from_grid2(g,(T)0);
- TYPESWITCH(g->nt,FOO,)
-#undef FOO
-}
-
-/* **************** GridOutlet ************************************ */
-
-void GridOutlet::begin(int woutlet, P<Dim> dim, NumberTypeE nt) {TRACE;
- int n = dim->count();
- this->nt = nt;
- this->dim = dim;
- Ruby a[n+4];
- a[0] = INT2NUM(woutlet);
- a[1] = bsym._grid;
- a[2] = Pointer_s_new(this);
- a[3] = INT2NUM(nt);
- for(int i=0; i<n; i++) a[4+i] = INT2NUM(dim->get(i));
- parent->send_out(COUNT(a),a);
- frozen=true;
- if (!dim->prod()) {end(); return;}
- int32 lcm_factor = 1;
- for (uint32 i=0; i<inlets.size(); i++) lcm_factor = lcm(lcm_factor,inlets[i]->factor());
- if (nt != buf->nt) {
- // biggest packet size divisible by lcm_factor
- int32 v = (MAX_PACKET_SIZE/lcm_factor)*lcm_factor;
- if (v==0) v=MAX_PACKET_SIZE; // factor too big. don't have a choice.
- buf=new Grid(new Dim(v),nt);
- }
-}
-
-// send modifies dex; send_direct doesn't
-template <class T>
-void GridOutlet::send_direct(int n, Pt<T> data) {TRACE;
- assert(data); assert(frozen);
- CHECK_BUSY(outlet); CHECK_TYPE(*data); CHECK_ALIGN(data);
- for (; n>0; ) {
- int pn = min(n,MAX_PACKET_SIZE);
- for (uint32 i=0; i<inlets.size(); i++) inlets[i]->flow(4,pn,data);
- data+=pn, n-=pn;
- }
-}
-
-void GridOutlet::flush() {TRACE;
- if (!bufi) return;
-#define FOO(T) send_direct(bufi,(Pt<T>)*buf);
- TYPESWITCH(buf->nt,FOO,)
-#undef FOO
- bufi = 0;
-}
-
-template <class T, class S>
-static void convert_number_type(int n, Pt<T> out, Pt<S> in) {
- for (int i=0; i<n; i++) out[i]=(T)in[i];
-}
-
-//!@#$ buffering in outlet still is 8x faster...?
-//!@#$ should use BitPacking for conversion...?
-// send modifies dex; send_direct doesn't
-template <class T>
-void GridOutlet::send(int n, Pt<T> data) {TRACE;
- assert(data); assert(frozen);
- if (!n) return;
- CHECK_BUSY(outlet); CHECK_ALIGN(data);
- if (NumberTypeE_type_of(*data)!=nt) {
- int bs = MAX_PACKET_SIZE;
-#define FOO(T) { \
- STACK_ARRAY(T,data2,bs); \
- for (;n>=bs;n-=bs,data+=bs) { \
- convert_number_type(bs,data2,data); send(bs,data2);} \
- convert_number_type(n,data2,data); \
- send(n,data2); }
- TYPESWITCH(nt,FOO,)
-#undef FOO
- } else {
- dex += n;
- assert(dex <= dim->prod());
- if (n > MIN_PACKET_SIZE || bufi + n > MAX_PACKET_SIZE) flush();
- if (n > MIN_PACKET_SIZE) {
- send_direct(n,data);
- } else {
- COPY((Pt<T>)*buf+bufi,data,n);
- bufi += n;
- }
- if (dex==dim->prod()) end();
- }
-}
-
-template <class T>
-void GridOutlet::give(int n, Pt<T> data) {TRACE;
- assert(data); CHECK_BUSY(outlet); assert(frozen);
- assert(dex+n <= dim->prod()); CHECK_ALIGN(data);
- if (NumberTypeE_type_of(*data)!=nt) {
- send(n,data);
- delete[] (T *)data;
- return;
- }
- if (inlets.size()==1 && inlets[0]->mode == 6) {
- // this is the copyless buffer passing
- flush();
- inlets[0]->flow(6,n,data);
- dex += n;
- } else {
- flush();
- send_direct(n,data);
- dex += n;
- delete[] (T *)data;
- }
- if (dex==dim->prod()) end();
-}
-
-void GridOutlet::callback(GridInlet *in) {TRACE;
- CHECK_BUSY(outlet); assert(!frozen);
- int mode = in->mode;
- assert(mode==6 || mode==4 || mode==0);
- inlets.push_back(in);
-}
-
-\class GridObject < FObject
-
-//!@#$ does not handle types properly
-//!@#$ most possibly a big hack
-template <class T>
-void GridObject_r_flow(GridInlet *in, int n, Pt<T> data) {
- GridObject *self = in->parent;
- uint32 i;
- for (i=0; i<self->in.size(); i++) if (in==self->in[i].p) break;
- if (i==self->in.size()) RAISE("inlet not found?");
- if (n==-1) {
- rb_funcall(self->rself,SI(send_in),2,INT2NUM(i),SYM(rgrid_begin));
- } else if (n>=0) {
- Ruby buf = rb_str_new((char *)((uint8 *)data),n*sizeof(T));
- rb_funcall(self->rself,SI(send_in),3,INT2NUM(i),SYM(rgrid_flow),buf);
- } else {
- rb_funcall(self->rself,SI(send_in),2,INT2NUM(i),SYM(rgrid_end));
- }
-}
-
-\def Symbol inlet_nt (int inln) {
- if (inln<0 || inln>=(int)in.size()) RAISE("bad inlet number");
- P<GridInlet> inl = in[inln];
- if (!inl) RAISE("no such inlet #%d",inln);
- if (!inl->dim) return Qnil;
- return number_type_table[inl->nt].sym;
-}
-
-\def Array inlet_dim (int inln) {
- if (inln<0 || inln>=(int)in.size()) RAISE("bad inlet number");
- P<GridInlet> inl = in[inln];
- if (!inl) RAISE("no such inlet #%d",inln);
- if (!inl->dim) return Qnil;
- int n=inl->dim->count();
- Ruby a = rb_ary_new2(n);
- for(int i=0; i<n; i++) rb_ary_push(a,INT2NUM(inl->dim->v[i]));
- return a;
-}
-
-\def void inlet_set_factor (int inln, int factor) {
- if (inln<0 || inln>=(int)in.size()) RAISE("bad inlet number");
- P<GridInlet> inl = in[inln];
- if (!inl) RAISE("no such inlet #%d",inln);
- if (!inl->dim) RAISE("inlet #%d not active",inln);
- inl->set_factor(factor);
-}
-
-\def void send_out_grid_begin (int outlet, Array buf, NumberTypeE nt=int32_e) {
- if (outlet<0) RAISE("bad outlet number");
- int n = rb_ary_len(buf);
- Ruby *p = rb_ary_ptr(buf);
- STACK_ARRAY(int32,v,n);
- for (int i=0; i<n; i++) v[i] = convert(p[i],(int32*)0);
- out = new GridOutlet(this,outlet,new Dim(n,v),nt); // valgrind says leak?
-}
-
-template <class T>
-void send_out_grid_flow_2(P<GridOutlet> go, Ruby s, T bogus) {
- int n = rb_str_len(s) / sizeof(T);
- Pt<T> p = rb_str_pt(s,T);
- go->send(n,p);
-}
-
-\def void send_out_grid_flow (int outlet, String buf, NumberTypeE nt=int32_e) {
- if (outlet<0) RAISE("bad outlet number");
-#define FOO(T) send_out_grid_flow_2(out,argv[1],(T)0);
- TYPESWITCH(nt,FOO,)
-#undef FOO
-}
-
-// install_rgrid(Integer inlet, Boolean multi_type? = true)
-static Ruby GridObject_s_install_rgrid(int argc, Ruby *argv, Ruby rself) {
- if (argc<1 || argc>2) RAISE("er...");
- IEVAL(rself,"@handlers||=[]");
- Ruby handlers = rb_ivar_get(rself,SI(@handlers));
- GridHandler *gh = new GridHandler;
- bool mt = argc>1 ? argv[1]==Qtrue : 0; /* multi_type? */
- if (mt) {
-#define FOO(S) gh->flow_##S = GridObject_r_flow;
-EACH_NUMBER_TYPE(FOO)
-#undef FOO
- } else {
-#define FOO(S) gh->flow_##S = 0;
-EACH_NUMBER_TYPE(FOO)
-#undef FOO
- }
- gh->flow_int32 = GridObject_r_flow;
- //IEVAL(rself,"self.class_eval { def _0_grid(*a) ___grid(0,*a) end }");
- rb_funcall(handlers,SI([]=),2,INT2NUM(INT(argv[0])),PTR2FIX(gh));
- return Qnil;
-}
-
-static Ruby GridObject_s_instance_methods(int argc, Ruby *argv, Ruby rself) {
- static const char *names[] = {"grid","list","float"};
- Ruby list = rb_class_instance_methods(argc,argv,rself);
- Ruby handlers = rb_ivar_get(rself,SI(@handlers));
- if (handlers==Qnil) return list;
- for (int i=0; i<rb_ary_len(handlers); i++) {
- Ruby ghp = rb_ary_ptr(handlers)[i];
- if (ghp==Qnil) continue;
- GridHandler *gh = FIX2PTR(GridHandler,ghp);
- char buf[256];
- for (int j=0; j<COUNT(names); j++) {
- sprintf(buf,"_%d_%s",i,names[j]);
- rb_ary_push(list,rb_str_new2(buf));
- }
- }
- return list;
-}
-
-// this does auto-conversion of list/float to grid
-// this also (will) do grid inputs for ruby stuff.
-\def Ruby method_missing (...) {
- {
- if (argc<1) RAISE("not enough arguments");
- if (!SYMBOL_P(argv[0])) RAISE("expected symbol");
- const char *name = rb_sym_name(argv[0]);
- char *endp;
- if (*name++!='_') goto hell;
- int i = strtol(name,&endp,10);
- if (name==endp) goto hell;
- if (*endp++!='_') goto hell;
- if (strcmp(endp,"grid")==0) {
- Ruby handlers = rb_ivar_get(rb_obj_class(rself),SI(@handlers));
- if (TYPE(handlers)!=T_ARRAY) {
- rb_p(handlers);
- RAISE("gridhandler-list missing (maybe forgot install_rgrid ?)"
- " while trying to receive on inlet %d",i);
- }
- if (i>=rb_ary_len(handlers)) RAISE("BORK");
- GridHandler *gh = FIX2PTR(GridHandler, rb_ary_ptr(handlers)[i]);
- if (in.size()<=(uint32)i) in.resize(i+1);
- if (!in[i]) in[i]=new GridInlet((GridObject *)this,gh);
- return in[i]->begin(argc-1,argv+1);
- }
- // we call the grid method recursively to ask it its GridInlet*
- // don't do this before checking the missing method is exactly that =)
- char foo[42];
- sprintf(foo,"_%d_grid",i);
- P<GridInlet> inl = FIX2PTR(GridInlet,rb_funcall(rself,rb_intern(foo),0));
- if (strcmp(endp,"list" )==0) return inl->from_ruby_list(argc-1,argv+1), Qnil;
- if (strcmp(endp,"float")==0) return inl->from_ruby (argc-1,argv+1), Qnil;
- }
- hell: return rb_call_super(argc,argv);
-}
-
-\classinfo {
- IEVAL(rself,"install 'GridObject',0,0");
- // define in Ruby-metaclass
- rb_define_singleton_method(rself,"instance_methods",(RMethod)GridObject_s_instance_methods,-1);
- rb_define_singleton_method(rself,"install_rgrid",(RMethod)GridObject_s_install_rgrid,-1);
- rb_enable_super(rb_singleton_class(rself),"instance_methods");
-}
-\end class GridObject
-
-Ruby cGridObject;
-
-void startup_grid () {
- \startall
- cGridObject = rb_const_get(mGridFlow,SI(GridObject));
-}
-
-// never call this. this is a hack to make some things work.
-// i'm trying to circumvent either a bug in the compiler or i don't have a clue. :-(
-void make_gimmick () {
- GridOutlet foo(0,0,0);
-#define FOO(S) foo.give(0,Pt<S>());
-EACH_NUMBER_TYPE(FOO)
-#undef FOO
-}
-
diff --git a/externals/gridflow/base/grid.h b/externals/gridflow/base/grid.h
deleted file mode 100644
index 9e971b99..00000000
--- a/externals/gridflow/base/grid.h
+++ /dev/null
@@ -1,1146 +0,0 @@
-/*
- $Id: grid.h,v 1.2 2006-03-15 04:37:08 matju Exp $
-
- GridFlow
- Copyright (c) 2001,2002,2003,2004,2005 by Mathieu Bouchard
-
- 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.
-
- See file ../COPYING for further informations on licensing terms.
-
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef __GF_GRID_H
-#define __GF_GRID_H
-
-// current version number as string literal
-#define GF_VERSION "0.8.1"
-#define GF_COMPILE_TIME __DATE__ ", " __TIME__
-
-#include <new>
-#include <vector>
-#include <stdlib.h>
-#include <string.h>
-#include <signal.h>
-#include <stdio.h>
-#include <math.h>
-
-#ifdef __APPLE__
-static inline void *memalign (size_t a, size_t n) {return malloc(n);}
-#else
-#include <malloc.h>
-#endif
-
-extern "C" {
-#include <ruby.h>
-#include <rubyio.h>
-#include <version.h>
-};
-
-#ifndef RUBY_H
-#error "Can't do anything without ruby.h"
-#endif
-
-#include "../config.h"
-
-#ifdef __WIN32__
-#define INT winINT
-#define random rand
-#undef send
-#undef close
-#define sigjmp_buf jmp_buf
-#define siglongjmp longjmp
-#endif
-
-#define BUG(s,args...) {fprintf(stderr,s "\nat: %s\n",args,__PRETTY_FUNCTION__); ::raise(11);}
-#define L gfpost("%s:%d in %s",__FILE__,__LINE__,__PRETTY_FUNCTION__);
-
-#ifdef IS_BRIDGE
-#define RAISE(args...) rb_raise(rb_eArgError,args)
-#else
-#define RAISE(args...) rb_raise0(__FILE__,__LINE__,__PRETTY_FUNCTION__,rb_eArgError,args)
-#endif
-
-// avoid ruby warning
-#ifndef rb_enable_super
-#define rb_enable_super(a,b) \
- if (RUBY_RELEASE_CODE < 20030716) rb_enable_super(a,b)
-#endif
-
-typedef VALUE Ruby;
-
-/* undocumented function from Ruby that is one thing we need to fix a very elusive bug
-that manifests itself when embedding ruby inside a plugin of another app. This exists
-for all versions of Ruby up to now, and I don't know when it gets fixed. */
-extern "C" void Init_stack(VALUE *addr);
-
-extern "C" {
-void rb_raise0(
-const char *file, int line, const char *func, VALUE exc, const char *fmt, ...)
-__attribute__ ((noreturn));
-};
-#define SI(_sym_) (rb_intern(#_sym_))
-#define SYM(_sym_) (ID2SYM(SI(_sym_)))
-#define DGS(_class_) \
- _class_ *self; \
- Data_Get_Struct(rself,_class_,self); \
- self->check_magic();
-
-// returns the size of a statically defined array
-// warning: does not work with STACK_ARRAY()
-#define COUNT(_array_) ((int)(sizeof(_array_) / sizeof((_array_)[0])))
-
-static inline long rb_str_len(Ruby s) {return RSTRING(s)->len;}
-static inline char *rb_str_ptr(Ruby s) {return RSTRING(s)->ptr;}
-static inline long rb_ary_len(Ruby s) {return RARRAY(s)->len;}
-static inline Ruby *rb_ary_ptr(Ruby s) {return RARRAY(s)->ptr;}
-static inline const char *rb_sym_name(Ruby sym) {return rb_id2name(SYM2ID(sym));}
-#define rb_str_pt(s,t) Pt<t>((t*)rb_str_ptr(s),rb_str_len(s))
-#define IEVAL(_self_,s) rb_funcall(_self_,SI(instance_eval),1,rb_str_new2(s))
-#define EVAL(s) rb_eval_string(s)
-#define rassert(_p_) if (!(_p_)) RAISE(#_p_);
-// because of older versions of Ruby (1.6.?)
-#define rb_obj_class(o) rb_funcall((o),SI(class),0)
-
-#define WATCH(n,ar) { \
- char foo[16*1024], *p=foo; p += sprintf(p,"%s: ",#ar); \
- for (int q=0; q<n; q++) p += sprintf(p,"%lld ",(long long)ar[q]); \
- gfpost("%s",foo);}
-
-// we're gonna override assert, so load it first, to avoid conflicts
-#include <assert.h>
-
-#undef assert
-#define assert(_expr_) \
- if (!(_expr_)) { \
- fprintf(stderr, "%s:%d: assertion failed: %s is false\n", \
- __FILE__, __LINE__, #_expr_); \
- ::abort(); }
-
-// disabling assertion checking?
-#ifndef HAVE_DEBUG
-#undef assert
-#define assert(_foo_)
-#endif
-
-#ifdef HAVE_TSC_PROFILING
-#define HAVE_PROFILING
-#endif
-
-#ifdef HAVE_PROFILING
-#define PROF(_self_) for (GFStackMarker gf_marker(_self_);gf_marker.once();)
-#else
-#define PROF(_self_)
-#endif // HAVE_PROFILING
-
-static inline Ruby PTR2FIX (const void *ptr) {
- long p = (long)ptr;
- if ((p&3)!=0) BUG("unaligned pointer: %p\n",ptr);
- return LONG2NUM(p>>2);
-}
-#define FIX2PTR(type,ruby) ((type *)(TO(long,ruby)<<2))
-
-//****************************************************************
-
-/* int32 was long before, now int, because of amd64 */
-typedef char int8; typedef unsigned char uint8;
-typedef short int16; typedef unsigned short uint16;
-typedef int int32; typedef unsigned int uint32;
-typedef long long int64;typedef unsigned long long uint64;
-typedef float float32;
-typedef double float64;
-
-// three-way comparison (T is assumed Comparable)
-template <class T> static inline T cmp(T a, T b) { return a<b ? -1 : a>b; }
-
-// a remainder function such that div2(a,b)*b+mod(a,b) = a and for which
-// mod(a,b) is in [0;b) or (b;0]. in contrast to C-language builtin a%b,
-// this one has uniform behaviour around zero.
-static inline int mod(int a, int b) {
-int c=a%b; c+=b&-(c&&(a<0)^(b<0)); return c;}
-
-// counterpart of mod(a,b), just like a/b and a%b are counterparts
-static inline int div2(int a, int b) {
-int c=a<0; return (a/b)-(c&&!!(a%b));}
-
-static inline int32 gf_abs( int32 a) { return a>0?a:-a; }
-static inline int64 gf_abs( int64 a) { return a>0?a:-a; }
-static inline float32 gf_abs(float32 a) { return fabs(a); }
-static inline float64 gf_abs(float64 a) { return fabs(a); }
-
-// integer powers in log(b) time. T is assumed Integer
-template <class T> static inline T ipow(T a, T b) {
- for(T r=1;;) {if (b&1) r*=a; b>>=1; if (!b) return r; a*=a;}
-}
-
-// kludge
-static inline float32 ipow(float32 a, float32 b) { return pow(a,b); }
-static inline float64 ipow(float64 a, float64 b) { return pow(a,b); }
-
-#undef min
-#undef max
-// minimum/maximum functions; T is assumed to be Comparable
-template <class T> static inline T min(T a, T b) { return a<b?a:b; }
-template <class T> static inline T max(T a, T b) { return a>b?a:b; }
-//template <class T> inline T min(T a, T b) { T c = (a-b)>>31; return (a&c)|(b&~c); }
-
-// greatest common divisor, by euclid's algorithm
-// this runs in log(a+b) number operations
-template <class T> static T gcd (T a, T b) {
- while (b) {T c=mod(a,b); a=b; b=c;}
- return a;
-}
-
-// greatest common divisor, the binary algorithm. haven't tried yet.
-template <class T> static T gcd2 (T a, T b) {
- int s=0;
- while ((a|b)&1==0) { a>>=1; b>>=1; s++; }
- while (a) {
- if (a&1==0) a>>=1;
- else if (b&1==0) b>>=1;
- else {T t=abs(a-b); if (a<b) b=t; else a=t;}
- }
- return b<<s;
-}
-
-// least common multiple; this runs in log(a+b) like gcd.
-template <class T> static inline T lcm (T a, T b) {return a*b/gcd(a,b);}
-
-// returns the position (0..31) of highest bit set in a word, or 0 if none.
-#define Z(N) if ((x>>N)&(((typeof(x))1<<N)-1)) { x>>=N; i+=N; }
-static int highest_bit(uint8 x) {int i=0; Z(4)Z(2)Z(1)return i;}
-static int highest_bit(uint16 x) {int i=0; Z(8)Z(4)Z(2)Z(1)return i;}
-static int highest_bit(uint32 x) {int i=0; Z(16)Z(8)Z(4)Z(2)Z(1)return i;}
-static int highest_bit(uint64 x) {int i=0;Z(32)Z(16)Z(8)Z(4)Z(2)Z(1)return i;}
-#undef Z
-// returns the position (0..31) of lowest bit set in a word, or 0 if none.
-template <class T> static int lowest_bit(T n) { return highest_bit((~n+1)&n); }
-
-static double drand() { return 1.0*rand()/(RAND_MAX+1.0); }
-
-// is little-endian
-static inline bool is_le() {int x=1; return ((char *)&x)[0];}
-
-#if defined(HAVE_PENTIUM)
-static inline uint64 rdtsc() {
- uint64 x; __asm__ volatile (".byte 0x0f, 0x31":"=A"(x)); return x;
-}
-#elif defined(HAVE_PPC)
-static inline uint64 rdtsc() {
-#include <mach/mach.h>
-#include <mach/mach_time.h>
-/* see AbsoluteToNanoseconds(), Microseconds()
-http://www.simdtech.org/apps/group_public/email/altivec/msg01956.html
-and mach_absolute_time() and mach_timebase_info(&info),
-then ns=(time*info.numer)/info.denom;
-and the timebase_info is constant
-(double)mach_absolute_time*gTimeBaseToNS*/
-return 0;
-}
-#else
-static inline uint64 rdtsc() {return 0;}
-#endif
-
-#ifdef HAVE_LITE
-#define EACH_INT_TYPE(MACRO) MACRO(uint8) MACRO(int16) MACRO(int32)
-#define EACH_FLOAT_TYPE(MACRO)
-#else
-#define EACH_INT_TYPE(MACRO) MACRO(uint8) MACRO(int16) MACRO(int32) MACRO(int64)
-#define EACH_FLOAT_TYPE(MACRO) MACRO(float32) MACRO(float64)
-#endif
-#define EACH_NUMBER_TYPE(MACRO) EACH_INT_TYPE(MACRO) EACH_FLOAT_TYPE(MACRO) MACRO(ruby)
-
-// note: loop unrolling macros assume N!=0
-// btw this may cause alignment problems when 8 does not divide N
-#define UNROLL_8(MACRO,N,PTR,ARGS...) \
- int n__=(-N)&7; PTR-=n__; N+=n__; \
- switch (n__) { start: \
- case 0:MACRO(0); case 1:MACRO(1); case 2:MACRO(2); case 3:MACRO(3); \
- case 4:MACRO(4); case 5:MACRO(5); case 6:MACRO(6); case 7:MACRO(7); \
- PTR+=8; N-=8; ARGS; if (N) goto start; }
-#define UNROLL_4(MACRO,N,PTR,ARGS...) \
- int n__=(-N)&3; PTR-=n__; N+=n__; \
- switch (n__) { start: \
- case 0:MACRO(0); case 1:MACRO(1); case 2:MACRO(2); case 3:MACRO(3); \
- PTR+=4; N-=4; ARGS; if (N) goto start; }
-
-//****************************************************************
-// my own little Ruby <-> C++ layer
-
-//struct Arg { Ruby a; };
-//struct ArgList { int n; Pt<Arg> v; };
-static inline bool INTEGER_P(Ruby x) {return FIXNUM_P(x)||TYPE(x)==T_BIGNUM;}
-static inline bool FLOAT_P(Ruby x) {return TYPE(x)==T_FLOAT;}
-#define INT(x) TO(int32,x)
-#define TO(t,x) convert(x,(t*)0)
-
-// not using NUM2INT because Ruby can convert Symbol to int
-// (by compatibility with Ruby 1.4)
-static inline int32 convert(Ruby x, int32 *foo) {
- if (INTEGER_P(x)) return NUM2INT(x);
- if (FLOAT_P(x)) return NUM2INT(rb_funcall(x,SI(round),0));
- RAISE("expected Integer or Float (got %s)",
- rb_str_ptr(rb_funcall(x,SI(inspect),0)));
-}
-static int16 convert(Ruby x, int16 *foo) {
- int v = INT(x);
- if (v<-0x8000 || v>=0x8000) RAISE("value %d is out of range",v);
- return v;}
-static uint16 convert(Ruby x, uint16 *foo) {
- int v = INT(x);
- if (v<0 || v>=0x10000) RAISE("value %d is out of range",v);
- return v;}
-static bool convert(Ruby x, bool *foo) {
- if (x==Qtrue) return true;
- if (x==Qfalse) return false;
- switch (TYPE(x)) {
- case T_FIXNUM: case T_BIGNUM: case T_FLOAT: return !!INT(x);
- default: RAISE("can't convert to bool");
- }
-}
-
-#ifdef HAVE_GCC64
-static uint64 convert(Ruby val, uint64 *foo) { return NUM2ULONG(val); }
-static int64 convert(Ruby val, int64 *foo) { return NUM2ULONG(val); }
-static Ruby gf_ull2num(uint64 val) { return ULONG2NUM(val); }
-static Ruby gf_ll2num(uint64 val) { return LONG2NUM(val); }
-#else
-static uint64 convert(Ruby val, uint64 *foo) {
- if (FIXNUM_P(val)) return (uint64)FIX2LONG(val);
- if (TYPE(val)!=T_BIGNUM) RAISE("type error");
- uint64 v = (uint64)NUM2UINT(rb_funcall(val,SI(>>),1,INT2FIX(32))) << 32;
- return v + NUM2UINT(rb_funcall(val,SI(&),1,UINT2NUM(0xffffffff)));}
-static int64 convert(Ruby val, int64 *foo) {
- if (FIXNUM_P(val)) return (int64)FIX2LONG(val);
- if (TYPE(val)!=T_BIGNUM) RAISE("type error");
- int64 v = (int64)NUM2INT(rb_funcall(val,SI(>>),1,INT2FIX(32))) << 32;
- return v + NUM2UINT(rb_funcall(val,SI(&),1,UINT2NUM(0xffffffff)));}
-static Ruby gf_ull2num(uint64 val) {
- Ruby x = rb_funcall(UINT2NUM((uint32)(val>>32)),SI(<<),1,INT2FIX(32));
- return rb_funcall(x,SI(+),1,UINT2NUM((uint32)val));}
-static Ruby gf_ll2num(int64 val) {
- Ruby x = rb_funcall( INT2NUM(( int32)(val>>32)),SI(<<),1,INT2FIX(32));
- return rb_funcall(x,SI(+),1,UINT2NUM((uint32)val));}
-#endif
-
-static long convert(Ruby x, long *foo) {
- return sizeof(long)==sizeof(int32) ?
- convert(x,(int32 *)0) :
- convert(x,(int64 *)0);
-}
-
-static float64 convert(Ruby x, float64 *foo) {
- if (INTEGER_P(x)) return INT(x);
- if (TYPE(x)!=T_FLOAT) RAISE("not a Float");
- return ((RFloat*)x)->value;}
-static float32 convert(Ruby x, float32 *foo) {
- return (float32) convert(x,(float64 *)0);}
-typedef Ruby Symbol, Array, String, Integer;
-static Ruby convert(Ruby x, Ruby *bogus) { return x; }
-typedef Ruby (*RMethod)(...); /* !@#$ fishy */
-
-#define BUILTIN_SYMBOLS(MACRO) \
- MACRO(_grid,"grid") MACRO(_bang,"bang") MACRO(_float,"float") \
- MACRO(_list,"list") MACRO(_sharp,"#") \
- MACRO(iv_outlets,"@outlets") \
- MACRO(iv_ninlets,"@ninlets") \
- MACRO(iv_noutlets,"@noutlets")
-extern struct BuiltinSymbols {
-#define FOO(_sym_,_str_) Ruby _sym_;
-BUILTIN_SYMBOLS(FOO)
-#undef FOO
-} bsym;
-
-typedef struct R {
- VALUE r;
- R() {r=Qnil;}
- R(int x) {r=INT2NUM(x);}
- R(unsigned x) {r=UINT2NUM(x);}
- R(long x) {r=LONG2NUM(x);}
- R(unsigned long x) {r=ULONG2NUM(x);}
- R(double x) {r=rb_float_new(x);}
- R( int64 x) {r= gf_ll2num(x);}
- R(uint64 x) {r=gf_ull2num(x);}
- operator bool() {return !!INT2NUM(r);}
- operator uint8 () {return INT2NUM(r);}
- operator int16 () {return INT2NUM(r);}
- operator int32 () {return INT2NUM(r);}
- operator int64 () {return convert(r,(int64*)0);}
- operator float32 () {return convert(r,(float32*)0);}
- operator float64 () {return convert(r,(float64*)0);}
-#define FOO(As,Op) \
- R &operator As (int x) {r=rb_funcall(r, SI(Op),1,INT2NUM(x)); return *this;}
- FOO(+=,+) FOO(-=,-) FOO(*=,*) FOO(/=,/) FOO(%=,%)
- FOO(&=,&) FOO(|=,|) FOO(^=,^) FOO(<<=,<<) FOO(>>=,>>)
-#undef FOO
-// bool operator == (int x) {return rb_funcall(r,SI(==),1,INT2NUM(x));}
-#define FOO(Op) \
- R operator Op (R x) {return rb_funcall(r,SI(Op),1,x.r);} \
- R operator Op (int x) {return rb_funcall(r,SI(Op),1,INT2NUM(x));}
- FOO(+) FOO(-) FOO(*) FOO(/) FOO(%)
- FOO(&) FOO(|) FOO(^) FOO(<<) FOO(>>)
- FOO(<) FOO(>) FOO(<=) FOO(>=) FOO(==) FOO(!=)
-#undef FOO
- static R value(VALUE r) {R x; x.r=r; return x;}
-} ruby;
-
-static R operator -(int a, R b) {return rb_funcall(a,SI(Op),1,INT2NUM(b.r));}
-
-static inline R ipow(R a, R b) {return R::value(rb_funcall(a.r,SI(**),1,b.r));}
-static inline R gf_abs(R a) { return R::value(rb_funcall(a.r,SI(abs),0)); }
-static inline R cmp(R a, R b) { return R::value(rb_funcall(a.r,SI(<=>),1,b.r));}
-
-//****************************************************************
-// hook into pointer manipulation. will help find memory corruption bugs.
-
-template <class T> class Pt {
-typedef ptrdiff_t /* and not int nor long */ Z;
-public:
- T *p;
-#ifdef HAVE_DEBUG
- T *start;
- Z n;
- Pt() : p(0), start(0), n(0) {}
- Pt(T *q, Z _n) : p(q), start(q), n(_n) {}
- Pt(T *q, Z _n, T *_start) : p(q), start(_start), n(_n) {}
-#else
- Pt() : p(0) {}
- Pt(T *q, Z _n, T *_start=0) : p(q) {}
-#endif
- T &operator *() { return *p; }
- Pt operator+=(Z i) { p+=i; return *this; }
- Pt operator-=(Z i) { p-=i; return *this; }
- Pt operator++( ) { p++; return *this; }
- Pt operator--( ) { p--; return *this; }
- Pt operator++(int) { Pt f(*this); ++*this; return f; }
- Pt operator--(int) { Pt f(*this); --*this; return f; }
- T &operator[](Z i) {
-#ifdef HAVE_DEBUG_HARDER
- if (!(p+i>=start && p+i<start+n))
- BUG("BUFFER OVERFLOW: 0x%08lx[%ld]=0x%08lx is not in 0x%08lx..0x%08lx",
- (long)p, (long)i, (long)(p+i),(long)start,(long)(start+n));
-#endif
- return p[i];
- }
-
- void will_use(int k) {
-#ifdef HAVE_DEBUG_HARDER
- if (k==0) return;
- T *q = p+k;
- if (!(p>=start && p<start+n && q>=start && q<=start+n))
- BUG("BUFFER OVERFLOW: 0x%08lx...0x%08lx is not all inside 0x%08lx...0x%08lx",
- (long)p,(long)q,start,(long)(start+n));
-#endif
- }
-
- Z operator-(Pt x) { return p-x.p; }
- operator bool () { return (bool )p; }
- operator void *() { return (void *)p; }
- operator int8 *() { return (int8 *)p; }
-
-/* how do i make typecast operators that are not also default conversions??? */
-/* this should be found so i can clean up the following: */
-#define FOO(S) operator S *() { return (S *)p; }
-EACH_NUMBER_TYPE(FOO)
-#undef FOO
-#ifdef HAVE_DEBUG
-#define FOO(S) operator Pt<S>() { return Pt<S>((S *)p,n*sizeof(T)/1,(S *)start); }
-EACH_NUMBER_TYPE(FOO)
-#undef FOO
-#else
-#define FOO(S) operator Pt<S>() { return Pt<S>((S *)p,0); }
-EACH_NUMBER_TYPE(FOO)
-#undef FOO
-#endif
-/* end 0.8 (TESTING) */
-
-#ifdef HAVE_DEBUG
- template <class U> Pt operator+(U x) { return Pt(p+x,n,start); }
- template <class U> Pt operator-(U x) { return Pt(p-x,n,start); }
-#else
- template <class U> Pt operator+(U x) { return Pt(p+x,0); }
- template <class U> Pt operator-(U x) { return Pt(p-x,0); }
-#endif
-};
-
-//template <class T> class P : Pt<T> {};
-//a reference counting pointer class
-template <class T> class P {
-public:
-#define INCR if (p) p->refcount++;
-#define DECR if (p) {p->refcount--; if (!p->refcount) delete p;}
- T *p;
- P() : p(0) {}
- P(T *_p) { p = _p; INCR; }
- P(const P<T> &_p) { p = _p.p; INCR; }
- P<T> &operator =(T * _p) { DECR; p=_p; INCR; return *this; }
- P<T> &operator =(P<T> _p) { DECR; p=_p.p; INCR; return *this; }
- bool operator ==(P<T> _p) { return p == _p.p; }
- bool operator !=(P<T> _p) { return p != _p.p; }
- ~P() { DECR; }
- bool operator !(){ return !p; }
- operator bool() { return !!p; }
- T &operator *() { return *p; }
- T *operator ->() { return p; }
-//#undef INCR
-//#undef DECR
-};
-
-#ifndef IS_BRIDGE
-extern "C" void *gfmalloc(size_t n);
-extern "C" void gffree(void *p);
-// note that C++ (GCC 3.4) now refuses the :: prefix so i removed it in the 4 following lines:
-inline void *operator new (size_t n) { return gfmalloc(n); }
-inline void *operator new[] (size_t n) { return gfmalloc(n); }
-inline void operator delete (void *p) { gffree(p); }
-inline void operator delete[] (void *p) { gffree(p); }
-#endif
-
-#define STACK_ARRAY(T,V,N) T V##_foo[N]; Pt<T> V(V##_foo,N);
-#define ARRAY_NEW(T,N) (Pt<T>((T *)new T[N],N))
-
-void gfmemcopy(uint8 *out, const uint8 *in, int n);
-template <class T> inline void COPY(Pt<T> dest, Pt<T> src, int n) {
- src.will_use(n); dest.will_use(n);
- gfmemcopy((uint8*)dest,(const uint8*)src,n*sizeof(T));
-}
-template <class T> inline void CLEAR(Pt<T> dest, int n) {
- dest.will_use(n);
- memset(dest,0,n*sizeof(T));
-}
-template <class T> static void memswap (Pt<T> a, Pt<T> b, int n) {
- STACK_ARRAY(T,c,n); COPY(c,a,n); COPY(a,b,n); COPY(b,c,n);
-}
-
-//****************************************************************
-// CObject is the base class for C++ classes that get exported to Ruby.
-// BTW: It's quite convenient to have virtual-methods in the base class
-// because otherwise the vtable* isn't at the beginning of the object
-// and that's pretty confusing to a lot of people, especially when simple
-// casting causes a pointer to change its value.
-struct CObject {
-#define OBJECT_MAGIC 1618033989
- int32 magic;
- int32 refcount;
- Ruby rself; // point to Ruby peer
- CObject() : magic(OBJECT_MAGIC), refcount(0), rself(0) {}
- void check_magic () {
- if (magic != OBJECT_MAGIC) {
- fprintf(stderr,"Object memory corruption! (ask the debugger)\n");
- for (int i=-2; i<=2; i++)
- fprintf(stderr,"this[%d]=0x%08x\n",i,((int*)this)[i]);
- raise(11);
- }
- }
- virtual ~CObject() { magic = 0xDEADBEEF; }
- virtual void mark() {} // not used for now
-};
-void CObject_free (void *);
-
-// you shouldn't use MethodDecl directly (used by source_filter.rb)
-struct MethodDecl { const char *selector; RMethod method; };
-void define_many_methods(Ruby rself, int n, MethodDecl *methods);
-extern Ruby mGridFlow, cFObject, cGridObject, cFormat;
-
-//****************************************************************
-// a Dim is a list of dimensions that describe the shape of a grid
-\class Dim < CObject
-struct Dim : CObject {
- static const int MAX_DIM=16; // maximum number of dimensions in a grid
- int n;
- Pt<int32> v; // safe pointer
- int32 v2[MAX_DIM]; // real stuff
- void check(); // test invariants
- Dim(int n, Pt<int32> v) { this->v = Pt<int32>(v2,MAX_DIM); this->n = n; COPY(this->v,v,n); check();}
- Dim(int n, int32 *v) { this->v = Pt<int32>(v2,MAX_DIM); this->n = n; COPY(this->v,Pt<int32>(v,n),n); check();}
- Dim() {v=Pt<int32>(v2,MAX_DIM); n=0; check();}
- Dim(int a) {v=Pt<int32>(v2,MAX_DIM); n=1;v[0]=a; check();}
- Dim(int a,int b) {v=Pt<int32>(v2,MAX_DIM); n=2;v[0]=a;v[1]=b; check();}
- Dim(int a,int b,int c){v=Pt<int32>(v2,MAX_DIM); n=3;v[0]=a;v[1]=b;v[2]=c;check();}
- int count() {return n;}
- int get(int i) { return v[i]; }
- int32 prod(int start=0, int end=-1) {
- if (end<0) end+=n;
- int32 tot=1;
- for (int i=start; i<=end; i++) tot *= v[i];
- return tot;
- }
- char *to_s();
- bool equal(P<Dim> o) {
- if (n!=o->n) return false;
- for (int i=0; i<n; i++) if (v[i]!=o->v[i]) return false;
- return true;
- }
-};
-\end class Dim
-
-//****************************************************************
-//BitPacking objects encapsulate optimised loops of conversion
-struct BitPacking;
-// those are the types of the optimised loops of conversion
-// inputs are const
-struct Packer {
-#define FOO(S) void (*as_##S)(BitPacking *self, int n, Pt<S> in, Pt<uint8> out);
-EACH_INT_TYPE(FOO)
-#undef FOO
-};
-struct Unpacker {
-#define FOO(S) void (*as_##S)(BitPacking *self, int n, Pt<uint8> in, Pt<S> out);
-EACH_INT_TYPE(FOO)
-#undef FOO
-};
-
-\class BitPacking < CObject
-struct BitPacking : CObject {
- Packer *packer;
- Unpacker *unpacker;
- unsigned int endian; // 0=big, 1=little, 2=same, 3=different
- int bytes;
- int size;
- uint32 mask[4];
- BitPacking(){::abort();} // don't call, but don't remove. sorry.
- BitPacking(int endian, int bytes, int size, uint32 *mask,
- Packer *packer=0, Unpacker *unpacker=0);
- bool is_le();
- bool eq(BitPacking *o);
- \decl void initialize(Ruby foo1, Ruby foo2, Ruby foo3);
- \decl String pack2(String ins, String outs=Qnil);
- \decl String unpack2(String ins, String outs=Qnil);
- \decl String to_s();
-// main entrances to Packers/Unpackers
- template <class T> void pack( int n, Pt<T> in, Pt<uint8> out);
- template <class T> void unpack(int n, Pt<uint8> in, Pt<T> out);
-};
-\end class
-
-int high_bit(uint32 n);
-int low_bit(uint32 n);
-void swap32 (int n, Pt<uint32> data);
-void swap16 (int n, Pt<uint16> data);
-
-#define NT_UNSIGNED (1<<0)
-#define NT_FLOAT (1<<1)
-#define NT_UNIMPL (1<<2)
-#define NUMBER_TYPE_LIMITS(T,a,b,c) \
- inline T nt_smallest(T *bogus) {return a;} \
- inline T nt_greatest(T *bogus) {return b;} \
- inline T nt_all_ones(T *bogus) {return c;}
-
-NUMBER_TYPE_LIMITS( uint8,0,255,255)
-NUMBER_TYPE_LIMITS( int16,-0x8000,0x7fff,-1)
-NUMBER_TYPE_LIMITS( int32,-0x80000000,0x7fffffff,-1)
-NUMBER_TYPE_LIMITS( int64,-0x8000000000000000LL,0x7fffffffffffffffLL,-1)
-NUMBER_TYPE_LIMITS(float32,-HUGE_VAL,+HUGE_VAL,(RAISE("all_ones"),0))
-NUMBER_TYPE_LIMITS(float64,-HUGE_VAL,+HUGE_VAL,(RAISE("all_ones"),0))
-NUMBER_TYPE_LIMITS( ruby,ruby(-HUGE_VAL),ruby(+HUGE_VAL),(RAISE("all_ones"),0))
-
-#ifdef HAVE_LITE
-#define NT_NOTLITE NT_UNIMPL
-#define NONLITE(x...)
-#else
-#define NT_NOTLITE 0
-#define NONLITE(x...) x
-#endif
-#define NUMBER_TYPES(MACRO) \
- MACRO( uint8, 8,NT_UNSIGNED, "u8,b") MACRO( int8, 8,NT_UNIMPL, "i8") \
- MACRO( uint16,16,NT_UNSIGNED|NT_UNIMPL, "u16") MACRO(int16,16,0, "i16,s") \
- MACRO( uint32,32,NT_UNSIGNED|NT_UNIMPL, "u32") MACRO(int32,32,0, "i32,i") \
- MACRO( uint64,64,NT_UNSIGNED|NT_UNIMPL, "u64") MACRO(int64,64,NT_NOTLITE, "i64,l") \
- MACRO(float32,32,NT_NOTLITE|NT_FLOAT, "f32,f") \
- MACRO(float64,64,NT_NOTLITE|NT_FLOAT, "f64,d") \
- MACRO( ruby,sizeof(long),NT_NOTLITE,"r")
-
-enum NumberTypeE {
-#define FOO(_sym_,args...) _sym_##_e,
-NUMBER_TYPES(FOO)
-#undef FOO
- number_type_table_end
-};
-
-#define FOO(_type_) \
-inline NumberTypeE NumberTypeE_type_of(_type_ &x) { \
- return _type_##_e; }
-EACH_NUMBER_TYPE(FOO)
-#undef FOO
-
-\class NumberType < CObject
-struct NumberType : CObject {
- Ruby /*Symbol*/ sym;
- const char *name;
- int size;
- int flags;
- const char *aliases;
- NumberTypeE index;
- NumberType(const char *name_, int size_, int flags_, const char *aliases_) :
- name(name_), size(size_), flags(flags_), aliases(aliases_) {}
- \decl Symbol sym_m();
- \decl int size_m();
- \decl int flags_m();
- \decl int index_m();
-};
-\end class
-
-NumberTypeE NumberTypeE_find (Ruby sym);
-
-#define TYPESWITCH(T,C,E) switch (T) { \
- case uint8_e: C(uint8) break; case int16_e: C(int16) break; \
- case int32_e: C(int32) break; NONLITE(case int64_e: C(int64) break; \
- case float32_e: C(float32) break; case float64_e: C(float64) break; \
- case ruby_e: C(ruby) break;) \
- default: E; RAISE("type '%s' not available here",number_type_table[T].sym);}
-#define TYPESWITCH_JUSTINT(T,C,E) switch (T) { \
- case uint8_e: C(uint8) break; case int16_e: C(int16) break; \
- case int32_e: C(int32) break; NONLITE(case int64_e: C(int64) break;) \
- default: E; RAISE("type '%s' not available here",number_type_table[T].sym);}
-
-// Numop objects encapsulate optimised loops of simple operations
-
-enum LeftRight { at_left, at_right };
-
-template <class T>
-struct NumopOn : CObject {
- // Function Vectorisations
- typedef void (*Map )( int n, T *as, T b ); Map op_map;
- typedef void (*Zip )( int n, T *as, T *bs); Zip op_zip;
- typedef void (*Fold)(int an, int n, T *as, T *bs); Fold op_fold;
- typedef void (*Scan)(int an, int n, T *as, T *bs); Scan op_scan;
- // Algebraic Properties (those involving simply numeric types)
- typedef bool (*AlgebraicCheck)(T x, LeftRight side);
- // neutral: right: forall y {f(x,y)=x}; left: forall x {f(x,y)=y};
- // absorbent: right: exists a forall y {f(x,y)=a}; ...
- T (*neutral)(LeftRight); // default neutral: e.g. 0 for addition, 1 for multiplication
- AlgebraicCheck is_neutral, is_absorbent;
- NumopOn(Map m, Zip z, Fold f, Scan s, T (*neu)(LeftRight), AlgebraicCheck n, AlgebraicCheck a) :
- op_map(m), op_zip(z), op_fold(f), op_scan(s), neutral(neu), is_neutral(n), is_absorbent(a) {}
- NumopOn() {}
- NumopOn(const NumopOn &z) {
- op_map = z.op_map; op_zip = z.op_zip;
- op_fold = z.op_fold; op_scan = z.op_scan;
- is_neutral = z.is_neutral; neutral = z.neutral;
- is_absorbent = z.is_absorbent; }
-};
-
-// semigroup property: associativity: f(a,f(b,c))=f(f(a,b),c)
-#define OP_ASSOC (1<<0)
-// abelian property: commutativity: f(a,b)=f(b,a)
-#define OP_COMM (1<<1)
-
-\class Numop < CObject
-struct Numop : CObject {
- Ruby /*Symbol*/ sym;
- const char *name;
- int flags;
-//private:
-#define FOO(T) \
- NumopOn<T> on_##T; \
- NumopOn<T> *on(T &foo) { \
- if (!on_##T.op_map) \
- RAISE("operator %s does not support type "#T,rb_sym_name(sym)); \
- return &on_##T;}
-EACH_NUMBER_TYPE(FOO)
-#undef FOO
-//public:
- template <class T> inline void map(int n, Pt<T> as, T b) {
- as.will_use(n);
- on(*as)->op_map(n,(T *)as,b);}
- template <class T> inline void zip(int n, Pt<T> as, Pt<T> bs) {
- as.will_use(n);
- bs.will_use(n);
- on(*as)->op_zip(n,(T *)as,(T *)bs);}
- template <class T> inline void fold(int an, int n, Pt<T> as, Pt<T> bs) {
- as.will_use(an);
- bs.will_use(an*n);
- typename NumopOn<T>::Fold f = on(*as)->op_fold;
- if (!f) RAISE("operator %s does not support fold",rb_sym_name(sym));
- f(an,n,(T *)as,(T *)bs);}
- template <class T> inline void scan(int an, int n, Pt<T> as, Pt<T> bs) {
- as.will_use(an);
- bs.will_use(an*n);
- typename NumopOn<T>::Scan f = on(*as)->op_scan;
- if (!f) RAISE("operator %s does not support scan",rb_sym_name(sym));
- f(an,n,(T *)as,(T *)bs);}
-
- \decl void map_m (NumberTypeE nt, int n, String as, String b);
- \decl void zip_m (NumberTypeE nt, int n, String as, String bs);
- \decl void fold_m (NumberTypeE nt, int an, int n, String as, String bs);
- \decl void scan_m (NumberTypeE nt, int an, int n, String as, String bs);
-
- Numop(Ruby /*Symbol*/ sym_, const char *name_,
-#define FOO(T) NumopOn<T> op_##T,
-EACH_NUMBER_TYPE(FOO)
-#undef FOO
- int flags_) : sym(sym_), name(name_), flags(flags_) {
-#define FOO(T) on_##T = op_##T;
-EACH_NUMBER_TYPE(FOO)
-#undef FOO
- }
-};
-\end class
-
-extern NumberType number_type_table[];
-extern Ruby number_type_dict; // GridFlow.@number_type_dict={}
-extern Ruby op_dict; // GridFlow.@op_dict={}
-
-static inline NumberTypeE convert(Ruby x, NumberTypeE *bogus) {
- return NumberTypeE_find(x);
-}
-
-#ifndef IS_BRIDGE
-static Numop *convert(Ruby x, Numop **bogus) {
- Ruby s = rb_hash_aref(rb_ivar_get(mGridFlow,SI(@op_dict)),x);
- if (s==Qnil) RAISE("expected two-input-operator");
- return FIX2PTR(Numop,s);
-}
-#endif
-
-// ****************************************************************
-\class Grid < CObject
-struct Grid : CObject {
- P<Dim> dim;
- NumberTypeE nt;
- void *data;
- Grid(P<Dim> dim, NumberTypeE nt, bool clear=false) : dim(0), nt(int32_e), data(0) {
- if (!dim) RAISE("hell");
- init(dim,nt);
- if (clear) {int size = bytes(); CLEAR(Pt<char>((char *)data,size),size);}
- }
- Grid(Ruby x) : dim(0), nt(int32_e), data(0) { init_from_ruby(x); }
- Grid(int n, Ruby *a, NumberTypeE nt=int32_e) : dim(0), nt(int32_e), data(0) {
- init_from_ruby_list(n,a,nt);
- }
- int32 bytes() { return dim->prod()*number_type_table[nt].size/8; }
- P<Dim> to_dim () { return new Dim(dim->prod(),(Pt<int32>)*this); }
-#define FOO(type) \
- operator type *() { return (type *)data; } \
- operator Pt<type>() { return Pt<type>((type *)data,dim->prod()); }
-EACH_NUMBER_TYPE(FOO)
-#undef FOO
- Grid *dup () {
- Grid *foo=new Grid(dim,nt);
- memcpy(foo->data,data,bytes());
- return foo;
- }
- ~Grid() {if (data) free(data);}
-private:
- void init(P<Dim> dim, NumberTypeE nt) {
- this->dim = dim;
- this->nt = nt;
- data = 0;
- if (dim) data = memalign(16,bytes()+16);
- //fprintf(stderr,"rdata=%p data=%p align=%d\n",rdata,data,align);
- }
- void init_from_ruby(Ruby x);
- void init_from_ruby_list(int n, Ruby *a, NumberTypeE nt=int32_e);
-};
-\end class Grid
-
-static inline Grid *convert (Ruby r, Grid **bogus) {
- return r ? new Grid(r) : 0;
-}
-
-// DimConstraint interface:
-// return if d is acceptable
-// else RAISE with proper descriptive message
-typedef void (*DimConstraint)(P<Dim> d);
-
-struct PtrGrid : public P<Grid> {
- DimConstraint dc;
- void constrain(DimConstraint dc_) { dc=dc_; }
- P<Grid> next;
- PtrGrid() : P<Grid>(), dc(0), next(0) {}
- PtrGrid(const PtrGrid &_p) : P<Grid>(), dc(0), next(0) {dc=_p.dc; p=_p.p; INCR;}
- PtrGrid &operator =( Grid *_p) {if(dc&&p)dc(_p->dim); DECR; p=_p; INCR; return *this;}
- PtrGrid &operator =(P<Grid> _p) {if(dc&&p)dc(_p->dim); DECR; p=_p.p; INCR; return *this;}
- PtrGrid &operator =(PtrGrid _p) {if(dc&&p)dc(_p->dim); DECR; p=_p.p; INCR; return *this;}
-};
-
-#ifndef IS_BRIDGE
-static inline P<Dim> convert(Ruby x, P<Dim> *foo) {
- Grid *d = convert(x,(Grid **)0);
- if (!d) RAISE("urgh");
- if (d->dim->n!=1) RAISE("dimension list must have only one dimension itself");
- return new Dim(d->dim->v[0],(int32 *)(d->data));
-}
-
-static inline PtrGrid convert(Ruby x, PtrGrid *foo) {
- PtrGrid pg;
- pg = convert(x,(Grid **)0);
- return pg;
-}
-#endif
-
-//****************************************************************
-// GridInlet represents a grid-aware inlet
-
-// four-part macro for defining the behaviour of a gridinlet in a class
-// C:Class I:Inlet
-#define GRID_INLET(C,I) \
- template <class T> void C::grinw_##I (GridInlet *in, int n, Pt<T> data) { \
- ((C*)(in->parent))->grin_##I(in,n,data); } \
- template <class T> void C::grin_##I (GridInlet *in, int n, Pt<T> data) { \
- if (n==-1)
-#define GRID_ALLOC else if (n==-3)
-#define GRID_FLOW else if (n>=0)
-#define GRID_FINISH else if (n==-2)
-#define GRID_END }
-
-/* macro for defining a gridinlet's behaviour as just storage (no backstore) */
-// V is a PtrGrid instance-var
-#define GRID_INPUT(C,I,V) \
-GRID_INLET(C,I) { V=new Grid(in->dim,NumberTypeE_type_of(*data)); } \
-GRID_FLOW { COPY((Pt<T>)*(V)+in->dex, data, n); } GRID_FINISH
-
-// macro for defining a gridinlet's behaviour as just storage (with backstore)
-// V is a PtrGrid instance-var
-#define GRID_INPUT2(C,I,V) \
- GRID_INLET(C,I) { \
- if (is_busy_except(in)) { \
- V.next = new Grid(in->dim,NumberTypeE_type_of(*data)); \
- } else V= new Grid(in->dim,NumberTypeE_type_of(*data)); \
- } GRID_FLOW { \
- COPY(((Pt<T>)*(V.next?V.next.p:&*V.p))+in->dex, data, n); \
- } GRID_FINISH
-
-typedef struct GridInlet GridInlet;
-typedef struct GridHandler {
-#define FOO(T) \
- void (*flow_##T)(GridInlet *in, int n, Pt<T> data); \
- void flow(GridInlet *in, int n, Pt<T> data) const { \
- assert(flow_##T); flow_##T(in,n,data); }
-EACH_NUMBER_TYPE(FOO)
-#undef FOO
-} GridHandler;
-
-typedef struct GridObject GridObject;
-\class GridInlet < CObject
-struct GridInlet : CObject {
- GridObject *parent;
- const GridHandler *gh;
- GridObject *sender;
- P<Dim> dim;
- NumberTypeE nt;
- int dex;
- PtrGrid buf;// factor-chunk buffer
- int bufi; // buffer index: how much of buf is filled
- int mode; // 0=ignore; 4=ro; 6=rw
-
- int allocfactor,allocmin,allocmax,allocn;
- Pt<uint8> alloc;
-
-// methods
- GridInlet(GridObject *parent_, const GridHandler *gh_) :
- parent(parent_), gh(gh_), sender(0),
- dim(0), nt(int32_e), dex(0), bufi(0), mode(4) {}
- ~GridInlet() {}
- void set_factor(int factor);
- void set_mode(int mode_) { mode=mode_; }
- int32 factor() {return buf?buf->dim->prod():1;}
- Ruby begin(int argc, Ruby *argv);
-
- // n=-1 is begin, and n=-2 is _finish_. the name "end" is now used
- // as an end-marker for inlet definitions... sorry for the confusion
- // GF-0.8: n=-3 is alloc.
- template <class T> void flow(int mode, int n, Pt<T> data);
- void end(); // this one ought to be called finish().
- void from_ruby_list(int argc, Ruby *argv, NumberTypeE nt=int32_e) {
- Grid t(argc,argv,nt); from_grid(&t);
- }
- void from_ruby(int argc, Ruby *argv) {
- Grid t(argv[0]); from_grid(&t);
- }
- void from_grid(Grid *g);
- bool supports_type(NumberTypeE nt);
-private:
- template <class T> void from_grid2(Grid *g, T foo);
-};
-\end class GridInlet
-
-//****************************************************************
-// for use by source_filter.rb ONLY (for \grin and \classinfo)
-
-// C is for class, I for inlet number
-// GRIN1 : int32 only
-// GRIN4 : all types
-// GRIN2 : integers only; no floats (no R either actually)
-// GRINF : floats only; no integers
-#ifndef HAVE_LITE
-#define GRIN(TB,TS,TI,TL,TF,TD,TR) {TB,TS,TI,TL,TF,TD,TR}
-#else
-#define GRIN(TB,TS,TI,TL,TF,TD,TR) {TB,TS,TI}
-#endif // HAVE_LITE
-
-#define GRIN1(C,I) GRIN(0,0,C::grinw_##I,0,0,0,0)
-#define GRIN4(C,I) GRIN(C::grinw_##I,C::grinw_##I,C::grinw_##I,C::grinw_##I,C::grinw_##I,C::grinw_##I,C::grinw_##I)
-#define GRIN2(C,I) GRIN(C::grinw_##I,C::grinw_##I,C::grinw_##I,C::grinw_##I,0,0,0)
-#define GRINF(C,I) GRIN(0,0,0,0,C::grinw_##I,C::grinw_##I,0)
-
-struct FClass { // 0.7.8: removed all GridObject-specific stuff.
- void *(*allocator)(); // returns a new C++ object
- void (*startup)(Ruby rself); // initializer for the Ruby class
- const char *name; // C++/Ruby name (not PD name)
- int methodsn; MethodDecl *methods; // C++ -> Ruby methods
-};
-
-//****************************************************************
-// GridOutlet represents a grid-aware outlet
-\class GridOutlet < CObject
-struct GridOutlet : CObject {
-// number of (minimum,maximum) BYTES to send at once
-// starting with version 0.8, this is amount of BYTES, not amount of NUMBERS.
- static const int MIN_PACKET_SIZE = 1<<8;
- static const int MAX_PACKET_SIZE = 1<<12;
-// those are set only once
- GridObject *parent; // not a P<> because of circular refs
- P<Dim> dim; // dimensions of the grid being sent
- NumberTypeE nt;
- PtrGrid buf; // temporary buffer
- bool frozen; // is the "begin" phase finished?
- std::vector<GridInlet *> inlets; // which inlets are we connected to
-// those are updated during transmission
- int dex; // how many numbers were already sent in this connection
- int bufi; // number of bytes used in the buffer
-// methods
- GridOutlet(GridObject *parent_, int woutlet, P<Dim> dim_, NumberTypeE nt_=int32_e) :
- parent(parent_), dim(dim_), nt(nt_), frozen(false), dex(0), bufi(0) {
- int ntsz = number_type_table[nt].size;
- buf=new Grid(new Dim(MAX_PACKET_SIZE/*/ntsz*/), nt);
- begin(woutlet,dim,nt);
- }
- ~GridOutlet() {}
- void callback(GridInlet *in);
-
- // send/send_direct: data belongs to caller, may be stack-allocated,
- // receiver doesn't modify the data; in send(), there is buffering;
- // in send_direct(), there is not. When switching from buffered to
- // unbuffered mode, flush() must be called
- template <class T> void send(int n, Pt<T> data);
- void flush(); // goes with send();
-
- // give: data must be dynamically allocated as a whole: the data
- // will be deleted eventually, and should not be used by the caller
- // beyond the call to give().
- template <class T> void give(int n, Pt<T> data);
-
- // third way to send (upcoming, in GF-0.8.??) is called "ask".
- template <class T> void ask(int &n, Pt<T> &data, int factor, int min, int max);
-
-private:
- void begin(int woutlet, P<Dim> dim, NumberTypeE nt=int32_e);
- template <class T> void send_direct(int n, Pt<T> data);
- void end() {
- flush();
- for (uint32 i=0; i<inlets.size(); i++) inlets[i]->end();
- dim=0;
- }
-};
-\end class GridOutlet
-
-//****************************************************************
-
-typedef struct BFObject BFObject; // Pd t_object or something
-
-// represents objects that have inlets/outlets
-\class FObject < CObject
-struct FObject : CObject {
- BFObject *bself; // point to PD peer
- uint64 total_time;
- FObject() : bself(0), total_time(0) {}
- const char *args() {
- Ruby s=rb_funcall(rself,SI(args),0);
- if (s==Qnil) return 0;
- return rb_str_ptr(s);
- }
- \decl Ruby total_time_get();
- \decl Ruby total_time_set(Ruby x);
- \decl void send_in (...);
- \decl void send_out (...);
- \decl void delete_m ();
-};
-\end class FObject
-
-\class GridObject < FObject
-struct GridObject : FObject {
- std::vector<P<GridInlet> > in;
- P<GridOutlet> out;
- // Make sure you distinguish #close/#delete, and C++'s delete. The first
- // two are quite equivalent and should never make an object "crashable".
- // C++'s delete is called by Ruby's garbage collector or by PureData's delete.
- GridObject() {}
- ~GridObject() {check_magic();}
- bool is_busy_except(P<GridInlet> gin) {
- for (uint32 i=0; i<in.size(); i++)
- if (in[i] && in[i]!=gin && in[i]->dim) return true;
- return false;
- }
- \decl Ruby method_missing(...);
- \decl Array inlet_dim(int inln);
- \decl Symbol inlet_nt(int inln);
- \decl void inlet_set_factor(int inln, int factor);
- \decl void send_out_grid_begin(int outlet, Array dim, NumberTypeE nt=int32_e);
- \decl void send_out_grid_flow (int outlet, String buf, NumberTypeE nt=int32_e);
-};
-\end class GridObject
-
-uint64 gf_timeofday();
-extern "C" void Init_gridflow ();
-void gfpost(const char *fmt, ...);
-extern Numop *op_add,*op_sub,*op_mul,*op_div,*op_mod,*op_shl,*op_and,*op_put;
-
-#define INFO(OBJ) rb_str_ptr(rb_funcall(OBJ->rself,SI(info),0))
-//#define INFO(OBJ) "(bleh)"
-#define NOTEMPTY(_a_) if (!(_a_)) RAISE("in [%s], '%s' is empty",INFO(this), #_a_);
-#define SAME_TYPE(_a_,_b_) \
- if ((_a_)->nt != (_b_)->nt) RAISE("%s: same type please (%s has %s; %s has %s)", \
- INFO(this), \
- #_a_, number_type_table[(_a_)->nt].name, \
- #_b_, number_type_table[(_b_)->nt].name);
-static void SAME_DIM(int n, P<Dim> a, int ai, P<Dim> b, int bi) {
- if (ai+n > a->n) RAISE("left hand: not enough dimensions");
- if (bi+n > b->n) RAISE("right hand: not enough dimensions");
- for (int i=0; i<n; i++) {
- if (a->v[ai+i] != b->v[bi+i]) {
- RAISE("mismatch: left dim #%d is %d, right dim #%d is %d",
- ai+i, a->v[ai+i],
- bi+i, b->v[bi+i]);}}}
-
-// a stack for the profiler, etc.
-#define GF_STACK_MAX 256
-//#define NO_INLINE(decl) decl __attribute__((noinline))
-#define NO_INLINE(decl) decl
-struct GFStack {
- struct GFStackFrame {
- FObject *o;
- void *bp; // a pointer into system stack
- uint64 time;
- }; // sizeof() == 16 (in 32-bit mode)
- GFStackFrame s[GF_STACK_MAX];
- int n;
- GFStack() { n = 0; }
- NO_INLINE(void push (FObject *o));
- NO_INLINE(void pop ());
-};
-extern GFStack gf_stack;
-struct GFStackMarker {
- int n;
- bool flag;
- GFStackMarker(FObject *o) { n = gf_stack.n; gf_stack.push(o); flag=true; }
- ~GFStackMarker() { while (gf_stack.n != n) gf_stack.pop(); }
- bool once () {
- if (flag) { flag=false; return true; } else return false;
- }
-};
-
-typedef GridObject Format;
-
-#endif // __GF_GRID_H
diff --git a/externals/gridflow/base/main.c b/externals/gridflow/base/main.c
deleted file mode 100644
index d65c81d0..00000000
--- a/externals/gridflow/base/main.c
+++ /dev/null
@@ -1,648 +0,0 @@
-/*
- $Id: main.c,v 1.2 2006-03-15 04:37:08 matju Exp $
-
- GridFlow
- Copyright (c) 2001,2002,2003,2004 by Mathieu Bouchard
-
- 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.
-
- See file ../COPYING for further informations on licensing terms.
-
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include <stdlib.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <time.h>
-#include <stdarg.h>
-#include <string.h>
-#include <signal.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdarg.h>
-
-#include "grid.h.fcs"
-#include "../config.h"
-#include <assert.h>
-#include <limits.h>
-
-BuiltinSymbols bsym;
-GFStack gf_stack;
-Ruby mGridFlow;
-Ruby cFObject;
-
-extern "C"{
-void rb_raise0(
-const char *file, int line, const char *func, VALUE exc, const char *fmt, ...) {
- va_list args;
- char buf[BUFSIZ];
- va_start(args,fmt);
- vsnprintf(buf, BUFSIZ, fmt, args);
- buf[BUFSIZ-1]=0;
- va_end(args);
- VALUE e = rb_exc_new2(exc, buf);
- char buf2[BUFSIZ];
- snprintf(buf2, BUFSIZ, "%s:%d:in `%s'", file, line, func);
- buf2[BUFSIZ-1]=0;
- VALUE ary = rb_funcall(e,SI(caller),0);
- if (gf_stack.n) {
- rb_funcall(ary,SI(unshift),2,rb_str_new2(buf2),
- rb_str_new2(INFO(gf_stack.s[gf_stack.n-1].o)));
- } else {
- rb_funcall(ary,SI(unshift),1,rb_str_new2(buf2));
- }
- rb_funcall(e,SI(set_backtrace),1,ary);
- rb_exc_raise(e);
-}};
-
-Ruby rb_ary_fetch(Ruby rself, int i) {
- Ruby argv[] = { INT2NUM(i) };
- return rb_ary_aref(COUNT(argv),argv,rself);
-}
-
-//----------------------------------------------------------------
-// CObject
-
-static void CObject_mark (void *z) {}
-void CObject_free (void *foo) {
- CObject *self = (CObject *)foo;
- self->check_magic();
- if (!self->rself) {
- fprintf(stderr,"attempt to free object that has no rself\n");
- abort();
- }
- self->rself = 0; /* paranoia */
- delete self;
-}
-
-//----------------------------------------------------------------
-// Dim
-
-void Dim::check() {
- if (n>MAX_DIM) RAISE("too many dimensions");
- for (int i=0; i<n; i++) if (v[i]<0) RAISE("Dim: negative dimension");
-}
-
-// !@#$ big leak machine?
-// returns a string like "Dim[240,320,3]"
-char *Dim::to_s() {
- // if you blow 256 chars it's your own fault
- char buf[256];
- char *s = buf;
- s += sprintf(s,"Dim[");
- for(int i=0; i<n; i++) s += sprintf(s,"%s%d", ","+!i, v[i]);
- s += sprintf(s,"]");
- return strdup(buf);
-}
-
-//----------------------------------------------------------------
-\class FObject < CObject
-
-static void FObject_prepare_message(int &argc, Ruby *&argv, Ruby &sym, FObject *foo=0) {
- if (argc<1) {
- sym = bsym._bang;
- } else if (argc>1 && !SYMBOL_P(*argv)) {
- sym = bsym._list;
- } else if (INTEGER_P(*argv)||FLOAT_P(*argv)) {
- sym = bsym._float;
- } else if (SYMBOL_P(*argv)) {
- sym = *argv;
- argc--, argv++;
- } else if (argc==1 && TYPE(*argv)==T_ARRAY) {
- sym = bsym._list;
- argc = rb_ary_len(*argv);
- argv = rb_ary_ptr(*argv);
- } else {
- RAISE("%s received bad message: argc=%d; argv[0]=%s",foo?INFO(foo):"", argc,
- argc ? rb_str_ptr(rb_inspect(argv[0])) : "");
- }
-}
-
-struct Helper {
- int argc;
- Ruby *argv;
- FObject *self;
- Ruby rself;
- int n; // stack level
-};
-
-static Ruby GridFlow_handle_braces(Ruby rself, Ruby argv);
-
-// inlet #-1 is reserved for SystemInlet messages
-// inlet #-2 is for inlet #0 messages that happen at start time
-static void send_in_2 (Helper *h) { PROF(h->self) {
- int argc = h->argc;
- Ruby *argv = h->argv;
- if (h->argc<1) RAISE("not enough args");
- int inlet = INT(argv[0]);
- argc--, argv++;
- Ruby foo;
- if (argc==1 && TYPE(argv[0])==T_STRING /* && argv[0] =~ / / */) {
- foo = rb_funcall(mGridFlow,SI(parse),1,argv[0]);
- argc = rb_ary_len(foo);
- argv = rb_ary_ptr(foo);
- }
- if (argc>1) {
- foo = rb_ary_new4(argc,argv);
- GridFlow_handle_braces(0,foo);
- argc = rb_ary_len(foo);
- argv = rb_ary_ptr(foo);
- }
- if (inlet==-2) {
- Array init_messages = rb_ivar_get(h->rself,SI(@init_messages));
- rb_ary_push(init_messages, rb_ary_new4(argc,argv));
- inlet=0;
- }
- if (inlet<0 || inlet>9 /*|| inlet>real_inlet_max*/)
- if (inlet!=-3 && inlet!=-1) RAISE("invalid inlet number: %d", inlet);
- Ruby sym;
- FObject_prepare_message(argc,argv,sym,h->self);
-// if (rb_const_get(mGridFlow,SI(@verbose))==Qtrue) gfpost m.inspect
- char buf[256];
- if (inlet==-1) sprintf(buf,"_sys_%s",rb_sym_name(sym));
- else sprintf(buf,"_%d_%s",inlet,rb_sym_name(sym));
- rb_funcall2(h->rself,rb_intern(buf),argc,argv);
-} /* PROF */ }
-
-static void send_in_3 (Helper *h) {
- while (gf_stack.n > h->n) gf_stack.pop();
-}
-
-\def void send_in (...) {
- Helper h = {argc,argv,this,rself,gf_stack.n};
- rb_ensure(
- (RMethod)send_in_2,(Ruby)&h,
- (RMethod)send_in_3,(Ruby)&h);
-}
-
-\def void send_out (...) {
- int n=0;
- if (argc<1) RAISE("not enough args");
- int outlet = INT(*argv);
- if (outlet<0 || outlet>9 /*|| outlet>real_outlet_max*/)
- RAISE("invalid outlet number: %d",outlet);
- argc--, argv++;
- Ruby sym;
- FObject_prepare_message(argc,argv,sym,this);
- Ruby noutlets2 = rb_ivar_get(rb_obj_class(rself),SYM2ID(SYM(@noutlets)));
- if (TYPE(noutlets2)!=T_FIXNUM) {
- IEVAL(rself,"STDERR.puts inspect");
- RAISE("don't know how many outlets this has");
- }
- int noutlets = INT(noutlets2);
- //if (outlet<0 || outlet>=noutlets) RAISE("outlet %d does not exist",outlet);
- // was PROF(0) a hack because of exception-handling problems?
- PROF(0) {
- Ruby argv2[argc+2];
- for (int i=0; i<argc; i++) argv2[2+i] = argv[i];
- argv2[0] = INT2NUM(outlet);
- argv2[1] = sym;
- rb_funcall2(rself,SI(send_out2), argc+2, argv2);
-
- Ruby ary = rb_ivar_defined(rself,SYM2ID(bsym.iv_outlets)) ?
- rb_ivar_get(rself,SYM2ID(bsym.iv_outlets)) : Qnil;
- if (ary==Qnil) goto end;
- if (TYPE(ary)!=T_ARRAY) RAISE("send_out: expected array");
- ary = rb_ary_fetch(ary,outlet);
- if (ary==Qnil) goto end;
- if (TYPE(ary)!=T_ARRAY) RAISE("send_out: expected array");
- n = rb_ary_len(ary);
-
- for (int i=0; i<n; i++) {
- Ruby conn = rb_ary_fetch(ary,i);
- Ruby rec = rb_ary_fetch(conn,0);
- int inl = INT(rb_ary_fetch(conn,1));
- argv2[0] = INT2NUM(inl);
- rb_funcall2(rec,SI(send_in),argc+2,argv2);
- }
- } /* PROF */
-end:;
-}
-
-Ruby FObject_s_new(Ruby argc, Ruby *argv, Ruby qlass) {
- Ruby allocator = rb_ivar_defined(qlass,SI(@allocator)) ?
- rb_ivar_get(qlass,SI(@allocator)) : Qnil;
- FObject *self;
- if (allocator==Qnil) {
- // this is a pure-ruby FObject/GridObject
- // !@#$ GridObject is in FObject constructor (ugly)
- self = new GridObject;
- } else {
- // this is a C++ FObject/GridObject
- void*(*alloc)() = (void*(*)())FIX2PTR(void,allocator);
- self = (FObject *)alloc();
- }
- self->check_magic();
- Ruby keep = rb_ivar_get(mGridFlow, SI(@fobjects));
- self->bself = 0;
- Ruby rself = Data_Wrap_Struct(qlass, CObject_mark, CObject_free, self);
- self->rself = rself;
- rb_hash_aset(keep,rself,Qtrue); // prevent sweeping
- rb_funcall2(rself,SI(initialize),argc,argv);
- return rself;
-}
-
-Ruby FObject_s_install(Ruby rself, Ruby name, Ruby inlets2, Ruby outlets2) {
- int inlets, outlets;
- Ruby name2;
- if (SYMBOL_P(name)) {
- name2 = rb_funcall(name,SI(to_str),0);
- } else if (TYPE(name) == T_STRING) {
- name2 = rb_funcall(name,SI(dup),0);
- } else {
- RAISE("expect symbol or string");
- }
- inlets = INT(inlets2); if ( inlets<0 || inlets>9) RAISE("...");
- outlets = INT(outlets2); if (outlets<0 || outlets>9) RAISE("...");
- rb_ivar_set(rself,SI(@ninlets),INT2NUM(inlets));
- rb_ivar_set(rself,SI(@noutlets),INT2NUM(outlets));
- rb_ivar_set(rself,SI(@foreign_name),name2);
- rb_hash_aset(rb_ivar_get(mGridFlow,SI(@fclasses)), name2, rself);
- rb_funcall(rself, SI(install2), 1, name2);
- return Qnil;
-}
-
-\def Ruby total_time_get () {return gf_ull2num(total_time);}
-
-\def Ruby total_time_set (Ruby x) {
- if (argc<1) RAISE("muh");
- total_time = TO(uint64,x);
- return argv[0];
-}
-
-\def void delete_m () {
- Ruby keep = rb_ivar_get(mGridFlow, SI(@fobjects));
- rb_funcall(keep,SI(delete),1,rself);
-}
-
-\classinfo
-\end class FObject
-
-/* ---------------------------------------------------------------- */
-/* C++<->Ruby bridge for classes/functions in base/number.c */
-
-static Ruby String_swap32_f (Ruby rself) {
- int n = rb_str_len(rself)/4;
- swap32(n,Pt<uint32>((uint32 *)rb_str_ptr(rself),n));
- return rself;
-}
-
-static Ruby String_swap16_f (Ruby rself) {
- int n = rb_str_len(rself)/2;
- swap16(n,Pt<uint16>((uint16 *)rb_str_ptr(rself),n));
- return rself;
-}
-
-NumberTypeE NumberTypeE_find (Ruby sym) {
- if (TYPE(sym)!=T_SYMBOL) RAISE("expected symbol (not %s)",
- rb_str_ptr(rb_inspect(rb_obj_class(sym))));
- Ruby nt_dict = rb_ivar_get(mGridFlow,SI(@number_type_dict));
- Ruby v = rb_hash_aref(nt_dict,sym);
- if (v!=Qnil) return FIX2PTR(NumberType,v)->index;
- RAISE("unknown number type \"%s\"", rb_sym_name(sym));
-}
-
-/* **************************************************************** */
-\class BitPacking < CObject
-
-\def void initialize(Ruby foo1, Ruby foo2, Ruby foo3) {}
-
-// !@#$ doesn't support number types
-\def String pack2 (String ins, String outs=Qnil) {
- int n = rb_str_len(ins) / sizeof(int32) / size;
- Pt<int32> in = Pt<int32>((int32 *)rb_str_ptr(ins),rb_str_len(ins));
- int bytes2 = n*bytes;
- Ruby out = outs!=Qnil ? rb_str_resize(outs,bytes2) : rb_str_new("",bytes2);
- rb_str_modify(out);
- pack(n,Pt<int32>(in,n),Pt<uint8>((uint8 *)rb_str_ptr(out),bytes2));
- return out;
-}
-
-// !@#$ doesn't support number types
-\def String unpack2 (String ins, String outs=Qnil) {
- int n = rb_str_len(argv[0]) / bytes;
- Pt<uint8> in = Pt<uint8>((uint8 *)rb_str_ptr(ins),rb_str_len(ins));
- int bytes2 = n*size*sizeof(int32);
- Ruby out = outs!=Qnil ? rb_str_resize(outs,bytes2) : rb_str_new("",bytes2);
- rb_str_modify(out);
- unpack(n,Pt<uint8>((uint8 *)in,bytes2),Pt<int32>((int32 *)rb_str_ptr(out),n));
- return out;
-}
-
-static Ruby BitPacking_s_new(Ruby argc, Ruby *argv, Ruby qlass) {
- Ruby keep = rb_ivar_get(mGridFlow, rb_intern("@fobjects"));
- if (argc!=3) RAISE("bad args");
- if (TYPE(argv[2])!=T_ARRAY) RAISE("bad mask");
- int endian = INT(argv[0]);
- int bytes = INT(argv[1]);
- Ruby *masks = rb_ary_ptr(argv[2]);
- uint32 masks2[4];
- int size = rb_ary_len(argv[2]);
- if (size<1) RAISE("not enough masks");
- if (size>4) RAISE("too many masks (%d)",size);
- for (int i=0; i<size; i++) masks2[i] = NUM2UINT(masks[i]);
- BitPacking *self = new BitPacking(endian,bytes,size,masks2);
- Ruby rself = Data_Wrap_Struct(qlass, 0, CObject_free, self);
- self->rself = rself;
- rb_hash_aset(keep,rself,Qtrue); // prevent sweeping (leak) (!@#$ WHAT???)
- rb_funcall2(rself,SI(initialize),argc,argv);
- return rself;
-}
-
-\classinfo
-\end class BitPacking
-
-void gfpost(const char *fmt, ...) {
- va_list args;
- int length;
- va_start(args,fmt);
- const int n=256;
- char post_s[n];
- length = vsnprintf(post_s,n,fmt,args);
- if (length<0 || length>=n) sprintf(post_s+n-6,"[...]"); /* safety */
- va_end(args);
- rb_funcall(mGridFlow,SI(gfpost2),2,rb_str_new2(fmt),rb_str_new2(post_s));
-}
-
-void define_many_methods(Ruby rself, int n, MethodDecl *methods) {
- for (int i=0; i<n; i++) {
- MethodDecl *md = &methods[i];
- char *buf = strdup(md->selector);
- if (strlen(buf)>2 && strcmp(buf+strlen(buf)-2,"_m")==0)
- buf[strlen(buf)-2]=0;
- rb_define_method(rself,buf,(RMethod)md->method,-1);
- rb_enable_super(rself,buf);
- free(buf);
- }
-}
-
-static Ruby GridFlow_fclass_install(Ruby rself_, Ruby fc_, Ruby super) {
- FClass *fc = FIX2PTR(FClass,fc_);
- Ruby rself = super!=Qnil ?
- rb_define_class_under(mGridFlow, fc->name, super) :
- rb_funcall(mGridFlow,SI(const_get),1,rb_str_new2(fc->name));
- define_many_methods(rself,fc->methodsn,fc->methods);
- rb_ivar_set(rself,SI(@allocator),PTR2FIX((void*)(fc->allocator))); //#!@$??
- if (fc->startup) fc->startup(rself);
- return Qnil;
-}
-
-//----------------------------------------------------------------
-// GridFlow.class
-//\class GridFlow_s < patate
-
-typedef void (*Callback)(void*);
-static Ruby GridFlow_exec (Ruby rself, Ruby data, Ruby func) {
- void *data2 = FIX2PTR(void,data);
- Callback func2 = (Callback) FIX2PTR(void,func);
- func2(data2);
- return Qnil;
-}
-
-static Ruby GridFlow_get_id (Ruby rself, Ruby arg) {
- fprintf(stderr,"%ld\n",arg);
- return INT2NUM((int)arg);
-}
-
-Ruby GridFlow_rdtsc (Ruby rself) { return gf_ull2num(rdtsc()); }
-
-/* This code handles nested lists because PureData (0.38) doesn't do it */
-static Ruby GridFlow_handle_braces(Ruby rself, Ruby argv) {
- int stack[16];
- int stackn=0;
- Ruby *av = rb_ary_ptr(argv);
- int ac = rb_ary_len(argv);
- int j=0;
- for (int i=0; i<ac; ) {
- int close=0;
- if (SYMBOL_P(av[i])) {
- const char *s = rb_sym_name(av[i]);
- while (*s=='(' || *s=='{') {
- if (stackn==16) RAISE("too many nested lists (>16)");
- stack[stackn++]=j;
- s++;
- }
- const char *se = s+strlen(s);
- while (se>s && (se[-1]==')' || se[-1]=='}')) { se--; close++; }
- if (s!=se) {
- Ruby u = rb_str_new(s,se-s);
- av[j++] = rb_funcall(rself,SI(FloatOrSymbol),1,u);
- }
- } else {
- av[j++]=av[i];
- }
- i++;
- while (close--) {
- if (!stackn) RAISE("unbalanced '}' or ')'",av[i]);
- Ruby a2 = rb_ary_new();
- int j2 = stack[--stackn];
- for (int k=j2; k<j; k++) rb_ary_push(a2,av[k]);
- j=j2;
- av[j++] = a2;
- }
- }
- if (stackn) RAISE("unbalanced '{' or '(' (stackn=%d)",stackn);
- RARRAY(argv)->len = j;
- return rself;
-}
-
-/* ---------------------------------------------------------------- */
-
-static uint32 memcpy_calls = 0;
-static uint64 memcpy_bytes = 0;
-static uint64 memcpy_time = 0;
-static uint32 malloc_calls = 0; /* only new not delete */
-static uint64 malloc_bytes = 0; /* only new not delete */
-static uint64 malloc_time = 0; /* in cpu ticks */
-
-// don't touch.
-static void gfmemcopy32(int32 *as, int32 *bs, int n) {
- int32 ba = bs-as;
-#define FOO(I) as[I] = (as+ba)[I];
- UNROLL_8(FOO,n,as)
-#undef FOO
-
-}
-
-void gfmemcopy(uint8 *out, const uint8 *in, int n) {
- uint64 t = rdtsc();
- memcpy_calls++;
- memcpy_bytes+=n;
- for (; n>16; in+=16, out+=16, n-=16) {
- ((int32*)out)[0] = ((int32*)in)[0];
- ((int32*)out)[1] = ((int32*)in)[1];
- ((int32*)out)[2] = ((int32*)in)[2];
- ((int32*)out)[3] = ((int32*)in)[3];
- }
- for (; n>4; in+=4, out+=4, n-=4) { *(int32*)out = *(int32*)in; }
- for (; n; in++, out++, n--) { *out = *in; }
- t=rdtsc()-t;
- memcpy_time+=t;
-}
-
-extern "C" {
-void *gfmalloc(size_t n) {
- uint64 t = rdtsc();
-// void *p = malloc(n);
- void *p = memalign(16,n);
- long align = (long)p & 7;
- if (align) fprintf(stderr,"malloc alignment = %ld mod 8\n",align);
- t=rdtsc()-t;
- malloc_time+=t;
- malloc_calls++;
- malloc_bytes+=n;
- return p;
-}
-void gffree(void *p) {
- uint64 t = rdtsc();
- free(p);
- t=rdtsc()-t;
- malloc_time+=t;
-}};
-
-Ruby GridFlow_memcpy_calls (Ruby rself) { return LONG2NUM(memcpy_calls); }
-Ruby GridFlow_memcpy_bytes (Ruby rself) { return gf_ull2num(memcpy_bytes); }
-Ruby GridFlow_memcpy_time (Ruby rself) { return gf_ull2num(memcpy_time); }
-Ruby GridFlow_malloc_calls (Ruby rself) { return LONG2NUM(malloc_calls); }
-Ruby GridFlow_malloc_bytes (Ruby rself) { return gf_ull2num(malloc_bytes); }
-Ruby GridFlow_malloc_time (Ruby rself) { return gf_ull2num(malloc_time); }
-
-Ruby GridFlow_profiler_reset2 (Ruby rself) {
- memcpy_calls = memcpy_bytes = memcpy_time = 0;
- malloc_calls = malloc_bytes = malloc_time = 0;
- return Qnil;
-}
-
-/* ---------------------------------------------------------------- */
-
-void startup_number();
-void startup_grid();
-void startup_flow_objects();
-void startup_flow_objects_for_image();
-void startup_flow_objects_for_matrix();
-
-Ruby cFormat;
-
-#define SDEF(_class_,_name_,_argc_) \
- rb_define_singleton_method(c##_class_,#_name_,(RMethod)_class_##_s_##_name_,_argc_)
-#define SDEF2(_name1_,_name2_,_argc_) \
- rb_define_singleton_method(mGridFlow,_name1_,(RMethod)_name2_,_argc_)
-
-STARTUP_LIST(void)
-
-// Ruby's entrypoint.
-void Init_gridflow () {
-#define FOO(_sym_,_name_) bsym._sym_ = ID2SYM(rb_intern(_name_));
-BUILTIN_SYMBOLS(FOO)
-#undef FOO
- signal(11,SIG_DFL); // paranoia
- mGridFlow = EVAL("module GridFlow; CObject = ::Object; "
- "class<<self; attr_reader :bridge_name; end; "
- "def post_string(s) STDERR.puts s end; "
- "self end");
- SDEF2("exec",GridFlow_exec,2);
- SDEF2("get_id",GridFlow_get_id,1);
- SDEF2("rdtsc",GridFlow_rdtsc,0);
- SDEF2("profiler_reset2",GridFlow_profiler_reset2,0);
- SDEF2("memcpy_calls",GridFlow_memcpy_calls,0);
- SDEF2("memcpy_bytes",GridFlow_memcpy_bytes,0);
- SDEF2("memcpy_time", GridFlow_memcpy_time,0);
- SDEF2("malloc_calls",GridFlow_malloc_calls,0);
- SDEF2("malloc_bytes",GridFlow_malloc_bytes,0);
- SDEF2("malloc_time", GridFlow_malloc_time,0);
- SDEF2("handle_braces!",GridFlow_handle_braces,1);
- SDEF2("fclass_install",GridFlow_fclass_install,2);
-
-//#define FOO(A) fprintf(stderr,"sizeof("#A")=%d\n",sizeof(A));
-//FOO(Dim) FOO(BitPacking) FOO(GridHandler) FOO(GridInlet) FOO(GridOutlet) FOO(GridObject)
-//#undef FOO
-
- rb_ivar_set(mGridFlow, SI(@fobjects), rb_hash_new());
- rb_ivar_set(mGridFlow, SI(@fclasses), rb_hash_new());
- rb_ivar_set(mGridFlow, SI(@bsym), PTR2FIX(&bsym));
- rb_define_const(mGridFlow, "GF_VERSION", rb_str_new2(GF_VERSION));
- rb_define_const(mGridFlow, "GF_COMPILE_TIME", rb_str_new2(GF_COMPILE_TIME));
- rb_define_const(mGridFlow, "GCC_VERSION", rb_str_new2(GCC_VERSION));
- cFObject = rb_define_class_under(mGridFlow, "FObject", rb_cObject);
- EVAL(
-\ruby
- module GridFlow
- class FObject
- def send_out2(*) end
- def self.install2(*) end
- def self.add_creator(name)
- name=name.to_str.dup
- GridFlow.fclasses[name]=self
- GridFlow.add_creator_2 name end
- end
- end
-\end ruby
-);
- define_many_methods(cFObject,COUNT(FObject_methods),FObject_methods);
- SDEF(FObject, install, 3);
- SDEF(FObject, new, -1);
- ID gbi = SI(gf_bridge_init);
- if (rb_respond_to(rb_cData,gbi)) rb_funcall(rb_cData,gbi,0);
- Ruby cBitPacking =
- rb_define_class_under(mGridFlow, "BitPacking", rb_cObject);
- define_many_methods(cBitPacking,
- ciBitPacking.methodsn,
- ciBitPacking.methods);
- SDEF(BitPacking,new,-1);
- rb_define_method(rb_cString, "swap32!", (RMethod)String_swap32_f, 0);
- rb_define_method(rb_cString, "swap16!", (RMethod)String_swap16_f, 0);
-
- startup_number();
- startup_grid();
- startup_flow_objects();
- startup_flow_objects_for_image();
- startup_flow_objects_for_matrix();
- if (!EVAL("begin require 'gridflow/base/main.rb'; true\n"
- "rescue Exception => e; "
- "STDERR.puts \"can't load: #{$!}\n"
- "backtrace: #{$!.backtrace.join\"\n\"}\n"
- "$: = #{$:.inspect}\"\n; false end")) return;
- cFormat = EVAL("GridFlow::Format");
- STARTUP_LIST()
- EVAL("h=GridFlow.fclasses; h['#io:window'] = h['#io:quartz']||h['#io:x11']||h['#io:sdl']");
- EVAL("GridFlow.load_user_config");
- signal(11,SIG_DFL); // paranoia
-}
-
-void GFStack::push (FObject *o) {
- void *bp = &o; // really. just finding our position on the stack.
- if (n>=GF_STACK_MAX)
- RAISE("stack overflow (maximum %d FObject activations at once)", GF_STACK_MAX);
- uint64 t = rdtsc();
- if (n) s[n-1].time = t - s[n-1].time;
- s[n].o = o;
- s[n].bp = bp;
- s[n].time = t;
- n++;
-}
-
-void GFStack::pop () {
- uint64 t = rdtsc();
- if (!n) RAISE("stack underflow (WHAT?)");
- n--;
- if (s[n].o) s[n].o->total_time += t - s[n].time;
- if (n) s[n-1].time = t - s[n-1].time;
-}
-
-uint64 gf_timeofday () {
- timeval t;
- gettimeofday(&t,0);
- return t.tv_sec*1000000+t.tv_usec;
-}
diff --git a/externals/gridflow/base/main.rb b/externals/gridflow/base/main.rb
deleted file mode 100644
index 5b33bfad..00000000
--- a/externals/gridflow/base/main.rb
+++ /dev/null
@@ -1,384 +0,0 @@
-=begin
- $Id: main.rb,v 1.2 2006-03-15 04:37:28 matju Exp $
-
- GridFlow
- Copyright (c) 2001,2002,2003,2004,2005 by Mathieu Bouchard
-
- 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.
-
- See file ../COPYING for further informations on licensing terms.
-
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-=end
-
-# ENV["RUBY_VERBOSE_GC"]="yes"
-
-# this file gets loaded by main.c upon startup
-# module GridFlow is supposed to be created by main.c
-# this includes GridFlow.post_string(s)
-
-# because Ruby1.6 has no #object_id and Ruby1.8 warns on #id
-unless Object.instance_methods(true).include? "object_id"
- class Object; alias object_id id end
-end
-
-# in case of bug in Ruby ("Error: Success")
-module Errno; class E000 < StandardError; end; end
-
-#$post_log = File.open "/tmp/gridflow.log", "w"
-$post_log = nil
-
-class Array
- def split(elem)
- r=[]
- j=0
- for i in 0...length
- (r<<self[j,i-j]; j=i+1) if self[i]==elem
- end
- r<<self[j,length-j]
- end
-end
-
-module GridFlow #------------------
-
-def self.post(s,*a)
- post_string(sprintf("%s"+s,post_header,*a))
- ($post_log << sprintf(s,*a); $post_log.flush) if $post_log
-end
-
-class<<self
- attr_accessor :data_path
- attr_accessor :post_header
- attr_accessor :verbose
- attr_reader :fobjects
- attr_reader :fclasses
- attr_reader :cpu_hertz
- attr_reader :subprocesses
- attr_reader :bridge_name
- alias gfpost post
-end
-
-@subprocesses={}
-@verbose=false
-@data_path=[]
-if GridFlow.respond_to? :config then
- @data_path << GridFlow.config["PUREDATA_PATH"]+"/extra/gridflow/images"
-end
-
-def self.hunt_zombies
- #STDERR.puts "GridFlow.hunt_zombies"
- # the $$ value is bogus
- begin
- died = []
- subprocesses.each {|x,v|
- Process.waitpid2(x,Process::WNOHANG) and died<<x
- }
- rescue Errno::ECHILD
- end
- #STDERR.puts died.inspect
- died.each {|x| subprocesses.delete x }
-end
-
-def self.packstring_for_nt(nt)
- case nt
- when :u, :u8, :uint8; "C*"
- when :s, :i16, :int16; "s*"
- when :i, :i32, :int32; "l*"
- when :l, :i64, :int64; raise "int64? lol"
- when :f, :f32, :float32; "f*"
- when :d, :f64, :float64; "d*"
- else raise "no decoder for #{nt.inspect}"
- end
-end
-
-self.post_header = "[gf] "
-
-def self.gfpost2(fmt,s); post("%s",s) end
-
-if GridFlow.bridge_name then
- post "This is GridFlow #{GridFlow::GF_VERSION} within Ruby version #{RUBY_VERSION}"
- post "base/main.c was compiled on #{GridFlow::GF_COMPILE_TIME}"
- post "Please use at least 1.6.6 if you plan to use sockets" if RUBY_VERSION<"1.6.6"
-end
-
-if not GridFlow.bridge_name then
- require "gridflow/bridge/placebo"
-end
-
-Brace1 = "{".intern
-Brace2 = "}".intern
-Paren1 = "(".intern
-Paren2 = ")".intern
-
-def self.parse(m)
- m = m.gsub(/(\{|\})/," \\1 ").split(/\s+/)
- m.map! {|x| case x
- when Integer, Symbol; x
- when /^[+\-]?[0-9]+$/; x.to_i
- when String; x.intern
- end
- }
- m
-end
-
-def self.stringify_list(argv)
- argv.map {|x| stringify x }.join(" ")
-end
-
-def self.stringify(arg)
- case arg
- when Integer, Float, Symbol; arg.to_s
- when Array; "{#{stringify_list arg}}"
- end
-end
-
-::Object.module_eval do def FloatOrSymbol(x) Float(x) rescue x.intern end end
-
-# adding some functionality to that:
-class FObject
- @broken_ok = false
- @do_loadbangs = true
- class<<self
- # global
- attr_accessor :broken_ok
- # per-class
- attr_reader :ninlets
- attr_reader :noutlets
- attr_accessor :do_loadbangs
- attr_accessor :comment
- def foreign_name; @foreign_name if defined? @foreign_name end
- def doc(selector=nil,text=nil)
- return @doc if not selector
- if not defined? @doc; @doc={}; end
- return @doc[selector] if not text
- @doc[selector] = text
- end
- def doc_out(selector=nil,text=nil)
- return @doc_out if not selector
- if not defined? @doc_out; @doc_out={}; end
- return @doc_out[selector] if not text
- @doc_out[selector] = text
- end
- end
- def post(*a) GridFlow.post(*a) end
- def self.subclass(*args,&b)
- qlass = Class.new self
- qlass.install(*args)
- #qlass.module_eval{qlass.instance_eval(&b)}
- qlass.instance_eval{qlass.module_eval(&b)}
- #qlass.module_eval(&b)
- end
- alias :total_time :total_time_get
- alias :total_time= :total_time_set
- attr_writer :args # String
- attr_accessor :argv # Array
- attr_reader :outlets
- attr_accessor :parent_patcher
- attr_accessor :properties
- attr_accessor :classname
- def initialize2; end
- def args
- if defined? @args
- @args
- else
- "[#{self.class} ...]"
- end
- end
- alias info args
- def connect outlet, object, inlet
- @outlets ||= []
- @outlets[outlet] ||= []
- @outlets[outlet].push [object, inlet]
- end
- def self.name_lookup sym
- qlasses = GridFlow.fclasses
- qlass = qlasses[sym.to_s]
- if not qlass
- return qlasses['broken'] if @broken_ok
- raise "object class '#{sym}' not found"
- end
- qlass
- end
- def self.[](*m)
- o=nil
- if m.length==1 and m[0] =~ / /
- o="[#{m[0]}]"
- m=GridFlow.parse(m[0])
- else
- o=m.inspect
- end
- GridFlow.handle_braces!(m)
- ms = m.split ','.intern
- m = ms.shift
- qlass = m.shift
- qlassname = qlass.to_s
- qlass = name_lookup qlass.to_s unless Class===qlass
- r = qlass.new(*m)
- r.classname = qlassname
- GridFlow.post "%s",r.args if GridFlow.verbose
- for x in ms do r.send_in(-2, *x) end if FObject.do_loadbangs
- r
- end
- def inspect
- if args then "#<#{self.class} #{args}>" else super end
- end
- def initialize(*argv)
- s = GridFlow.stringify_list argv
- @argv = argv
- @args = "["
- @args << (self.class.foreign_name || self.to_s)
- @args << " " if s.length>0
- @args << s << "]"
- @parent_patcher = nil
- @properties = {}
- @init_messages = []
- end
-end
-
-class FPatcher < FObject
- class << self
- attr_reader :fobjects
- attr_reader :wires
- end
- def initialize(*)
- super
- fobjects = self.class.fobjects
- wires = self.class.wires
- @fobjects = fobjects.map {|x| if String===x then FObject[x] else x.call end }
- @inlets = []
- @ninlets = self.class.ninlets or raise "oops"
- i=0
- @fobjects << self
- while i<wires.length do
- a,b,c,d = wires[i,4]
- if a==-1 then
- a=self
- @inlets[b]||=[]
- @inlets[b] << [@fobjects[c],d]
- else
- if c==-1 then
- @fobjects[a].connect b,self,d+@ninlets
- else
- @fobjects[a].connect b,@fobjects[c],d
- end
- end
- i+=4
- end
- end
- def method_missing(sym,*args)
- sym=sym.to_s
- if sym =~ /^_(\d)_(.*)/ then
- inl = Integer $1
- sym = $2.intern
- if inl<@ninlets then
- raise "#{inspect} has not @inlets[#{inl}]" if not @inlets[inl]
- for x in @inlets[inl] do
- x[0].send_in x[1],sym,*args end
- else
- send_out(inl-@ninlets,sym,*args)
- end
- else super end
- end
-end
-
-def GridFlow.estimate_cpu_clock
- u0,t0=GridFlow.rdtsc,Time.new.to_f; sleep 0.01
- u1,t1=GridFlow.rdtsc,Time.new.to_f; (u1-u0)/(t1-t0)
-end
-
-begin
- @cpu_hertz = (0...3).map {
- GridFlow.estimate_cpu_clock
- }.sort[1] # median of three tries
-rescue
- GridFlow.post $!
-end
-
-def GridFlow.find_file s
- s=s.to_s
- if s==File.basename(s) then
- dir = GridFlow.data_path.find {|x| File.exist? "#{x}/#{s}" }
- if dir then "#{dir}/#{s}" else s end
- elsif GridFlow.respond_to? :find_file_2
- GridFlow.find_file_2 s
- else
- s
- end
-end
-
-def GridFlow.macerr(i)
- begin
- f=File.open("/System/Library/Frameworks/CoreServices.framework/"+
- "Versions/A/Frameworks/CarbonCore.framework/Versions/A/Headers/"+
- "MacErrors.h")
- while f.gets
- m = /^\s*(\w+)\s*=\s*(-\d+),\s*\/\*\s*(.*)\s*\*\/$/.match $_
- next if not m
- if m[2].to_i == i then return "#{m[2]}: \"#{m[3]}\"" end
- end
- return "no error message available for this error number"
- rescue FileError
- return "Can't find Apple's precious copyrighted list of error messages on this system."
- ensure
- f.close if f
- end
-end
-
-end # module GridFlow
-
-class IO
- def nonblock= flag
- bit = Fcntl::O_NONBLOCK
- state = fcntl(Fcntl::F_GETFL, 0)
- fcntl(Fcntl::F_SETFL, (state & ~bit) |
- (if flag; bit else 0 end))
- end
-end
-
-def protect
- yield
-rescue Exception => e
- STDERR.puts "#{e.class}: #{e}"
- STDERR.puts e.backtrace
-end
-
-def GridFlow.load_user_config
- require "gridflow/bridge/puredata.rb" if GridFlow.bridge_name == "puredata"
- user_config_file = ENV["HOME"] + "/.gridflow_startup"
- begin
- load user_config_file if File.exist? user_config_file
- rescue Exception => e
- GridFlow.post "#{e.class}: #{e}:\n" + e.backtrace.join("\n")
- GridFlow.post "while loading ~/.gridflow_startup"
- end
-end
-
-require "gridflow/base/flow_objects.rb"
-require "gridflow/format/main.rb"
-
-%w(
- # #for #finished #type #dim #transpose #perspective #store #outer
- #grade #redim #import #export #export_list #cast
- #scale_by #downscale_by #draw_polygon #draw_image #layer
- #print #pack #export_symbol #rotate
- #in #out
-).each {|k|
- GridFlow::FObject.name_lookup(k).add_creator k.gsub(/#/,"@")
-}
-
-END {
- GridFlow.fobjects.each {|k,v| k.delete if k.respond_to? :delete }
- GridFlow.fobjects.clear
- GC.start
-}
-
diff --git a/externals/gridflow/base/number.c b/externals/gridflow/base/number.c
deleted file mode 100644
index b362e2cb..00000000
--- a/externals/gridflow/base/number.c
+++ /dev/null
@@ -1,374 +0,0 @@
-/*
- $Id: number.c,v 1.2 2006-03-15 04:37:08 matju Exp $
-
- GridFlow
- Copyright (c) 2001,2002,2003,2004 by Mathieu Bouchard
-
- 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.
-
- See file ../COPYING for further informations on licensing terms.
-
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include "grid.h.fcs"
-#include <math.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <limits.h>
-
-#ifdef PASS1
-NumberType number_type_table[] = {
-#define FOO(_sym_,_size_,_flags_,args...) NumberType( #_sym_, _size_, _flags_, args ),
-NUMBER_TYPES(FOO)
-#undef FOO
-};
-const long number_type_table_n = COUNT(number_type_table);
-#endif
-
-// those are bogus class-templates in the sense that you don't create
-// objects from those, you just call static functions. The same kind
-// of pattern is present in STL to overcome some limitations of C++.
-
-template <class T> class Op {
-public:
- // I call abort() on those because I can't say they're purevirtual.
- static T f(T a, T b) {abort();}
- static bool is_neutral(T x, LeftRight side) {assert(!"Op::is_neutral called?"); return false;}
- static bool is_absorbent(T x, LeftRight side) {assert(!"Op::is_absorbent called?"); return false;}
-};
-
-template <class O> class OpLoops {
-public:
- template <class T> static void op_map (int n, T *as, T b) {
- if (!n) return;
-#define FOO(I) as[I]=O::f(as[I],b);
- UNROLL_8(FOO,n,as)
-#undef FOO
- }
- template <class T> static void op_zip (int n, T *as, T *bs) {
- if (!n) return;
- ptrdiff_t ba=bs-as; // really!
-#define FOO(I) as[I]=O::f(as[I],as[ba+I]);
- UNROLL_8(FOO,n,as)
-#undef FOO
- }
- // disabled
- template <class T> static void op_zip2 (int n, T *as, T *bs, T *cs) {
- if (!n) return;
- ptrdiff_t ba=bs-as, ca=cs-as;
-#define FOO(I) as[ca+I]=O::f(as[I],as[ba+I]);
- UNROLL_8(FOO,n,as)
-#undef FOO
- }
-#define W(i) as[i]=O::f(as[i],bs[i]);
-#define Z(i,j) as[i]=O::f(O::f(O::f(O::f(as[i],bs[i]),bs[i+j]),bs[i+j+j]),bs[i+j+j+j]);
- template <class T> static void op_fold (int an, int n, T *as, T *bs) {
- switch (an) {
- case 1: for (; (n&3)!=0; bs++, n--) W(0);
- for (; n; bs+=4, n-=4) { Z(0,1); } break;
- case 2: for (; (n&3)!=0; bs+=2, n--) { W(0); W(1); }
- for (; n; bs+=8, n-=4) { Z(0,2); Z(1,2); } break;
- case 3: for (; (n&3)!=0; bs+=3, n--) { W(0); W(1); W(2); }
- for (; n; bs+=12, n-=4) { Z(0,3); Z(1,3); Z(2,3); } break;
- case 4: for (; (n&3)!=0; bs+=4, n--) { W(0); W(1); W(2); W(3); }
- for (; n; bs+=16, n-=4) { Z(0,4); Z(1,4); Z(2,4); Z(3,4); } break;
- default:for (; n--; ) {
- int i=0;
- for (; i<(an&-4); i+=4, bs+=4) {
- as[i+0]=O::f(as[i+0],bs[0]);
- as[i+1]=O::f(as[i+1],bs[1]);
- as[i+2]=O::f(as[i+2],bs[2]);
- as[i+3]=O::f(as[i+3],bs[3]);
- }
- for (; i<an; i++, bs++) as[i] = O::f(as[i],*bs);
- }
- }
- }
- template <class T> static void op_scan (int an, int n, T *as, T *bs) {
- for (; n--; as=bs-an) {
- for (int i=0; i<an; i++, as++, bs++) *bs=O::f(*as,*bs);
- }
- }
-};
-
-template <class T>
-static void quick_mod_map (int n, T *as, T b) {
- if (!b) return;
-#define FOO(I) as[I]=mod(as[I],b);
- UNROLL_8(FOO,n,as)
-#undef FOO
-}
-
-template <class T> static void quick_ign_map (int n, T *as, T b) {}
-template <class T> static void quick_ign_zip (int n, T *as, T *bs) {}
-template <class T> static void quick_put_map (int n, T *as, T b) {
-#define FOO(I) as[I]=b;
- UNROLL_8(FOO,n,as)
-#undef FOO
-}
-
-#ifdef PASS1
-void quick_put_map (int n, int16 *as, int16 b) {
- if (n&1!=0 && (long)as&4!=0) { *as++=b; n--; }
- quick_put_map (n>>1, (int32 *)as, (int32)(b<<16)+b);
- if (n&1!=0) *as++=b;
-}
-void quick_put_map (int n, uint8 *as, uint8 b) {
- while (n&3!=0 && (long)as&4!=0) { *as++=b; n--; }
- int32 c=(b<<8)+b; c+=c<<16;
- quick_put_map (n>>2, (int32 *)as, c);
- while (n&3!=0) *as++=b;
-}
-#endif
-template <class T> static void quick_put_zip (int n, T *as, T *bs) {
- gfmemcopy((uint8 *)as, (uint8 *)bs, n*sizeof(T));
-}
-
-// classic two-input operator
-#define DEF_OP(op,expr,neu,isneu,isorb) \
- template <class T> class Y##op : Op<T> { public: \
- inline static T f(T a, T b) { return expr; } \
- inline static T neutral (LeftRight side) {return neu;} \
- inline static bool is_neutral (T x, LeftRight side) {return isneu;} \
- inline static bool is_absorbent(T x, LeftRight side) {return isorb;}};
-#define DEF_OPFT(op,expr,neu,isneu,isorb,T) \
- template <> class Y##op<T> : Op<T> { public: \
- inline static T f(T a, T b) { return expr; } \
- inline static T neutral (LeftRight side) {return neu;} \
- inline static bool is_neutral (T x, LeftRight side) {return isneu;} \
- inline static bool is_absorbent(T x, LeftRight side) {return isorb;}};
-// this macro is for operators that have different code for the float version
-#define DEF_OPF(op,expr,expr2,neu,isneu,isorb) \
- DEF_OP( op,expr, neu,isneu,isorb) \
- DEF_OPFT(op,expr2,neu,isneu,isorb,float32) \
- DEF_OPFT(op,expr2,neu,isneu,isorb,float64)
-
-#define DECL_OPON(base,op,T) NumopOn<T>( \
- &base<Y##op<T> >::op_map, &base<Y##op<T> >::op_zip, \
- &base<Y##op<T> >::op_fold, &base<Y##op<T> >::op_scan, \
- &Y##op<T>::neutral, &Y##op<T>::is_neutral, &Y##op<T>::is_absorbent)
-#define DECL_OPON_NOFOLD(base,op,T) NumopOn<T>( \
- &base<Y##op<T> >::op_map, &base<Y##op<T> >::op_zip, 0,0, \
- &Y##op<T>::neutral, &Y##op<T>::is_neutral, &Y##op<T>::is_absorbent)
-#define DECL_OP(op,sym,flags) Numop(0, sym, \
- DECL_OPON(OpLoops,op,uint8), DECL_OPON(OpLoops,op,int16), \
- DECL_OPON(OpLoops,op,int32) NONLITE(, DECL_OPON(OpLoops,op,int64), \
- DECL_OPON(OpLoops,op,float32), DECL_OPON(OpLoops,op,float64), \
- DECL_OPON(OpLoops,op,ruby)), flags)
-#define DECL_OP_NOFLOAT(op,sym,flags) Numop(0, sym, \
- DECL_OPON(OpLoops,op,uint8), DECL_OPON(OpLoops,op,int16), \
- DECL_OPON(OpLoops,op,int32) NONLITE(, DECL_OPON(OpLoops,op,int64), \
- NumopOn<float32>(0,0,0,0,0,0,0), NumopOn<float64>(0,0,0,0,0,0,0), \
- DECL_OPON(OpLoops,op,ruby)), flags)
-#define DECL_OP_NOFOLD(op,sym,flags) Numop(0, sym, \
- DECL_OPON_NOFOLD(OpLoops,op,uint8), DECL_OPON_NOFOLD(OpLoops,op,int16), \
- DECL_OPON_NOFOLD(OpLoops,op,int32) NONLITE(, DECL_OPON_NOFOLD(OpLoops,op,int64), \
- DECL_OPON_NOFOLD(OpLoops,op,float32), DECL_OPON_NOFOLD(OpLoops,op,float64), \
- DECL_OPON_NOFOLD(OpLoops,op,ruby)), flags)
-
-template <class T> static inline T gf_floor (T a) {
- return (T) floor((double)a); }
-template <class T> static inline T gf_trunc (T a) {
- return (T) floor(abs((double)a)) * (a<0?-1:1); }
-
-// trying to avoid GCC warning about uint8 too small for ==256
-template <class T> static bool equal256 (T x) {return x==256;}
-template <> static bool equal256 (uint8 x) {return false;}
-
-#ifdef PASS1
-DEF_OP(ignore, a, 0, side==at_right, side==at_left)
-DEF_OP(put, b, 0, side==at_left, side==at_right)
-DEF_OP(add, a+b, 0, x==0, false)
-DEF_OP(sub, a-b, 0, side==at_right && x==0, false)
-DEF_OP(bus, b-a, 0, side==at_left && x==0, false)
-DEF_OP(mul, a*b, 1, x==1, x==0)
-DEF_OP(mulshr8, (a*b)>>8, 256, equal256(x), x==0)
-DEF_OP(div, b==0 ? (T)0 : a/b , 1, side==at_right && x==1, false)
-DEF_OP(div2, b==0 ? 0 : div2(a,b), 1, side==at_right && x==1, false)
-DEF_OP(vid, a==0 ? (T)0 : b/a , 1, side==at_left && x==1, false)
-DEF_OP(vid2, a==0 ? 0 : div2(b,a), 1, side==at_left && x==1, false)
-DEF_OPF(mod, b==0 ? 0 : mod(a,b), b==0 ? 0 : a-b*gf_floor(a/b), 0, false, side==at_left && x==0 || side==at_right && x==1)
-DEF_OPF(dom, a==0 ? 0 : mod(b,a), a==0 ? 0 : b-a*gf_floor(b/a), 0, false, side==at_left && x==0 || side==at_right && x==1)
-//DEF_OPF(rem, b==0 ? 0 : a%b, b==0 ? 0 : a-b*gf_trunc(a/b))
-//DEF_OPF(mer, a==0 ? 0 : b%a, a==0 ? 0 : b-a*gf_trunc(b/a))
-DEF_OP(rem, b==0?(T)0:a%b, 0, false, side==at_left&&x==0 || side==at_right&&x==1)
-DEF_OP(mer, a==0?(T)0:b%a, 0, false, side==at_left&&x==0 || side==at_right&&x==1)
-#endif
-#ifdef PASS2
-DEF_OP(gcd, gcd(a,b), 0, x==0, x==1)
-DEF_OP(gcd2, gcd2(a,b), 0, x==0, x==1) // should test those and pick one of the two
-DEF_OP(lcm, a==0 || b==0 ? (T)0 : lcm(a,b), 1, x==1, x==0)
-DEF_OPF(or , a|b, (float32)((int32)a | (int32)b), 0, x==0, x==nt_all_ones(&x))
-DEF_OPF(xor, a^b, (float32)((int32)a ^ (int32)b), 0, x==0, false)
-DEF_OPF(and, a&b, (float32)((int32)a & (int32)b), -1 /*nt_all_ones((T*)0)*/, x==nt_all_ones(&x), x==0)
-DEF_OPF(shl, a<<b, a*pow(2.0,+b), 0, side==at_right && x==0, false)
-DEF_OPF(shr, a>>b, a*pow(2.0,-b), 0, side==at_right && x==0, false)
-DEF_OP(sc_and, a ? b : a, 1, side==at_left && x!=0, side==at_left && x==0)
-DEF_OP(sc_or, a ? a : b, 0, side==at_left && x==0, side==at_left && x!=0)
-DEF_OP(min, min(a,b), nt_greatest((T*)0), x==nt_greatest(&x), x==nt_smallest(&x))
-DEF_OP(max, max(a,b), nt_smallest((T*)0), x==nt_smallest(&x), x==nt_greatest(&x))
-DEF_OP(cmp, cmp(a,b), 0, false, false)
-DEF_OP(eq, a == b, 0, false, false)
-DEF_OP(ne, a != b, 0, false, false)
-DEF_OP(gt, a > b, 0, false, side==at_left&&x==nt_smallest(&x)||side==at_right&&x==nt_greatest(&x))
-DEF_OP(le, a <= b, 0, false, side==at_left&&x==nt_smallest(&x)||side==at_right&&x==nt_greatest(&x))
-DEF_OP(lt, a < b, 0, false, side==at_left&&x==nt_greatest(&x)||side==at_right&&x==nt_smallest(&x))
-DEF_OP(ge, a >= b, 0, false, side==at_left&&x==nt_greatest(&x)||side==at_right&&x==nt_smallest(&x))
-#endif
-#ifdef PASS3
-DEF_OP(sin, (T)((float64)b * sin((float64)a * (M_PI / 18000))), 0, false, false) // "LN=9000+36000n RA=0 LA=..."
-DEF_OP(cos, (T)((float64)b * cos((float64)a * (M_PI / 18000))), 0, false, false) // "LN=36000n RA=0 LA=..."
-DEF_OP(atan, (T)(atan2(a,b) * (18000 / M_PI)), 0, false, false) // "LA=0"
-DEF_OP(tanh, (T)((float64)b * tanh((float64)a * (M_PI / 18000))), 0, false, x==0)
-DEF_OP(gamma, b<=0 ? (T)0 : (T)(0+floor(pow((float64)a/256.0,256.0/(float64)b)*256.0)), 0, false, false) // "RN=256"
-DEF_OP(pow, ipow(a,b), 0, false, false) // "RN=1"
-DEF_OP(log, (T)(a==0 ? (T)0 : (T)((float64)b * log((float64)gf_abs(a)))), 0, false, false) // "RA=0"
-// 0.8
-DEF_OPF(clipadd, clipadd(a,b), a+b, 0, x==0, false)
-DEF_OPF(clipsub, clipsub(a,b), a-b, 0, side==at_right && x==0, false)
-DEF_OP(abssub, gf_abs(a-b), 0, false, false)
-DEF_OP(sqsub, (a-b)*(a-b), 0, false, false)
-DEF_OP(avg, (a+b)/2, 0, false, false)
-DEF_OP(hypot, (T)(0+floor(sqrt(a*a+b*b))), 0, false, false)
-DEF_OP(sqrt, (T)(0+floor(sqrt(a))), 0, false, false)
-DEF_OP(rand, a==0 ? (T)0 : (T)(random()%(int32)a), 0, false, false)
-//DEF_OP(erf,"erf*", 0)
-#endif
-
-extern Numop op_table1[], op_table2[], op_table3[];
-extern const long op_table1_n, op_table2_n, op_table3_n;
-
-#ifdef PASS1
-Numop op_table1[] = {
- DECL_OP(ignore, "ignore", OP_ASSOC),
- DECL_OP(put, "put", OP_ASSOC),
- DECL_OP(add, "+", OP_ASSOC|OP_COMM), // "LINV=sub"
- DECL_OP(sub, "-", 0),
- DECL_OP(bus, "inv+", 0),
- DECL_OP(mul, "*", OP_ASSOC|OP_COMM),
- DECL_OP_NOFLOAT(mulshr8, "*>>8", OP_ASSOC|OP_COMM),
- DECL_OP(div, "/", 0),
- DECL_OP_NOFLOAT(div2, "div", 0),
- DECL_OP(vid, "inv*", 0),
- DECL_OP_NOFLOAT(vid2, "swapdiv", 0),
- DECL_OP_NOFLOAT(mod, "%", 0),
- DECL_OP_NOFLOAT(dom, "swap%", 0),
- DECL_OP_NOFLOAT(rem, "rem", 0),
- DECL_OP_NOFLOAT(mer, "swaprem", 0),
-};
-const long op_table1_n = COUNT(op_table1);
-#endif
-#ifdef PASS2
-Numop op_table2[] = {
- DECL_OP_NOFLOAT(gcd, "gcd", OP_ASSOC|OP_COMM),
- DECL_OP_NOFLOAT(gcd2, "gcd2", OP_ASSOC|OP_COMM),
- DECL_OP_NOFLOAT(lcm, "lcm", OP_ASSOC|OP_COMM),
- DECL_OP(or , "|", OP_ASSOC|OP_COMM),
- DECL_OP(xor, "^", OP_ASSOC|OP_COMM),
- DECL_OP(and, "&", OP_ASSOC|OP_COMM),
- DECL_OP_NOFOLD(shl, "<<", 0),
- DECL_OP_NOFOLD(shr, ">>", 0),
- DECL_OP_NOFOLD(sc_and,"&&", 0),
- DECL_OP_NOFOLD(sc_or, "||", 0),
- DECL_OP(min, "min", OP_ASSOC|OP_COMM),
- DECL_OP(max, "max", OP_ASSOC|OP_COMM),
- DECL_OP_NOFOLD(eq, "==", OP_COMM),
- DECL_OP_NOFOLD(ne, "!=", OP_COMM),
- DECL_OP_NOFOLD(gt, ">", 0),
- DECL_OP_NOFOLD(le, "<=", 0),
- DECL_OP_NOFOLD(lt, "<", 0),
- DECL_OP_NOFOLD(ge, ">=", 0),
- DECL_OP_NOFOLD(cmp, "cmp", 0),
-};
-const long op_table2_n = COUNT(op_table2);
-#endif
-#ifdef PASS3
-uint8 clipadd(uint8 a, uint8 b) { int32 c=a+b; return c<0?0:c>255?255:c; }
-int16 clipadd(int16 a, int16 b) { int32 c=a+b; return c<-0x8000?-0x8000:c>0x7fff?0x7fff:c; }
-int32 clipadd(int32 a, int32 b) { int64 c=a+b; return c<-0x80000000?-0x80000000:c>0x7fffffff?0x7fffffff:c; }
-int64 clipadd(int64 a, int64 b) { int64 c=(a>>1)+(b>>1)+(a&b&1), p=nt_smallest((int64 *)0), q=nt_greatest((int64 *)0);
- return c<p/2?p:c>q/2?q:a+b; }
-uint8 clipsub(uint8 a, uint8 b) { int32 c=a-b; return c<0?0:c>255?255:c; }
-int16 clipsub(int16 a, int16 b) { int32 c=a-b; return c<-0x8000?-0x8000:c>0x7fff?0x7fff:c; }
-int32 clipsub(int32 a, int32 b) { int64 c=a-b; return c<-0x80000000?-0x80000000:c>0x7fffffff?0x7fffffff:c; }
-int64 clipsub(int64 a, int64 b) { int64 c=(a>>1)-(b>>1); //???
- int64 p=nt_smallest((int64 *)0), q=nt_greatest((int64 *)0);
- return c<p/2?p:c>q/2?q:a-b; }
-
-ruby clipadd(ruby a, ruby b) { return a+b; }
-ruby clipsub(ruby a, ruby b) { return a-b; }
-
-Numop op_table3[] = {
- DECL_OP_NOFOLD(sin, "sin*", 0),
- DECL_OP_NOFOLD(cos, "cos*", 0),
- DECL_OP_NOFOLD(atan, "atan", 0),
- DECL_OP_NOFOLD(tanh, "tanh*", 0),
- DECL_OP_NOFOLD(gamma, "gamma", 0),
- DECL_OP_NOFOLD(pow, "**", 0),
- DECL_OP_NOFOLD(log, "log*", 0),
-// 0.8
- DECL_OP(clipadd,"clip+", OP_ASSOC|OP_COMM),
- DECL_OP(clipsub,"clip-", 0),
- DECL_OP_NOFOLD(abssub,"abs-", OP_COMM),
- DECL_OP_NOFOLD(sqsub,"sq-", OP_COMM),
- DECL_OP_NOFOLD(avg,"avg", OP_COMM),
- DECL_OP_NOFOLD(hypot,"hypot", OP_COMM),
- DECL_OP_NOFOLD(sqrt,"sqrt", 0),
- DECL_OP_NOFOLD(rand,"rand", 0),
- //DECL_OP_NOFOLD(erf,"erf*", 0),
-};
-const long op_table3_n = COUNT(op_table3);
-#endif
-
-// D=dictionary, A=table, A##_n=table count.
-#define INIT_TABLE(D,A) { D=IEVAL(mGridFlow,"@"#D" ||= {}"); \
- for(int i=0; i<A##_n; i++) { \
- A[i].sym = ID2SYM(rb_intern(A[i].name)); \
- rb_hash_aset(D,A[i].sym,PTR2FIX((A+i)));}}
-
-#ifdef PASS1
-Ruby op_dict = Qnil;
-Ruby number_type_dict = Qnil;
-void startup_number () {
- INIT_TABLE(op_dict,op_table1)
- INIT_TABLE(op_dict,op_table2)
- INIT_TABLE(op_dict,op_table3)
- INIT_TABLE(number_type_dict,number_type_table)
-
- for (int i=0; i<COUNT(number_type_table); i++) {
- number_type_table[i].index = (NumberTypeE) i;
- char a[64];
- strcpy(a,number_type_table[i].aliases);
- char *b = strchr(a,',');
- if (b) {
- *b=0;
- rb_hash_aset(number_type_dict, ID2SYM(rb_intern(b+1)),
- PTR2FIX(&number_type_table[i]));
- }
- rb_hash_aset(number_type_dict, ID2SYM(rb_intern(a)),
- PTR2FIX(&number_type_table[i]));
- }
-// S:name; M:mode; F:replacement function;
-#define OVERRIDE_INT(S,M,F) { \
- Numop *foo = FIX2PTR(Numop,rb_hash_aref(op_dict,SYM(S))); \
- foo->on_uint8.op_##M=F; \
- foo->on_int16.op_##M=F; \
- foo->on_int32.op_##M=F; }
- OVERRIDE_INT(ignore,map,quick_ign_map);
- OVERRIDE_INT(ignore,zip,quick_ign_zip);
- //OVERRIDE_INT(put,map,quick_put_map);
- //OVERRIDE_INT(put,zip,quick_put_zip);
- //OVERRIDE_INT(%,map,quick_mod_map); // !@#$ does that make an improvement at all?
-}
-#endif
diff --git a/externals/gridflow/base/source_filter.rb b/externals/gridflow/base/source_filter.rb
deleted file mode 100644
index c55f4d95..00000000
--- a/externals/gridflow/base/source_filter.rb
+++ /dev/null
@@ -1,276 +0,0 @@
-#!/usr/bin/env ruby
-
-$keywords = %w(class decl def end grdecl)
-$stack = []
-$classes = []
-
-ClassDecl = Struct.new(:name,:supername,:methods,:grins,:attrs,:info)
-MethodDecl = Struct.new(:rettype,:selector,:arglist,:minargs,:maxargs,:where,:static)
-Arg = Struct.new(:type,:name,:default)
-
-class MethodDecl
- def ==(o)
- return false unless rettype==o.rettype && static==o.static &&
- maxargs==o.maxargs # && minargs==o.minargs
- arglist.each_index{|i| arglist[i] == o.arglist[i] or return false }
- return true
- end
-end
-
-class Arg
- def ==(o)
- type==o.type && name==o.name # && default==o.default
- end
-end
-
-In = File.open ARGV[0], "r"
-Out = File.open ARGV[1], "w"
-
-def handle_class(line)
- raise "already in class #{where}" if $stack[-1] and ClassDecl===$stack[-1]
- #STDERR.puts "class: #{line}"
- /^(\w+)(?:\s*<\s*(\w+))?$/.match line or raise "syntax error #{where}"
- q=ClassDecl.new($1,$2,{},{},{},false)
- $stack << q
- $classes << q
- Out.puts ""
-end
-
-def parse_methoddecl(line,term)
- /^(static\s)?\s*(\w+)\s+(\w+)\s*\(([^\)]*)\)\s*#{term}/.match line or
- raise "syntax error #{where} #{line}"
- static,rettype,selector,arglist = $1,$2,$3,$4
- arglist,minargs,maxargs = parse_arglist arglist
- MethodDecl.new(rettype,selector,arglist,minargs,maxargs,where,static)
-end
-
-def parse_arglist(arglist)
- arglist = arglist.split(/,/)
- maxargs = arglist.length
- args = arglist.map {|arg|
- if /^\s*\.\.\.\s*$/.match arg then maxargs=-1; next end
- /^\s*([\w\s\*<>]+)\s*\b(\w+)\s*(?:\=(.*))?/.match arg or
- raise "syntax error in \"#{arg}\" #{where}"
- type,name,default=$1,$2,$3
- Arg.new(type.sub(/\s+$/,""),name,default)
- }.compact
- minargs = args.length
- minargs-=1 while minargs>0 and args[minargs-1].default
- [args,minargs,maxargs]
-end
-
-def unparse_arglist(arglist,with_default=true)
- arglist.map {|arg|
- x="#{arg.type} #{arg.name} "
- x<<'='<<arg.default if with_default and arg.default
- x
- }.join(", ")
-end
-
-def where
- "[#{ARGV[0]}:#{$linenumber}]"
-end
-
-def handle_attr(line)
- type = line.gsub(%r"//.*$","").gsub(%r"/\*.*\*/","").gsub(%r";?\s*$","")
- name = type.slice!(/\w+$/)
- raise "missing \\class #{where}" if
- not $stack[-1] or not ClassDecl===$stack[-1]
- $stack[-1].attrs[name]=Arg.new(type,name,nil)
- Out.print line.gsub(/\/\/.*$/,"") # hack!
- handle_decl "void _0_#{name}_m (#{type} #{name});"
-# Out.puts "# #{$linenumber}"
-end
-
-def handle_decl(line)
- raise "missing \\class #{where}" if
- not $stack[-1] or not ClassDecl===$stack[-1]
- classname = $stack[-1].name
- m = parse_methoddecl(line,";\s*$")
- $stack[-1].methods[m.selector] = m
-
- Out.print "static " if m.static
- Out.print "#{m.rettype} #{m.selector}(int argc, Ruby *argv"
- Out.print "," if m.arglist.length>0
- Out.print "#{unparse_arglist m.arglist});"
- Out.puts "static Ruby #{m.selector}_wrap"+
- "(int argc, Ruby *argv, Ruby rself);//FCS"
-# Out.puts "# #{$linenumber}"
-end
-
-def handle_def(line)
- m = parse_methoddecl(line,"\\{?.*$")
- term = line[/\{.*/]
- qlass = $stack[-1]
- raise "missing \\class #{where}" if not qlass or not ClassDecl===qlass
- classname = qlass.name
- if qlass.methods[m.selector]
- n = m; m = qlass.methods[m.selector]
- if m!=n then
- STDERR.puts "warning: def does not match decl:"
- STDERR.puts "#{m.where}: \\decl #{m.inspect}"
- STDERR.puts "#{n.where}: \\def #{n.inspect}"
- end
- else
- qlass.methods[m.selector] = m
- end
-
- Out.print "Ruby #{classname}::#{m.selector}_wrap"+
- "(int argc, Ruby *argv, Ruby rself) {"+
- "static const char *methodspec = "+
- "\"#{qlass.name}::#{m.selector}(#{unparse_arglist m.arglist,false})\";"+
- "DGS(#{classname});"
-
- Out.print "if (argc<#{m.minargs}"
- Out.print "||argc>#{m.maxargs}" if m.maxargs!=-1
- Out.print ") RAISE(\"got %d args instead of %d..%d in %s\""+
- ",argc,#{m.minargs},#{m.maxargs},methodspec);"
-
- error = proc {|x,y|
- "RAISE(\"got %s instead of #{x} in %s\","+
- "rb_str_ptr(rb_inspect(rb_obj_class(#{y}))),methodspec)"
- }
-
- m.arglist.each_with_index{|arg,i|
- case arg.type
- when "Symbol"
- Out.print "if (argc>#{i} && TYPE(argv[#{i}])!=T_SYMBOL) "+
- error[arg.type,"argv[#{i}]"]+";"
- when "Array"
- Out.print "if (argc>#{i} && TYPE(argv[#{i}])!=T_ARRAY) "+
- error[arg.type,"argv[#{i}]"]+";"
- when "String"
- Out.print "if (argc>#{i} && TYPE(argv[#{i}])==T_SYMBOL) "+
- "argv[#{i}]=rb_funcall(argv[#{i}],SI(to_s),0);"
- Out.print "if (argc>#{i} && TYPE(argv[#{i}])!=T_STRING) "+
- error[arg.type,"argv[#{i}]"]+";"
- end
- }
-
-# Out.print "return " if m.rettype!="void"
- Out.print "VALUE foo = " if m.rettype!="void" ###
-
- Out.print " self->#{m.selector}(argc,argv"
- m.arglist.each_with_index{|arg,i|
- if arg.default then
- Out.print ",argc<#{i+1}?#{arg.default}:convert(argv[#{i}],(#{arg.type}*)0)"
- else
- Out.print ",convert(argv[#{i}],(#{arg.type}*)0)"
- end
- }
- Out.print ");"
- Out.print "self->check_magic();"
- Out.print "return Qnil;" if m.rettype=="void"
- Out.print "return foo;" if m.rettype!="void" ###
- Out.print "} #{m.rettype} #{classname}::#{m.selector}(int argc, Ruby *argv"
- Out.print "," if m.arglist.length>0
- Out.puts "#{unparse_arglist m.arglist, false})#{term}//FCS"
-end
-
-def handle_classinfo(line)
- frame = $stack[-1]
- cl = frame.name
- line="{}" if /^\s*$/ =~ line
- Out.puts "static void #{cl}_startup (Ruby rself);"
- Out.puts "static void *#{cl}_allocator () {return new #{cl};}"
- Out.puts "static MethodDecl #{cl}_methods[] = {"
- Out.puts frame.methods.map {|foo,method|
- c,s = frame.name,method.selector
- "{ \"#{s}\",(RMethod)#{c}::#{s}_wrap }"
- }.join(",")
- Out.puts "}; static FClass ci#{cl} = { #{cl}_allocator, #{cl}_startup,"
- Out.puts "#{cl.inspect}, COUNT(#{cl}_methods), #{cl}_methods };"
- Out.puts "void #{frame.name}_startup (Ruby rself) "+line
-end
-
-def handle_grin(line)
- fields = line.split(/\s+/)
- i = fields[0].to_i
- c = $stack[-1].name
- Out.print "template <class T> void grin_#{i}(GridInlet *in, int n, Pt<T> data);"
- Out.print "template <class T> static void grinw_#{i} (GridInlet *in, int n, Pt<T> data);"
- Out.print "static GridHandler grid_#{i}_hand;"
- handle_decl "Ruby _#{i}_grid(...);"
- $stack[-1].grins[i] = fields.dup
-end
-
-def handle_end(line)
- frame = $stack.pop
- fields = line.split(/\s+/)
- n = fields.length
- if ClassDecl===frame then
- #handle_classinfo if not frame.info
- cl = frame.name
- if fields[0]!="class" or
- (n>1 and fields[1]!=cl)
- then raise "end not matching #{where}" end
- $stack.push frame
- frame.attrs.each {|name,attr|
- type,name,default = attr.to_a
- #STDERR.puts "type=#{type} name=#{name} default=#{default}"
- handle_def "void _0_#{name}_m (#{type} #{name}) { this->#{name}=#{name}; }"
- }
- frame.grins.each {|i,v|
- k = case v[1]
- when nil; '4'
- when 'int32'; '1'
- when 'int'; '2'
- when 'float'; 'F'
- else raise 'BORK BORK BORK' end
- Out.print "static GridHandler #{cl}_grid_#{i}_hand = GRIN#{k}(#{cl},#{i});"
- handle_def "Ruby _#{i}_grid(...) {"+
- "if (in.size()<=#{i}) in.resize(#{i}+1);"+
- "if (!in[#{i}]) in[#{i}]=new GridInlet((GridObject *)this,&#{cl}_grid_#{i}_hand);"+
- "return in[#{i}]->begin(argc,argv);}"
-
- }
- $stack.pop
- Out.puts "# #{$linenumber}"
- end
- if :ruby==frame then
- if fields[0]!="ruby" then raise "expected \\end ruby" end
- end
- Out.puts ""
-end
-
-def handle_startall(line)
- $classes.each {|q|
- Out.print "rb_funcall(EVAL(\"GridFlow\"),SI(fclass_install),2,PTR2FIX(&ci#{q.name}),"
- if q.supername then
- Out.print "EVAL(\"GridFlow::#{q.supername}\"));"
- else
- Out.print "Qnil);"
- end
- }
- Out.puts ""
-end
-
-def handle_ruby(line)
- Out.puts ""
- $stack.push :ruby
-end
-
-$rubymode=false
-$linenumber=1
-loop{
- x = In.gets
- break if not x
- if /^\s*\\(\w+)\s*(.*)$/.match x then
- begin
- send("handle_#{$1}",$2)
- rescue StandardError => e
- STDERR.puts e.inspect
- STDERR.puts "at line #{$linenumber}"
- STDERR.puts e.backtrace
- File.unlink ARGV[1]
- exit 1
- end
- else
- if $stack[-1]==:ruby then
- x.gsub!(/([\\\"])/) { "\\"+$1 }
- x="\"#{x.chomp}\\n\"\n"
- end
- Out.puts x
- end
- $linenumber+=1
-}
diff --git a/externals/gridflow/base/test.rb b/externals/gridflow/base/test.rb
deleted file mode 100644
index 86c17af3..00000000
--- a/externals/gridflow/base/test.rb
+++ /dev/null
@@ -1,1074 +0,0 @@
-# $Id: test.rb,v 1.2 2006-03-15 04:37:28 matju Exp $
-
-$:.delete_if {|x| x=='.' }
-require "gridflow"
-
-include GridFlow
-GridFlow.verbose=true
-
-$imdir = "./images"
-$animdir = "./images/movies"
-srand Time.new.to_i
-$port = 4200+rand(100)
-
-def pressakey; puts "press return to continue."; readline; end
-
-FO = FObject # shortcut
-
-class Expect < FO
- def praise(*a)
- #raise(*a)
- puts a
- end
- def expect(*v)
- @count=0
- @v=v
- @expecting=true
- yield
- @expecting=false
- praise "wrong number of messages (#{@count}), expecting #{@v.inspect}" if @count!=@v.length
- end
- def _0_list(*l)
- return if not @expecting
- praise "wrong number of messages (#{@count})" if @count==@v.length
- praise "got #{l.inspect} expecting #{@v.inspect}" if @v[@count]!=l
- @count+=1
- end
- def method_missing(s,*a)
- praise "stray message: #{s}: #{a.inspect}"
- end
- install "expect", 1, 0
-end
-
-def cast value, type
- case type
- when :b, :u8,:uint8; value & 0xff
- when :s,:i16,:int16; (value & 0x7fff) - (value & 0x8000)
- when :i,:i32,:int32; value
- when :l,:i64,:int64; value
- when :f,:f32,:float32; value.to_f
- when :d,:f64,:float64; value.to_f
- when :r,:ruby; value
- else raise "hell"
- end
-end
-
-def test_bitpacking
- #!@#$ WRITE ME
-end
-
-def test_numops
- #!@#$ WRITE ME
-end
-
-#def tnt() for nt in [:b,:s,:i,:l,:f,:d,:r] do yield end end
-def _(o,s,i,d) o.connect(s,i,d) end
-def chain(*a)
- (a.length-1).times {|i| a[i].connect 0,a[i+1],a }
- a[-1]
-end
-
-def test_math
-for nt in [:b,:s,:i,:l,:f,:d,:r] do
- hm = "#".intern
- #GridFlow.verbose = false
-
- (e=FO["#export_list"])
- (x=Expect.new)
- _ e,0,x,0
-
- x.expect([1,2,3,11,12,13,21,22,23]) {
- e.send_in 0, 3,3,nt,hm,1,2,3,11,12,13,21,22,23 }
-
- (a=FO["fork"])
- (b=FO["@ +"])
- _ a,0,b,0
- _ a,1,b,1
- _ b,0,e,0
- x.expect([4]) { a.send_in 0, 2 }
-
- x.expect([2,3,5,7]) { e.send_in 0,:list,nt,2,3,5,7 }
- a = FO["#fold + , seed {#{nt} # 0}"]
- _ a,0,e,0
- x.expect([cast(420000,nt)]) { a.send_in 0,"10000 #{nt} # 42" }
-
- a = FO["# + {#{nt} 0 10}"]
- _ a,0,e,0
- x.expect([1,12,4,18,16,42,64]) {
- a.send_in 0,:list,nt, 1,2,4,8,16,32,64 }
-
- a = FO["# + {#{nt} 2 3 5}"]
- b = FO["#fold + , seed {#{nt} # 0}"]
- _ a,0,b,0
- _ b,0,e,0
- x.expect([cast(45332,nt)]) { a.send_in 0, 1000,nt,hm,42 }
-
- a = FO["@ + {#{nt} # 42}"]
- _ a,0,e,0
- x.expect((43..169).to_a) {
- a.send_in 0,:list,nt, *(1..127).to_a }
-
- x.expect([3,5,9,15]) {
- a.send_in 1,:list,4,nt,hm, 2,3,5,7
- a.send_in 0,:list,4,nt,hm, 1,2,4,8 }
- x.expect([11,12,14,18]) {
- a.send_in 1, "list #{nt} # 10"
- a.send_in 0,:list,nt, 1,2,4,8 }
-
-if nt!=:b and nt!=:f and nt!=:d
- a=FO["# / {#{nt} # 3}" ]; _ a,0,e,0; x.expect([-2,-1,-1,-1,0,0,0,0,0,1,1,1,2]) { a.send_in(0,:list,nt, *(-6..6).to_a) }
- a=FO["# div {#{nt} # 3}"]; _ a,0,e,0; x.expect([-2,-2,-2,-1,-1,-1,0,0,0,1,1,1,2]) { a.send_in(0, :list, nt, *(-6..6).to_a) }
-end
-
- (a = FO["# ignore {#{nt} # 42}"]).connect 0,e,0
- x.expect((42..52).to_a) { a.send_in(0, :list, nt, *(42..52).to_a) }
-
- (a = FO["# put {#{nt} # 42}"]).connect 0,e,0
- x.expect([42]*13) { a.send_in(0, :list, nt, *(-6..6).to_a) }
-
-if nt!=:b
- (a = FO["# abs-"]).connect 0,e,0
- x.expect([2,3,5,7]) {
- a.send_in 0,:list,nt, -2,3,-5,7 }
-end
-
- (a = FO["#fold *, seed {#{nt} # 1}"]).connect 0,e,0
- x.expect([210]) { a.send_in 0,:list,nt, 2,3,5,7 }
- x.expect([128]) { a.send_in 0,:list,nt, 1,1,2,1,2,2,2,1,1,2,1,2,2 }
-
- (a = FO["#fold +, seed {#{nt} 0 0}"]).connect 0,e,0
- x.expect([18,23]) { a.send_in 0, 3,2,nt,hm,2,3,5,7,11,13 }
-
- (a = FO["#scan +, seed {#{nt} 0 0}"]).connect 0,e,0
- x.expect([2,3,7,10,18,23]) { a.send_in 0, 3,2,nt,hm,2,3,5,7,11,13 }
-
- (a = FO["#scan *, seed {#{nt} # 1}"]).connect 0,e,0
- x.expect([2,6,30,210]) { a.send_in 0,:list,nt, 2,3,5,7 }
- x.expect([1,1,2,2,4,8,16,16,16,32,32,64,128]) {
- a.send_in 0,:list,nt, 1,1,2,1,2,2,2,1,1,2,1,2,2 }
-
- (a = FO["#scan +, seed {#{nt} 0 0 0}"]).connect 0,e,0
- x.expect([1,2,3,5,7,9,12,15,18]) {
- a.send_in 0,:list,3,3,nt,hm,*(1..9).to_a }
-
- (a = FO["#scan +, seed {#{nt} # 0}"]).connect 0,e,0
- x.expect([1,3,6, 4,9,15, 7,15,24]) {
- a.send_in 0,:list,3,3,nt,hm,*(1..9).to_a }
-
- (a = FO["#outer +"]).connect 0,e,0
- x.expect([9,10,12,17,18,20,33,34,36]) {
- a.send_in 1,:list,nt, 1,2,4
- a.send_in 0,:list,nt, 8,16,32 }
-
- x.expect((0...100).to_a) {
- a.send_in 1,(0...10).to_a
- a.send_in 0,(0...10).map{|i| 10*i }}
-
-if nt!=:b and nt!=:f and nt!=:d
- (a = FO["#outer",:%,[nt,3,-3]]).connect 0,e,0
- x.expect([0,0,1,-2,2,-1,0,0,1,-2,2,-1,0,0]) {
- a.send_in 0,:list,nt, -30,-20,-10,0,+10,+20,+30 }
-
- (a = FO["#outer","swap%".intern,[nt,3,-3]]).connect 0,e,0
- x.expect([-27,-3,-17,-3,-7,-3,0,0,3,7,3,17,3,27]) {
- a.send_in 0,:list,nt, -30,-20,-10,0,+10,+20,+30 }
-end
-
- (a = FO["#import {3}"]).connect 0,e,0; x.expect([2,3,5]) { [2,3,5].each {|v| a.send_in 0,:list,nt,hm,v }}
- (a = FO["#import {3}"]).connect 0,e,0; x.expect([2,3,5]) { [2,3,5].each {|v| a.send_in 0,:list,nt,v }}
- (a = FO["#redim {5}"]).connect 0,e,0; x.expect([2,3,5,2,3]) { a.send_in 0,:list,2,3,5 }
- (a = FO["#redim {5}"]).connect 0,e,0; x.expect([0,0,0,0,0]) { a.send_in 0,:list }
- (a = FO["#redim {0}"]).connect 0,e,0; x.expect([]) { a.send_in 0,:list,42,37,69 }
-
- (a = FO["#inner {2 2 #{nt} # 2 3 5 7}, seed {#{nt} # 0}"]).connect 0,e,0
- (i0 = FO["@redim {2 2}"]).connect 0,a,0
- x.expect([12,17,48,68]) { i0.send_in 0,:list,nt, 1,2,4,8 }
-
- (a = FO["#outer * {3 2 #{nt} # 1 2 3}"]).connect 0,e,0
- b = FO["#dim"]
- c = FO["#export_list"]
- a.connect 0,b,0
- y = Expect.new
- b.connect 0,c,0
- c.connect 0,y,0
-
- y.expect([2,3,2]) {
- x.expect([1,2,3,1,2,3,10,20,30,10,20,30]) {
- a.send_in 0,:list,nt, 1, 10 }}
-
- #pr=GridPrint.new
- (b = FO["#redim {5 5}"]).connect 0,e,0
- (a = FO["#convolve, seed {#{nt} # 0}"]).connect 0,b,0
- (i0 = FO["#redim {5 5 1}"]).connect 0,a,0
- (i1 = FO["#redim {3 1}"]).connect 0,a,1
- i1.send_in 1, 3,3
- x.expect([5,6,5,4,4,4,6,7,6,4,3,3,6,7,5,4,2,3,6,6,5,4,3,4,5]) {
- a.send_in 1,:list,3,3,nt,hm, 1,1,1,1,1,1,1,1,1
- i0.send_in 0,:list,nt, 1,1,1,0,0,0 }
-
- (a = FO["#convolve, seed {#{nt} # 0}"]).connect 0,e,0
- x.expect([1,3,6,4,0]) {
- a.send_in 1, 1,2,nt,hm, 1,1
- a.send_in 0, 1,5,nt,hm, 0,1,2,4,0 }
-
- (a = FO["#import {4}"]).connect 0,e,0
- x.expect([2,3,5,7]) {
- [2,3,5,7].each {|v| a.send_in 0,v }}
- x.expect([1,2,3],[4,5,6],[7,8,9]) {
- a.send_in 1, :list, 3
- a.send_in 0, :list, *(1..9).to_a}
-
- for o in ["#store"]
- (a = FO[o]).connect 0,e,0
- a.send_in 1, 5, 4, nt, hm, 1,2,3,4,5
- x.expect([1,2,3,4,4,5,1,2,2,3,4,5]) {
- a.send_in 0, 3,1, hm, 0,2,4 }
- x.expect([1,2,3,4,5]*24) { a.send_in 0, 2,3,0,hm }
- x.expect([1,2,3,4,5]*4) { a.send_in 0, 0,hm }
- x.expect([1,2,3,4,5]*4) { a.send_in 0 }
- x.expect([1,2,3,4]) { a.send_in 0,[0] }
- a.send_in 1,:put_at,[0,0]
- a.send_in 1,2,2,nt,hm,6,7,8,9
- x.expect([6,7,3,4, 8,9,2,3, 4,5,1,2, 3,4,5,1, 2,3,4,5]) { a.send_in 0 }
- x.expect([6,7,3,4]) { a.send_in 0,[0] }
- x.expect([8,9,2,3]) { a.send_in 0,[1] }
- a.send_in 1,:put_at,[1,1]
- a.send_in 1,2,2,nt,hm,11,13,17,19
- x.expect([6,7,3,4, 8,11,13,3, 4,17,19,2, 3,4,5,1, 2,3,4,5]) { a.send_in 0 }
- end
-
- b = FO["#dim"]
- c = FO["#export_list"]
- a.connect 0,b,0
- y = Expect.new
- b.connect 0,c,0
- c.connect 0,y,0
-
-if nt!=:b and nt!=:f and nt!=:d and nt!=:l
- (a = FO["#for {#{nt} # 0} {#{nt} # 10} {#{nt} # 1}"]).connect 0,e,0
- a.connect 0,b,0
- y.expect([10]) {
- x.expect((0...10).to_a) {
- a.send_in 0 } }
-
- (a = FO["#for {#{nt} # 0} {#{nt} # -10} {#{nt} # 1}"]).connect 0,e,0
- a.connect 0,b,0
- y.expect([0]) { x.expect([]) { a.send_in 0 } }
-
- (a = FO["#for {#{nt} # 0} {#{nt} # -10} {#{nt} # -1}"]).connect 0,e,0
- a.connect 0,b,0
- y.expect([10]) { x.expect([0,-1,-2,-3,-4,-5,-6,-7,-8,-9]) { a.send_in 0 } }
-
- (a = FO["#for {#{nt} 0} {#{nt} 10} {#{nt} 1}"]).connect 0,e,0
- a.connect 0,b,0
- y.expect([10,1]) {
- x.expect((0...10).to_a) {
- a.send_in 0 } }
-
- (a = FO["#for {#{nt} 2 3} {#{nt} 5 7} {#{nt} 1 1}"]).connect 0,e,0
- a.connect 0,b,0
- y.expect([3,4,2]) {
- x.expect([2,3,2,4,2,5,2,6,3,3,3,4,3,5,3,6,4,3,4,4,4,5,4,6]) {
- a.send_in 0 } }
-end
-
- (a = FO["@complex_sq"]).connect 0,e,0
- x.expect([8,0]) { a.send_in 0, 2, 2 }
- x.expect([0,9]) { a.send_in 0, 0, 3 }
-
- (a = FO["#rotate 3000 {1 2 5}"]).connect 0,e,0
- a.send_in 0, "5 5 # 1000 0 0 0 0 0"
-
-#if nt==:f or nt==:d
-# (a = FO["@matrix_solve"]).connect 0,e,0
-# x.expect([1,0,0,0,1,0,0,0,1]) { a.send_in 0, 3, 3, nt, hm, 1,0,0,0,1,0,0,0,1 }
-#end
- GridFlow.gfpost "ending test for #{nt}"
-end # for nt
-
- (a = FO["#pack 2"]).connect 0,e,0
- x.expect([42,0]) { a.send_in 0,42 }
- x.expect([42,28]) { a.send_in 1,28 }
- x.expect([1313,28]) { a.send_in 0,1313 }
-
- (a = FO["#pack 3"]).connect 0,e,0
- x.expect([42,0,0]) { a.send_in 0,42 }
- x.expect([42,28,0]) { a.send_in 1,28 }
- x.expect([42,28,-1]) { a.send_in 2,-1 }
-
- (a = FO["#pack 4"]).connect 0,e,0
- x.expect([42,0,0,0]) { a.send_in 0,42 }
- x.expect([42,0,0,-42]) { a.send_in 3,-42 }
-
- (a = FO["#pack 5"]).connect 0,e,0
- x.expect([3.5,0,0,0]) { a.send_in 0,3.5 }
- x.expect([3.5,0,0,-3.5]) { a.send_in 3,-3.5 }
-
- e = FO["#export_list"]
- e.connect 0,x,0
-
- a = FO["#import per_message"]
- a.connect 0,e,0
- x.expect([1,2,3]) { a.send_in 0,1,2,3 }
- x.expect([102,111,111]) { a.send_in 0,:symbol,:foo }
- x.expect([ 70, 79, 79]) { a.send_in 0,:symbol,:FOO }
-
- a = FO["@join 1"]
- a.connect 0,e,0
- a.send_in 1,2,2,nt,hm,11,13,17,19
- x.expect([2,3,11,13,5,7,17,19]) { a.send_in 0,2,2,nt,hm,2,3,5,7 }
-
-if nt!=:d
- a.send_in 1, 5,1,nt,hm,42
- y.expect([5,4]) {
- x.expect([2,3,5,42,7,11,13,42,17,19,23,42,29,31,37,42,41,43,47,42]) {
- a.send_in 0, 5,3,nt,hm,2,3,5,7,11,13,17,19,23,29,31,37,41,43,47 }}
-end
- a = FO["@join 0"]
- a.connect 0,e,0
- a.send_in 1,2,2,nt,hm,11,13,17,19
- x.expect([2,3,5,7,11,13,17,19]) { a.send_in 0,2,2,nt,hm,2,3,5,7 }
-
- a = FO["@join 0 {2 2 2 #{nt} # 1 2 3}"]
- a.connect 0,e,0
- a.connect 0,b,0
- y.expect([2,2,2]) { x.expect([1,2,3,1,2,3,1,2]) { a.send_in 0,0,2,2,nt,hm }}
-
- a = FO["#ravel"]
- b = FO["#dim"]
- be = FO["#export_list"]
- bx = Expect.new
- a.connect 0,e,0
- a.connect 0,b,0
- b.connect 0,be,0
- be.connect 0,bx,0
- bx.expect([9]) {
- x.expect([1,2,3,2,4,6,3,6,9]) {
- o = FO["#outer *"]
- o.connect 0,a,0
- o.send_in 1,1,2,3
- o.send_in 0,1,2,3
- }
- }
-
- a = FO["#grade"]
- a.connect 0,e,0
- x.expect([0,2,4,6,8,9,7,5,3,1]) { a.send_in 0, 0,9,1,8,2,7,3,6,4,5 }
- x.expect([0,9,1,8,2,7,3,6,4,5]) { a.send_in 0, 0,2,4,6,8,9,7,5,3,1 }
- x.expect([7,6,5,4,3,2,1,0]) { a.send_in 0, 7,6,5,4,3,2,1,0 }
-
- a = FO["#grade"]
- b = FO["#fold +"]
- a.connect 0,b,0
- b.connect 0,e,0
- x.expect([100*99/2]) { a.send_in 0, (0...100).map { (rand*0x10000).to_i }}
- x.expect([100*99/2]) { a.send_in 0, (0...100).map { (rand*0x10).to_i }}
- x.expect([100*99/2]) { a.send_in 0, (0...100).map { 0 }}
-
- a = FO["#perspective"]
- a.connect 0,e,0
- c = []
- 8.times {|v|
- 3.times {|i|
- c << (v[i] * 1000 - 500) + (if i==2 then 2000 else 0 end)
- }
- }
- x.expect([
- -85,-85,85,-85,-85,85,85,85,
- -51,-51,51,-51,-51,51,51,51]) {
- a.send_in 0, 8,3,hm,*c }
-
-# regressiontests for past bugs
- a = FO["#inner"] # that's it.
-end
-
-def test_rtmetro
- rt = FO["rtmetro 1000"]
- pr = FO["rubyprint"]
- rt.connect 0,pr,0
- GridFlow.post "trying to start the rtmetro"
- rt.send_in 0,1
- $mainloop.timers.after(10.0) {
- GridFlow.post "trying to stop the rtmetro (after 10 sec delay)"
- rt.send_in 0,0
- }
- $mainloop.loop
-end
-
-def test_print
- i = FO["#redim {3}"]
- pr = FO["#print"]
-# pr = GridFlow::RubyPrint.new
- i.connect 0,pr,0
- i.send_in 0, 85, 170, 255
- i.send_in 1, 3, 3
- i.send_in 0, 1, 0, 0, 0
- i.send_in 1, 2, 2, 2
- i.send_in 0, 2, 3, 5, 7, 11, 13, 17, 19
-end
-
-class Barf < GridObject
- def _0_rgrid_begin
- raise "barf"
- end
- install_rgrid 0
- install "barf", 1, 0
-end
-
-def test_nonsense
-# (a = FO["@! abs"]).connect 0,e,0
-# x.expect_error {
-# a.send_in 1, 42,42 }
-
- a = FO["#import {3}"]
- b = Barf.new
- a.connect 0,b,0
- begin
- a.send_in 0, 1, 2, 3
- rescue StandardError
- nil
- else
- raise "Expected StandardError"
- end
- p b.inlet_dim(0)
-end
-
-def test_store
- a = FO["#in file #{$imdir}/teapot.png"]
- b = FO["#store"]
- c = FO["#out x11"]
- a.connect 0,b,1
- a.send_in 0,"cast uint8"
- a.send_in 0
- b.connect 0,c,0
- d = FO["#for {0 0} {256 256} {1 1}"]
- e = FO["# ^ 85"]
- d.connect 0,e,0
- e.connect 0,b,0
- f = FO["fps detailed"]
- c.connect 0,f,0
- pr = FO["rubyprint"]
- f.connect 0,pr,0
- GridFlow.verbose = false
- 256.times {|t|
- e.send_in 1,t
- d.send_in 0
- }
-end
-
-# generates recursive checkerboard pattern (munchies) in bluish colours.
-class Munchies < FPatcher
- @FOs = ["fork","fork","#for 0 64 1","#for 0 64 1","#for 2 5 1",
- "#outer ^","#outer *"]
- @wires = [-1,0,0,0, 0,0,1,0, 1,1,4,0, 4,0,6,1,
- 1,0,3,0, 3,0,5,1, 0,0,2,0, 2,0,5,0, 5,0,6,0, 6,0,-1,0 ]
- def initialize() super end
- install "munchies",1,1
-end
-
-def test_munchies
- m=Munchies.new
- gout = FO["#out window"]
- m.connect 0,gout,0
- m.send_in 0
- $mainloop.loop
-end
-
-def test_image command
- gin = FO["#in"]
- gout = FO["#out window"]
- gin.connect 0,gout,0
-# 31.times {
- 3.times {
- gin.send_in 0,"open #{command}"
- gout.send_in 0,"timelog 1"
- gin.send_in 0
- }
- FO["#global"].send_in 0, "profiler_dump"
- $mainloop.loop
-end
-
-def test_ppm2
- gin = FO["#in"]
- store = FO["#store"]
- pa = FO["#convolve << + 0"]
- pb = FO["# / 9"]
- ra = FO["#redim {3 3}"]
- gout = FO["#out window"]
- gin.connect 0,store,1
- store.connect 0,pa,0
- pa.connect 0,pb,0
- pb.connect 0,gout,0
- ra.connect 0,pa,1
- ra.send_in 0,"0 0"
- gout.send_in 0,"timelog 1"
- gin.send_in 0,"open file #{$imdir}/teapot.png"
-# gin.send_in 0,"open file #{$imdir}/g001.jpg"
- gin.send_in 0
-# 40.times { store.send_in 0 }
- loop { store.send_in 0 }
- v4j = FO["#global"]
- v4j.send_in 0,"profiler_dump"
-# $mainloop.loop
-end
-
-def test_foo
- foo = FO["#for {0 0} {64 64} {1 1}"]
- che = FO["#checkers"]
- sca = FO["#scale_by {5 3}"]
- out = FO["#out window"]
- foo.connect 0,che,0
- che.connect 0,sca,0
- sca.connect 0,out,0
- foo.send_in 0
- $mainloop.loop
-end
-
-def test_anim(*msgs)
- GridFlow.verbose = false
- gin = FO["#in"]
- gout1 = FO["#out window"]
- #gout1 = FO["@out quicktime file test.mov"]
- #gout1.send_in 0, :codec, :jpeg
- fps = FO["fps detailed"]
- rpr = FO["rubyprint"]
- gout1.connect 0,fps,0
- #fps.connect 0,rpr,0
-=begin
- gout1 = FO["#downscale_by {3 2}"]
- gout2 = FO["#rgb_to_greyscale"]
- gout3 = FO["#out aalib X11 -height 60 -width 132"]
- gout1.connect 0,gout2,0
- gout2.connect 0,gout3,0
-=end
-
- rpr = FO["rubyprint"]
-# gin.connect 1,rpr,0
-
- gin.connect 0,gout1,0
-=begin
- layer=FO["@layer"]
- gin.connect 0,layer,0
- layer.connect 0,gout1,0
- check=FO["@checkers"]
- phor=FO["@for {0 0} {256 256} {1 1}"]
- phor.connect 0,check,0
- check.connect 0,layer,1
- phor.send_in 0
-=end
-
-# scale = FO["@scale_by 3"]
-# gin.connect 0,scale,0
-# scale.connect 0,gout1,0
-
-# pr = FO["rubyprint time"]; gout.connect 0,pr,0
- msgs.each {|m| gin.send_in 0,m }
- gin.send_in 0, "cast uint8"
-# gout.send_in 0,"timelog 1"
- d=Time.new
- frames=2000
- frames.times {|n|
- #GridFlow.post "%d", n
- gin.send_in 0
- #gin.send_in 0, rand(1000)
- }
-# loop { gin.send_in 0 }
-# metro = FO["rtmetro 80"]
-# metro.connect 0,gin,0
-# metro.send_in 0,1
-# $mainloop.loop
-
- d=Time.new-d
- printf "%d frames in %.6f seconds (avg %.6f ms, %.6f fps)\n",
- frames, d, 1000*d/frames, frames/d
-# global.send_in 0,"dfgdfgdkfjgl"
- gout1.send_in 0, :close
- global = FO["@global"]
- global.send_in 0,"profiler_dump"
-end
-
-class TestTCP < FO
- attr_accessor :idle
- def initialize
- @idle = true
- end
- def _0_bang
- # GridFlow.gfpost "tick"
- # avoid recursion
- $mainloop.timers.after(0) {
- ($in_client.send_in 0; @idle=false) if @idle
- }
- end
- install "tcptest",1,1
-end
-
-def test_tcp
- if fork
- # client (is receiving)
- GridFlow.post_header = "[client] "
- $in_client = in1 = FO["@in"]
- out = FO["@out x11"]
- in1.connect 0,out,0
- out.send_in 0,"timelog 1"
- out.send_in 0,"autodraw 2"
- GridFlow.post "test: waiting 1 second"
- sleep 1
- p "HI"
- #in1.send_in 0,"open grid tcp localhost #{$port}"
- in1.send_in 0,"open grid tcp 127.0.0.1 #{$port}"
- p "HI"
-
- test_tcp = TestTCP.new
-
- out.connect 0,test_tcp,0
- test_tcp.connect 0,in1,0
-
- GridFlow.post "entering mainloop..."
- $mainloop.loop
- else
- # server (is sending)
- GridFlow.post_header = "[server] "
- $in1_server = in1 = FO["@in"]
- $in2_server = in2 = FO["@in"]
- $out = out = FO["@out"]
- toggle = 0
- in1.connect 0,out,0
- in2.connect 0,out,0
- in1.send_in 0,"open #{$imdir}/r001.jpg"
- in2.send_in 0,"open #{$imdir}/b001.jpg"
- out.send_in 0,"open grid tcpserver #{$port}"
- out.send_in 0,"type uint8"
- test_tcp = GridFlow::FO.new
- def test_tcp._0_bang
- # GridFlow.post "tick"
- @toggle ||= 0
- # avoid recursion
- $mainloop.timers.after(0.01) {
- if $out.format.stream
- if @toggle==0; $in1_server else $in2_server end.send_in 0
- @toggle ^= 1
- end
- _0_bang
- }
- end
- out.connect 0,test_tcp,0
- test_tcp.send_in 0
- GridFlow.post "entering mainloop..."
- $mainloop.loop
- end
-end
-
-def test_layer
-
- gin = FO["@in png file ShaunaKennedy/atmosphere-bleu.png"]
-# gin1 = FO["@in file #{$imdir}/r001.jpg"]
-# gin = FO["@join 2 {240 320 1 # 128}"]
-# gin1.connect 0,gin,0
-
-# gfor = FO["@for {0 0} {120 160} {1 1}"]
-# gfor = FO["@for {0 0} {240 320} {1 1}"]
- gfor = FO["@for {0 0} {480 640} {1 1}"]
- gche = FO["@checkers"]
-
- gove = FO["@layer"]
-# gove = FO["@fold + {0 0 0 0}"]
-# gout = FO["@print"]
-# gove = FO["@inner2 * + 0 {3 4 # 1 0 0 0 0}"]
-# gout = FO["@out sdl"]
- gout = FO["@out x11"]
-
- gin.connect 0,gove,0
- gfor.connect 0,gche,0
- gche.connect 0,gove,1
- gove.connect 0,gout,0
-
- gfor.send_in 0
-
- fps = FO["fps detailed"]
- pr = FO["rubyprint"]
- gout.connect 0,fps,0
- fps.connect 0,pr,0
-
- loop{gin.send_in 0}
-# gin.send_in 0
-# gin1.send_in 0
- $mainloop.loop
-end
-
-Images = [
- "png file opensource.png",
- "#{$imdir}/ruby0216.jpg",
- "#{$imdir}/g001.jpg",
-# "#{$imdir}/teapot.tga",
- "grid gzfile #{$imdir}/foo.grid.gz",
- "grid gzfile #{$imdir}/foo2.grid.gz",
-# "videodev /dev/video0",
-]
-
-def test_formats_speed
- gin = FO["@in"]
- gout = FO["@out x11"]
- gin.connect 0,gout,0
- GridFlow.verbose=false
- t1=[]
- Images.each {|command|
- gin.send_in 0,"open #{command}"
- t0 = Time.new
- 10.times {gin.send_in 0}
- t1 << (Time.new - t0)
- sleep 1
- }
- p t1
-end
-
-def test_formats
- gin = FO["@in"]
- gout = FO["@out window"]
- gs = FO["@ + {int16 # 0}"]
- gin.connect 0,gs,0
- gs.connect 0,gout,0
-# GridFlow.verbose=false
- t1=[]
- Images.each {|command|
- GridFlow.post "SENDING open %s", command
- gin.send_in 0,"open #{command}"
- gin.send_in 0,"cast int16"
- # test for load, rewind, load
- 5.times {|x| gs.send_in 1, [:int16, '#'.intern, x*128]; gin.send_in 0}
- # test for filehandle leak
- #1000.times { gin.send_in 0,"open #{command}" }
- sleep 1
- }
- p t1
-end
-
-def test_rewind
- gin = FO["@in videodev /dev/video1 noinit"]
- gin.send_in 0, "transfer read"
- gout = FO["@out ppm file /tmp/foo.ppm"]
-# gout = FO["@out x11"]
- gin.connect 0,gout,0
- loop {
- gin.send_in 0
- gout.send_in 0, "rewind"
- }
-end
-
-def test_formats_write
- # read files, store and save them, reload, compare, expect identical
- a = FO["@in"]
- b = FO["@out"]; a.connect 0,b,0
- c = FO["@ -"]; a.connect 0,c,1
- d = FO["@in"]; d.connect 0,c,0
- e = FO["@fold +"]; c.connect 0,e,0
- f = FO["@fold +"]; e.connect 0,f,0
- g = FO["@fold +"]; f.connect 0,g,0
- h = FO["@ / 15000"]; g.connect 0,h,0
- i = FO["@export_list"]; h.connect 0,i,0
- x = Expect.new; i.connect 0,x,0
- [
- ["ppm file", "#{$imdir}/g001.jpg"],
- ["targa file", "#{$imdir}/teapot.tga"],
- ["targa file", "#{$imdir}/tux.tga"],
- ["jpeg file", "#{$imdir}/ruby0216.jpg"],
- ["grid gzfile", "#{$imdir}/foo.grid.gz", "endian little"],
- ["grid gzfile", "#{$imdir}/foo.grid.gz", "endian big"],
- ].each {|type,file,*rest|
- a.send_in 0, "open #{type} #{file}"
- b.send_in 0, "open #{type} /tmp/patate"
- rest.each {|r| b.send_in 0,r }
- a.send_in 0
- b.send_in 0, "close"
- raise "written file does not exist" if not File.exist? "/tmp/patate"
- d.send_in 0, "open #{type} /tmp/patate"
- x.expect([0]) { d.send_in 0 }
-# d.send_in 0
- }
-end
-
-def test_mpeg_write
- a = FO["@in ppm file /opt/mex/r.ppm.cat"]
- b = FO["@out x11"]
- a.connect 0,b,0
- loop{a.send_in 0}
-end
-
-def test_headerless
- gout = FO["@out"]
- gout.send_in 0, "open grid file #{$imdir}/hello.txt"
- gout.send_in 0, "headerless"
- gout.send_in 0, "type uint8"
- gout.send_in 0, "104 101 108 108 111 32 119 111 114 108 100 33 10"
- gout.send_in 0, "close"
- gin = FO["@in"]
- pr = FO["@print"]
- gin.connect 0,pr,0
- gin.send_in 0, "open grid file #{$imdir}/hello.txt"
- gin.send_in 0, "headerless 13"
- gin.send_in 0, "type uint8"
- gin.send_in 0
-end
-
-
-def test_sound
-# o2 = FO["@ * 359"] # @ 439.775 Hz
-# o1 = FO["@for 0 44100 1"] # 1 sec @ 1.225 Hz ?
- o1 = FO["@for 0 4500 1"]
- o2 = FO["@ * 1600"] # @ 439.775 Hz
- o3 = FO["@ sin* 255"]
- o4 = FO["@ gamma 400"]
- o5 = FO["@ << 7"]
- out = FO["@out"]
- o1.connect 0,o2,0
- o2.connect 0,o3,0
- o3.connect 0,o4,0
- o4.connect 0,o5,0
- o5.connect 0,out,0
-# out.send_in 0,"open raw file /dev/dsp"
- out.send_in 0,"open grid file /dev/dsp"
- out.send_in 0,"type int16"
- x=0
- loop {
- o4.send_in 1, x
- o1.send_in 0
- x+=10
- }
-end
-
-include Math
-def test_polygon
- o1 = FO["@for 0 5 1"]
- o2 = FO["@ * 14400"]
- o3 = FO["@outer + {0 9000}"]
- o4 = FO["@ +"]
- o5 = FO["@ cos* 112"]
- o6 = FO["@ + {120 160}"]
- poly = FO["@draw_polygon + {3 uint8 # 255}"]
-if false
- out1 = FO["@cast int32"]
- out2 = FO["@solarize"]
-# out1 = FO["@downscale_by 2 smoothly"]
- out3 = FO["@out x11"]
- out1.connect 0,out2,0
- out2.connect 0,out3,0
-else
- out1 = FO["@out x11"]
- fps = FO["fps detailed cpu"]
- out1.connect 0,fps,0
- pr = FO["rubyprint"]
- fps.connect 0,pr,0
-end
- store = FO["@store"]; store.send_in 1, "240 320 3 uint8 # 0"
-# store2 = FO["@store"]
- store.connect 0,poly,0
- poly.connect 0,store,1
-# store2.connect 0,store,1
- o1.connect 0,o2,0
- o2.connect 0,o3,0
- o3.connect 0,o4,0
- o4.connect 0,o5,0
- o5.connect 0,o6,0
- o6.connect 0,poly,2
-# cast = FO["@cast int32"]
-# poly.connect 0,cast,0
-# cast.connect 0,out1,0
- poly.connect 0,out1,0
- x=0
- GridFlow.verbose=false
- task=proc {
- o4.send_in 1, 5000*x
- o5.send_in 1, 200+200*sin(x)
- poly.send_in 1,:list,:uint8, *(0..2).map{|i| 4+4*cos(0.2*x+i*PI*2/3) }
- o1.send_in 0
- store.send_in 0
-# store2.send_in 0
- x+=1
- if x<1000 then $mainloop.timers.after(0.0) {task[]}
- else GridGlobal.new.send_in 0,"profiler_dump"; exit end
- }
- task[]
- $mainloop.loop
-end
-
-class FRoute2 < FO
- def initialize(selector)
- @selector = selector.to_s
- end
- def method_missing(sym,*a)
- sym=sym.to_s
- if sym =~ /^_0_(.*)/
- send_out((if $1==@selector then 0 else 1 end), $1.intern, *a)
- else super end
- end
- install "route2", 1, 2
-end
-
-def test_aalib
-# gin = FO["@in ppm file #{$imdir}/r001.jpg"]
- gin = FO["@in ppm file #{$animdir}/b.jpg.cat"]
- grey = FO["@rgb_to_greyscale"]
- cont = FO["@ << 1"]
- clip = FO["@ min 255"]
- gout = FO["@out aalib X11"]
- sto = FO["@store"]
- op = FO["aa_fill_with_text {localhost 4242}"]
- filt = FO["route2 grid"]
- gin.connect 0,grey,0
- grey.connect 0,cont,0
- cont.connect 0,clip,0
- clip.connect 0,gout,0
- gout.connect 0,filt,0
- filt.connect 0,sto,1
- sto.connect 0,op,0
- op.connect 0,gout,0
- gout.send_in 0, :autodraw, 0
- GridFlow.verbose = false
- task=proc{
- gin.send_in 0
- gout.send_in 0, :dump
- sto.send_in 0
- gout.send_in 0, :draw
- $mainloop.timers.after(0.1,&task)
- }
- task[]
- $mainloop.loop
-end
-
-def test_store2
- o = [
- FO["@for {0 0} {240 320} {1 1}"],
- FO["@ / 2"],
- FO["@ + 0"],
- FO["@ + 0"],
- FO["@store"],
- FO["@out x11"]]
- (0..4).each {|x| o[x].connect 0,o[x+1],0 }
- q = FO["@in ppm file images/r001.jpg"]
- q.connect 0,o[4],1
- q.send_in 0
- o[0].send_in 0
- $mainloop.loop
-end
-
-def test_remap
- rem = FO["@remap_image"]
- rot = FO["@rotate 4000"]
- rem.connect 1,rot,0
- rot.connect 0,rem,1
- gin = FO["@in ppm file #{$imdir}/teapot.png"]
- gout = FO["@out x11"]
- gin.connect 0,rem,0
- rem.connect 0,gout,0
- gin.send_in 0
- $mainloop.loop
-end
-
-def test_asm
- GridFlow.verbose=false
- a = FO["@in ppm file images/r001.jpg"]
- aa = FO["@cast uint8"]
- b = FO["@store"]
- d = FO["@store"]
- a.connect 0,aa,0
- aa.connect 0,b,1
- aa.connect 0,d,1
- a.send_in 0
- c = FO["@ + {uint8 # 0}"]
- t0 = Time.new; 1000.times {b.send_in 0}; t1 = Time.new-t0
- t1 *= 1
- b.connect 0,c,0
- stuff=proc{
- 3.times{
- t0 = Time.new; 1000.times {b.send_in 0}; t2 = Time.new-t0
- t2 *= 1
- GridFlow.post " %f %f %f", t1, t2, t2-t1
- }
- }
- puts "map:"
- stuff[]
- d.connect 0,c,1 # for zip
- d.send_in 0
- puts "zip:"
- stuff[]
-end
-
-def test_metro
- o1 = RtMetro.new(1000,:geiger)
- o2 = RubyPrint.new(:time)
- o1.connect 0,o2,0
- o1.send_in 0,1
- $mainloop.loop
-end
-
-def test_outer
- o = FO["@outer + {0}"]
- o.send_in 0, 25, 240, 320, 3, "#".intern, 42
- g = FO["@global"]
- g.send_in 0, :profiler_dump
-end
-
-def test_jmax_to_pd filename
- require "gridflow/extra/jmax_format.rb"
- require "gridflow/extra/puredata_format.rb"
- jfr = JMaxFileReader.new(File.open(filename),FO)
- FO.broken_ok = true
- my_patcher = jfr.parse
-# my_patcher.subobjects.each {|x,| x.trigger if LoadBang===x }
-# $mainloop.loop
-# $p=my_patcher; ARGV.clear; load "/home/matju/bin/iruby"
- filename = File.basename filename
- filename[File.extname(filename)]=".pd"
- filename[0,0]="pd_examples/"
- pfw = PureDataFileWriter.new(filename)
- pfw.write_patcher my_patcher
- pfw.close
-end
-
-def test_error
- x = FO["@store"]
- x.send_in 0
-end
-
-if ARGV[0] then
- name = ARGV.shift
- send "test_#{name}", *ARGV
-# ARGV.each {|a| send "test_#{a}" }
- exit 0
-end
-
-#test_polygon
-#test_math
-#test_munchies
-#test_image "grid file #{$imdir}/foo.grid"
-#test_image "grid gzfile #{$imdir}/foo.grid.gz"
-#test_print
-#test_nonsense
-#test_ppm2
-#test_anim "open file #{$imdir}/g001.jpg"#,"loop 0"
-#test_anim "open ppm file #{$animdir}/b.ppm.cat"
-#test_anim "open jpeg file #{$imdir}/rgb.jpeg.cat"
-#test_anim "open quicktime file BLAH"
-#test_anim "open quicktime file #{$imdir}/rgb_uncompressed.mov"
-#test_anim "open quicktime file #{$imdir}/test_mjpega.mov"
-#test_anim "open ppm gzfile motion_tracking.ppm.cat.gz"
-#test_anim "open videodev /dev/video","channel 1","size 480 640"
-#test_anim "open videodev /dev/video1 noinit","transfer read"
-#test_anim "open videodev /dev/video","channel 1","size 120 160"
-#test_anim "open mpeg file /home/matju/net/Animations/washington_zoom_in.mpeg"
-#test_anim "open quicktime file /home/matju/Shauna/part_1.mov"
-#test_anim "open quicktime file #{$imdir}/gt.mov"
-#test_anim "open quicktime file /home/matju/pics/domopers_hi.mov"
-#test_anim "open quicktime file /home/matju/net/c.mov"
-#test_formats
-#test_tcp
-#test_sound
-#test_metro
-#$mainloop.loop
-
-=begin
-a = FO["@print"]
-a.send_in 0, "3 3 #{nt} # 1 0 0 0"
-a.send_in 0, "3 3 3 #{nt} # 1 2 3 4"
-a.send_in 0, "base 16"
-a.send_in 0, "3 3 3 #{nt} # 255 0 0 0"
-=end
diff --git a/externals/gridflow/bin/backtrace b/externals/gridflow/bin/backtrace
deleted file mode 100755
index ac1358af..00000000
--- a/externals/gridflow/bin/backtrace
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env ruby
-if ARGV.length != 1
- puts "usage: core.rb <corefile>"
- exit 1
-end
-qfile=ARGV[0].gsub /'/, "\\\\'"
-x=`gdb --batch -c '#{qfile}'`.split"\n"
-m=/`([^']+)/.match x[0]
-f=File.open("/tmp/backtrace_#{$$}.gdb","w")
-f.puts"bt"
-f.puts"quit"
-f.close
-cmd="gdb #{m[1]} #{qfile} --command=/tmp/backtrace_#{$$}.gdb"
-x=`#{cmd}`.split("\n")
-i=nil
-x.each_with_index {|line,i| break if /^#0/ =~ line }
-x[0..i]=[]
-puts x
diff --git a/externals/gridflow/bin/demangle b/externals/gridflow/bin/demangle
deleted file mode 100755
index 923bca25..00000000
--- a/externals/gridflow/bin/demangle
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env ruby
-f = File.popen "gdb", "r+"
-f.puts "maintenance demangle #{ARGV[0]}", "quit"
-puts f.read.split("\n")[-2].sub(/^\(gdb\) /,"")
diff --git a/externals/gridflow/bin/jmax2pd b/externals/gridflow/bin/jmax2pd
deleted file mode 100755
index 5510656a..00000000
--- a/externals/gridflow/bin/jmax2pd
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env ruby
-
-require "gridflow"
-require "gridflow/extra/jmax_format.rb"
-require "gridflow/extra/puredata_format.rb"
-include GridFlow
-#GridFlow.verbose = true
-
-iname,oname = ARGV
-if not iname
- raise "usage: jmax2pd <input.jmax> [<output.pd>]"
-end
-if not oname
- oname = iname.sub(/\.jmax$/,".pd")
-end
-keep=["broken","jpatcher","button","slider","messbox"]
-GridFlow.instance_eval{@fclasses_set.delete_if {|k,v|
- not keep.include? k
-}}
-#p GridFlow.instance_eval{@fclasses_set.keys.sort}
-
-jfr = JMaxFileReader.new(File.open(iname),FObject)
-FObject.broken_ok = true
-FObject.do_loadbangs = false
-my_patcher = jfr.parse
-pfw = PureDataFileWriter.new(oname)
-pfw.write_patcher my_patcher
-pfw.close
-
diff --git a/externals/gridflow/bin/plusminus b/externals/gridflow/bin/plusminus
deleted file mode 100755
index 685014ce..00000000
--- a/externals/gridflow/bin/plusminus
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/usr/bin/env ruby
-# NOTE: this works with diff -u only!!!
-
-puts "-"*64
-
-$plustot=0
-$minustot=0
-
-def show
- printf "%20s %+5d %+5d (net %+5d)\n", $file, $plus, -$minus, $plus-$minus
-end
-
-loop{
- line = gets
- break if not line
- if /^diff/.match line then
- x = line.split(/\s+/)
- $plustot+=$plus if $plus
- $minustot+=$minus if $minus
- show if $file
- $file = x[-1]
- $on=false
- $plus=0
- $minus=0
- elsif /^\@\@/ =~ line then $on=true
- elsif $on and /^\+/ =~ line then $plus+=1
- elsif $on and /^\-/ =~ line then $minus+=1
- end
-}
-
-$plustot+=$plus if $plus
-$minustot+=$minus if $minus
-show if $file
-
-$file="total"
-$plus=$plustot
-$minus=$minustot
-puts "-"*64
-show
diff --git a/externals/gridflow/bridge/placebo.rb b/externals/gridflow/bridge/placebo.rb
deleted file mode 100644
index b52e196e..00000000
--- a/externals/gridflow/bridge/placebo.rb
+++ /dev/null
@@ -1,46 +0,0 @@
-=begin
- $Id: placebo.rb,v 1.2 2006-03-15 04:38:20 matju Exp $
-
- GridFlow
- Copyright (c) 2001,2002,2003,2004,2005 by Mathieu Bouchard
-
- 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.
-
- See file ../COPYING for further informations on licensing terms.
-
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-=end
-
-class Object
- def self.dummy(sel)
- self.module_eval "def #{sel}(*args)
- #GridFlow.post \"dummy #{sel}: %s\", args.inspect
- end"
- end
-end
-
-module GridFlow
- class<<self
- # def add_creator_2(*args) post "dummy add_creator_2: %s", args.inspect end
- dummy :add_creator_2
- def post_string(s) STDERR.puts s end
- end
- class Clock
- def initialize(victim) @victim=victim end
- dummy :delay
- dummy :unset
- end
- class Pointer
- dummy :initialize
- end
-end
diff --git a/externals/gridflow/bridge/puredata.c b/externals/gridflow/bridge/puredata.c
deleted file mode 100644
index 1109b59c..00000000
--- a/externals/gridflow/bridge/puredata.c
+++ /dev/null
@@ -1,773 +0,0 @@
-/*
- $Id: puredata.c,v 1.2 2006-03-15 04:38:20 matju Exp $
-
- GridFlow
- Copyright (c) 2001,2002,2003,2004,2005 by Mathieu Bouchard
-
- 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.
-
- See file ../COPYING for further informations on licensing terms.
-
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-/*
-'bridge_puredata.c' becomes 'gridflow.pd_linux' which loads Ruby and tells
-Ruby to load the other 95% of Gridflow. GridFlow creates the FObject class
-and then subclasses it many times, each time calling FObject.install(),
-which tells the bridge to register a class in puredata. Puredata
-objects have proxies for each of the non-first inlets so that any inlet
-may receive any distinguished message. All inlets are typed as 'anything',
-and the 'anything' method translates the whole message to Ruby objects and
-tries to call a Ruby method of the proper name.
-*/
-
-#define IS_BRIDGE
-#include "../base/grid.h.fcs"
-/* resolving conflict: T_OBJECT will be PD's, not Ruby's */
-#undef T_OBJECT
-#undef EXTERN
-#include <m_pd.h>
-#include <ctype.h>
-#include <stdarg.h>
-#include <unistd.h>
-#include "g_canvas.h"
-
-#define CObject_free CObject_freeee
-#define gfpost post
-
-/* **************************************************************** */
-struct BFObject;
-struct FMessage {
- BFObject *self;
- int winlet;
- t_symbol *selector;
- int ac;
- const t_atom *at;
- bool is_init;
-};
-#include <sys/time.h>
-#include <signal.h>
-#include <setjmp.h>
-#define rb_sym_name rb_sym_name_r4j
-static const char *rb_sym_name(Ruby sym) {return rb_id2name(SYM2ID(sym));}
-
-static BuiltinSymbols *syms;
-
-void CObject_free (void *victim) {
- CObject *self = (CObject *)victim;
- self->check_magic();
- if (!self->rself) {
- L fprintf(stderr,"attempt to free object that has no rself\n");
- abort();
- }
- self->rself = 0; /* paranoia */
- delete self;
-}
-
-
-/* can't even refer to the other mGridFlow because we don't link
- statically to the other gridflow.so */
-static Ruby mGridFlow2=0;
-static Ruby mPointer=0;
-
-\class Pointer < CObject
-struct Pointer : CObject {
- void *p;
- Pointer() { assert(!"DYING HORRIBLY (GASP)"); }
- Pointer(void *_p) : p(_p) {}
- \decl Ruby ptr ();
-};
-\def Ruby ptr () { return LONG2NUM(((long)p)); }
-\classinfo {
- IEVAL(rself,
-"self.module_eval{"
-"def inspect; p=('%08x'%ptr).gsub(/^\\.\\.f/,''); \"#<Pointer:#{p}>\" % ptr; end;"
-"alias to_s inspect }"
-);}
-\end class Pointer
-Ruby Pointer_s_new (void *ptr) {
- Pointer *self = new Pointer(ptr);
- Ruby rself = Data_Wrap_Struct(EVAL("GridFlow::Pointer"), 0, CObject_free, self);
- self->rself = rself;
- return rself;
-}
-void *Pointer_get (Ruby rself) {
- DGS(Pointer);
- return self->p;
-}
-
-static Ruby make_error_message () {
- char buf[1000];
- sprintf(buf,"%s: %s",rb_class2name(rb_obj_class(ruby_errinfo)),
- rb_str_ptr(rb_funcall(ruby_errinfo,SI(to_s),0)));
- Ruby ary = rb_ary_new2(2);
- Ruby backtrace = rb_funcall(ruby_errinfo,SI(backtrace),0);
- rb_ary_push(ary,rb_str_new2(buf));
- for (int i=0; i<2 && i<rb_ary_len(backtrace); i++)
- rb_ary_push(ary,rb_funcall(backtrace,SI([]),1,INT2NUM(i)));
-// rb_ary_push(ary,rb_funcall(rb_funcall(backtrace,SI(length),0),SI(to_s),0));
- return ary;
-}
-
-static int ninlets_of (Ruby qlass) {
- if (!rb_ivar_defined(qlass,SYM2ID(syms->iv_ninlets))) RAISE("no inlet count");
- return INT(rb_ivar_get(qlass,SYM2ID(syms->iv_ninlets)));
-}
-
-static int noutlets_of (Ruby qlass) {
- if (!rb_ivar_defined(qlass,SYM2ID(syms->iv_noutlets))) RAISE("no outlet count");
- return INT(rb_ivar_get(qlass,SYM2ID(syms->iv_noutlets)));
-}
-
-#ifndef STACK_GROW_DIRECTION
-#define STACK_GROW_DIRECTION -1
-#endif
-extern "C" void Init_stack(VALUE *addr);
-static VALUE *localize_sysstack () {
- long bp0,bp1;
- sscanf(STACK_END,"0x%08lx",&bp0);
- // HACK (2004.08.29: alx has a problem; i hope it doesn't get worse)
- // this rounds to the last word of a 64k block (bug: doesn't use STACK_GROW_DIRECTION)
- bp1=((bp0+0xffff)&~0xffff)-sizeof(void*);
- fprintf(stderr,"STACK_END old=0x%08lx; new=0x%08lx\n",bp0,bp1);
- return (VALUE *)bp1;
-}
-
-//****************************************************************
-// BFObject
-
-struct BFObject : t_object {
- int32 magic; // paranoia
- Ruby rself;
- int nin; // per object settings (not class)
- int nout; // per object settings (not class)
- t_outlet **out;
-
- void check_magic () {
- if (magic != OBJECT_MAGIC) {
- fprintf(stderr,"Object memory corruption! (ask the debugger)\n");
- for (int i=-1; i<=1; i++) {
- fprintf(stderr,"this[0]=0x%08x\n",((int*)this)[i]);
- }
- raise(11);
- }
- }
-};
-
-static t_class *find_bfclass (t_symbol *sym) {
- t_atom a[1];
- SETSYMBOL(a,sym);
- char buf[4096];
- if (sym==&s_list) strcpy(buf,"list"); else atom_string(a,buf,sizeof(buf));
- Ruby v = rb_hash_aref(rb_ivar_get(mGridFlow2, SI(@fclasses)), rb_str_new2(buf));
- if (v==Qnil) {
- post("GF: class not found: '%s'",buf);
- return 0;
- }
- if (Qnil==rb_ivar_get(v,SI(@bfclass))) {
- post("@bfclass missing for '%s'",buf);
- return 0;
- }
- return FIX2PTR(t_class,rb_ivar_get(v,SI(@bfclass)));
-}
-
-static t_class *BFProxy_class;
-
-struct BFProxy : t_object {
- BFObject *parent;
- int inlet;
-};
-
-static void Bridge_export_value(Ruby arg, t_atom *at) {
- if (INTEGER_P(arg)) {
- SETFLOAT(at,NUM2INT(arg));
- } else if (SYMBOL_P(arg)) {
- const char *name = rb_sym_name(arg);
- SETSYMBOL(at,gensym((char *)name));
- } else if (FLOAT_P(arg)) {
- SETFLOAT(at,RFLOAT(arg)->value);
- } else if (rb_obj_class(arg)==mPointer) {
- SETPOINTER(at,(t_gpointer*)Pointer_get(arg));
- } else {
- RAISE("cannot convert argument of class '%s'",
- rb_str_ptr(rb_funcall(rb_funcall(arg,SI(class),0),SI(inspect),0)));
- }
-}
-
-static Ruby Bridge_import_value(const t_atom *at) {
- t_atomtype t = at->a_type;
- if (t==A_SYMBOL) {
- return ID2SYM(rb_intern(at->a_w.w_symbol->s_name));
- } else if (t==A_FLOAT) {
- return rb_float_new(at->a_w.w_float);
- } else if (t==A_POINTER) {
- return Pointer_s_new(at->a_w.w_gpointer);
- } else {
- return Qnil; /* unknown */
- }
-}
-
-static Ruby BFObject_method_missing_1 (FMessage *fm) {
- Ruby argv[fm->ac+2];
- argv[0] = INT2NUM(fm->winlet);
- argv[1] = ID2SYM(rb_intern(fm->selector->s_name));
- for (int i=0; i<fm->ac; i++) argv[2+i] = Bridge_import_value(fm->at+i);
- fm->self->check_magic();
- rb_funcall2(fm->self->rself,SI(send_in),fm->ac+2,argv);
- return Qnil;
-}
-
-static Ruby BFObject_rescue (FMessage *fm) {
- Ruby error_array = make_error_message();
-// for (int i=0; i<rb_ary_len(error_array); i++)
-// post("%s\n",rb_str_ptr(rb_ary_ptr(error_array)[i]));
- if (fm->self) pd_error(fm->self,"%s",rb_str_ptr(
- rb_funcall(error_array,SI(join),1,rb_str_new2("\n"))));
- if (fm->self && fm->is_init) fm->self = 0;
- return Qnil;
-}
-
-static void BFObject_method_missing (BFObject *bself,
-int winlet, t_symbol *selector, int ac, t_atom *at) {
- FMessage fm = { bself, winlet, selector, ac, at, false };
- if (!bself->rself) {
- pd_error(bself,"message to a dead object. (supposed to be impossible)");
- return;
- }
- rb_rescue2(
- (RMethod)BFObject_method_missing_1,(Ruby)&fm,
- (RMethod)BFObject_rescue,(Ruby)&fm,
- rb_eException,0);
-}
-
-static void BFObject_method_missing0 (BFObject *self,
-t_symbol *s, int argc, t_atom *argv) {
- BFObject_method_missing(self,0,s,argc,argv);
-}
-
-static void BFProxy_method_missing(BFProxy *self,
-t_symbol *s, int argc, t_atom *argv) {
- BFObject_method_missing(self->parent,self->inlet,s,argc,argv);
-}
-
-static Ruby BFObject_init_1 (FMessage *fm) {
- Ruby argv[fm->ac+1];
- for (int i=0; i<fm->ac; i++) argv[i+1] = Bridge_import_value(fm->at+i);
-
- if (fm->selector==&s_list) {
- argv[0] = rb_str_new2("list"); // pd is slightly broken here
- } else {
- argv[0] = rb_str_new2(fm->selector->s_name);
- }
-
- Ruby rself = rb_funcall2(rb_const_get(mGridFlow2,SI(FObject)),SI([]),fm->ac+1,argv);
- DGS(FObject);
- self->bself = fm->self;
- self->bself->rself = rself;
-
- int ninlets = self->bself->nin = ninlets_of(rb_funcall(rself,SI(class),0));
- int noutlets = self->bself->nout = noutlets_of(rb_funcall(rself,SI(class),0));
-
- for (int i=1; i<ninlets; i++) {
- BFProxy *p = (BFProxy *)pd_new(BFProxy_class);
- p->parent = self->bself;
- p->inlet = i;
- inlet_new(self->bself, &p->ob_pd, 0,0);
- }
- self->bself->out = new t_outlet*[noutlets];
- for (int i=0; i<noutlets; i++) {
- self->bself->out[i] = outlet_new(self->bself,&s_anything);
- }
- rb_funcall(rself,SI(initialize2),0);
- return rself;
-}
-
-static void *BFObject_init (t_symbol *classsym, int ac, t_atom *at) {
- t_class *qlass = find_bfclass(classsym);
- if (!qlass) return 0;
- BFObject *bself = (BFObject *)pd_new(qlass);
- bself->magic = OBJECT_MAGIC;
- bself->check_magic();
- FMessage fm = { self: bself, winlet:-1, selector: classsym,
- ac: ac, at: at, is_init: true };
- long r = rb_rescue2(
- (RMethod)BFObject_init_1,(Ruby)&fm,
- (RMethod)BFObject_rescue,(Ruby)&fm,
- rb_eException,0);
- return r==Qnil ? 0 : (void *)bself; // return NULL if broken object
-}
-
-static void BFObject_delete_1 (FMessage *fm) {
- fm->self->check_magic();
- if (fm->self->rself) {
- rb_funcall(fm->self->rself,SI(delete),0);
- } else {
- post("BFObject_delete is NOT handling BROKEN object at %*lx",2*sizeof(long),(long)fm);
- }
-}
-
-static void BFObject_delete (BFObject *bself) {
- bself->check_magic();
- FMessage fm = { self: bself, winlet:-1, selector: gensym("delete"),
- ac: 0, at: 0, is_init: false };
- rb_rescue2(
- (RMethod)BFObject_delete_1,(Ruby)&fm,
- (RMethod)BFObject_rescue,(Ruby)&fm,
- rb_eException,0);
- bself->magic = 0xDeadBeef;
-}
-
-/* **************************************************************** */
-
-struct RMessage {
- VALUE rself;
- ID sel;
- int argc;
- VALUE *argv;
-};
-
-// this was called rb_funcall_rescue[...] but recently (ruby 1.8.2)
-// got a conflict with a new function in ruby.
-
-VALUE rb_funcall_myrescue_1(RMessage *rm) {
- return rb_funcall2(rm->rself,rm->sel,rm->argc,rm->argv);
-}
-
-static Ruby rb_funcall_myrescue_2 (RMessage *rm) {
- Ruby error_array = make_error_message();
-// for (int i=0; i<rb_ary_len(error_array); i++)
-// post("%s\n",rb_str_ptr(rb_ary_ptr(error_array)[i]));
- post("%s",rb_str_ptr(rb_funcall(error_array,SI(join),1,rb_str_new2("\n"))));
- return Qnil;
-}
-
-VALUE rb_funcall_myrescue(VALUE rself, ID sel, int argc, ...) {
- va_list foo;
- va_start(foo,argc);
- VALUE argv[argc];
- for (int i=0; i<argc; i++) argv[i] = va_arg(foo,VALUE);
- RMessage rm = { rself, sel, argc, argv };
- va_end(foo);
- return rb_rescue2(
- (RMethod)rb_funcall_myrescue_1,(Ruby)&rm,
- (RMethod)rb_funcall_myrescue_2,(Ruby)&rm,
- rb_eException,0);
-}
-
-/* Call this to get a gobj's bounding rectangle in pixels */
-void bf_getrectfn(t_gobj *x, struct _glist *glist,
-int *x1, int *y1, int *x2, int *y2) {
- BFObject *bself = (BFObject*)x;
- Ruby can = PTR2FIX(glist_getcanvas(glist));
- Ruby a = rb_funcall_myrescue(bself->rself,SI(pd_getrect),1,can);
- if (TYPE(a)!=T_ARRAY || rb_ary_len(a)<4) {
- post("bf_getrectfn: return value should be 4-element array");
- *x1=*y1=*x2=*y2=0;
- return;
- }
- *x1 = INT(rb_ary_ptr(a)[0]);
- *y1 = INT(rb_ary_ptr(a)[1]);
- *x2 = INT(rb_ary_ptr(a)[2]);
- *y2 = INT(rb_ary_ptr(a)[3]);
-}
-
-/* and this to displace a gobj: */
-void bf_displacefn(t_gobj *x, struct _glist *glist, int dx, int dy) {
- Ruby can = PTR2FIX(glist_getcanvas(glist));
- BFObject *bself = (BFObject *)x;
- bself->te_xpix+=dx;
- bself->te_ypix+=dy;
- rb_funcall_myrescue(bself->rself,SI(pd_displace),3,can,INT2NUM(dx),INT2NUM(dy));
- canvas_fixlinesfor(glist, (t_text *)x);
-}
-
-/* change color to show selection: */
-void bf_selectfn(t_gobj *x, struct _glist *glist, int state) {
- Ruby can = PTR2FIX(glist_getcanvas(glist));
- rb_funcall_myrescue(((BFObject*)x)->rself,SI(pd_select),2,can,INT2NUM(state));
-}
-
-/* change appearance to show activation/deactivation: */
-void bf_activatefn(t_gobj *x, struct _glist *glist, int state) {
- Ruby can = PTR2FIX(glist_getcanvas(glist));
- rb_funcall_myrescue(((BFObject*)x)->rself,SI(pd_activate),2,can,INT2NUM(state));
-}
-
-/* warn a gobj it's about to be deleted */
-void bf_deletefn(t_gobj *x, struct _glist *glist) {
- Ruby can = PTR2FIX(glist_getcanvas(glist));
- rb_funcall_myrescue(((BFObject*)x)->rself,SI(pd_delete),1,can);
- canvas_deletelinesfor(glist, (t_text *)x);
-}
-
-/* making visible or invisible */
-void bf_visfn(t_gobj *x, struct _glist *glist, int flag) {
- Ruby can = PTR2FIX(glist_getcanvas(glist));
- Ruby rself = ((BFObject*)x)->rself;
- DGS(FObject);
- self->check_magic();
- rb_funcall_myrescue(((BFObject*)x)->rself,SI(pd_vis),2,can,INT2NUM(flag));
-}
-
-/* field a mouse click (when not in "edit" mode) */
-int bf_clickfn(t_gobj *x, struct _glist *glist,
-int xpix, int ypix, int shift, int alt, int dbl, int doit) {
- Ruby can = PTR2FIX(glist_getcanvas(glist));
- Ruby ret = rb_funcall_myrescue(((BFObject*)x)->rself,SI(pd_click),7,can,
- INT2NUM(xpix),INT2NUM(ypix),
- INT2NUM(shift),INT2NUM(alt),
- INT2NUM(dbl),INT2NUM(doit));
- if (TYPE(ret) == T_FIXNUM) return INT(ret);
- post("bf_clickfn: expected Fixnum");
- return 0;
-}
-
-/* save to a binbuf */
-void bf_savefn(t_gobj *x, t_binbuf *b) {
- rb_funcall_myrescue(((BFObject*)x)->rself,SI(pd_save),1,Qnil);
-}
-
-/* open properties dialog */
-void bf_propertiesfn(t_gobj *x, struct _glist *glist) {
- Ruby can = PTR2FIX(glist_getcanvas(glist));
- rb_funcall_myrescue(((BFObject*)x)->rself,SI(pd_properties),1,can);
-}
-
-/* get keypresses during focus */
-void bf_keyfn(void *x, t_floatarg fkey) {
- rb_funcall_myrescue(((BFObject*)x)->rself,SI(pd_key),1,INT2NUM((int)fkey));
-}
-
-/* get motion diff during focus */
-void bf_motionfn(void *x, t_floatarg dx, t_floatarg dy) {
- rb_funcall_myrescue(((BFObject*)x)->rself,SI(pd_motion),2,
- INT2NUM((int)dx), INT2NUM((int)dy));
-}
-
-/* **************************************************************** */
-
-static void BFObject_class_init_1 (t_class *qlass) {
- class_addanything(qlass,(t_method)BFObject_method_missing0);
-}
-
-\class FObject
-
-static Ruby FObject_s_install2(Ruby rself, Ruby name) {
- if (TYPE(name)!=T_STRING) RAISE("name must be String");
- t_class *qlass = class_new(gensym(rb_str_ptr(name)),
- (t_newmethod)BFObject_init, (t_method)BFObject_delete,
- sizeof(BFObject), CLASS_DEFAULT, A_GIMME,0);
- rb_ivar_set(rself, SI(@bfclass), PTR2FIX(qlass));
- FMessage fm = {0, -1, 0, 0, 0, false};
- rb_rescue2(
- (RMethod)BFObject_class_init_1,(Ruby)qlass,
- (RMethod)BFObject_rescue,(Ruby)&fm,
- rb_eException,0);
- return Qnil;
-}
-
-static Ruby FObject_send_out2(int argc, Ruby *argv, Ruby rself) {
-//\def Ruby send_out2(...) {
- DGS(FObject);
- BFObject *bself = self->bself;
- if (!bself) {
- //post("FObject#send_out2 : bself is NULL, rself=%08x",rself);
- return Qnil;
- }
- bself->check_magic();
- Ruby qlass = rb_funcall(rself,SI(class),0);
- int outlet = INT(argv[0]);
- Ruby sym = argv[1];
- argc-=2;
- argv+=2;
- t_atom sel, at[argc];
- Bridge_export_value(sym,&sel);
- for (int i=0; i<argc; i++) Bridge_export_value(argv[i],at+i);
- t_outlet *out = bself->te_outlet;
- outlet_anything(bself->out[outlet],atom_getsymbol(&sel),argc,at);
- return Qnil;
-}
-
-static Ruby FObject_s_set_help (Ruby rself, Ruby path) {
- path = rb_funcall(path,SI(to_s),0);
- Ruby qlassid = rb_ivar_get(rself,SI(@bfclass));
- if (qlassid==Qnil) RAISE("@bfclass==nil ???");
- t_class *qlass = FIX2PTR(t_class,qlassid);
- class_sethelpsymbol(qlass,gensym(rb_str_ptr(path)));
- return Qnil;
-}
-
-static Ruby GridFlow_s_gui (int argc, Ruby *argv, Ruby rself) {
- if (argc!=1) RAISE("bad args");
- Ruby command = rb_funcall(argv[0],SI(to_s),0);
- sys_gui(rb_str_ptr(command));
- return Qnil;
-}
-
-static Ruby GridFlow_s_bind (Ruby rself, Ruby argv0, Ruby argv1) {
- if (TYPE(argv0)==T_STRING) {
-#if PD_VERSION_INT < 37
- RAISE("requires Pd 0.37");
-#else
- Ruby name = rb_funcall(argv0,SI(to_s),0);
- Ruby qlassid = rb_ivar_get(rb_hash_aref(rb_ivar_get(mGridFlow2,SI(@fclasses)),name),SI(@bfclass));
- if (qlassid==Qnil) RAISE("no such class: %s",rb_str_ptr(name));
- pd_typedmess(&pd_objectmaker,gensym(rb_str_ptr(name)),0,0);
- t_pd *o = pd_newest();
- pd_bind(o,gensym(rb_str_ptr(argv1)));
-#endif
- } else {
- Ruby rself = argv0;
- DGS(FObject);
- t_symbol *s = gensym(rb_str_ptr(argv1));
- t_pd *o = (t_pd *)(self->bself);
- //fprintf(stderr,"binding %08x to: \"%s\" (%08x %s)\n",o,rb_str_ptr(argv[1]),s,s->s_name);
- pd_bind(o,s);
- }
- return Qnil;
-}
-
-static Ruby FObject_s_gui_enable (Ruby rself) {
- Ruby qlassid = rb_ivar_get(rself,SI(@bfclass));
- if (qlassid==Qnil) RAISE("no class id ?");
- t_widgetbehavior *wb = new t_widgetbehavior;
- wb->w_getrectfn = bf_getrectfn;
- wb->w_displacefn = bf_displacefn;
- wb->w_selectfn = bf_selectfn;
- wb->w_activatefn = bf_activatefn;
- wb->w_deletefn = bf_deletefn;
- wb->w_visfn = bf_visfn;
- wb->w_clickfn = bf_clickfn;
- //wb->w_savefn = bf_savefn;
- //wb->w_propertiesfn = bf_propertiesfn;
- class_setwidget(FIX2PTR(t_class,qlassid),wb);
- return Qnil;
-}
-
-static Ruby FObject_focus (Ruby rself, Ruby canvas_, Ruby x_, Ruby y_) {
- DGS(FObject);
- t_glist *canvas = FIX2PTR(t_glist,canvas_);
- t_gobj *bself = (t_gobj *)(self->bself);
- int x = INT(x_);
- int y = INT(y_);
- glist_grab(canvas,bself, bf_motionfn, bf_keyfn, x,y);
- return Qnil;
-}
-
-// doesn't use rself but still is aside FObject_focus for symmetry reasons.
-static Ruby FObject_unfocus (Ruby rself, Ruby canvas_) {
- DGS(FObject);
- t_glist *canvas = FIX2PTR(t_glist,canvas_);
- glist_grab(canvas,0,0,0,0,0);
- return Qnil;
-}
-
-static Ruby FObject_add_inlets (Ruby rself, Ruby n_) {
- DGS(FObject);
- if (!self->bself) RAISE("there is no bself");
- int n = INT(n_);
- for (int i=self->bself->nin; i<self->bself->nin+n; i++) {
- BFProxy *p = (BFProxy *)pd_new(BFProxy_class);
- p->parent = self->bself;
- p->inlet = i;
- inlet_new(self->bself, &p->ob_pd, 0,0);
- }
- self->bself->nin+=n;
- return Qnil;
-}
-
-static Ruby FObject_add_outlets (Ruby rself, Ruby n_) {
- DGS(FObject);
- if (!self->bself) RAISE("there is no bself");
- int n = INT(n_);
- t_outlet **oldouts = self->bself->out;
- self->bself->out = new t_outlet*[self->bself->nout+n];
- memcpy(self->bself->out,oldouts,self->bself->nout*sizeof(t_outlet*));
- for (int i=self->bself->nout; i<self->bself->nout+n; i++) {
- self->bself->out[i] = outlet_new(self->bself,&s_anything);
- }
- self->bself->nout+=n;
- return Qnil;
-}
-
-static Ruby bridge_add_to_menu (int argc, Ruby *argv, Ruby rself) {
- if (argc!=1) RAISE("bad args");
- Ruby name = rb_funcall(argv[0],SI(to_s),0);
- Ruby qlassid = rb_ivar_get(rb_hash_aref(rb_ivar_get(mGridFlow2,SI(@fclasses)),name),SI(@bfclass));
- if (qlassid==Qnil) RAISE("no such class: %s",rb_str_ptr(name));
- //!@#$
- return Qnil;
-}
-
-static Ruby GridFlow_s_add_creator_2 (Ruby rself, Ruby name_) {
- t_symbol *name = gensym(rb_str_ptr(rb_funcall(name_,SI(to_s),0)));
- class_addcreator((t_newmethod)BFObject_init,name,A_GIMME,0);
- return Qnil;
-}
-
-static Ruby FObject_get_position (Ruby rself, Ruby canvas) {
- DGS(FObject);
- t_text *bself = (t_text *)(self->bself);
- t_glist *c = FIX2PTR(t_glist,canvas);
- float x0,y0;
- if (c->gl_havewindow || !c->gl_isgraph) {
- x0=bself->te_xpix;
- y0=bself->te_ypix;
- }
- else { // graph-on-parent: have to zoom
- float zx = float(c->gl_x2 - c->gl_x1) / (c->gl_screenx2 - c->gl_screenx1);
- float zy = float(c->gl_y2 - c->gl_y1) / (c->gl_screeny2 - c->gl_screeny1);
- x0 = glist_xtopixels(c, c->gl_x1 + bself->te_xpix*zx);
- y0 = glist_ytopixels(c, c->gl_y1 + bself->te_ypix*zy);
- }
- Ruby a = rb_ary_new();
- rb_ary_push(a,INT2NUM((int)x0));
- rb_ary_push(a,INT2NUM((int)y0));
- return a;
-}
-
-\classinfo {}
-\end class FObject
-
-//****************************************************************
-
-\class Clock < CObject
-struct Clock : CObject {
- t_clock *serf;
- Ruby owner; /* copy of ptr that serf already has, for marking */
- \decl void set (double systime);
- \decl void delay(double delaytime);
- \decl void unset();
-};
-
-void Clock_fn (Ruby rself) { rb_funcall_myrescue(rself,SI(call),0); }
-void Clock_mark (Clock *self) { rb_gc_mark(self->owner); }
-void Clock_free (Clock *self) { clock_free(self->serf); CObject_free(self); }
-
-Ruby Clock_s_new (Ruby qlass, Ruby owner) {
- Clock *self = new Clock();
- self->rself = Data_Wrap_Struct(qlass, Clock_mark, Clock_free, self);
- self->serf = clock_new((void*)owner,(t_method)Clock_fn);
- self->owner = owner;
- return self->rself;
-}
-
-\def void set (double systime) { clock_set(serf, systime); }
-\def void delay(double delaytime) { clock_delay(serf,delaytime); }
-\def void unset() { clock_unset(serf); }
-
-\classinfo {}
-\end class Clock
-
-//****************************************************************
-
-Ruby GridFlow_s_post_string (Ruby rself, Ruby string) {
- if (TYPE(string)!=T_STRING) RAISE("not a string!");
- post("%s",rb_str_ptr(string));
- return Qnil;
-}
-
-#define SDEF(_name1_,_name2_,_argc_) \
- rb_define_singleton_method(mGridFlow2,_name1_,(RMethod)GridFlow_s_##_name2_,_argc_)
-
-Ruby gf_bridge_init (Ruby rself) {
- Ruby ver = EVAL("GridFlow::GF_VERSION");
- if (strcmp(rb_str_ptr(ver), GF_VERSION) != 0) {
- RAISE("GridFlow version mismatch: "
- "main library is '%s'; bridge is '%s'",
- rb_str_ptr(ver), GF_VERSION);
- }
- syms = FIX2PTR(BuiltinSymbols,rb_ivar_get(mGridFlow2,SI(@bsym)));
- Ruby fo = EVAL("GridFlow::FObject");
- rb_define_singleton_method(fo,"install2",(RMethod)FObject_s_install2,1);
- rb_define_singleton_method(fo,"gui_enable", (RMethod)FObject_s_gui_enable, 0);
- rb_define_singleton_method(fo,"set_help", (RMethod)FObject_s_set_help, 1);
- rb_define_method(fo,"get_position",(RMethod)FObject_get_position,1);
- rb_define_method(fo,"send_out2", (RMethod)FObject_send_out2,-1);
- rb_define_method(fo,"send_out2", (RMethod)FObject_send_out2,-1);
- rb_define_method(fo,"add_inlets", (RMethod)FObject_add_inlets, 1);
- rb_define_method(fo,"add_outlets", (RMethod)FObject_add_outlets, 1);
- rb_define_method(fo,"unfocus", (RMethod)FObject_unfocus, 1);
- rb_define_method(fo, "focus", (RMethod)FObject_focus, 3);
-
- SDEF("post_string",post_string,1);
- SDEF("add_creator_2",add_creator_2,1);
- SDEF("gui",gui,-1);
- SDEF("bind",bind,2);
- // SDEF("add_to_menu",add_to_menu,-1);
-
- \startall
- rb_define_singleton_method(EVAL("GridFlow::Clock" ),"new", (RMethod)Clock_s_new, 1);
- rb_define_singleton_method(EVAL("GridFlow::Pointer"),"new", (RMethod)Pointer_s_new, 1);
- mPointer = EVAL("GridFlow::Pointer");
- EVAL("class<<GridFlow;attr_accessor :config; end");
- EVAL("GridFlow.config = {'PUREDATA_PATH' => %{"PUREDATA_PATH"}}");
- return Qnil;
-}
-
-struct BFGridFlow : t_object {};
-
-t_class *bindpatcher;
-static void *bindpatcher_init (t_symbol *classsym, int ac, t_atom *at) {
- t_pd *bself = pd_new(bindpatcher);
- if (ac!=1 || at->a_type != A_SYMBOL) {
- post("bindpatcher: oops");
- } else {
- t_symbol *s = atom_getsymbol(at);
- post("binding patcher to: %s",s->s_name);
- pd_bind((t_pd *)canvas_getcurrent(),s);
- }
- return bself;
-}
-
-extern "C" void gridflow_setup () {
- char *foo[] = {"Ruby-for-PureData","-w","-e",";"};
- post("setting up Ruby-for-PureData...");
-/*
- post("pd_getfilename() = %s", pd_getfilename()->s_name);
- post("pd_getdirname() = %s", pd_getdirname()->s_name);
- post("canvas_getcurrentdir() = %p", canvas_getcurrentdir());
- char *dirresult = new char[242];
- char *nameresult;
- int fd = open_via_path("","gridflow",".so",dirresult,&nameresult,242,1);
- post("open_via_path: fd=%d dirresult=\"%s\" nameresult=\"%s\"",fd,dirresult,nameresult);
- delete[] dirresult;
-*/
- ruby_init();
- Init_stack(localize_sysstack());
- ruby_options(COUNT(foo),foo);
- post("we are using Ruby version %s",rb_str_ptr(EVAL("RUBY_VERSION")));
- Ruby cData = rb_const_get(rb_cObject,SI(Data));
- BFProxy_class = class_new(gensym("ruby_proxy"),
- NULL,NULL,sizeof(BFProxy),CLASS_PD|CLASS_NOINLET, A_NULL);
- class_addanything(BFProxy_class,BFProxy_method_missing);
- rb_define_singleton_method(cData,"gf_bridge_init",
- (RMethod)gf_bridge_init,0);
-
- mGridFlow2 = EVAL(
- "module GridFlow; class<<self; attr_reader :bridge_name; end; "
- "@bridge_name = 'puredata'; self end");
- post("(done)");
- if (!
- EVAL("begin require 'gridflow'; true; rescue Exception => e;\
- STDERR.puts \"[#{e.class}] [#{e.message}]:\n#{e.backtrace.join'\n'}\"; false; end"))
- {
- post("ERROR: Cannot load GridFlow-for-Ruby (gridflow.so)\n");
- return;
- }
- bindpatcher = class_new(gensym("bindpatcher"),
- (t_newmethod)bindpatcher_init, 0, sizeof(t_object),CLASS_DEFAULT,A_GIMME,0);
-}
-
-
diff --git a/externals/gridflow/bridge/puredata.rb b/externals/gridflow/bridge/puredata.rb
deleted file mode 100644
index 184bb2a7..00000000
--- a/externals/gridflow/bridge/puredata.rb
+++ /dev/null
@@ -1,194 +0,0 @@
-=begin
- $Id: puredata.rb,v 1.2 2006-03-15 04:38:20 matju Exp $
-
- GridFlow
- Copyright (c) 2001,2002 by Mathieu Bouchard
-
- 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.
-
- See file ../COPYING for further informations on licensing terms.
-
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-=end
-
-# <matju> alx1: in puredata.rb, just after the header, you have a %w() block,
-# and in it you write the name of your object, and if your helpfile is not
-# named like your object, then you add an equal sign and the filename
-
-#!@#$ DON'T PUT ABSTRACTIONS IN THE %w() !!!
-# @mouse=help_mouse @motion_detection=help_motion_detect @fade=help_fade
-# @apply_colormap_channelwise @checkers @complex_sq @contrast
-# @posterize @ravel @greyscale_to_rgb @rgb_to_greyscale @solarize @spread
-#rgb_to_yuv=#rgb_to_yuv_and_#yuv_to_rgb
-#yuv_to_rgb=#rgb_to_yuv_and_#yuv_to_rgb
-#clip #contrast #fade #numop #remap_image
-
-# NEW help files
-#!@#$ (what's #+-help.pd ? #print-help2.pd ?)
-%w(
- # #cast #dim #reverse
- #pack=#unpack-#pack
- #unpack=#unpack-#pack
- renamefile
- #in plotter_control
- listelement exec ls #print unix_time
-).each {|name|
- if name =~ /=/ then name,file = name.split(/=/) else file = name end
- begin
- x = GridFlow.fclasses[name]
- x.set_help "gridflow/flow_classes/#{file}-help.pd"
- rescue Exception => e
- GridFlow.post "for [#{name}], #{e.class}: #{e}" # + ":\n" + e.backtrace.join("\n")
- end
-}
-
-# OLD help files
-%w(
- @cast
- @convolve @downscale_by @draw_polygon @export=@importexport
- @finished @fold @for @global @grade
- @import=@importexport @inner=@foldinnerouter
- @in=@inout @join @layer @outer=@foldinnerouter @out=@inout
- @! @perspective printargs @print @redim
- rubyprint @scale_by @scale_to @scan
- @store
-).each {|name|
- if name =~ /=/ then name,file = name.split(/=/) else file = name end
- begin
- GridFlow.fclasses[name].set_help "gridflow/#{file}.pd"
- rescue Exception => e
- GridFlow.post "ruby #{e.class}: #{e}:\n" + e.backtrace.join("\n")
- end
-}
-
-#GridFlow.gui "frame .controls.gridflow -relief ridge -borderwidth 2\n"
-#GridFlow.gui "button .controls.gridflow.button -text FOO\n"
-#GridFlow.gui "pack .controls.gridflow.button -side left\n"
-#GridFlow.gui "pack .controls.gridflow -side right\n"
-
-GridFlow.gui %q{
-
-if {[catch {
- # pd 0.37
- menu .mbar.gridflow -tearoff $pd_tearoff
- .mbar add cascade -label "GridFlow" -menu .mbar.gridflow
- set gfmenu .mbar.gridflow
-}]} {
- # pd 0.36
- ###the problem is that GridFlow.bind requires 0.37
-}
-catch {
-$gfmenu add command -label "profiler_dump" -command {pd "gridflow profiler_dump;"}
-$gfmenu add command -label "profiler_reset" -command {pd "gridflow profiler_reset;"}
-$gfmenu add command -label "formats" -command {pd "gridflow formats;"}
-}
-
-if {[string length [info command post]] == 0} {
- proc post {x} {puts $x}
-}
-
-# if not running Impd:
-if {[string length [info command listener_new]] == 0} {
-# start of part duplicated from Impd
-proc listener_new {self name} {
- global _
- set _($self:hist) {}
- set _($self:histi) 0
- frame $self
- label $self.label -text "$name: "
- entry $self.entry -width 40
-# entry $self.count -width 5
- pack $self.label -side left
- pack $self.entry -side left -fill x -expand yes
-# pack $self.count -side left
- pack $self -fill x -expand no
- bind $self.entry <Up> "listener_up $self"
- bind $self.entry <Down> "listener_down $self"
-}
-
-proc listener_up {self} {
- global _
- if {$_($self:histi) > 0} {set _($self:histi) [expr -1+$_($self:histi)]}
- $self.entry delete 0 end
- $self.entry insert 0 [lindex $_($self:hist) $_($self:histi)]
- $self.entry icursor end
-# $self.count delete 0 end
-# $self.count insert 0 "$_($self:histi)/[llength $_($self:hist)]"
-}
-
-proc listener_down {self} {
- global _
- if {$_($self:histi) < [llength $_($self:hist)]} {incr _($self:histi)}
- $self.entry delete 0 end
- $self.entry insert 0 [lindex $_($self:hist) $_($self:histi)]
- $self.entry icursor end
-# $self.count delete 0 end
-# $self.count insert 0 "$_($self:histi)/[llength $_($self:hist)]"
-}
-
-proc listener_append {self v} {
- global _
- lappend _($self:hist) $v
- set _($self:histi) [llength $_($self:hist)]
-}
-
-proc tcl_eval {} {
- set l [.tcl.entry get]
- post "tcl: $l"
- post "returns: [eval $l]"
- listener_append .tcl [.tcl.entry get]
- .tcl.entry delete 0 end
-
-}
-if {[catch {
- listener_new .tcl "Tcl"
- bind .tcl.entry <Return> {tcl_eval}
-}]} {
- listener_new .tcl "Tcl" {tcl_eval}
-}
-
-
-}
-# end of part duplicated from Impd
-
-proc ruby_eval {} {
- set l {}
- foreach c [split [.ruby.entry get] ""] {lappend l [scan $c %c]}
- pd "gridflow eval $l;"
- listener_append .ruby [.ruby.entry get]
- .ruby.entry delete 0 end
-}
-
-if {[catch {
- listener_new .ruby "Ruby"
- bind .ruby.entry <Return> {ruby_eval}
-}]} {
- listener_new .ruby "Ruby" {ruby_eval}
-}
-
-} # GridFlow.gui
-
-if false
-GridFlow.gui %q{
-catch {
- if {[file exists ${pd_guidir}/lib/gridflow/icons/peephole.gif]} {
- global pd_guidir
- image create photo icon_peephole -file ${pd_guidir}/lib/gridflow/icons/peephole.gif
- global butt
- button_bar_add peephole {guiext peephole}
- } {
- puts $stderr GAAAH
- }
-}
-} # GridFlow.gui
-end
diff --git a/externals/gridflow/bundled/pd/g_canvas.h b/externals/gridflow/bundled/pd/g_canvas.h
deleted file mode 100644
index 07fa75b5..00000000
--- a/externals/gridflow/bundled/pd/g_canvas.h
+++ /dev/null
@@ -1,645 +0,0 @@
-
-/* Copyright (c) 1997-1999 Miller Puckette.
-* For information on usage and redistribution, and for a DISCLAIMER OF ALL
-* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
-
-/* this file defines the structure for "glists" and related structures and
-functions. "Glists" and "canvases" and "graphs" used to be different
-structures until being unified in version 0.35.
-
-A glist occupies its own window if the "gl_havewindow" flag is set. Its
-appearance on its "parent" or "owner" (if it has one) is as a graph if
-"gl_isgraph" is set, and otherwise as a text box.
-
-A glist is "root" if it has no owner, i.e., a document window. In this
-case "gl_havewindow" is always set.
-
-We maintain a list of root windows, so that we can traverse the whole
-collection of everything in a Pd process.
-
-If a glist has a window it may still not be "mapped." Miniaturized
-windows aren't mapped, for example, but a window is also not mapped
-immediately upon creation. In either case gl_havewindow is true but
-gl_mapped is false.
-
-Closing a non-root window makes it invisible; closing a root destroys it.
-
-A glist that's just a text object on its parent is always "toplevel." An
-embedded glist can switch back and forth to appear as a toplevel by double-
-clicking on it. Single-clicking a text box makes the toplevel become visible
-and raises the window it's in.
-
-If a glist shows up as a graph on its parent, the graph is blanked while the
-glist has its own window, even if miniaturized.
-
-*/
-
-/* NOTE: this file describes Pd implementation details which may change
-in future releases. The public (stable) API is in m_pd.h. */
-
-#ifndef __G_CANVAS_H
-#define __G_CANVAS_H
-#ifndef DESIRE
-
-#if defined(_LANGUAGE_C_PLUS_PLUS) || defined(__cplusplus)
-extern "C" {
-#endif
-
-
-/* --------------------- geometry ---------------------------- */
-#define IOWIDTH 7 /* width of an inlet/outlet in pixels */
-#define IOMIDDLE ((IOWIDTH-1)/2)
-#define GLIST_DEFGRAPHWIDTH 200
-#define GLIST_DEFGRAPHHEIGHT 140
-/* ----------------------- data ------------------------------- */
-
-typedef struct _updateheader
-{
- struct _updateheader *upd_next;
- unsigned int upd_array:1; /* true if array, false if glist */
- unsigned int upd_queued:1; /* true if we're queued */
-} t_updateheader;
-
- /* types to support glists grabbing mouse motion or keys from parent */
-typedef void (*t_glistmotionfn)(void *z, t_floatarg dx, t_floatarg dy);
-typedef void (*t_glistkeyfn)(void *z, t_floatarg key);
-#endif /*DESIRE*/
-
-
-EXTERN_STRUCT _rtext;
-#define t_rtext struct _rtext
-
-#ifndef DESIRE
-
-EXTERN_STRUCT _gtemplate;
-#define t_gtemplate struct _gtemplate
-
-EXTERN_STRUCT _guiconnect;
-#define t_guiconnect struct _guiconnect
-
-EXTERN_STRUCT _tscalar;
-#define t_tscalar struct _tscalar
-
-EXTERN_STRUCT _canvasenvironment;
-#define t_canvasenvironment struct _canvasenvironment
-
-EXTERN_STRUCT _fielddesc;
-#define t_fielddesc struct _fielddesc
-
-typedef struct _selection
-{
- t_gobj *sel_what;
- struct _selection *sel_next;
-} t_selection;
-
- /* this structure is instantiated whenever a glist becomes visible. */
-typedef struct _editor
-{
- t_updateheader e_upd; /* update header structure */
- t_selection *e_updlist; /* list of objects to update */
- t_rtext *e_rtext; /* text responder linked list */
- t_selection *e_selection; /* head of the selection list */
- t_rtext *e_textedfor; /* the rtext if any that we are editing */
- t_gobj *e_grab; /* object being "dragged" */
- t_glistmotionfn e_motionfn; /* ... motion callback */
- t_glistkeyfn e_keyfn; /* ... keypress callback */
- t_binbuf *e_connectbuf; /* connections to deleted objects */
- t_binbuf *e_deleted; /* last stuff we deleted */
- t_guiconnect *e_guiconnect; /* GUI connection for filtering messages */
- struct _glist *e_glist; /* glist which owns this */
- int e_xwas; /* xpos on last mousedown or motion event */
- int e_ywas; /* ypos, similarly */
- int e_selectline_index1; /* indices for the selected line if any */
- int e_selectline_outno; /* (only valid if e_selectedline is set) */
- int e_selectline_index2;
- int e_selectline_inno;
- t_outconnect *e_selectline_tag;
- unsigned int e_onmotion: 3; /* action to take on motion */
- unsigned int e_lastmoved: 1; /* one if mouse has moved since click */
- unsigned int e_textdirty: 1; /* one if e_textedfor has changed */
- unsigned int e_selectedline: 1; /* one if a line is selected */
-} t_editor;
-
-#define MA_NONE 0 /* e_onmotion: do nothing on mouse motion */
-#define MA_MOVE 1 /* drag the selection around */
-#define MA_CONNECT 2 /* make a connection */
-#define MA_REGION 3 /* selection region */
-#define MA_PASSOUT 4 /* send on to e_grab */
-#define MA_DRAGTEXT 5 /* drag in text editor to alter selection */
-
-/* editor structure for "garrays". We don't bother to delete and regenerate
-this structure when the "garray" becomes invisible or visible, although we
-could do so if the structure gets big (like the "editor" above.) */
-
-typedef struct _arrayvis
-{
- t_updateheader av_upd; /* update header structure */
- t_garray *av_garray; /* owning structure */
-} t_arrayvis;
-
-/* the t_tick structure describes where to draw x and y "ticks" for a glist */
-
-typedef struct _tick /* where to put ticks on x or y axes */
-{
- float k_point; /* one point to draw a big tick at */
- float k_inc; /* x or y increment per little tick */
- int k_lperb; /* little ticks per big; 0 if no ticks to draw */
-} t_tick;
-
-/* the t_glist structure, which describes a list of elements that live on an
-area of a window.
-
-*/
-
-struct _glist
-{
- t_object gl_obj; /* header in case we're a glist */
- t_gobj *gl_list; /* the actual data */
- struct _gstub *gl_stub; /* safe pointer handler */
- int gl_valid; /* incremented when pointers might be stale */
- struct _glist *gl_owner; /* parent glist, supercanvas, or 0 if none */
- int gl_pixwidth; /* width in pixels (on parent, if a graph) */
- int gl_pixheight;
- float gl_x1; /* bounding rectangle in our own coordinates */
- float gl_y1;
- float gl_x2;
- float gl_y2;
- int gl_screenx1; /* screen coordinates when toplevel */
- int gl_screeny1;
- int gl_screenx2;
- int gl_screeny2;
- int gl_xmargin; /* origin for GOP rectangle */
- int gl_ymargin;
- t_tick gl_xtick; /* ticks marking X values */
- int gl_nxlabels; /* number of X coordinate labels */
- t_symbol **gl_xlabel; /* ... an array to hold them */
- float gl_xlabely; /* ... and their Y coordinates */
- t_tick gl_ytick; /* same as above for Y ticks and labels */
- int gl_nylabels;
- t_symbol **gl_ylabel;
- float gl_ylabelx;
- t_editor *gl_editor; /* editor structure when visible */
- t_symbol *gl_name; /* symbol bound here */
- int gl_font; /* nominal font size in points, e.g., 10 */
- struct _glist *gl_next; /* link in list of toplevels */
- t_canvasenvironment *gl_env; /* root canvases and abstractions only */
- unsigned int gl_havewindow:1; /* true if we own a window */
- unsigned int gl_mapped:1; /* true if, moreover, it's "mapped" */
- unsigned int gl_dirty:1; /* (root canvas only:) patch has changed */
- unsigned int gl_loading:1; /* am now loading from file */
- unsigned int gl_willvis:1; /* make me visible after loading */
- unsigned int gl_edit:1; /* edit mode */
- unsigned int gl_isdeleting:1; /* we're inside glist_delete -- hack! */
- unsigned int gl_goprect:1; /* draw rectangle for graph-on-parent */
- unsigned int gl_isgraph:1; /* show as graph on parent */
-};
-
-#define gl_gobj gl_obj.te_g
-#define gl_pd gl_gobj.g_pd
-
-/* a data structure to describe a field in a pure datum */
-
-#define DT_FLOAT 0
-#define DT_SYMBOL 1
-#define DT_LIST 2
-#define DT_ARRAY 3
-
-typedef struct _dataslot
-{
- int ds_type;
- t_symbol *ds_name;
- t_symbol *ds_arraytemplate; /* filled in for arrays only */
-} t_dataslot;
-
-typedef struct _template
-{
- t_pd t_pdobj; /* header */
- struct _gtemplate *t_list; /* list of "struct"/gtemplate objects */
- t_symbol *t_sym; /* name */
- int t_n; /* number of dataslots (fields) */
- t_dataslot *t_vec; /* array of dataslots */
-} t_template;
-
-struct _array
-{
- int a_n; /* number of elements */
- int a_elemsize; /* size in bytes; LATER get this from template */
- char *a_vec; /* array of elements */
- t_symbol *a_templatesym; /* template for elements */
- int a_valid; /* protection against stale pointers into array */
- t_gpointer a_gp; /* pointer to scalar or array element we're in */
- t_gstub *a_stub; /* stub for pointing into this array */
-};
-
-struct _garray
-{
- t_gobj x_gobj;
- t_scalar *x_scalar; /* scalar "containing" the array */
- t_glist *x_glist; /* containing glist */
- t_symbol *x_name; /* unexpanded name (possibly with leading '$') */
- t_symbol *x_realname; /* expanded name (symbol we're bound to) */
- char x_usedindsp; /* true if some DSP routine is using this */
- char x_saveit; /* true if we should save this with parent */
- char x_listviewing; /* true if list view window is open */
- double x_lastupdate; /* T.Grill - clock_getlogicaltime() of last array update */
-};
-
- /* structure for traversing all the connections in a glist */
-typedef struct _linetraverser
-{
- t_canvas *tr_x;
- t_object *tr_ob;
- int tr_nout;
- int tr_outno;
- t_object *tr_ob2;
- t_outlet *tr_outlet;
- t_inlet *tr_inlet;
- int tr_nin;
- int tr_inno;
- int tr_x11, tr_y11, tr_x12, tr_y12;
- int tr_x21, tr_y21, tr_x22, tr_y22;
- int tr_lx1, tr_ly1, tr_lx2, tr_ly2;
- t_outconnect *tr_nextoc;
- int tr_nextoutno;
-} t_linetraverser;
-
-/* function types used to define graphical behavior for gobjs, a bit like X
-widgets. We don't use Pd methods because Pd's typechecking can't specify the
-types of pointer arguments. Also it's more convenient this way, since
-every "patchable" object can just get the "text" behaviors. */
-
- /* Call this to get a gobj's bounding rectangle in pixels */
-typedef void (*t_getrectfn)(t_gobj *x, struct _glist *glist,
- int *x1, int *y1, int *x2, int *y2);
- /* and this to displace a gobj: */
-typedef void (*t_displacefn)(t_gobj *x, struct _glist *glist, int dx, int dy);
- /* change color to show selection: */
-typedef void (*t_selectfn)(t_gobj *x, struct _glist *glist, int state);
- /* change appearance to show activation/deactivation: */
-typedef void (*t_activatefn)(t_gobj *x, struct _glist *glist, int state);
- /* warn a gobj it's about to be deleted */
-typedef void (*t_deletefn)(t_gobj *x, struct _glist *glist);
- /* making visible or invisible */
-typedef void (*t_visfn)(t_gobj *x, struct _glist *glist, int flag);
- /* field a mouse click (when not in "edit" mode) */
-typedef int (*t_clickfn)(t_gobj *x, struct _glist *glist,
- int xpix, int ypix, int shift, int alt, int dbl, int doit);
- /* ... and later, resizing; getting/setting font or color... */
-
-struct _widgetbehavior
-{
- t_getrectfn w_getrectfn;
- t_displacefn w_displacefn;
- t_selectfn w_selectfn;
- t_activatefn w_activatefn;
- t_deletefn w_deletefn;
- t_visfn w_visfn;
- t_clickfn w_clickfn;
-};
-
-/* -------- behaviors for scalars defined by objects in template --------- */
-/* these are set by "drawing commands" in g_template.c which add appearance to
-scalars, which live in some other window. If the scalar is just included
-in a canvas the "parent" is a misnomer. There is also a text scalar object
-which really does draw the scalar on the parent window; see g_scalar.c. */
-
-/* note how the click function wants the whole scalar, not the "data", so
-doesn't work on array elements... LATER reconsider this */
-
- /* bounding rectangle: */
-typedef void (*t_parentgetrectfn)(t_gobj *x, struct _glist *glist,
- t_word *data, t_template *tmpl, float basex, float basey,
- int *x1, int *y1, int *x2, int *y2);
- /* displace it */
-typedef void (*t_parentdisplacefn)(t_gobj *x, struct _glist *glist,
- t_word *data, t_template *tmpl, float basex, float basey,
- int dx, int dy);
- /* change color to show selection */
-typedef void (*t_parentselectfn)(t_gobj *x, struct _glist *glist,
- t_word *data, t_template *tmpl, float basex, float basey,
- int state);
- /* change appearance to show activation/deactivation: */
-typedef void (*t_parentactivatefn)(t_gobj *x, struct _glist *glist,
- t_word *data, t_template *tmpl, float basex, float basey,
- int state);
- /* making visible or invisible */
-typedef void (*t_parentvisfn)(t_gobj *x, struct _glist *glist,
- t_word *data, t_template *tmpl, float basex, float basey,
- int flag);
- /* field a mouse click */
-typedef int (*t_parentclickfn)(t_gobj *x, struct _glist *glist,
- t_word *data, t_template *tmpl, t_scalar *sc, t_array *ap,
- float basex, float basey,
- int xpix, int ypix, int shift, int alt, int dbl, int doit);
-
-struct _parentwidgetbehavior
-{
- t_parentgetrectfn w_parentgetrectfn;
- t_parentdisplacefn w_parentdisplacefn;
- t_parentselectfn w_parentselectfn;
- t_parentactivatefn w_parentactivatefn;
- t_parentvisfn w_parentvisfn;
- t_parentclickfn w_parentclickfn;
-};
-
- /* cursor definitions; used as return value for t_parentclickfn */
-#define CURSOR_RUNMODE_NOTHING 0
-#define CURSOR_RUNMODE_CLICKME 1
-#define CURSOR_RUNMODE_THICKEN 2
-#define CURSOR_RUNMODE_ADDPOINT 3
-#define CURSOR_EDITMODE_NOTHING 4
-#define CURSOR_EDITMODE_CONNECT 5
-#define CURSOR_EDITMODE_DISCONNECT 6
-EXTERN void canvas_setcursor(t_glist *x, unsigned int cursornum);
-
-extern t_canvas *canvas_editing; /* last canvas to start text edting */
-extern t_canvas *canvas_whichfind; /* last canvas we did a find in */
-extern t_canvas *canvas_list; /* list of all root canvases */
-extern t_class *vinlet_class, *voutlet_class;
-extern int glist_valid; /* incremented when pointers might be stale */
-
-#define PLOTSTYLE_POINTS 0 /* plotting styles for arrays */
-#define PLOTSTYLE_POLY 1
-#define PLOTSTYLE_BEZ 2
-
-/* ------------------- functions on any gobj ----------------------------- */
-EXTERN void gobj_getrect(t_gobj *x, t_glist *owner, int *x1, int *y1,
- int *x2, int *y2);
-EXTERN void gobj_displace(t_gobj *x, t_glist *owner, int dx, int dy);
-EXTERN void gobj_select(t_gobj *x, t_glist *owner, int state);
-EXTERN void gobj_activate(t_gobj *x, t_glist *owner, int state);
-EXTERN void gobj_delete(t_gobj *x, t_glist *owner);
-EXTERN void gobj_vis(t_gobj *x, t_glist *glist, int flag);
-EXTERN int gobj_click(t_gobj *x, struct _glist *glist,
- int xpix, int ypix, int shift, int alt, int dbl, int doit);
-EXTERN void gobj_save(t_gobj *x, t_binbuf *b);
-EXTERN void gobj_properties(t_gobj *x, struct _glist *glist);
-EXTERN void gobj_save(t_gobj *x, t_binbuf *b);
-
-/* -------------------- functions on glists --------------------- */
-EXTERN t_glist *glist_new( void);
-EXTERN void glist_init(t_glist *x);
-EXTERN void glist_add(t_glist *x, t_gobj *g);
-EXTERN void glist_cleanup(t_glist *x);
-EXTERN void glist_free(t_glist *x);
-
-EXTERN void glist_clear(t_glist *x);
-EXTERN t_canvas *glist_getcanvas(t_glist *x);
-EXTERN int glist_isselected(t_glist *x, t_gobj *y);
-EXTERN void glist_select(t_glist *x, t_gobj *y);
-EXTERN void glist_deselect(t_glist *x, t_gobj *y);
-EXTERN void glist_noselect(t_glist *x);
-EXTERN void glist_selectall(t_glist *x);
-EXTERN void glist_delete(t_glist *x, t_gobj *y);
-EXTERN void glist_retext(t_glist *x, t_text *y);
-EXTERN void glist_grab(t_glist *x, t_gobj *y, t_glistmotionfn motionfn,
- t_glistkeyfn keyfn, int xpos, int ypos);
-EXTERN int glist_isvisible(t_glist *x);
-EXTERN int glist_istoplevel(t_glist *x);
-EXTERN t_glist *glist_findgraph(t_glist *x);
-EXTERN int glist_getfont(t_glist *x);
-EXTERN void glist_sort(t_glist *canvas);
-EXTERN void glist_read(t_glist *x, t_symbol *filename, t_symbol *format);
-EXTERN void glist_mergefile(t_glist *x, t_symbol *filename, t_symbol *format);
-
-EXTERN float glist_pixelstox(t_glist *x, float xpix);
-EXTERN float glist_pixelstoy(t_glist *x, float ypix);
-EXTERN float glist_xtopixels(t_glist *x, float xval);
-EXTERN float glist_ytopixels(t_glist *x, float yval);
-EXTERN float glist_dpixtodx(t_glist *x, float dxpix);
-EXTERN float glist_dpixtody(t_glist *x, float dypix);
-
-EXTERN void glist_getnextxy(t_glist *gl, int *xval, int *yval);
-EXTERN void glist_glist(t_glist *g, t_symbol *s, int argc, t_atom *argv);
-EXTERN t_glist *glist_addglist(t_glist *g, t_symbol *sym,
- float x1, float y1, float x2, float y2,
- float px1, float py1, float px2, float py2);
-EXTERN void glist_arraydialog(t_glist *parent, t_symbol *name,
- t_floatarg size, t_floatarg saveit, t_floatarg newgraph);
-EXTERN t_binbuf *glist_writetobinbuf(t_glist *x, int wholething);
-EXTERN int glist_isgraph(t_glist *x);
-EXTERN void glist_redraw(t_glist *x);
-EXTERN void glist_drawiofor(t_glist *glist, t_object *ob, int firsttime,
- char *tag, int x1, int y1, int x2, int y2);
-EXTERN void glist_eraseiofor(t_glist *glist, t_object *ob, char *tag);
-EXTERN void canvas_create_editor(t_glist *x, int createit);
-void canvas_deletelinesforio(t_canvas *x, t_text *text,
- t_inlet *inp, t_outlet *outp);
-
-
-/* -------------------- functions on texts ------------------------- */
-EXTERN void text_setto(t_text *x, t_glist *glist, char *buf, int bufsize);
-EXTERN void text_drawborder(t_text *x, t_glist *glist, char *tag,
- int width, int height, int firsttime);
-EXTERN void text_eraseborder(t_text *x, t_glist *glist, char *tag);
-EXTERN int text_xcoord(t_text *x, t_glist *glist);
-EXTERN int text_ycoord(t_text *x, t_glist *glist);
-EXTERN int text_xpix(t_text *x, t_glist *glist);
-EXTERN int text_ypix(t_text *x, t_glist *glist);
-EXTERN int text_shouldvis(t_text *x, t_glist *glist);
-#endif /*DESIRE */
-
-/* -------------------- functions on rtexts ------------------------- */
-
-#define RTEXT_DOWN 1
-#define RTEXT_DRAG 2
-#define RTEXT_DBL 3
-#define RTEXT_SHIFT 4
-
-EXTERN t_rtext *rtext_new(t_glist *glist, t_text *who);
-EXTERN t_rtext *glist_findrtext(t_glist *gl, t_text *who);
-EXTERN void rtext_draw(t_rtext *x);
-EXTERN void rtext_erase(t_rtext *x);
-EXTERN t_rtext *rtext_remove(t_rtext *first, t_rtext *x);
-EXTERN int rtext_height(t_rtext *x);
-EXTERN void rtext_displace(t_rtext *x, int dx, int dy);
-EXTERN void rtext_select(t_rtext *x, int state);
-EXTERN void rtext_activate(t_rtext *x, int state);
-EXTERN void rtext_free(t_rtext *x);
-EXTERN void rtext_key(t_rtext *x, int n, t_symbol *s);
-EXTERN void rtext_mouse(t_rtext *x, int xval, int yval, int flag);
-EXTERN void rtext_retext(t_rtext *x);
-EXTERN int rtext_width(t_rtext *x);
-EXTERN int rtext_height(t_rtext *x);
-EXTERN char *rtext_gettag(t_rtext *x);
-EXTERN void rtext_gettext(t_rtext *x, char **buf, int *bufsize);
-EXTERN void rtext_getseltext(t_rtext *x, char **buf, int *bufsize);
-
-/* -------------------- functions on canvases ------------------------ */
-#ifndef DESIRE
-EXTERN t_class *canvas_class;
-
-EXTERN t_canvas *canvas_new(void *dummy, t_symbol *sel, int argc, t_atom *argv);
-EXTERN t_symbol *canvas_makebindsym(t_symbol *s);
-EXTERN void canvas_vistext(t_canvas *x, t_text *y);
-EXTERN void canvas_fixlinesfor(t_canvas *x, t_text *text);
-EXTERN void canvas_deletelinesfor(t_canvas *x, t_text *text);
-EXTERN void canvas_stowconnections(t_canvas *x);
-EXTERN void canvas_restoreconnections(t_canvas *x);
-EXTERN void canvas_redraw(t_canvas *x);
-
-EXTERN t_inlet *canvas_addinlet(t_canvas *x, t_pd *who, t_symbol *sym, t_symbol* h);
-EXTERN void canvas_rminlet(t_canvas *x, t_inlet *ip);
-EXTERN t_outlet *canvas_addoutlet(t_canvas *x, t_pd *who, t_symbol *sym);
-EXTERN void canvas_rmoutlet(t_canvas *x, t_outlet *op);
-EXTERN void canvas_redrawallfortemplate(t_template *tmpl, int action);
-EXTERN void canvas_redrawallfortemplatecanvas(t_canvas *x, int action);
-EXTERN void canvas_zapallfortemplate(t_canvas *tmpl);
-EXTERN void canvas_setusedastemplate(t_canvas *x);
-EXTERN t_canvas *canvas_getcurrent(void);
-EXTERN void canvas_setcurrent(t_canvas *x);
-EXTERN void canvas_unsetcurrent(t_canvas *x);
-EXTERN t_symbol *canvas_realizedollar(t_canvas *x, t_symbol *s);
-EXTERN t_canvas *canvas_getrootfor(t_canvas *x);
-EXTERN void canvas_dirty(t_canvas *x, t_int n);
-EXTERN int canvas_getfont(t_canvas *x);
-typedef int (*t_canvasapply)(t_canvas *x, t_int x1, t_int x2, t_int x3);
-
-EXTERN t_int *canvas_recurapply(t_canvas *x, t_canvasapply *fn,
- t_int x1, t_int x2, t_int x3);
-
-EXTERN void canvas_resortinlets(t_canvas *x);
-EXTERN void canvas_resortoutlets(t_canvas *x);
-EXTERN void canvas_free(t_canvas *x);
-EXTERN void canvas_updatewindowlist( void);
-EXTERN void canvas_editmode(t_canvas *x, t_floatarg yesplease);
-EXTERN int canvas_isabstraction(t_canvas *x);
-EXTERN int canvas_istable(t_canvas *x);
-EXTERN int canvas_showtext(t_canvas *x);
-EXTERN void canvas_vis(t_canvas *x, t_floatarg f);
-EXTERN t_canvasenvironment *canvas_getenv(t_canvas *x);
-EXTERN void canvas_rename(t_canvas *x, t_symbol *s, t_symbol *dir);
-EXTERN void canvas_loadbang(t_canvas *x);
-EXTERN int canvas_hitbox(t_canvas *x, t_gobj *y, int xpos, int ypos,
- int *x1p, int *y1p, int *x2p, int *y2p);
-EXTERN int canvas_setdeleting(t_canvas *x, int flag);
-
-typedef void (*t_undofn)(t_canvas *canvas, void *buf,
- int action); /* a function that does UNDO/REDO */
-#define UNDO_FREE 0 /* free current undo/redo buffer */
-#define UNDO_UNDO 1 /* undo */
-#define UNDO_REDO 2 /* redo */
-EXTERN void canvas_setundo(t_canvas *x, t_undofn undofn, void *buf,
- const char *name);
-EXTERN void canvas_noundo(t_canvas *x);
-EXTERN int canvas_getindex(t_canvas *x, t_gobj *y);
-
-EXTERN void canvas_connect(t_canvas *x,
- t_floatarg fwhoout, t_floatarg foutno,t_floatarg fwhoin, t_floatarg finno);
-EXTERN void canvas_disconnect(t_canvas *x,
- float index1, float outno, float index2, float inno);
-EXTERN int canvas_isconnected (t_canvas *x,
- t_text *ob1, int n1, t_text *ob2, int n2);
-EXTERN void canvas_selectinrect(t_canvas *x, int lox, int loy, int hix, int hiy);
-
-
-/* ---- functions on canvasses as objects --------------------- */
-
-EXTERN void canvas_fattenforscalars(t_canvas *x,
- int *x1, int *y1, int *x2, int *y2);
-EXTERN void canvas_visforscalars(t_canvas *x, t_glist *glist, int vis);
-EXTERN int canvas_clicksub(t_canvas *x, int xpix, int ypix, int shift,
- int alt, int dbl, int doit);
-EXTERN t_glist *canvas_getglistonsuper(void);
-
-EXTERN void linetraverser_start(t_linetraverser *t, t_canvas *x);
-EXTERN t_outconnect *linetraverser_next(t_linetraverser *t);
-EXTERN void linetraverser_skipobject(t_linetraverser *t);
-
-/* --------- functions on garrays (graphical arrays) -------------------- */
-
-EXTERN t_template *garray_template(t_garray *x);
-
-/* -------------------- arrays --------------------- */
-EXTERN t_garray *graph_array(t_glist *gl, t_symbol *s, t_symbol *tmpl,
- t_floatarg f, t_floatarg saveit);
-EXTERN t_array *array_new(t_symbol *templatesym, t_gpointer *parent);
-EXTERN void array_resize(t_array *x, int n);
-EXTERN void array_free(t_array *x);
-
-/* --------------------- gpointers and stubs ---------------- */
-EXTERN t_gstub *gstub_new(t_glist *gl, t_array *a);
-EXTERN void gstub_cutoff(t_gstub *gs);
-EXTERN void gpointer_setglist(t_gpointer *gp, t_glist *glist, t_scalar *x);
-
-/* --------------------- scalars ------------------------- */
-EXTERN void word_init(t_word *wp, t_template *tmpl, t_gpointer *gp);
-EXTERN void word_restore(t_word *wp, t_template *tmpl,
- int argc, t_atom *argv);
-EXTERN t_scalar *scalar_new(t_glist *owner,
- t_symbol *templatesym);
-EXTERN void word_free(t_word *wp, t_template *tmpl);
-EXTERN void scalar_getbasexy(t_scalar *x, float *basex, float *basey);
-EXTERN void scalar_redraw(t_scalar *x, t_glist *glist);
-
-/* ------helper routines for "garrays" and "plots" -------------- */
-EXTERN int array_doclick(t_array *array, t_glist *glist, t_scalar *sc, t_array *ap,
- t_symbol *elemtemplatesym,
- float linewidth, float xloc, float xinc, float yloc, float scalarvis,
- t_fielddesc *xfield, t_fielddesc *yfield, t_fielddesc *wfield,
- int xpix, int ypix, int shift, int alt, int dbl, int doit);
-
-EXTERN void array_getcoordinate(t_glist *glist,
- char *elem, int xonset, int yonset, int wonset, int indx,
- float basex, float basey, float xinc,
- t_fielddesc *xfielddesc, t_fielddesc *yfielddesc, t_fielddesc *wfielddesc,
- float *xp, float *yp, float *wp);
-
-EXTERN int array_getfields(t_symbol *elemtemplatesym,
- t_canvas **elemtemplatecanvasp,
- t_template **elemtemplatep, int *elemsizep,
- t_fielddesc *xfielddesc, t_fielddesc *yfielddesc, t_fielddesc *wfielddesc,
- int *xonsetp, int *yonsetp, int *wonsetp);
-
-/* --------------------- templates ------------------------- */
-EXTERN t_template *template_new(t_symbol *sym, int argc, t_atom *argv);
-EXTERN void template_free(t_template *x);
-EXTERN int template_match(t_template *x1, t_template *x2);
-EXTERN int template_find_field(t_template *x, t_symbol *name, int *p_onset,
- int *p_type, t_symbol **p_arraytype);
-EXTERN t_float template_getfloat(t_template *x, t_symbol *fieldname, t_word *wp,
- int loud);
-EXTERN void template_setfloat(t_template *x, t_symbol *fieldname, t_word *wp,
- t_float f, int loud);
-EXTERN t_symbol *template_getsymbol(t_template *x, t_symbol *fieldname,
- t_word *wp, int loud);
-EXTERN void template_setsymbol(t_template *x, t_symbol *fieldname,
- t_word *wp, t_symbol *s, int loud);
-
-EXTERN t_template *gtemplate_get(t_gtemplate *x);
-EXTERN t_template *template_findbyname(t_symbol *s);
-EXTERN t_canvas *template_findcanvas(t_template *tmpl);
-EXTERN void template_notify(t_template *tmpl,
- t_symbol *s, int argc, t_atom *argv);
-
-EXTERN t_float template_getfloat(t_template *x, t_symbol *fieldname,
- t_word *wp, int loud);
-EXTERN void template_setfloat(t_template *x, t_symbol *fieldname,
- t_word *wp, t_float f, int loud);
-EXTERN t_symbol *template_getsymbol(t_template *x, t_symbol *fieldname,
- t_word *wp, int loud);
-EXTERN void template_setsymbol(t_template *x, t_symbol *fieldname,
- t_word *wp, t_symbol *s, int loud);
-EXTERN t_float fielddesc_getcoord(t_fielddesc *f, t_template *tmpl,
- t_word *wp, int loud);
-EXTERN void fielddesc_setcoord(t_fielddesc *f, t_template *tmpl,
- t_word *wp, float pix, int loud);
-EXTERN t_float fielddesc_cvttocoord(t_fielddesc *f, float val);
-EXTERN float fielddesc_cvtfromcoord(t_fielddesc *f, float coord);
-
-
-/* ----------------------- guiconnects, g_guiconnect.c --------- */
-EXTERN t_guiconnect *guiconnect_new(t_pd *who, t_symbol *sym);
-EXTERN void guiconnect_notarget(t_guiconnect *x, double timedelay);
-
-/* ------------- IEMGUI routines used in other g_ files ---------------- */
-EXTERN t_symbol *iemgui_raute2dollar(t_symbol *s);
-EXTERN t_symbol *iemgui_dollar2raute(t_symbol *s);
-
-#if defined(_LANGUAGE_C_PLUS_PLUS) || defined(__cplusplus)
-}
-#endif
-
-#endif /* DESIRE */
-#endif /* __G_CANVAS_H */
-
diff --git a/externals/gridflow/cpu/mmx.rb b/externals/gridflow/cpu/mmx.rb
deleted file mode 100644
index 1a3b15d3..00000000
--- a/externals/gridflow/cpu/mmx.rb
+++ /dev/null
@@ -1,225 +0,0 @@
-=begin
- $Id: mmx.rb,v 1.1 2005-10-04 02:02:14 matju Exp $
-
- GridFlow
- Copyright (c) 2001,2002,2003,2004 by Mathieu Bouchard
-
- 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.
-
- See file ../COPYING for further informations on licensing terms.
-
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-=end
-
-STDOUT.reopen ARGV[0], "w"
-$loader = File.open ARGV[1], "w"
-$count = 0
-$lines = 0
-
-puts "; generated by/for GridFlow 0.8.0"
-$loader.puts "#include \"../base/grid.h.fcs\"\nextern \"C\" {"
-
-# this class is not really used yet (only self.make)
-class AsmFunction
- def initialize(name)
- @name = name
- @label_count = 1
- end
- def self.make(name)
- puts "", "GLOBAL #{name}", "#{name}:"
- puts "push ebp", "mov ebp,esp", "push esi", "push edi"
- yield AsmFunction.new(name)
- puts "pop edi", "pop esi", "leave", "ret", ""
- end
- def make_until(*ops)
- a = @label_count
- b = @label_count+1
- @label_count+=2
- ops[-1]<<" #{@name}_#{b}"
- puts "#{@name}_#{a}: ", *ops
- yield
- puts "jmp #{@name}_#{a}"
- puts "#{@name}_#{b}:"
- end
-end
-
-$sizeof = {
- :uint8 => 1,
- :int16 => 2,
- :int32 => 4,
- :int64 => 8,
- :float32 => 4,
- :float64 => 8,
-}
-
-$accum = {
- :uint8 => "al",
- :int16 => "ax",
- :int32 => "eax",
-}
-
-$asm_type = {
- :uint8 => "byte",
- :int16 => "word",
- :int32 => "dword",
- :int64 => "qword",
-}
-
-# in the following, the opcode "_" means no such thing seems available.
-# also >> for x86 ought to be shr in the uint8 case.
-# btw, i got all of the MMX information from the NASM manual, Appendix B.
-$opcodes = {
-# [--GF--|--x86--|--mmx-et-al----------------------------------------]
-# [ | |-uint8-|-int16-|-int32-|-int64-|-float32-|-float64-]
- :add => %w[ + add paddb paddw paddd paddq ],
- :sub => %w[ - sub psubb psubw psubd psubq ],
- :and => %w[ & and pand pand pand pand ],
- :xor => %w[ ^ xor pxor pxor pxor pxor ],
- :or => %w[ | or por por por por ],
-# :max => %w[ max _ pmaxub pmaxsw _ _ ], # not plain MMX !!! (req.Katmai)
-# :min => %w[ min _ pminub pminsw _ _ ], # not plain MMX !!! (req.Katmai)
-# :eq => %w[ == _ pcmpeqb pcmpeqw pcmpeqd _ ],
-# :gt => %w[ > _ pcmpgtb pcmpgtw pcmpgtd _ ],
-# :shl => %w[ << shl _ psllw pslld psllq ], # noncommutative
-# :shr => %w[ >> sar _ psraw psrad _ ], # noncommutative
-# :clipadd => %w[ clip+ _ paddusb paddsw _ _ ], # future use
-# :clipsub => %w[ clip- _ psubusb psubsw _ _ ], # future use
-# :andnot => %w[ &not _ pandn pandn pandn pandn ], # not planned
-}
-
-$opcodes.each {|k,op|
- op.map! {|x| if x=="_" then nil else x end }
- STDERR.puts op.inspect
-}
-
-$decls = ""
-$install = ""
-
-def make_fun_map(op,type)
- s="mmx_#{type}_map_#{op}"
- size = $sizeof[type]
- accum = $accum[type]
- sym = $opcodes[op][0]
- opcode = $opcodes[op][1]
- mopcode = $opcodes[op][size+(size<4 ? 1 : 0)]
- return if not mopcode
- AsmFunction.make(s) {|a|
- puts "mov ecx,[ebp+8]", "mov esi,[ebp+12]", "mov eax,[ebp+16]"
- puts "mov dx,ax", "shl eax,8", "mov al,dl" if size==1
- puts "mov edx,eax", "shl eax,16", "mov ax,dx" if size<=2
- puts "push eax", "push eax", "movq mm7,[esp]", "add esp,8"
- foo = proc {|n|
- a.make_until("cmp ecx,#{8/size*n}","jb near") {
- 0.step(n,4) {|k|
- nn=[n-k,4].min
- o=(0..3).map{|x| 8*(x+k) }
- for i in 0...nn do puts "movq mm#{i},[esi+#{o[i]}]" end
- for i in 0...nn do puts "#{mopcode} mm#{i},mm7" end
- for i in 0...nn do puts "movq [esi+#{o[i]}],mm#{i}" end
- }
- puts "lea esi,[esi+#{8*n}]", "lea ecx,[ecx-#{8/size*n}]"
- }
- }
- foo.call 4
- foo.call 1
- a.make_until("test ecx,ecx", "jz") {
- puts "#{opcode} #{$asm_type[type]} [esi],#{accum}", "lea esi,[esi+#{size}]"
- puts "dec ecx"
- }
- puts "emms"
- }
- $decls << "void #{s}(int,#{type}*,#{type});\n"
- $install << "FIX2PTR(Numop,rb_hash_aref(op_dict,SYM(#{sym})))"
- $install << "->on_#{type}.op_map = #{s};\n"
- $count += 1
-end
-
-def make_fun_zip(op,type)
-s="mmx_#{type}_zip_#{op}"
- size = $sizeof[type]
- accum = $accum[type]
- sym = $opcodes[op][0]
- opcode = $opcodes[op][1]
- mopcode = $opcodes[op][size+(size<4 ? 1 : 0)]
- return if not mopcode
- AsmFunction.make(s) {|a|
- puts "mov ecx,[ebp+8]", "mov edi,[ebp+12]",
- "mov esi,[ebp+16]"#, "mov ebx,[ebp+20]"
- foo = proc {|n|
- a.make_until("cmp ecx,#{8/size*n}","jb near") {
- 0.step(n,4) {|k|
- nn=[n-k,4].min
- o=(0..3).map{|x| 8*(x+k) }
- for i in 0...nn do puts "movq mm#{i},[edi+#{o[i]}]" end
- for i in 0...nn do puts "movq mm#{i+4},[esi+#{o[i]}]" end
- for i in 0...nn do puts "#{mopcode} mm#{i},mm#{i+4}" end
- for i in 0...nn do puts "movq [edi+#{o[i]}],mm#{i}" end
- }
- #for i in 0...n do puts "movq [ebx+#{8*i}],mm#{i}" end
- puts "lea edi,[edi+#{8*n}]"
- puts "lea esi,[esi+#{8*n}]"
- #puts "lea ebx,[ebx+#{8*n}]"
- puts "lea ecx,[ecx-#{8/size*n}]"
- }
- }
- foo.call 4
- foo.call 1
- a.make_until("test ecx,ecx", "jz") {
- # requires commutativity ??? fails with shl, shr
- puts "mov #{accum},[esi]"
- puts "#{opcode} #{$asm_type[type]} [edi],#{accum}"
- #puts "mov #{accum},[edi]"
- #puts "#{opcode} #{accum},[esi]"
- #puts "mov [ebx],#{accum}"
- puts "lea edi,[edi+#{size}]"
- puts "lea esi,[esi+#{size}]"
- #puts "lea ebx,[ebx+#{size}]"
- puts "dec ecx"
- }
- puts "emms"
- }
- #$decls << "void #{s}(int,#{type}*,#{type}*,#{type}*);\n"
- $decls << "void #{s}(int,#{type}*,#{type}*);\n"
- $install << "FIX2PTR(Numop,rb_hash_aref(op_dict,SYM(#{sym})))"
- $install << "->on_#{type}.op_zip = #{s};\n"
- $count += 1
-end
-
-for op in $opcodes.keys do
- for type in [:uint8, :int16#, :int32
- ] do
- make_fun_map(op,type)
- make_fun_zip(op,type)
- end
-end
-
-$loader.puts $decls
-$loader.puts %`
-}; /* extern */
-#include <stdlib.h>
-void startup_mmx_loader () {/*bogus*/}
-void startup_mmx () {
- if (getenv("NO_MMX")) return;
- if (EVAL(\"GridFlow.bridge_name\")!=Qnil) gfpost(\"startup_cpu: using MMX optimisations\");
- #{$install}
-}`
-
-STDERR.puts "automatically generated #{$count} MMX asm functions"
-
-=begin notes:
-CPUID has a bit for detecting MMX
-PACKSSDW PACKSSWB PACKUSWB = saturation-casting
-PCMPxx: Compare Packed Integers
-PMULHW, PMULLW: Multiply Packed _unsigned_ 16-bit Integers, and Store
-PUNPCKxxx: Unpack and Interleave Data
-=end
diff --git a/externals/gridflow/devices4ruby/ChangeLog b/externals/gridflow/devices4ruby/ChangeLog
deleted file mode 100644
index eb64908f..00000000
--- a/externals/gridflow/devices4ruby/ChangeLog
+++ /dev/null
@@ -1,12 +0,0 @@
-/* $Id: ChangeLog,v 1.1 2005-10-04 02:12:44 matju Exp $ */
-
-version 0.1.1 (2002.07.29):
- * module Linux::SoundDSP renamed to Linux::SoundPCM (with alias)
- * added installer (ruby extconf.rb && make install)
-
-version 0.1 (2001.06.28):
- * added module IoctlClass, Ioctl
- * added module Linux::SoundDSP (4 accessors)
- * added module Linux::SoundMixer (25 accessors)
- * added module Linux::ParallelPort (2 readers, 2 writers)
-
diff --git a/externals/gridflow/devices4ruby/ParallelPort.rb b/externals/gridflow/devices4ruby/ParallelPort.rb
deleted file mode 100644
index 10188592..00000000
--- a/externals/gridflow/devices4ruby/ParallelPort.rb
+++ /dev/null
@@ -1,72 +0,0 @@
-require "linux/ioctl"
-# Copyright (c) 2001, 2003 by Mathieu Bouchard
-# this is published under the Ruby license
-
-=begin
- if using a DB-25 female connector as found on a PC,
- then the pin numbering is like:
- 13 _____ 1
- 25 \___/ 14
-
- 1 = STROBE = the clock line is a square wave, often at 9600 Hz,
- which determines the data rate in usual circumstances.
- 2..9 = D0..D7 = the eight ordinary data bits
- 10 = -ACK (status bit 6 ?)
- 11 = BUSY (status bit 7)
- 12 = PAPER_END (status bit 5)
- 13 = SELECT (status bit 4 ?)
- 14 = -AUTOFD
- 15 = -ERROR (status bit 3 ?)
- 16 = -INIT
- 17 = -SELECT_IN
- 18..25 = GROUND
-=end
-
-module Linux; module ParallelPort
- extend IoctlClass
-
- @port_flags = %w[
- LP_EXIST
- LP_SELEC
- LP_BUSY
- LP_OFFL
- LP_NOPA
- LP_ERR
- LP_ABORT
- LP_CAREFUL
- LP_ABORTOPEN
- LP_TRUST_IRQ
- ]
-
- @port_status = %w[
- nil,
- nil,
- nil,
- LP_PERRORP # unchanged input, active low
- LP_PSELECD # unchanged input, active high
- LP_POUTPA # unchanged input, active high
- LP_PACK # unchanged input, active low
- LP_PBUSY # inverted input, active high
- ]
-
- LPCHAR = 0x0601
- LPTIME = 0x0602
- LPABORT = 0x0604
- LPSETIRQ = 0x0605
- LPGETIRQ = 0x0606
- LPWAIT = 0x0608
- LPCAREFUL = 0x0609 # obsoleted??? wtf?
- LPABORTOPEN = 0x060a
- LPGETSTATUS = 0x060b # return LP_S(minor)
- LPRESET = 0x060c # reset printer
- LPGETSTATS = 0x060d # struct lp_stats (most likely turned off)
- LPGETFLAGS = 0x060e # get status flags
- LPTRUSTIRQ = 0x060f # set/unset the LP_TRUST_IRQ flag
-
- ioctl_reader :port_flags , :LPGETFLAGS
- ioctl_reader :port_status, :LPGETSTATUS
- ioctl_writer :port_careful,:LPCAREFUL
- ioctl_writer :port_char, :LPCHAR
-
-end end
-
diff --git a/externals/gridflow/devices4ruby/README b/externals/gridflow/devices4ruby/README
deleted file mode 100644
index 740b5165..00000000
--- a/externals/gridflow/devices4ruby/README
+++ /dev/null
@@ -1,27 +0,0 @@
-devices/linux
-
-AUTHOR
-
- Mathieu Bouchard <matju@sympatico.ca>
- irc: irc.openprojects.net / #ruby-lang / matju
- (note: I can't read Japanese; write in French or English please)
-
-OVERVIEW
-
-This is a collection of simple modules that you extend IO objects with, to
-give them support for specific devices. For example:
-
- require "linux/SoundMixer"
- f = File.open "/dev/mixer"
- f.extend Linux::SoundMixer
-
- # f now has special accessors for driver variables, e.g:
-
- f.treble = left_speaker_percent + 256 * right_speaker_percent
-
-The modules are made of automatically generated methods, much like Ruby's
-accessors. those generators are called ioctl_reader, ioctl_writer,
-ioctl_accessor. Writing expects an integer in -2**31...2**31; reading will
-return the same. You may browse the source to find out which accessors are
-available, and it's easy to add support for more features.
-
diff --git a/externals/gridflow/devices4ruby/SoundMixer.rb b/externals/gridflow/devices4ruby/SoundMixer.rb
deleted file mode 100644
index 0ae50b60..00000000
--- a/externals/gridflow/devices4ruby/SoundMixer.rb
+++ /dev/null
@@ -1,152 +0,0 @@
-require "linux/ioctl"
-
-module Linux; module SoundMixer
- extend IoctlClass
-
- MIXER_NRDEVICES = 0x00000019
- MIXER_VOLUME = 0x00000000
- MIXER_BASS = 0x00000001
- MIXER_TREBLE = 0x00000002
- MIXER_SYNTH = 0x00000003
- MIXER_PCM = 0x00000004
- MIXER_SPEAKER = 0x00000005
- MIXER_LINE = 0x00000006
- MIXER_MIC = 0x00000007
- MIXER_CD = 0x00000008
- MIXER_IMIX = 0x00000009
- MIXER_ALTPCM = 0x0000000a
- MIXER_RECLEV = 0x0000000b
- MIXER_IGAIN = 0x0000000c
- MIXER_OGAIN = 0x0000000d
- MIXER_LINE1 = 0x0000000e
- MIXER_LINE2 = 0x0000000f
- MIXER_LINE3 = 0x00000010
- MIXER_DIGITAL1 = 0x00000011
- MIXER_DIGITAL2 = 0x00000012
- MIXER_DIGITAL3 = 0x00000013
- MIXER_PHONEIN = 0x00000014
- MIXER_PHONEOUT = 0x00000015
- MIXER_VIDEO = 0x00000016
- MIXER_RADIO = 0x00000017
- MIXER_MONITOR = 0x00000018
- ONOFF_MIN = 0x0000001c
- ONOFF_MAX = 0x0000001e
- MIXER_NONE = 0x0000001f
- MIXER_ENHANCE = 0x0000001f
- MIXER_MUTE = 0x0000001f
- MIXER_LOUD = 0x0000001f
- MIXER_RECSRC = 0x000000ff
- MIXER_DEVMASK = 0x000000fe
- MIXER_RECMASK = 0x000000fd
- MIXER_CAPS = 0x000000fc
- MIXER_STEREODEVS = 0x000000fb
- MIXER_OUTSRC = 0x000000fa
- MIXER_OUTMASK = 0x000000f9
- MASK_VOLUME = 0x00000001
- MASK_BASS = 0x00000002
- MASK_TREBLE = 0x00000004
- MASK_SYNTH = 0x00000008
- MASK_PCM = 0x00000010
- MASK_SPEAKER = 0x00000020
- MASK_LINE = 0x00000040
- MASK_MIC = 0x00000080
- MASK_CD = 0x00000100
- MASK_IMIX = 0x00000200
- MASK_ALTPCM = 0x00000400
- MASK_RECLEV = 0x00000800
- MASK_IGAIN = 0x00001000
- MASK_OGAIN = 0x00002000
- MASK_LINE1 = 0x00004000
- MASK_LINE2 = 0x00008000
- MASK_LINE3 = 0x00010000
- MASK_DIGITAL1 = 0x00020000
- MASK_DIGITAL2 = 0x00040000
- MASK_DIGITAL3 = 0x00080000
- MASK_PHONEIN = 0x00100000
- MASK_PHONEOUT = 0x00200000
- MASK_RADIO = 0x00800000
- MASK_VIDEO = 0x00400000
- MASK_MONITOR = 0x01000000
- MASK_MUTE = 0x80000000
- MASK_ENHANCE = 0x80000000
- MASK_LOUD = 0x80000000
- MIXER_READ_VOLUME = 0x80044d00
- MIXER_READ_BASS = 0x80044d01
- MIXER_READ_TREBLE = 0x80044d02
- MIXER_READ_SYNTH = 0x80044d03
- MIXER_READ_PCM = 0x80044d04
- MIXER_READ_SPEAKER = 0x80044d05
- MIXER_READ_LINE = 0x80044d06
- MIXER_READ_MIC = 0x80044d07
- MIXER_READ_CD = 0x80044d08
- MIXER_READ_IMIX = 0x80044d09
- MIXER_READ_ALTPCM = 0x80044d0a
- MIXER_READ_RECLEV = 0x80044d0b
- MIXER_READ_IGAIN = 0x80044d0c
- MIXER_READ_OGAIN = 0x80044d0d
- MIXER_READ_LINE1 = 0x80044d0e
- MIXER_READ_LINE2 = 0x80044d0f
- MIXER_READ_LINE3 = 0x80044d10
- MIXER_READ_MUTE = 0x80044d1f
- MIXER_READ_ENHANCE = 0x80044d1f
- MIXER_READ_LOUD = 0x80044d1f
- MIXER_READ_RECSRC = 0x80044dff
- MIXER_READ_DEVMASK = 0x80044dfe
- MIXER_READ_RECMASK = 0x80044dfd
- MIXER_READ_STEREODEVS = 0x80044dfb
- MIXER_READ_CAPS = 0x80044dfc
- MIXER_WRITE_VOLUME = 0xc0044d00
- MIXER_WRITE_BASS = 0xc0044d01
- MIXER_WRITE_TREBLE = 0xc0044d02
- MIXER_WRITE_SYNTH = 0xc0044d03
- MIXER_WRITE_PCM = 0xc0044d04
- MIXER_WRITE_SPEAKER = 0xc0044d05
- MIXER_WRITE_LINE = 0xc0044d06
- MIXER_WRITE_MIC = 0xc0044d07
- MIXER_WRITE_CD = 0xc0044d08
- MIXER_WRITE_IMIX = 0xc0044d09
- MIXER_WRITE_ALTPCM = 0xc0044d0a
- MIXER_WRITE_RECLEV = 0xc0044d0b
- MIXER_WRITE_IGAIN = 0xc0044d0c
- MIXER_WRITE_OGAIN = 0xc0044d0d
- MIXER_WRITE_LINE1 = 0xc0044d0e
- MIXER_WRITE_LINE2 = 0xc0044d0f
- MIXER_WRITE_LINE3 = 0xc0044d10
- MIXER_WRITE_MUTE = 0xc0044d1f
- MIXER_WRITE_ENHANCE = 0xc0044d1f
- MIXER_WRITE_LOUD = 0xc0044d1f
- MIXER_WRITE_RECSRC = 0xc0044dff
- MIXER_INFO = 0x805c4d65
- MIXER_ACCESS = 0xc0804d66
- MIXER_AGC = 0xc0044d67
- MIXER_3DSE = 0xc0044d68
- MIXER_PRIVATE1 = 0xc0044d6f
- MIXER_PRIVATE2 = 0xc0044d70
- MIXER_PRIVATE3 = 0xc0044d71
- MIXER_PRIVATE4 = 0xc0044d72
- MIXER_PRIVATE5 = 0xc0044d73
- MIXER_GETLEVELS = 0xc0a44d74
- MIXER_SETLEVELS = 0xc0a44d75
-
- DEVICE_LABELS = [
- "Vol ", "Bass ", "Trebl", "Synth", "Pcm ",
- "Spkr ","Line ", "Mic ", "CD ", "Mix ",
- "Pcm2 ","Rec ", "IGain", "OGain",
- "Line1", "Line2", "Line3", "Digital1", "Digital2", "Digital3",
- "PhoneIn", "PhoneOut", "Video", "Radio", "Monitor"
- ]
-
- DEVICE_NAMES = [
- "vol", "bass", "treble", "synth", "pcm", "speaker", "line",
- "mic", "cd", "mix", "pcm2", "rec", "igain", "ogain",
- "line1", "line2", "line3", "dig1", "dig2", "dig3",
- "phin", "phout", "video", "radio", "monitor"
- ]
-
- DEVICE_NAMES.each_with_index {|name,i|
- ioctl_accessor name,
- MIXER_READ_VOLUME+i,
- MIXER_WRITE_VOLUME+i
- }
-
-end end
diff --git a/externals/gridflow/devices4ruby/SoundPCM.rb b/externals/gridflow/devices4ruby/SoundPCM.rb
deleted file mode 100644
index d1b97159..00000000
--- a/externals/gridflow/devices4ruby/SoundPCM.rb
+++ /dev/null
@@ -1,102 +0,0 @@
-# $Id: SoundPCM.rb,v 1.1 2005-10-04 02:02:14 matju Exp $
-require "linux/ioctl"
-
-module Linux
-
-module SoundPCM
- extend IoctlClass
-
- # SNDCTL Kernel Procedure Numbers
-
- SEQ_RESET = 0x00005100
- SEQ_SYNC = 0x00005101
- SEQ_CTRLRATE = 0xc0045103
- SEQ_GETOUTCOUNT = 0x80045104
- SEQ_GETINCOUNT = 0x80045105
- SEQ_PERCMODE = 0x40045106
- SEQ_TESTMIDI = 0x40045108
- SEQ_RESETSAMPLES = 0x40045109
- SEQ_NRSYNTHS = 0x8004510a
- SEQ_NRMIDIS = 0x8004510b
- SEQ_THRESHOLD = 0x4004510d
- SEQ_PANIC = 0x00005111
- SEQ_OUTOFBAND = 0x40085112
- SEQ_GETTIME = 0x80045113
-
- SYNTH_INFO = 0xc08c5102
- SYNTH_MEMAVL = 0xc004510e
- SYNTH_ID = 0xc08c5114
- SYNTH_CONTROL = 0xcfa45115
- SYNTH_REMOVESAMPLE = 0xc00c5116
-
- FM_LOAD_INSTR = 0x40285107
- FM_4OP_ENABLE = 0x4004510f
-
- TMR_TIMEBASE = 0xc0045401
- TMR_START = 0x00005402
- TMR_STOP = 0x00005403
- TMR_CONTINUE = 0x00005404
- TMR_TEMPO = 0xc0045405
- TMR_SOURCE = 0xc0045406
- TMR_METRONOME = 0x40045407
- TMR_SELECT = 0x40045408
-
- MIDI_INFO = 0xc074510c
- MIDI_PRETIME = 0xc0046d00
- MIDI_MPUMODE = 0xc0046d01
- MIDI_MPUCMD = 0xc0216d02
-
- # DSP_* names are obsolete ?
- DSP_STEREO = 0xc0045003
- DSP_GETBLKSIZE = 0xc0045004
- DSP_SETDUPLEX = 0x00005016
- DSP_GETODELAY = 0x80045017
- DSP_PROFILE = 0x40045017
-
- # what is this?
- COPR_RESET = 0x00004300
- COPR_LOAD = 0xcfb04301
- COPR_RDATA = 0xc0144302
- COPR_RCODE = 0xc0144303
- COPR_WDATA = 0x40144304
- COPR_WCODE = 0x40144305
- COPR_RUN = 0xc0144306
- COPR_HALT = 0xc0144307
- COPR_SENDMSG = 0xcfa44308
- COPR_RCVMSG = 0x8fa44309
-
- # SOUND_PCM Kernel Procedure Numbers
-
- PCM_READ_BITS , PCM_WRITE_BITS = 0x80045005, 0xc0045005
- PCM_READ_CHANNELS , PCM_WRITE_CHANNELS = 0x80045006, 0xc0045006
- PCM_READ_FILTER , PCM_WRITE_FILTER = 0x80045007, 0xc0045007
- PCM_READ_RATE , PCM_WRITE_RATE = 0x80045002, 0xc0045002
-
- PCM_RESET = 0x00005000
- PCM_SYNC = 0x00005001
- PCM_POST = 0x00005008
- PCM_SUBDIVIDE = 0xc0045009
- PCM_SETFRAGMENT = 0xc004500a
- PCM_GETFMTS = 0x8004500b
- PCM_SETFMT = 0xc0045005
- PCM_GETOSPACE = 0x8010500c
- PCM_GETISPACE = 0x8010500d
- PCM_NONBLOCK = 0x0000500e
- PCM_GETCAPS = 0x8004500f
- PCM_GETTRIGGER , PCM_SETTRIGGER = 0x80045010, 0x40045010
- PCM_SETSYNCRO = 0x00005015
- PCM_GETIPTR = 0x800c5011
- PCM_GETOPTR = 0x800c5012
- PCM_MAPINBUF = 0x80085013
- PCM_MAPOUTBUF = 0x80085014
-
- ioctl_accessor :bits , :PCM_READ_BITS , :PCM_WRITE_BITS
- ioctl_accessor :channels, :PCM_READ_CHANNELS, :PCM_WRITE_CHANNELS
- ioctl_accessor :filter , :PCM_READ_FILTER , :PCM_WRITE_FILTER
- ioctl_accessor :rate , :PCM_READ_RATE , :PCM_WRITE_RATE
-end
-
-# backward compatibility
-SoundDSP = SoundPCM
-
-end # Linux
diff --git a/externals/gridflow/devices4ruby/extconf.rb b/externals/gridflow/devices4ruby/extconf.rb
deleted file mode 100644
index 9e49cbdc..00000000
--- a/externals/gridflow/devices4ruby/extconf.rb
+++ /dev/null
@@ -1,112 +0,0 @@
-#!/usr/bin/env ruby
-# $Id: extconf.rb,v 1.1 2005-10-04 02:02:14 matju Exp $
-# installer for RubyX11 / MetaRuby / etc
-# by Mathieu Bouchard
-
-require "rbconfig"
-require "ftools"
-include Config
-
-$DESTDIR = "#{CONFIG["sitedir"]}/#{CONFIG["MAJOR"]}.#{CONFIG["MINOR"]}"
-#$DESTDIR = "/home/matju/lib/ruby/#{RUBY_VERSION[0,3]}"
-$RUBY = "ruby"
-
-while ARGV.length>0
- arg=ARGV.shift
- case arg
- when /=/
- i=arg.index '='
- ARGV.unshift arg[0..i-1], arg[i+1..-1]
- when "--prefix"
- $DESTDIR = ARGV.shift + "/lib/ruby/#{CONFIG["MAJOR"]}.#{CONFIG["MINOR"]}"
- end
-end
-
-
-
-def install_files(f,base,entries)
- entries.each {|type,name,*rest|
- case type
- when :ruby
- f.puts "\tinstall -m644 #{base+name} $(DESTDIR)/#{base+name}"
- when :directory
- f.puts "\t@mkdir $(DESTDIR)/#{base+name} || true"
- install_files(f,base+name,rest)
- end
- }
-end
-
-def uninstall_files(f,base,entries)
- entries.each {|type,name,*rest|
- case type
- when :ruby
- f.puts "\trm $(DESTDIR)/#{base+name}"
- when :directory
- uninstall_files(f,base+name,rest)
- end
- }
-end
-
-def make_makefile
- File.open("Makefile","w") {|f|
- f.puts "# Warning: this file is GENERATED by ./extconf.rb", ""
- f.puts "DESTDIR = #{$DESTDIR}", ""
- f.puts "RUBY = #{$RUBY}"
- f.puts "all::", ""
- f.puts "Makefile: extconf.rb"
- f.puts "\t$(RUBY) extconf.rb", ""
-
- f.puts "install::"
- f.puts "\t@mkdir -p $(DESTDIR)"
- install_files(f,"",FILES)
- f.puts
- f.puts "uninstall::"
- uninstall_files(f,"",FILES)
- f.puts
- }
- #FILES.each {|name|
- # File.install "lib/#{name}", "#{DSTPATH}/#{name}", 0644, true
- #end
-end
-
-#----------------------------------------------------------------#
-
-$DESTDIR += "/linux/" #(HACK!)
-
-FILES = [
-# [:directory, "linux/",
- [:ruby, "ioctl.rb"],
- [:ruby, "SoundPCM.rb"],
- [:ruby, "ParallelPort.rb"],
- [:ruby, "SoundMixer.rb"],
-# ]
-]
-
-make_makefile
-
-
-__END__
-### the following is discarded (just a test)
-
-require "mkmf"
-
-srcs = %w(
- termios
-)
-
-#have_library("m")
-#have_func("sincos")
-#have_func("asinh")
-
-#if have_header("fftw.h")
-# if have_library("fftw", "fftwnd_create_plan")
-# srcs.push "na_fftw"
-# else
-# $defs.delete "-DHAVE_FFTW_H"
-# end
-#end
-
-$objs = srcs.map {|i| i+".o"}
-
-#dir_config("linux")
-create_makefile("linux")
diff --git a/externals/gridflow/devices4ruby/ioctl.rb b/externals/gridflow/devices4ruby/ioctl.rb
deleted file mode 100644
index 100d138d..00000000
--- a/externals/gridflow/devices4ruby/ioctl.rb
+++ /dev/null
@@ -1,66 +0,0 @@
-# general-purpose code for performing
-# less-than-trivial IOCTL operations.
-# note that this is quite hackish
-# but is still better than writing actual C code.
-
-module Linux; DEVICES_VERSION = "0.1.1"; end
-
-module IoctlClass
- def ioctl_reader(sym,cmd_in)
- module_eval %{def #{sym}
- ioctl_intp_in(#{cmd_in})
- end}
- end
- def ioctl_writer(sym,cmd_out)
- module_eval %{def #{sym}=(v)
- ioctl_intp_out(#{cmd_out},v)
- #{sym} if respond_to? :#{sym}
- end}
- end
- def ioctl_accessor(sym,cmd_in,cmd_out)
- ioctl_reader(sym,cmd_in)
- ioctl_writer(sym,cmd_out)
- end
-end
-
-module Ioctl
- # this method is not used anymore
- def int_from_4(foo)
- # if it crashes, just insert foo=foo.reverse here.
- (foo[0]+0x100*foo[1])+0x10000*(foo[2]+0x100*foo[3])
- end
-
-# this was a big hack (from hell) that i used until I actually
-# learned the other feature of ioctl().
-=begin
- def ioctl_intp_out(arg1,arg2)
- tmp = arg2 + 2**32
- foo = [2*tmp.id + 16].pack("l").unpack("P4")[0]
- tmp_ptr = int_from_4(foo)
-# STDOUT.printf "tmp_ptr=%x\n", tmp_ptr
- ioctl(arg1,tmp_ptr)
- end
-
- def ioctl_intp_in(arg1)
- tmp = 0xdeadbeef + 2**32
- foo = [2*tmp.id + 16].pack("l").unpack("P4")[0]
- tmp_ptr = int_from_4(foo)
-# tmp_ptr = foo.unpack("l")[0]
-# STDOUT.printf "tmp_ptr=%x\n", tmp_ptr
- ioctl(arg1,tmp_ptr)
- tmp & (2**32-1)
- end
-=end
-
- def ioctl_intp_out(arg1,arg2)
- ioctl(arg1,[arg2].pack("l"))
- end
-
- def ioctl_intp_in(arg1)
- ioctl(arg1,s="blah")
- return s.unpack("l")[0]
- end
-
-end
-
-class IO; include Ioctl; end
diff --git a/externals/gridflow/doc/Makefile b/externals/gridflow/doc/Makefile
deleted file mode 100644
index 9171db3f..00000000
--- a/externals/gridflow/doc/Makefile
+++ /dev/null
@@ -1,2 +0,0 @@
-all::
- ruby moulinette.rb \ No newline at end of file
diff --git a/externals/gridflow/doc/architecture.html b/externals/gridflow/doc/architecture.html
deleted file mode 100644
index 009464a1..00000000
--- a/externals/gridflow/doc/architecture.html
+++ /dev/null
@@ -1,217 +0,0 @@
-<html><head>
-<!-- $Id: architecture.html,v 1.2 2006-03-15 04:44:50 matju Exp $ -->
-<title>GridFlow 0.8.1 - Reference Manual: Architecture</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<link rel="stylesheet" href="gridflow.css" type="text/css">
-</head>
-<body bgcolor="#FFFFFF"
- leftmargin="0" topmargin="0"
- marginwidth="0" marginheight="0">
-<table width="100%" bgcolor="white" border="0" cellspacing="2">
-<tr><td colspan="4" bgcolor="#082069">
-<img src="images/titre_gridflow.png" width="253" height="23">
-</td></tr><tr><td>&nbsp;</td></tr>
-<tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4" height="16">
- <h4>GridFlow 0.8.1 - Reference Manual: Architecture</h4>
-</td></tr>
-<tr>
- <td width="5%" rowspan="2">&nbsp;</td>
- <td width="15%" height="23">&nbsp;</td>
- <td width="80%" height="23">&nbsp;</td>
- <td width="5%" height="23">&nbsp;</td>
-</tr>
-<tr><td colspan="2"><div cols="1"><h4><a href="#Numbers">Numbers</a></h4><ul>
-</ul>
-<h4><a href="#Grid_Literals">Grid Literals</a></h4><ul>
-</ul>
-<h4><a href="#Grid_Protocol">Grid Protocol</a></h4><ul>
-</ul>
-<h4><a href="#Picture_Protocol">Picture Protocol</a></h4><ul>
-</ul>
-<h4><a href="#Numeric_Operators">Numeric Operators</a></h4><ul>
-</ul>
-<h4><a href="#Synchronisation">Synchronisation</a></h4><ul>
-</ul>
-<h4><a href="#Bridges">Bridges</a></h4><ul>
-</ul>
-<br><br>
-</div></td></tr> <tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="Numbers"></a><h4>Numbers</h4></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>High-performance computation requires precise and quite peculiar
- definitions of numbers and their representation.</p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>Inside most programs, numbers are written down as strings of
- bits. A bit is either zero or one. Just like the decimal system
- uses units, tens, hundreds, the binary system uses units, twos,
- fours, eights, sixteens, and so on, doubling every time.</p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>One notation, called integer allows for only integer values to be
- written (no fractions). when it is unsigned, no negative values may
- be written. when it is signed, one bit indicates whether the number
- is positive or negative. Integer storage is usually fixed-size, so you have
- bounds on the size of numbers, and if a result is too big it "wraps around", truncating the biggest
- bits.</p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>Another notation, called floating point (or float) stores numbers using
- a fixed number of significant digits, and a scale factor that allows for huge numbers
- and tiny fractions at once. Note that 1/3 has periodic digits, but even 0.1 has periodic digits,
- in binary coding; so expect some slight roundings; the precision offered should be
- sufficient for most purposes. Make sure the errors of rounding don't accumulate, though.</p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>This little program of mine prints 1/3 in base 2 (only digits after the period): <kbd><font color="#007777">ruby -e 'x=1/3.0;for i in 0..52 do x*=2;y=x.floor;print y;x-=y end;puts'</font></kbd></p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>In GridFlow, there are six kinds of numbers:</p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><tr><td></td><td></td><td><table border="0" bgcolor="black" cellspacing="1"><tr><td valign="top" align="left"><table bgcolor="white" border="0" cellpadding="4" cellspacing="1"><tr><td bgcolor="#808080"><font color="#ffffff"><b>name</b></font></td><td bgcolor="#808080"><font color="#ffffff"><b>aliases</b></font></td><td bgcolor="#808080"><font color="#ffffff"><b>range</b></font></td><td bgcolor="#808080"><font color="#ffffff"><b>size (bytes)</b></font></td><td bgcolor="#808080"><font color="#ffffff"><b>precision</b></font></td><td bgcolor="#808080"><font color="#ffffff"><b>description</b></font></td></tr> <tr><td bgcolor="#ffffff">uint8</td><td bgcolor="#ffffff">u8 b</td><td bgcolor="#ffffff">0..255</td><td bgcolor="#ffffff">1</td><td bgcolor="#ffffff">1</td><td bgcolor="#ffffff">
- unsigned 8-bit integer.
- this is the usual size of numbers taken from files and cameras, and
- written to files and to windows. (however this gets converted to <kbd><font color="#007777">int32</font></kbd>
- unless otherwise specified.) </td></tr> <tr><td bgcolor="#f0f8ff">int16</td><td bgcolor="#f0f8ff">i16 s</td><td bgcolor="#f0f8ff">±2<sup>15</sup> = -32768..32767</td><td bgcolor="#f0f8ff">2</td><td bgcolor="#f0f8ff">1</td><td bgcolor="#f0f8ff">...</td></tr> <tr><td bgcolor="#ffffff">int32</td><td bgcolor="#ffffff">i32 i</td><td bgcolor="#ffffff">±2<sup>31</sup> = -2147483648..2147483647</td><td bgcolor="#ffffff">4</td><td bgcolor="#ffffff">1</td><td bgcolor="#ffffff">
- signed 32-bit integer.
- this is used for most computations. </td></tr> <tr><td bgcolor="#f0f8ff">int64</td><td bgcolor="#f0f8ff">i64 l</td><td bgcolor="#f0f8ff">±2<sup>63</sup></td><td bgcolor="#f0f8ff">8</td><td bgcolor="#f0f8ff">1</td><td bgcolor="#f0f8ff">...</td></tr> <tr><td bgcolor="#ffffff">float32</td><td bgcolor="#ffffff">f32 f</td><td bgcolor="#ffffff">±10<sup>±38</sup></td><td bgcolor="#ffffff">4</td><td bgcolor="#ffffff">23 bits = 0.000012% (about 7 digits)</td><td bgcolor="#ffffff">...</td></tr> <tr><td bgcolor="#f0f8ff">float64</td><td bgcolor="#f0f8ff">f64 d</td><td bgcolor="#f0f8ff">±10<sup>±308</sup></td><td bgcolor="#f0f8ff">8</td><td bgcolor="#f0f8ff">52 bits (about 15 digits)</td><td bgcolor="#f0f8ff">...</td></tr> </table></td></tr></table></td></tr></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="Grid_Literals"></a><h4>Grid Literals</h4></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>
- In every grid-accepting inlet, a list may be sent instead; if
- it consists only of integers, it will be converted to a
- one-dimensional grid. Else it may contain a single "#" sign and
- integers on both sides of it, where the ones to the left of it are
- fed as arguments to an imaginary <kbd><font color="#007777">[#redim]</font></kbd> object and the one to the
- right of it are fed through that <kbd><font color="#007777">[#redim]</font></kbd>. </p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>
- In every grid-accepting inlet, an integer or float may also be sent;
- it will be converted to a zero-dimensional grid (a <b>scalar</b>). </p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="Grid_Protocol"></a><h4>Grid Protocol</h4></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>
- a grid has an associated number type that defines what are the possible values for its elements
- (and how much space it takes). the default is <b>int32</b>. </p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>
- a single-dimensional grid of 3 elements (a triplet) is called dim(3). a
- three-dimensional grid of 240 rows of 320 columns of triplets is called
- dim(240,320,3). </p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>
- There is a sequence in which elements of a Grid are stored and
- transmitted. Dimension 0 is called "first" and dimension N-1 is
- called "last". They are called so because if you select a
- position in the first dimension of a grid, the selected part is of the same
- shape minus the first dimension; so in dim(240,320,3) if you select
- row 51 (or whichever valid row number), you get a dim(320,3). if you select
- a subpart two more times you get to a single number. </p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>
- At each such level, elements are sent/stored in their numeric order,
- and are numbered using natural numbers starting at 0. This ordering usually
- does not matter, but sometimes it does. Most notably, <kbd><font color="#007777">[#import]</font></kbd>, <kbd><font color="#007777">[#export]</font></kbd> and <kbd><font color="#007777">[#redim]</font></kbd> care about it. </p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>
- On the other hand, order of dimensions usually does matter; this is
- what distinguishes rows from columns and channels, for example.
- Most objects care about the distinction. </p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>
- A grid with only 1 element in a given dimension is different from one
- lacking that dimension; it won't have the same meaning. You can use this
- property to your advantage sometimes. </p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>
- Zero-dimensional grids exist. They are called dim(). They can only contain
- a single number. </p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="Picture_Protocol"></a><h4>Picture Protocol</h4></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p><i>This section is useful if you want to know what a picture is
- in terms of a grid. </i></p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>A picture is a three-dimensional Grid: <ul> <li><b>0</b> : rows</li> <li><b>1</b> : columns</li> <li><b>2</b> : channels</li> </ul> </p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>Channels for the RGB color model are: <ul> <li><b>0</b> : red</li> <li><b>1</b> : green</li> <li><b>2</b> : blue</li> </ul> </p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>
- Because Grids are made of 32-bit integers, a three-channel picture uses
- 96 bpp (bits per pixel), and have to be downscaled to 24 bpp (or 16 bpp)
- for display. That huge amount of slack is there because when you create
- your own effects you often have intermediate results that need to be of
- higher precision than a normal picture. Especially, results of multiplications
- are big and should not overflow before you divide them back to normal;
- and similarly, you can have negative values all over, as long as you take
- care of them before they get to the display. </p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>
- In the final conversion, high bits are just ignored. This means: black is
- 0, maximum is 255, and values wrap like with <kbd><font color="#007777">% 256</font></kbd>. If you want to
- clip them, you may use <kbd><font color="#007777">[# max 0]</font></kbd> and <kbd><font color="#007777">[# min 255]</font></kbd> objects. </p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="Numeric_Operators"></a><h4>Numeric Operators</h4></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>In the following table, A is the value entered to the
- left, and B is the value entered to the right.</p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>Angles are in hundredths of degrees. This means a full circle
- (two pi radians) is 36000. You convert from degrees to our angles
- by multiplying by 100. You convert from radians to our angles by
- multiplying by 18000/pi.</p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>Hyperbolic functions (tanh) work with our angles too, so the
- same conversions apply.</p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><tr><td></td><td></td><td><table border="0" bgcolor="black" cellspacing="1"><tr><td valign="top" align="left"><table bgcolor="white" border="0" cellpadding="4" cellspacing="1"><tr><td bgcolor="#808080"><font color="#ffffff"><b>name</b></font></td><td bgcolor="#808080"><font color="#ffffff"><b>description</b></font></td><td bgcolor="#808080"><font color="#ffffff"><b>meaning in pixel context (pictures, palettes)</b></font></td><td bgcolor="#808080"><font color="#ffffff"><b>meaning in spatial context (indexmaps, polygons)</b></font></td></tr> <tr><td bgcolor="#ffffff"><img src="op/ignore-icon.png" border="0" alt="ignore"></td><td bgcolor="#ffffff"> A </td><td bgcolor="#ffffff">no effect</td><td bgcolor="#ffffff">no effect</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/put-icon.png" border="0" alt="put"></td><td bgcolor="#f0f8ff"> B </td><td bgcolor="#f0f8ff">replace by</td><td bgcolor="#f0f8ff">replace by</td></tr> <tr><td bgcolor="#ffffff"><img src="op/add-icon.png" border="0" alt="+"></td><td bgcolor="#ffffff"> A + B </td><td bgcolor="#ffffff">brightness, crossfade</td><td bgcolor="#ffffff">move, morph</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/sub-icon.png" border="0" alt="-"></td><td bgcolor="#f0f8ff"> A - B </td><td bgcolor="#f0f8ff">brightness, motion detection</td><td bgcolor="#f0f8ff">move, motion detection</td></tr> <tr><td bgcolor="#ffffff"><img src="op/bus-icon.png" border="0" alt="inv+"></td><td bgcolor="#ffffff"> B - A </td><td bgcolor="#ffffff">negate then contrast</td><td bgcolor="#ffffff">180 degree rotate then move</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/mul-icon.png" border="0" alt="*"></td><td bgcolor="#f0f8ff"> A * B </td><td bgcolor="#f0f8ff">contrast</td><td bgcolor="#f0f8ff">zoom out</td></tr> <tr><td bgcolor="#ffffff"><img src="op/div-icon.png" border="0" alt="/"></td><td bgcolor="#ffffff"> A / B, rounded towards zero </td><td bgcolor="#ffffff">contrast</td><td bgcolor="#ffffff">zoom in</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/div2-icon.png" border="0" alt="div"></td><td bgcolor="#f0f8ff"> A / B, rounded downwards </td><td bgcolor="#f0f8ff">contrast</td><td bgcolor="#f0f8ff">zoom in</td></tr> <tr><td bgcolor="#ffffff"><img src="op/vid-icon.png" border="0" alt="inv*"></td><td bgcolor="#ffffff"> B / A, rounded towards zero </td><td bgcolor="#ffffff">--</td><td bgcolor="#ffffff">--</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/vid2-icon.png" border="0" alt="swapdiv"></td><td bgcolor="#f0f8ff"> B / A, rounded downwards </td><td bgcolor="#f0f8ff">--</td><td bgcolor="#f0f8ff">--</td></tr> <tr><td bgcolor="#ffffff"><img src="op/mod-icon.png" border="0" alt="%"></td><td bgcolor="#ffffff"> A % B, modulo (goes with div) </td><td bgcolor="#ffffff">--</td><td bgcolor="#ffffff">tile</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/dom-icon.png" border="0" alt="swap%"></td><td bgcolor="#f0f8ff"> B % A, modulo (goes with div) </td><td bgcolor="#f0f8ff">--</td><td bgcolor="#f0f8ff">--</td></tr> <tr><td bgcolor="#ffffff"><img src="op/rem-icon.png" border="0" alt="rem"></td><td bgcolor="#ffffff"> A % B, remainder (goes with /) </td><td bgcolor="#ffffff">--</td><td bgcolor="#ffffff">--</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/mer-icon.png" border="0" alt="swaprem"></td><td bgcolor="#f0f8ff"> B % A, remainder (goes with /) </td><td bgcolor="#f0f8ff">--</td><td bgcolor="#f0f8ff">--</td></tr> <tr><td bgcolor="#ffffff"><img src="op/gcd-icon.png" border="0" alt="gcd"></td><td bgcolor="#ffffff">
- greatest common divisor</td><td bgcolor="#ffffff">--</td><td bgcolor="#ffffff">--</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/lcm-icon.png" border="0" alt="lcm"></td><td bgcolor="#f0f8ff">
- least common multiple</td><td bgcolor="#f0f8ff">--</td><td bgcolor="#f0f8ff">--</td></tr> <tr><td bgcolor="#ffffff"><img src="op/or-icon.png" border="0" alt="|"></td><td bgcolor="#ffffff"> A or B, bitwise </td><td bgcolor="#ffffff">bright munchies</td><td bgcolor="#ffffff">bottomright munchies</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/xor-icon.png" border="0" alt="^"></td><td bgcolor="#f0f8ff"> A xor B, bitwise </td><td bgcolor="#f0f8ff">symmetric munchies (fractal checkers)</td><td bgcolor="#f0f8ff">symmetric munchies (fractal checkers)</td></tr> <tr><td bgcolor="#ffffff"><img src="op/and-icon.png" border="0" alt="&"></td><td bgcolor="#ffffff"> A and B, bitwise </td><td bgcolor="#ffffff">dark munchies</td><td bgcolor="#ffffff">topleft munchies</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/shl-icon.png" border="0" alt="<<"></td><td bgcolor="#f0f8ff"> A * (2**(B % 32)), which is left-shifting </td><td bgcolor="#f0f8ff">like *</td><td bgcolor="#f0f8ff">like *</td></tr> <tr><td bgcolor="#ffffff"><img src="op/shr-icon.png" border="0" alt=">>"></td><td bgcolor="#ffffff"> A / (2**(B % 32)), which is right-shifting </td><td bgcolor="#ffffff">like /,div</td><td bgcolor="#ffffff">like /,div</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/sc_or-icon.png" border="0" alt="||"></td><td bgcolor="#f0f8ff"> if A is zero then B else A </td><td bgcolor="#f0f8ff">--</td><td bgcolor="#f0f8ff">--</td></tr> <tr><td bgcolor="#ffffff"><img src="op/sc_and-icon.png" border="0" alt="&&"></td><td bgcolor="#ffffff"> if A is zero then zero else B</td><td bgcolor="#ffffff">--</td><td bgcolor="#ffffff">--</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/min-icon.png" border="0" alt="min"></td><td bgcolor="#f0f8ff"> the lowest value in A,B </td><td bgcolor="#f0f8ff">clipping</td><td bgcolor="#f0f8ff">clipping (of individual points)</td></tr> <tr><td bgcolor="#ffffff"><img src="op/max-icon.png" border="0" alt="max"></td><td bgcolor="#ffffff"> the highest value in A,B </td><td bgcolor="#ffffff">clipping</td><td bgcolor="#ffffff">clipping (of individual points)</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/cmp-icon.png" border="0" alt="cmp"></td><td bgcolor="#f0f8ff"> -1 when A&lt;B; 0 when A=B; 1 when A&gt;B. </td><td bgcolor="#f0f8ff">--</td><td bgcolor="#f0f8ff">--</td></tr> <tr><td bgcolor="#ffffff"><img src="op/eq-icon.png" border="0" alt="=="></td><td bgcolor="#ffffff"> is A equal to B ? 1=true, 0=false </td><td bgcolor="#ffffff">--</td><td bgcolor="#ffffff">--</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/ne-icon.png" border="0" alt="!="></td><td bgcolor="#f0f8ff"> is A not equal to B ? </td><td bgcolor="#f0f8ff">--</td><td bgcolor="#f0f8ff">--</td></tr> <tr><td bgcolor="#ffffff"><img src="op/gt-icon.png" border="0" alt=">"></td><td bgcolor="#ffffff"> is A greater than B ? </td><td bgcolor="#ffffff">--</td><td bgcolor="#ffffff">--</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/le-icon.png" border="0" alt="<="></td><td bgcolor="#f0f8ff"> is A not greater than B ? </td><td bgcolor="#f0f8ff">--</td><td bgcolor="#f0f8ff">--</td></tr> <tr><td bgcolor="#ffffff"><img src="op/lt-icon.png" border="0" alt="<"></td><td bgcolor="#ffffff"> is A less than B ? </td><td bgcolor="#ffffff">--</td><td bgcolor="#ffffff">--</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/ge-icon.png" border="0" alt=">="></td><td bgcolor="#f0f8ff">is A not less than B ? </td><td bgcolor="#f0f8ff">--</td><td bgcolor="#f0f8ff">--</td></tr> <tr><td bgcolor="#ffffff"><img src="op/sin-icon.png" border="0" alt="sin*"></td><td bgcolor="#ffffff"> B * sin(A) </td><td bgcolor="#ffffff">--</td><td bgcolor="#ffffff">waves, rotations</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/cos-icon.png" border="0" alt="cos*"></td><td bgcolor="#f0f8ff"> B * cos(A) </td><td bgcolor="#f0f8ff">--</td><td bgcolor="#f0f8ff">waves, rotations</td></tr> <tr><td bgcolor="#ffffff"><img src="op/atan-icon.png" border="0" alt="atan"></td><td bgcolor="#ffffff"> arctan(A/B) </td><td bgcolor="#ffffff">--</td><td bgcolor="#ffffff">find angle to origin (part of polar transform)</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/tanh-icon.png" border="0" alt="tanh*"></td><td bgcolor="#f0f8ff"> B * tanh(A) </td><td bgcolor="#f0f8ff">smooth clipping</td><td bgcolor="#f0f8ff">smooth clipping (of individual points), neural sigmoid, fuzzy logic</td></tr> <tr><td bgcolor="#ffffff"><img src="op/log-icon.png" border="0" alt="log*"></td><td bgcolor="#ffffff"> B * log(A) (in base e) </td><td bgcolor="#ffffff">--</td><td bgcolor="#ffffff">--</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/gamma-icon.png" border="0" alt="gamma"></td><td bgcolor="#f0f8ff"> floor(pow(a/256.0,256.0/b)*256.0) </td><td bgcolor="#f0f8ff">gamma correction</td><td bgcolor="#f0f8ff">--</td></tr> <tr><td bgcolor="#ffffff"><img src="op/pow-icon.png" border="0" alt="**"></td><td bgcolor="#ffffff"> A**B, that is, A raised to power B </td><td bgcolor="#ffffff">gamma correction</td><td bgcolor="#ffffff">--</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/abs-icon.png" border="0" alt="abs-"></td><td bgcolor="#f0f8ff"> absolute value of (A-B) </td><td bgcolor="#f0f8ff">--</td><td bgcolor="#f0f8ff">--</td></tr> <tr><td bgcolor="#ffffff"><img src="op/rand-icon.png" border="0" alt="rand"></td><td bgcolor="#ffffff"> randomly produces a non-negative number below A </td><td bgcolor="#ffffff">--</td><td bgcolor="#ffffff">--</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/sqrt-icon.png" border="0" alt="sqrt"></td><td bgcolor="#f0f8ff"> square root of A, rounded downwards </td><td bgcolor="#f0f8ff">--</td><td bgcolor="#f0f8ff">--</td></tr> <tr><td bgcolor="#ffffff"><img src="op/sq-icon.png" border="0" alt="sq-"></td><td bgcolor="#ffffff"> (A-B) times (A-B) </td><td bgcolor="#ffffff">--</td><td bgcolor="#ffffff">--</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/clip+-icon.png" border="0" alt="clip+"></td><td bgcolor="#f0f8ff"> like A+B but overflow causes clipping instead of wrapping around (coming soon) </td><td bgcolor="#f0f8ff">--</td><td bgcolor="#f0f8ff">--</td></tr> <tr><td bgcolor="#ffffff"><img src="op/clip--icon.png" border="0" alt="clip-"></td><td bgcolor="#ffffff"> like A-B but overflow causes clipping instead of wrapping around (coming soon) </td><td bgcolor="#ffffff">--</td><td bgcolor="#ffffff">--</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/avg-icon.png" border="0" alt="avg"></td><td bgcolor="#f0f8ff"> (A+B)/2 </td><td bgcolor="#f0f8ff">--</td><td bgcolor="#f0f8ff">--</td></tr> <tr><td bgcolor="#ffffff"><img src="op/hypot-icon.png" border="0" alt="hypot"></td><td bgcolor="#ffffff"> square root of (A*A+B*B) </td><td bgcolor="#ffffff">--</td><td bgcolor="#ffffff">--</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/erf-icon.png" border="0" alt="erf*"></td><td bgcolor="#f0f8ff"> integral of e^(-x*x) dx ... (coming soon; what ought to be the scaling factor?) </td><td bgcolor="#f0f8ff">--</td><td bgcolor="#f0f8ff">--</td></tr> </table></td></tr></table></td></tr></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="Synchronisation"></a><h4>Synchronisation</h4></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>In GridFlow you cannot send two grids in different inlets at the
-same time. You have to use <kbd><font color="#007777">[#finished]</font></kbd> together with (possibly) <kbd><font color="#007777">[fork]</font></kbd> and <kbd><font color="#007777">[#store]</font></kbd>,
-which can be cumbersome. If you don't do this, the result is undefined
-behaviour (or crash!).</p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>In GridFlow 0.7.1 this is beginning to change. <kbd><font color="#007777">[#store]</font></kbd> and # now allow
-right-inlet grids to be buffered if an operation is occuring on left inlet. This
-should make many circuits simpler. </p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>(more to come)</p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="Bridges"></a><h4>Bridges</h4></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>Starting with version 0.6, GridFlow is Ruby-centric instead of jMax-centric.
-jMax support has been added back as a <b>Bridge</b>.</p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>Bridges, for the most part, plug into the FObject class, which is the common
-root of most of GridFlow's classes. Under the current design, the bridge is
-compiled separately, and is directly loaded by the host software; then the
-bridge starts Ruby and makes it load the main GridFlow; then the bridge hooks
-with the main part. </p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td>&nbsp;</td></tr>
- <td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4">
-<p><font size="-1">
-GridFlow 0.8.1 Documentation<br>
-Copyright &copy; 2001,2002,2003,2004,2005,2006 by Mathieu Bouchard
-<a href="mailto:matju@artengine.ca">matju@artengine.ca</a>
-</font></p>
-</td></tr></table></body></html>
-
-
diff --git a/externals/gridflow/doc/architecture.xml b/externals/gridflow/doc/architecture.xml
deleted file mode 100644
index bf87474e..00000000
--- a/externals/gridflow/doc/architecture.xml
+++ /dev/null
@@ -1,395 +0,0 @@
-<?xml version="1.0" standalone="no" ?>
-<!DOCTYPE documentation SYSTEM 'jmax.dtd'>
-<documentation title="Reference Manual: Architecture">
-<!-- $Id: architecture.xml,v 1.2 2006-03-15 04:44:50 matju Exp $ -->
-<!--
- GridFlow Reference Manual: Architecture
- Copyright (c) 2001,2002,2003,2004 by Mathieu Bouchard
--->
-
-<!--
-<section name="Conventions of this Manual">
- (In this section, usage of Bold, Italic, Courier, etc. would be explained.
- eventually I'd like those to have precise meanings consistent throughout
- the whole documentation)
-</section>
--->
-
-<!--write-me
-<section name="Naming Conventions">
-</section>
--->
-
-<!--write-me
-<section name="User-level Overview">
-<p>(this section is for all users)</p>
-</section>
--->
-
-<section name="Numbers">
-
- <p>High-performance computation requires precise and quite peculiar
- definitions of numbers and their representation.</p>
-
- <p>Inside most programs, numbers are written down as strings of
- bits. A bit is either zero or one. Just like the decimal system
- uses units, tens, hundreds, the binary system uses units, twos,
- fours, eights, sixteens, and so on, doubling every time.</p>
-
- <p>One notation, called integer allows for only integer values to be
- written (no fractions). when it is unsigned, no negative values may
- be written. when it is signed, one bit indicates whether the number
- is positive or negative. Integer storage is usually fixed-size, so you have
- bounds on the size of numbers, and if a result is too big it "wraps around", truncating the biggest
- bits.</p>
-
- <p>Another notation, called floating point (or float) stores numbers using
- a fixed number of significant digits, and a scale factor that allows for huge numbers
- and tiny fractions at once. Note that 1/3 has periodic digits, but even 0.1 has periodic digits,
- in binary coding; so expect some slight roundings; the precision offered should be
- sufficient for most purposes. Make sure the errors of rounding don't accumulate, though.</p>
-
- <p>This little program of mine prints 1/3 in base 2 (only digits after the period):
- <k>ruby -e 'x=1/3.0;for i in 0..52 do x*=2;y=x.floor;print y;x-=y end;puts'</k></p>
-
-
- <p>In GridFlow, there are six kinds of numbers:</p>
-
- <table>
- <column id="name">name</column>
- <column id="aliases">aliases</column>
- <column id="range">range</column>
- <column id="size">size (bytes)</column>
- <column id="precision">precision</column>
- <column id="">description</column>
- <row name="uint8" aliases="u8 b" size="1"
- range="0..255" precision="1">
- unsigned 8-bit integer.
- this is the usual size of numbers taken from files and cameras, and
- written to files and to windows. (however this gets converted to <k>int32</k>
- unless otherwise specified.)
- </row>
- <row name="int16" aliases="i16 s" size="2"
- range="±2&lt;sup&gt;15&lt;/sup&gt; = -32768..32767" precision="1"
- >...</row>
- <row name="int32" aliases="i32 i" size="4"
- range="±2&lt;sup&gt;31&lt;/sup&gt; = -2147483648..2147483647" precision="1">
- signed 32-bit integer.
- this is used for most computations.
- </row>
- <row name="int64" aliases="i64 l" size="8"
- range="±2&lt;sup&gt;63&lt;/sup&gt;" precision="1"
- >...</row>
- <row name="float32" aliases="f32 f" size="4"
- range="±10&lt;sup&gt;±38&lt;/sup&gt;"
- precision="23 bits = 0.000012% (about 7 digits)"
- >...</row>
- <row name="float64" aliases="f64 d" size="8"
- range="±10&lt;sup&gt;±308&lt;/sup&gt;"
- precision="52 bits (about 15 digits)"
- >...</row>
- </table>
-</section>
-
-<section name="Grid Literals">
-<p>
- In every grid-accepting inlet, a list may be sent instead; if
- it consists only of integers, it will be converted to a
- one-dimensional grid. Else it may contain a single "#" sign and
- integers on both sides of it, where the ones to the left of it are
- fed as arguments to an imaginary <k>[#redim]</k> object and the one to the
- right of it are fed through that <k>[#redim]</k>.
-</p>
-<p>
- In every grid-accepting inlet, an integer or float may also be sent;
- it will be converted to a zero-dimensional grid (a <b>scalar</b>).
-</p>
-</section>
-
-<section name="Grid Protocol">
- <p>
- a grid has an associated number type that defines what are the possible values for its elements
- (and how much space it takes). the default is <b>int32</b>.
- </p>
- <p>
- a single-dimensional grid of 3 elements (a triplet) is called dim(3). a
- three-dimensional grid of 240 rows of 320 columns of triplets is called
- dim(240,320,3).
- </p>
- <p>
- There is a sequence in which elements of a Grid are stored and
- transmitted. Dimension 0 is called "first" and dimension N-1 is
- called "last". They are called so because if you select a
- position in the first dimension of a grid, the selected part is of the same
- shape minus the first dimension; so in dim(240,320,3) if you select
- row 51 (or whichever valid row number), you get a dim(320,3). if you select
- a subpart two more times you get to a single number.
- </p>
- <p>
- At each such level, elements are sent/stored in their numeric order,
- and are numbered using natural numbers starting at 0. This ordering usually
- does not matter, but sometimes it does. Most notably, <k>[#import]</k>,
- <k>[#export]</k> and <k>[#redim]</k> care about it.
- </p>
- <p>
- On the other hand, order of dimensions usually does matter; this is
- what distinguishes rows from columns and channels, for example.
- Most objects care about the distinction.
- </p>
- <p>
- A grid with only 1 element in a given dimension is different from one
- lacking that dimension; it won't have the same meaning. You can use this
- property to your advantage sometimes.
- </p>
- <p>
- Zero-dimensional grids exist. They are called dim(). They can only contain
- a single number.
- </p>
-</section>
-
-<section name="Picture Protocol">
- <p><i>This section is useful if you want to know what a picture is
- in terms of a grid.
- </i></p>
-
- <p>A picture is a three-dimensional Grid:
- <list start="0">
- <li>rows</li>
- <li>columns</li>
- <li>channels</li>
- </list>
- </p>
- <p>Channels for the RGB color model are:
- <list start="0">
- <li>red</li>
- <li>green</li>
- <li>blue</li>
- </list>
- </p>
- <p>
- Because Grids are made of 32-bit integers, a three-channel picture uses
- 96 bpp (bits per pixel), and have to be downscaled to 24 bpp (or 16 bpp)
- for display. That huge amount of slack is there because when you create
- your own effects you often have intermediate results that need to be of
- higher precision than a normal picture. Especially, results of multiplications
- are big and should not overflow before you divide them back to normal;
- and similarly, you can have negative values all over, as long as you take
- care of them before they get to the display.
- </p>
- <p>
- In the final conversion, high bits are just ignored. This means: black is
- 0, maximum is 255, and values wrap like with <k>% 256</k>. If you want to
- clip them, you may use <k>[# max 0]</k> and <k>[# min 255]</k> objects.
- </p>
-</section>
-
-<section name="Numeric Operators">
- <p>In the following table, A is the value entered to the
- left, and B is the value entered to the right.</p>
-
- <p>Angles are in hundredths of degrees. This means a full circle
- (two pi radians) is 36000. You convert from degrees to our angles
- by multiplying by 100. You convert from radians to our angles by
- multiplying by 18000/pi.</p>
-
- <p>Hyperbolic functions (tanh) work with our angles too, so the
- same conversions apply.</p>
-
-<table>
- <column id="name" type="icon">name</column>
- <column id="">description</column>
- <column id="color">meaning in pixel context (pictures, palettes)</column>
- <column id="space">meaning in spatial context (indexmaps, polygons)</column>
-
- <!-- category: bogus -->
- <row name="ignore" cname="ignore"
- color="no effect"
- space="no effect"
- > A </row>
- <row name="put" cname="put"
- color="replace by"
- space="replace by"
- > B </row>
-
- <!-- category: additive -->
- <row name="+" cname="add"
- color="brightness, crossfade"
- space="move, morph"
- > A + B </row>
- <row name="-" cname="sub"
- color="brightness, motion detection"
- space="move, motion detection"
- > A - B </row>
- <row name="inv+" cname="bus"
- color="negate then contrast"
- space="180 degree rotate then move"
- > B - A </row>
-
- <!-- category: multiplicative -->
- <row name="*" cname="mul"
- color="contrast"
- space="zoom out"
- > A * B </row>
- <row name="/" cname="div"
- color="contrast"
- space="zoom in"
- > A / B, rounded towards zero </row>
- <row name="div" cname="div2"
- color="contrast"
- space="zoom in"
- > A / B, rounded downwards </row>
- <row name="inv*" cname="vid"
- > B / A, rounded towards zero </row>
- <row name="swapdiv" cname="vid2"
- > B / A, rounded downwards </row>
- <row name="%" cname="mod"
- space="tile"
- > A % B, modulo (goes with div) </row>
- <row name="swap%" cname="dom"
- > B % A, modulo (goes with div) </row>
- <row name="rem" cname="rem"
- > A % B, remainder (goes with /) </row>
- <row name="swaprem" cname="mer"
- > B % A, remainder (goes with /) </row>
-
- <row name="gcd" cname="gcd">
- greatest common divisor</row>
-
- <row name="lcm" cname="lcm">
- least common multiple</row>
-
- <!-- bits -->
- <row name="|" cname="or"
- color="bright munchies"
- space="bottomright munchies"
- > A or B, bitwise </row>
- <row name="^" cname="xor"
- color="symmetric munchies (fractal checkers)"
- space="symmetric munchies (fractal checkers)"
- > A xor B, bitwise </row>
- <row name="&amp;" cname="and"
- color="dark munchies"
- space="topleft munchies"
- > A and B, bitwise </row>
- <row name="&lt;&lt;" cname="shl"
- color="like *"
- space="like *"
- > A * (2**(B % 32)), which is left-shifting </row>
- <row name="&gt;&gt;" cname="shr"
- color="like /,div"
- space="like /,div"
- > A / (2**(B % 32)), which is right-shifting </row>
-
- <!-- decision -->
- <row name="||" cname="sc_or"
- > if A is zero then B else A </row>
- <row name="&amp;&amp;" cname="sc_and"
- > if A is zero then zero else B</row>
- <row name="min" cname="min"
- color="clipping"
- space="clipping (of individual points)"
- > the lowest value in A,B </row>
- <row name="max" cname="max"
- color="clipping"
- space="clipping (of individual points)"
- > the highest value in A,B </row>
-
- <!-- comparison -->
- <row name="cmp" cname="cmp"
- > -1 when A&lt;B; 0 when A=B; 1 when A&gt;B. </row>
- <row name="==" cname="eq"
- > is A equal to B ? 1=true, 0=false </row>
- <row name="!=" cname="ne"
- > is A not equal to B ? </row>
- <row name="&gt;" cname="gt"
- > is A greater than B ? </row>
- <row name="&lt;=" cname="le"
- > is A not greater than B ? </row>
- <row name="&lt;" cname="lt"
- > is A less than B ? </row>
- <row name="&gt;=" cname="ge"
- >is A not less than B ? </row>
-
- <!-- trigonometrics and exponentiation -->
- <row name="sin*" cname="sin"
- space="waves, rotations"
- > B * sin(A) </row>
- <row name="cos*" cname="cos"
- space="waves, rotations"
- > B * cos(A) </row>
- <row name="atan" cname="atan"
- space="find angle to origin (part of polar transform)"
- > arctan(A/B) </row>
- <row name="tanh*" cname="tanh"
- color="smooth clipping"
- space="smooth clipping (of individual points), neural sigmoid, fuzzy logic"
- > B * tanh(A) </row>
- <row name="log*" cname="log"
- > B * log(A) (in base e) </row>
- <row name="gamma" cname="gamma"
- color="gamma correction"
- > floor(pow(a/256.0,256.0/b)*256.0) </row>
- <row name="**" cname="pow"
- color="gamma correction"
- > A**B, that is, A raised to power B </row>
-
- <!-- former one-input operators -->
- <row name="abs-" cname="abs"
- > absolute value of (A-B) </row>
- <row name="rand" cname="rand"
- > randomly produces a non-negative number below A </row>
- <row name="sqrt" cname="sqrt"
- > square root of A, rounded downwards </row>
- <row name="sq-" cname="sq"
- > (A-B) times (A-B) </row>
-
- <!-- 0.8.0 -->
- <row name="clip+" cname="clip+"
- > like A+B but overflow causes clipping instead of wrapping around (coming soon) </row>
- <row name="clip-" cname="clip-"
- > like A-B but overflow causes clipping instead of wrapping around (coming soon) </row>
- <row name="avg" cname="avg"
- > (A+B)/2 </row>
- <row name="hypot" cname="hypot"
- > square root of (A*A+B*B) </row>
- <row name="erf*" cname="erf"
- > integral of e^(-x*x) dx ... (coming soon; what ought to be the scaling factor?) </row>
-</table>
-</section>
-
-<!--write-me
-<section name="Programmer-level Overview">
-<p>(this section is for people who want to mess with the internals or at least
-understand them a bit)</p>
-(move this section down?)
-</section>
--->
-
-<section name="Synchronisation">
-<p>In GridFlow you cannot send two grids in different inlets at the
-same time. You have to use <k>[#finished]</k> together with (possibly) <k>[fork]</k> and <k>[#store]</k>,
-which can be cumbersome. If you don't do this, the result is undefined
-behaviour (or crash!).</p>
-
-<p>In GridFlow 0.7.1 this is beginning to change. <k>[#store]</k> and # now allow
-right-inlet grids to be buffered if an operation is occuring on left inlet. This
-should make many circuits simpler.
-</p>
-
-<p>(more to come)</p>
-</section>
-
-<section name="Bridges">
-<p>Starting with version 0.6, GridFlow is Ruby-centric instead of jMax-centric.
-jMax support has been added back as a <b>Bridge</b>.</p>
-
-<p>Bridges, for the most part, plug into the FObject class, which is the common
-root of most of GridFlow's classes. Under the current design, the bridge is
-compiled separately, and is directly loaded by the host software; then the
-bridge starts Ruby and makes it load the main GridFlow; then the bridge hooks
-with the main part.
-</p>
-
-</section>
-
-</documentation>
diff --git a/externals/gridflow/doc/flow_classes/#+-help.pd b/externals/gridflow/doc/flow_classes/#+-help.pd
deleted file mode 100644
index 511d67c1..00000000
--- a/externals/gridflow/doc/flow_classes/#+-help.pd
+++ /dev/null
@@ -1,364 +0,0 @@
-#N canvas 165 32 693 623 10;
-#X obj 8 3 cnv 15 90 578 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 36 326 INLETS:;
-#X text 36 344 - LEFT:;
-#X text 30 386 - RIGHT:;
-#X text 29 469 OUTLETS:;
-#X text 28 53 EXAMPLES:;
-#X text 16 553 SEE ALSO:;
-#N canvas 52 15 871 640 More_Info 0;
-#X text 76 366 A + B;
-#X text 77 510 A * B;
-#X text 73 571 rounded towards zero;
-#X text 14 73 angles are in hundredth of degrees \, so a full circle
-(two pi radians) is 36000 you can convert from radians to our angles
-by multiplying by 18000/pi.;
-#X text 13 44 for all of these \, A refers to the left inlet and B
-to the value on the right.;
-#X text 15 27 Consult doc/architecture.html to see all the 40 of them.
-;
-#X text 902 31 GridFlow 0.8.0;
-#X obj 479 70 #color;
-#X obj 684 72 #color;
-#X msg 15 366 op +;
-#X msg 15 507 op *;
-#X obj 15 385 s op;
-#X obj 423 155 r op;
-#X obj 15 526 s op;
-#X obj 15 436 s op;
-#X text 77 421 A - B;
-#X msg 15 417 op -;
-#X obj 15 761 s op;
-#X msg 15 742 op %;
-#X text 69 743 A % B;
-#X obj 15 575 s op;
-#X msg 15 556 op /;
-#X text 79 557 A / B;
-#X obj 14 809 s op;
-#X text 83 790 B % A;
-#X text 15 14 Numeric Operators: *whoa \, there's a lot of them;
-#X obj 16 482 s op;
-#X msg 16 463 op inv+;
-#X text 79 464 B -A;
-#X obj 15 623 s op;
-#X text 79 605 A / B;
-#X msg 15 604 op div;
-#X text 75 621 rounded downwards;
-#X obj 15 668 s op;
-#X msg 15 649 op inv*;
-#X text 80 650 B / A;
-#X text 77 665 rounded towards 0;
-#X obj 15 712 s op;
-#X text 76 714 rounded downwards;
-#X text 101 695 B / A;
-#X text 68 760 modulo (goes with div);
-#X text 65 809 modulo (goes with div);
-#X msg 14 790 op swap%;
-#X obj 15 286 s op;
-#X obj 15 334 s op;
-#X msg 15 267 op ignore;
-#X text 90 268 A;
-#X msg 15 315 op put;
-#X text 76 315 B;
-#X msg 15 693 op swapdiv;
-#X obj 237 286 s op;
-#X msg 237 267 op rem;
-#X text 315 263 A % B;
-#X obj 236 338 s op;
-#X text 330 319 B % A;
-#X text 314 278 remainder;
-#X text 314 293 (goes with /);
-#X msg 236 319 op swaprem;
-#X text 327 333 remainder;
-#X text 326 348 (goes with /);
-#X obj 236 388 s op;
-#X obj 236 435 s op;
-#X msg 236 369 op gcd;
-#X msg 236 416 op lcm;
-#X text 298 373 greatest common divisor;
-#X text 298 420 least common multiple;
-#X obj 235 481 s op;
-#X text 299 464 A or B \, bitwise;
-#X msg 235 462 op;
-#X obj 235 525 s op;
-#X text 299 508 A xor B \, bitwise;
-#X msg 235 506 op ^;
-#X obj 235 578 s op;
-#X msg 235 559 op &;
-#X text 300 561 A and B \, bitwise;
-#X obj 235 623 s op;
-#X msg 235 604 op <<;
-#X text 300 606 A * (2**(B % 32);
-#X text 299 621 left-shifthing;
-#X obj 235 669 s op;
-#X msg 235 649 op >>;
-#X text 299 666 right-shifthing;
-#X text 300 652 A / (2**(B % 32);
-#X obj 218 463 bng 15 250 50 0 empty empty empty 0 -6 0 8 -258699 -1
--1;
-#X obj 235 714 s op;
-#X msg 235 695 op;
-#X obj 218 695 bng 15 250 50 0 empty empty empty 0 -6 0 8 -258699 -1
--1;
-#X text 299 697 if A is zero then;
-#X text 300 711 B else A;
-#X obj 235 758 s op;
-#X text 299 741 if A is zero then;
-#X text 15 110 comment;
-#X msg 235 739 op &&;
-#X text 300 755 zero else B;
-#X obj 236 807 s op;
-#X msg 236 788 op min;
-#X text 300 789 the lowest value;
-#X text 301 804 in A \, B;
-#X obj 500 287 s op;
-#X msg 500 267 op max;
-#X text 556 284 in A \, B;
-#X text 557 268 the highest value;
-#X obj 500 333 s op;
-#X msg 500 313 op cmp;
-#X text 551 310 -1 when A<B;
-#X text 558 338 1 when A>B;
-#X text 558 324 0 when A=B;
-#X obj 500 386 s op;
-#X msg 500 366 op ==;
-#X text 557 367 is A equal to B ?;
-#X text 556 385 1 = true \, 0 = false;
-#X obj 500 433 s op;
-#X msg 500 413 op !=;
-#X text 557 414 is A not equal to B ?;
-#X obj 500 477 s op;
-#X msg 500 456 op >;
-#X text 557 457 is A greater than B ?;
-#X obj 500 523 s op;
-#X msg 500 502 op <=;
-#X text 557 503 is A not greater than B ?;
-#X obj 500 572 s op;
-#X msg 500 551 op <;
-#X text 557 552 is A less than B ?;
-#X obj 500 618 s op;
-#X msg 500 597 op >=;
-#X text 557 598 is A not less than B ?;
-#X obj 500 666 s op;
-#X msg 500 645 op sin*;
-#X text 559 646 B * sin(A);
-#X obj 500 713 s op;
-#X msg 500 691 op cos*;
-#X text 560 693 B * cos(A);
-#X obj 500 758 s op;
-#X msg 500 736 op atan;
-#X text 560 737 arctan(A/B);
-#X obj 499 805 s op;
-#X msg 499 783 op tan*;
-#X text 559 784 tanh(A);
-#X obj 738 288 s op;
-#X msg 738 268 op log*;
-#X text 795 269 B*log(A);
-#X text 794 286 in base e;
-#X obj 738 334 s op;
-#X msg 738 314 op gamma;
-#X text 809 314 floor(pow(a/256.0 \, 256.0/b)*256.0);
-#X obj 737 385 s op;
-#X msg 737 366 op **;
-#X text 799 368 A**B;
-#X text 799 385 A raised to power B;
-#X obj 737 431 s op;
-#X msg 737 412 op abs-;
-#X text 799 412 absolute value of (A-B);
-#X obj 737 478 s op;
-#X msg 737 459 op rand;
-#X text 800 473 number below A;
-#X text 799 458 randomly produces a non-negative;
-#X obj 737 524 s op;
-#X msg 737 505 op sqrt;
-#X text 799 504 square root of A;
-#X text 800 519 rounded downwards;
-#X obj 737 566 s op;
-#X msg 737 547 op sq-;
-#X text 800 546 (A-B) times (A-B);
-#X obj 740 614 s op;
-#X obj 723 595 bng 15 250 50 0 empty empty empty 0 -6 0 8 -258699 -1
--1;
-#X msg 740 595 op clip+;
-#X text 808 595 A+B but output is clipped;
-#X obj 740 660 s op;
-#X obj 723 641 bng 15 250 50 0 empty empty empty 0 -6 0 8 -258699 -1
--1;
-#X msg 740 641 op clip-;
-#X text 808 641 A-B but output is clipped;
-#X obj 740 706 s op;
-#X obj 740 750 s op;
-#X text 808 687 (A+B)/2;
-#X msg 740 687 op avg;
-#X msg 740 731 op hypot;
-#X text 808 731 square root of (A*A+B*B);
-#X obj 740 792 s op;
-#X obj 723 773 bng 15 250 50 0 empty empty empty 0 -6 0 8 -258699 -1
--1;
-#X msg 740 773 op erf;
-#X text 807 773 integral of e^(-x*x)dx;
-#N canvas 8 30 615 351 all_operators 0;
-#X obj 174 99 # -;
-#X obj 522 97 # swap%;
-#X obj 186 177 # abs-;
-#X obj 238 177 # rand;
-#X obj 342 177 # sq-;
-#X obj 290 177 # sqrt;
-#X obj 144 99 # +;
-#X obj 492 97 # %;
-#X obj 260 99 # *;
-#X obj 289 99 # /;
-#X obj 206 99 # inv+;
-#X obj 321 99 # div;
-#X obj 367 98 # inv*;
-#X obj 420 98 # swapdiv;
-#X obj 35 99 # ignore;
-#X obj 100 100 # put;
-#X obj 35 125 # rem;
-#X obj 78 125 # swaprem;
-#X obj 149 125 # gcd;
-#X obj 191 125 # lcm;
-#X obj 234 125 # |;
-#X obj 234 125 # |;
-#X obj 263 125 # ^;
-#X obj 293 125 # &;
-#X obj 322 125 # <<;
-#X obj 358 125 # >>;
-#X obj 394 125 # ||;
-#X obj 431 125 # &&;
-#X obj 467 125 # min;
-#X obj 35 151 # max;
-#X obj 79 151 # cmp;
-#X obj 124 151 # ==;
-#X obj 162 151 # !=;
-#X obj 199 151 # >;
-#X obj 234 151 # <=;
-#X obj 274 151 # <;
-#X obj 304 152 # >=;
-#X obj 341 152 # sin*;
-#X obj 391 152 # cos*;
-#X obj 442 152 # atan;
-#X obj 493 152 # tanh*;
-#X obj 35 177 # log*;
-#X obj 87 177 # gamma;
-#X obj 148 177 # **;
-#X obj 388 177 # avg;
-#X obj 433 177 # hypot;
-#X restore 15 174 pd all_operators;
-#X text 585 31 select values below;
-#X text 14 233 select an operator below;
-#X text 478 51 A;
-#X text 683 53 B;
-#X obj 479 182 # +;
-#X obj 257 196 #color;
-#X obj 297 162 #reverse;
-#X obj 443 215 display;
-#X obj 656 197 #unpack 3;
-#X floatatom 605 244 5 0 0 0 - - -;
-#X obj 642 150 t a a;
-#X obj 597 191 display;
-#X connect 7 0 186 0;
-#X connect 7 0 188 0;
-#X connect 7 0 192 0;
-#X connect 8 0 186 1;
-#X connect 9 0 11 0;
-#X connect 10 0 13 0;
-#X connect 12 0 186 0;
-#X connect 16 0 14 0;
-#X connect 18 0 17 0;
-#X connect 21 0 20 0;
-#X connect 27 0 26 0;
-#X connect 31 0 29 0;
-#X connect 34 0 33 0;
-#X connect 42 0 23 0;
-#X connect 45 0 43 0;
-#X connect 47 0 44 0;
-#X connect 49 0 37 0;
-#X connect 51 0 50 0;
-#X connect 57 0 53 0;
-#X connect 62 0 60 0;
-#X connect 63 0 61 0;
-#X connect 68 0 66 0;
-#X connect 71 0 69 0;
-#X connect 73 0 72 0;
-#X connect 76 0 75 0;
-#X connect 80 0 79 0;
-#X connect 85 0 84 0;
-#X connect 92 0 89 0;
-#X connect 95 0 94 0;
-#X connect 99 0 98 0;
-#X connect 103 0 102 0;
-#X connect 108 0 107 0;
-#X connect 112 0 111 0;
-#X connect 115 0 114 0;
-#X connect 118 0 117 0;
-#X connect 121 0 120 0;
-#X connect 124 0 123 0;
-#X connect 127 0 126 0;
-#X connect 130 0 129 0;
-#X connect 133 0 132 0;
-#X connect 136 0 135 0;
-#X connect 139 0 138 0;
-#X connect 143 0 142 0;
-#X connect 146 0 145 0;
-#X connect 150 0 149 0;
-#X connect 153 0 152 0;
-#X connect 157 0 156 0;
-#X connect 161 0 160 0;
-#X connect 165 0 163 0;
-#X connect 169 0 167 0;
-#X connect 174 0 171 0;
-#X connect 175 0 172 0;
-#X connect 179 0 177 0;
-#X connect 188 0 187 0;
-#X connect 188 0 189 0;
-#X connect 190 0 191 0;
-#X connect 192 0 193 0;
-#X connect 192 1 190 0;
-#X restore 115 574 pd More_Info;
-#X text 36 492 - LEFT:;
-#X text 412 575 updated for GridFlow version 0.8.0;
-#X floatatom 151 163 5 0 0 0 - - -;
-#X text 113 554 list of other operators;
-#X obj 71 9 # +;
-#X text 108 12 - OPERATORS ([# +] in this case) APPLY OPERATIONS ONTO
-GRIDS;
-#X text 109 345 Grid - accepts a grid that will be modified by the
-operator according to the right inlet value. (list of operators in
-[pd more_info]) ([# +] in this example.);
-#X text 108 395 Grid - accepts grids that will modify the incoming
-grid \, from the left inlet \, (preferably of the same dimensions.)
-;
-#X text 105 439 Integer - accepts integers that will modify the incoming
-grid.;
-#X text 107 492 Grid - outputs the modified data as a grid.;
-#X obj 142 211 display;
-#X obj 114 93 #color;
-#X msg 114 60 255 0 0;
-#X obj 114 253 #color;
-#X obj 511 179 #in;
-#X obj 511 249 #out window;
-#X msg 541 156 open b001.jpg;
-#X obj 511 113 t b b;
-#X obj 511 58 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
-;
-#X obj 511 79 metro 100;
-#X obj 511 202 # +;
-#X obj 511 226 #clip;
-#X text 204 164 <-- change this value.;
-#X obj 114 181 # + 42;
-#X text 293 109 <-- modify color;
-#X connect 10 0 31 1;
-#X connect 19 0 31 0;
-#X connect 20 0 19 0;
-#X connect 22 0 28 0;
-#X connect 24 0 22 0;
-#X connect 25 0 22 0;
-#X connect 25 1 24 0;
-#X connect 26 0 27 0;
-#X connect 27 0 25 0;
-#X connect 28 0 29 0;
-#X connect 29 0 23 0;
-#X connect 31 0 18 0;
-#X connect 31 0 21 0;
diff --git a/externals/gridflow/doc/flow_classes/#-help.pd b/externals/gridflow/doc/flow_classes/#-help.pd
deleted file mode 100644
index 3b891db4..00000000
--- a/externals/gridflow/doc/flow_classes/#-help.pd
+++ /dev/null
@@ -1,309 +0,0 @@
-#N canvas 291 30 1089 795 10;
-#X text 76 366 A + B;
-#X text 77 510 A * B;
-#X text 73 571 rounded towards zero;
-#X text 14 73 angles are in hundredth of degrees \, so a full circle
-(two pi radians) is 36000 you can convert from radians to our angles
-by multiplying by 18000/pi.;
-#X text 13 44 for all of these \, A refers to the left inlet and B
-to the value on the right.;
-#X text 15 27 Consult doc/architecture.html to see all the 40 of them.
-;
-#X text 902 31 GridFlow 0.8.0;
-#X obj 479 70 #color;
-#X obj 684 72 #color;
-#X msg 15 366 op +;
-#X msg 15 507 op *;
-#X obj 15 385 s op;
-#X obj 423 155 r op;
-#X obj 15 526 s op;
-#X obj 15 436 s op;
-#X text 77 421 A - B;
-#X msg 15 417 op -;
-#X obj 15 761 s op;
-#X msg 15 742 op %;
-#X text 69 743 A % B;
-#X obj 15 575 s op;
-#X msg 15 556 op /;
-#X text 79 557 A / B;
-#X obj 14 809 s op;
-#X text 83 790 B % A;
-#X text 15 14 Numeric Operators: *whoa \, there's a lot of them;
-#X obj 16 482 s op;
-#X msg 16 463 op inv+;
-#X text 79 464 B -A;
-#X obj 15 623 s op;
-#X text 79 605 A / B;
-#X msg 15 604 op div;
-#X text 75 621 rounded downwards;
-#X obj 15 668 s op;
-#X msg 15 649 op inv*;
-#X text 80 650 B / A;
-#X text 77 665 rounded towards 0;
-#X obj 15 712 s op;
-#X text 76 714 rounded downwards;
-#X text 101 695 B / A;
-#X text 68 760 modulo (goes with div);
-#X text 65 809 modulo (goes with div);
-#X msg 14 790 op swap%;
-#X obj 15 286 s op;
-#X obj 15 334 s op;
-#X msg 15 267 op ignore;
-#X text 90 268 A;
-#X msg 15 315 op put;
-#X text 76 315 B;
-#X msg 15 693 op swapdiv;
-#X obj 237 286 s op;
-#X msg 237 267 op rem;
-#X text 315 263 A % B;
-#X obj 236 338 s op;
-#X text 330 319 B % A;
-#X text 314 278 remainder;
-#X text 314 293 (goes with /);
-#X msg 236 319 op swaprem;
-#X text 327 333 remainder;
-#X text 326 348 (goes with /);
-#X obj 236 388 s op;
-#X obj 236 435 s op;
-#X msg 236 369 op gcd;
-#X msg 236 416 op lcm;
-#X text 298 373 greatest common divisor;
-#X text 298 420 least common multiple;
-#X obj 235 481 s op;
-#X text 299 464 A or B \, bitwise;
-#X msg 235 462 op;
-#X obj 235 525 s op;
-#X text 299 508 A xor B \, bitwise;
-#X msg 235 506 op ^;
-#X obj 235 578 s op;
-#X msg 235 559 op &;
-#X text 300 561 A and B \, bitwise;
-#X obj 235 623 s op;
-#X msg 235 604 op <<;
-#X text 300 606 A * (2**(B % 32);
-#X text 299 621 left-shifthing;
-#X obj 235 669 s op;
-#X msg 235 649 op >>;
-#X text 299 666 right-shifthing;
-#X text 300 652 A / (2**(B % 32);
-#X obj 218 463 bng 15 250 50 0 empty empty empty 0 -6 0 8 -258699 -1
--1;
-#X obj 235 714 s op;
-#X msg 235 695 op;
-#X obj 218 695 bng 15 250 50 0 empty empty empty 0 -6 0 8 -258699 -1
--1;
-#X text 299 697 if A is zero then;
-#X text 300 711 B else A;
-#X obj 235 758 s op;
-#X text 299 741 if A is zero then;
-#X text 15 110 comment;
-#X msg 235 739 op &&;
-#X text 300 755 zero else B;
-#X obj 236 807 s op;
-#X msg 236 788 op min;
-#X text 300 789 the lowest value;
-#X text 301 804 in A \, B;
-#X obj 500 287 s op;
-#X msg 500 267 op max;
-#X text 556 284 in A \, B;
-#X text 557 268 the highest value;
-#X obj 500 333 s op;
-#X msg 500 313 op cmp;
-#X text 551 310 -1 when A<B;
-#X text 558 338 1 when A>B;
-#X text 558 324 0 when A=B;
-#X obj 500 386 s op;
-#X msg 500 366 op ==;
-#X text 557 367 is A equal to B ?;
-#X text 556 385 1 = true \, 0 = false;
-#X obj 500 433 s op;
-#X msg 500 413 op !=;
-#X text 557 414 is A not equal to B ?;
-#X obj 500 477 s op;
-#X msg 500 456 op >;
-#X text 557 457 is A greater than B ?;
-#X obj 500 523 s op;
-#X msg 500 502 op <=;
-#X text 557 503 is A not greater than B ?;
-#X obj 500 572 s op;
-#X msg 500 551 op <;
-#X text 557 552 is A less than B ?;
-#X obj 500 618 s op;
-#X msg 500 597 op >=;
-#X text 557 598 is A not less than B ?;
-#X obj 500 666 s op;
-#X msg 500 645 op sin*;
-#X text 559 646 B * sin(A);
-#X obj 500 713 s op;
-#X msg 500 691 op cos*;
-#X text 560 693 B * cos(A);
-#X obj 500 758 s op;
-#X msg 500 736 op atan;
-#X text 560 737 arctan(A/B);
-#X obj 499 805 s op;
-#X msg 499 783 op tan*;
-#X text 559 784 tanh(A);
-#X obj 738 288 s op;
-#X msg 738 268 op log*;
-#X text 795 269 B*log(A);
-#X text 794 286 in base e;
-#X obj 738 334 s op;
-#X msg 738 314 op gamma;
-#X text 809 314 floor(pow(a/256.0 \, 256.0/b)*256.0);
-#X obj 737 385 s op;
-#X msg 737 366 op **;
-#X text 799 368 A**B;
-#X text 799 385 A raised to power B;
-#X obj 737 431 s op;
-#X msg 737 412 op abs-;
-#X text 799 412 absolute value of (A-B);
-#X obj 737 478 s op;
-#X msg 737 459 op rand;
-#X text 800 473 number below A;
-#X text 799 458 randomly produces a non-negative;
-#X obj 737 524 s op;
-#X msg 737 505 op sqrt;
-#X text 799 504 square root of A;
-#X text 800 519 rounded downwards;
-#X obj 737 566 s op;
-#X msg 737 547 op sq-;
-#X text 800 546 (A-B) times (A-B);
-#X obj 740 614 s op;
-#X obj 723 595 bng 15 250 50 0 empty empty empty 0 -6 0 8 -258699 -1
--1;
-#X msg 740 595 op clip+;
-#X text 808 595 A+B but output is clipped;
-#X obj 740 660 s op;
-#X obj 723 641 bng 15 250 50 0 empty empty empty 0 -6 0 8 -258699 -1
--1;
-#X msg 740 641 op clip-;
-#X text 808 641 A-B but output is clipped;
-#X obj 740 706 s op;
-#X obj 740 750 s op;
-#X text 808 687 (A+B)/2;
-#X msg 740 687 op avg;
-#X msg 740 731 op hypot;
-#X text 808 731 square root of (A*A+B*B);
-#X obj 740 792 s op;
-#X obj 723 773 bng 15 250 50 0 empty empty empty 0 -6 0 8 -258699 -1
--1;
-#X msg 740 773 op erf;
-#X text 807 773 integral of e^(-x*x)dx;
-#N canvas 8 30 615 351 all_operators 0;
-#X obj 174 99 # -;
-#X obj 522 97 # swap%;
-#X obj 186 177 # abs-;
-#X obj 238 177 # rand;
-#X obj 342 177 # sq-;
-#X obj 290 177 # sqrt;
-#X obj 144 99 # +;
-#X obj 492 97 # %;
-#X obj 260 99 # *;
-#X obj 289 99 # /;
-#X obj 206 99 # inv+;
-#X obj 321 99 # div;
-#X obj 367 98 # inv*;
-#X obj 420 98 # swapdiv;
-#X obj 35 99 # ignore;
-#X obj 100 100 # put;
-#X obj 35 125 # rem;
-#X obj 78 125 # swaprem;
-#X obj 149 125 # gcd;
-#X obj 191 125 # lcm;
-#X obj 234 125 # |;
-#X obj 234 125 # |;
-#X obj 263 125 # ^;
-#X obj 293 125 # &;
-#X obj 322 125 # <<;
-#X obj 358 125 # >>;
-#X obj 394 125 # ||;
-#X obj 431 125 # &&;
-#X obj 467 125 # min;
-#X obj 35 151 # max;
-#X obj 79 151 # cmp;
-#X obj 124 151 # ==;
-#X obj 162 151 # !=;
-#X obj 199 151 # >;
-#X obj 234 151 # <=;
-#X obj 274 151 # <;
-#X obj 304 152 # >=;
-#X obj 341 152 # sin*;
-#X obj 391 152 # cos*;
-#X obj 442 152 # atan;
-#X obj 493 152 # tanh*;
-#X obj 35 177 # log*;
-#X obj 87 177 # gamma;
-#X obj 148 177 # **;
-#X obj 388 177 # avg;
-#X obj 433 177 # hypot;
-#X restore 15 174 pd all_operators;
-#X text 585 31 select values below;
-#X text 14 233 select an operator below;
-#X text 478 51 A;
-#X text 683 53 B;
-#X obj 479 182 # +;
-#X obj 257 196 #color;
-#X obj 297 162 #reverse;
-#X obj 443 215 display;
-#X obj 656 197 #unpack 3;
-#X floatatom 605 244 5 0 0 0 - - -;
-#X obj 642 150 t a a;
-#X obj 597 191 display;
-#X connect 7 0 186 0;
-#X connect 7 0 188 0;
-#X connect 7 0 192 0;
-#X connect 8 0 186 1;
-#X connect 9 0 11 0;
-#X connect 10 0 13 0;
-#X connect 12 0 186 0;
-#X connect 16 0 14 0;
-#X connect 18 0 17 0;
-#X connect 21 0 20 0;
-#X connect 27 0 26 0;
-#X connect 31 0 29 0;
-#X connect 34 0 33 0;
-#X connect 42 0 23 0;
-#X connect 45 0 43 0;
-#X connect 47 0 44 0;
-#X connect 49 0 37 0;
-#X connect 51 0 50 0;
-#X connect 57 0 53 0;
-#X connect 62 0 60 0;
-#X connect 63 0 61 0;
-#X connect 68 0 66 0;
-#X connect 71 0 69 0;
-#X connect 73 0 72 0;
-#X connect 76 0 75 0;
-#X connect 80 0 79 0;
-#X connect 85 0 84 0;
-#X connect 92 0 89 0;
-#X connect 95 0 94 0;
-#X connect 99 0 98 0;
-#X connect 103 0 102 0;
-#X connect 108 0 107 0;
-#X connect 112 0 111 0;
-#X connect 115 0 114 0;
-#X connect 118 0 117 0;
-#X connect 121 0 120 0;
-#X connect 124 0 123 0;
-#X connect 127 0 126 0;
-#X connect 130 0 129 0;
-#X connect 133 0 132 0;
-#X connect 136 0 135 0;
-#X connect 139 0 138 0;
-#X connect 143 0 142 0;
-#X connect 146 0 145 0;
-#X connect 150 0 149 0;
-#X connect 153 0 152 0;
-#X connect 157 0 156 0;
-#X connect 161 0 160 0;
-#X connect 165 0 163 0;
-#X connect 169 0 167 0;
-#X connect 174 0 171 0;
-#X connect 175 0 172 0;
-#X connect 179 0 177 0;
-#X connect 188 0 187 0;
-#X connect 188 0 189 0;
-#X connect 190 0 191 0;
-#X connect 192 0 193 0;
-#X connect 192 1 190 0;
diff --git a/externals/gridflow/doc/flow_classes/#-icon.png b/externals/gridflow/doc/flow_classes/#-icon.png
deleted file mode 100644
index b1fedc1b..00000000
--- a/externals/gridflow/doc/flow_classes/#-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#apply_colormap_channelwise-icon.png b/externals/gridflow/doc/flow_classes/#apply_colormap_channelwise-icon.png
deleted file mode 100644
index 155d68c3..00000000
--- a/externals/gridflow/doc/flow_classes/#apply_colormap_channelwise-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#cast-help.pd b/externals/gridflow/doc/flow_classes/#cast-help.pd
deleted file mode 100644
index 94246cc9..00000000
--- a/externals/gridflow/doc/flow_classes/#cast-help.pd
+++ /dev/null
@@ -1,45 +0,0 @@
-#N canvas 435 101 684 379 10;
-#X text 108 14 returns a grid of the same dimensions containing all
-the same values after type conversion. note that while casting to a
-smaller type \, overflowing values will be truncated.;
-#X text 109 53 numbertypes are: uint8 \, int16 \, int32 \, int64 \,
-float32 \, float64. see doc/architecture.html for more info.;
-#X obj 115 90 nbx 8 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10
--262144 -1 -1 3.1416 256;
-#X obj 78 136 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X text 14 136 print it:;
-#X obj 78 210 t a a a a;
-#X obj 216 90 nbx 8 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10
--262144 -1 -1 42 256;
-#X obj 126 110 nbx 8 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10
--262144 -1 -1 2005 256;
-#X obj 215 110 nbx 8 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10
--262144 -1 -1 1e+10 256;
-#X obj 115 136 #pack 4 float32;
-#X obj 115 158 #redim ( 2 2 );
-#X obj 78 185 #store;
-#X obj 136 234 #print;
-#X obj 116 254 #cast uint8;
-#X obj 116 274 #print;
-#X obj 97 294 #cast int32;
-#X obj 97 314 #print;
-#X obj 78 334 #cast float64;
-#X obj 78 354 #print;
-#X text 14 14 [#cast];
-#X text 575 10 GridFlow 0.8.0;
-#X connect 2 0 9 0;
-#X connect 3 0 11 0;
-#X connect 5 0 17 0;
-#X connect 5 1 15 0;
-#X connect 5 2 13 0;
-#X connect 5 3 12 0;
-#X connect 6 0 9 1;
-#X connect 7 0 9 2;
-#X connect 8 0 9 3;
-#X connect 9 0 10 0;
-#X connect 10 0 11 1;
-#X connect 11 0 5 0;
-#X connect 13 0 14 0;
-#X connect 15 0 16 0;
-#X connect 17 0 18 0;
diff --git a/externals/gridflow/doc/flow_classes/#cast-icon.png b/externals/gridflow/doc/flow_classes/#cast-icon.png
deleted file mode 100644
index 7abe3191..00000000
--- a/externals/gridflow/doc/flow_classes/#cast-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#checkers-icon.png b/externals/gridflow/doc/flow_classes/#checkers-icon.png
deleted file mode 100644
index e0ab0ad0..00000000
--- a/externals/gridflow/doc/flow_classes/#checkers-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#clip-help.pd b/externals/gridflow/doc/flow_classes/#clip-help.pd
deleted file mode 100644
index 490afbbc..00000000
--- a/externals/gridflow/doc/flow_classes/#clip-help.pd
+++ /dev/null
@@ -1,67 +0,0 @@
-#N canvas 693 131 606 601 10;
-#X obj 360 381 #in;
-#X obj 360 422 # + 42;
-#X floatatom 404 400 5 0 0 0 - - -;
-#X obj 360 528 #out window;
-#X msg 390 358 open b001.jpg;
-#X obj 360 335 t b b;
-#X obj -1 0 cnv 15 90 600 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 360 302 metro 100;
-#X obj 360 281 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1
-;
-#X floatatom 384 452 5 0 0 0 - - -;
-#X floatatom 434 452 5 0 0 0 - - -;
-#X text 38 36 INLETS:;
-#X text 38 51 - LEFT:;
-#X text 32 143 - RIGHT:;
-#X text 29 253 OUTLETS:;
-#X text 15 194 ARGUMENTS:;
-#X text 22 283 EXAMPLES:;
-#X text 20 565 SEE ALSO:;
-#X text 25 93 - CENTER:;
-#X obj 47 10 #clip;
-#X text 501 558 GridFlow 0.8.0;
-#X floatatom 119 397 5 0 0 0 - - -;
-#X floatatom 119 286 5 0 0 0 - - -;
-#X text 205 339 creation arguments;
-#X obj 119 342 #clip 255 0;
-#X text 107 191 Two - [int] accepts two integers as creation arguments
-which initializes the first values to be stored in the object and duplicate
-the functions of the second and third inlet.;
-#X obj 118 564 # min;
-#X obj 165 564 # max;
-#X obj 213 564 clip;
-#X text 109 91 Integer - An integer at the second inlet is stored for
-later use. It will be used as the high value at which to clip incoming
-Grid values at that left inlet.;
-#X text 109 142 Integer - An integer at the third inlet is stored for
-later use. It will be used as the low value at which to clip incoming
-Grid values at that left inlet.;
-#X text 108 12 - FORCE THE GRID VALUES INTO A RANGE;
-#X text 109 50 Grid - Grid values at the left inlet will be clipped
-to the high and low values stored in the object.;
-#X obj 360 485 #clip;
-#X text 419 483 no arguments (defaults to 255 \, 0);
-#X text 452 399 <-- change these;
-#X obj 119 312 #import (1);
-#X obj 119 370 #export;
-#X text 107 191 Two - [int] accepts two integers as creation arguments
-which initializes the first values to be stored in the object and duplicate
-the functions of the second and third inlet.;
-#X text 485 452 <--;
-#X connect 0 0 1 0;
-#X connect 1 0 33 0;
-#X connect 2 0 1 1;
-#X connect 4 0 0 0;
-#X connect 5 0 0 0;
-#X connect 5 1 4 0;
-#X connect 7 0 5 0;
-#X connect 8 0 7 0;
-#X connect 9 0 33 1;
-#X connect 10 0 33 2;
-#X connect 22 0 36 0;
-#X connect 24 0 37 0;
-#X connect 33 0 3 0;
-#X connect 36 0 24 0;
-#X connect 37 0 21 0;
diff --git a/externals/gridflow/doc/flow_classes/#color-icon.png b/externals/gridflow/doc/flow_classes/#color-icon.png
deleted file mode 100644
index 0ca1b51c..00000000
--- a/externals/gridflow/doc/flow_classes/#color-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#complex_sq-icon.png b/externals/gridflow/doc/flow_classes/#complex_sq-icon.png
deleted file mode 100644
index 9ad2c3f5..00000000
--- a/externals/gridflow/doc/flow_classes/#complex_sq-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#contrast-help.pd b/externals/gridflow/doc/flow_classes/#contrast-help.pd
deleted file mode 100644
index 7e8b1734..00000000
--- a/externals/gridflow/doc/flow_classes/#contrast-help.pd
+++ /dev/null
@@ -1,46 +0,0 @@
-#N canvas 120 14 814 532 10;
-#X obj 96 131 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1
--1;
-#X obj 22 151 metro 100;
-#X obj 22 130 tgl 15 0 empty empty empty 0 -6 0 8 -233017 -1 -1 0 1
-;
-#X obj 123 269 hsl 128 15 0 256 0 0 empty empty empty -2 -6 0 8 -262144
--1 -1 0 1;
-#X obj 124 332 hsl 128 15 0 256 0 0 empty empty empty -2 -6 0 8 -262144
--1 -1 0 1;
-#X text 15 57 adjusts the intensity in an image. resulting values outside
-0-255 are automatically clipped.;
-#X text 262 334 master contrast;
-#X text 258 273 secondary contrast;
-#X floatatom 51 343 5 0 0 0 - - -;
-#X floatatom 80 375 5 0 0 0 - - -;
-#X text 401 273 makes the incoming black correspond to a certain fraction
-between output black and the master contrast value. no effect is 256
-this is also the default.;
-#X text 402 334 makes the incoming white correspond to a certain fraction
-between output black and output white. no effect is 256 this is also
-the default.;
-#X text 18 497 see also:;
-#X msg 119 220 open bluemarble.jpg;
-#X obj 96 151 fork;
-#X obj 88 499 #convolve;
-#X obj 158 499 #posterize;
-#X obj 235 499 #solarize;
-#X obj 305 499 #layer;
-#X obj 22 423 #out window;
-#X obj 22 397 #contrast;
-#X obj 22 237 #in;
-#X text 13 15 [#contrast];
-#X text 700 15 GridFlow 0.8.0;
-#X connect 0 0 14 0;
-#X connect 1 0 21 0;
-#X connect 2 0 1 0;
-#X connect 3 0 8 0;
-#X connect 4 0 9 0;
-#X connect 8 0 20 1;
-#X connect 9 0 20 2;
-#X connect 13 0 21 0;
-#X connect 14 0 21 0;
-#X connect 14 1 13 0;
-#X connect 20 0 19 0;
-#X connect 21 0 20 0;
diff --git a/externals/gridflow/doc/flow_classes/#contrast-icon.png b/externals/gridflow/doc/flow_classes/#contrast-icon.png
deleted file mode 100644
index 42717ad6..00000000
--- a/externals/gridflow/doc/flow_classes/#contrast-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#convolve-icon.png b/externals/gridflow/doc/flow_classes/#convolve-icon.png
deleted file mode 100644
index 476ad435..00000000
--- a/externals/gridflow/doc/flow_classes/#convolve-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#dim-help.pd b/externals/gridflow/doc/flow_classes/#dim-help.pd
deleted file mode 100644
index 49017c9b..00000000
--- a/externals/gridflow/doc/flow_classes/#dim-help.pd
+++ /dev/null
@@ -1,32 +0,0 @@
-#N canvas 449 187 546 331 10;
-#X obj 26 83 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1
--1;
-#X obj 137 217 print dimension;
-#X obj 18 241 print number_of_dimensions;
-#X text 18 282 see also:;
-#X obj 136 283 rubyprint;
-#X obj 206 283 printargs;
-#X msg 18 63 open bluemarble.jpg;
-#X text 438 10 GridFlow 0.8.0;
-#X obj 87 283 #print;
-#X obj 276 283 #export;
-#X obj 332 283 #export_list;
-#X obj 137 196 #export;
-#X obj 18 197 #dim;
-#X obj 18 217 #export;
-#X obj 18 127 #dim;
-#X obj 18 103 #in;
-#X text 14 15 [#dim];
-#X text 137 100 dim receives a grid \, doesn't look at the data within
-but only the list of dimensions and turns it into a one dimension grid.
-given a grid sized like dim(240 \, 320 \, 4) #dim will return a grid
-like dim(3) whose values are 240 \, 320 \, 4;
-#X connect 0 0 15 0;
-#X connect 6 0 0 0;
-#X connect 6 0 15 0;
-#X connect 11 0 1 0;
-#X connect 12 0 13 0;
-#X connect 13 0 2 0;
-#X connect 14 0 11 0;
-#X connect 14 0 12 0;
-#X connect 15 0 14 0;
diff --git a/externals/gridflow/doc/flow_classes/#dim-icon.png b/externals/gridflow/doc/flow_classes/#dim-icon.png
deleted file mode 100644
index 4c0462df..00000000
--- a/externals/gridflow/doc/flow_classes/#dim-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#downscale_by-icon.png b/externals/gridflow/doc/flow_classes/#downscale_by-icon.png
deleted file mode 100644
index 59b2bf23..00000000
--- a/externals/gridflow/doc/flow_classes/#downscale_by-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#draw_image-icon.png b/externals/gridflow/doc/flow_classes/#draw_image-icon.png
deleted file mode 100644
index 7f9a62b1..00000000
--- a/externals/gridflow/doc/flow_classes/#draw_image-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#draw_polygon-icon.png b/externals/gridflow/doc/flow_classes/#draw_polygon-icon.png
deleted file mode 100644
index 6945bd62..00000000
--- a/externals/gridflow/doc/flow_classes/#draw_polygon-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#export-icon.png b/externals/gridflow/doc/flow_classes/#export-icon.png
deleted file mode 100644
index 322e8d91..00000000
--- a/externals/gridflow/doc/flow_classes/#export-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#export_list-icon.png b/externals/gridflow/doc/flow_classes/#export_list-icon.png
deleted file mode 100644
index 11743525..00000000
--- a/externals/gridflow/doc/flow_classes/#export_list-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#export_symbol-icon.png b/externals/gridflow/doc/flow_classes/#export_symbol-icon.png
deleted file mode 100644
index 28c70df9..00000000
--- a/externals/gridflow/doc/flow_classes/#export_symbol-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#fade-help.pd b/externals/gridflow/doc/flow_classes/#fade-help.pd
deleted file mode 100644
index 551d8637..00000000
--- a/externals/gridflow/doc/flow_classes/#fade-help.pd
+++ /dev/null
@@ -1,80 +0,0 @@
-#N canvas 48 74 732 441 10;
-#X obj 268 95 cnv 15 460 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X obj 278 115 cnv 15 450 15 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 8 406 cnv 15 720 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X obj 8 3 cnv 15 720 15 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 278 174 cnv 15 450 15 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 268 25 cnv 15 460 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 271 25 Arguments:;
-#X obj 268 281 cnv 15 460 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 271 281 Outlets:;
-#X obj 8 25 cnv 15 250 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 11 25 Usage:;
-#X obj 8 45 cnv 15 250 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 8 81 cnv 15 250 320 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 268 343 cnv 15 460 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 271 343 More Info:;
-#X text 271 95 Inlets: (Read left to right \, inlet "0" being the leftmost)
-;
-#X text 281 115 0: (Leftmost);
-#X text 281 174 1: (Rightmost);
-#X obj 104 53 #fade;
-#X obj 91 324 #fade;
-#X obj 91 350 #out window;
-#X msg 31 224 open b001.jpg;
-#X obj 22 166 bng 15 250 50 0 empty empty empty 0 -6 0 8 -225271 -1
--1;
-#X obj 22 252 #in;
-#X obj 22 199 t b b;
-#X obj 50 303 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1
--1;
-#X floatatom 134 305 5 0 0 0 - - -;
-#X obj 22 139 metro 500;
-#X obj 22 113 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
-;
-#X obj 144 165 bng 15 250 50 0 empty empty empty 0 -6 0 8 -225271 -1
--1;
-#X obj 144 251 #in;
-#X obj 144 198 t b b;
-#X msg 153 223 open r001.jpg;
-#X obj 144 136 metro 500;
-#X obj 144 111 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X text 16 413 GridFlow 0.8.0;
-#X text 71 3 Fades a grids according to the argument you provide.;
-#X text 10 4 SUMMARY:;
-#X text 284 45 One - See inlet 0: (rightmost);
-#X text 292 135 Grid - Accepts s grid and multiplies it with a fraction
-of the previously outputted grid.;
-#X text 292 195 Integer - accepts an integer that determines the amount
-one grid is blended with another. For example: integer 5 takes 20%
-of the first image and blends it with 80% of the following image.;
-#X text 283 301 One - Outputs the fading images.;
-#X connect 19 0 20 0;
-#X connect 21 0 23 0;
-#X connect 22 0 24 0;
-#X connect 23 0 19 0;
-#X connect 24 0 23 0;
-#X connect 24 1 21 0;
-#X connect 25 0 19 0;
-#X connect 26 0 19 1;
-#X connect 27 0 22 0;
-#X connect 28 0 27 0;
-#X connect 29 0 31 0;
-#X connect 30 0 19 0;
-#X connect 31 0 30 0;
-#X connect 31 1 32 0;
-#X connect 32 0 30 0;
-#X connect 33 0 29 0;
-#X connect 34 0 33 0;
diff --git a/externals/gridflow/doc/flow_classes/#fade-icon.png b/externals/gridflow/doc/flow_classes/#fade-icon.png
deleted file mode 100644
index 6b7f0fd1..00000000
--- a/externals/gridflow/doc/flow_classes/#fade-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#fade_lin-icon.png b/externals/gridflow/doc/flow_classes/#fade_lin-icon.png
deleted file mode 100644
index 086a8194..00000000
--- a/externals/gridflow/doc/flow_classes/#fade_lin-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#finished-icon.png b/externals/gridflow/doc/flow_classes/#finished-icon.png
deleted file mode 100644
index b4ec90ef..00000000
--- a/externals/gridflow/doc/flow_classes/#finished-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#fold-icon.png b/externals/gridflow/doc/flow_classes/#fold-icon.png
deleted file mode 100644
index 09898f18..00000000
--- a/externals/gridflow/doc/flow_classes/#fold-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#for-icon.png b/externals/gridflow/doc/flow_classes/#for-icon.png
deleted file mode 100644
index 607fe8cb..00000000
--- a/externals/gridflow/doc/flow_classes/#for-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#grade-icon.png b/externals/gridflow/doc/flow_classes/#grade-icon.png
deleted file mode 100644
index d94b8bf8..00000000
--- a/externals/gridflow/doc/flow_classes/#grade-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#greyscale_to_rgb-icon.png b/externals/gridflow/doc/flow_classes/#greyscale_to_rgb-icon.png
deleted file mode 100644
index 0a027327..00000000
--- a/externals/gridflow/doc/flow_classes/#greyscale_to_rgb-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#import-icon.png b/externals/gridflow/doc/flow_classes/#import-icon.png
deleted file mode 100644
index 7dc215ac..00000000
--- a/externals/gridflow/doc/flow_classes/#import-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#in-help.pd b/externals/gridflow/doc/flow_classes/#in-help.pd
deleted file mode 100644
index 6db03b52..00000000
--- a/externals/gridflow/doc/flow_classes/#in-help.pd
+++ /dev/null
@@ -1,135 +0,0 @@
-#N canvas 373 24 613 584 10;
-#X obj 123 779 #out window;
-#X obj 123 711 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 5 -9 cnv 15 90 1100 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 57 -1 #in;
-#X text 35 37 INLETS:;
-#X text 42 68 -LEFT:;
-#X text 102 -1 -IMPORTS GRIDS (IMAGES OR MOVIES);
-#X text 110 268 Message "close" closes the video input device. Only
-necessary if you are using a live capture device.;
-#X text 109 68 Bang sends a grid (static image or one frame of video)
-to [#out]. Successive bangs advance through the grid (frames of video).
-;
-#X text 110 119 Message "open" follwed by the filename \, ex: "open
-someimage.jpg" gives a grid (most often an image) to an [#out].;
-#X text 108 226 Interger will display the frame number of the frame
-just sent. Applies to formats that have frame numbers.;
-#X text 109 173 Message "set" \, followed by a number \, will select
-the video frame corresponding to the number. A bang must be sent in
-order to display the frame.;
-#X text 8 444 ARGUMENTS:;
-#X text 107 444 filename \, [#in someimage.jpg] eliminates the need
-for message "open someimage.jpg" but limits that image.;
-#X text 23 500 OUTLETS:;
-#X text 37 531 -LEFT:;
-#X text 110 530 Displays the resulting grid when connected to [#out]
-;
-#X text 29 574 -RIGHT:;
-#X text 109 574 Integer \, a numbner box will identify the frame number
-corresponding to the frame currently displayed.Applies only to formats
-that have frame numbers.;
-#X text 16 676 EXAMPLES:;
-#X text 112 313 Message "rewind" will rewind a video file to its beginning.
-;
-#X text 111 341 Message "loop 1" restarts a video each time it reaches
-the end. The loop option is on by default.;
-#X text 110 381 Message "loop 0" turns off the loop option. The video
-stops once it reaches the end.;
-#X text 110 624 Bang signals when a frame could not be read and signals
-the end of a file.;
-#X obj 123 755 #in;
-#X floatatom 402 752 5 0 0 0 - - -;
-#X msg 343 752 set 2;
-#X msg 131 733 open b001.jpg;
-#X text 137 685 for images:;
-#X obj 320 880 #out window;
-#X obj 320 711 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 320 833 #in;
-#X msg 326 730 open movie.mpeg;
-#X msg 404 802 loop 0;
-#X msg 466 804 loop 1;
-#X floatatom 336 859 5 0 0 0 - - -;
-#X msg 404 777 rewind;
-#X text 323 686 for video files:;
-#X obj 382 850 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X text 16 949 SEE ALSO:;
-#X text 367 1067 updated for GridFlow version 0.8.0;
-#N canvas 135 17 680 586 More_Info 0;
-#X msg 52 283 option timelog \$1;
-#X obj 52 263 tgl 15 0 empty empty empty 0 -6 0 8 -233017 -1 -1 0 1
-;
-#X text 274 307 upload a grid;
-#X text 261 80 upload a grid;
-#X text 194 108 open default display for screenshot;
-#X msg 73 134 open videodev /dev/video0;
-#X text 260 136 open a video device;
-#X msg 75 332 open x11 here;
-#X msg 87 356 open x11 local 10;
-#X text 182 285 show/hide timing statistics;
-#X text 178 334 connect to default display;
-#X text 218 358 connect to display #10 on this machine;
-#X msg 100 380 open x11 remote.host.bla.net 0;
-#X text 324 382 connect to remote machine on display #0;
-#X text 290 161 open mpeg video stream;
-#X text 272 155 *;
-#X text 36 558 * path is where you started pd from. usually $home.
-;
-#X text 308 188 open an image file;
-#X msg 114 450 close;
-#X msg 90 161 open lsd.mpeg;
-#X msg 55 107 open x11 here;
-#X msg 35 80 open host.bla.net 7777;
-#X msg 113 404 open img/bla.jpg;
-#X text 300 405 open single file in jpg format;
-#X msg 108 186 open ./img/bla.jpg;
-#X text 35 481 incoming file is sent through the opened device/socket/file.
-in single file formats subsequent pictures overwrite the preceeding
-one. there are many more options. for more information see the reference
-manual in the "formats" and "objects for input/output" sections.;
-#X msg 65 307 open x.test.at 7777;
-#X msg 125 426 open window;
-#X text 228 426 opens a window x11 \, quartz or sdl;
-#X text 577 15 comment;
-#X obj 35 213 #in;
-#X obj 35 441 #out;
-#X text 14 15 #in \, #out communicating grids (pictures) to/from devices
-\, sockets \, files;
-#X connect 0 0 31 0;
-#X connect 1 0 0 0;
-#X connect 5 0 30 0;
-#X connect 7 0 31 0;
-#X connect 8 0 31 0;
-#X connect 12 0 31 0;
-#X connect 18 0 31 0;
-#X connect 19 0 30 0;
-#X connect 20 0 30 0;
-#X connect 21 0 30 0;
-#X connect 22 0 31 0;
-#X connect 24 0 30 0;
-#X connect 26 0 31 0;
-#X connect 27 0 31 0;
-#X connect 30 0 31 0;
-#X restore 105 951 pd More_Info;
-#X obj 105 990 #import ( 1 );
-#X obj 202 990 #export;
-#X obj 257 990 #export_list;
-#X obj 347 990 #export_symbol;
-#X obj 453 989 #pack;
-#X connect 1 0 24 0;
-#X connect 24 0 0 0;
-#X connect 25 0 31 0;
-#X connect 26 0 31 0;
-#X connect 27 0 24 0;
-#X connect 30 0 31 0;
-#X connect 31 0 29 0;
-#X connect 31 1 35 0;
-#X connect 31 1 38 0;
-#X connect 32 0 31 0;
-#X connect 33 0 31 0;
-#X connect 34 0 31 0;
-#X connect 36 0 31 0;
diff --git a/externals/gridflow/doc/flow_classes/#inner-icon.png b/externals/gridflow/doc/flow_classes/#inner-icon.png
deleted file mode 100644
index 6da9db08..00000000
--- a/externals/gridflow/doc/flow_classes/#inner-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#join-icon.png b/externals/gridflow/doc/flow_classes/#join-icon.png
deleted file mode 100644
index d13aefc0..00000000
--- a/externals/gridflow/doc/flow_classes/#join-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#layer-icon.png b/externals/gridflow/doc/flow_classes/#layer-icon.png
deleted file mode 100644
index 19a839fa..00000000
--- a/externals/gridflow/doc/flow_classes/#layer-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#numop-help.pd b/externals/gridflow/doc/flow_classes/#numop-help.pd
deleted file mode 100644
index 22e54eb0..00000000
--- a/externals/gridflow/doc/flow_classes/#numop-help.pd
+++ /dev/null
@@ -1,366 +0,0 @@
-#N canvas 106 82 735 448 10;
-#X obj 278 136 cnv 15 450 15 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 8 410 cnv 15 720 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X obj 8 8 cnv 15 720 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 278 222 cnv 15 450 15 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 267 46 cnv 15 460 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 270 45 Arguments:;
-#X obj 268 292 cnv 15 460 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 271 292 Outlets:;
-#X obj 8 46 cnv 15 250 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 11 46 Usage:;
-#X obj 8 67 cnv 15 250 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 8 104 cnv 15 250 300 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 266 355 cnv 15 460 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 269 355 More Info:;
-#X text 281 136 0: (Leftmost);
-#X text 281 222 1: (Rightmost);
-#X text 12 8 SUMMARY:;
-#X text 73 8 Transforms a grid by applying mathematical operations
-in order to generate effects on a pixel by pixel basis.;
-#X obj 109 76 # +;
-#X floatatom 31 234 5 0 0 0 - - -;
-#X obj 42 288 display;
-#X obj 15 149 #color;
-#X msg 15 116 255 0 0;
-#X obj 15 331 #color;
-#X text 281 74 One - see: inlet 1: (Rightmost);
-#X obj 267 101 cnv 15 460 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 270 101 Inlets: (Read left to right \, inlet "0" being the
-leftmost);
-#X text 283 313 One - outputs the transformed grid.;
-#X text 16 417 GridFlow 0.8.0;
-#X obj 15 258 # +;
-#X text 292 242 Integer - Accepts integers that modify the incoming
-grid.;
-#N canvas 15 0 912 644 numop 0;
-#X text 76 366 A + B;
-#X text 77 510 A * B;
-#X text 73 571 rounded towards zero;
-#X text 14 73 angles are in hundredth of degrees \, so a full circle
-(two pi radians) is 36000 you can convert from radians to our angles
-by multiplying by 18000/pi.;
-#X text 13 44 for all of these \, A refers to the left inlet and B
-to the value on the right.;
-#X text 15 27 Consult doc/architecture.html to see all the 40 of them.
-;
-#X text 902 31 GridFlow 0.8.0;
-#X obj 479 70 #color;
-#X obj 684 72 #color;
-#X msg 15 366 op +;
-#X msg 15 507 op *;
-#X obj 15 385 s op;
-#X obj 423 155 r op;
-#X obj 15 526 s op;
-#X obj 15 436 s op;
-#X text 77 421 A - B;
-#X msg 15 417 op -;
-#X obj 15 761 s op;
-#X msg 15 742 op %;
-#X text 69 743 A % B;
-#X obj 15 575 s op;
-#X msg 15 556 op /;
-#X text 79 557 A / B;
-#X obj 14 809 s op;
-#X text 83 790 B % A;
-#X text 15 14 Numeric Operators: *whoa \, there's a lot of them;
-#X obj 16 482 s op;
-#X msg 16 463 op inv+;
-#X text 79 464 B -A;
-#X obj 15 623 s op;
-#X text 79 605 A / B;
-#X msg 15 604 op div;
-#X text 75 621 rounded downwards;
-#X obj 15 668 s op;
-#X msg 15 649 op inv*;
-#X text 80 650 B / A;
-#X text 77 665 rounded towards 0;
-#X obj 15 712 s op;
-#X text 76 714 rounded downwards;
-#X text 101 695 B / A;
-#X text 68 760 modulo (goes with div);
-#X text 65 809 modulo (goes with div);
-#X msg 14 790 op swap%;
-#X obj 15 286 s op;
-#X obj 15 334 s op;
-#X msg 15 267 op ignore;
-#X text 90 268 A;
-#X msg 15 315 op put;
-#X text 76 315 B;
-#X msg 15 693 op swapdiv;
-#X obj 237 286 s op;
-#X msg 237 267 op rem;
-#X text 315 263 A % B;
-#X obj 236 338 s op;
-#X text 330 319 B % A;
-#X text 314 278 remainder;
-#X text 314 293 (goes with /);
-#X msg 236 319 op swaprem;
-#X text 327 333 remainder;
-#X text 326 348 (goes with /);
-#X obj 236 388 s op;
-#X obj 236 435 s op;
-#X msg 236 369 op gcd;
-#X msg 236 416 op lcm;
-#X text 298 373 greatest common divisor;
-#X text 298 420 least common multiple;
-#X obj 235 481 s op;
-#X text 299 464 A or B \, bitwise;
-#X msg 235 462 op;
-#X obj 235 525 s op;
-#X text 299 508 A xor B \, bitwise;
-#X msg 235 506 op ^;
-#X obj 235 578 s op;
-#X msg 235 559 op &;
-#X text 300 561 A and B \, bitwise;
-#X obj 235 623 s op;
-#X msg 235 604 op <<;
-#X text 300 606 A * (2**(B % 32);
-#X text 299 621 left-shifthing;
-#X obj 235 669 s op;
-#X msg 235 649 op >>;
-#X text 299 666 right-shifthing;
-#X text 300 652 A / (2**(B % 32);
-#X obj 218 463 bng 15 250 50 0 empty empty empty 0 -6 0 8 -258699 -1
--1;
-#X obj 235 714 s op;
-#X msg 235 695 op;
-#X obj 218 695 bng 15 250 50 0 empty empty empty 0 -6 0 8 -258699 -1
--1;
-#X text 299 697 if A is zero then;
-#X text 300 711 B else A;
-#X obj 235 758 s op;
-#X text 299 741 if A is zero then;
-#X text 15 110 comment;
-#X msg 235 739 op &&;
-#X text 300 755 zero else B;
-#X obj 236 807 s op;
-#X msg 236 788 op min;
-#X text 300 789 the lowest value;
-#X text 301 804 in A \, B;
-#X obj 500 287 s op;
-#X msg 500 267 op max;
-#X text 556 284 in A \, B;
-#X text 557 268 the highest value;
-#X obj 500 333 s op;
-#X msg 500 313 op cmp;
-#X text 551 310 -1 when A<B;
-#X text 558 338 1 when A>B;
-#X text 558 324 0 when A=B;
-#X obj 500 386 s op;
-#X msg 500 366 op ==;
-#X text 557 367 is A equal to B ?;
-#X text 556 385 1 = true \, 0 = false;
-#X obj 500 433 s op;
-#X msg 500 413 op !=;
-#X text 557 414 is A not equal to B ?;
-#X obj 500 477 s op;
-#X msg 500 456 op >;
-#X text 557 457 is A greater than B ?;
-#X obj 500 523 s op;
-#X msg 500 502 op <=;
-#X text 557 503 is A not greater than B ?;
-#X obj 500 572 s op;
-#X msg 500 551 op <;
-#X text 557 552 is A less than B ?;
-#X obj 500 618 s op;
-#X msg 500 597 op >=;
-#X text 557 598 is A not less than B ?;
-#X obj 500 666 s op;
-#X msg 500 645 op sin*;
-#X text 559 646 B * sin(A);
-#X obj 500 713 s op;
-#X msg 500 691 op cos*;
-#X text 560 693 B * cos(A);
-#X obj 500 758 s op;
-#X msg 500 736 op atan;
-#X text 560 737 arctan(A/B);
-#X obj 499 805 s op;
-#X msg 499 783 op tan*;
-#X text 559 784 tanh(A);
-#X obj 738 288 s op;
-#X msg 738 268 op log*;
-#X text 795 269 B*log(A);
-#X text 794 286 in base e;
-#X obj 738 334 s op;
-#X msg 738 314 op gamma;
-#X text 809 314 floor(pow(a/256.0 \, 256.0/b)*256.0);
-#X obj 737 385 s op;
-#X msg 737 366 op **;
-#X text 799 368 A**B;
-#X text 799 385 A raised to power B;
-#X obj 737 431 s op;
-#X msg 737 412 op abs-;
-#X text 799 412 absolute value of (A-B);
-#X obj 737 478 s op;
-#X msg 737 459 op rand;
-#X text 800 473 number below A;
-#X text 799 458 randomly produces a non-negative;
-#X obj 737 524 s op;
-#X msg 737 505 op sqrt;
-#X text 799 504 square root of A;
-#X text 800 519 rounded downwards;
-#X obj 737 566 s op;
-#X msg 737 547 op sq-;
-#X text 800 546 (A-B) times (A-B);
-#X obj 740 614 s op;
-#X obj 723 595 bng 15 250 50 0 empty empty empty 0 -6 0 8 -258699 -1
--1;
-#X msg 740 595 op clip+;
-#X text 808 595 A+B but output is clipped;
-#X obj 740 660 s op;
-#X obj 723 641 bng 15 250 50 0 empty empty empty 0 -6 0 8 -258699 -1
--1;
-#X msg 740 641 op clip-;
-#X text 808 641 A-B but output is clipped;
-#X obj 740 706 s op;
-#X obj 740 750 s op;
-#X text 808 687 (A+B)/2;
-#X msg 740 687 op avg;
-#X msg 740 731 op hypot;
-#X text 808 731 square root of (A*A+B*B);
-#X obj 740 792 s op;
-#X obj 723 773 bng 15 250 50 0 empty empty empty 0 -6 0 8 -258699 -1
--1;
-#X msg 740 773 op erf;
-#X text 807 773 integral of e^(-x*x)dx;
-#N canvas 8 30 615 351 all_operators 0;
-#X obj 174 99 # -;
-#X obj 522 97 # swap%;
-#X obj 186 177 # abs-;
-#X obj 238 177 # rand;
-#X obj 342 177 # sq-;
-#X obj 290 177 # sqrt;
-#X obj 144 99 # +;
-#X obj 492 97 # %;
-#X obj 260 99 # *;
-#X obj 289 99 # /;
-#X obj 206 99 # inv+;
-#X obj 321 99 # div;
-#X obj 367 98 # inv*;
-#X obj 420 98 # swapdiv;
-#X obj 35 99 # ignore;
-#X obj 100 100 # put;
-#X obj 35 125 # rem;
-#X obj 78 125 # swaprem;
-#X obj 149 125 # gcd;
-#X obj 191 125 # lcm;
-#X obj 234 125 # |;
-#X obj 234 125 # |;
-#X obj 263 125 # ^;
-#X obj 293 125 # &;
-#X obj 322 125 # <<;
-#X obj 358 125 # >>;
-#X obj 394 125 # ||;
-#X obj 431 125 # &&;
-#X obj 467 125 # min;
-#X obj 35 151 # max;
-#X obj 79 151 # cmp;
-#X obj 124 151 # ==;
-#X obj 162 151 # !=;
-#X obj 199 151 # >;
-#X obj 234 151 # <=;
-#X obj 274 151 # <;
-#X obj 304 152 # >=;
-#X obj 341 152 # sin*;
-#X obj 391 152 # cos*;
-#X obj 442 152 # atan;
-#X obj 493 152 # tanh*;
-#X obj 35 177 # log*;
-#X obj 87 177 # gamma;
-#X obj 148 177 # **;
-#X obj 388 177 # avg;
-#X obj 433 177 # hypot;
-#X restore 15 174 pd all_operators;
-#X text 585 31 select values below;
-#X text 14 233 select an operator below;
-#X text 478 51 A;
-#X text 683 53 B;
-#X obj 479 182 # +;
-#X obj 257 196 #color;
-#X obj 297 162 #reverse;
-#X obj 443 215 display;
-#X obj 656 197 #unpack 3;
-#X floatatom 605 244 5 0 0 0 - - -;
-#X obj 642 150 t a a;
-#X obj 597 191 display;
-#X connect 7 0 186 0;
-#X connect 7 0 188 0;
-#X connect 7 0 192 0;
-#X connect 8 0 186 1;
-#X connect 9 0 11 0;
-#X connect 10 0 13 0;
-#X connect 12 0 186 0;
-#X connect 16 0 14 0;
-#X connect 18 0 17 0;
-#X connect 21 0 20 0;
-#X connect 27 0 26 0;
-#X connect 31 0 29 0;
-#X connect 34 0 33 0;
-#X connect 42 0 23 0;
-#X connect 45 0 43 0;
-#X connect 47 0 44 0;
-#X connect 49 0 37 0;
-#X connect 51 0 50 0;
-#X connect 57 0 53 0;
-#X connect 62 0 60 0;
-#X connect 63 0 61 0;
-#X connect 68 0 66 0;
-#X connect 71 0 69 0;
-#X connect 73 0 72 0;
-#X connect 76 0 75 0;
-#X connect 80 0 79 0;
-#X connect 85 0 84 0;
-#X connect 92 0 89 0;
-#X connect 95 0 94 0;
-#X connect 99 0 98 0;
-#X connect 103 0 102 0;
-#X connect 108 0 107 0;
-#X connect 112 0 111 0;
-#X connect 115 0 114 0;
-#X connect 118 0 117 0;
-#X connect 121 0 120 0;
-#X connect 124 0 123 0;
-#X connect 127 0 126 0;
-#X connect 130 0 129 0;
-#X connect 133 0 132 0;
-#X connect 136 0 135 0;
-#X connect 139 0 138 0;
-#X connect 143 0 142 0;
-#X connect 146 0 145 0;
-#X connect 150 0 149 0;
-#X connect 153 0 152 0;
-#X connect 157 0 156 0;
-#X connect 161 0 160 0;
-#X connect 165 0 163 0;
-#X connect 169 0 167 0;
-#X connect 174 0 171 0;
-#X connect 175 0 172 0;
-#X connect 179 0 177 0;
-#X connect 188 0 187 0;
-#X connect 188 0 189 0;
-#X connect 190 0 191 0;
-#X connect 192 0 193 0;
-#X connect 192 1 190 0;
-#X restore 265 380 pd numop;
-#X text 290 157 Grid - Accepts a grid to be modified by an operator
-consistent with the right inlet value (list of operators in [pd numop]).
-In this example [# +] is used.;
-#X text 72 234 <-- change this value to modify the operation.;
-#X text 193 154 <--modify color with sliders.;
-#X connect 19 0 29 1;
-#X connect 21 0 29 0;
-#X connect 22 0 21 0;
-#X connect 29 0 20 0;
-#X connect 29 0 23 0;
diff --git a/externals/gridflow/doc/flow_classes/#outer-icon.png b/externals/gridflow/doc/flow_classes/#outer-icon.png
deleted file mode 100644
index 7c9c4ed7..00000000
--- a/externals/gridflow/doc/flow_classes/#outer-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#pack-help.pd b/externals/gridflow/doc/flow_classes/#pack-help.pd
deleted file mode 100644
index b2bff45a..00000000
--- a/externals/gridflow/doc/flow_classes/#pack-help.pd
+++ /dev/null
@@ -1,75 +0,0 @@
-#N canvas 29 63 693 623 10;
-#X obj 8 3 cnv 15 90 578 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 45 273 INLETS:;
-#X text 42 304 - LEFT:;
-#X text 33 410 OUTLETS:;
-#X text 28 53 EXAMPLES:;
-#X text 24 506 SEE ALSO:;
-#N canvas 247 137 487 505 More_Info 0;
-#X text 485 23 GridFlow 0.8.0;
-#X obj 523 257 #unpack 3;
-#X floatatom 513 305 5 0 0 0 - - -;
-#X obj 416 190 t a a;
-#X obj 333 301 display;
-#X floatatom 552 305 5 0 0 0 - - -;
-#X floatatom 591 305 5 0 0 0 - - -;
-#X text -48 51 [#unpack];
-#X obj 530 352 #pack 3;
-#X text -49 122 It takes an integer as an argument to specify the number
-of Dimensions the incoming grid has.;
-#X obj 416 76 #color;
-#X obj 516 411 #color;
-#X text -48 84 Accepts grids in its inlet and produces integers via
-its outlet.;
-#X text -39 349 [#pack];
-#X text -39 382 Accepts integers in its inlets and produces a corresponding
-grid via its outlet.;
-#X text -40 421 It takes an integer as an argument to specify the number
-of incoming integers and the corresponding number of Dimensions the
-outgoing grid will have.;
-#X obj 483 332 - 127;
-#X obj -31 190 trigger bang bang;
-#X obj 166 178 metro 100;
-#X obj 89 345 display;
-#X obj 174 272 print blah;
-#X obj 145 316 print blah2;
-#X obj 122 155 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X connect 1 0 2 0;
-#X connect 1 1 5 0;
-#X connect 1 2 6 0;
-#X connect 2 0 16 0;
-#X connect 3 0 4 0;
-#X connect 3 1 1 0;
-#X connect 5 0 8 1;
-#X connect 6 0 8 2;
-#X connect 8 0 11 0;
-#X connect 10 0 3 0;
-#X connect 16 0 8 0;
-#X connect 18 0 19 0;
-#X connect 18 0 20 0;
-#X connect 18 0 21 0;
-#X connect 22 0 18 0;
-#X restore 119 550 pd More_Info;
-#X text 36 435 - LEFT:;
-#X text 412 575 updated for GridFlow version 0.8.0;
-#X obj 47 13 #pack;
-#X text 183 183 comment;
-#X obj 120 173 #color;
-#X floatatom 120 65 5 0 0 0 - - -;
-#X floatatom 142 93 5 0 0 0 - - -;
-#X floatatom 164 121 5 0 0 0 - - -;
-#X obj 120 147 #pack 3;
-#X text 25 346 ARGUMENT:;
-#X text 120 304 Grid - combination of inputs.;
-#X text 104 436 Grid - combination of inputs given by inlets.;
-#X text 114 344 Interger - defines the number of inlets and the amount
-of outcoming grid dimensions.;
-#X obj 121 511 #unpack 3;
-#X text 114 13 Creates a vector (a list of numbers) from individual
-integers.;
-#X connect 12 0 15 0;
-#X connect 13 0 15 1;
-#X connect 14 0 15 2;
-#X connect 15 0 11 0;
diff --git a/externals/gridflow/doc/flow_classes/#pack-icon.png b/externals/gridflow/doc/flow_classes/#pack-icon.png
deleted file mode 100644
index 21ee761b..00000000
--- a/externals/gridflow/doc/flow_classes/#pack-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#pack_and_#unpack-help.pd b/externals/gridflow/doc/flow_classes/#pack_and_#unpack-help.pd
deleted file mode 100644
index 87fa2694..00000000
--- a/externals/gridflow/doc/flow_classes/#pack_and_#unpack-help.pd
+++ /dev/null
@@ -1,85 +0,0 @@
-#N canvas 109 540 736 659 10;
-#X obj 268 124 cnv 15 460 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X obj 278 148 cnv 15 450 15 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 8 641 cnv 15 720 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X obj 7 5 cnv 15 720 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 268 43 cnv 15 460 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 271 43 Arguments:;
-#X obj 268 267 cnv 15 460 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 271 267 Outlets:;
-#X obj 8 43 cnv 15 250 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 11 43 Usage:;
-#X obj 8 63 cnv 15 250 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 8 100 cnv 15 250 200 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 271 124 Inlets: (Read left to right \, inlet "0" being the
-leftmost);
-#X obj 80 71 #pack;
-#X text 11 5 SUMMARY:;
-#X text 76 5 Creates a one dimentional grid (Dim(N) vector) from individual
-integers.;
-#X obj 30 222 #color;
-#X floatatom 30 114 5 0 0 0 - - -;
-#X floatatom 52 142 5 0 0 0 - - -;
-#X floatatom 74 170 5 0 0 0 - - -;
-#X obj 30 196 #pack 3;
-#X text 283 63 One - [integer] defines the number of inlets and the
-amount of grid dimensions.;
-#X text 289 175 Integer - accepts multiple integers as defined by the
-argument and creates a vector.;
-#X text 283 287 One - outputs values from each individual inlet.;
-#X obj 270 483 cnv 15 460 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X obj 281 503 cnv 15 450 15 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 7 335 cnv 15 720 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 268 373 cnv 15 460 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 271 373 Arguments:;
-#X obj 268 595 cnv 15 460 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 271 595 Outlets:;
-#X obj 8 373 cnv 15 250 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 11 373 Usage:;
-#X obj 8 393 cnv 15 250 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 8 430 cnv 15 250 200 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 273 482 Inlets: (Read left to right \, inlet "0" being the
-leftmost);
-#X text 11 335 SUMMARY:;
-#X obj 79 400 #unpack;
-#X obj 30 518 #unpack 3;
-#X obj 30 451 #color;
-#X floatatom 30 601 5 0 0 0 - - -;
-#X floatatom 59 574 5 0 0 0 - - -;
-#X floatatom 88 549 5 0 0 0 - - -;
-#X text 283 393 One - [integer] defines the number of outlets and the
-amount of grid dimensions.;
-#X text 281 148 All:;
-#X text 283 503 All:;
-#X text 284 529 Grid - receives grids and outputs integers.;
-#X text 289 218 Grid - receives grids and outputs integers.;
-#X text 77 335 Outputs individual integers corresponding to the vector
-dimensions (number of elements in a grid).;
-#X text 284 615 All - outputs the vector dimensions as individual integers.
-;
-#X text 17 648 GridFlow 0.8.0;
-#X connect 17 0 20 0;
-#X connect 18 0 20 1;
-#X connect 19 0 20 2;
-#X connect 20 0 16 0;
-#X connect 38 0 40 0;
-#X connect 38 1 41 0;
-#X connect 38 2 42 0;
-#X connect 39 0 38 0;
diff --git a/externals/gridflow/doc/flow_classes/#perspective-icon.png b/externals/gridflow/doc/flow_classes/#perspective-icon.png
deleted file mode 100644
index 23d6f492..00000000
--- a/externals/gridflow/doc/flow_classes/#perspective-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#posterize-icon.png b/externals/gridflow/doc/flow_classes/#posterize-icon.png
deleted file mode 100644
index 0dd80c0f..00000000
--- a/externals/gridflow/doc/flow_classes/#posterize-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#print-help.pd b/externals/gridflow/doc/flow_classes/#print-help.pd
deleted file mode 100644
index cea6ebd8..00000000
--- a/externals/gridflow/doc/flow_classes/#print-help.pd
+++ /dev/null
@@ -1,68 +0,0 @@
-#N canvas 38 0 738 404 10;
-#X obj 269 196 cnv 15 460 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X obj 279 217 cnv 15 450 15 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 7 369 cnv 15 720 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X obj 8 6 cnv 15 720 40 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 268 53 cnv 15 460 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 271 53 Arguments:;
-#X obj 8 53 cnv 15 250 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 11 53 Usage:;
-#X obj 8 73 cnv 15 250 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 271 305 cnv 15 460 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 272 196 Inlets: (Read left to right \, inlet "0" being the
-leftmost);
-#X text 282 217 0: (Leftmost);
-#X obj 8 110 cnv 15 250 250 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 105 79 #print;
-#X text 12 6 SUMMARY:;
-#X floatatom 167 212 5 0 0 0 - - -;
-#X floatatom 189 233 5 0 0 0 - - -;
-#X floatatom 211 253 5 0 0 0 - - -;
-#X obj 34 202 until;
-#X msg 34 176 27;
-#X obj 34 226 random 27;
-#X obj 167 272 #pack 3;
-#X obj 34 251 #import ( 3 3 3 );
-#X msg 35 118 open r001.jpg;
-#X obj 15 150 #in;
-#X obj 12 118 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X text 155 189 view grid info;
-#X text 101 344 view result in console;
-#X text 274 305 Related objects:;
-#X obj 460 336 rubyprint;
-#X obj 530 329 printargs;
-#X obj 279 336 #dim;
-#X obj 314 336 #export;
-#X obj 369 336 #export_list;
-#X obj 600 329 print;
-#X text 15 376 GridFLow 0.8.0;
-#X text 73 6 Displays the dimensions of a grid in the console. If the
-grid has less than two dimensions it will display all grid data.;
-#X text 284 123 Symbol - Adds a symbol (text) as a prefix before the
-printed element in the console.;
-#X text 283 87 Integer - Adds a number as a prefix before the element
-printed in the console. See here;
-#X text 282 246 Grid - Receives and outputs the dimensions of a grid.
-;
-#X obj 15 319 #print paprika;
-#X connect 15 0 21 0;
-#X connect 16 0 21 1;
-#X connect 17 0 21 2;
-#X connect 18 0 20 0;
-#X connect 19 0 18 0;
-#X connect 20 0 22 0;
-#X connect 21 0 40 0;
-#X connect 22 0 40 0;
-#X connect 23 0 24 0;
-#X connect 24 0 40 0;
-#X connect 25 0 24 0;
diff --git a/externals/gridflow/doc/flow_classes/#print-help2.pd b/externals/gridflow/doc/flow_classes/#print-help2.pd
deleted file mode 100644
index d06eeebc..00000000
--- a/externals/gridflow/doc/flow_classes/#print-help2.pd
+++ /dev/null
@@ -1,113 +0,0 @@
-#N canvas 186 33 771 654 10;
-#X obj 268 45 cnv 15 460 15 empty empty empty 20 12 0 14 -158509 -66577
-0;
-#X obj 278 65 cnv 15 450 15 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 8 483 cnv 15 720 30 empty empty empty 20 12 0 14 -158509 -66577
-0;
-#X obj 8 513 cnv 15 720 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 8 5 cnv 15 720 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 12 525 KEYWORDS: control number float store;
-#X text 12 515 CATAGORY: control;
-#X text 281 65 Left:;
-#X obj 268 305 cnv 15 460 15 empty empty empty 20 12 0 14 -158509 -66577
-0;
-#X text 271 305 Arguments:;
-#X text 283 325 One - [float] accepts a single float as a creation
-argument which initializes the first value to be sent out the left
-outlet.;
-#X obj 268 375 cnv 15 460 15 empty empty empty 20 12 0 14 -158509 -66577
-0;
-#X text 271 375 Outlets:;
-#X text 283 395 One - outputs the stored floating point value of the
-object.;
-#X obj 8 45 cnv 15 250 15 empty empty empty 20 12 0 14 -158509 -66577
-0;
-#X text 11 45 Usage:;
-#X obj 8 65 cnv 15 250 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 8 103 cnv 15 250 350 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 150 73 f;
-#X text 126 73 OR;
-#X obj 452 489 pddp;
-#N canvas 58 22 261 146 Related_Objects 0;
-#X obj 3 87 cnv 15 250 15 empty empty empty 20 12 0 14 -158509 -66577
-0;
-#X obj 5 6 cnv 15 250 15 empty empty empty 20 12 0 14 -158509 -66577
-0;
-#X obj 3 107 cnv 15 250 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 69 113 randomF;
-#X obj 138 113 lister;
-#X text 7 6 Native PD Objects (internals);
-#X text 5 87 Externals and libraries;
-#X obj 4 27 cnv 15 250 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 70 34 int;
-#X obj 137 34 symbol;
-#X restore 15 490 pd Related_Objects;
-#N canvas 57 22 517 577 More_Info 0;
-#X text 43 24 All numbers in PD are kept in 32-bit floating point and
-can represent real numbers between -8 \, 388608 and 8.388.608.00;
-#X text 11 78 WHAT IS A FLOATING POINT NUMBER?;
-#X text 41 267 The following are examples of floating point numbers:
-;
-#X text 61 293 3;
-#X text 62 334 -111.5;
-#X text 61 313 0.5;
-#X text 40 387 3e-05 : This example is a computer shorthand for scientific
-notation. It means 3*10-5 (or 10 to the negative 5th power multiplied
-by 3).;
-#X text 41 108 According to Webopedia.com \, "computers are integer
-machines and are capable of representing real numbers only by using
-complex codes." Hence \, real numbers must be 'approximated' by computers
-using the "floating point standard". In such a number \, the decimal
-point can "float" meaning that there is no fixed number of digits preceding
-or following the decimal. A floating point number is therefore a computer's
-approximation of a real number.;
-#X text 43 453 Interesting side-note: In the early 1990's \, the Intel
-80486 was shipped with a math coprocessor to help accelerate the process
-of computing floating point numbers (which previously required a considerable
-amount of CPU power.) Math coprocessors have since found there way
-into nearly every graphics card and CPU available today.;
-#X text 62 358 10000 to 1e-16;
-#X restore 154 490 pd More_Info;
-#X text 496 490 - Dave Sabine \, November 18 \, 2002;
-#X text 10 459 doc/2.control.examples/sendnumber.pd - should be a bang/link
-;
-#X text 12 7 HELP: #print;
-#X text 12 17 DESCRIPTION: Displays values in the console.;
-#X obj 80 73 #print;
-#X text 271 45 Inlet:;
-#X text 301 111 Grid - receives a grid;
-#X floatatom 71 221 5 0 0 0 - - -;
-#X floatatom 93 242 5 0 0 0 - - -;
-#X floatatom 115 262 5 0 0 0 - - -;
-#X obj 133 349 until;
-#X msg 133 323 27;
-#X obj 133 373 random 27;
-#X obj 71 281 #pack 3;
-#X obj 133 398 #import ( 3 3 3 );
-#X obj 14 421 #print;
-#X msg 39 139 open r001.jpg;
-#X obj 39 167 #in;
-#X obj 16 139 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X text 65 420 <-- view result in console;
-#X text 12 106 view grid dimensions;
-#X text 71 190 view grid info;
-#X text 297 141 Integer - jhu;
-#X connect 30 0 36 0;
-#X connect 31 0 36 1;
-#X connect 32 0 36 2;
-#X connect 33 0 35 0;
-#X connect 34 0 33 0;
-#X connect 35 0 37 0;
-#X connect 36 0 38 0;
-#X connect 37 0 38 0;
-#X connect 39 0 40 0;
-#X connect 40 0 38 0;
-#X connect 41 0 40 0;
diff --git a/externals/gridflow/doc/flow_classes/#print-icon.png b/externals/gridflow/doc/flow_classes/#print-icon.png
deleted file mode 100644
index 94952881..00000000
--- a/externals/gridflow/doc/flow_classes/#print-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#ravel-icon.png b/externals/gridflow/doc/flow_classes/#ravel-icon.png
deleted file mode 100644
index 0e407c9a..00000000
--- a/externals/gridflow/doc/flow_classes/#ravel-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#redim-icon.png b/externals/gridflow/doc/flow_classes/#redim-icon.png
deleted file mode 100644
index f931a2c9..00000000
--- a/externals/gridflow/doc/flow_classes/#redim-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#remap_image-help.pd b/externals/gridflow/doc/flow_classes/#remap_image-help.pd
deleted file mode 100644
index 95dab924..00000000
--- a/externals/gridflow/doc/flow_classes/#remap_image-help.pd
+++ /dev/null
@@ -1,73 +0,0 @@
-#N canvas 95 151 750 524 10;
-#X obj 268 25 cnv 15 460 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X obj 278 68 cnv 15 450 15 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 8 442 cnv 15 720 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X obj 8 5 cnv 15 720 15 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 278 140 cnv 15 450 15 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 268 259 cnv 15 460 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 271 259 Outlets:;
-#X obj 8 25 cnv 15 250 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 11 25 Usage:;
-#X obj 8 45 cnv 15 250 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 8 81 cnv 15 250 355 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 271 25 Inlets: (Read left to right \, inlet "0" being the leftmost)
-;
-#X text 281 68 0: (Leftmost);
-#X text 281 140 1: (Rightmost);
-#X text 12 5 SUMMARY: Transforms a grid by displacing pixels.;
-#X obj 84 51 #remap_image;
-#X text 292 88 Grid - Receives a grid that is to be transformed by
-the object connected to the rightmost inlet.;
-#X text 291 159 Numop - Receives a numereic operator \, pixel positions
-are displaced according to the mathematic operation. Click here for
-more transformation options.;
-#X msg 48 143 open b001.jpg;
-#X obj 18 86 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 18 174 #in;
-#X obj 18 112 t b b;
-#X obj 18 411 #out window;
-#X obj 97 383 #print;
-#X obj 57 213 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X floatatom 101 285 5 0 0 0 - - -;
-#X obj 68 244 #for (0 0) (240 320) (1 1);
-#X obj 82 212 metro 100;
-#X obj 82 187 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
-;
-#X obj 97 317 # /;
-#X obj 18 352 #remap_image;
-#X text 16 449 GridFlow 0.8.0;
-#X text 281 295 comment;
-#X text 285 294 comment;
-#X obj 282 299 cnv 15 450 15 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 281 355 cnv 15 450 15 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 285 299 0: (Leftmost);
-#X text 284 355 1: (Rightmost);
-#X text 296 323 Grid - Outputs the transformend image.;
-#X text 288 375 Numop - Displays the displaced values.;
-#X text 145 284 <-- Modify the value to see transformations.;
-#X connect 18 0 20 0;
-#X connect 19 0 21 0;
-#X connect 20 0 30 0;
-#X connect 21 0 20 0;
-#X connect 21 1 18 0;
-#X connect 24 0 26 0;
-#X connect 25 0 29 1;
-#X connect 26 0 29 0;
-#X connect 27 0 26 0;
-#X connect 28 0 27 0;
-#X connect 29 0 30 1;
-#X connect 30 0 22 0;
-#X connect 30 1 23 0;
diff --git a/externals/gridflow/doc/flow_classes/#remap_image-icon.png b/externals/gridflow/doc/flow_classes/#remap_image-icon.png
deleted file mode 100644
index 6a22c134..00000000
--- a/externals/gridflow/doc/flow_classes/#remap_image-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#reverse-help.pd b/externals/gridflow/doc/flow_classes/#reverse-help.pd
deleted file mode 100644
index 441e9d40..00000000
--- a/externals/gridflow/doc/flow_classes/#reverse-help.pd
+++ /dev/null
@@ -1,46 +0,0 @@
-#N canvas 599 113 566 552 10;
-#X text 428 11 GridFlow 0.8.0;
-#X obj 258 207 #color;
-#X obj 288 391 #color;
-#X obj 259 476 display;
-#X text 15 27 [#reverse];
-#X obj 258 359 t a a;
-#X text 15 57 Swaps the values of incoming grids while preserving the
-number of Dimensions between incoming and outgoing grids.;
-#X obj 22 287 #in;
-#X obj 22 206 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X msg 52 256 open b001.jpg;
-#X obj 22 401 #out window;
-#X obj 87 289 hradio 15 1 0 6 empty empty empty 0 -6 0 8 -260818 -1
--1 5;
-#X obj 87 307 - 3;
-#X floatatom 87 327 5 0 0 0 - - -;
-#X text 16 107 0 vertical;
-#X text 16 122 1 horizontal;
-#X text 16 135 2 rgb <-> bgr;
-#X text 16 150 -1 \, -2 \, -3 \, swaps the specicied dimensions;
-#X text 16 92 An int argument changes the behavior in this way :;
-#X obj 22 228 t b b;
-#X obj 22 344 #reverse 0;
-#X obj 258 330 #reverse 0;
-#X obj 323 275 hradio 15 1 0 6 empty empty empty 0 -6 0 8 -260818 -1
--1 0;
-#X obj 323 293 - 3;
-#X floatatom 323 313 5 0 0 0 - - -;
-#X connect 1 0 21 0;
-#X connect 5 0 3 0;
-#X connect 5 1 2 0;
-#X connect 7 0 20 0;
-#X connect 8 0 19 0;
-#X connect 9 0 7 0;
-#X connect 11 0 12 0;
-#X connect 12 0 13 0;
-#X connect 13 0 20 1;
-#X connect 19 0 7 0;
-#X connect 19 1 9 0;
-#X connect 20 0 10 0;
-#X connect 21 0 5 0;
-#X connect 22 0 23 0;
-#X connect 23 0 24 0;
-#X connect 24 0 21 1;
diff --git a/externals/gridflow/doc/flow_classes/#rgb_to_greyscale-icon.png b/externals/gridflow/doc/flow_classes/#rgb_to_greyscale-icon.png
deleted file mode 100644
index f032691d..00000000
--- a/externals/gridflow/doc/flow_classes/#rgb_to_greyscale-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#rgb_to_yuv-help.pd b/externals/gridflow/doc/flow_classes/#rgb_to_yuv-help.pd
deleted file mode 100644
index 7ad7c3ec..00000000
--- a/externals/gridflow/doc/flow_classes/#rgb_to_yuv-help.pd
+++ /dev/null
@@ -1,11 +0,0 @@
-#N canvas 560 468 450 300 10;
-#X msg 112 64 open lena.jpg;
-#X obj 116 169 #out window;
-#X obj 88 19 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 52 84 #in;
-#X obj 60 132 #yuv_to_rgb;
-#X connect 0 0 3 0;
-#X connect 2 0 3 0;
-#X connect 3 0 4 0;
-#X connect 4 0 1 0;
diff --git a/externals/gridflow/doc/flow_classes/#rgb_to_yuv-icon.png b/externals/gridflow/doc/flow_classes/#rgb_to_yuv-icon.png
deleted file mode 100644
index 63a4119c..00000000
--- a/externals/gridflow/doc/flow_classes/#rgb_to_yuv-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#rgb_to_yuv_and_#yuv_to_rgb-help.pd b/externals/gridflow/doc/flow_classes/#rgb_to_yuv_and_#yuv_to_rgb-help.pd
deleted file mode 100644
index 8be0a8c3..00000000
--- a/externals/gridflow/doc/flow_classes/#rgb_to_yuv_and_#yuv_to_rgb-help.pd
+++ /dev/null
@@ -1,44 +0,0 @@
-#N canvas 98 384 737 338 10;
-#X obj 267 25 cnv 15 460 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X obj 279 77 cnv 15 450 15 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 8 306 cnv 15 720 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X obj 8 5 cnv 15 720 15 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 266 192 cnv 15 460 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 269 191 Outlets:;
-#X obj 8 25 cnv 15 250 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 11 25 Usage:;
-#X obj 8 45 cnv 15 250 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 8 81 cnv 15 250 220 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 270 25 Inlets: (Read left to right \, inlet "0" being the leftmost)
-;
-#X text 282 77 0: (Leftmost);
-#X text 12 5 SUMMARY:;
-#X obj 42 51 #rgb_to_yuv;
-#X obj 15 117 #for (0 0) (256 256) (1 1);
-#X obj 15 90 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 15 220 #clip;
-#X obj 15 143 #inner (2 3 # 0 1 0 0 0 1);
-#X obj 15 194 #yuv_to_rgb;
-#X obj 15 168 # + (200 0 0);
-#X obj 16 261 #peephole;
-#X text 289 99 Grid - Receives a grid in RGB or YUV format.;
-#X text 16 313 GridFlow 0.8.0;
-#X obj 135 51 #yuv_to_rgb;
-#X text 72 5 converts RGB colourspace to YUV colourspace or YUV to
-RGB.;
-#X text 291 224 One - outputs the converted grid.;
-#X connect 14 0 17 0;
-#X connect 15 0 14 0;
-#X connect 16 0 20 0;
-#X connect 17 0 19 0;
-#X connect 18 0 16 0;
-#X connect 19 0 18 0;
diff --git a/externals/gridflow/doc/flow_classes/#rotate-icon.png b/externals/gridflow/doc/flow_classes/#rotate-icon.png
deleted file mode 100644
index 5f7d0694..00000000
--- a/externals/gridflow/doc/flow_classes/#rotate-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#scale_by-icon.png b/externals/gridflow/doc/flow_classes/#scale_by-icon.png
deleted file mode 100644
index cf1c678b..00000000
--- a/externals/gridflow/doc/flow_classes/#scale_by-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#scale_to-icon.png b/externals/gridflow/doc/flow_classes/#scale_to-icon.png
deleted file mode 100644
index 06b45948..00000000
--- a/externals/gridflow/doc/flow_classes/#scale_to-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#scan-icon.png b/externals/gridflow/doc/flow_classes/#scan-icon.png
deleted file mode 100644
index fad5d0ba..00000000
--- a/externals/gridflow/doc/flow_classes/#scan-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#solarize-icon.png b/externals/gridflow/doc/flow_classes/#solarize-icon.png
deleted file mode 100644
index b5f95027..00000000
--- a/externals/gridflow/doc/flow_classes/#solarize-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#spread-icon.png b/externals/gridflow/doc/flow_classes/#spread-icon.png
deleted file mode 100644
index 7d8e7eee..00000000
--- a/externals/gridflow/doc/flow_classes/#spread-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#store-icon.png b/externals/gridflow/doc/flow_classes/#store-icon.png
deleted file mode 100644
index 73ffa715..00000000
--- a/externals/gridflow/doc/flow_classes/#store-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#transpose-icon.png b/externals/gridflow/doc/flow_classes/#transpose-icon.png
deleted file mode 100644
index eb911696..00000000
--- a/externals/gridflow/doc/flow_classes/#transpose-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#type-icon.png b/externals/gridflow/doc/flow_classes/#type-icon.png
deleted file mode 100644
index 6ff34e7c..00000000
--- a/externals/gridflow/doc/flow_classes/#type-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/#unpack-#pack-help.pd b/externals/gridflow/doc/flow_classes/#unpack-#pack-help.pd
deleted file mode 100644
index cc78d8fb..00000000
--- a/externals/gridflow/doc/flow_classes/#unpack-#pack-help.pd
+++ /dev/null
@@ -1,45 +0,0 @@
-#N canvas 245 108 834 542 10;
-#X text 485 23 GridFlow 0.8.0;
-#X obj 523 257 #unpack 3;
-#X floatatom 513 305 5 0 0 0 - - -;
-#X obj 416 190 t a a;
-#X obj 333 301 display;
-#X floatatom 552 305 5 0 0 0 - - -;
-#X floatatom 591 305 5 0 0 0 - - -;
-#X text -48 51 [#unpack];
-#X obj 530 352 #pack 3;
-#X text -49 122 It takes an integer as an argument to specify the number
-of Dimensions the incoming grid has.;
-#X obj 416 76 #color;
-#X obj 516 411 #color;
-#X text -48 84 Accepts grids in its inlet and produces integers via
-its outlet.;
-#X text -39 349 [#pack];
-#X text -39 382 Accepts integers in its inlets and produces a corresponding
-grid via its outlet.;
-#X text -40 421 It takes an integer as an argument to specify the number
-of incoming integers and the corresponding number of Dimensions the
-outgoing grid will have.;
-#X obj 483 332 - 127;
-#X obj -31 190 trigger bang bang;
-#X obj 166 178 metro 100;
-#X obj 89 345 display;
-#X obj 174 272 print blah;
-#X obj 145 316 print blah2;
-#X obj 122 155 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X connect 1 0 2 0;
-#X connect 1 1 5 0;
-#X connect 1 2 6 0;
-#X connect 2 0 16 0;
-#X connect 3 0 4 0;
-#X connect 3 1 1 0;
-#X connect 5 0 8 1;
-#X connect 6 0 8 2;
-#X connect 8 0 11 0;
-#X connect 10 0 3 0;
-#X connect 16 0 8 0;
-#X connect 18 0 19 0;
-#X connect 18 0 20 0;
-#X connect 18 0 21 0;
-#X connect 22 0 18 0;
diff --git a/externals/gridflow/doc/flow_classes/#yuv_to_rgb-icon.png b/externals/gridflow/doc/flow_classes/#yuv_to_rgb-icon.png
deleted file mode 100644
index f5f10c8e..00000000
--- a/externals/gridflow/doc/flow_classes/#yuv_to_rgb-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/@complex_sq-icon.png b/externals/gridflow/doc/flow_classes/@complex_sq-icon.png
deleted file mode 100644
index 7c9dd8d5..00000000
--- a/externals/gridflow/doc/flow_classes/@complex_sq-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/@global-icon.png b/externals/gridflow/doc/flow_classes/@global-icon.png
deleted file mode 100644
index 5884d603..00000000
--- a/externals/gridflow/doc/flow_classes/@global-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/@join-icon.png b/externals/gridflow/doc/flow_classes/@join-icon.png
deleted file mode 100644
index 461f626e..00000000
--- a/externals/gridflow/doc/flow_classes/@join-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/bindpatcher-icon.png b/externals/gridflow/doc/flow_classes/bindpatcher-icon.png
deleted file mode 100644
index aed22ac1..00000000
--- a/externals/gridflow/doc/flow_classes/bindpatcher-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/demux-icon.png b/externals/gridflow/doc/flow_classes/demux-icon.png
deleted file mode 100644
index d3937142..00000000
--- a/externals/gridflow/doc/flow_classes/demux-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/exec-help.pd b/externals/gridflow/doc/flow_classes/exec-help.pd
deleted file mode 100644
index 816e29c2..00000000
--- a/externals/gridflow/doc/flow_classes/exec-help.pd
+++ /dev/null
@@ -1,13 +0,0 @@
-#N canvas 0 0 450 267 10;
-#X text 259 22 GridFlow 0.8.0;
-#X text 50 221 see also:;
-#X obj 126 221 renamefile;
-#X obj 241 221 unix_time;
-#X obj 61 130 exec;
-#X msg 35 78 shell xlogo &;
-#X msg 144 78 shell ftp ac@artengine.ca &;
-#X obj 209 221 ls;
-#X text 141 121 Executes a program or script. It is not return a result
-\, see the PureData shell after using the ftp command.;
-#X connect 5 0 4 0;
-#X connect 6 0 4 0;
diff --git a/externals/gridflow/doc/flow_classes/exec-icon.png b/externals/gridflow/doc/flow_classes/exec-icon.png
deleted file mode 100644
index 67cf913f..00000000
--- a/externals/gridflow/doc/flow_classes/exec-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/foreach-icon.png b/externals/gridflow/doc/flow_classes/foreach-icon.png
deleted file mode 100644
index ccc9e766..00000000
--- a/externals/gridflow/doc/flow_classes/foreach-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/fork-icon.png b/externals/gridflow/doc/flow_classes/fork-icon.png
deleted file mode 100644
index 4b4e8e00..00000000
--- a/externals/gridflow/doc/flow_classes/fork-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/fps-icon.png b/externals/gridflow/doc/flow_classes/fps-icon.png
deleted file mode 100644
index e7e753f2..00000000
--- a/externals/gridflow/doc/flow_classes/fps-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/inv+-icon.png b/externals/gridflow/doc/flow_classes/inv+-icon.png
deleted file mode 100644
index 37049db6..00000000
--- a/externals/gridflow/doc/flow_classes/inv+-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/inv_mul-icon.png b/externals/gridflow/doc/flow_classes/inv_mul-icon.png
deleted file mode 100644
index 184203c2..00000000
--- a/externals/gridflow/doc/flow_classes/inv_mul-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/listappend-icon.png b/externals/gridflow/doc/flow_classes/listappend-icon.png
deleted file mode 100644
index abf3316f..00000000
--- a/externals/gridflow/doc/flow_classes/listappend-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/listelement-help.pd b/externals/gridflow/doc/flow_classes/listelement-help.pd
deleted file mode 100644
index 3b86fcf3..00000000
--- a/externals/gridflow/doc/flow_classes/listelement-help.pd
+++ /dev/null
@@ -1,61 +0,0 @@
-#N canvas 103 143 732 416 10;
-#X obj 268 79 cnv 15 460 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X obj 279 108 cnv 15 450 15 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 8 381 cnv 15 720 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X obj 8 5 cnv 15 720 15 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 279 265 cnv 15 450 15 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 268 25 cnv 15 460 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 271 25 Arguments:;
-#X obj 268 327 cnv 15 460 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 271 327 Outlets:;
-#X obj 8 25 cnv 15 250 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 11 25 Usage:;
-#X obj 8 46 cnv 15 250 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 8 83 cnv 15 250 289 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 271 79 Inlets: (Read left to right \, inlet "0" being the leftmost)
-;
-#X text 282 108 0: (Leftmost);
-#X text 282 265 1: (Rightmost);
-#X text 12 5 SUMMERY:;
-#X text 73 5 Outputs one element of a list as selected by an integer.
-;
-#X floatatom 23 320 5 0 0 0 - - -;
-#X obj 23 251 listelement 0;
-#X floatatom 109 216 5 0 0 0 - - -;
-#X obj 100 320 display;
-#X obj 159 320 print;
-#X msg 61 166 1 3 hello 8 13;
-#X obj 23 134 pack 0 0;
-#X floatatom 74 103 5 0 0 0 - - -;
-#X floatatom 23 103 5 0 0 0 - - -;
-#X obj 87 52 listelement;
-#X text 286 299 Integer - index (selects the position of an element).
-;
-#X text 16 387 GridFlow 0.8.0;
-#X text 282 50 One - see inlet 0: (rightmost);
-#X text 280 139 List - An element in a list is chosen by the index
-(an integer that selects the position of an element). This element
-is sent to the outlet and can be viewed in the console using the print
-object or in a number box if displaying an integer. For example: integer
-"0" selects and outputs the first element in a list \, integer "1"
-selects and outputs the second element in a list \, integers "-1" selects
-and outputs the last element in a list.;
-#X text 287 356 One - see inlet 0: (leftmost);
-#X connect 19 0 18 0;
-#X connect 19 0 21 0;
-#X connect 19 0 22 0;
-#X connect 20 0 19 1;
-#X connect 23 0 19 0;
-#X connect 24 0 19 0;
-#X connect 25 0 24 1;
-#X connect 26 0 24 0;
diff --git a/externals/gridflow/doc/flow_classes/listelement-icon.png b/externals/gridflow/doc/flow_classes/listelement-icon.png
deleted file mode 100644
index 00a3a1c5..00000000
--- a/externals/gridflow/doc/flow_classes/listelement-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/listflatten-icon.png b/externals/gridflow/doc/flow_classes/listflatten-icon.png
deleted file mode 100644
index e6e9679e..00000000
--- a/externals/gridflow/doc/flow_classes/listflatten-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/listlength-icon.png b/externals/gridflow/doc/flow_classes/listlength-icon.png
deleted file mode 100644
index dbde632a..00000000
--- a/externals/gridflow/doc/flow_classes/listlength-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/listmake-icon.png b/externals/gridflow/doc/flow_classes/listmake-icon.png
deleted file mode 100644
index 3e7c5f62..00000000
--- a/externals/gridflow/doc/flow_classes/listmake-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/listprepend-icon.png b/externals/gridflow/doc/flow_classes/listprepend-icon.png
deleted file mode 100644
index a42afce0..00000000
--- a/externals/gridflow/doc/flow_classes/listprepend-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/listreverse-icon.png b/externals/gridflow/doc/flow_classes/listreverse-icon.png
deleted file mode 100644
index ec4d2a04..00000000
--- a/externals/gridflow/doc/flow_classes/listreverse-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/listsublist-icon.png b/externals/gridflow/doc/flow_classes/listsublist-icon.png
deleted file mode 100644
index 4f9c1535..00000000
--- a/externals/gridflow/doc/flow_classes/listsublist-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/ls-help.pd b/externals/gridflow/doc/flow_classes/ls-help.pd
deleted file mode 100644
index 5bc04c39..00000000
--- a/externals/gridflow/doc/flow_classes/ls-help.pd
+++ /dev/null
@@ -1,21 +0,0 @@
-#N canvas 293 272 624 295 10;
-#X text 259 22 GridFlow 0.8.0;
-#X text 30 266 see also:;
-#X obj 106 267 renamefile;
-#X obj 189 267 unix_time;
-#X obj 67 130 ls;
-#X obj 67 48 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 25 186 listlength;
-#X floatatom 25 220 5 0 0 0 - - -;
-#X obj 107 187 display;
-#X obj 265 267 exec;
-#X msg 67 81 symbol /home;
-#X text 157 118 Similar to the Unix command 'ls'. Returns the filenames
-in a directory. May be used with [listlength] to determine the number
-of files in a directory.;
-#X connect 4 0 6 0;
-#X connect 4 0 8 0;
-#X connect 5 0 10 0;
-#X connect 6 0 7 0;
-#X connect 10 0 4 0;
diff --git a/externals/gridflow/doc/flow_classes/ls-icon.png b/externals/gridflow/doc/flow_classes/ls-icon.png
deleted file mode 100644
index 162e080f..00000000
--- a/externals/gridflow/doc/flow_classes/ls-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/messageappend-icon.png b/externals/gridflow/doc/flow_classes/messageappend-icon.png
deleted file mode 100644
index c8aecc6a..00000000
--- a/externals/gridflow/doc/flow_classes/messageappend-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/messageprepend-icon.png b/externals/gridflow/doc/flow_classes/messageprepend-icon.png
deleted file mode 100644
index a398ff09..00000000
--- a/externals/gridflow/doc/flow_classes/messageprepend-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/oneshot-icon.png b/externals/gridflow/doc/flow_classes/oneshot-icon.png
deleted file mode 100644
index be0b9829..00000000
--- a/externals/gridflow/doc/flow_classes/oneshot-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/pd_netreceive-icon.png b/externals/gridflow/doc/flow_classes/pd_netreceive-icon.png
deleted file mode 100644
index 2a008238..00000000
--- a/externals/gridflow/doc/flow_classes/pd_netreceive-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/pd_netsend-icon.png b/externals/gridflow/doc/flow_classes/pd_netsend-icon.png
deleted file mode 100644
index 1ba290b4..00000000
--- a/externals/gridflow/doc/flow_classes/pd_netsend-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/pingpong-icon.png b/externals/gridflow/doc/flow_classes/pingpong-icon.png
deleted file mode 100644
index f84c9c2f..00000000
--- a/externals/gridflow/doc/flow_classes/pingpong-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/plotter_control-help.pd b/externals/gridflow/doc/flow_classes/plotter_control-help.pd
deleted file mode 100644
index 1381d341..00000000
--- a/externals/gridflow/doc/flow_classes/plotter_control-help.pd
+++ /dev/null
@@ -1,64 +0,0 @@
-#N canvas 423 134 724 349 10;
-#X text 557 11 GridFlow 0.8.0;
-#X obj 92 99 r foo;
-#X msg 557 173 print_from_ascii $*;
-#X msg 557 52 print hello_world;
-#X msg 284 54 pu;
-#X msg 284 102 pd;
-#X msg 285 205 sp 0;
-#X msg 284 154 pa 120 160;
-#X obj 557 124 unix_time;
-#X obj 557 148 @export_list;
-#X obj 557 104 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 74 255 comport 0 9600;
-#X obj 76 129 plotter_control;
-#X obj 93 158 print hpgl_commands;
-#X obj 557 196 s foo;
-#X text 324 54 pen up;
-#X text 324 102 pen down;
-#X obj 557 74 s foo;
-#X text 368 154 move to absolute position;
-#N canvas 0 0 450 300 draw_a_rectangle 0;
-#X obj 120 196 @export_list;
-#X obj 128 159 @ * ( 110 320 );
-#X msg 31 156 pu \, sp 0;
-#X obj 28 97 fork;
-#X msg 114 222 pd \, pa \$2 \$1;
-#X msg 129 100 sp 5 \, pu \, pa 0 0 \, other si 320 320;
-#X obj 115 252 s foo;
-#X obj 33 71 fork;
-#X obj 30 126 fork;
-#X msg 128 134 0 0 \, 0 1 \, 1 1 \, 1 0 \, 0 0;
-#X obj 31 35 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X connect 0 0 4 0;
-#X connect 1 0 0 0;
-#X connect 2 0 6 0;
-#X connect 3 0 8 0;
-#X connect 3 1 9 0;
-#X connect 4 0 6 0;
-#X connect 7 0 3 0;
-#X connect 7 1 5 0;
-#X connect 8 0 2 0;
-#X connect 9 0 1 0;
-#X connect 10 0 7 0;
-#X restore 557 228 pd draw_a_rectangle;
-#X text 76 9 plotter_control;
-#X text 74 280 use the comport object to interface to the plotter;
-#X obj 285 227 s foo;
-#X obj 284 176 s foo;
-#X obj 284 124 s foo;
-#X obj 284 76 s foo;
-#X text 328 207 (0...6) remove/change the pen;
-#X connect 1 0 12 0;
-#X connect 2 0 14 0;
-#X connect 3 0 17 0;
-#X connect 4 0 25 0;
-#X connect 5 0 24 0;
-#X connect 6 0 22 0;
-#X connect 7 0 23 0;
-#X connect 8 0 9 0;
-#X connect 9 0 2 0;
-#X connect 10 0 8 0;
-#X connect 12 0 13 0;
diff --git a/externals/gridflow/doc/flow_classes/plotter_control-icon.png b/externals/gridflow/doc/flow_classes/plotter_control-icon.png
deleted file mode 100644
index 3e33d7dd..00000000
--- a/externals/gridflow/doc/flow_classes/plotter_control-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/printargs-icon.png b/externals/gridflow/doc/flow_classes/printargs-icon.png
deleted file mode 100644
index d8ed7ee2..00000000
--- a/externals/gridflow/doc/flow_classes/printargs-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/range-icon.png b/externals/gridflow/doc/flow_classes/range-icon.png
deleted file mode 100644
index 45de1556..00000000
--- a/externals/gridflow/doc/flow_classes/range-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/renamefile-help.pd b/externals/gridflow/doc/flow_classes/renamefile-help.pd
deleted file mode 100644
index 70d9937c..00000000
--- a/externals/gridflow/doc/flow_classes/renamefile-help.pd
+++ /dev/null
@@ -1,9 +0,0 @@
-#N canvas 383 288 441 244 10;
-#X obj 50 120 renamefile;
-#X msg 50 76 list current_name new_name;
-#X obj 128 206 ls;
-#X text 42 208 also see :;
-#X text 313 21 GridFlow 0.8.0;
-#X text 45 157 * The path should correspond to the location of the
-file from where pd is started;
-#X connect 1 0 0 0;
diff --git a/externals/gridflow/doc/flow_classes/renamefile-icon.png b/externals/gridflow/doc/flow_classes/renamefile-icon.png
deleted file mode 100644
index 58201e14..00000000
--- a/externals/gridflow/doc/flow_classes/renamefile-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/rubyarray.png b/externals/gridflow/doc/flow_classes/rubyarray.png
deleted file mode 100644
index 2d3ad9e5..00000000
--- a/externals/gridflow/doc/flow_classes/rubyarray.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/rubyprint-icon.png b/externals/gridflow/doc/flow_classes/rubyprint-icon.png
deleted file mode 100644
index 0ce6df14..00000000
--- a/externals/gridflow/doc/flow_classes/rubyprint-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/rubysprintf-icon.png b/externals/gridflow/doc/flow_classes/rubysprintf-icon.png
deleted file mode 100644
index c7a5a249..00000000
--- a/externals/gridflow/doc/flow_classes/rubysprintf-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/shunt-icon.png b/externals/gridflow/doc/flow_classes/shunt-icon.png
deleted file mode 100644
index ebf40bac..00000000
--- a/externals/gridflow/doc/flow_classes/shunt-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/flow_classes/unix_time-help.pd b/externals/gridflow/doc/flow_classes/unix_time-help.pd
deleted file mode 100644
index d80b4c19..00000000
--- a/externals/gridflow/doc/flow_classes/unix_time-help.pd
+++ /dev/null
@@ -1,29 +0,0 @@
-#N canvas 134 38 639 312 10;
-#X obj 91 113 unix_time;
-#X obj 91 82 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 8 172 #export_list;
-#X obj 91 40 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
-;
-#X obj 9 246 display;
-#X obj 91 58 metro 500;
-#X text 60 243 <-- Ascii format for the date;
-#X obj 308 221 display;
-#X obj 123 171 display;
-#X obj 307 195 display;
-#X obj 306 170 rubysprintf %04d%02d%02d-%02d%02d%02d;
-#X obj 8 282 cnv 15 720 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 16 289 GridFlow 0.8.0;
-#X obj 8 5 cnv 15 720 15 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 9 5 SUMMARY : the unixtime command;
-#X connect 0 0 2 0;
-#X connect 0 1 8 0;
-#X connect 0 2 7 0;
-#X connect 0 2 10 0;
-#X connect 1 0 0 0;
-#X connect 2 0 4 0;
-#X connect 3 0 5 0;
-#X connect 5 0 1 0;
-#X connect 10 0 9 0;
diff --git a/externals/gridflow/doc/flow_classes/unix_time-icon.png b/externals/gridflow/doc/flow_classes/unix_time-icon.png
deleted file mode 100644
index 1d85db8d..00000000
--- a/externals/gridflow/doc/flow_classes/unix_time-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/format.html b/externals/gridflow/doc/format.html
deleted file mode 100644
index 243e508e..00000000
--- a/externals/gridflow/doc/format.html
+++ /dev/null
@@ -1,485 +0,0 @@
-<html><head>
-<!-- $Id: format.html,v 1.2 2006-03-15 04:44:50 matju Exp $ -->
-<title>GridFlow 0.8.1 - Reference Manual: Format Classes</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<link rel="stylesheet" href="gridflow.css" type="text/css">
-</head>
-<body bgcolor="#FFFFFF"
- leftmargin="0" topmargin="0"
- marginwidth="0" marginheight="0">
-<table width="100%" bgcolor="white" border="0" cellspacing="2">
-<tr><td colspan="4" bgcolor="#082069">
-<img src="images/titre_gridflow.png" width="253" height="23">
-</td></tr><tr><td>&nbsp;</td></tr>
-<tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4" height="16">
- <h4>GridFlow 0.8.1 - Reference Manual: Format Classes</h4>
-</td></tr>
-<tr>
- <td width="5%" rowspan="2">&nbsp;</td>
- <td width="15%" height="23">&nbsp;</td>
- <td width="80%" height="23">&nbsp;</td>
- <td width="5%" height="23">&nbsp;</td>
-</tr>
-<tr><td colspan="2"><div cols="1"><h4><a href="#Objects_for_Input/Output">Objects for Input/Output</a></h4><ul>
-<li><a href="##in"><img src="flow_classes/%23in-icon.png" alt="[#in]" border="0"></a></li>
-<li><a href="##out"><img src="flow_classes/%23out-icon.png" alt="[#out]" border="0"></a></li>
-<li><a href="##peephole"><img src="flow_classes/%23peephole-icon.png" alt="[#peephole]" border="0"></a></li>
-<li><a href="##mouse"><img src="flow_classes/%23mouse-icon.png" alt="[#mouse]" border="0"></a></li>
-<li><a href="##camera"><img src="flow_classes/%23camera-icon.png" alt="[#camera]" border="0"></a></li>
-</ul>
-<h4><a href="#Picture/Movie_Formats">Picture/Movie Formats</a></h4><ul>
-<li><a href="#format ppm #in/#out"><img src="flow_classes/format ppm %23in/%23out-icon.png" alt="[format ppm #in/#out]" border="0"></a></li>
-<li><a href="#format targa #in/#out"><img src="flow_classes/format targa %23in/%23out-icon.png" alt="[format targa #in/#out]" border="0"></a></li>
-<li><a href="#format jpeg #in/#out"><img src="flow_classes/format jpeg %23in/%23out-icon.png" alt="[format jpeg #in/#out]" border="0"></a></li>
-<li><a href="#format png #in"><img src="flow_classes/format png %23in-icon.png" alt="[format png #in]" border="0"></a></li>
-<li><a href="#format quicktime #in/#out"><img src="flow_classes/format quicktime %23in/%23out-icon.png" alt="[format quicktime #in/#out]" border="0"></a></li>
-<li><a href="#format mpeg #in"><img src="flow_classes/format mpeg %23in-icon.png" alt="[format mpeg #in]" border="0"></a></li>
-<li><a href="#format grid #in/#out"><img src="flow_classes/format grid %23in/%23out-icon.png" alt="[format grid #in/#out]" border="0"></a></li>
-</ul>
-<h4><a href="#Acquisition_Devices">Acquisition Devices</a></h4><ul>
-<li><a href="#format videodev #in"><img src="flow_classes/format videodev %23in-icon.png" alt="[format videodev #in]" border="0"></a></li>
-</ul>
-<h4><a href="#Window_Output">Window Output</a></h4><ul>
-<li><a href="#format x11 #in/#out"><img src="flow_classes/format x11 %23in/%23out-icon.png" alt="[format x11 #in/#out]" border="0"></a></li>
-<li><a href="#format quartz #out"><img src="flow_classes/format quartz %23out-icon.png" alt="[format quartz #out]" border="0"></a></li>
-<li><a href="#format sdl #out"><img src="flow_classes/format sdl %23out-icon.png" alt="[format sdl #out]" border="0"></a></li>
-<li><a href="#format aalib #out"><img src="flow_classes/format aalib %23out-icon.png" alt="[format aalib #out]" border="0"></a></li>
-<li><a href="#format window #out"><img src="flow_classes/format window %23out-icon.png" alt="[format window #out]" border="0"></a></li>
-</ul>
-<br><br>
-</div></td></tr> <tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="Objects_for_Input/Output"></a><h4>Objects for Input/Output</h4></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#in">#in</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23in-icon.png" alt="[#in]" border="0"><br clear="left"><br><br><a href="#inout"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;init <b>(</b>format<b>, </b>format_specific_part...<b>)</b>
- If no arguments given, creates an input object for an unspecified
- format. You then need to use the <kbd><font color="#007777">"open"</font></kbd> command to link
- a format handler to it.
- If arguments given, the <kbd><font color="#007777">"open"</font></kbd> command is immediately called
- with those arguments.
- Remember that most formats produce Dim[rows,columns,3] grids with
- 0-255 values. (Most.) <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;open <b>(</b>format<b>, </b>format_specific_part...<b>)</b>
- This is the command that gives a particular resource
- to a <kbd><font color="#007777">[#out]</font></kbd> object. This is done through a "format"
- (there is a list of formats in this manual). The other
- arguments depend on the chosen format. The format may
- be a file format or a protocol or a hardware device, etc.
- The format called "file" is a special shortcut that autodetects the
- type of file (by name suffix) and picks up the appropriate handler. <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;open <b>(</b>filename<b>)</b>
- This is a shortcut for <kbd><font color="#007777">"open file"</font></kbd> followed by a filename.
- The filename must contain a dot, else it will be seen as a handler name. <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;close <b>(</b><b>)</b>
- close may be necessary if you operate on <kbd><font color="#007777">"/dev/video"</font></kbd>,
- which can only be read by one at a time. otherwise it's
- usually not necessary. <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;int <b>(</b>frame_number<b>)</b>
- selects one picture from a multi-picture format
- and then does the same as a bang. <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;set <b>(</b>frame_number<b>)</b>
- selects one picture from a multi-picture format,
- to be displayed by the next bang. <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;bang <b>(</b><b>)</b>
- sends a grid through the outlet. the grid may be the
- result of reading from a file, acquiring from a device,
- capturing from the screen etc.
- this is format-specific. most formats
- produce grid(rows columns {red green blue}).
- In formats that read from a file, reading another picture
- will continue if there are several pictures in the
- same file, but if the end of file is reached instead,
- it will rewind and send the first picture again.
- see section "External Picture Formats". <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;option <b>(</b><i>symbol</i> selector<b>, </b>stuff...<b>)</b>
- Obsolete. the word "option" is optional now. <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;rewind <b>(</b><b>)</b>
- rewinds to beginning of file if applicable. <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;loop <b>(</b><i>bool</i> flag<b>)</b>
- controls the automatic looping of movies. <br>
- <br><b>outlet&nbsp;1 </b><b>method</b>&nbsp;int <b>(</b><b>)</b>
- frame number of frame just sent,
- for formats that have frame numbers. <br>
- <br><b>outlet&nbsp;1 </b><b>method</b>&nbsp;bang <b>(</b><b>)</b>
- tried to read a frame that does not exist
- (signals end of file) <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#out">#out</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23out-icon.png" alt="[#out]" border="0"><br clear="left"><br><br><a href="#inout"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;init <b>(</b>format<b>, </b>format_specific_part...<b>)</b>
- If no arguments given, creates an output object for an unspecified
- format. You then need to use the <kbd><font color="#007777">"open"</font></kbd> command to link
- a format handler to it.
- If arguments given, the <kbd><font color="#007777">"open"</font></kbd> command is immediately called
- with those arguments.
- Remember that most formats expect dim(rows,columns,3) grids with
- 0-255 values. (Most.) <br>
- <br><b>method</b>&nbsp;init <b>(</b><i>integer</i> rows<b>, </b><i>integer</i> columns<b>)</b>
- This alternate way to create an <kbd><font color="#007777">[#out]</font></kbd> automatically calls <kbd><font color="#007777">"open window"</font></kbd> and <kbd><font color="#007777">"out_size <i>rows columns</i>"</font></kbd>. <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;open <b>(</b>format<b>, </b>format_specific_part...<b>)</b>
- This is the command that gives a particular resource
- to a <kbd><font color="#007777">[#out]</font></kbd> object. This is done through a "format"
- (there is a list of formats in this manual). The other
- arguments depend on the chosen format. The format may
- be a file format or a protocol or a hardware device, etc. <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;open file <b>(</b><b>)</b>
- The format called "file" is a special shortcut that autodetects the
- type of file (by name suffix) and picks up the appropriate handler. <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;open <b>(</b>filename<b>)</b>
- This is a shortcut for "open file" followed by a filename.
- The filename must contain a dot, else it will be seen as a handler name. <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid</i> grid<b>)</b>
- this is format-specific. most formats
- expect grid(rows columns {red green blue}).
- In formats that write to a file, sending a 2nd picture
- overwrites the first.
- see section "External Picture Formats". <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;close <b>(</b><b>)</b>
- closes the file. usually not necessary. <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;option <b>(</b><i>symbol</i> selector<b>, </b>stuff...<b>)</b>
- Obsolete. Omit the word "option" now. <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;timelog <b>(</b><i>0,1</i> status<b>)</b>
- when status=1, current time (unix clock) and time since last
- frame-end are printed in the console. when status=0, it is off.
- default is 0. <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;rewind <b>(</b><b>)</b>
- rewinds to beginning of file if applicable.
- will overwrite the previous data. <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;bang <b>(</b><b>)</b>
- sent when a complete grid has been received. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#peephole">#peephole</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23peephole-icon.png" alt="[#peephole]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>
- This object class only works with a X11-based version of Pd.
- (e.g. on Linux, BSD, but not MacOS X). </p> <p>Similar to <kbd><font color="#007777">[#out window]</font></kbd>, except it creates an inset in the patch you put it
- in, and a scaled version of the picture appears in the inset. It also emits the same messages
- as <kbd><font color="#007777">[#out window]</font></kbd> and automatically scales cursor position according to the current scale factor.
- The scale factor is decided automatically. </p> <br><b>method</b>&nbsp;init <b>(</b><i>int</i> height<b>, </b><i>int</i> width<b>)</b> <br>
- <p>All other methods are as in <kbd><font color="#007777">[#out window]</font></kbd>.</p> <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#mouse">#mouse</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23mouse-icon.png" alt="[#mouse]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
-
- This will process the "position" messages emitted by <kbd><font color="#007777">[#out]</font></kbd> or <kbd><font color="#007777">[#peephole]</font></kbd> in
- useful ways. <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;list <b>(</b><b>)</b>
- y,x coords of a click <br>
- <br><b>outlet&nbsp;1 </b><b>method</b>&nbsp;list <b>(</b><b>)</b>
- y,x coords of a drag (any button is kept pressed) <br>
- <br><b>outlet&nbsp;2 </b><b>method</b>&nbsp;list <b>(</b><b>)</b>
- y,x coords of an unclick <br>
- <br><b>outlet&nbsp;3 </b><b>method</b>&nbsp;list <b>(</b><b>)</b>
- y,x coords of a move (no button is pressed) <br>
- <br><b>outlet&nbsp;4 </b><b>method</b>&nbsp;float <b>(</b><b>)</b> button 1 status<br>
- <br><b>outlet&nbsp;5 </b><b>method</b>&nbsp;float <b>(</b><b>)</b> button 2 status<br>
- <br><b>outlet&nbsp;6 </b><b>method</b>&nbsp;float <b>(</b><b>)</b> button 3 status<br>
- <br><b>outlet&nbsp;7 </b><b>method</b>&nbsp;float <b>(</b><b>)</b>
- wheel difference: -1 = roll up; 1 = roll down. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#camera">#camera</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23camera-icon.png" alt="[#camera]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
-
- Works about like <kbd><font color="#007777">[#in videodev]</font></kbd> except you can right-click-open it to access all of the
- camera settings visually. <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="Picture/Movie_Formats"></a><h4>Picture/Movie Formats</h4></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="format ppm #in/#out">format ppm #in/#out</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/format ppm %23in/%23out-icon.png" alt="[format ppm #in/#out]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>Subformat P6 only.
- Max-number can only be 255 (24-bit RGB). </p> <br><b>method</b>&nbsp;open ppm file <b>(</b><i>symbol</i> filename<b>)</b>
- opens the specified file, taken from the current
- directory. <br>
- <br><b>method</b>&nbsp;open ppm gzfile <b>(</b><i>symbol</i> filename<b>)</b>
- same but for .ppm.gz files <br>
- <br><b>method</b>&nbsp;grid <b>(</b><i>grid(rows columns {r g b})</i> grid<b>)</b>
- values 0-255 <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="format targa #in/#out">format targa #in/#out</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/format targa %23in/%23out-icon.png" alt="[format targa #in/#out]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>Support for RGB-24 (3 channels) and RGBA-32 (4 channels)</p> <br><b>method</b>&nbsp;open targa file <b>(</b><i>symbol</i> filename<b>)</b>
- opens the specified file, taken from the current
- directory. <br>
- <br><b>method</b>&nbsp;open targa gzfile <b>(</b><i>symbol</i> filename<b>)</b>
- same but for .tga.gz files <br>
- <br><b>method</b>&nbsp;grid <b>(</b><i>grid(rows columns 3)</i> grid<b>)</b> RGB-24<br>
- <br><b>method</b>&nbsp;grid <b>(</b><i>grid(rows columns 4)</i> grid<b>)</b> RGBA-32<br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="format jpeg #in/#out">format jpeg #in/#out</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/format jpeg %23in/%23out-icon.png" alt="[format jpeg #in/#out]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>Support for RGB non-progressive</p> <br><b>method</b>&nbsp;open jpeg file <b>(</b><i>symbol</i> filename<b>)</b>
- opens the specified file, taken from the current
- directory. <br>
- <br><b>method</b>&nbsp;grid <b>(</b><i>grid(rows columns 3)</i> grid<b>)</b> RGB-24 <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="format png #in">format png #in</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/format png %23in-icon.png" alt="[format png #in]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>Support for RGB non-progressive</p> <br><b>method</b>&nbsp;open png file <b>(</b><i>symbol</i> filename<b>)</b>
- opens the specified file, taken from the current
- directory. <br>
- <br><b>method</b>&nbsp;grid <b>(</b><i>grid(rows columns 1)</i> grid<b>)</b> Y-8 (greyscale)<br>
- <br><b>method</b>&nbsp;grid <b>(</b><i>grid(rows columns 2)</i> grid<b>)</b> YA-16 (greyscale and transparency)<br>
- <br><b>method</b>&nbsp;grid <b>(</b><i>grid(rows columns 3)</i> grid<b>)</b> RGB-24 (colour)<br>
- <br><b>method</b>&nbsp;grid <b>(</b><i>grid(rows columns 4)</i> grid<b>)</b> RGBA-32 (colour and transparency)<br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="format quicktime #in/#out">format quicktime #in/#out</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/format quicktime %23in/%23out-icon.png" alt="[format quicktime #in/#out]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>Support for .mov files.</p> <p>This format supports frame-seek and frame-tell.</p> <p>Uses the HW-QuickTime library aka QuickTime4Linux
- (libquicktime.so). There is also a variant on the same library and that project
- is just called LibQuickTime.</p> <p>Some versions of those libraries may include support for different codecs,
- and some also may support entirely different wrapper formats such as AVI.</p> <p>On Macintosh, Apple QuickTime is used instead, but several of the following
- messages may not be available.</p> <br><b>method</b>&nbsp;open quicktime file <b>(</b><i>symbol</i> filename<b>)</b> <br>
- <br><b>method</b>&nbsp;codec <b>(</b><i>symbol</i> codec<b>)</b>
- Allowed values are at least: raw, jpeg, png, mjpa, yuv2, yuv4.
- Some other values may allowed, depending on the version of the library
- and which codec plugins are installed.
- Must be set before the first frame is written.
- only applies to <kbd><font color="#007777">[#out]</font></kbd>. Choosing a codec is important
- because codecs influence greatly the speed of
- encoding, the speed of decoding,
- the size of the written file, and its fidelity to the
- original content. Note that there exist other Apple-QuickTime
- codecs that are not supported by HW-QuickTime. <br>
- <br><b>method</b>&nbsp;parameter <b>(</b><i>symbol</i> key<b>, </b><i>int</i> value<b>)</b>
- Sets special codec-specific settings.
- For example: <kbd><font color="#007777">"parameter jpeg_quality 75"</font></kbd> <br>
- <br><b>method</b>&nbsp;framerate <b>(</b><i>int</i> fps<b>)</b>
- Sets the framerate of the file.
- This is not used by GridFlow when reading a file, but other
- programs usually care. <br>
- <br><b>method</b>&nbsp;colorspace <b>(</b><i>symbol</i> colorspace<b>)</b>
- Allowed values are rgb, rgba, bgr, bgra, yuv, yuva.
- Normally you don't need this. <br>
- <br><b>method</b>&nbsp;size <b>(</b><i>int</i> height<b>, </b><i>int</i> width<b>)</b>
- Forces a window size when writing. Usually this has to be used <u>after</u>
- setting the framerate and codec and <u>before</u> setting the codec-parameters.
- (Strange. Sorry.) <br>
- <br><b>method</b>&nbsp;force_size <b>(</b><i>int</i> height<b>, </b><i>int</i> width<b>)</b>
- forces a window size when reading.
- this is a workaround for a problem in HW-QuickTime. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="format mpeg #in">format mpeg #in</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/format mpeg %23in-icon.png" alt="[format mpeg #in]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>support for .mpeg files</p> <p>this format supports frame-seek and frame-tell.</p> <p>Two different libraries are available for dealing with
- MPEG files. Those have different details, capabilities and quirks.</p> <p>In any case, GridFlow does not support importing audio from
- those files.</p> <p>If you use the HeroineWarrior library, you may open several
- mpeg files at once, but not with the GregWard library.</p> <p>Libraries may scream error messages in a rude way.</p> <p>By opposition to PPM and TARGA, this format driver only
- allows a single MPEG stream per file (you cannot "cat"
- several MPEG files together). </p> <p>Supports Rewind and Frame Select.</p> <br><b>method</b>&nbsp;open mpeg file <b>(</b><i>symbol</i> filename<b>)</b>
- opens the specified file, taken from the current
- directory. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="format grid #in/#out">format grid #in/#out</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/format grid %23in/%23out-icon.png" alt="[format grid #in/#out]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>
- This is GridFlow's special file format. This is the only I/O
- format that can hold anything that the <kbd><font color="#007777">[#store]</font></kbd> object can. </p> <p>
- This is the picture format that would support TCP connections
- if that feature actually worked. More on this later. </p> <br><b>method</b>&nbsp;open grid file <b>(</b><i>symbol</i> filename<b>)</b>
- opens the specified file, taken from the current
- directory. <br>
- <br><b>method</b>&nbsp;open grid gzfile <b>(</b><i>symbol</i> filename<b>)</b>
- same but for .grid.gz files <br>
- <br><b>method</b>&nbsp;open grid tcp <b>(</b><i>symbol</i> hostname<b>, </b><i>integer</i> port<b>)</b>
- dials an specified hostname/port on the InterNet or
- compatible network. the TCP protocol is used. <br>
- <br><b>method</b>&nbsp;open grid tcpserver <b>(</b><i>integer</i> port<b>)</b>
- waits for a call (and answers) for this port on the
- local machine via InterNet or compatible network.
- Answers the call. <br>
- <br><b>method</b>&nbsp;type int32 <b>(</b><b>)</b>
- output will be as 32 bit signed integers. <br>
- <br><b>method</b>&nbsp;type uint8 <b>(</b><b>)</b>
- output will be as 8 bit unsigned integers. <br>
- <br><b>method</b>&nbsp;headerful <b>(</b><b>)</b>
- cancels "headerless" (and back to reading .grid) <br>
- <br><b>method</b>&nbsp;headerless <b>(</b>dimensions...<b>)</b>
- instead of reading .grid files with header, will read raw data,
- faking a .grid header to itself. It will use the hereby specified
- dimension list, as well as two other settings: <kbd><font color="#007777">type</font></kbd> and <kbd><font color="#007777">endian</font></kbd>. <br>
- <p>When writing "raw" data, a file may be considered a long string of
- base 256 digits (called bytes), but different computers have different
- conventions for dealing with them: <br><b>method</b>&nbsp;endian <b>(</b><b>)</b> <ul><li><b>1</b> : big:
- A number will be written starting with the biggest digit.
- This is the natural way on the Macintosh, Sun, Amiga, and so on. </li> <li><b>2</b> : little:
- A number will be written starting with the smallest digit.
- This is the natural way on the Intel 386/Pentium. </li> <li><b>3</b> : same:
- A number will be written in whichever way is more natural
- on this computer. The natural way is slightly faster to handle.
- This is the default setting. </li> </ul> <br>
- </p> <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="Acquisition_Devices"></a><h4>Acquisition Devices</h4></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="format videodev #in">format videodev #in</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/format videodev %23in-icon.png" alt="[format videodev #in]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;open <b>(</b>device<b>)</b> <br>
- <p>Video4Linux-1 devices, RGB-24 only. Variable picture size.</p> <p>We have been testing it using cards of the BT-848 family,
- such as Miro DC10plus and Hauppauge WinTV, using the <kbd><font color="#007777">bttv.o</font></kbd> linux driver.
- Also we have been testing using Logitech QuickCam (and similar Labtec hardware),
- but don't use the <kbd><font color="#007777">qce-ga</font></kbd> driver, which is buggy and obsolete: the <kbd><font color="#007777">qc-usb</font></kbd>
- works better.</p> <p>Some hardware doesn't support RGB, so you may have to select a YUV colorspace
- (see below) and then use <kbd><font color="#007777">[#yuv_to_rgb]</font></kbd>. Don't forget to also do <kbd><font color="#007777">[# min 255]</font></kbd> and <kbd><font color="#007777">[# max 0]</font></kbd>. </p> <p>If for some reason there's a bug that causes a driver to produce BGR instead of RGB,
- so that red and blue are swapped, you can swap them back by filtering through a RGB-BGR
- converter, such as <kbd><font color="#007777">[#inner * + 0 {3 3 # 0 0 1 0 1 0 1 0 0}]</font></kbd>.</p> <p>color adjustments: <br><b>method</b>&nbsp;brightness <b>(</b><i>0-65535</i> level<b>)</b> <br>
- <br><b>method</b>&nbsp;hue <b>(</b><i>0-65535</i> level<b>)</b> <br>
- <br><b>method</b>&nbsp;colour <b>(</b><i>0-65535</i> level<b>)</b> <br>
- <br><b>method</b>&nbsp;contrast <b>(</b><i>0-65535</i> level<b>)</b> <br>
- <br><b>method</b>&nbsp;whiteness <b>(</b><i>0-65535</i> level<b>)</b> <br>
- </p> <br><b>method</b>&nbsp;get <b>(</b><i>symbol</i> attr<b>)</b>
- gets a specific attribute. a message is sent through right outlet.
- valid attributes are: brightness, hue, colour, contrast, whiteness. <br>
- <br><b>method</b>&nbsp;get <b>(</b><b>)</b>
- gets all attributes. <br>
- <p>other options: <br><b>method</b>&nbsp;channel <b>(</b><i>integer</i> <b>)</b> <br>
- <br><b>method</b>&nbsp;tuner <b>(</b><i>integer</i> <b>)</b> <br>
- <br><b>method</b>&nbsp;norm <b>(</b><i>integer</i> <b>)</b> <br>
- <br><b>method</b>&nbsp;frequency <b>(</b><i>integer</i> <b>)</b> <br>
- <br><b>method</b>&nbsp;transfer <b>(</b><i>symbol(read|mmap)</i> <b>, </b><i>integer</i> <b>)</b> <ul> <li><b>1</b> : mmap:
- This is the normal (and fast) way of transferring pictures
- from the camera. </li> <li><b>2</b> : read:
- Some cameras/drivers only support this instead of mmap. </li></ul>
- In case of mmap, the extra numeric argument sets the
- queue length in number of frames, so you can select an
- appropriate tradeoff between efficiency and latency. <br>
- <br><b>method</b>&nbsp;colorspace <b>(</b><i>symbol</i> colorspace<b>)</b>
- Allowed values are: RGB24, YUV420P.
- Use this if your driver doesn't support RGB24. <br>
- <br><b>method</b>&nbsp;size <b>(</b>height<b>, </b>width<b>)</b>
- sets the input size, especially when using a video digitalizer
- device. <br>
- </p> <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="Window_Output"></a><h4>Window Output</h4></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="format x11 #in/#out">format x11 #in/#out</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/format x11 %23in/%23out-icon.png" alt="[format x11 #in/#out]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>supports 15,16,24,32-bit truecolor displays</p> <p>now also support 8-bit indexed displays, using a private colormap
- configured as 3:3:2 RGB. When using 8-bit you can specify the
- "use_stripes" option to use a completely different color scheme
- involving R,G,B diagonal stripes, a kind of 6:6:6 RGB spread over three
- pixels.</p> <p>If you are using Windows or MacOS 10: you will have to install
- a X11 server. This will emulate Unix display on your OS. (note:
- Unix systems also need a X11 server, but it's built-in and handles
- the video driver directly). In the case of MacOS 10 and QNX that both
- use non-X11 display technology on top of a basically Unix OS, the
- OS comes with a X11 server, but it may be on a "bundled software"
- CD.</p> <br><b>method</b>&nbsp;open x11 <b>(</b><b>)</b>
- synonym of "open x11 here". <br>
- <br><b>method</b>&nbsp;open x11 here <b>(</b><b>)</b>
- connects to the default X11 server,
- according to your environment variable "DISPLAY". <br>
- <br><b>method</b>&nbsp;open x11 local <b>(</b><i>integer</i> display_number<b>)</b>
- connects to a display server on this machine. <br>
- <br><b>method</b>&nbsp;open x11 remote <b>(</b><i>symbol</i> host_name<b>, </b><i>integer</i> display_number<b>)</b>
- connects to a remote X11 display server using TCP.
- Sorry, IP addresses are not supported.
- Port number will be 6000 plus the display number, because
- of the X11 standard. <br>
- <br><b>method</b>&nbsp;grid <b>(</b><i>grid(rows columns {red green blue})</i> grid<b>)</b>
- resizes the window to the size of the grid;
- encodes that grid in the display's pixel format;
- also displays it if autodraw &gt; 0
- the values must be in range 0-255,
- or else they will be "wrapped". <br>
- <p>
- Destroying the object (or sending "close") should close the window. </p> <p>because of the design of Xlib, or if any of the connections
- involved crashes, then the whole program has to be terminated.
- (don't you love xlib). Something similar happens if you close any
- of the windows yourself, but IIRC this could be fixed.</p> <p>only one window may be used per connection (to simplify matters;
- this doesn't reduce flexibility).</p> <p>there is an additional argument that may be added to every <kbd><font color="#007777">"open"</font></kbd> message; if you don't put it, a new toplevel window is created.
- if you put "root" then the screen's wallpaper will be used instead
- (it may fail to work with some popular window managers). You can also
- put a window number, e.g. <kbd><font color="#007777">0x28003ff</font></kbd>, you may connect to
- an existing window; you can find out the number of a window by using
- a tool like <kbd><font color="#007777">xwininfo</font></kbd>, part of X11 standard tools.</p> <br><b>method</b>&nbsp;out_size <b>(</b><i>integer</i> height<b>, </b><i>integer</i> width<b>)</b>
- changes the window's size, just like sending a grid
- dim(height,width,3) would.
- this affects the size of screen captures too. <br>
- <br><b>method</b>&nbsp;draw <b>(</b><b>)</b>
- forces a redraw of the window's contents. <br>
- <br><b>method</b>&nbsp;autodraw <b>(</b><i>0,1,2</i> level<b>)</b> <ul> <li><b>0</b> : draw() is never automatically invoked</li> <li><b>1</b> : draw() is invoked after each grid is finished</li> <li><b>2</b> : draw() is invoked incrementally after each row is
- received. (but buffering may cause lines to come in groups
- anyway)</li> </ul> <br>
- <br><b>method</b>&nbsp;setcursor <b>(</b><i>0..63</i> cursor<b>)</b>
- Selects one of the 64 predefined cursors of X11. (Note that if
- your cursor table has them numbered from 0 to 126 using only even
- numbers, then those cursor numbers are all doubled compared to
- the ones GridFlow uses.) <br>
- <br><b>method</b>&nbsp;hidecursor <b>(</b><b>)</b>
- This makes the cursor invisible. <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;position <b>(</b><i>integer</i> y<b>, </b><i>integer</i> x<b>, </b><i>integer</i> buttons<b>)</b> <p>This is emitted every time the cursor moves inside
- the window connected to this format handler. This is also
- emitted when the cursor is dragging from inside to outside
- the window. This is also emitted when a mouse button is pressed.</p> <p>The y and x coordinates are relative to the upper
- right corner of the window. Specific button states may be
- extracted from the button value by applying [&gt;&gt;
- buttonnumber] and then checking whether the result is odd.
- Button numbers normally are: <ul> <li><b>0</b> : Shift</li> <li><b>1</b> : CapsLock</li> <li><b>2</b> : Control</li> <li><b>3</b> : Alternate</li> <li><b>4</b> : NumLock</li> <li><b>5</b> : ???</li> <li><b>6</b> : Meta</li> <li><b>7</b> : ScrollLock</li> <li><b>8</b> : Left Button</li> <li><b>9</b> : Middle Button</li> <li><b>10</b> : Right Button</li> <li><b>11</b> : Wheel Up</li> <li><b>12</b> : Wheel Down</li> </ul></p> <p>NOTE: This message form may become longer in the future, but the already defined parts will stay the same.</p> <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;keypress <b>(</b><i>integer</i> y<b>, </b><i>integer</i> x<b>, </b><i>integer</i> buttons<b>, </b><i>symbol</i> keyname<b>)</b> <p>Similar to <kbd><font color="#007777">position</font></kbd> above, but this is emitted when a
- keyboard key is pressed while this format handler's window
- is active. Keynames follow the X11 standard, similarly to PureData's [keyname] object.
- The only exception is that keynames that are digits get prefixed by a capital D so that
- they don't get mistaken for actual numbers.</p> <p>NOTE: This message form may become longer in the future, but the already defined parts will stay the same.</p> <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;keyrelease <b>(</b><i>integer</i> y<b>, </b><i>integer</i> x<b>, </b><i>integer</i> buttons<b>, </b><i>symbol</i> keyname<b>)</b>
- Same as keypress but when a key gets released instead. <p>NOTE: This message form may become longer in the future, but the already defined parts will stay the same.</p> <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="format quartz #out">format quartz #out</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/format quartz %23out-icon.png" alt="[format quartz #out]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
-
- The equivalent of format x11 on MacOS 10.x, but with less features (sorry). <br><b>method</b>&nbsp;open <b>(</b><b>)</b>
- opens a dim(240,320,3) rgb window (default). <br>
- <br><b>method</b>&nbsp;grid <b>(</b><i>grid(rows columns {red green blue})</i> grid<b>)</b>
- Sends image to screen. Window will be resized to fit the image exactly. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="format sdl #out">format sdl #out</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/format sdl %23out-icon.png" alt="[format sdl #out]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;open <b>(</b><b>)</b>
- Opens a dim(240,320,3) rgb window (default). <br>
- <br><b>method</b>&nbsp;grid <b>(</b><i>grid(rows columns {red green blue})</i> grid<b>)</b>
- Sends image to screen. Window will be resized to fit the image exactly. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="format aalib #out">format aalib #out</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/format aalib %23out-icon.png" alt="[format aalib #out]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;open aalib <b>(</b>driver<b>, </b>args...<b>)</b> <br>
- <br><b>method</b>&nbsp;grid <b>(</b><i>grid(rows columns {white})</i> grid<b>)</b>
- converts a greyscale image to an ascii image and possibly
- displays it. note that the image is typically downscaled by
- a factor of 2 by aalib itself. <br>
- <br><b>method</b>&nbsp;grid <b>(</b><i>grid(rows columns {ascii attr})</i> grid<b>)</b>
- the inverse of "dump". Both together in a loop allow to
- post-process aalib's buffer before displaying. Goes well
- with "draw", "autodraw". <br>
- <br><b>method</b>&nbsp;print <b>(</b><i>int</i> y<b>, </b><i>int</i> x<b>, </b><i>int</i> attr<b>, </b><i>symbol</i> text<b>)</b> <br>
- <br><b>method</b>&nbsp;autodraw <b>(</b><b>)</b>
- like X11's autodraw. <br>
- <br><b>method</b>&nbsp;draw <b>(</b><b>)</b>
- like X11's draw. <br>
- <br><b>method</b>&nbsp;dump <b>(</b><b>)</b>
- produces a Dim[y,x,2] grid whose two channels are
- ascii character codes and character attributes. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="format window #out">format window #out</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/format window %23out-icon.png" alt="[format window #out]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;open window <b>(</b><b>)</b>
- Equivalent to "open x11", but this can be set by putting a line like
- this in the config file: <kbd><font color="#007777">GridFlow.formats[:window] = GridFlow.formats[:x11]</font></kbd>
- (and similarly other aliases can be created too) <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td>&nbsp;</td></tr>
- <td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4">
-<p><font size="-1">
-GridFlow 0.8.1 Documentation<br>
-Copyright &copy; 2001,2002,2003,2004,2005,2006 by Mathieu Bouchard
-<a href="mailto:matju@artengine.ca">matju@artengine.ca</a>
-</font></p>
-</td></tr></table></body></html>
-
-
diff --git a/externals/gridflow/doc/format.xml b/externals/gridflow/doc/format.xml
deleted file mode 100644
index 030a777d..00000000
--- a/externals/gridflow/doc/format.xml
+++ /dev/null
@@ -1,780 +0,0 @@
-<?xml version="1.0" standalone="no" ?>
-<!DOCTYPE documentation SYSTEM 'jmax.dtd'>
-<documentation title="Reference Manual: Format Classes">
-<!-- $Id: format.xml,v 1.2 2006-03-15 04:44:50 matju Exp $ -->
-<!--
- GridFlow Reference Manual: Format Handler Reference
- Copyright (c) 2001,2002,2003,2004,2005 by Mathieu Bouchard
--->
-
-<section name="Objects for Input/Output">
-
- <class name="#in">
- <icon text="[#in]"/>
- <help text="[#in]" image="#inout"/>
-
- <method name="init" min="0">
- <arg name="format"/>
- <rest name="format_specific_part"/>
-
- If no arguments given, creates an input object for an unspecified
- format. You then need to use the <k>"open"</k> command to link
- a format handler to it.
-
- If arguments given, the <k>"open"</k> command is immediately called
- with those arguments.
-
- Remember that most formats produce Dim[rows,columns,3] grids with
- 0-255 values. (Most.)
- </method>
-
- <inlet id="0">
- <method name="open" min="1">
- <arg name="format"/>
- <rest name="format_specific_part"/>
- This is the command that gives a particular resource
- to a <k>[#out]</k> object. This is done through a "format"
- (there is a list of formats in this manual). The other
- arguments depend on the chosen format. The format may
- be a file format or a protocol or a hardware device, etc.
-
- The format called "file" is a special shortcut that autodetects the
- type of file (by name suffix) and picks up the appropriate handler.
- </method>
- <method name="open">
- <arg name="filename"/>
- This is a shortcut for <k>"open file"</k> followed by a filename.
- The filename must contain a dot, else it will be seen as a handler name.
- </method>
- <method name="close">
- close may be necessary if you operate on <k>"/dev/video"</k>,
- which can only be read by one at a time. otherwise it's
- usually not necessary.
- </method>
- <method name="int">
- <arg name="frame_number"/>
- selects one picture from a multi-picture format
- and then does the same as a bang.
- </method>
- <method name="set">
- <arg name="frame_number"/>
- selects one picture from a multi-picture format,
- to be displayed by the next bang.
- </method>
- <method name="bang">
- sends a grid through the outlet. the grid may be the
- result of reading from a file, acquiring from a device,
- capturing from the screen etc.
-
- this is format-specific. most formats
- produce grid(rows columns {red green blue}).
-
- In formats that read from a file, reading another picture
- will continue if there are several pictures in the
- same file, but if the end of file is reached instead,
- it will rewind and send the first picture again.
-
- see section "External Picture Formats".
-
- </method>
- <method name="option">
- <arg name="selector" type="symbol"/>
- <rest name="stuff"/>
- Obsolete. the word "option" is optional now.
- </method>
- <method name="rewind">
- rewinds to beginning of file if applicable.
- </method>
- <method name="loop">
- <arg name="flag" type="bool"/>
- controls the automatic looping of movies.
- </method>
- </inlet>
-
- <outlet id="1">
- <method name="int">
- frame number of frame just sent,
- for formats that have frame numbers.
- </method>
-
- <method name="bang">
- tried to read a frame that does not exist
- (signals end of file)
- </method>
- </outlet>
- </class>
-
- <class name="#out">
- <icon text="[#out]"/>
- <help text="[#out]" image="#inout"/>
-
- <method name="init" min="0">
- <arg name="format"/>
- <rest name="format_specific_part"/>
-
- If no arguments given, creates an output object for an unspecified
- format. You then need to use the <k>"open"</k> command to link
- a format handler to it.
-
- If arguments given, the <k>"open"</k> command is immediately called
- with those arguments.
-
- Remember that most formats expect dim(rows,columns,3) grids with
- 0-255 values. (Most.)
- </method>
- <method name="init">
- <arg name="rows" type="integer"/>
- <arg name="columns" type="integer"/>
-
- This alternate way to create an <k>[#out]</k> automatically calls
- <k>"open window"</k> and <k>"out_size <i>rows columns</i>"</k>.
- </method>
- <inlet id="0">
- <method name="open" min="1">
- <arg name="format"/>
- <rest name="format_specific_part"/>
- This is the command that gives a particular resource
- to a <k>[#out]</k> object. This is done through a "format"
- (there is a list of formats in this manual). The other
- arguments depend on the chosen format. The format may
- be a file format or a protocol or a hardware device, etc.
- </method>
- <method name="open file">
- The format called "file" is a special shortcut that autodetects the
- type of file (by name suffix) and picks up the appropriate handler.
- </method>
- <method name="open">
- <arg name="filename"/>
- This is a shortcut for "open file" followed by a filename.
- The filename must contain a dot, else it will be seen as a handler name.
- </method>
- <method name="grid"><arg name="grid" type="grid"/>
- this is format-specific. most formats
- expect grid(rows columns {red green blue}).
-
- In formats that write to a file, sending a 2nd picture
- overwrites the first.
-
- see section "External Picture Formats".
- </method>
- <method name="close">
- closes the file. usually not necessary.
- </method>
- <method name="option">
- <arg name="selector" type="symbol"/>
- <rest name="stuff"/>
- Obsolete. Omit the word "option" now.
- </method>
- <method name="timelog">
- <arg name="status" type="0,1"/>
- when status=1, current time (unix clock) and time since last
- frame-end are printed in the console. when status=0, it is off.
- default is 0.
- </method>
- <method name="rewind">
- rewinds to beginning of file if applicable.
- will overwrite the previous data.
- </method>
- </inlet>
- <outlet id="0">
- <method name="bang">
- sent when a complete grid has been received.
- </method>
- </outlet>
- </class>
-
- <class name="#peephole">
- <p>
- This object class only works with a X11-based version of Pd.
- (e.g. on Linux, BSD, but not MacOS X).
- </p>
- <p>Similar to <k>[#out window]</k>, except it creates an inset in the patch you put it
- in, and a scaled version of the picture appears in the inset. It also emits the same messages
- as <k>[#out window]</k> and automatically scales cursor position according to the current scale factor.
- The scale factor is decided automatically.
- </p>
- <method name="init">
- <arg name="height" type="int"/>
- <arg name="width" type="int"/>
- </method>
- <p>All other methods are as in <k>[#out window]</k>.</p>
- </class>
- <class name="#mouse">
- This will process the "position" messages emitted by <k>[#out]</k> or <k>[#peephole]</k> in
- useful ways.
- <outlet id="0"><method name="list">
- y,x coords of a click
- </method></outlet>
- <outlet id="1"><method name="list">
- y,x coords of a drag (any button is kept pressed)
- </method></outlet>
- <outlet id="2"><method name="list">
- y,x coords of an unclick
- </method></outlet>
- <outlet id="3"><method name="list">
- y,x coords of a move (no button is pressed)
- </method></outlet>
- <outlet id="4"><method name="float" type="0,1">button 1 status</method></outlet>
- <outlet id="5"><method name="float" type="0,1">button 2 status</method></outlet>
- <outlet id="6"><method name="float" type="0,1">button 3 status</method></outlet>
- <outlet id="7"><method name="float" type="-1,1">
- wheel difference: -1 = roll up; 1 = roll down.
- </method></outlet>
- </class>
- <class name="#camera">
- Works about like <k>[#in videodev]</k> except you can right-click-open it to access all of the
- camera settings visually.
- </class>
-</section>
-
-<section name="Picture/Movie Formats">
-
- <class name="format ppm #in/#out">
- <icon image="format_ppm" text="[open filename.ppm]"/>
-
- <p>Subformat P6 only.
- Max-number can only be 255 (24-bit RGB).
- </p>
-
- <method name="open ppm file">
- <arg name="filename" type="symbol"/>
- opens the specified file, taken from the current
- directory.
- </method>
-
- <method name="open ppm gzfile">
- <arg name="filename" type="symbol"/>
- same but for .ppm.gz files
- </method>
-
- <method name="grid">
- <arg name="grid" type="grid(rows columns {r g b})"/>
- values 0-255
- </method>
- </class>
-
- <class name="format targa #in/#out">
- <icon image="format_targa" text="[open filename.tga]"/>
- <p>Support for RGB-24 (3 channels) and RGBA-32 (4 channels)</p>
-
- <method name="open targa file">
- <arg name="filename" type="symbol"/>
- opens the specified file, taken from the current
- directory.
- </method>
-
- <method name="open targa gzfile">
- <arg name="filename" type="symbol"/>
- same but for .tga.gz files
- </method>
-
- <method name="grid"><arg name="grid" type="grid(rows columns 3)"/>RGB-24</method>
- <method name="grid"><arg name="grid" type="grid(rows columns 4)"/>RGBA-32</method>
- </class>
-
- <class name="format jpeg #in/#out">
- <!--<icon image="format_jpeg" text="[open foo.jpg]"/>-->
- <p>Support for RGB non-progressive</p>
-
- <method name="open jpeg file">
- <arg name="filename" type="symbol"/>
- opens the specified file, taken from the current
- directory.
- </method>
-
- <method name="grid">
- <arg name="grid" type="grid(rows columns 3)"/>RGB-24
- </method>
- </class>
-
- <class name="format png #in">
- <!--<icon image="format_jpeg" text="[open foo.jpg]"/>-->
- <p>Support for RGB non-progressive</p>
-
- <method name="open png file">
- <arg name="filename" type="symbol"/>
- opens the specified file, taken from the current
- directory.
- </method>
-
- <method name="grid"><arg name="grid" type="grid(rows columns 1)"/>Y-8 (greyscale)</method>
- <method name="grid"><arg name="grid" type="grid(rows columns 2)"/>YA-16 (greyscale and transparency)</method>
- <method name="grid"><arg name="grid" type="grid(rows columns 3)"/>RGB-24 (colour)</method>
- <method name="grid"><arg name="grid" type="grid(rows columns 4)"/>RGBA-32 (colour and transparency)</method>
- </class>
-
- <class name="format quicktime #in/#out">
- <p>Support for .mov files.</p>
- <p>This format supports frame-seek and frame-tell.</p>
- <p>Uses the HW-QuickTime library aka QuickTime4Linux
- (libquicktime.so). There is also a variant on the same library and that project
- is just called LibQuickTime.</p>
- <p>Some versions of those libraries may include support for different codecs,
- and some also may support entirely different wrapper formats such as AVI.</p>
- <p>On Macintosh, Apple QuickTime is used instead, but several of the following
- messages may not be available.</p>
-
- <method name="open quicktime file">
- <arg name="filename" type="symbol" />
- </method>
- <method name="codec">
- <arg name="codec" type="symbol"/>
- Allowed values are at least: raw, jpeg, png, mjpa, yuv2, yuv4.
- Some other values may allowed, depending on the version of the library
- and which codec plugins are installed.
- Must be set before the first frame is written.
- only applies to <k>[#out]</k>. Choosing a codec is important
- because codecs influence greatly the speed of
- encoding, the speed of decoding,
- the size of the written file, and its fidelity to the
- original content. Note that there exist other Apple-QuickTime
- codecs that are not supported by HW-QuickTime.
- </method>
- <method name="parameter">
- <arg name="key" type="symbol"/>
- <arg name="value" type="int"/>
- Sets special codec-specific settings.
- For example: <k>"parameter jpeg_quality 75"</k>
- </method>
- <method name="framerate">
- <arg name="fps" type="int"/>
- Sets the framerate of the file.
- This is not used by GridFlow when reading a file, but other
- programs usually care.
- </method>
-
- <method name="colorspace">
- <arg name="colorspace" type="symbol"/>
- Allowed values are rgb, rgba, bgr, bgra, yuv, yuva.
- Normally you don't need this.
- </method>
- <method name="size">
- <arg name="height" type="int"/>
- <arg name="width" type="int"/>
- Forces a window size when writing. Usually this has to be used <u>after</u>
- setting the framerate and codec and <u>before</u> setting the codec-parameters.
- (Strange. Sorry.)
- </method>
- <method name="force_size">
- <arg name="height" type="int"/>
- <arg name="width" type="int"/>
- forces a window size when reading.
- this is a workaround for a problem in HW-QuickTime.
- </method>
- </class>
-
- <class name="format mpeg #in">
- <icon image="format_mpeg" text="[open mpeg file filename.mpeg]"/>
- <p>support for .mpeg files</p>
- <p>this format supports frame-seek and frame-tell.</p>
- <p>Two different libraries are available for dealing with
- MPEG files. Those have different details, capabilities and quirks.</p>
- <p>In any case, GridFlow does not support importing audio from
- those files.</p>
- <p>If you use the HeroineWarrior library, you may open several
- mpeg files at once, but not with the GregWard library.</p>
- <p>Libraries may scream error messages in a rude way.</p>
- <p>By opposition to PPM and TARGA, this format driver only
- allows a single MPEG stream per file (you cannot "cat"
- several MPEG files together).
- </p>
- <p>Supports Rewind and Frame Select.</p>
- <method name="open mpeg file">
- <arg name="filename" type="symbol"/>
- opens the specified file, taken from the current
- directory.
- </method>
- </class>
-
- <class name="format grid #in/#out">
- <icon image="format_grid" text="[open grid file filename.grid]"/>
- <icon image="format_grid_tcp" text="[open grid tcp artengine.ca 4242]"/>
- <icon image="format_grid_tcpserver" text="[open grid tcpserver 4242]"/>
-
- <p>
- This is GridFlow's special file format. This is the only I/O
- format that can hold anything that the <k>[#store]</k> object can.
- </p>
- <p>
- This is the picture format that would support TCP connections
- if that feature actually worked. More on this later.
- </p>
-
- <method name="open grid file">
- <arg name="filename" type="symbol"/>
- opens the specified file, taken from the current
- directory.
- </method>
- <method name="open grid gzfile">
- <arg name="filename" type="symbol"/>
- same but for .grid.gz files
- </method>
- <method name="open grid tcp">
- <arg name="hostname" type="symbol"/>
- <arg name="port" type="integer"/>
- dials an specified hostname/port on the InterNet or
- compatible network. the TCP protocol is used.
- </method>
- <method name="open grid tcpserver">
- <arg name="port" type="integer"/>
- waits for a call (and answers) for this port on the
- local machine via InterNet or compatible network.
- Answers the call.
- </method>
- <method name="type int32">
- output will be as 32 bit signed integers.
- </method>
- <method name="type uint8">
- output will be as 8 bit unsigned integers.
- </method>
- <method name="headerful">
- cancels "headerless" (and back to reading .grid)
- </method>
- <method name="headerless">
- <rest name="dimensions" type="integer"/>
- instead of reading .grid files with header, will read raw data,
- faking a .grid header to itself. It will use the hereby specified
- dimension list, as well as two other settings:
- <k>type</k> and <k>endian</k>.
- </method>
-
- <p>When writing "raw" data, a file may be considered a long string of
- base 256 digits (called bytes), but different computers have different
- conventions for dealing with them:
-
- <method name="endian" type="symbol(big|endian|same)">
- <list><li>big:
- A number will be written starting with the biggest digit.
- This is the natural way on the Macintosh, Sun, Amiga, and so on.
- </li>
- <li>little:
- A number will be written starting with the smallest digit.
- This is the natural way on the Intel 386/Pentium.
- </li>
- <li>same:
- A number will be written in whichever way is more natural
- on this computer. The natural way is slightly faster to handle.
- This is the default setting.
- </li>
- </list>
- </method>
- </p>
- </class>
-</section>
-
-<section name="Acquisition Devices">
-
- <class name="format videodev #in">
- <icon image="format_videodev" text="[open /dev/video0]"/>
-
- <method name="open">
- <arg name="device"/>
- </method>
-
- <p>Video4Linux-1 devices, RGB-24 only. Variable picture size.</p>
-
- <p>We have been testing it using cards of the BT-848 family,
- such as Miro DC10plus and Hauppauge WinTV, using the <k>bttv.o</k> linux driver.
- Also we have been testing using Logitech QuickCam (and similar Labtec hardware),
- but don't use the <k>qce-ga</k> driver, which is buggy and obsolete: the <k>qc-usb</k>
- works better.</p>
-
- <p>Some hardware doesn't support RGB, so you may have to select a YUV colorspace
- (see below) and then use <k>[#yuv_to_rgb]</k>. Don't forget to also do
- <k>[# min 255]</k> and <k>[# max 0]</k>.
- </p>
-
- <p>If for some reason there's a bug that causes a driver to produce BGR instead of RGB,
- so that red and blue are swapped, you can swap them back by filtering through a RGB-BGR
- converter, such as <k>[#inner * + 0 {3 3 # 0 0 1 0 1 0 1 0 0}]</k>.</p>
-
- <p>color adjustments:
- <method name="brightness"><arg name="level" type="0-65535"/></method>
- <method name="hue" ><arg name="level" type="0-65535"/></method>
- <method name="colour" ><arg name="level" type="0-65535"/></method>
- <method name="contrast" ><arg name="level" type="0-65535"/></method>
- <method name="whiteness" ><arg name="level" type="0-65535"/></method>
- </p>
- <method name="get">
- <arg name="attr" type="symbol"/>
- gets a specific attribute. a message is sent through right outlet.
- valid attributes are: brightness, hue, colour, contrast, whiteness.
- </method>
- <method name="get">
- gets all attributes.
- </method>
-
- <p>other options:
- <method name="channel" ><arg type="integer"/></method>
- <method name="tuner" ><arg type="integer"/></method>
- <method name="norm" ><arg type="integer"/></method>
- <method name="frequency" ><arg type="integer"/></method>
- <method name="transfer" >
- <arg type="symbol(read|mmap)"/>
- <arg type="integer" default="2"/>
- <list>
- <li>mmap:
- This is the normal (and fast) way of transferring pictures
- from the camera.
- </li>
- <li>read:
- Some cameras/drivers only support this instead of mmap.
- </li></list>
- In case of mmap, the extra numeric argument sets the
- queue length in number of frames, so you can select an
- appropriate tradeoff between efficiency and latency.
- </method>
-
- <method name="colorspace">
- <arg name="colorspace" type="symbol"/>
- Allowed values are: RGB24, YUV420P.
- Use this if your driver doesn't support RGB24.
- </method>
-
- <method name="size">
- <arg name="height"/>
- <arg name="width"/>
- sets the input size, especially when using a video digitalizer
- device.
- </method>
- </p>
- </class>
-</section>
-
-<section name="Window Output">
-
- <class name="format x11 #in/#out">
- <icon image="format_x11" text="[open window]"/>
- <icon image="format_x11_remote" text="[open x11 remote artengine.ca 10]"/>
-
- <p>supports 15,16,24,32-bit truecolor displays</p>
-
- <p>now also support 8-bit indexed displays, using a private colormap
- configured as 3:3:2 RGB. When using 8-bit you can specify the
- "use_stripes" option to use a completely different color scheme
- involving R,G,B diagonal stripes, a kind of 6:6:6 RGB spread over three
- pixels.</p>
-
- <p>If you are using Windows or MacOS 10: you will have to install
- a X11 server. This will emulate Unix display on your OS. (note:
- Unix systems also need a X11 server, but it's built-in and handles
- the video driver directly). In the case of MacOS 10 and QNX that both
- use non-X11 display technology on top of a basically Unix OS, the
- OS comes with a X11 server, but it may be on a "bundled software"
- CD.</p>
-
- <method name="open x11">
- synonym of "open x11 here".
- </method>
-
- <method name="open x11 here">
- connects to the default X11 server,
- according to your environment variable "DISPLAY".
- </method>
-
- <method name="open x11 local">
- <arg name="display_number" type="integer"/>
- connects to a display server on this machine.
- </method>
-
- <method name="open x11 remote">
- <arg name="host_name" type="symbol"/>
- <arg name="display_number" type="integer"/>
- connects to a remote X11 display server using TCP.
- Sorry, IP addresses are not supported.
- Port number will be 6000 plus the display number, because
- of the X11 standard.
- </method>
-
- <method name="grid">
- <arg name="grid" type="grid(rows columns {red green blue})"/>
- resizes the window to the size of the grid;
- encodes that grid in the display's pixel format;
- also displays it if autodraw &gt; 0
- the values must be in range 0-255,
- or else they will be "wrapped".
- </method>
-
- <p>
- Destroying the object (or sending "close") should close the window.
- </p>
-
- <p>because of the design of Xlib, or if any of the connections
- involved crashes, then the whole program has to be terminated.
- (don't you love xlib). Something similar happens if you close any
- of the windows yourself, but IIRC this could be fixed.</p>
-
- <p>only one window may be used per connection (to simplify matters;
- this doesn't reduce flexibility).</p>
-
- <p>there is an additional argument that may be added to every
- <k>"open"</k> message; if you don't put it, a new toplevel window is created.
- if you put "root" then the screen's wallpaper will be used instead
- (it may fail to work with some popular window managers). You can also
- put a window number, e.g. <k>0x28003ff</k>, you may connect to
- an existing window; you can find out the number of a window by using
- a tool like <k>xwininfo</k>, part of X11 standard tools.</p>
-
- <method name="out_size">
- <arg name="height" type="integer"/>
- <arg name="width" type="integer"/>
- changes the window's size, just like sending a grid
- dim(height,width,3) would.
-
- this affects the size of screen captures too.
- </method>
-
- <method name="draw">
- forces a redraw of the window's contents.
- </method>
-
- <method name="autodraw">
- <arg name="level" type="0,1,2"/>
- <list start="0">
- <li>draw() is never automatically invoked</li>
- <li>draw() is invoked after each grid is finished</li>
- <li>draw() is invoked incrementally after each row is
- received. (but buffering may cause lines to come in groups
- anyway)</li>
- </list>
- </method>
-
- <method name="setcursor">
- <arg name="cursor" type="0..63"/>
- Selects one of the 64 predefined cursors of X11. (Note that if
- your cursor table has them numbered from 0 to 126 using only even
- numbers, then those cursor numbers are all doubled compared to
- the ones GridFlow uses.)
- </method>
-
- <method name="hidecursor">
- This makes the cursor invisible.
- </method>
-
- <outlet id="0">
- <method name="position">
- <arg name="y" type="integer"/>
- <arg name="x" type="integer"/>
- <arg name="buttons" type="integer"/>
-
- <p>This is emitted every time the cursor moves inside
- the window connected to this format handler. This is also
- emitted when the cursor is dragging from inside to outside
- the window. This is also emitted when a mouse button is pressed.</p>
-
- <p>The y and x coordinates are relative to the upper
- right corner of the window. Specific button states may be
- extracted from the button value by applying [&gt;&gt;
- buttonnumber] and then checking whether the result is odd.
- Button numbers normally are:
- <list start="0">
- <li>Shift</li>
- <li>CapsLock</li>
- <li>Control</li>
- <li>Alternate</li>
- <li>NumLock</li>
- <li>???</li>
- <li>Meta</li>
- <li>ScrollLock</li>
- <li>Left Button</li>
- <li>Middle Button</li>
- <li>Right Button</li>
- <li>Wheel Up</li>
- <li>Wheel Down</li>
- </list></p>
- <p>NOTE: This message form may become longer in the future, but the already defined parts will stay the same.</p>
- </method>
- <method name="keypress">
- <arg name="y" type="integer"/>
- <arg name="x" type="integer"/>
- <arg name="buttons" type="integer"/>
- <arg name="keyname" type="symbol"/>
- <p>Similar to <k>position</k> above, but this is emitted when a
- keyboard key is pressed while this format handler's window
- is active. Keynames follow the X11 standard, similarly to PureData's [keyname] object.
- The only exception is that keynames that are digits get prefixed by a capital D so that
- they don't get mistaken for actual numbers.</p>
- <p>NOTE: This message form may become longer in the future, but the already defined parts will stay the same.</p>
- </method>
- <method name="keyrelease">
- <arg name="y" type="integer"/>
- <arg name="x" type="integer"/>
- <arg name="buttons" type="integer"/>
- <arg name="keyname" type="symbol"/>
- Same as keypress but when a key gets released instead.
- <p>NOTE: This message form may become longer in the future, but the already defined parts will stay the same.</p>
- </method>
- </outlet>
- </class>
-
- <class name="format quartz #out">
- The equivalent of format x11 on MacOS 10.x, but with less features (sorry).
- <method name="open">
- opens a dim(240,320,3) rgb window (default).
- </method>
- <method name="grid">
- <arg name="grid" type="grid(rows columns {red green blue})"/>
- Sends image to screen. Window will be resized to fit the image exactly.
- </method>
- </class>
-
- <class name="format sdl #out">
- <method name="open">
- Opens a dim(240,320,3) rgb window (default).
- </method>
- <method name="grid">
- <arg name="grid" type="grid(rows columns {red green blue})"/>
- Sends image to screen. Window will be resized to fit the image exactly.
- </method>
- </class>
-
- <class name="format aalib #out">
- <method name="open aalib">
- <arg name="driver">
- Normally "X11" with uppercase X; else consult
- the AALib manual.
- </arg>
- <rest name="args">
- You can pass "commandline options" of AALib here.
- </rest>
- </method>
- <method name="grid">
- <arg name="grid" type="grid(rows columns {white})"/>
- converts a greyscale image to an ascii image and possibly
- displays it. note that the image is typically downscaled by
- a factor of 2 by aalib itself.
- </method>
- <method name="grid">
- <arg name="grid" type="grid(rows columns {ascii attr})"/>
- the inverse of "dump". Both together in a loop allow to
- post-process aalib's buffer before displaying. Goes well
- with "draw", "autodraw".
- </method>
- <method name="print">
- <arg name="y" type="int"/>
- <arg name="x" type="int"/>
- <arg name="attr" type="int"/>
- <arg name="text" type="symbol"/>
- </method>
- <method name="autodraw">
- like X11's autodraw.
- </method>
- <method name="draw">
- like X11's draw.
- </method>
- <method name="dump">
- produces a Dim[y,x,2] grid whose two channels are
- ascii character codes and character attributes.
- </method>
- </class>
-
- <class name="format window #out">
- <method name="open window">
- Equivalent to "open x11", but this can be set by putting a line like
- this in the config file: <k>GridFlow.formats[:window] = GridFlow.formats[:x11]</k>
- (and similarly other aliases can be created too)
- </method>
- </class>
-</section>
-
-</documentation>
diff --git a/externals/gridflow/doc/format/#camera-icon.png b/externals/gridflow/doc/format/#camera-icon.png
deleted file mode 100644
index 994f5a54..00000000
--- a/externals/gridflow/doc/format/#camera-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/format/#in-help.pd b/externals/gridflow/doc/format/#in-help.pd
deleted file mode 100644
index 4287c2ff..00000000
--- a/externals/gridflow/doc/format/#in-help.pd
+++ /dev/null
@@ -1,189 +0,0 @@
-#N canvas 63 0 743 682 10;
-#X obj 268 100 cnv 15 460 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X obj 278 120 cnv 15 450 15 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 6 682 cnv 15 720 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X obj 8 5 cnv 15 720 15 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 268 25 cnv 15 460 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 271 25 Arguments:;
-#X obj 271 513 cnv 15 460 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 274 512 Outlets:;
-#X obj 8 25 cnv 15 250 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 11 25 Usage:;
-#X obj 8 45 cnv 15 250 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 8 85 cnv 15 250 130 empty empty empty 5 11 0 12 -233017 -1 0
-;
-#X obj 8 223 cnv 15 250 400 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 269 610 cnv 15 460 15 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 271 100 Inlets: (Read left to right \, inlet "0" being the
-leftmost);
-#X text 281 120 0: (Leftmost);
-#X text 12 5 SUMMARY:;
-#X text 76 6 Imports a grid \, usually an image \, video or live stream.
-;
-#X obj 121 51 #in;
-#X obj 14 179 #out window;
-#X obj 14 112 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X floatatom 114 348 5 0 0 0 - - -;
-#X msg 55 348 set 2;
-#X msg 22 133 open b001.jpg;
-#X text 13 86 for images:;
-#X obj 23 564 #out window;
-#X obj 13 285 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X msg 45 326 open movie.mpeg;
-#X msg 116 398 loop 0;
-#X msg 129 426 loop 1;
-#X floatatom 47 537 5 0 0 0 - - -;
-#X msg 116 373 rewind;
-#X text 14 226 for video files:;
-#X obj 68 516 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 14 156 #in;
-#X obj 161 143 #in b001.jpg;
-#X obj 161 107 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 161 179 #out window;
-#X obj 23 501 #in;
-#X text 274 411 Message "loop 0" - turns off the loop option. The video
-stops once it reaches the end.;
-#X text 278 148 Grid - Bang sends a grid to [#out]. Since frames from
-video and live stream are read as a series of individual grids \, successive
-bangs advance through the frames.;
-#X text 277 368 Message "loop 1" - Restarts a video each time it reaches
-the end \, "loop 1" is the default setting.;
-#X obj 277 643 #import ( 1 );
-#X obj 380 643 #export;
-#X obj 442 644 #export_list;
-#X obj 539 644 #export_symbol;
-#X obj 648 644 #pack;
-#X text 282 45 One - [Filename] like [#in b001.jpg] eliminates the
-need for an "open someimege.jpg" message but limits the action to one
-specified grid.;
-#X text 277 199 Message "open" - followed by the filename \, sends
-a grid to [#out]. For example: "open b001.jpg".;
-#X text 275 456 Interger - Displays the frame number of the frame just
-sent. Applies to formats that have frame numbers \, i.e. video.;
-#X text 275 566 Bang- Signals the end of a file and when a file is
-unreadable.;
-#X text 276 337 Message "rewind" - Will rewind video to the beginning.
-;
-#X text 277 296 Message "close" - Closes the video input device. Only
-necessary when you are using a live capture device.;
-#X text 273 536 See Inlet: 1: (leftmost);
-#X text 12 689 GridFlow 0.8.0;
-#X text 272 610 See also:;
-#N canvas 0 0 656 649 more 0;
-#X msg 225 70 codec jpg;
-#X msg 220 340 framerate 33;
-#X msg 220 550 colorspace rgb;
-#X msg 221 264 size 400 600;
-#X msg 219 404 force_size 400 600;
-#X obj 23 591 #in;
-#X msg 220 607 open quicktime.mov;
-#X text 221 18 The following messages can be used to set parameters
-for video (.mov) files.;
-#X text 219 364 Number of frames per second.;
-#X text 221 145 different versions of LibQuickTime may include support
-for different codecs \, and some may also support entirely different
-wrapper formats such as AVI.;
-#X text 222 230 Codecs must be set before first frame is written.;
-#X msg 219 465 parameter jpeg_quality 85;
-#X text 218 572 Other colrspaces include rgba \, bgr \, bgra \, yuv
-\, yuva.;
-#X text 219 425 Determines window size when reading a video file.;
-#X text 580 93 comment;
-#X text 222 92 quicktime library for linux accepts LibQuickTime (libquicktime.so).
-codecs currently available are: Raw \, jpeg \, png \, mipa \, yuv2
-\, yuv4.;
-#X text 221 192 QuickTime library for Macintosh: Apple QuickTime (some
-codecs/features may not be available).;
-#X text 219 288 Sets height and width. Must be set before setting the
-codec parameters and after setting framerate and codec.;
-#X text 219 486 Sets compression quality (100 being the highest quality
-but a large file. 75-85 is the standard setting).;
-#X connect 0 0 5 0;
-#X connect 1 0 5 0;
-#X connect 2 0 5 0;
-#X connect 3 0 5 0;
-#X connect 4 0 5 0;
-#X connect 6 0 5 0;
-#X connect 11 0 5 0;
-#X restore 5 632 pd more info about quicktime files;
-#N canvas 0 0 874 655 more 0;
-#X msg 338 499 open videodev \$1 \, get;
-#X msg 53 273 brightness 1000;
-#X msg 42 250 hue 1000;
-#X msg 27 227 color 1000;
-#X msg 66 297 contrast 1000;
-#X msg 15 204 whiteness 1000;
-#X msg 537 76 channel 2;
-#X msg 537 106 tuner 2;
-#X msg 538 136 norm 2;
-#X msg 538 164 frequency 2;
-#X msg 465 267 transfer mmap 4;
-#X msg 464 390 transfer read;
-#X msg 341 612 colorspace RGB24;
-#X msg 340 555 size 400 600;
-#X obj 110 521 #in;
-#X obj 193 299 #contrast;
-#X text 167 298 or;
-#X text 339 575 Sets height and width of the input.;
-#X text 465 328 In the case of mmap \, the extra numeric argument sets
-the queue length in number of frames \, so you can select an appropriate
-tradeoff between efficiency and latency.;
-#X text 339 16 Grid Settings;
-#X text 465 291 This is the standard and fastest way to receive pictures
-from the camera.;
-#X text 465 413 Some cameras/drivers only support "transfer read" and
-not mmap.;
-#X text 13 147 Message "get brightness" or "get" followed by any of
-the other colour attributes will display its values in the console.
-;
-#X text 337 521 Opens video device.;
-#X text 341 632 Supported values are RGB24 or YUV420P.;
-#X text 10 88 Color Adjustments;
-#X text 12 115 Values from 0 to 65535;
-#X connect 0 0 14 0;
-#X connect 1 0 14 0;
-#X connect 2 0 14 0;
-#X connect 3 0 14 0;
-#X connect 4 0 14 0;
-#X connect 5 0 14 0;
-#X connect 6 0 14 0;
-#X connect 7 0 14 0;
-#X connect 8 0 14 0;
-#X connect 9 0 14 0;
-#X connect 10 0 14 0;
-#X connect 11 0 14 0;
-#X connect 12 0 14 0;
-#X connect 13 0 14 0;
-#X restore 5 657 pd more info about video devices;
-#X text 276 242 Message "set" - followed by a number will select the
-corresponding video frame. A bang must be sent to [#in] in order to
-display the frame.;
-#X connect 20 0 34 0;
-#X connect 21 0 38 0;
-#X connect 22 0 38 0;
-#X connect 23 0 34 0;
-#X connect 26 0 38 0;
-#X connect 27 0 38 0;
-#X connect 28 0 38 0;
-#X connect 29 0 38 0;
-#X connect 31 0 38 0;
-#X connect 34 0 19 0;
-#X connect 35 0 37 0;
-#X connect 36 0 35 0;
-#X connect 38 0 25 0;
-#X connect 38 1 30 0;
-#X connect 38 1 33 0;
diff --git a/externals/gridflow/doc/format/#in-icon.png b/externals/gridflow/doc/format/#in-icon.png
deleted file mode 100644
index a4c06bef..00000000
--- a/externals/gridflow/doc/format/#in-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/format/#mouse-icon.png b/externals/gridflow/doc/format/#mouse-icon.png
deleted file mode 100644
index e8bc94bd..00000000
--- a/externals/gridflow/doc/format/#mouse-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/format/#out-icon.png b/externals/gridflow/doc/format/#out-icon.png
deleted file mode 100644
index c64c94b5..00000000
--- a/externals/gridflow/doc/format/#out-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/format/#peephole-icon.png b/externals/gridflow/doc/format/#peephole-icon.png
deleted file mode 100644
index 809e93ab..00000000
--- a/externals/gridflow/doc/format/#peephole-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/format/#quicktime-help.pd b/externals/gridflow/doc/format/#quicktime-help.pd
deleted file mode 100644
index 22a6c9d0..00000000
--- a/externals/gridflow/doc/format/#quicktime-help.pd
+++ /dev/null
@@ -1,10 +0,0 @@
-#N canvas 328 114 500 300 10;
-#X msg 93 60 codec jpg;
-#X msg 94 92 parameter jpeg_quality 75;
-#X msg 309 255 framerate 33;
-#X msg 182 229 colorspace rgb;
-#X msg 285 165 size 400 600;
-#X msg 294 92 force_size 400 600;
-#X obj 117 261 #in;
-#X msg 107 194 open quicktime.mov;
-#X connect 7 0 6 0;
diff --git a/externals/gridflow/doc/format/#videodev-help.pd b/externals/gridflow/doc/format/#videodev-help.pd
deleted file mode 100644
index 948b4ae4..00000000
--- a/externals/gridflow/doc/format/#videodev-help.pd
+++ /dev/null
@@ -1,15 +0,0 @@
-#N canvas 442 389 450 300 10;
-#X msg 114 236 open videodev \$1 \, get;
-#X msg 106 12 brightness 1000;
-#X msg 106 35 hue 1000;
-#X msg 107 64 color 1000;
-#X msg 107 87 contrast 1000;
-#X msg 107 120 whiteness 1000;
-#X msg 288 59 channel 2;
-#X msg 287 84 tuner 2;
-#X msg 287 107 norm 2;
-#X msg 291 138 frequency 2;
-#X msg 108 156 transfer mmap 4;
-#X msg 103 184 transfer read;
-#X msg 283 210 colorspace RGB24;
-#X msg 288 167 size 400 600;
diff --git a/externals/gridflow/doc/format/aalib-icon.png b/externals/gridflow/doc/format/aalib-icon.png
deleted file mode 100644
index f649f20a..00000000
--- a/externals/gridflow/doc/format/aalib-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/format/jpeg-icon.png b/externals/gridflow/doc/format/jpeg-icon.png
deleted file mode 100644
index 9d2c40b1..00000000
--- a/externals/gridflow/doc/format/jpeg-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/format/opengrid-icon.png b/externals/gridflow/doc/format/opengrid-icon.png
deleted file mode 100644
index 3999ef2a..00000000
--- a/externals/gridflow/doc/format/opengrid-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/format/openmpeg-icon.png b/externals/gridflow/doc/format/openmpeg-icon.png
deleted file mode 100644
index ad277155..00000000
--- a/externals/gridflow/doc/format/openmpeg-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/format/openppm-icon.png b/externals/gridflow/doc/format/openppm-icon.png
deleted file mode 100644
index 124127fb..00000000
--- a/externals/gridflow/doc/format/openppm-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/format/opentarga-icon.png b/externals/gridflow/doc/format/opentarga-icon.png
deleted file mode 100644
index 5141a8ab..00000000
--- a/externals/gridflow/doc/format/opentarga-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/format/openx11-icon.png b/externals/gridflow/doc/format/openx11-icon.png
deleted file mode 100644
index 83aa5a69..00000000
--- a/externals/gridflow/doc/format/openx11-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/format/png-icon.png b/externals/gridflow/doc/format/png-icon.png
deleted file mode 100644
index d055ce24..00000000
--- a/externals/gridflow/doc/format/png-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/format/quartz-icon.png b/externals/gridflow/doc/format/quartz-icon.png
deleted file mode 100644
index 943d9161..00000000
--- a/externals/gridflow/doc/format/quartz-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/format/quicktime-icon.png b/externals/gridflow/doc/format/quicktime-icon.png
deleted file mode 100644
index 999e13aa..00000000
--- a/externals/gridflow/doc/format/quicktime-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/format/sdl-icon.png b/externals/gridflow/doc/format/sdl-icon.png
deleted file mode 100644
index 959d2e8e..00000000
--- a/externals/gridflow/doc/format/sdl-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/format/videodev-icon.png b/externals/gridflow/doc/format/videodev-icon.png
deleted file mode 100644
index cd5b30d8..00000000
--- a/externals/gridflow/doc/format/videodev-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/format/window-icon.png b/externals/gridflow/doc/format/window-icon.png
deleted file mode 100644
index aab7d110..00000000
--- a/externals/gridflow/doc/format/window-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/format/window2-icon.png b/externals/gridflow/doc/format/window2-icon.png
deleted file mode 100644
index 54c925e1..00000000
--- a/externals/gridflow/doc/format/window2-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/gridflow.css b/externals/gridflow/doc/gridflow.css
deleted file mode 100644
index eae50bfa..00000000
--- a/externals/gridflow/doc/gridflow.css
+++ /dev/null
@@ -1,15 +0,0 @@
-P {color:#000000; font-family: Arial, Helvetica, sans-serif; font-size:12px;}
-B {color:#336699;}
-A {color:#003366; font-family: Arial, Helvetica, sans-serif;}
-A:link {color:#003366;}
-A:active {color:#336699;}
-A:visited {color:#336699;}
-BODY {background-color:#FFFFFF;}
-H1 {color:#336699; font-family: Arial, Helvetica, sans-serif;}
-H2 {color:#336699; font-family: Arial, Helvetica, sans-serif;}
-H3 {color:#336699; font-family: Arial, Helvetica, sans-serif;}
-H4 {color:#004060; font-family: Arial, Helvetica, sans-serif;; font-size: 16px}
-H5 {color:#004060; font-family: Arial, Helvetica, sans-serif;; font-size: 16px}
-LI {font-family: Arial, Helvetica, sans-serif;}
-.text {font-family: Arial, Helvetica, sans-serif; font-size:10px;; background-color: #FFFFFF}h5 { color:#336699; font-family: Arial, Helvetica, sans-serif; ; font-size: 14px}
-dt { font-weight: bold; color: #006699}
diff --git a/externals/gridflow/doc/images/black.png b/externals/gridflow/doc/images/black.png
deleted file mode 100644
index ce34e740..00000000
--- a/externals/gridflow/doc/images/black.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/images/crop_icons b/externals/gridflow/doc/images/crop_icons
deleted file mode 100644
index 4aa06499..00000000
--- a/externals/gridflow/doc/images/crop_icons
+++ /dev/null
@@ -1,12 +0,0 @@
-if [ "z$1" = "zall" ]; then
- foo="\@*.png format*.png"
-else
- foo="$1"
-fi
-
-for z in $foo; do \
- echo $z
- pngtopnm $z | pnmcrop | pnmtopng -background black -transparent =red -compress 9 > $z.new
- mv $z.new $z
-done
-
diff --git a/externals/gridflow/doc/images/pingpong.png b/externals/gridflow/doc/images/pingpong.png
deleted file mode 100644
index 949ddd02..00000000
--- a/externals/gridflow/doc/images/pingpong.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/images/see_screenshot.png b/externals/gridflow/doc/images/see_screenshot.png
deleted file mode 100644
index 821f3c65..00000000
--- a/externals/gridflow/doc/images/see_screenshot.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/images/titre_gridflow.png b/externals/gridflow/doc/images/titre_gridflow.png
deleted file mode 100644
index 049857a8..00000000
--- a/externals/gridflow/doc/images/titre_gridflow.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/index.html b/externals/gridflow/doc/index.html
deleted file mode 100644
index d223442b..00000000
--- a/externals/gridflow/doc/index.html
+++ /dev/null
@@ -1,149 +0,0 @@
-<html>
-<head>
-<title>GridFlow 0.8.0</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<link rel="stylesheet" href="gridflow.css" type="text/css">
-</head>
-
-<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
-<br>
-<table width="100%" border="0" cellspacing="5">
- <tr><td colspan="4" bgcolor="#082069">
- <img src="images/titre_gridflow.png" width="253" height="23"></td></tr>
-
- <tr>
- <td rowspan="2" width="14%">&nbsp;</td>
- <td colspan="2" width="100%">&nbsp;</td>
- <td rowspan="10" width="12%">&nbsp;</td>
- </tr>
-
- <tr>
- <td colspan="2">
- <p>
- a multi-dimensional dataflow processing library
- for PureData and Ruby, specialized in image and video<br>
- </p>
- </td>
- </tr>
-
- <tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black"><img src="images/black.png" width="1" height="2"></td></tr>
- <tr><td colspan="3" height="16">
- <h4>GridFlow 0.8.0 - documentation index</h4>
- </td></tr>
-
- <tr>
- <td width="14%" rowspan=2>&nbsp;</td>
- <td colspan="2"><ul>
- <li><a href="license.html">License</a></li>
- <li><a href="introduction.html">Introduction</a></li>
- <li><a href="install.html">Installation</a></li>
- <li><a href="architecture.html">Reference Manual: Architecture and Concepts</a></li>
- <li><a href="reference.html">Reference Manual: Flow Classes</a></li>
- <li><a href="format.html">Reference Manual: Format Handlers</a></li>
- <li><a href="internals.html">Reference Manual: C++/Ruby Internals</a></li>
- <li><a href="profiling.html">Profiling</a></li>
- <!-- <p> <a href="project_policy.html">Project Policy</a></p> -->
- </ul></td></tr>
-
- <tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black"><img src="images/black.png" width="1" height="2"></td></tr>
- <tr><td colspan="4"><h4>GridFlow On The Net</h4></td></tr>
- <tr><td rowspan=2>&nbsp;</td><td><ul>
- <li><a href="http://gridflow.ca/latest">
- Browse GridFlow documentation and source code on the web
- </a></li>
- <li><a href="http://www.artengine.ca/gridflow/download">
- Download GridFlow and related files
- </a></li>
- <li>Or checkout using the CVS protocol (no password):
- <kbd>cvs -d :pserver:anonymous@artengine.ca:/home/cvs/gridflow checkout .</kbd>
- </li>
- <li><a href="http://www.artengine.ca/viewcvs/gridflow/">
- Browse GridFlow CVS on the Web
- </a></li>
- <li><a href="http://artengine.ca/~tiki/tiki-view_faq.php?faqId=1">
- GridFlow Frequently Asked Questions (on wiki)
- </a></li>
- <li>Mailing Lists (Subscription and Archives): <ul>
- <li><a href="http://ns.artengine.ca/mailman/listinfo/gridflow-dev">
- <kbd>gridflow-dev</kbd>: GridFlow Contributors
- </a></li>
- <li><a href="http://ns.artengine.ca/mailman/listinfo/gridflow-cvs">
- <kbd>gridflow-cvs</kbd>: GridFlow CVS Reports
- </a></li>
- <li><a href="http://ns.artengine.ca/mailman/listinfo/pdmtl">
- <kbd>pdmtl</kbd>: PureData Montr&eacute;al Users Group
- </a></li>
- </ul>
- <li><a href="http://www.puredata.org">PureData Community Site</a></li>
- <li><a href="http://www.ruby-lang.org/">Ruby Home Page</a></li>
- <li>
- Join us on IRC at
- <table bgcolor="black" border="0"><tr><td>
- <table bgcolor="white" border="0" cellpadding="4" cellspacing="1">
- <tr><td width=1><b>host</b></td><td width=1><kbd>irc.freenode.net</kbd></td></tr>
- <tr><td><b>port</b></td><td><kbd>6667</kbd></td></tr>
- <tr><td><b>channel</b></td><td><kbd>#dataflow</kbd></td></tr>
- </table>
- </table>
- </li>
-
- <li>See also :
- <ul>
- <li>Danks/Geiger/Zm&ouml;lnig's <a href="http://GEM.iem.at/GEM">GEM (video plugin for PureData)</a>
- </li>
- <li>Tom Schouten's <a href="http://zwizwa.fartit.com/pd/">PDP (video plugin for PureData)</a></li>
- <li><a href="http://www.opendragon.ca/">OpenDragon (externals collection for Max)</a></li>
- <li>NATO (QuickTime library wrapper for Max)</li>
- <li>David Rokeby's SoftVNS (for Max)</li>
- <li>JKClayton/Cycling74's
- <a href="http://www.cycling74.com/products/jitter.html">Jitter (for Max)</a></li>
- <li>APL (Array Programming Language)</li>
- <li>J (modern APL)</li>
- <li><a href="http://pdl.perl.org/">PDL (APL for Perl)</a></li>
- <li>Ruby NArray:
- <a href="http://www.ir.isas.ac.jp/~masa/ruby/index.html">japanese page</a>;
- <a href="http://www.ir.isas.ac.jp/~masa/ruby/index-e.html">english page</a></li>
- <li><a href="http://www.gstreamer.net/">gstreamer (video for Gnome/Kde)</a></li>
- <li><a href="http://www.arts-project.org/">aRts (audio for Kde)</a></li>
- <li><a href="http://www.dai.ed.ac.uk/HIPR2/wksheets.htm">
- Image Processing Operator Worksheets</a></li>
- <li><a href="http://freej.dyne.org/">FreeJ</a></li>
- </ul>
-
-</ul></li>
- <tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black"><img src="images/black.png" width="1" height="2"></td></tr>
- <tr><td colspan="4"><h4>Credits</h4></td></tr>
- <tr><td rowspan=2>&nbsp;</td><td>
-
- C++/Ruby Programming : Mathieu Bouchard<br>
- Pd Examples : Mathieu Bouchard, Alexandre Castonguay<br>
- MacOS 10 version : Mathieu Bouchard, James Tittle, Adam Lindsay<br>
- Windows version (upcoming) : Carmen Rocco<br>
-
- <tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black"><img src="images/black.png" width="1" height="2"></td></tr>
- <tr><td colspan="4"><h4>Sponsors</h4></td></tr>
- <tr><td rowspan=2>&nbsp;</td><td>
-
- <p>GridFlow is sponsored by
- <a href="http://www.artengine.org">Artengine</a></p>
-
- <p>Development of GridFlow 0.3.0 - 0.5.0 was made possible in part by a grant from the
- <a href="http://www.hrdc-drhc.gc.ca/">HRDC</a> to <a href="http://www.artengine.org">Artengine</a></p>
-
- <tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black"><img src="images/black.png" width="1" height="2"></td></tr>
-
- <tr><td colspan="4">
- <p><font size="-1">GridFlow 0.8.0 Documentation<br>
- by Mathieu Bouchard <a href="mailto:matju@sympatico.ca">matju@sympatico.ca</a>
- and<br>
- Alexandre Castonguay <a href="mailto:acastonguay@artengine.ca">acastonguay@artengine.ca</a></font></p>
- </td>
- </tr>
-</table>
-</body>
-</html>
diff --git a/externals/gridflow/doc/install.html b/externals/gridflow/doc/install.html
deleted file mode 100644
index 6127c79c..00000000
--- a/externals/gridflow/doc/install.html
+++ /dev/null
@@ -1,122 +0,0 @@
-<html><head>
-<!-- $Id: install.html,v 1.2 2006-03-15 04:44:50 matju Exp $ -->
-<title>GridFlow 0.8.1 - Installation</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<link rel="stylesheet" href="gridflow.css" type="text/css">
-</head>
-<body bgcolor="#FFFFFF"
- leftmargin="0" topmargin="0"
- marginwidth="0" marginheight="0">
-<table width="100%" bgcolor="white" border="0" cellspacing="2">
-<tr><td colspan="4" bgcolor="#082069">
-<img src="images/titre_gridflow.png" width="253" height="23">
-</td></tr><tr><td>&nbsp;</td></tr>
-<tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4" height="16">
- <h4>GridFlow 0.8.1 - Installation</h4>
-</td></tr>
-<tr>
- <td width="5%" rowspan="2">&nbsp;</td>
- <td width="15%" height="23">&nbsp;</td>
- <td width="80%" height="23">&nbsp;</td>
- <td width="5%" height="23">&nbsp;</td>
-</tr>
-<tr><td colspan="2"><div cols="1"><h4><a href="#Hardware_and_Software_you_Probably_Need">Hardware and Software you Probably Need</a></h4><ul>
-</ul>
-<h4><a href="#Downloading_from_CVS">Downloading from CVS</a></h4><ul>
-</ul>
-<h4><a href="#Installation_instructions_(incl._compilation)">Installation instructions (incl. compilation)</a></h4><ul>
-</ul>
-<h4><a href="#Other_Tips">Other Tips</a></h4><ul>
-</ul>
-<br><br>
-</div></td></tr> <tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="Hardware_and_Software_you_Probably_Need"></a><h4>Hardware and Software you Probably Need</h4></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>Required Computer/Processor (one of...):<ul> <li><b>1</b> : PC : AMD K6/K7/K8 or Intel P2/P3/P4 (absolute minimum is 386)</li> <li><b>2</b> : Macintosh : G3/G4/G5</li> <li><b>3</b> : Corel NetWinder : StrongARM V4L</li> <li><b>4</b> : HP iPaq : some processor that works like the NetWinder</li> <li><b>5</b> : could work on SiliconGraphics and SPARCstation with a little nurture.</li> </ul></p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>Required OS (one of...):<ul> <li><b>1</b> : Linux (most any variant) (recommended)</li> <li><b>2</b> : MacOS 10.2 or later (experimental)</li> <li><b>3</b> : Windows with MinGW (very experimental)</li> </ul></p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>Required Software:<ul> <li><b>1</b> : Ruby 1.6.6 or more recent (1.8.0 recommended) (make sure you have the *.so and *.h files)
- (on MacOS you may have to remove or hide the existing one and install a more complete package)</li> </ul></p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>Dataflow Software :<ul> <li><b>1</b> : PureData 0.36 or later (recommended)</li> </ul></p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>Multimedia Components (optional):<ul> <li><b>1</b> : libSDL (Simple Directmedia Layer)</li> <li><b>2</b> : libjpeg</li> <li><b>3</b> : libpng</li> <li><b>4</b> : libmpeg3 (.mpg reader, HeroineWarrior's)</li> <li><b>5</b> : libquicktime (.mov reader/writer, Burkhard Plaum's or HeroineWarrior's) </li> <li><b>6</b> : libmpeg (.mpg reader, Greg Ward's, old)</li> <li><b>7</b> : Apple QuickTime (.mov reader/writer)</li> <li><b>8</b> : Ascii Art Library (aalib)</li> <li><b>9</b> : PCI video digitizer card (and Video4linux 1 driver)</li> <li><b>10</b> : USB camera (and Video4linux 1 driver)</li> </ul></p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>Developer Tools (roll-your-own):<ul> <li><b>1</b> : GNU C++ Compiler (gcc/g++) version 3.x or maybe 2.95</li> <li><b>2</b> : GNU Make (gmake)</li> <li><b>3</b> : CVS (for upgrading/collaboration)</li> <li><b>4</b> : Ruby library "xmlparser" (optional, for editing documentation)</li> <li><b>5</b> : Developer Tools CD dec 2002 (if MacOS 10.2)</li> <li><b>6</b> : XCODE (if MacOS 10.3)</li> <li><b>7</b> : FINK (if MacOS 10)</li> </ul></p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>NOTE: Apparently GCC 2.x has problems dealing with *.a components; if that
-affects you, use *.so files instead.</p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="Downloading_from_CVS"></a><h4>Downloading from CVS</h4></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>The CVS has the absolute latest version of GridFlow, but it's not guaranteed to be working, whereas
-the actual releases are more tested.</p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>However you may have various reasons to use the CVS edition, so here's how:</p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>Make sure you have the <kbd><font color="#007777">cvs</font></kbd> program installed.</p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p><kbd><font color="#007777">mkdir -p ~/src/gridflow</font></kbd> (make a directory; it could be called otherwise if you like)</p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p><kbd><font color="#007777">cd ~/src/gridflow</font></kbd> (go in that directory)</p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p><kbd><font color="#007777">cvs -d :pserver:anonymous@cvs.gridflow.ca:/home/cvs/gridflow login</font></kbd> (the password is blank)</p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p><kbd><font color="#007777">cvs -d :pserver:anonymous@cvs.gridflow.ca:/home/cvs/gridflow checkout .</font></kbd> (download the first time)</p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>And the subsequent times, you only do this:</p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p><kbd><font color="#007777">cd ~/src/gridflow</font></kbd></p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p><kbd><font color="#007777">cvs update -dP</font></kbd></p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="Installation_instructions_(incl._compilation)"></a><h4>Installation instructions (incl. compilation)</h4></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><ul> <li><b>1</b> : Install Ruby. Make sure it contains <kbd><font color="#007777">ruby.h</font></kbd> and <kbd><font color="#007777">intern.h</font></kbd> and related files. It's also
-recommended to have <kbd><font color="#007777">libruby.so</font></kbd>. Those extra files may be in a package called <kbd><font color="#007777">ruby-dev</font></kbd>
-if you are using RPM or DEB/FINK. If you are building Ruby yourself, it's better to configure ruby with <kbd><font color="#007777">--enable-shared</font></kbd>. If you install into a system directory, you may have to run <kbd><font color="#007777">ldconfig</font></kbd>
-after installing Ruby.</li> <li><b>2</b> : Download GridFlow from the website and uncompress it, or get it from the CVS server.</li> <li><b>3</b> : Run <kbd><font color="#007777">./configure</font></kbd> from the <kbd><font color="#007777">gridflow</font></kbd> directory. Make sure it detects all the components
-you want to use with GridFlow. In MacOS you would normally use FINK to install: <kbd><font color="#007777">libjpeg libjpeg-shlibs libpng-shlibs libpng3 libpng3-shlibs libmpeg libmpeg-shlibs</font></kbd> </li> <li><b>4</b> : Note: you may have to set <kbd><font color="#007777">CPLUS_INCLUDE_PATH</font></kbd> to indicate where to find *.h files, and you
-may have to set both <kbd><font color="#007777">LIBRARY_PATH</font></kbd> and <kbd><font color="#007777">LD_LIBRARY_PATH</font></kbd> to indicate where to find
-*.so or *.aor *.dylib or *.bundle or *.dll or *.lib files.</li> <li><b>5</b> : Note: you can do <kbd><font color="#007777">./configure --help</font></kbd> to get a list of supported
-options. You can use them to ignore the presence of troublesome libraries
-and select debugging level. With <kbd><font color="#007777">--use-compiler</font></kbd> you should use a version of <kbd><font color="#007777">g++</font></kbd>, not
-directly a version of <kbd><font color="#007777">gcc</font></kbd>, else you get <kbd><font color="#007777">undefined symbol</font></kbd> problems. Some versions of gcc/g++
-are troublesome.</li> <li><b>6</b> : Run <kbd><font color="#007777">make</font></kbd> to produce the executables <kbd><font color="#007777">gridflow.so</font></kbd> and <kbd><font color="#007777">gridflow.pd_linux</font></kbd> or similar</li> <li><b>7</b> : Run <kbd><font color="#007777">make install</font></kbd> to copy those executables and related files to their final locations.</li> <li><b>8</b> : Run <kbd><font color="#007777">make test</font></kbd> just to verify that GridFlow isn't working too bad.</li> <li><b>9</b> : With a text editor, create <kbd><font color="#007777">~/.gridflow_startup</font></kbd> and write something like <kbd><font color="#007777">GridFlow.data_path &lt;&lt; "/home/myself/gridflow/images"</font></kbd> to tell GridFlow where to find the
-images used in the examples. You may add more lines like that one if you have folders containing images
-or movies you want to use with GridFlow.</li> <li><b>10</b> : Loading GridFlow:<ul> <li><b>1</b> : PureData : With a text editor, modify or create <kbd><font color="#007777">~/.pdrc</font></kbd> and write <kbd><font color="#007777">-lib gridflow</font></kbd>. </li> <li><b>2</b> : ImpureData : In the ".pdrc editor", add <kbd><font color="#007777">gridflow</font></kbd> to the list of libraries.</li> <li><b>3</b> : plain Ruby : the command <kbd><font color="#007777">require "gridflow"</font></kbd> will load gridflow.so.</li> </ul>
-Note that on MacOS the dot-files are invisible in the Finder but you do <kbd><font color="#007777">cd ~/Desktop; ln -s ../.pdrc "PureData Configuration"</font></kbd> to make an alias on the Desktop.
-Note also that on Windows the dot-files are even more trouble.</li> </ul></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="Other_Tips"></a><h4>Other Tips</h4></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><ul> <li><b>1</b> : you just did a CVS update and now the program does not compile, or
-crashes, or changes didn't go through. <ul> <li><b>1</b> : Did you forget the "make install" step?</li> <li><b>2</b> : If a new directory is created, you need to do <kbd><font color="#007777">cvs update -d</font></kbd>.
- Many people just add that option to their configuration of the CVS software.</li> <li><b>3</b> : When some kinds of changes have happened, you may have to rerun the <kbd><font color="#007777">configure</font></kbd>
- program before redoing <kbd><font color="#007777">make</font></kbd>. If you had previously reconfigured with specific options,
- don't forget to use them again in this case.</li> <li><b>4</b> : Maybe matju forgot to upload part of an important change. Tell him.</li> </ul></li> <li><b>2</b> : PureData Crashing: <ul> <li><b>1</b> : you can start the debugger like <kbd><font color="#007777">gdb `which pd` core.24255</font></kbd> where the latter part
- is the name of a RAM dump file. You can enable those dumps using the shell command <kbd><font color="#007777">ulimit -c unlimited</font></kbd>. To avoid dumping, you can also start Pd from within the debugger
- using <kbd><font color="#007777">gdb `which pd`</font></kbd> then <kbd><font color="#007777">run</font></kbd> then cause the crash.</li> <li><b>2</b> : In GDB, after a crash, you can use the <kbd><font color="#007777">where</font></kbd> to find out what Pd was doing at the moment
- of the crash. If instead Pd is frozen, you can force it to crash using Ctrl+C in the terminal. </li> <li><b>3</b> : To quit GDB use the <kbd><font color="#007777">quit</font></kbd> command. (really.)</li> </ul></li> </ul></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td>&nbsp;</td></tr>
- <td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4">
-<p><font size="-1">
-GridFlow 0.8.1 Documentation<br>
-Copyright &copy; 2001,2002,2003,2004,2005,2006 by Mathieu Bouchard
-<a href="mailto:matju@artengine.ca">matju@artengine.ca</a>
-</font></p>
-</td></tr></table></body></html>
-
-
diff --git a/externals/gridflow/doc/install.xml b/externals/gridflow/doc/install.xml
deleted file mode 100644
index e1f1c434..00000000
--- a/externals/gridflow/doc/install.xml
+++ /dev/null
@@ -1,140 +0,0 @@
-<?xml version="1.0" standalone="no" ?>
-<!DOCTYPE documentation SYSTEM 'jmax.dtd'>
-<documentation title="Installation">
-<!-- $Id: install.xml,v 1.2 2006-03-15 04:44:50 matju Exp $ -->
-<!--
- GridFlow Installation
- Copyright (c) 2001,2002,2003,2004,2005 by Mathieu Bouchard
--->
-<section name="Hardware and Software you Probably Need">
-<p>Required Computer/Processor (one of...):<list>
- <li>PC : AMD K6/K7/K8 or Intel P2/P3/P4 (absolute minimum is 386)</li>
- <li>Macintosh : G3/G4/G5</li>
- <li>Corel NetWinder : StrongARM V4L</li>
- <li>HP iPaq : some processor that works like the NetWinder</li>
- <li>could work on SiliconGraphics and SPARCstation with a little nurture.</li>
-</list></p>
-<p>Required OS (one of...):<list>
- <li>Linux (most any variant) (recommended)</li>
- <li>MacOS 10.2 or later (experimental)</li>
- <li>Windows with MinGW (very experimental)</li>
-</list></p>
-<p>Required Software:<list>
- <li>Ruby 1.6.6 or more recent (1.8.0 recommended) (make sure you have the *.so and *.h files)
- (on MacOS you may have to remove or hide the existing one and install a more complete package)</li>
-</list></p>
-<p>Dataflow Software :<list>
- <li>PureData 0.36 or later (recommended)</li>
-</list></p>
-<p>Multimedia Components (optional):<list>
- <li>libSDL (Simple Directmedia Layer)</li>
- <li>libjpeg</li>
- <li>libpng</li>
- <li>libmpeg3 (.mpg reader, HeroineWarrior's)</li>
- <li>libquicktime (.mov reader/writer, Burkhard Plaum's or HeroineWarrior's) </li>
- <li>libmpeg (.mpg reader, Greg Ward's, old)</li>
- <li>Apple QuickTime (.mov reader/writer)</li>
- <li>Ascii Art Library (aalib)</li>
- <li>PCI video digitizer card (and Video4linux 1 driver)</li>
- <li>USB camera (and Video4linux 1 driver)</li>
-</list></p>
-<p>Developer Tools (roll-your-own):<list>
- <li>GNU C++ Compiler (gcc/g++) version 3.x or maybe 2.95</li>
- <li>GNU Make (gmake)</li>
- <li>CVS (for upgrading/collaboration)</li>
- <li>Ruby library "xmlparser" (optional, for editing documentation)</li>
- <li>Developer Tools CD dec 2002 (if MacOS 10.2)</li>
- <li>XCODE (if MacOS 10.3)</li>
- <li>FINK (if MacOS 10)</li>
-</list></p>
-<p>NOTE: Apparently GCC 2.x has problems dealing with *.a components; if that
-affects you, use *.so files instead.</p>
-</section>
-
-<section name="Downloading from CVS">
-<p>The CVS has the absolute latest version of GridFlow, but it's not guaranteed to be working, whereas
-the actual releases are more tested.</p>
-<p>However you may have various reasons to use the CVS edition, so here's how:</p>
-<p>Make sure you have the <k>cvs</k> program installed.</p>
-<p><k>mkdir -p ~/src/gridflow</k> (make a directory; it could be called otherwise if you like)</p>
-<p><k>cd ~/src/gridflow</k> (go in that directory)</p>
-<p><k>cvs -d :pserver:anonymous@cvs.gridflow.ca:/home/cvs/gridflow login</k> (the password is blank)</p>
-<p><k>cvs -d :pserver:anonymous@cvs.gridflow.ca:/home/cvs/gridflow checkout .</k> (download the first time)</p>
-<p>And the subsequent times, you only do this:</p>
-<p><k>cd ~/src/gridflow</k></p>
-<p><k>cvs update -dP</k></p>
-</section>
-
-<section name="Installation instructions (incl. compilation)">
-<list>
-<li>Install Ruby. Make sure it contains <k>ruby.h</k> and <k>intern.h</k> and related files. It's also
-recommended to have <k>libruby.so</k>. Those extra files may be in a package called <k>ruby-dev</k>
-if you are using RPM or DEB/FINK. If you are building Ruby yourself, it's better to configure ruby with
-<k>--enable-shared</k>. If you install into a system directory, you may have to run <k>ldconfig</k>
-after installing Ruby.</li>
-
-<li>Download GridFlow from the website and uncompress it, or get it from the CVS server.</li>
-
-<li>Run <k>./configure</k> from the <k>gridflow</k> directory. Make sure it detects all the components
-you want to use with GridFlow. In MacOS you would normally use FINK to install:
- <k>libjpeg libjpeg-shlibs libpng-shlibs libpng3 libpng3-shlibs libmpeg libmpeg-shlibs</k>
-</li>
-
-<li>Note: you may have to set <k>CPLUS_INCLUDE_PATH</k> to indicate where to find *.h files, and you
-may have to set both <k>LIBRARY_PATH</k> and <k>LD_LIBRARY_PATH</k> to indicate where to find
-*.so or *.aor *.dylib or *.bundle or *.dll or *.lib files.</li>
-
-<li>Note: you can do <k>./configure --help</k> to get a list of supported
-options. You can use them to ignore the presence of troublesome libraries
-and select debugging level. With <k>--use-compiler</k> you should use a version of <k>g++</k>, not
-directly a version of <k>gcc</k>, else you get <k>undefined symbol</k> problems. Some versions of gcc/g++
-are troublesome.</li>
-
-<li>Run <k>make</k> to produce the executables <k>gridflow.so</k> and <k>gridflow.pd_linux</k> or similar</li>
-<li>Run <k>make install</k> to copy those executables and related files to their final locations.</li>
-<li>Run <k>make test</k> just to verify that GridFlow isn't working too bad.</li>
-<li>With a text editor, create <k>~/.gridflow_startup</k> and write something like
-<k>GridFlow.data_path &lt;&lt; "/home/myself/gridflow/images"</k> to tell GridFlow where to find the
-images used in the examples. You may add more lines like that one if you have folders containing images
-or movies you want to use with GridFlow.</li>
-<li>Loading GridFlow:<list>
- <li>PureData : With a text editor, modify or create <k>~/.pdrc</k> and write <k>-lib gridflow</k>. </li>
- <li>ImpureData : In the ".pdrc editor", add <k>gridflow</k> to the list of libraries.</li>
- <li>plain Ruby : the command <k>require "gridflow"</k> will load gridflow.so.</li>
-</list>
-Note that on MacOS the dot-files are invisible in the Finder but you do
-<k>cd ~/Desktop; ln -s ../.pdrc "PureData Configuration"</k> to make an alias on the Desktop.
-Note also that on Windows the dot-files are even more trouble.</li>
-</list>
-</section>
-
-<section name="Other Tips">
-<list>
-
-<li>you just did a CVS update and now the program does not compile, or
-crashes, or changes didn't go through.
- <list>
- <li>Did you forget the "make install" step?</li>
- <li>If a new directory is created, you need to do <k>cvs update -d</k>.
- Many people just add that option to their configuration of the CVS software.</li>
- <li>When some kinds of changes have happened, you may have to rerun the <k>configure</k>
- program before redoing <k>make</k>. If you had previously reconfigured with specific options,
- don't forget to use them again in this case.</li>
- <li>Maybe matju forgot to upload part of an important change. Tell him.</li>
- </list></li>
-
-
-<li>PureData Crashing:
- <list>
- <li>you can start the debugger like <k>gdb `which pd` core.24255</k> where the latter part
- is the name of a RAM dump file. You can enable those dumps using the shell command
- <k>ulimit -c unlimited</k>. To avoid dumping, you can also start Pd from within the debugger
- using <k>gdb `which pd`</k> then <k>run</k> then cause the crash.</li>
- <li>In GDB, after a crash, you can use the <k>where</k> to find out what Pd was doing at the moment
- of the crash. If instead Pd is frozen, you can force it to crash using Ctrl+C in the terminal.
- </li>
- <li>To quit GDB use the <k>quit</k> command. (really.)</li>
-</list></li>
-</list>
-</section>
-</documentation>
diff --git a/externals/gridflow/doc/internals.html b/externals/gridflow/doc/internals.html
deleted file mode 100644
index 4a2e7978..00000000
--- a/externals/gridflow/doc/internals.html
+++ /dev/null
@@ -1,206 +0,0 @@
-<html><head>
-<!-- $Id: internals.html,v 1.2 2006-03-15 04:44:50 matju Exp $ -->
-<title>GridFlow 0.8.1 - C++/Ruby Internals</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<link rel="stylesheet" href="gridflow.css" type="text/css">
-</head>
-<body bgcolor="#FFFFFF"
- leftmargin="0" topmargin="0"
- marginwidth="0" marginheight="0">
-<table width="100%" bgcolor="white" border="0" cellspacing="2">
-<tr><td colspan="4" bgcolor="#082069">
-<img src="images/titre_gridflow.png" width="253" height="23">
-</td></tr><tr><td>&nbsp;</td></tr>
-<tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4" height="16">
- <h4>GridFlow 0.8.1 - C++/Ruby Internals</h4>
-</td></tr>
-<tr>
- <td width="5%" rowspan="2">&nbsp;</td>
- <td width="15%" height="23">&nbsp;</td>
- <td width="80%" height="23">&nbsp;</td>
- <td width="5%" height="23">&nbsp;</td>
-</tr>
-<tr><td colspan="2"><div cols="1"><h4><a href="#notes">notes</a></h4><ul>
-</ul>
-<h4><a href="#Objects_for_Scripting">Objects for Scripting</a></h4><ul>
-<li><a href="#ruby class FObject extending Data"><img src="flow_classes/ruby class FObject extending Data-icon.png" alt="[ruby class FObject extending Data]" border="0"></a></li>
-<li><a href="#ruby class GridObject extending FObject"><img src="flow_classes/ruby class GridObject extending FObject-icon.png" alt="[ruby class GridObject extending FObject]" border="0"></a></li>
-<li><a href="#ruby class BitPacking"><img src="flow_classes/ruby class BitPacking-icon.png" alt="[ruby class BitPacking]" border="0"></a></li>
-<li><a href="#ruby FPatcher extending FObject"><img src="flow_classes/ruby FPatcher extending FObject-icon.png" alt="[ruby FPatcher extending FObject]" border="0"></a></li>
-<li><a href="#ruby GridFlow::USB"><img src="flow_classes/ruby GridFlow::USB-icon.png" alt="[ruby GridFlow::USB]" border="0"></a></li>
-<li><a href="#ruby GridFlow::USB::Device"><img src="flow_classes/ruby GridFlow::USB::Device-icon.png" alt="[ruby GridFlow::USB::Device]" border="0"></a></li>
-<li><a href="#ruby GridFlow::USB::Config"><img src="flow_classes/ruby GridFlow::USB::Config-icon.png" alt="[ruby GridFlow::USB::Config]" border="0"></a></li>
-<li><a href="#ruby GridFlow::USB::Interface"><img src="flow_classes/ruby GridFlow::USB::Interface-icon.png" alt="[ruby GridFlow::USB::Interface]" border="0"></a></li>
-<li><a href="#ruby GridFlow::USB::Endpoint"><img src="flow_classes/ruby GridFlow::USB::Endpoint-icon.png" alt="[ruby GridFlow::USB::Endpoint]" border="0"></a></li>
-</ul>
-<h4><a href="#Objects_for_Internals">Objects for Internals</a></h4><ul>
-<li><a href="#C++ class GridInlet"><img src="flow_classes/C++ class GridInlet-icon.png" alt="[C++ class GridInlet]" border="0"></a></li>
-<li><a href="#C++ class GridOutlet"><img src="flow_classes/C++ class GridOutlet-icon.png" alt="[C++ class GridOutlet]" border="0"></a></li>
-<li><a href="#C++ class Dim"><img src="flow_classes/C++ class Dim-icon.png" alt="[C++ class Dim]" border="0"></a></li>
-<li><a href="#C++ class Grid"><img src="flow_classes/C++ class Grid-icon.png" alt="[C++ class Grid]" border="0"></a></li>
-<li><a href="#C++ class Numop1"><img src="flow_classes/C++ class Numop1-icon.png" alt="[C++ class Numop1]" border="0"></a></li>
-<li><a href="#C++ class Numop2"><img src="flow_classes/C++ class Numop2-icon.png" alt="[C++ class Numop2]" border="0"></a></li>
-<li><a href="#C++ class GridClass"><img src="flow_classes/C++ class GridClass-icon.png" alt="[C++ class GridClass]" border="0"></a></li>
-<li><a href="#C++ class GFBridge"><img src="flow_classes/C++ class GFBridge-icon.png" alt="[C++ class GFBridge]" border="0"></a></li>
-</ul>
-<br><br>
-</div></td></tr> <tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="notes"></a><h4>notes</h4></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>In Ruby, GridFlow defines a namespace (module) called GridFlow. Most of the
-constants it defines are part of that namespace.</p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>Ruby does not have the same concept of object as PD. In GridFlow, object classes may
-inherit features from other object classes, and also there is no concept of inlet nor outlet, which are instead
-provided by <kbd><font color="#007777">GridFlow::FObject</font></kbd>, which also has the purpose of exporting functionality to
-PD.</p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>In this document (and in many others) the phrase "a Potato" will be a shorthand for "an object of the class
-called Potato", which is often used in modern software design and is a nice convention borrowed from
-biology.</p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>
-A FObject is normally in two or three parts: a (Ruby) GridFlow::FObject
-that is the central part; a (C++) FObject; a (C++) BFObject.
-The GridFlow::FObject is created as a RData kind of box (T_DATA)
-using Ruby-C's Data_Make_Struct on a GridObject. This is
-how most Ruby-C programs inherit from Ruby classes. Note that
-Ruby's boxed objects have a maximum of five fields, and they're usually
-taken, so additional fields have to be outside of it. This is why RData exists. </p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>
-So basically you have a C++ FObject that is "part of" a GridFlow::FObject
-and they point to each other using "peer pointers".
- The BFObject links back to the RData box through a pointer called peer. </p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="Objects_for_Scripting"></a><h4>Objects for Scripting</h4></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="ruby class FObject extending Data">ruby class FObject extending Data</a></td></tr><tr><td></td><td valign="top"><br>
-<br clear="left"><br><br><br clear="left"><br></td><td><br>
-
- Provides inlets and outlets to Ruby Objects. <br><b>method</b>&nbsp;init <b>(</b><b>)</b> <br>
- <br><b>method</b>&nbsp;send_in <b>(</b><i>int</i> inlet<b>, </b>message...<b>)</b> <br>
- <br><b>method</b>&nbsp;send_out <b>(</b><i>int</i> outlet<b>, </b>message...<b>)</b> <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="ruby class GridObject extending FObject">ruby class GridObject extending FObject</a></td></tr><tr><td></td><td valign="top"><br>
-<br clear="left"><br><br><br clear="left"><br></td><td><br>
-
- Provides grid support to FObjects. <br><b>method</b>&nbsp;inlet_dim <b>(</b><i>Integer</i> inlet<b>)</b>
- gives an array of Integers (dimension list) <br>
- <br><b>method</b>&nbsp;inlet_nt <b>(</b><i>Integer</i> inlet<b>)</b>
- gives a Symbol (number type) <br>
- <br><b>method</b>&nbsp;inlet_set_factor <b>(</b><i>Integer</i> inlet<b>, </b><i>Integer</i> factor<b>)</b>
- ensures received packets have a size that is
- a whole multiple of this size.
- must be called from rgrid_begin. <br>
- <br><b>method</b>&nbsp;send_out_grid_begin <b>(</b><i>Integer</i> outlet<b>, </b><i>Array of Integer</i> dimensions<b>, </b><i>number type</i> nt<b>)</b>
- establishes grid streams between an outlet and all inlets
- connected to it. <br>
- <br><b>method</b>&nbsp;send_out_grid_flow <b>(</b><i>Integer</i> outlet<b>, </b><i>String</i> data<b>)</b>
- for sending a grid data packet through that outlet. <br>
- <br><b>method</b>&nbsp;send_out_grid_end <b>(</b><i>Integer</i> outlet<b>)</b>
- (isn't this one obsolete?) <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;rgrid_begin <b>(</b><b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;rgrid_flow <b>(</b><i>String</i> data<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;rgrid_end <b>(</b><b>)</b> <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="ruby class BitPacking">ruby class BitPacking</a></td></tr><tr><td></td><td valign="top"><br>
-<br clear="left"><br><br><br clear="left"><br></td><td><br>
-
- A BitPacking is a simple two-way converter between different
- numeric layouts. <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="ruby FPatcher extending FObject">ruby FPatcher extending FObject</a></td></tr><tr><td></td><td valign="top"><br>
-<br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>This class is much like PureData's abstractions.</p> <p>This is a container for objects. Its proper objects are numbered
- starting with zero. The wire list is given in terms of those numbers:
- (sourceobject,sourceinlet,destobject,destinlet). There is a
- pseudo-object numbered #-1 which map to the container's own inlets
- and outlets.</p> <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="ruby GridFlow::USB">ruby GridFlow::USB</a></td></tr><tr><td></td><td valign="top"><br>
-<br clear="left"><br><br><br clear="left"><br></td><td><br>
-<p>wrapper for struct usb_dev_handle</p> <br><b>attr</b>&nbsp;.busses <b>(</b><b>.busses</b><b>)</b> <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="ruby GridFlow::USB::Device">ruby GridFlow::USB::Device</a></td></tr><tr><td></td><td valign="top"><br>
-<br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>wrapper for struct usb_device and struct usb_device_descriptor</p> <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="ruby GridFlow::USB::Config">ruby GridFlow::USB::Config</a></td></tr><tr><td></td><td valign="top"><br>
-<br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>wrapper for struct usb_config_descriptor, struct usb_interface</p> <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="ruby GridFlow::USB::Interface">ruby GridFlow::USB::Interface</a></td></tr><tr><td></td><td valign="top"><br>
-<br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>wrapper for struct usb_interface_descriptor</p> <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="ruby GridFlow::USB::Endpoint">ruby GridFlow::USB::Endpoint</a></td></tr><tr><td></td><td valign="top"><br>
-<br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>wrapper for struct usb_endpoint_descriptor</p> <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="Objects_for_Internals"></a><h4>Objects for Internals</h4></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="C++ class GridInlet">C++ class GridInlet</a></td></tr><tr><td></td><td valign="top"><br>
-<br clear="left"><br><br><br clear="left"><br></td><td><br>
-
- GridInlets represent inlets that accept grids. <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="C++ class GridOutlet">C++ class GridOutlet</a></td></tr><tr><td></td><td valign="top"><br>
-<br clear="left"><br><br><br clear="left"><br></td><td><br>
-
- GridOutlets represent outlets that send grids. <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="C++ class Dim">C++ class Dim</a></td></tr><tr><td></td><td valign="top"><br>
-<br clear="left"><br><br><br clear="left"><br></td><td><br>
-
- Dim represents a list of dimensions. <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="C++ class Grid">C++ class Grid</a></td></tr><tr><td></td><td valign="top"><br>
-<br clear="left"><br><br><br clear="left"><br></td><td><br>
-
- Grid represents a grid that is fully stored in memory. <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="C++ class Numop1">C++ class Numop1</a></td></tr><tr><td></td><td valign="top"><br>
-<br clear="left"><br><br><br clear="left"><br></td><td><br>
-
- This represents a one-input operator.
- Such an object contains a map() function that applies the operator
- over a memory segment. <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="C++ class Numop2">C++ class Numop2</a></td></tr><tr><td></td><td valign="top"><br>
-<br clear="left"><br><br><br clear="left"><br></td><td><br>
-
- This represents a two-input operator.
- Such an object contains four functions for each T, where
- T is one of the types uint8, int16, int32, float32. <br><b>method</b>&nbsp;map <b>(</b><i>integer</i> n<b>, </b><i>Pt<T></i> as<b>, </b><i>T</i> b<b>)</b>
- for i in 0...n,
- as[i] := f(as[i],b);
- This is like <kbd><font color="#007777">[#]</font></kbd> with a scalar righthand <br>
- <br><b>method</b>&nbsp;zip <b>(</b><i>integer</i> n<b>, </b><i>Pt<T></i> as<b>, </b><i>Pt<T></i> bs<b>)</b>
- for i in 0...n,
- as[i] := f(as[i],bs[i]);
- bs is not modified.
- (This is like <kbd><font color="#007777">[#]</font></kbd> with a nonscalar righthand) <br>
- <br><b>method</b>&nbsp;fold <b>(</b><i>integer</i> an<b>, </b><i>integer</i> n<b>, </b><i>Pt<T></i> as<b>, </b><i>Pt<T></i> bs<b>)</b> <p>
- for i in 0...n,
- for j in 0...an,
- as[j] := f(as[j],bs[i*an+j]); </p>
- (this is like <kbd><font color="#007777">[#fold]</font></kbd>) <br>
- <br><b>method</b>&nbsp;scan <b>(</b><i>integer</i> an<b>, </b><i>integer</i> n<b>, </b><i>Pt<T></i> as<b>, </b><i>Pt<T></i> bs<b>)</b> <p> for j in 0...an: bs[j] := f(as[j],bs[j]); </p> <p> for i in 1...n: for j in 0...an:
- bs[j] := f(bs[(i-1)*an+j],bs[i*an+j]); </p>
- (this is like <kbd><font color="#007777">[#scan]</font></kbd>) <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="C++ class GridClass">C++ class GridClass</a></td></tr><tr><td></td><td valign="top"><br>
-<br clear="left"><br><br><br clear="left"><br></td><td><br>
-
- This represents a class of GridObjects. <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="C++ class GFBridge">C++ class GFBridge</a></td></tr><tr><td></td><td valign="top"><br>
-<br clear="left"><br><br><br clear="left"><br></td><td><br>
-
- This holds linkage information about PureData. <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td>&nbsp;</td></tr>
- <td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4">
-<p><font size="-1">
-GridFlow 0.8.1 Documentation<br>
-Copyright &copy; 2001,2002,2003,2004,2005,2006 by Mathieu Bouchard
-<a href="mailto:matju@artengine.ca">matju@artengine.ca</a>
-</font></p>
-</td></tr></table></body></html>
-
-
diff --git a/externals/gridflow/doc/internals.xml b/externals/gridflow/doc/internals.xml
deleted file mode 100644
index 952d0507..00000000
--- a/externals/gridflow/doc/internals.xml
+++ /dev/null
@@ -1,228 +0,0 @@
-<?xml version="1.0" standalone="no" ?>
-<!DOCTYPE documentation SYSTEM 'jmax.dtd'>
-<documentation title="C++/Ruby Internals">
-<!-- $Id: internals.xml,v 1.2 2006-03-15 04:44:50 matju Exp $ -->
-<!--
- GridFlow Reference Manual: Internals
- Copyright (c) 2001,2002,2003,2004,2005 by Mathieu Bouchard
--->
-<section name="notes">
-
-<p>In Ruby, GridFlow defines a namespace (module) called GridFlow. Most of the
-constants it defines are part of that namespace.</p>
-<p>Ruby does not have the same concept of object as PD. In GridFlow, object classes may
-inherit features from other object classes, and also there is no concept of inlet nor outlet, which are instead
-provided by <k>GridFlow::FObject</k>, which also has the purpose of exporting functionality to
-PD.</p>
-<p>In this document (and in many others) the phrase "a Potato" will be a shorthand for "an object of the class
-called Potato", which is often used in modern software design and is a nice convention borrowed from
-biology.</p>
-
-<p>
-A FObject is normally in two or three parts: a (Ruby) GridFlow::FObject
-that is the central part; a (C++) FObject; a (C++) BFObject.
-The GridFlow::FObject is created as a RData kind of box (T_DATA)
-using Ruby-C's Data_Make_Struct on a GridObject. This is
-how most Ruby-C programs inherit from Ruby classes. Note that
-Ruby's boxed objects have a maximum of five fields, and they're usually
-taken, so additional fields have to be outside of it. This is why RData exists.
-</p>
-
-<p>
-So basically you have a C++ FObject that is "part of" a GridFlow::FObject
-and they point to each other using "peer pointers".
- The BFObject links back to the RData box through a pointer called peer.
-</p>
-
-</section>
-
-<section name="Objects for Scripting">
- <class name="ruby class FObject extending Data">
- Provides inlets and outlets to Ruby Objects.
-
- <method name="init">
- </method>
-
- <method name="send_in">
- <arg name="inlet" type="int"/>
- <rest name="message"/>
- </method>
-
- <method name="send_out">
- <arg name="outlet" type="int"/>
- <rest name="message"/>
- </method>
-
- </class>
-
- <class name="ruby class GridObject extending FObject">
- Provides grid support to FObjects.
-
- <method name="inlet_dim">
- <arg name="inlet" type="Integer"/>
- gives an array of Integers (dimension list)
- </method>
-
- <method name="inlet_nt">
- <arg name="inlet" type="Integer"/>
- gives a Symbol (number type)
- </method>
-
- <method name="inlet_set_factor">
- <arg name="inlet" type="Integer"/>
- <arg name="factor" type="Integer"/>
- ensures received packets have a size that is
- a whole multiple of this size.
- must be called from rgrid_begin.
- </method>
-
- <method name="send_out_grid_begin">
- <arg name="outlet" type="Integer"/>
- <arg name="dimensions" type="Array of Integer"/>
- <arg name="nt" type="number type" default="int32"/>
- establishes grid streams between an outlet and all inlets
- connected to it.
- </method>
-
- <method name="send_out_grid_flow">
- <arg name="outlet" type="Integer"/>
- <arg name="data" type="String"/>
- for sending a grid data packet through that outlet.
- </method>
-
- <method name="send_out_grid_end">
- <arg name="outlet" type="Integer"/>
- (isn't this one obsolete?)
- </method>
-
- <inlet id="0">
- <method name="rgrid_begin"/>
- <method name="rgrid_flow">
- <arg name="data" type="String"/>
- </method>
- <method name="rgrid_end"/>
- </inlet>
- </class>
-
- <class name="ruby class BitPacking">
- A BitPacking is a simple two-way converter between different
- numeric layouts.
- </class>
-
- <class name="ruby FPatcher extending FObject">
- <p>This class is much like PureData's abstractions.</p>
- <p>This is a container for objects. Its proper objects are numbered
- starting with zero. The wire list is given in terms of those numbers:
- (sourceobject,sourceinlet,destobject,destinlet). There is a
- pseudo-object numbered #-1 which map to the container's own inlets
- and outlets.</p>
- </class>
-
- <class name="ruby GridFlow::USB"><p>wrapper for struct usb_dev_handle</p>
- <attr name=".busses">wrapper for struct usb_bus and usb_get_busses()</attr>
- </class>
-
- <class name="ruby GridFlow::USB::Device">
- <p>wrapper for struct usb_device and struct usb_device_descriptor</p>
- </class>
-
- <class name="ruby GridFlow::USB::Config">
- <p>wrapper for struct usb_config_descriptor, struct usb_interface</p>
- </class>
-
- <class name="ruby GridFlow::USB::Interface">
- <p>wrapper for struct usb_interface_descriptor</p>
- </class>
-
- <class name="ruby GridFlow::USB::Endpoint">
- <p>wrapper for struct usb_endpoint_descriptor</p>
- </class>
-</section>
-
-<section name="Objects for Internals">
- <class name="C++ class GridInlet">
- GridInlets represent inlets that accept grids.
- </class>
-
- <class name="C++ class GridOutlet">
- GridOutlets represent outlets that send grids.
- </class>
-
- <class name="C++ class Dim">
- Dim represents a list of dimensions.
- </class>
-
- <class name="C++ class Grid">
- Grid represents a grid that is fully stored in memory.
- </class>
-
- <class name="C++ class Numop1">
- This represents a one-input operator.
- Such an object contains a map() function that applies the operator
- over a memory segment.
- </class>
-
- <class name="C++ class Numop2">
- This represents a two-input operator.
- Such an object contains four functions for each T, where
- T is one of the types uint8, int16, int32, float32.
-
- <method name="map">
- <arg name="n" type="integer"/>
- <arg name="as" type="Pt&lt;T&gt;"/>
- <arg name="b" type="T"/>
- for i in 0...n,
- as[i] := f(as[i],b);
- This is like <k>[#]</k> with a scalar righthand
- </method>
-
- <method name="zip">
- <arg name="n" type="integer"/>
- <arg name="as" type="Pt&lt;T&gt;"/>
- <arg name="bs" type="Pt&lt;T&gt;"/>
- for i in 0...n,
- as[i] := f(as[i],bs[i]);
- bs is not modified.
- (This is like <k>[#]</k> with a nonscalar righthand)
- </method>
-
- <method name="fold">
- <arg name="an" type="integer"/>
- <arg name="n" type="integer"/>
- <arg name="as" type="Pt&lt;T&gt;"/>
- <arg name="bs" type="Pt&lt;T&gt;"/>
-
- <p>
- for i in 0...n,
- for j in 0...an,
- as[j] := f(as[j],bs[i*an+j]);
- </p>
-
- (this is like <k>[#fold]</k>)
- </method>
-
- <method name="scan">
- <arg name="an" type="integer"/>
- <arg name="n" type="integer"/>
- <arg name="as" type="Pt&lt;T&gt;"/>
- <arg name="bs" type="Pt&lt;T&gt;"/>
-
- <p> for j in 0...an: bs[j] := f(as[j],bs[j]); </p>
- <p> for i in 1...n: for j in 0...an:
- bs[j] := f(bs[(i-1)*an+j],bs[i*an+j]); </p>
-
- (this is like <k>[#scan]</k>)
- </method>
- </class>
-
- <class name="C++ class GridClass">
- This represents a class of GridObjects.
- </class>
-
- <class name="C++ class GFBridge">
- This holds linkage information about PureData.
- </class>
-
-</section>
-
-</documentation>
diff --git a/externals/gridflow/doc/introduction.html b/externals/gridflow/doc/introduction.html
deleted file mode 100644
index 8adf4ead..00000000
--- a/externals/gridflow/doc/introduction.html
+++ /dev/null
@@ -1,125 +0,0 @@
-<html>
-<head>
-<title>GridFlow 0.7.7 - Introduction</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<link rel="stylesheet" href="gridflow.css" type="text/css">
-</head>
-
-<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
-<br>
-<table width="100%" border="0" cellspacing="5">
- <tr><td colspan="4" bgcolor="#082069">
- <img src="images/titre_gridflow.png" width="253" height="23"></td></tr>
-
- <tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black"><img src="images/black.png" width="1" height="2"></td></tr>
-
- <tr><td colspan="3" height="16">
- <h4>GridFlow 0.7.7 - introduction</h4>
- </td></tr>
-
- <tr>
- <td width="12%" height="4">&nbsp;</td>
- <td width="80%" height="4">&nbsp;</td>
- <td width="12%" height="4">&nbsp;</td>
- </tr>
-
- <tr>
- <td width="13%">&nbsp;</td>
- <td width="82%">
-
- <p> The philosophy that guides PureData is a simple but powerful one:
- the software must first provide the user with generic tools
- rather than imposing pre-cooked effects. In other words the user
- should have total freedom.
-
- <p> GridFlow follows that philosophy: it first defines elementary
- mathematical operations. Those can in turn be used as simple
- visual effects or be combined to produce more complex effects.
-
- <p> The strategy followed by most video plugins for PureData, jMax, and MAX/MSP, is
- to provide the user first with constructs for manipulating video
- streams at a fairly high level. The strategy put forward by GridFlow
- is different.
-
- <p> It can be said that in all those video plugins there are three layers:
- the first, the low level, is not accessible to non-programmers (and fairly
- difficult of access even to programmers); the second, mathematical, where
- one needs not to be a C++ programmer, but still requires a good
- understanding of how numbers and pixels and colours and geometry work; and
- a third level that looks more like the software an artist would like to
- use.
-
- <p> In other video plugins there is a fairly low emphasis on the second
- layer. In GridFlow that layer is very strong and opens many possibilities.
- Even though the third layer in GridFlow is not as developed as it could,
- the second layer may be used to produce third-layer object classes much
- more quickly.
-
- <p> GridFlow provides a unifying view of multimedia information. Several
- kinds of data -- raster graphics in any number of channels, coordinate
- transforms, matrices, vectors -- may all be represented by <b>Grids</b>
- (also known as multi-dimensional arrays). Grids exist in several ways: they
- are usually streamed from object to object, but they can also be stored in
- memory, stored into a file, sent through the network.
-
- <p> The new GridFlow (0.6) also provides scripting, which inserts itself
- between the first and second layer to provide additional functionality. The
- language that has been chosen is Ruby, designed by Yukihiro Matsumoto
- during the 90's. This new layer is used for portability between host
- software (PureData vs jMax), for portability between platforms (Windows/Mac
- versions do not exist but would be farther ahead if it wasn't for Ruby),
- for independency from host software (GridFlow can be tested and used
- independently of PureData/jMax), for quick extensibility (you can create
- PureData/jMax object classes directly in GridFlow's configuration file),
- and so on.
-
- <p> In short, GridFlow is a whole new world of possibilities for
- the multimedia artist and programmer.
-
- <p>- matju</p>
-</td></tr>
-
- <tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black"><img src="images/black.png" width="1" height="2"></td></tr>
- <tr>
- <td width="13%">&nbsp;</td>
- <td width="82%">
-
- <p> Here is an example of how things work in GridFlow. (if you want more
- information, consult the rest of this manual)
-
- <p> A picture is a three-dimensional Grid:<br>
- <b>0</b> : rows <br>
- <b>1</b> : columns <br>
- <b>2</b> : channels <br>
-
- <p>
- Pictures come in all sorts of heights and widths. The channels, however,
- are more limited in number. Usually it's three: Red, Green, Blue.
-
- <p> A coordinate transform, when specified pixel by pixel, may be a
- three-dimensional Grid in which the two "channels" are Y and X,
- representing row-and-column positions in a separate picture.
-
- <p> Other shapes of grids could be designed to represent various things;
- for example, configuration for blur effects. Grids could be useful for
- things not directly related to raster pictures (e.g. sound recordings).
- Those are all kinds of things you could actually develop <i>within</i> the
- PureData / GridFlow framework. You don't need to wait for me.
-</td>
-
- <tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black"><img src="images/black.png" width="1" height="2"></td></tr>
-
- <tr><td colspan="4">
- <p><font size="-1">GridFlow 0.7.7 Documentation<br>
- by Mathieu Bouchard <a href="mailto:matju@sympatico.ca">matju@sympatico.ca</a>
- and<br>
- Alexandre Castonguay <a href="mailto:acastonguay@artengine.ca">acastonguay@artengine.ca</a></font></p>
- </td>
- </tr>
-
-</table>
-</body>
-</html>
diff --git a/externals/gridflow/doc/license.html b/externals/gridflow/doc/license.html
deleted file mode 100644
index 0414218f..00000000
--- a/externals/gridflow/doc/license.html
+++ /dev/null
@@ -1,75 +0,0 @@
-<html>
-<head>
-<!-- $Id: license.html,v 1.2 2006-03-15 04:44:50 matju Exp $ -->
-<!--
- GridFlow Reference Manual: Architecture
- Copyright (c) 2001,2002,2003,2004 by Mathieu Bouchard
--->
-<title>GridFlow 0.7.7 - License</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<link rel="stylesheet" href="gridflow.css" type="text/css">
-</head>
-
-<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
-<br>
-<table width="100%" border="0" cellspacing="5">
- <tr><td colspan="4" bgcolor="#082069">
- <img src="images/titre_gridflow.png" width="253" height="23"></td></tr>
-
- <tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black"><img src="images/black.png" width="1" height="2"></td></tr>
-
- <tr><td colspan="3" height="16">
- <h4>GridFlow 0.7.7 - License</h4>
- </td></tr>
-
- <tr>
- <td rowspan="2" width="12%">&nbsp;</td>
- <td colspan="2" width="80%">&nbsp;</td>
- <td rowspan="10" width="12%">&nbsp;</td>
- </tr>
-
- <tr><td colspan="2">
- <table cellspacing="1" cellpadding="0"><tr><td bgcolor="black">
- <table cellspacing="1" cellpadding="20"><tr><td bgcolor="white">
- <p>
- Copyright (c) 2001,2002,2003,2004 by Mathieu Bouchard
-
- <p>
- 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.
-
- <p>
- See file LICENSE for further informations on licensing terms.
- 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.
-
- <p>
- 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., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
- </td></tr></table>
- </td></tr></table>
- </td>
- </tr>
- <tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black"><img src="images/black.png" width="1" height="2"></td></tr>
-
- <tr><td colspan="4">
- <p><font size="-1">GridFlow 0.7.7 Documentation<br>
- by Mathieu Bouchard <a href="mailto:matju@sympatico.ca">matju@sympatico.ca</a>
- and<br>
- Alexandre Castonguay <a href="mailto:acastonguay@artengine.ca">acastonguay@artengine.ca</a></font></p>
- </td>
- </tr>
-
-</table>
-</body>
-</html>
diff --git a/externals/gridflow/doc/moulinette.rb b/externals/gridflow/doc/moulinette.rb
deleted file mode 100644
index c74933d6..00000000
--- a/externals/gridflow/doc/moulinette.rb
+++ /dev/null
@@ -1,660 +0,0 @@
-=begin
- $Id: moulinette.rb,v 1.2 2006-03-15 04:44:50 matju Exp $
- convert GridFlow Documentation XML to HTML with special formatting.
-
- GridFlow
- Copyright (c) 2001,2002,2003,2004,2005 by Mathieu Bouchard
-
- 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.
-
- See file ../../COPYING for further informations on licensing terms.
-
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-=end
-
-GF_VERSION = "0.8.1"
-
-#$use_rexml = true
-$use_rexml = false
-
-require "gridflow"
-
-if $use_rexml
- # this is a pure ruby xml-parser
- begin
- require "rexml/sax2parser"
- rescue LoadError
- require "rexml/parsers/sax2parser"
- include REXML::Parsers
- end
- include REXML
-else
- # this uses libexpat.so
- require "xmlparser"
-end
-
-=begin todo
-
- [ ] make it use the mk() function as much as possible.
- [ ] make it validate
- [ ] make it find the size of the pictures (and insert width/height attrs)
- [ ] tune the output
- [ ] fix the header of the page
-
-=end
-
-if nil
- alias real_print print
- alias real_puts puts
- def print(*x); real_print "[#{caller[0]}]"; real_print *x; end
- def puts (*x); real_print "[#{caller[0]}]"; real_puts *x; end
-end
-
-def warn(text)
- STDERR.print "\e[1;031mWARNING:\e[0m "
- STDERR.puts text
-end
-
-$escape_map={
- "<" => "&lt;",
- ">" => "&gt;",
- "&" => "&amp;",
-}
-
-# hackish transcoding from unicode to iso-8859-1
-def multicode(text); text.gsub(/\xc2(.)/) { $1 } end
-
-def html_quote(text)
- return nil if not text
- text = text.gsub(/[<>&]/) {|x| $escape_map[x] }
- text = multicode(text) if /\xc2/ =~ text
- text
-end
-
-def mk(tag,*values,&block)
- raise "value-list's length must be even" if values.length % 2 != 0
- print "<#{tag}"
- i=0
- while i<values.length
- print " #{values[i]}=\"#{values[i+1]}\""
- i+=2
- end
- print ">"
- (block[]; mke tag) if block
-end
-def mke(tag)
- print "</#{tag}>"
-end
-
-def mkimg(parent,alt=nil,prefix=nil)
- #STDERR.puts parent.to_s
- icon = parent.contents.find {|x| XNode===x and x.tag == 'icon' }
- name = parent.att["name"]
- url = prefix+"/"+name+"-icon.png"
- if icon and icon.att["src"]
- url = icon.att["src"]
- STDERR.puts "overriding #{url} with #{icon.att["src"]}"
- end
- url = url.sub(/,.*$/,"") # what's this for again?
- warn "icon #{url} not found" if not File.exist? url
- url = url.gsub(%r"#") {|x| sprintf "%%%02x", x[0] }
- alt = icon.att["text"] if icon and not alt
- alt = "[#{name}]"
- mk(:img, :src, url, :alt, alt, :border, 0)
-end
-
-class XString < String
- def show
- print html_quote(gsub(/[\r\n\t ]+$/," "))
- end
-end
-
-module HasOwnLayout; end
-
-class XNode
- # subclass interface:
- # #show_index : print as html in index
- # #show : print as html in main part of the doc
-
- @valid_tags = {}
- class<<self
- attr_reader :valid_tags
- def register(*args,&b)
- qlass = (if b then Class.new self else self end)
- qlass.class_eval(&b) if b
- for k in args do XNode.valid_tags[k]=qlass end
- #qlass.class_eval {
- # public :show
- # public :show_index
- #}
- end
- def [](tag,att,*contents)
- self.valid_tags[tag].new(tag,att,*contents)
- end
- end
-
- def initialize tag, att, *contents
- @tag,@att,@contents =
- tag, att, contents
- contents.each {|c| c.parent = self if XNode===c }
- end
-
- attr_reader :tag, :att, :contents
- attr_accessor :parent
- def [] i; contents[i] end
-
- def show_index
- contents.each {|x| next unless XNode===x; x.show_index }
- end
-
- # this method segfaults in ruby 1.8
- # because of method lookup on Qundef or whatever.
- def show
- #STDERR.puts GridFlow.get_id(contents)
- #STDERR.puts self
- contents.each {|x|
- # STDERR.puts GridFlow.get_id(x)
- x.show
- }
- end
- def inspect; "#<XNode #{tag}>"; end
- def to_s; inspect; end
- def << x; contents << x; x.parent=self end
-end
-
-XNode.register("documentation") {}
-
-XNode.register(*%w( icon help arg rest )) {public
- def show; end
-}
-
-XNode.register("section") {public
- def show
- write_black_ruler
- mk(:tr) { mk(:td,:colspan,4) {
- mk(:a,:name,att["name"].gsub(/ /,'_')) {}
- mk(:h4) { print att["name"] }}}
-
- contents.each {|x|
- if HasOwnLayout===x then
- x.show
- else
- mk(:tr) { mk(:td) {}; mk(:td) {}; mk(:td) { x.show }}
- puts ""
- end
- }
-
- mk(:tr) { mk(:td) { print "&nbsp;" }}
- puts ""
- end
- def show_index
- mk(:h4) {
- mk(:a,:href,"#"+att["name"].gsub(/ /,'_')) {
- print att["name"] }}
- print "<ul>\n"
- super
- print "</ul>\n"
- end
-}
-
-# basic text formatting nodes.
-XNode.register(*%w( p i u b sup )) {public
- def show
- print "<#{tag}>"
- super
- print "</#{tag}>"
- end
-}
-
-XNode.register("k") {public
- def show
- print "<kbd><font color=\"#007777\">" # oughta be in stylesheet?
- super
- print "</font></kbd>"
- end
-}
-
-# explicit hyperlink on the web.
-XNode.register("link") {public
- def show
- STDERR.puts "att = #{att.inspect}"
- raise if not att['to']
- print "<a href='#{att['to']}'>"
- super
- print att[:to] if contents.length==0
- print "</a>"
- end
-}
-
-XNode.register("list") {public
- attr_accessor :counter
- def show
- self.counter = att.fetch("start"){"1"}.to_i
- mk(:ul) {
- super # method call on Qundef ???
- }
- end
-}
-
-XNode.register("li") {public
- def show
- mk(:li) {
- print "<b>#{parent.counter}</b>", " : "
- parent.counter += 1
- super
- }
- end
-}
-
-# and "macro", "enum", "type", "use"
-XNode.register("class") {public
- include HasOwnLayout
- def show
- tag = self.tag
- name = att['name'] or raise
- mk(:tr) {
- mk(:td,:colspan,4,:bgcolor,"#ffb080") {
- mk(:b) { print "&nbsp;"*2, "#{tag} " }
- mk(:a,:name,name) { print name }
- }
- }
- mk(:tr) {
- mk(:td) {}
- mk(:td,:valign,:top) {
- print "<br>\n"
- help = contents.find {|x| XNode===x and x.tag == 'help' }
- mkimg(self,nil,"flow_classes") if /reference|format/ =~ $file
- mk(:br,:clear,"left")
- 2.times { mk(:br) }
- if help
- big = help.att['image'] || att['name']
- if big[0]==?@ then big="images/help_#{big}.png" end
- warn "help #{big} not found" if not File.exist?(big)
- #small = big.gsub(/png$/, 'jpg').gsub(/\//, '/ic_')
- mk(:a,:href,big) {
- #mk(:img,:src,small,:border,0)
- mk(:img,:src,"images/see_screenshot.png",:border,0)
- }
- end
- mk(:br,:clear,"left")
- mk(:br)
- }#/td
- mk(:td) {
- print "<br>\n"
- super
- print "<br>"
- }#/td
- }#/tr
- end
- def show_index
- icon = contents.find {|x| XNode===x && x.tag == "icon" }
- if not att["name"] then
- raise "name tag missing?"
- end
- mk(:li) { mk(:a,:href,"\#"+att["name"]) {
- mkimg(self,att["cname"],"flow_classes")
- }}
- puts
- super
- end
-}
-
-def nice_table
- mk(:table,:border,0,:bgcolor,:black,:cellspacing,1) {
- mk(:tr) {
- mk(:td,:valign,:top,:align,:left) {
- mk(:table,:bgcolor,:white,:border,0,
- :cellpadding,4,:cellspacing,1) {
- yield }}}}
-end
-
-XNode.register("attr") {public
- def show
- print "<br>"
- if parent.tag == "inlet" or parent.tag == "outlet"
- mk(:b) {
- print "#{parent.tag}&nbsp;#{parent.att['id']} "
-
- }
- end
- print "<b>#{tag}</b>&nbsp;"
- print "#{html_quote att['name']} <b>(</b>"
- s=html_quote(att["name"])
- s="<i>#{att['type']}</i> #{s}" if att['type']
- print "<b>#{s}</b>"
- print "<b>)</b> "
- end
-}
-
-XNode.register("method") {public
-if true #
- def show
- print "<br>"
- if parent.tag == "inlet" or parent.tag == "outlet"
- mk(:b) {
- print "#{parent.tag}&nbsp;#{parent.att['id']} "
-
- }
- end
- print "<b>#{tag}</b>&nbsp;"
- print "#{html_quote att['name']} <b>(</b>"
- print contents.map {|x|
- next unless XNode===x
- case x.tag
- when "arg"
- s=html_quote(x.att["name"])
- s="<i>#{x.att['type']}</i> #{s}" if x.att['type']
- s
- when "rest"
- (x.att["name"]||"") + "..."
- end
- }.compact.join("<b>, </b>")
- print "<b>)</b> "
- super
- print "<br>\n"
- end
-else #
- def show
- print "<br>"
- mk(:table) { mk(:tr) { mk(:td) {
- name = ""
- name << "#{parent.tag} #{parent.att['id']} " if \
- parent.tag == "inlet" or parent.tag == "outlet"
- name << tag.to_s
- mk(:b) { print name.gsub(/ /,"&nbsp;") }
- }; mk(:td) {
- nice_table { mk(:tr) {
- mk(:td,:width,1) { print html_quote(att['name']) }
- contents.each {|x|
- next unless XNode===x
- case x.tag
- when "arg"
- mk(:td,:bgcolor,:pink) {
- s = ""
- if x.att["type"]
- s << "<i>" << html_quote(x.att["type"]) << "</i>"
- end
- if x.att["name"]
- s << " " << html_quote(x.att["name"])
- end
- s<<"&nbsp;" if s.length==0
- mk(:b) { puts s }
- }
- when "rest"
- mk(:td,:bgcolor,:pink) {
- mk(:b) { print html_quote(x.att["name"]), "..."}
- }
- end
- }
- }}
- }; mk(:td) {
- super
- }}}
- end
-end #
-}
-
-XNode.register("table") {public
- def show
- colors = ["#ffffff","#f0f8ff",]
- rows = contents.find_all {|x| XNode===x && x.tag=="row" }
- rows.each_with_index {|x,i| x.bgcolor = colors[i%2] }
- mk(:tr) {
- 2.times { mk(:td) {} }
- mk(:td) {
- nice_table {
- mk(:tr) {
- columns = contents.find_all {|x| XNode===x && x.tag=="column" }
- columns.each {|x| mk(:td,:bgcolor,"#808080") {
- mk(:font,:color,"#ffffff") {
- mk(:b) {
- x.contents.each {|y| y.show }}}}}
- }
- super
- }}}
- end
-}
-
-XNode.register("column") {public
- def show; end
-}
-
-XNode.register("row") {public
- attr_accessor :bgcolor
- def show
- columns = parent.contents.find_all {|x| XNode===x && x.tag=="column" }
- mk(:tr) { columns.each {|x| mk(:td,:bgcolor,bgcolor) {
- id = x.att["id"]
- case x.att["type"]
- when "icon" # should fix this for non-op icons
- x = "op/#{att['cname']}-icon.png"
- if not File.exist? x
- warn "no icon for #{att['name']} (#{x})\n"
- end
- mk(:img,:src,x,:border,0,:alt,att["name"])
- else
- if id==""
- then contents.each {|x| x.show }
- else
-# print html_quote(att[id] || "--")
- print multicode(att[id] || "--")
- end
- end
- }}}
- end
-}
-
-XNode.register("inlet","outlet") {}
-
-#----------------------------------------------------------------#
-
-if $use_rexml
- class GFDocParser
- def initialize(file)
- @sax = SAX2Parser.new(File.open(file))
- @xml_lists = []
- @stack = [[]]
- @sax.listen(:start_element) {|a,b,c,d| startElement(b,d) }
- @sax.listen( :end_element) {|a,b,c| endElement(b) }
- @sax.listen( :characters) {|a| @gfdoc.character(a) }
- end
- def do_it; @sax.parse; end
- end
-else
- class GFDocParser
- def initialize(file)
- @xml = XMLParser.new("ISO-8859-1")
- foo=self; @xml.instance_eval { @gfdoc=foo }
- def @xml.startElement(tag,attrs) @gfdoc.startElement(tag,attrs) end
- def @xml.endElement(tag) @gfdoc.endElement(tag) end
- def @xml.character(text) @gfdoc.character(text) end
- @file = File.open file
- @xml_lists = []
- @stack = [[]]
- end
- def do_it; @xml.parse(@file.readlines.join("\n"), true) end
- def method_missing(sel,*args) @xml.send(sel,*args) end
- end
-end
-
-class GFDocParser
- attr_reader :stack
- def startElement(tag,attrs)
- if not XNode.valid_tags[tag] then
- raise XMLParserError, "unknown tag #{tag}"
- end
- @stack<<[tag,attrs]
- end
- def endElement(tag)
- node = XNode.valid_tags[tag].new(*@stack.pop)
- @stack.last << node
- end
- def character(text)
- if not String===@stack.last.last then
- @stack.last << XString.new("")
- end
- @stack.last.last << text
- end
-end
-
-#----------------------------------------------------------------#
-
-def write_header(tree)
-puts <<EOF
-<html><head>
-<!-- #{"$"}Id#{"$"} -->
-<title>GridFlow #{GF_VERSION} - #{tree.att['title']}</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<link rel="stylesheet" href="gridflow.css" type="text/css">
-</head>
-<body bgcolor="#FFFFFF"
- leftmargin="0" topmargin="0"
- marginwidth="0" marginheight="0">
-<table width="100%" bgcolor="white" border="0" cellspacing="2">
-<tr><td colspan="4" bgcolor="#082069">
-<img src="images/titre_gridflow.png" width="253" height="23">
-</td></tr><tr><td>&nbsp;</td></tr>
-EOF
-write_black_ruler
-puts <<EOF
-<tr><td colspan="4" height="16">
- <h4>GridFlow #{GF_VERSION} - #{tree.att['title']}</h4>
-</td></tr>
-<tr>
- <td width="5%" rowspan="2">&nbsp;</td>
- <td width="15%" height="23">&nbsp;</td>
- <td width="80%" height="23">&nbsp;</td>
- <td width="5%" height="23">&nbsp;</td>
-</tr>
-EOF
-end
-
-def write_black_ruler
-puts <<EOF
-<tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-EOF
-end
-
-def write_footer
-puts <<EOF
-<td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4">
-<p><font size="-1">
-GridFlow #{GF_VERSION} Documentation<br>
-Copyright &copy; 2001,2002,2003,2004,2005,2006 by Mathieu Bouchard
-<a href="mailto:matju@artengine.ca">matju@artengine.ca</a>
-</font></p>
-</td></tr></table></body></html>
-EOF
-end
-
-#----------------------------------------------------------------#
-
-$nodes = {}
-XMLParserError = Exception if $use_rexml
-
-def harvest_doc_of_class xclass, v, way
- doc = case way; when:in:v.doc; when:out:v.doc_out end
- tag = case way; when:in:"inlet"; when:out:"outlet" end
- doc.keys.each {|sel|
- text = v.doc[sel]
- m=/^_(\d+)_(\w+)/.match sel.to_s
- if m then
- xclass << XNode[tag,{"id"=>Integer(m[1])},
- XNode["method",{"name"=>m[2]},XString.new(text)]]
- else
- xclass << XNode["method",{"name"=>sel.to_s},XString.new(text)]
- end
- }
-end
-
-def harvest_doc tree
- kla = {}
- tree.contents.find_all {|x| XNode===x and x.tag=="section" }.each {|sex|
- sex.contents.each {|y|
- next unless XNode===y and y.tag=="class"
- kla[y.att["name"]] = y
- }
- }
- #STDERR.puts kla.inspect
- tree << (nu=XNode["section",{"name"=>"(new documentation)"}])
- tree << (un=XNode["section",{"name"=>"(undocumented)"}])
- alph = GridFlow.fclasses.keys.sort
- alph.each {|k|
- next if /^@/=~k and GridFlow.fclasses[k.gsub(/^@/,"#")]
- v = GridFlow.fclasses[k]
- if v.doc then
- nu << (xclass=XNode["class",{"name"=>k}])
- harvest_doc_of_class xclass, v, :in
- harvest_doc_of_class xclass, v, :out
- elsif not kla[k] then
- un << XNode["p",{},XString.new("[#{k}]")]
- end
- }
-end
-
-def read_one_page file
- begin
- STDERR.puts "reading #{file}"
- parser = GFDocParser.new(file)
- parser.do_it
- $nodes[file] = parser.stack[0][0]
- if file=="reference.xml" then harvest_doc $nodes[file] end
- rescue Exception => e
- puts ""
- puts ""
- STDERR.puts e.inspect
- i = parser.stack.length-1
- (STDERR.puts "\tinside <#{parser.stack[i][0]}>"; i-=1) until i<1
- # strange that line numbers are doubled.
- # also the byte count is offset by the line count !?!?!?
- STDERR.puts "\tinside #{file}:#{parser.line/2 + 1}" +
- " (column #{parser.column}," +
- " byte #{parser.byteIndex - parser.line/2})"
- raise "why don't you fix the documentation"
- end
-end
-
-def write_one_page file
- begin
- $file = file
- output_name = file.sub(/\.xml/,".html")
- STDERR.puts "writing #{output_name}"
- STDOUT.flush # bug in 1.9 ?
- STDOUT.reopen output_name, "w"
- tree = $nodes[file]
-# tree.contents.each {|x| STDERR.puts x.inspect }
- write_header(tree)
- mk(:tr) { mk(:td,:colspan,2) { mk(:div,:cols,tree.att["indexcols"]||1) {
- tree.show_index
- puts "<br><br>"
- }}}
- tree.show
- write_footer
- puts ""
- puts ""
- rescue Exception => e
- STDERR.puts "#{e.class}: #{e.message}"
- STDERR.puts e.backtrace
- end
-end
-
-$files = %w(
- install.xml
- reference.xml format.xml internals.xml architecture.xml)
-# project_policy.xml
-
-$files.each {|input_name| read_one_page input_name }
-$files.each {|input_name| write_one_page input_name }
diff --git a/externals/gridflow/doc/op/abs-icon.png b/externals/gridflow/doc/op/abs-icon.png
deleted file mode 100644
index 6e728ebd..00000000
--- a/externals/gridflow/doc/op/abs-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/add-icon.png b/externals/gridflow/doc/op/add-icon.png
deleted file mode 100644
index 5dc6b7bb..00000000
--- a/externals/gridflow/doc/op/add-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/and-icon.png b/externals/gridflow/doc/op/and-icon.png
deleted file mode 100644
index bf24dada..00000000
--- a/externals/gridflow/doc/op/and-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/atan-icon.png b/externals/gridflow/doc/op/atan-icon.png
deleted file mode 100644
index 06cf2576..00000000
--- a/externals/gridflow/doc/op/atan-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/avg-icon.png b/externals/gridflow/doc/op/avg-icon.png
deleted file mode 100644
index bdc6ed47..00000000
--- a/externals/gridflow/doc/op/avg-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/bus-icon.png b/externals/gridflow/doc/op/bus-icon.png
deleted file mode 100644
index acbdb4c1..00000000
--- a/externals/gridflow/doc/op/bus-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/clip+-icon.png b/externals/gridflow/doc/op/clip+-icon.png
deleted file mode 100644
index 58412e7e..00000000
--- a/externals/gridflow/doc/op/clip+-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/clip--icon.png b/externals/gridflow/doc/op/clip--icon.png
deleted file mode 100644
index 43471ac2..00000000
--- a/externals/gridflow/doc/op/clip--icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/cmp-icon.png b/externals/gridflow/doc/op/cmp-icon.png
deleted file mode 100644
index 3b69b149..00000000
--- a/externals/gridflow/doc/op/cmp-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/cos-icon.png b/externals/gridflow/doc/op/cos-icon.png
deleted file mode 100644
index 503e3b9f..00000000
--- a/externals/gridflow/doc/op/cos-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/div-icon.png b/externals/gridflow/doc/op/div-icon.png
deleted file mode 100644
index 80487cac..00000000
--- a/externals/gridflow/doc/op/div-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/div2-icon.png b/externals/gridflow/doc/op/div2-icon.png
deleted file mode 100644
index 7d15db6a..00000000
--- a/externals/gridflow/doc/op/div2-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/dom-icon.png b/externals/gridflow/doc/op/dom-icon.png
deleted file mode 100644
index f090034b..00000000
--- a/externals/gridflow/doc/op/dom-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/eq-icon.png b/externals/gridflow/doc/op/eq-icon.png
deleted file mode 100644
index 28883199..00000000
--- a/externals/gridflow/doc/op/eq-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/gamma-icon.png b/externals/gridflow/doc/op/gamma-icon.png
deleted file mode 100644
index f1c2c42d..00000000
--- a/externals/gridflow/doc/op/gamma-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/gcd-icon.png b/externals/gridflow/doc/op/gcd-icon.png
deleted file mode 100644
index 2660d79c..00000000
--- a/externals/gridflow/doc/op/gcd-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/ge-icon.png b/externals/gridflow/doc/op/ge-icon.png
deleted file mode 100644
index 7c6d2928..00000000
--- a/externals/gridflow/doc/op/ge-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/gt-icon.png b/externals/gridflow/doc/op/gt-icon.png
deleted file mode 100644
index 643f97fb..00000000
--- a/externals/gridflow/doc/op/gt-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/hypot-icon.png b/externals/gridflow/doc/op/hypot-icon.png
deleted file mode 100644
index 3e9483db..00000000
--- a/externals/gridflow/doc/op/hypot-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/ignore-icon.png b/externals/gridflow/doc/op/ignore-icon.png
deleted file mode 100644
index 5e0654de..00000000
--- a/externals/gridflow/doc/op/ignore-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/lcm-icon.png b/externals/gridflow/doc/op/lcm-icon.png
deleted file mode 100644
index 81e6a078..00000000
--- a/externals/gridflow/doc/op/lcm-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/le-icon.png b/externals/gridflow/doc/op/le-icon.png
deleted file mode 100644
index f69a8800..00000000
--- a/externals/gridflow/doc/op/le-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/log-icon.png b/externals/gridflow/doc/op/log-icon.png
deleted file mode 100644
index d75b15a4..00000000
--- a/externals/gridflow/doc/op/log-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/lt-icon.png b/externals/gridflow/doc/op/lt-icon.png
deleted file mode 100644
index c57ad9bb..00000000
--- a/externals/gridflow/doc/op/lt-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/max-icon.png b/externals/gridflow/doc/op/max-icon.png
deleted file mode 100644
index b9b932e0..00000000
--- a/externals/gridflow/doc/op/max-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/mer-icon.png b/externals/gridflow/doc/op/mer-icon.png
deleted file mode 100644
index 6fe4c1d3..00000000
--- a/externals/gridflow/doc/op/mer-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/min-icon.png b/externals/gridflow/doc/op/min-icon.png
deleted file mode 100644
index c2a114a5..00000000
--- a/externals/gridflow/doc/op/min-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/mod-icon.png b/externals/gridflow/doc/op/mod-icon.png
deleted file mode 100644
index 852ca172..00000000
--- a/externals/gridflow/doc/op/mod-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/mul-icon.png b/externals/gridflow/doc/op/mul-icon.png
deleted file mode 100644
index a2826621..00000000
--- a/externals/gridflow/doc/op/mul-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/ne-icon.png b/externals/gridflow/doc/op/ne-icon.png
deleted file mode 100644
index a3dd4712..00000000
--- a/externals/gridflow/doc/op/ne-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/or-icon.png b/externals/gridflow/doc/op/or-icon.png
deleted file mode 100644
index b672d11a..00000000
--- a/externals/gridflow/doc/op/or-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/pow-icon.png b/externals/gridflow/doc/op/pow-icon.png
deleted file mode 100644
index 7c385ce6..00000000
--- a/externals/gridflow/doc/op/pow-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/put-icon.png b/externals/gridflow/doc/op/put-icon.png
deleted file mode 100644
index 71edae17..00000000
--- a/externals/gridflow/doc/op/put-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/rand-icon.png b/externals/gridflow/doc/op/rand-icon.png
deleted file mode 100644
index cd3d9408..00000000
--- a/externals/gridflow/doc/op/rand-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/rem-icon.png b/externals/gridflow/doc/op/rem-icon.png
deleted file mode 100644
index 5628f326..00000000
--- a/externals/gridflow/doc/op/rem-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/sc_and-icon.png b/externals/gridflow/doc/op/sc_and-icon.png
deleted file mode 100644
index 8f62fa83..00000000
--- a/externals/gridflow/doc/op/sc_and-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/sc_or-icon.png b/externals/gridflow/doc/op/sc_or-icon.png
deleted file mode 100644
index 0554d392..00000000
--- a/externals/gridflow/doc/op/sc_or-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/shl-icon.png b/externals/gridflow/doc/op/shl-icon.png
deleted file mode 100644
index b89946c6..00000000
--- a/externals/gridflow/doc/op/shl-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/shr-icon.png b/externals/gridflow/doc/op/shr-icon.png
deleted file mode 100644
index b9178d14..00000000
--- a/externals/gridflow/doc/op/shr-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/sin-icon.png b/externals/gridflow/doc/op/sin-icon.png
deleted file mode 100644
index d9d686ca..00000000
--- a/externals/gridflow/doc/op/sin-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/sq-icon.png b/externals/gridflow/doc/op/sq-icon.png
deleted file mode 100644
index da103479..00000000
--- a/externals/gridflow/doc/op/sq-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/sqrt-icon.png b/externals/gridflow/doc/op/sqrt-icon.png
deleted file mode 100644
index 53e88d13..00000000
--- a/externals/gridflow/doc/op/sqrt-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/sub-icon.png b/externals/gridflow/doc/op/sub-icon.png
deleted file mode 100644
index 5eda4af7..00000000
--- a/externals/gridflow/doc/op/sub-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/tanh-icon.png b/externals/gridflow/doc/op/tanh-icon.png
deleted file mode 100644
index 6ce79396..00000000
--- a/externals/gridflow/doc/op/tanh-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/vid-icon.png b/externals/gridflow/doc/op/vid-icon.png
deleted file mode 100644
index 8afd9d7b..00000000
--- a/externals/gridflow/doc/op/vid-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/vid2-icon.png b/externals/gridflow/doc/op/vid2-icon.png
deleted file mode 100644
index 2a062699..00000000
--- a/externals/gridflow/doc/op/vid2-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/op/xor-icon.png b/externals/gridflow/doc/op/xor-icon.png
deleted file mode 100644
index 68771820..00000000
--- a/externals/gridflow/doc/op/xor-icon.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/doc/profiling.html b/externals/gridflow/doc/profiling.html
deleted file mode 100644
index f804e87d..00000000
--- a/externals/gridflow/doc/profiling.html
+++ /dev/null
@@ -1,151 +0,0 @@
-<html>
-<head>
-<!-- $Id: profiling.html,v 1.2 2006-03-15 04:44:50 matju Exp $ -->
-<!--
- GridFlow Reference Manual: Architecture
- Copyright (c) 2001,2002,2003,2004 by Mathieu Bouchard
--->
-<title>GridFlow 0.7.7 - Profiling Execution Speed</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<link rel="stylesheet" href="gridflow.css" type="text/css">
-</head>
-
-<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
-<br>
-<table width="100%" border="0" cellspacing="5">
- <tr><td colspan="4" bgcolor="#082069">
- <img src="images/titre_gridflow.png" width="253" height="23"></td></tr>
-
- <tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black"><img src="images/black.png" width="1" height="2"></td></tr>
-
- <tr><td colspan="3" height="16">
- <h4>GridFlow 0.7.7 - Profiling Execution Speed</h4>
- </td></tr>
-
- <tr>
- <td width="12%" height="4">&nbsp;</td>
- <td width="80%" height="4">&nbsp;</td>
- <td width="12%" height="4">&nbsp;</td>
- </tr>
-
- <tr>
- <td width="13%">&nbsp;</td>
- <td width="82%">
-
- <h4>What is profiling?</h4>
- <p>
- It is about getting empiric metrics about the execution of a program.
- For example, find out which parts of a program consume the most time
- and/or memory. Usually it's about the time, and this is what GridFlow
- allows you to measure.
- </p>
-
- <h4>How to get those stats from GridFlow ?</h4>
- <ul>
- <li>create a "@global" object and connect two
- messageboxes to it, "profiler_reset" and "profiler_dump". The first
- one resets all counters to zero. The second one gives a top of
- the busiest objects, with percentages.</li>
- <li>note that those results are global to a process. That is, if you load
- several patches in the same process (program instance), then all those patches
- will be monitored at once. But if you open jMax (or PD) several times at once, then
- the profiler will not see everything happening on that machine.
- </li>
- <h4>How do i interpret those stats?</h4>
- <li>Note that some operations may not be monitored, and some of the
- monitoring may be buggy. I think it's not buggy as it is now, but I may be wrong.
- </li>
- <li>
- The current profiler uses a thing called RDTSC (Pentium only). This is a very high
- precision clock that is very fast to use. However, *major* imprecisions
- may come from the fact that an ordinary multitasking OS will run other
- tasks without stopping/resuming the clock. This may happen randomly;
- however, it has a much bigger chance of happening in [@in] or [@out], because that's
- where all the communication with other stuff is (files, sockets, windows, etc).
- </li>
- <li>
- If you make sure that only the bare minimum is actively running on your
- computer, then [@out] (using x11) would still include the time spent in the x11
- server, except in some conditions. This applies to every kind of window output too,
- because however the data trickles through libraries (sdl, aalib), it has to reach the x11 server
- and the display driver.
- </li>
- <li>
- The profiler has an impact on the results of the profiler. The profiler
- includes half of its own influence in its own results, and disregards the
- other half (or so). Profiling shouldn't add more than 100-300 ticks per
- message (of which half is counted).
- </li>
- <li>
- Message-passing time is not counted at all. Only time actually spent
- inside GridFlow objects is counted. This may skew results.
- Transmission of a grid requires one message, thus we may speak of "grid messages".
- However, when the message is received, one or several packets may get transmitted, which
- is done outside of the message system. Each packet contains at most 2048 numbers
- (adjustable limit), and normally a packet should be at least one quarter of that size unless it is the last one.
- On RGB grids of widths 640,320,160, the packet size will usually be 1920.
- </li>
- </ul>
- </p>
-
- <h4>Getting a frames-per-second measure</h4>
- <p>This section formerly was describing what can now be obtained using the [fps] object class.</p>
-
- <h4>acceleration tricks</h4>
- <ul>
- <li>try the profiler and see what it says.</li>
- <li>i mean really.</li>
- <li>you can lose a lot of your time accelerating something
- that isn't really taking execution time.</li>
- <li>it's faster to work on big grids than on small grids,
- for the amount of number-crunching you can do.
- </li>
- <li>about numbertypes: uint8 is the fastest, followed by int16, int32, float32.
- (and the first two are faster when MMX is enabled). However it
- may be difficult to make some effects use int16
- or smaller without overflow happening.</li>
- <li>[@ &lt;&lt;] is a very fast multiplication by powers of two (1, 2, 4, 8, 16, ...).
- [@ &gt;&gt;] is a very fast division by powers of two.
- <p>
- from my little experience, normal integer multiplication and division are
- rather slow, especially on Intel brand. The gap between *,/ and
- &lt;&lt;,&gt;&gt; is smaller on Cyrix/AMD brand CPUs, but still, try it
- yourself. (my experience has been on specific models and may not reflect currently common models)
- </p>
- </li>
- <li>[@ &amp; 255] is a very fast [@ % 256], and likewise for other
- powers of two.</li>
- <li>for do-nothing operations, "ignore" and "put" are faster than
- "+ 0" and such...</li>
- <li>remember that an image twice smaller in height <u>and</u> twice
- smaller in height will be processed <u>four</u> times as fast (for
- most effects) so you can get four times more frames per second.
- It's the "rows*columns*channels" value that makes the biggest
- difference (usually).</li>
-
- <li>If all fails you may recode a jMax/PD/Ruby abstraction into
- plain Ruby code or C++ code. If your new class is of generic
- usefulness then maybe it should be added to the releases of
- GridFlow. Contact me if you need help extending GridFlow.</li>
-
- <li>Put often-used files on fast drives. This means don't use NFS
- (networked file system) for that. The file-to-ram cache can compensate for
- that up to a certain amount, but the larger the file is, and the most used
- the file is, the more important it is to put it on a local drive. </li>
- </ul>
-</td>
-
- <tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black"><img src="images/black.png" width="1" height="2"></td></tr>
-
- <tr><td colspan="4">
- <p><font size="-1">GridFlow 0.7.7 Documentation<br>
- by Mathieu Bouchard <a href="mailto:matju@sympatico.ca">matju@sympatico.ca</a>
- </font></p>
- </td>
- </tr>
-
-</table>
-</body>
-</html>
diff --git a/externals/gridflow/doc/project_policy.html b/externals/gridflow/doc/project_policy.html
deleted file mode 100644
index 38790844..00000000
--- a/externals/gridflow/doc/project_policy.html
+++ /dev/null
@@ -1,98 +0,0 @@
-<html><head>
-<!-- $Id: project_policy.html,v 1.1 2005-10-04 02:09:43 matju Exp $ -->
-<title>GridFlow 0.8.0 - </title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<link rel="stylesheet" href="gridflow.css" type="text/css">
-</head>
-<body bgcolor="#FFFFFF"
- leftmargin="0" topmargin="0"
- marginwidth="0" marginheight="0">
-<table width="100%" bgcolor="white" border="0" cellspacing="2">
-<tr><td colspan="4" bgcolor="#082069">
-<img src="images/titre_gridflow.png" width="253" height="23">
-</td></tr><tr><td>&nbsp;</td></tr>
-<tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4" height="16">
- <h4>GridFlow 0.8.0 - </h4>
-</td></tr>
-<tr>
- <td width="5%" rowspan="2">&nbsp;</td>
- <td width="15%" height="23">&nbsp;</td>
- <td width="80%" height="23">&nbsp;</td>
- <td width="5%" height="23">&nbsp;</td>
-</tr>
-<tr><td colspan="2"><div cols="1"><h4><a href="#Note">Note</a></h4><ul>
-</ul>
-<h4><a href="#Release">Release</a></h4><ul>
-</ul>
-<h4><a href="#Documentation">Documentation</a></h4><ul>
-</ul>
-<h4><a href="#CVS">CVS</a></h4><ul>
-</ul>
-<br><br>
-</div></td></tr> <tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="Note"></a><h4>Note</h4></td></tr><tr><td></td><td></td><td>
- first consult the file ../README for a vague idea on the meaning of
- subdirectories. </td></tr>
-<tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="Release"></a><h4>Release</h4></td></tr><tr><td></td><td></td><td>
-Compatibility: </td></tr>
-<tr><td></td><td></td><td><ul><li><b>1</b> :
- Should work with Ruby 1.6.6 and PureData 0.36, 0.37, 0.38 </li></ul></td></tr>
-<tr><td></td><td></td><td>
-Release steps (</td></tr>
-<tr><td></td><td></td><td><b>OPERATE WITH CAUTION</b></td></tr>
-<tr><td></td><td></td><td>): </td></tr>
-<tr><td></td><td></td><td><ul> <li><b>1</b> : make vvtest # leak detection </li><li><b>2</b> : ruby base/test.rb formats </li><li><b>3</b> : cvs tag gridflow_0_7_7 . </li><li><b>4</b> : mkdir gridflow </li><li><b>5</b> : cvs -d :pserver:anonymous@cvs.gridflow.ca:/home/cvs/gridflow
- export -r gridflow_0_7_7 -d gridflow . </li><li><b>6</b> : cd gridflow </li><li><b>7</b> : rm -rf CVS CVSROOT </li><li><b>8</b> : chmod -R go=u-w . </li><li><b>9</b> : cd .. </li><li><b>10</b> : tar cfzvv gridflow-0.7.7.tar.gz gridflow </li><li><b>11</b> : rm -rf gridflow # caution!!! </li><li><b>12</b> : scp gridflow*gz gridflow@artengine.ca:download </li><li><b>13</b> : mv gridflow*gz /home/matju/net/GridFlow </li><li><b>14</b> : ssh gridflow@artengine.ca : expand tarball into public_html/latest </li><li><b>15</b> : download somewhere else and try to compile </li><li><b>16</b> : update main page </li><li><b>17</b> : jmax/pd/ruby-talk mlists : post release (note: prefix subject with [ANN] !!!!) </li><li><b>18</b> : freshmeat.net : post release </li><li><b>19</b> : RAA : post release </li> </ul></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="Documentation"></a><h4>Documentation</h4></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><ul> <li><b>1</b> :
- Pictures identified as "&lt;help&gt;" should be screenshots of the
- help files. They shouldn't be screenshots of the template. </li> <li><b>2</b> :
- A Help file is a visual summary of what an object does. It should be
- interactive and allow the user to understand what the object does.
- Sample inputs are provided and sample results can be seen. </li> <li><b>3</b> :
- All modifications to the documentation must be done in the XML. The
- HTML must be kept up-to-date by rerunning "make" in the "doc/" directory. </li> <li><b>4</b> :
- Help-wise, Formats are considered objects.
- Operators are to be documented as part of [@] and [@!]. </li> <li><b>5</b> :
- Images grabbed directly from a jMax window should be encoded in PNG.
- This includes "icons" (object boxes, message boxes, etc). If they are
- in JPEG, only change to PNG when the image has to change anyway.
- Distinguish "icons" from "thumbnails", the latter of which are <b>scaled-down</b> grabs, which should be encoded in JPEG. </li> <li><b>6</b> :
- There are not help-thumbnails anymore in the reference manual
- because they were not helpful. </li> <li><b>7</b> :
- Large images should be kept out of the release. The release itself must
- be small enough not to discourage us from doing releases and keeping
- them all. It also should be downloadable on a bad modem. =)
- Let's keep it under 500k please. </li> </ul></td></tr>
-<tr><td></td><td></td><td>
-in doc do:
-for z in images/*.* images/*/*.*; do fgrep -q $z *.html || echo "$z"; done </td></tr>
-<tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="CVS"></a><h4>CVS</h4></td></tr><tr><td></td><td></td><td>
- environment variables
- CVSEDITOR=pico
- CVS_RSH=ssh2 </td></tr>
-<tr><td>&nbsp;</td></tr>
- <td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4">
-<p><font size="-1">
-GridFlow 0.8.0 Documentation<br>
-Copyright &copy; 2001,2002,2003,2004,2005 by Mathieu Bouchard
-<a href="mailto:matju@sympatico.ca">matju@artengine.ca</a>
-</font></p>
-</td></tr></table></body></html>
-
-
diff --git a/externals/gridflow/doc/project_policy.xml b/externals/gridflow/doc/project_policy.xml
deleted file mode 100644
index 3bf7368e..00000000
--- a/externals/gridflow/doc/project_policy.xml
+++ /dev/null
@@ -1,99 +0,0 @@
-<?xml version="1.0" standalone="no" ?>
-<!DOCTYPE documentation SYSTEM 'jmax.dtd'>
-<documentation>
-<!-- $Id: project_policy.xml,v 1.1 2005-10-04 02:09:43 matju Exp $ -->
-<!--
- GridFlow Reference Manual: Project Policy
- Copyright (c) 2001,2002,2003,2004 by Mathieu Bouchard and Alexandre Castonguay
--->
-
-<section name="Note">
- first consult the file ../README for a vague idea on the meaning of
- subdirectories.
-</section>
-
-<section name="Release">
-
-Compatibility:
-
-<list><li>
- Should work with Ruby 1.6.6 and PureData 0.36, 0.37, 0.38
-</li></list>
-
-Release steps (<b>OPERATE WITH CAUTION</b>):
-
-<list>
- <li>make vvtest # leak detection
- </li><li>ruby base/test.rb formats
- </li><li>cvs tag gridflow_0_7_7 .
- </li><li>mkdir gridflow
- </li><li>cvs -d :pserver:anonymous@cvs.gridflow.ca:/home/cvs/gridflow
- export -r gridflow_0_7_7 -d gridflow .
- </li><li>cd gridflow
- </li><li>rm -rf CVS CVSROOT
- </li><li>chmod -R go=u-w .
- </li><li>cd ..
- </li><li>tar cfzvv gridflow-0.7.7.tar.gz gridflow
- </li><li>rm -rf gridflow # caution!!!
- </li><li>scp gridflow*gz gridflow@artengine.ca:download
- </li><li>mv gridflow*gz /home/matju/net/GridFlow
- </li><li>ssh gridflow@artengine.ca : expand tarball into public_html/latest
- </li><li>download somewhere else and try to compile
- </li><li>update main page
- </li><li>jmax/pd/ruby-talk mlists : post release (note: prefix subject with [ANN] !!!!)
- </li><li>freshmeat.net : post release
- </li><li>RAA : post release
- </li>
-</list>
-</section>
-
-<section name="Documentation">
-<list>
-<li>
- Pictures identified as "&lt;help&gt;" should be screenshots of the
- help files. They shouldn't be screenshots of the template.
-</li>
-<li>
- A Help file is a visual summary of what an object does. It should be
- interactive and allow the user to understand what the object does.
- Sample inputs are provided and sample results can be seen.
-</li>
-<li>
- All modifications to the documentation must be done in the XML. The
- HTML must be kept up-to-date by rerunning "make" in the "doc/" directory.
-</li>
-<li>
- Help-wise, Formats are considered objects.
- Operators are to be documented as part of [@] and [@!].
-</li>
-<li>
- Images grabbed directly from a jMax window should be encoded in PNG.
- This includes "icons" (object boxes, message boxes, etc). If they are
- in JPEG, only change to PNG when the image has to change anyway.
- Distinguish "icons" from "thumbnails", the latter of which are
- <b>scaled-down</b> grabs, which should be encoded in JPEG.
-</li>
-<li>
- There are not help-thumbnails anymore in the reference manual
- because they were not helpful.
-</li>
-<li>
- Large images should be kept out of the release. The release itself must
- be small enough not to discourage us from doing releases and keeping
- them all. It also should be downloadable on a bad modem. =)
- Let's keep it under 500k please.
-</li>
-</list>
-
-in doc do:
-for z in images/*.* images/*/*.*; do fgrep -q $z *.html || echo "$z"; done
-
-</section>
-
-<section name="CVS">
- environment variables
- CVSEDITOR=pico
- CVS_RSH=ssh2
-</section>
-
-</documentation>
diff --git a/externals/gridflow/doc/reference.html b/externals/gridflow/doc/reference.html
deleted file mode 100644
index 8dce72ec..00000000
--- a/externals/gridflow/doc/reference.html
+++ /dev/null
@@ -1,1165 +0,0 @@
-<html><head>
-<!-- $Id: reference.html,v 1.2 2006-03-15 04:44:50 matju Exp $ -->
-<title>GridFlow 0.8.1 - Reference Manual: Flow Classes</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<link rel="stylesheet" href="gridflow.css" type="text/css">
-</head>
-<body bgcolor="#FFFFFF"
- leftmargin="0" topmargin="0"
- marginwidth="0" marginheight="0">
-<table width="100%" bgcolor="white" border="0" cellspacing="2">
-<tr><td colspan="4" bgcolor="#082069">
-<img src="images/titre_gridflow.png" width="253" height="23">
-</td></tr><tr><td>&nbsp;</td></tr>
-<tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4" height="16">
- <h4>GridFlow 0.8.1 - Reference Manual: Flow Classes</h4>
-</td></tr>
-<tr>
- <td width="5%" rowspan="2">&nbsp;</td>
- <td width="15%" height="23">&nbsp;</td>
- <td width="80%" height="23">&nbsp;</td>
- <td width="5%" height="23">&nbsp;</td>
-</tr>
-<tr><td colspan="2"><div cols="3"><h4><a href="#Objects_for_making_grids_and_breaking_them_down">Objects for making grids and breaking them down</a></h4><ul>
-<li><a href="##import"><img src="flow_classes/%23import-icon.png" alt="[#import]" border="0"></a></li>
-<li><a href="##export"><img src="flow_classes/%23export-icon.png" alt="[#export]" border="0"></a></li>
-<li><a href="##export_list"><img src="flow_classes/%23export_list-icon.png" alt="[#export_list]" border="0"></a></li>
-<li><a href="##export_symbol"><img src="flow_classes/%23export_symbol-icon.png" alt="[#export_symbol]" border="0"></a></li>
-<li><a href="##pack"><img src="flow_classes/%23pack-icon.png" alt="[#pack]" border="0"></a></li>
-<li><a href="##color"><img src="flow_classes/%23color-icon.png" alt="[#color]" border="0"></a></li>
-<li><a href="##unpack"><img src="flow_classes/%23unpack-icon.png" alt="[#unpack]" border="0"></a></li>
-<li><a href="##centroid"><img src="flow_classes/%23centroid-icon.png" alt="[#centroid]" border="0"></a></li>
-<li><a href="##centroid2"><img src="flow_classes/%23centroid2-icon.png" alt="[#centroid2]" border="0"></a></li>
-<li><a href="##for"><img src="flow_classes/%23for-icon.png" alt="[#for]" border="0"></a></li>
-</ul>
-<h4><a href="#Objects_for_Computing">Objects for Computing</a></h4><ul>
-<li><a href="##"><img src="flow_classes/%23-icon.png" alt="[#]" border="0"></a></li>
-<li><a href="#@complex_sq"><img src="flow_classes/@complex_sq-icon.png" alt="[@complex_sq]" border="0"></a></li>
-<li><a href="##fold"><img src="flow_classes/%23fold-icon.png" alt="[#fold]" border="0"></a></li>
-<li><a href="##scan"><img src="flow_classes/%23scan-icon.png" alt="[#scan]" border="0"></a></li>
-<li><a href="##outer"><img src="flow_classes/%23outer-icon.png" alt="[#outer]" border="0"></a></li>
-<li><a href="##inner"><img src="flow_classes/%23inner-icon.png" alt="[#inner]" border="0"></a></li>
-<li><a href="#@join"><img src="flow_classes/@join-icon.png" alt="[@join]" border="0"></a></li>
-<li><a href="##finished"><img src="flow_classes/%23finished-icon.png" alt="[#finished]" border="0"></a></li>
-<li><a href="##cast"><img src="flow_classes/%23cast-icon.png" alt="[#cast]" border="0"></a></li>
-<li><a href="##ravel"><img src="flow_classes/%23ravel-icon.png" alt="[#ravel]" border="0"></a></li>
-<li><a href="##grade"><img src="flow_classes/%23grade-icon.png" alt="[#grade]" border="0"></a></li>
-<li><a href="##perspective"><img src="flow_classes/%23perspective-icon.png" alt="[#perspective]" border="0"></a></li>
-<li><a href="##transpose"><img src="flow_classes/%23transpose-icon.png" alt="[#transpose]" border="0"></a></li>
-<li><a href="##fade"><img src="flow_classes/%23fade-icon.png" alt="[#fade]" border="0"></a></li>
-<li><a href="##fade_lin"><img src="flow_classes/%23fade_lin-icon.png" alt="[#fade_lin]" border="0"></a></li>
-<li><a href="##reverse"><img src="flow_classes/%23reverse-icon.png" alt="[#reverse]" border="0"></a></li>
-</ul>
-<h4><a href="#Objects_for_Coordinate_Transforms">Objects for Coordinate Transforms</a></h4><ul>
-<li><a href="##redim"><img src="flow_classes/%23redim-icon.png" alt="[#redim]" border="0"></a></li>
-<li><a href="##store"><img src="flow_classes/%23store-icon.png" alt="[#store]" border="0"></a></li>
-<li><a href="##scale_to"><img src="flow_classes/%23scale_to-icon.png" alt="[#scale_to]" border="0"></a></li>
-<li><a href="##scale_by"><img src="flow_classes/%23scale_by-icon.png" alt="[#scale_by]" border="0"></a></li>
-<li><a href="##downscale_by"><img src="flow_classes/%23downscale_by-icon.png" alt="[#downscale_by]" border="0"></a></li>
-<li><a href="##spread"><img src="flow_classes/%23spread-icon.png" alt="[#spread]" border="0"></a></li>
-<li><a href="##rotate"><img src="flow_classes/%23rotate-icon.png" alt="[#rotate]" border="0"></a></li>
-<li><a href="##remap_image"><img src="flow_classes/%23remap_image-icon.png" alt="[#remap_image]" border="0"></a></li>
-</ul>
-<h4><a href="#Objects_for_Reporting">Objects for Reporting</a></h4><ul>
-<li><a href="##dim"><img src="flow_classes/%23dim-icon.png" alt="[#dim]" border="0"></a></li>
-<li><a href="##type"><img src="flow_classes/%23type-icon.png" alt="[#type]" border="0"></a></li>
-<li><a href="##print"><img src="flow_classes/%23print-icon.png" alt="[#print]" border="0"></a></li>
-<li><a href="#rubyprint"><img src="flow_classes/rubyprint-icon.png" alt="[rubyprint]" border="0"></a></li>
-<li><a href="#printargs"><img src="flow_classes/printargs-icon.png" alt="[printargs]" border="0"></a></li>
-<li><a href="#display"><img src="flow_classes/display-icon.png" alt="[display]" border="0"></a></li>
-</ul>
-<h4><a href="#Objects_for_Color_Conversion">Objects for Color Conversion</a></h4><ul>
-<li><a href="##apply_colormap_channelwise"><img src="flow_classes/%23apply_colormap_channelwise-icon.png" alt="[#apply_colormap_channelwise]" border="0"></a></li>
-<li><a href="##rgb_to_greyscale"><img src="flow_classes/%23rgb_to_greyscale-icon.png" alt="[#rgb_to_greyscale]" border="0"></a></li>
-<li><a href="##greyscale_to_rgb"><img src="flow_classes/%23greyscale_to_rgb-icon.png" alt="[#greyscale_to_rgb]" border="0"></a></li>
-<li><a href="##yuv_to_rgb"><img src="flow_classes/%23yuv_to_rgb-icon.png" alt="[#yuv_to_rgb]" border="0"></a></li>
-<li><a href="##rgb_to_yuv"><img src="flow_classes/%23rgb_to_yuv-icon.png" alt="[#rgb_to_yuv]" border="0"></a></li>
-</ul>
-<h4><a href="#Objects_for_Miscellaneous_Picture_Processing">Objects for Miscellaneous Picture Processing</a></h4><ul>
-<li><a href="##convolve"><img src="flow_classes/%23convolve-icon.png" alt="[#convolve]" border="0"></a></li>
-<li><a href="##contrast"><img src="flow_classes/%23contrast-icon.png" alt="[#contrast]" border="0"></a></li>
-<li><a href="##posterize"><img src="flow_classes/%23posterize-icon.png" alt="[#posterize]" border="0"></a></li>
-<li><a href="##solarize"><img src="flow_classes/%23solarize-icon.png" alt="[#solarize]" border="0"></a></li>
-<li><a href="##checkers"><img src="flow_classes/%23checkers-icon.png" alt="[#checkers]" border="0"></a></li>
-<li><a href="##layer"><img src="flow_classes/%23layer-icon.png" alt="[#layer]" border="0"></a></li>
-<li><a href="##draw_image"><img src="flow_classes/%23draw_image-icon.png" alt="[#draw_image]" border="0"></a></li>
-<li><a href="##draw_polygon"><img src="flow_classes/%23draw_polygon-icon.png" alt="[#draw_polygon]" border="0"></a></li>
-<li><a href="##text_to_image"><img src="flow_classes/%23text_to_image-icon.png" alt="[#text_to_image]" border="0"></a></li>
-<li><a href="##hueshift"><img src="flow_classes/%23hueshift-icon.png" alt="[#hueshift]" border="0"></a></li>
-</ul>
-<h4><a href="#Other_Objects">Other Objects</a></h4><ul>
-<li><a href="#rtmetro"><img src="flow_classes/rtmetro-icon.png" alt="[rtmetro]" border="0"></a></li>
-<li><a href="#bindpatcher"><img src="flow_classes/bindpatcher-icon.png" alt="[bindpatcher]" border="0"></a></li>
-<li><a href="#pingpong"><img src="flow_classes/pingpong-icon.png" alt="[pingpong]" border="0"></a></li>
-<li><a href="##global"><img src="flow_classes/%23global-icon.png" alt="[#global]" border="0"></a></li>
-<li><a href="#fps"><img src="flow_classes/fps-icon.png" alt="[fps]" border="0"></a></li>
-<li><a href="#unix_time"><img src="flow_classes/unix_time-icon.png" alt="[unix_time]" border="0"></a></li>
-<li><a href="#ls"><img src="flow_classes/ls-icon.png" alt="[ls]" border="0"></a></li>
-<li><a href="#exec"><img src="flow_classes/exec-icon.png" alt="[exec]" border="0"></a></li>
-<li><a href="#renamefile"><img src="flow_classes/renamefile-icon.png" alt="[renamefile]" border="0"></a></li>
-<li><a href="#plotter_control"><img src="flow_classes/plotter_control-icon.png" alt="[plotter_control]" border="0"></a></li>
-<li><a href="#rubyarray"><img src="flow_classes/rubyarray-icon.png" alt="[rubyarray]" border="0"></a></li>
-</ul>
-<h4><a href="#jMax_emulation">jMax emulation</a></h4><ul>
-<li><a href="#fork"><img src="flow_classes/fork-icon.png" alt="[fork]" border="0"></a></li>
-<li><a href="#jmax_udpsend"><img src="flow_classes/jmax_udpsend-icon.png" alt="[jmax_udpsend]" border="0"></a></li>
-<li><a href="#jmax_udpreceive"><img src="flow_classes/jmax_udpreceive-icon.png" alt="[jmax_udpreceive]" border="0"></a></li>
-<li><a href="#foreach"><img src="flow_classes/foreach-icon.png" alt="[foreach]" border="0"></a></li>
-<li><a href="#rubysprintf"><img src="flow_classes/rubysprintf-icon.png" alt="[rubysprintf]" border="0"></a></li>
-<li><a href="#listflatten"><img src="flow_classes/listflatten-icon.png" alt="[listflatten]" border="0"></a></li>
-<li><a href="#listmake"><img src="flow_classes/listmake-icon.png" alt="[listmake]" border="0"></a></li>
-<li><a href="#listlength"><img src="flow_classes/listlength-icon.png" alt="[listlength]" border="0"></a></li>
-<li><a href="#listelement"><img src="flow_classes/listelement-icon.png" alt="[listelement]" border="0"></a></li>
-<li><a href="#listsublist"><img src="flow_classes/listsublist-icon.png" alt="[listsublist]" border="0"></a></li>
-<li><a href="#listprepend"><img src="flow_classes/listprepend-icon.png" alt="[listprepend]" border="0"></a></li>
-<li><a href="#listappend"><img src="flow_classes/listappend-icon.png" alt="[listappend]" border="0"></a></li>
-<li><a href="#listreverse"><img src="flow_classes/listreverse-icon.png" alt="[listreverse]" border="0"></a></li>
-<li><a href="#oneshot"><img src="flow_classes/oneshot-icon.png" alt="[oneshot]" border="0"></a></li>
-<li><a href="#inv+"><img src="flow_classes/inv+-icon.png" alt="[inv+]" border="0"></a></li>
-<li><a href="#inv*"><img src="flow_classes/inv*-icon.png" alt="[inv*]" border="0"></a></li>
-<li><a href="#messageprepend"><img src="flow_classes/messageprepend-icon.png" alt="[messageprepend]" border="0"></a></li>
-<li><a href="#messageappend"><img src="flow_classes/messageappend-icon.png" alt="[messageappend]" border="0"></a></li>
-<li><a href="#shunt"><img src="flow_classes/shunt-icon.png" alt="[shunt]" border="0"></a></li>
-<li><a href="#demux"><img src="flow_classes/demux-icon.png" alt="[demux]" border="0"></a></li>
-<li><a href="#range"><img src="flow_classes/range-icon.png" alt="[range]" border="0"></a></li>
-</ul>
-<h4><a href="#PureData_emulation">PureData emulation</a></h4><ul>
-<li><a href="#pd_netsend"><img src="flow_classes/pd_netsend-icon.png" alt="[pd_netsend]" border="0"></a></li>
-<li><a href="#pd_netreceive"><img src="flow_classes/pd_netreceive-icon.png" alt="[pd_netreceive]" border="0"></a></li>
-</ul>
-<h4><a href="#(new_documentation)">(new documentation)</a></h4><ul>
-<li><a href="#listfind"><img src="flow_classes/listfind-icon.png" alt="[listfind]" border="0"></a></li>
-<li><a href="#memstat"><img src="flow_classes/memstat-icon.png" alt="[memstat]" border="0"></a></li>
-<li><a href="#regsub"><img src="flow_classes/regsub-icon.png" alt="[regsub]" border="0"></a></li>
-<li><a href="#sendgui"><img src="flow_classes/sendgui-icon.png" alt="[sendgui]" border="0"></a></li>
-<li><a href="#sys_vgui"><img src="flow_classes/sys_vgui-icon.png" alt="[sys_vgui]" border="0"></a></li>
-</ul>
-<h4><a href="#(undocumented)">(undocumented)</a></h4><ul>
-</ul>
-<br><br>
-</div></td></tr> <tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="Objects_for_making_grids_and_breaking_them_down"></a><h4>Objects for making grids and breaking them down</h4></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#import">#import</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23import-icon.png" alt="[#import]" border="0"><br clear="left"><br><br><a href="#importexport"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br>
- <p>This object allows you to produce grids from non-grid data, such as
- integers and lists of integers. This object also reframes/resyncs
- grids so that multiple grids may be joined together, or
- single grids may be split. That kind of operation is already done implicitly in many
- cases (e.g. sending an integer or list to a grid-receiving inlet),
- but using this object you have greater flexibility on the conversion.</p> <br><b>attr</b>&nbsp;shape <b>(</b><b><i>GridShape|symbol(per_message)</i> shape</b><b>)</b> <br><b>attr</b>&nbsp;cast <b>(</b><b><i>NumberType</i> cast</b><b>)</b> <br><b>method</b>&nbsp;init <b>(</b>shape<b>, </b>cast<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;int <b>(</b><b>)</b>
- begins a new grid if there is no current grid.
- puts that integer in the current grid.
- ends the grid if it is full.
- the constructed grid is not stored: it is streamed.
- the stream is buffered, so the output is in packets
- of about a thousand numbers. <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;list <b>(</b><b>)</b>
- just like a sequence of ints sent one after another,
- except in a single message. <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;symbol <b>(</b><b>)</b>
- considered as a list of ascii characters. <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;reset <b>(</b><b>)</b>
- aborts the current grid if there is one. <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(dims...)</i> grid<b>)</b>
- this is the equivalent of filtering this grid through
- an <kbd><font color="#007777">[#export]</font></kbd> object and sending the resulting integers
- to this <kbd><font color="#007777">[#import]</font></kbd> object, except that it's over
- 10 times faster. <br>
- <br><b>inlet&nbsp;1 </b><b>method</b>&nbsp;per_message <b>(</b><b>)</b>
- old synonym for "shape per_message" <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid</i> grid<b>)</b>
- the grid produced from incoming integers and/or grids. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#export">#export</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23export-icon.png" alt="[#export]" border="0"><br clear="left"><br><br><a href="#importexport"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br>
- <p>this object is the opposite of #import.</p> <br><b>method</b>&nbsp;init <b>(</b><b>)</b>
- this object is not configurable because there isn't
- anything that could possibly be configured here. <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(dims...)</i> grid<b>)</b>
- transforms this grid into a sequence of integer messages. <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;int <b>(</b><b>)</b>
- elements of the incoming grid. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#export_list">#export_list</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23export_list-icon.png" alt="[#export_list]" border="0"><br clear="left"><br><br><a href="#importexport"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br>
- <p>this object is another opposite of <kbd><font color="#007777">[#import]</font></kbd>, which puts
- all of its values in a list.</p> <br><b>method</b>&nbsp;init <b>(</b><b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(dims...)</i> grid<b>)</b>
- transforms this grid into a single message containing
- a list of integers. <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;list <b>(</b><b>)</b>
- elements of the incoming grid. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#export_symbol">#export_symbol</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23export_symbol-icon.png" alt="[#export_symbol]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>this object is another opposite of #import, which constructs a symbol
- from its input. The values are expected to be valid ASCII codes, but no check
- will be performed for that, and additionally, no check will be made that the generated
- symbol only contains characters that can be put in a symbol.</p> <br><b>method</b>&nbsp;init <b>(</b><b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(dims...)</i> grid<b>)</b>
- transforms this grid into a single message containing
- a list of integers. <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;symbol <b>(</b><b>)</b> generated symbol<br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#pack">#pack</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23pack-icon.png" alt="[#pack]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>Similar to <kbd><font color="#007777">[#join]</font></kbd>, but takes individual integers, and builds a Dim(N) vector out of it. </p> <br><b>attr</b>&nbsp;trigger_by <b>(</b><b><i>TriggerBy</i> trigger_by</b><b>)</b> <br><b>method</b>&nbsp;init <b>(</b><i>integer</i> inputs<b>)</b> <br>
- <br><b>inlet&nbsp;* </b><b>method</b>&nbsp;int <b>(</b><b>)</b> <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><b>)</b>
- combination of inputs given in all inlets.
- this is produced according to the value of the trigger attribute. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#color">#color</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23color-icon.png" alt="[#color]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>Triple slider for the selection of RGB values.</p> <br><b>method</b>&nbsp;init <b>(</b><i>float</i> min<b>, </b><i>float</i> max<b>, </b><i>0,1</i> hidepreview<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><b>)</b>
- changes all three values (R,G,B). The grid must
- be a Dim(3). <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;delegate <b>(</b><b>)</b>
- sends the rest of the message to each of the three sliders.
- this relies on the fact that [#color] is implemented using
- three [hsl] and this might not still work in the far future. <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><b>)</b>
- Produces a Dim(3) grid of RGB values. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#unpack">#unpack</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23unpack-icon.png" alt="[#unpack]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;init <b>(</b><i>integer</i> outputs<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid(N) <b>(</b><b>)</b>
- the input vector is split in N parts containing one number each.
- numbers are sent left-to-right, that is, outlet 0 is triggered first, then outlet 1, etc. <br>
- <br><b>outlet&nbsp;* </b><b>method</b>&nbsp;int <b>(</b><b>)</b> <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#centroid">#centroid</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23centroid-icon.png" alt="[#centroid]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;init <b>(</b><b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid(rows,columns,1) <b>(</b><b>)</b>
- will compute the centroid of the given grid, which
- is a weighted average, namely, the average position weighted
- by the pixel values. <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;grid(2) <b>(</b><b>)</b>
- result <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#centroid2">#centroid2</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23centroid2-icon.png" alt="[#centroid2]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
-
- a new experimental and faster version of #centroid. <br><b>method</b>&nbsp;init <b>(</b><b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid(rows,columns,1) <b>(</b><b>)</b>
- will compute the centroid of the given grid, which
- is a weighted average, namely, the average position weighted
- by the pixel values. <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;grid(2) <b>(</b><b>)</b>
- result <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#for">#for</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23for-icon.png" alt="[#for]" border="0"><br clear="left"><br><br><a href="#for"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br>
- <p>when given scalar bounds, works like a regular <kbd><font color="#007777">[for]</font></kbd> object plugged
- to a <kbd><font color="#007777">[#import]</font></kbd> tuned for a Dim(size) where size is the number of values
- produced by a bang to that <kbd><font color="#007777">[for]</font></kbd>.</p> <p>when given vector bounds, will work like any number of [for] objects
- producing all possible combinations of their values in the proper order.
- This replaces the old <kbd><font color="#007777">[#identity_transform]</font></kbd> object.</p> <br><b>method</b>&nbsp;init <b>(</b><i>integer</i> from<b>, </b><i>integer</i> to<b>, </b><i>integer</i> step<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(index)</i> grid<b>)</b>
- replaces the "from" value and produces output. <br>
- <br><b>inlet&nbsp;1 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(index)</i> grid<b>)</b>
- replaces the "to" value. <br>
- <br><b>inlet&nbsp;2 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(index_steps)</i> grid<b>)</b>
- replaces the "step" value. <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(size)</i> grid<b>)</b>
- where size is floor((to-from+1)/step)
- [for scalar bounds] <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(*size,dimension)</i> grid<b>)</b>
- where *size is floor((to-from+1)/step)
- [for vector bounds] <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="Objects_for_Computing"></a><h4>Objects for Computing</h4></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#">#</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23-icon.png" alt="[#]" border="0"><br clear="left"><br><br><a href="#"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br>
- <br><b>attr</b>&nbsp;op <b>(</b><b><i>grid</i> op</b><b>)</b> <br><b>attr</b>&nbsp;right_hand <b>(</b><b><i>grid</i> right_hand</b><b>)</b> <p>This object outputs a grid by computing "in parallel" a same
- operation on each left-hand element with its corresponding right-hand
- element. </p> <br><b>method</b>&nbsp;init <b>(</b>op<b>, </b>right_hand<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(dims...)</i> grid<b>)</b>
- on each element of this grid, perform the operation
- together with the corresponding element of inlet 1.
- in the table of operators (at the top of this document)
- elements of inlet 0 are called "A" and elements of inlet 1
- are called "B". the resulting grid is the same size as the
- one in inlet 0. <br>
- <br><b>inlet&nbsp;1 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(dims...)</i> grid<b>)</b>
- any grid, preferably shaped like the one that will be put
- in the left inlet, or like a subpart of it (anyway the contents
- will be redim'ed on-the-fly to fit the grid of inlet-0,
- but the stored grid will not be modified itself) <br>
- <br><b>inlet&nbsp;1 </b><b>method</b>&nbsp;int <b>(</b><b>)</b>
- stores a single int in the right inlet; the same int will
- be applied in all computations; this is like sending a
- Dim(1) or Dim() grid with that number in it. <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid</i> grid<b>)</b> <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="@complex_sq">@complex_sq</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/@complex_sq-icon.png" alt="[@complex_sq]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>this object computes the square of complex numbers.
- If seeing imaginary as Y and real as X, then this operation squares
- the distance of a point from origin and doubles the angle between it
- and the +X half-axis clockwise. (fun, eh?) </p> <p>used on an indexmap, this makes each thing appear twice,
- each apparition spanning half of the original angle.</p> <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(dims... {imaginary real})</i> grid<b>)</b> <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(dims... {imaginary real})</i> grid<b>)</b> <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#fold">#fold</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23fold-icon.png" alt="[#fold]" border="0"><br clear="left"><br><br><a href="#foldinnerouter"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br>
- <p><ul> <li><b>1</b> : <kbd><font color="#007777">[#fold +]</font></kbd> computes totals</li> <li><b>2</b> : <kbd><font color="#007777">[#fold inv+]</font></kbd> is an alternated sum (+/-)</li> <li><b>3</b> : <kbd><font color="#007777">[#fold * 1]</font></kbd> can compute the size of a grid using its dimension list</li> <li><b>4</b> : <kbd><font color="#007777">[#fold &amp; 1]</font></kbd> can mean "for all"</li> <li><b>5</b> : <kbd><font color="#007777">[#fold | 0]</font></kbd> can mean "there exists (at least one)"</li> <li><b>6</b> : <kbd><font color="#007777">[#fold ^ 0]</font></kbd> can mean "there exists an odd number of..."</li> <li><b>7</b> : <kbd><font color="#007777">[#fold ^ 1]</font></kbd> can mean "there exists an even number of...".</li> </ul></p> <br><b>method</b>&nbsp;init <b>(</b><i>numop2</i> operator<b>, </b><i>grid</i> seed<b>, </b><i>grid</i> right_hand<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(dims..., last)</i> grid<b>)</b>
- replaces every Dim(last) subgrid by the result of a cascade on that subgrid.
- Doing that
- with seed value 0 and operation + on grid "2 3 5 7" will compute
- ((((0+2)+3)+5)+7) find the total "17".
- produces a Dim(dims) grid. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#scan">#scan</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23scan-icon.png" alt="[#scan]" border="0"><br clear="left"><br><br><a href="#scan"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br>
- <p><kbd><font color="#007777">[#scan +]</font></kbd> computes subtotals; this can be used, for example,
- to convert a regular probability distribution into a cumulative one.
- (or in general, discrete integration) </p> <br><b>method</b>&nbsp;init <b>(</b><i>numop2</i> operator<b>, </b><i>grid</i> seed<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(dims..., last)</i> grid<b>)</b>
- replaces every Dim(last) subgrid by all the results of
- cascading the operator on that subgrid,
- producing a Dim(dims,last) grid.
- For example, with base value 0 and operation + on grid "2 3 5
- 7" will compute 0+2=2, 2+3=5, 5+5=10, 10+7=17, and give the
- subtotals "2 5 10 17". <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#outer">#outer</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23outer-icon.png" alt="[#outer]" border="0"><br clear="left"><br><br><a href="#foldinnerouter"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;init <b>(</b><i>numop2</i> operator<b>, </b><i>grid</i> value<b>)</b>
- the operator must be picked from the table of two-input operators.
- the grid is optional and corresponds to inlet 1. <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(anyA...)</i> grid<b>)</b> <br>
-
- produces a grid of size Dim(anyA..., anyB...), where numbers
- are the results of the operation on every element of A and
- every element of B. the resulting array can be very big. Don't
- try this on two pictures (the result will have 6 dimensions) <br><b>inlet&nbsp;1 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(anyB...)</i> grid<b>)</b> <br>
-
- stores the specified grid, to be used when inlet 0 is activated. <p>When given a grid of Dim(3) and a grid of Dim(5) <kbd><font color="#007777">[#outer]</font></kbd> will
- produce a grid of Dim(3,5) with the selected two-input operation
- applied on each of the possible pairs combinations between numbers
- from the left grid and the ones from the right. for example :
- (10,20,30) [#outer +] (1,2,3) will give :
- ((11,12,13),(21,22,23),(31,32,33)) </p> <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#inner">#inner</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23inner-icon.png" alt="[#inner]" border="0"><br clear="left"><br><br><a href="#inner"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br>
- <p>think of this one as a special combination of <kbd><font color="#007777">[#outer]</font></kbd>, <kbd><font color="#007777">[#]</font></kbd> and <kbd><font color="#007777">[#fold]</font></kbd>. this is one of the most complex operations. It is very useful
- for performing linear transforms like rotations, scalings, shearings,
- and some kinds of color remappings. A linear transform is done by
- something called matrix multiplication, which happens to be <kbd><font color="#007777">[#inner * +
- 0]</font></kbd>. <kbd><font color="#007777">[#inner]</font></kbd> also does dot product and other funny operations.</p> <br><b>method</b>&nbsp;init <b>(</b><i>numop2</i> op_para<b>, </b><i>numop2</i> op_fold<b>, </b><i>integer</i> base<b>, </b><i>grid</i> right_hand<b>)</b>
- op_para and op_fold are two operators picked from the table
- of two-input operators.
- the base value has to be specified (has no default value yet). <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(anyA..., lastA)</i> grid<b>)</b>
- Splits the Dim(anyA...,lastA) left-hand grid into Dim(anyA...)
- pieces of Dim(lastA) size.
- Splits the Dim(firstB,anyB...) right-hand grid into
- Dim(anyB...) pieces of Dim(firstB) size.
- On every piece pair, does <kbd><font color="#007777">[#]</font></kbd> using the specified
- op_para operation, followed by a <kbd><font color="#007777">[#fold]</font></kbd> using
- the specified op_fold operator and base value.
- creates a Dim(anyA...,anyB...) grid by assembling all
- the results together.
- (note: lastA must be equal to firstB.) <br>
- <br><b>inlet&nbsp;1 </b><b>method</b>&nbsp;int <b>(</b><b>)</b>
- changes the base value to that. <br>
- <br><b>inlet&nbsp;2 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(anyB..., lastB)</i> grid<b>)</b>
- changes the right-hand side grid to that. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="@join">@join</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/@join-icon.png" alt="[@join]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;init <b>(</b>which_dim<b>)</b>
- Which_dim is the number of the dimension by which the join will
- occur. For N-dimensional grids, the dimensions are numbered from 0
- to N-1. In addition, negative numbers from -N to -1 may be used, to
- which N will be added. <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid</i> grid<b>)</b>
- The left grid and right grid must have the same number
- of elements in all dimensions except the one specified.
- The result will have the same number of elements in all
- dimensions except the one specified, which will be the
- sum of the two corresponding one. <p>For example, joining a RGB picture Dim[y,x,3] and a
- greyscale picture Dim[y,x,1] on dimension 2 (or -1) could
- make a RGBA picture Dim[y,x,4] in which the greyscale image
- becomes the opacity channel. </p> <br>
- <br><b>inlet&nbsp;1 </b><b>method</b>&nbsp;grid <b>(</b><i>grid</i> grid<b>)</b> <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#finished">#finished</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23finished-icon.png" alt="[#finished]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid</i> grid<b>)</b> any grid<br>
-
- a bang is emitted every time a grid transmission ends. <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#cast">#cast</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23cast-icon.png" alt="[#cast]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;init <b>(</b><i>numbertype</i> numbertype<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid</i> grid<b>)</b> any grid<br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid</i> grid<b>)</b> a grid of the same shape containing all the same
- values after type conversion. note that while casting to
- a smaller type, values that are overflowing will be truncated. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#ravel">#ravel</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23ravel-icon.png" alt="[#ravel]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid</i> grid<b>)</b> any grid<br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid</i> grid<b>)</b>
- like <kbd><font color="#007777">[#redim]</font></kbd> but always produce a 1-D grid
- with the same total number of elements. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#grade">#grade</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23grade-icon.png" alt="[#grade]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid</i> grid<b>)</b> any grid<br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid</i> grid<b>)</b> <p>splits a Dim[A...,B] grid into Dim[B] vectors,
- producing new Dim[B] vectors that each contain numbers from
- 0 to B-1 indicating the ordering of the values. The result is
- a Dim[A...,B] grid.</p> <p>for example, connecting a [#grade] to a <kbd><font color="#007777">[#outer ignore {0}]</font></kbd>
- to a <kbd><font color="#007777">[#store]</font></kbd> object, storing a single vector into <kbd><font color="#007777">[#store]</font></kbd>, and
- sending the same vector to <kbd><font color="#007777">[#grade]</font></kbd>, will sort the values of the
- vector. however for higher-dimensional grids, what should go
- between <kbd><font color="#007777">[#store]</font></kbd> and <kbd><font color="#007777">[#grade]</font></kbd> to achieve the same result would
- be more complex.</p> <p>you may achieve different kinds of sorting by applying various
- filters before <kbd><font color="#007777">[#grade]</font></kbd>. the possibilities are unlimited.</p> <p>if you plug <kbd><font color="#007777">[#grade]</font></kbd> directly into another <kbd><font color="#007777">[#grade]</font></kbd>, you will
- get the inverse arrangement, which allows to take the sorted values
- and make them unsorted in the original way. note that this is really
- not the same as just listing the values backwards.</p> <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#perspective">#perspective</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23perspective-icon.png" alt="[#perspective]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;init <b>(</b><i>integer</i> depth<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid</i> grid<b>)</b> any grid<br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid</i> grid<b>)</b> <p>transforms a Dim[A...,B] grid into a Dim[A...,B-1] grid.
- There is a projection plane perpendicular to the last axis and
- whose position is given by the "depth" parameter. Each vector's
- length is adjusted so that it lies onto that plane. Then the
- last dimension of each vector is dropped.</p> <p>useful for converting from 3-D geometry to 2-D geometry. Also
- useful for converting homogeneous 3-D into regular 3-D, as
- homogeneous 3-D is really just regular 4-D...(!)</p> <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#transpose">#transpose</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23transpose-icon.png" alt="[#transpose]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;init <b>(</b><i>integer</i> dim1<b>, </b><i>integer</i> dim2<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid</i> grid<b>)</b>
- swaps the two specified dimensions; dimension numbers are as in <kbd><font color="#007777">[#join]</font></kbd>. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#fade">#fade</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23fade-icon.png" alt="[#fade]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;init <b>(</b><i>integer</i> rate<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid</i> grid<b>)</b>
- produces on outlet 0 a linear recurrent fading according to the flow of
- incoming messages. For example, if rate=5, then 20% (one fifth)
- of each new message will be blended with 80% of the previous output. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#fade_lin">#fade_lin</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23fade_lin-icon.png" alt="[#fade_lin]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;init <b>(</b><i>integer</i> maxraise<b>, </b><i>integer</i> maxdrop<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid</i> grid<b>)</b>
- produces on outlet 0 a piecewise-linear nonrecurrent fading according to the flow of
- incoming messages. For example, if maxraise=2 and maxdrop=4, then with each
- new message an output is produced that is at most 2 more or 4 less than the
- previous output. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#reverse">#reverse</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23reverse-icon.png" alt="[#reverse]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;init <b>(</b>whichdim<b>)</b>
- Whichdim is the number of the dimension by which the reverse will
- occur. For N-dimensional grids, the dimensions are numbered from 0
- to N-1. In addition, negative numbers from -N to -1 may be used, to
- which N will be added. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="Objects_for_Coordinate_Transforms"></a><h4>Objects for Coordinate Transforms</h4></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#redim">#redim</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23redim-icon.png" alt="[#redim]" border="0"><br clear="left"><br><br><a href="#redim"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;init <b>(</b><i>dim_list</i> dims<b>)</b>
- a list specifying a grid shape that the numbers
- will fit into.
- (same as with <kbd><font color="#007777">[#import]</font></kbd>) <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(dims...)</i> grid<b>)</b>
- the elements of this grid are serialized. if the resulting grid
- must be larger, the sequence is repeated as much as necessary.
- if the resulting grid must be smaller, the sequence is truncated.
- then the elements are deserialized to form the resulting grid. <br>
- <br><b>inlet&nbsp;1 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(rank)</i> grid<b>)</b>
- this grid is a dimension list that replaces the one
- specified in the constructor.
- (same as with <kbd><font color="#007777">[#import]</font></kbd>) <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid</i> grid<b>)</b>
- redimensioned grid potentially containing repeating data. <br>
- <p>example: with a 240 320 RGB image, <kbd><font color="#007777">[#redim 120 640 3]</font></kbd> will visually
- separate the even lines (left) from the odd lines (right). contrary
- to this, <kbd><font color="#007777">[#redim 640 120 3]</font></kbd> will split every line and put its left half
- on a even line and the right half on the following odd line. <kbd><font color="#007777">[#redim]</font></kbd>
- 480 320 3 will repeat the input image twice in the output image. <kbd><font color="#007777">[#redim]</font></kbd> 240 50 3 will only keep the 50 top lines.</p> <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#store">#store</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23store-icon.png" alt="[#store]" border="0"><br clear="left"><br><br><a href="#store"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br>
- <p>A <kbd><font color="#007777">[#store]</font></kbd> object can store exactly one grid, using the right
- inlet. You fetch it back, or selected subparts thereof, using the left
- inlet.</p> <br><b>method</b>&nbsp;init <b>(</b><i>grid</i> contents<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;bang <b>(</b><b>)</b>
- the stored grid is fully sent to the outlet. <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(dims..., indices)</i> grid<b>)</b>
- in this grid, the last dimension refers to subparts of
- the stored grid. sending a Dim(200,200,2) on a <kbd><font color="#007777">[#store]</font></kbd>
- that holds a Dim(240,320,3) will cause the <kbd><font color="#007777">[#store]</font></kbd> to handle
- the incoming grid as a Dim(200,200) of Dim(2)'s, where each
- Dim(2) represents a position in a Dim(240,320) of Dim(3)'s.
- therefore the resulting grid will be a Dim(200,200) of
- Dim(3) which is a Dim(200,200,3). in practice this example
- would be used for generating a 200*200 RGB picture from a
- 200*200 XY map and a 240*320 RGB picture. this object can
- be logically used in the same way for many purposes
- including color palettes, tables of probabilities, tables
- of statistics, whole animations, etc. <br>
- <br><b>inlet&nbsp;1 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(dims...)</i> grid<b>)</b>
- replace the whole grid, or a subpart of it (see other options on inlet 1) <br>
- <br><b>inlet&nbsp;1 </b><b>method</b>&nbsp;reassign <b>(</b><b>)</b> (Future Use):
- makes it so that sending a grid to inlet 1 detaches the old buffer from [#store]
- and attaches a new one instead. This is the default. <br>
- <br><b>inlet&nbsp;1 </b><b>method</b>&nbsp;put_at <b>(</b>indices...<b>)</b> (Future Use):
- makes it so that sending a grid to inlet 1 writes into the existing buffer of [#store]. <p>
- example: suppose you have <kbd><font color="#007777">[#store {10 240 320 3}]</font></kbd>. then "put_at 3"
- will allow to write a Dim[240,320,3] grid in indices (3,y,x,c) where y,x,c are indices of the incoming grid;
- in other words, if that's a buffer of 10 RGB frames, you'd be replacing frame #3. Furthermore,
- it also allows you to write a Dim[n,240,320,3] grid at (3+f,y,x,c) where f,y,x,c are indices of the incoming grid,
- replacing frame #3, #4, ... up to #3+n-1. Here n is at most 7 because the last frame in the buffer is #9. </p> <p>that way of working extends to other kinds of data you'd put in Grids, in any numbers of dimensions;
- because, as usual, [#store] wouldn't know the difference. </p> <br>
-
- grids as stored, as indexed, or as assembled from multiple
- indexings. <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#scale_to">#scale_to</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23scale_to-icon.png" alt="[#scale_to]" border="0"><br clear="left"><br><br><a href="#scale_to"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;init <b>(</b>size<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid</i> grid<b>)</b> a 3-channel picture to be scaled.<br>
- <br><b>inlet&nbsp;1 </b><b>method</b>&nbsp;int <b>(</b><b>)</b> a {height width} pair.<br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid</i> grid<b>)</b> a scaled 3-channel picture.<br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#scale_by">#scale_by</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23scale_by-icon.png" alt="[#scale_by]" border="0"><br clear="left"><br><br><a href="#scale_by"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;init <b>(</b><i>grid dim() or dim(2)</i> factor<b>)</b>
- factor is optional (default is 2).
- if it's a single value, then that factor is to be used
- for both rows and columns. <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(y x channels)</i> grid<b>)</b>
- duplicates each pixel several times in width and several times in height,
- where the number of times is determined by the factor described above.
- twice those of the incoming grid. It is several times faster. <br>
- <br><b>inlet&nbsp;1 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(1 or 2)</i> grid<b>)</b> sets factor<br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid((factor*y) (factor*x) channels)</i> grid<b>)</b> <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#downscale_by">#downscale_by</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23downscale_by-icon.png" alt="[#downscale_by]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;init <b>(</b><i>+integer</i> factor<b>, </b><i>optional symbol(smoothly)</i> how<b>)</b>
- factor is optional (default is 2).
- if it's a single value, then that factor is to be used
- for both rows and columns. <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(y x channels)</i> grid<b>)</b>
- Scales down picture by specified amount. (See scale factor above) <br>
- <br><b>inlet&nbsp;1 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(1 or 2)</i> grid<b>)</b> sets scale factor<br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid((factor/y) (factor/x) channels)</i> grid<b>)</b> <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#spread">#spread</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23spread-icon.png" alt="[#spread]" border="0"><br clear="left"><br><br><a href="#spread"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br>
- <p>typically you plug a <kbd><font color="#007777">[#for]</font></kbd> into this object,
- and you plug this object into the left side of a <kbd><font color="#007777">[#store]</font></kbd>. it will
- scatter pixels around, giving an "unpolished glass" effect.</p> <p>if you put a picture in it, however, it will add noise. The
- resulting values may be out of range, so you may need to clip them
- using min/max.</p> <br><b>method</b>&nbsp;init <b>(</b>factor<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid</i> grid<b>)</b> a coordinate map.<br>
- <br><b>inlet&nbsp;1 </b><b>method</b>&nbsp;int <b>(</b><b>)</b> a spread factor.<br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid</i> grid<b>)</b> a coordinate map.<br>
- <p><kbd><font color="#007777">[#spread]</font></kbd> scatters the pixels in an image. Not all original pixels
- will appear, and some may get duplicated (triplicated, etc)
- randomly. Some wrap-around effect will occur close to the edges. </p> <p> Sending an integer to inlet 1 sets the amount of spreading in
- maximum number of pixels + 1. even values translate the whole image
- by half a pixel due to rounding.</p> <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#rotate">#rotate</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23rotate-icon.png" alt="[#rotate]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>performs rotations on indexmaps and polygons and such.</p> <br><b>method</b>&nbsp;init <b>(</b><i>0...35999</i> angle<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(anyA 2)</i> grid<b>)</b> <br>
- <br><b>inlet&nbsp;1 </b><b>method</b>&nbsp;int <b>(</b><b>)</b> rotation angle; 0...36000<br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(anyA 2)</i> grid<b>)</b> <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#remap_image">#remap_image</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23remap_image-icon.png" alt="[#remap_image]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>if you chain indexmap (coordinate) transformations from outlet 1
- to inlet 1, then sending an image in inlet 0 will emit its
- deformation out of outlet 0.</p> <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="Objects_for_Reporting"></a><h4>Objects for Reporting</h4></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#dim">#dim</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23dim-icon.png" alt="[#dim]" border="0"><br clear="left"><br><br><a href="#dim"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br>
- <p>Returns list of dimensions as a grid. Given a grid sized like Dim(240,320,4), <kbd><font color="#007777">[#dim]</font></kbd> will return a grid like Dim(3), whose values are 240, 320, 4. </p> <br><b>method</b>&nbsp;init <b>(</b><b>)</b>
- no arguments. <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(dims...)</i> grid<b>)</b>
- ignores any data contained within.
- sends a grid dim(length of dims) containing dims. <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(rank)</i> grid<b>)</b>
- the list of dimensions of the incoming grid. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#type">#type</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23type-icon.png" alt="[#type]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>gives a symbol representing the numeric type of the grid received. </p> <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;&lt;numeric type symbol&gt; <b>(</b><b>)</b> <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#print">#print</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23print-icon.png" alt="[#print]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;init <b>(</b><b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(dims...)</i> grid<b>)</b>
- prints the dimensions of the grid.
- prints all the grid data if there are 2 dimensions or less. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="rubyprint">rubyprint</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/rubyprint-icon.png" alt="[rubyprint]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
-
- This is only for testing the translation from PD to Ruby. <br><b>method</b>&nbsp;init <b>(</b><b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;(any) <b>(</b><b>)</b>
- prints the message to the console. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="printargs">printargs</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/printargs-icon.png" alt="[printargs]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
-
- This is only for testing the translation from PD to Ruby. <br><b>method</b>&nbsp;init <b>(</b>any...<b>)</b>
- prints everything. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="display">display</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/display-icon.png" alt="[display]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
-
- GUI object equivalent to [print] and [#print]. <br><b>method</b>&nbsp;(any) <b>(</b><b>)</b>
- Displays the received message in the box, resizing the box so that the message fits exactly. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="Objects_for_Color_Conversion"></a><h4>Objects for Color Conversion</h4></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#apply_colormap_channelwise">#apply_colormap_channelwise</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23apply_colormap_channelwise-icon.png" alt="[#apply_colormap_channelwise]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>This object is useful for color correction. For each pixel
- it takes it apart, looks up each part separately in the colormap,
- and constructs a new pixel from that. You may also color-correct
- colormaps themselves.</p> <p>Only works for things that have 3 channels.</p> <p>Note: if you just need to apply a palette on an indexed-color
- picture, you don't need this. Just use #store instead.</p> <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(rows columns channels)</i> grid<b>)</b>
- picture <br>
- <br><b>inlet&nbsp;1 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(intensities channels)</i> grid<b>)</b>
- colormap ("palette") <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(rows columns channels)</i> grid<b>)</b>
- picture <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#rgb_to_greyscale">#rgb_to_greyscale</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23rgb_to_greyscale-icon.png" alt="[#rgb_to_greyscale]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(rows columns {red green blue})</i> grid<b>)</b> <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(rows columns {white})</i> grid<b>)</b> <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#greyscale_to_rgb">#greyscale_to_rgb</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23greyscale_to_rgb-icon.png" alt="[#greyscale_to_rgb]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(rows columns {white})</i> grid<b>)</b> <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(rows columns {red green blue})</i> grid<b>)</b> <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#yuv_to_rgb">#yuv_to_rgb</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23yuv_to_rgb-icon.png" alt="[#yuv_to_rgb]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>note: may change slightly to adapt to actual video standards.</p> <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(rows columns {y u v})</i> grid<b>)</b> <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(rows columns {red green blue})</i> grid<b>)</b> <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#rgb_to_yuv">#rgb_to_yuv</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23rgb_to_yuv-icon.png" alt="[#rgb_to_yuv]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>note: may change slightly to adapt to actual video standards.</p> <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(rows columns {red green blue})</i> grid<b>)</b> <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(rows columns {y u v})</i> grid<b>)</b> <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="Objects_for_Miscellaneous_Picture_Processing"></a><h4>Objects for Miscellaneous Picture Processing</h4></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#convolve">#convolve</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23convolve-icon.png" alt="[#convolve]" border="0"><br clear="left"><br><br><a href="#convolve"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br>
- <p>this is the object for blurring, sharpening, finding edges,
- embossing, cellular automata, and many other uses.</p> <br><b>method</b>&nbsp;init <b>(</b><i>numop2</i> op_para<b>, </b><i>numop2</i> op_fold<b>, </b><i>grid</i> seed<b>, </b><i>grid</i> right_hand<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(rows columns rest...)</i> grid<b>)</b>
- splits the incoming grid into dim(rest...) parts.
- for each of those parts at (y,x), a rectangle of such
- parts, centered around (y,x), is combined with the
- convolution grid like a <kbd><font color="#007777">[#]</font></kbd> of operation op_para. Then
- each such result is folded like <kbd><font color="#007777">[#fold]</font></kbd> of operation
- op_fold and specified base. the results are assembled
- into a grid that is sent to the outlet. near the borders of
- the grid, coordinates wrap around. this means the whole grid
- has to be received before production of the next grid
- starts. <br>
- <br><b>inlet&nbsp;1 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(rows2 columns2)</i> grid<b>)</b>
- this is the convolution grid and it gets stored in
- the object. if rows2 and/or columns2 are odd numbers,
- then the centre of convolution is the middle of the convolution
- grid. if they are even numbers, then the chosen centre will
- be slightly more to the left and/or to the top, because the
- actual middle is between cells of the grid. <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(rows columns rest...)</i> grid<b>)</b> <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#contrast">#contrast</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23contrast-icon.png" alt="[#contrast]" border="0"><br clear="left"><br><br><a href="#contrast"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;init <b>(</b>iwhiteness<b>, </b>contrast<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(rows columns channels)</i> grid<b>)</b>
- produces a grid like the incoming grid but with
- different constrast. <br>
- <p><kbd><font color="#007777">[#contrast]</font></kbd> adjusts the intensity in an image.
- resulting values outside 0-255 are automatically clipped.</p> <br><b>inlet&nbsp;1 </b><b>method</b>&nbsp;int <b>(</b><b>)</b>
- this is the secondary contrast (inverse whiteness).
- it makes the incoming black
- correspond to a certain fraction between output black and the
- master contrast value. no effect is 256. default value is 256. <br>
- <br><b>inlet&nbsp;2 </b><b>method</b>&nbsp;int <b>(</b><b>)</b>
- this is the master contrast. it makes the incoming white
- correspond to a certain fraction between output black and output
- white. no effect is 256. default value is 256. <br>
- <br><b>outlet&nbsp; </b><b>method</b>&nbsp;grid <b>(</b><i>grid(rows columns channels)</i> grid<b>)</b> <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#posterize">#posterize</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23posterize-icon.png" alt="[#posterize]" border="0"><br clear="left"><br><br><a href="#posterize"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br>
- <p><kbd><font color="#007777">[#posterize]</font></kbd> reduces the number of possible intensities in an image;
- it rounds the color values.The effect is mostly apparent with a low
- number of levels.</p> <br><b>method</b>&nbsp;init <b>(</b>levels<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(rows columns channels)</i> grid<b>)</b>
- produces a posterized picture from the input picture. <br>
- <br><b>inlet&nbsp;1 </b><b>method</b>&nbsp;int <b>(</b><b>)</b>
- this is the number of possible levels per channel. the
- levels are equally spaced, with the lowest at 0 and the
- highest at 255. the minimum number of levels is 2, and the
- default value is 2. <br>
- <p>example: simulate the 216-color "web" palette using 6 levels.
- simulate a 15-bit display using 32 levels.</p> <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#solarize">#solarize</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23solarize-icon.png" alt="[#solarize]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>makes medium intensities brightest; formerly brightest colours
- become darkest; formerly darkest stays darkest. This filter is linear:
- it's like a 200% contrast except that overflows are <i>mirrored</i>
- instead of clipped or wrapped.</p> <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(rows columns channels)</i> grid<b>)</b> <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(rows columns channels)</i> grid<b>)</b> <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#checkers">#checkers</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23checkers-icon.png" alt="[#checkers]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(y x {y x})</i> grid<b>)</b>
- result from a <kbd><font color="#007777">[#for {0 0} {height width} {1 1}]</font></kbd> <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(y x {r g b})</i> grid<b>)</b>
- checkered pattern of 50%/75% greys
- in 8x8 squares <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#layer">#layer</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23layer-icon.png" alt="[#layer]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(y x {r g b a})</i> grid<b>)</b>
- a picture that has an opacity channel.
- will be used as foreground. <br>
- <br><b>inlet&nbsp;1 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(y x {r g b})</i> grid<b>)</b>
- a picture that has NO opacity channel.
- will be used as background. <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(y x {r g b})</i> grid<b>)</b>
- a picture that has NO opacity channel.
- the opacity channel of the foreground is used as
- a weighting of how much of either picture is seen
- in the result. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#draw_image">#draw_image</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23draw_image-icon.png" alt="[#draw_image]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;init <b>(</b><i>numop2</i> operator<b>, </b><i>grid(y,x,channels)</i> picture<b>, </b><i>grid({y x})</i> position<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(y x channels)</i> grid<b>)</b>
- picture onto which another picture will be superimposed. <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;tile <b>(</b><i>0 or 1</i> flag<b>)</b>
- if enabled, inlet 1 picture will be repeated to cover the inlet 0 picture. <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;alpha <b>(</b><i>0 or 1</i> flag<b>)</b>
- if enabled, inlet 1 picture will be combined with inlet 0 picture using
- the selected operator,
- and then blended with inlet 0 picture according to transparency of
- the inlet 1 picture, and then inserted in the result.
- if disabled, the blending doesn't occur, as the transparency level
- is considered to be "opaque". note that with alpha enabled,
- the last channel of inlet 1 picture is considered to represent transparency. <br>
- <br><b>inlet&nbsp;1 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(y x channels)</i> grid<b>)</b>
- picture that will be superimposed onto another picture. <br>
- <br><b>inlet&nbsp;2 </b><b>method</b>&nbsp;grid <b>(</b><i>grid({y x})</i> grid<b>)</b>
- position of the inlet 0 picture corresponding to top-left corner
- of inlet 1 picture. <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(y x channels)</i> grid<b>)</b>
- resulting picture. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#draw_polygon">#draw_polygon</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23draw_polygon-icon.png" alt="[#draw_polygon]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;init <b>(</b><i>numop2</i> operator<b>, </b><i>grid(channels)</i> color<b>, </b><i>grid(vertices,{y x})</i> vertices<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(y x channels)</i> grid<b>)</b>
- picture on which the polygon will be superimposed. <br>
- <br><b>inlet&nbsp;1 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(channels)</i> grid<b>)</b>
- color of each pixel <br>
- <br><b>inlet&nbsp;2 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(vertices {y x})</i> grid<b>)</b>
- vertices of the polygon. <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;grid <b>(</b><i>grid(y x channels)</i> grid<b>)</b>
- modified picture.
- note: starting with 0.7.2, drawing a 1-by-1
- square really generates a 1-by-1 square, and
- so on. This is because the right-hand border of a
- polygon is excluded, whereas it was included
- before, leading to slightly-wider-than-expected polygons. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#text_to_image">#text_to_image</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23text_to_image-icon.png" alt="[#text_to_image]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>inlet 2 receives a font grid, for example, [#in grid file lucida-typewriter-12.grid.gz]</p> <p>inlet 1 receives a 2 by 3 matrix representing the colours to use (e.g. (2 3 # 0 170 0 255 255 0) means yellow on green)</p> <p>inlet 0 receives a bang, transforming the data into an image suitable for #draw_image.</p> <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#hueshift">#hueshift</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23hueshift-icon.png" alt="[#hueshift]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>inlet 1 receives an angle (0..36000)</p> <p>inlet 0 receives a RGB picture that gets hueshifted by a rotation in the colorwheel by the specified angle; it gets sent to outlet 0.</p> <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="Other_Objects"></a><h4>Other Objects</h4></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="rtmetro">rtmetro</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/rtmetro-icon.png" alt="[rtmetro]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
-This class has been removed (0.7.7).<br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="bindpatcher">bindpatcher</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/bindpatcher-icon.png" alt="[bindpatcher]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>sets the receive-symbol for the Pd patcher it is in.</p> <p>has no inlets, no outlets.</p> <p>EXPERIMENTAL.</p> <br><b>method</b>&nbsp;init <b>(</b><i>symbol</i> symbol<b>)</b> <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="pingpong">pingpong</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/pingpong-icon.png" alt="[pingpong]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
-
- Transforms linear counting (0, 1, 2, 3, 4, ...) into a back-and-forth counting (0, 1, 2, 1, 0, ...)
- from 0 to a specified upper bound. <br><b>method</b>&nbsp;init <b>(</b><i>int</i> top<b>)</b> <br>
- <br><b>inlet&nbsp;1 </b><b>method</b>&nbsp;float <b>(</b><i>float</i> top<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;float <b>(</b><b>)</b>
- a value to be transformed.
- If, for example, top=10, then values 0 thru 10 are left unchanged,
- values 11 thru 19 are mapped to 9 thru 1 respectively, and 20 thru 30
- are mapped to 0 thru 10, and so on. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="#global">#global</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/%23global-icon.png" alt="[#global]" border="0"><br clear="left"><br><br><a href="#global"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br>
- <p>
- objects of this class do nothing by themselves and are just
- an access point to features that don't belong to any object in
- particular. </p> <br><b>method</b>&nbsp;profiler_reset <b>(</b><b>)</b>
- resets all the time counters. <br>
- <br><b>method</b>&nbsp;profiler_dump <b>(</b><b>)</b>
- displays the time counters in decreasing order, with
- the names of the classes those objects are in. this is
- an experimental feature. like most statistics,
- it could be vaguely relied upon if
- only you knew to which extent it is unreliable. more on this
- in a future section called "profiling". <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="fps">fps</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/fps-icon.png" alt="[fps]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;init <b>(</b><i>symbol(real|user|system|cpu)</i> clocktype<b>, </b><i>symbol(detailed)</i> detailed<b>)</b> <br>
- <br><b>method</b>&nbsp;init detailed <b>(</b><b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;bang <b>(</b><b>)</b>
- Times at which bangs are received are stored until a large
- enough sample of those is accumulated. Large enough is defined
- to be whenever the timespan exceeds one second. Then a report
- is made through the outlet. <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;(else) <b>(</b><b>)</b>
- messages other than bangs are ignored. <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;float <b>(</b><b>)</b>
- non-detailed mode only.
- this is the messages-per-second rating. <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;list(float,6) <b>(</b><b>)</b>
- detailed mode only.
- this is: messages-per-second, followed by five values of
- milliseconds-per-message: minimum, median, maximum, average,
- standard deviation.
- (the average happens to be simply 1000 divided by the
- messages-per-second, but it is convenient to have it anyway) <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="unix_time">unix_time</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/unix_time-icon.png" alt="[unix_time]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>
- This object returns the Unix timestamp. The first
- outlet does so with ASCII, the second in seconds and the third outlet
- outputs the fractions of seconds up to 1/100 000 th of a second which is useful for creating
- filenames. </p> <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;bang <b>(</b><b>)</b> <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;symbol <b>(</b><b>)</b> <br>
-Outputs the time and date in ASCII format <br><b>outlet&nbsp;1 </b><b>method</b>&nbsp;float <b>(</b><b>)</b> <br>
-Outputs the Unix timestamp in seconds <br><b>outlet&nbsp;2 </b><b>method</b>&nbsp;float <b>(</b><b>)</b> <br>
-Outputs the fractions of a second up to 10 microseconds (?) (actual precision is platform-dependent afaik) <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="ls">ls</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/ls-icon.png" alt="[ls]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>
- This object is similar to the Unix list command
- 'ls'. It returns the names of files in a given
- directory. May be used with [listlength] to retrieve the number of files.
- Hidden files are displayed. </p> <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;symbol <b>(</b><b>)</b>
- lists all files in a given directory <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;glob <b>(</b><b>)</b>
- lists all files matching a given pattern.
- "symbol hello" is like "glob hello/*" <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="exec">exec</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/exec-icon.png" alt="[exec]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>
- This object launches a Unix shell program or script. </p> <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;symbol <b>(</b><b>)</b> <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="renamefile">renamefile</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/renamefile-icon.png" alt="[renamefile]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>
- This object accepts a list of two elements as arguments.
- The current file name being the first and the second is the desired change
- in name. </p> <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;list <b>(</b><b>)</b> <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="plotter_control">plotter_control</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/plotter_control-icon.png" alt="[plotter_control]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>
- This object produces HPGL instructions in ASCII form
- that can be sent to the comport object in order to control an HPGL
- compatible plotter. </p> <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;symbol <b>(</b><b>)</b> <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;symbol <b>(</b><b>)</b> <br>
-Outputs the HPGL commands in ASCII format <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="rubyarray">rubyarray</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/rubyarray-icon.png" alt="[rubyarray]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>inlet 0 float : sends the specified array entry to outlet 0</p> <p>inlet 1 list: writes that list as an array entry in position last specified by inlet 0.</p> <p>inlet 0 save(symbol filename): writes the array contents to a file of the given filename as a CSV</p> <p>inlet 0 save(symbol filename, symbol format): same thing but using a sprintf string such as %x,%f or whatever</p> <p>inlet 0 load(symbol filename): replace all array contents by the contents of a CSV file</p> <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="jMax_emulation"></a><h4>jMax emulation</h4></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td></td><td></td><td><p>those classes emulate jMax functionality,
- for use within PureData and Ruby.</p></td></tr>
-<tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="fork">fork</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/fork-icon.png" alt="[fork]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>Every incoming message is sent to inlet 1 and then sent to
- inlet 0 as well. Messages remain completely unaltered. Contrast
- with PureData's "t a a" objects, which have the same purpose but
- transform bangs into zeros and such.</p> <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;(any) <b>(</b><b>)</b> <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="jmax_udpsend">jmax_udpsend</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/jmax_udpsend-icon.png" alt="[jmax_udpsend]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
-
- Sends messages (but not grids nor dspsignals) via UDP (which
- does not involve a connection, and may lose packets in case of
- network overload or noise or etc). <p>This works with jMax 2.5 and 4.1 but not 4.0.</p> <br><b>method</b>&nbsp;init <b>(</b><i>host</i> host<b>, </b><i>integer</i> port<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;&lt;any&gt; <b>(</b><b>)</b> <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="jmax_udpreceive">jmax_udpreceive</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/jmax_udpreceive-icon.png" alt="[jmax_udpreceive]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <p>Counterpart of jmax_udpsend</p> <p>This works with jMax 2.5 and 4.1 but not 4.0.</p> <br><b>method</b>&nbsp;init <b>(</b><i>integer</i> port<b>)</b> <br>
- <br><b>outlet&nbsp;0 </b><b>method</b>&nbsp;&lt;any&gt; <b>(</b><b>)</b> <br>
- <br><b>outlet&nbsp;1 </b><b>method</b>&nbsp;list <b>(</b>protocol_name<b>, </b>sender_port<b>, </b>sender_host<b>, </b>sender_ip_address<b>)</b> <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="foreach">foreach</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/foreach-icon.png" alt="[foreach]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;list <b>(</b>...<b>)</b>
- Outputs N messages, one per list element, in order. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="rubysprintf">rubysprintf</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/rubysprintf-icon.png" alt="[rubysprintf]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;init <b>(</b><i>symbol</i> format<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;list <b>(</b><b>)</b>
- Outputs the format string with %-codes replaced
- by elements of the list formatted as the %-codes say.
- To get a list of those codes, consult a Ruby manual
- (Equivalently, Perl, Python, Tcl and C all have equivalents of this,
- and it's almost always called sprintf, or the % operator, or both) <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="listflatten">listflatten</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/listflatten-icon.png" alt="[listflatten]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;list <b>(</b>...<b>)</b> <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="listmake">listmake</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/listmake-icon.png" alt="[listmake]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
-
- Emulation of jMax's [list] (but there cannot be a class named [list] in Pd) <br><b>method</b>&nbsp;init <b>(</b>list...<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;bang <b>(</b><b>)</b> send "list" to outlet 0<br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;list <b>(</b><b>)</b> as sending to inlet 1 and then banging; that is, passes thru and remembers.<br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="listlength">listlength</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/listlength-icon.png" alt="[listlength]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;list <b>(</b><b>)</b>
- outputs the number of elements in the incoming list. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="listelement">listelement</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/listelement-icon.png" alt="[listelement]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;init <b>(</b><i>int</i> index<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;list <b>(</b>...<b>)</b>
- Outputs one element of the list, as selected by "index".
- Also accepts negative indices (e.g.: -1 means "last"), like Ruby, but unlike jMax. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="listsublist">listsublist</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/listsublist-icon.png" alt="[listsublist]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;init <b>(</b><i>int</i> index<b>, </b><i>int</i> length<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;list <b>(</b>...<b>)</b>
- Outputs consecutive elements of the list, as selected by "index" and "length".
- Also accepts negative indices (e.g.: -1 means "last"), like Ruby, but unlike jMax. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="listprepend">listprepend</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/listprepend-icon.png" alt="[listprepend]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;init <b>(</b>list...<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;list <b>(</b>...<b>)</b>
- Outputs the stored list followed by the incoming list, all in one message. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="listappend">listappend</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/listappend-icon.png" alt="[listappend]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;init <b>(</b>list...<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;list <b>(</b>...<b>)</b>
- Outputs the incoming list followed by the stored list, all in one message. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="listreverse">listreverse</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/listreverse-icon.png" alt="[listreverse]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;list <b>(</b>...<b>)</b>
- Outputs the incoming list, from last element to first element. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="oneshot">oneshot</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/oneshot-icon.png" alt="[oneshot]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
-
- Like [spigot], but turns itself off after each message, so you have to turn it on
- again to making it pass another message. <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="inv+">inv+</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/inv+-icon.png" alt="[inv+]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;init <b>(</b><i>float</i> b<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;float <b>(</b><i>float</i> a<b>)</b>
- outputs b-a <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="inv*">inv*</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/inv*-icon.png" alt="[inv*]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;init <b>(</b><i>float</i> b<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;float <b>(</b><i>float</i> a<b>)</b>
- outputs b/a <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="messageprepend">messageprepend</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/messageprepend-icon.png" alt="[messageprepend]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
-
- (This is not in jMax, but is there to help port $* messageboxes) <br><b>method</b>&nbsp;init <b>(</b>list...<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;&lt;any&gt; <b>(</b>...<b>)</b>
- Like [listprepend], but operates on whole messages, that is, including the selector. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="messageappend">messageappend</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/messageappend-icon.png" alt="[messageappend]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
-
- (This is not in jMax, but is there to help port $* messageboxes) <br><b>method</b>&nbsp;init <b>(</b>list...<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;&lt;any&gt; <b>(</b>...<b>)</b>
- Like [listappend], but operates on whole messages, that is, including the selector. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="shunt">shunt</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/shunt-icon.png" alt="[shunt]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
-
- Compatible with jMax's [demux]. <br><b>method</b>&nbsp;init <b>(</b>n<b>, </b>i<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;&lt;any&gt; <b>(</b>...<b>)</b>
- Routes a message to the active outlet. <br>
- <br><b>inlet&nbsp;1 </b><b>method</b>&nbsp;int <b>(</b><i>int</i> i<b>)</b>
- Selects which outlet is active. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="demux">demux</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/demux-icon.png" alt="[demux]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
-
- please use shunt instead (name conflict with another Pd external) <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="range">range</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/range-icon.png" alt="[range]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
- <br><b>method</b>&nbsp;init <b>(</b>separators...<b>)</b> <br>
- <br><b>inlet&nbsp;0 </b><b>method</b>&nbsp;float <b>(</b><b>)</b>
- a value to be sent to one of the outlets. The first outlet is for values
- smaller than the first argument; else the second outlet is for values smaller
- than the second argument; and so on; and the last outlet is for values greater
- or equal to the last argument. <br>
- <br><b>inlet&nbsp;1..n </b><b>method</b>&nbsp;float <b>(</b><b>)</b>
- sets the corresponding separator in the separator list. <br>
- <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="PureData_emulation"></a><h4>PureData emulation</h4></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="pd_netsend">pd_netsend</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/pd_netsend-icon.png" alt="[pd_netsend]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
-
- same as jmax_udpsend but for PureData UDP connections. <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="pd_netreceive">pd_netreceive</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/pd_netreceive-icon.png" alt="[pd_netreceive]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
-
- same as jmax_udpreceive but for PureData UDP connections. <br></td></tr><tr><td></td><td></td><td> </td></tr>
-<tr><td>&nbsp;</td></tr>
- <tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="(new_documentation)"></a><h4>(new documentation)</h4></td></tr><tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="listfind">listfind</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/listfind-icon.png" alt="[listfind]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
-<br><b>method</b>&nbsp;_1_list <b>(</b><b>)</b> list to search into<br>
-<br><b>method</b>&nbsp;_0_float <b>(</b><b>)</b> float to find in that list<br>
-<br><b>method</b>&nbsp;_1_float <b>(</b><b>)</b> position of the incoming float in the stored list<br>
-<br></td></tr><tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="memstat">memstat</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/memstat-icon.png" alt="[memstat]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
-<br><b>method</b>&nbsp;_0_bang <b>(</b><b>)</b> lookup process stats for the currently running pd+ruby and figure out how much RAM it uses.<br>
-<br><b>method</b>&nbsp;_0_float <b>(</b><b>)</b> virtual size of RAM in kilobytes (includes swapped out and shared memory)<br>
-<br></td></tr><tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="regsub">regsub</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/regsub-icon.png" alt="[regsub]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
-<br><b>method</b>&nbsp;_1_symbol <b>(</b><b>)</b> a regexp pattern to be found inside of the string<br>
-<br><b>method</b>&nbsp;_0_symbol <b>(</b><b>)</b> a string to transform<br>
-<br><b>method</b>&nbsp;_2_symbol <b>(</b><b>)</b> a replacement for the found pattern<br>
-<br><b>method</b>&nbsp;_0_symbol <b>(</b><b>)</b> the transformed string<br>
-<br></td></tr><tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="sendgui">sendgui</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/sendgui-icon.png" alt="[sendgui]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
-<br><b>method</b>&nbsp;_0_list <b>(</b><b>)</b> a Tcl/Tk command to send to the pd client.<br>
-<br></td></tr><tr><td colspan="4" bgcolor="#ffb080"><b>&nbsp;&nbsp;class </b><a name="sys_vgui">sys_vgui</a></td></tr><tr><td></td><td valign="top"><br>
-<img src="flow_classes/sys_vgui-icon.png" alt="[sys_vgui]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br>
-<br><b>method</b>&nbsp;_0_list <b>(</b><b>)</b> a Tcl/Tk command to send to the pd client.<br>
-<br></td></tr><tr><td>&nbsp;</td></tr>
-<tr><td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4"><a name="(undocumented)"></a><h4>(undocumented)</h4></td></tr><tr><td></td><td></td><td><p>[#edit]</p></td></tr>
-<tr><td></td><td></td><td><p>[#in]</p></td></tr>
-<tr><td></td><td></td><td><p>[#in:aalib]</p></td></tr>
-<tr><td></td><td></td><td><p>[#io:file]</p></td></tr>
-<tr><td></td><td></td><td><p>[#io:grid]</p></td></tr>
-<tr><td></td><td></td><td><p>[#io:jpeg]</p></td></tr>
-<tr><td></td><td></td><td><p>[#io:mpeg]</p></td></tr>
-<tr><td></td><td></td><td><p>[#io:opengl]</p></td></tr>
-<tr><td></td><td></td><td><p>[#io:png]</p></td></tr>
-<tr><td></td><td></td><td><p>[#io:ppm]</p></td></tr>
-<tr><td></td><td></td><td><p>[#io:quicktime]</p></td></tr>
-<tr><td></td><td></td><td><p>[#io:sdl]</p></td></tr>
-<tr><td></td><td></td><td><p>[#io:targa]</p></td></tr>
-<tr><td></td><td></td><td><p>[#io:tk]</p></td></tr>
-<tr><td></td><td></td><td><p>[#io:videodev]</p></td></tr>
-<tr><td></td><td></td><td><p>[#io:window]</p></td></tr>
-<tr><td></td><td></td><td><p>[#io:x11]</p></td></tr>
-<tr><td></td><td></td><td><p>[#matrix_solve]</p></td></tr>
-<tr><td></td><td></td><td><p>[#out]</p></td></tr>
-<tr><td></td><td></td><td><p>[#peephole]</p></td></tr>
-<tr><td></td><td></td><td><p>[@!]</p></td></tr>
-<tr><td></td><td></td><td><p>[@eight]</p></td></tr>
-<tr><td></td><td></td><td><p>[@four]</p></td></tr>
-<tr><td></td><td></td><td><p>[@global]</p></td></tr>
-<tr><td></td><td></td><td><p>[@scale_to]</p></td></tr>
-<tr><td></td><td></td><td><p>[@three]</p></td></tr>
-<tr><td></td><td></td><td><p>[@two]</p></td></tr>
-<tr><td></td><td></td><td><p>[GridObject]</p></td></tr>
-<tr><td></td><td></td><td><p>[SoundMixer]</p></td></tr>
-<tr><td></td><td></td><td><p>[ascii]</p></td></tr>
-<tr><td></td><td></td><td><p>[broken]</p></td></tr>
-<tr><td></td><td></td><td><p>[button]</p></td></tr>
-<tr><td></td><td></td><td><p>[delcomusb]</p></td></tr>
-<tr><td></td><td></td><td><p>[for]</p></td></tr>
-<tr><td></td><td></td><td><p>[gfmessagebox]</p></td></tr>
-<tr><td></td><td></td><td><p>[gridflow]</p></td></tr>
-<tr><td></td><td></td><td><p>[jcomment]</p></td></tr>
-<tr><td></td><td></td><td><p>[jmax4_udpreceive]</p></td></tr>
-<tr><td></td><td></td><td><p>[jmax4_udpsend]</p></td></tr>
-<tr><td></td><td></td><td><p>[joystick_port]</p></td></tr>
-<tr><td></td><td></td><td><p>[jpatcher]</p></td></tr>
-<tr><td></td><td></td><td><p>[klippeltronics]</p></td></tr>
-<tr><td></td><td></td><td><p>[loadbang]</p></td></tr>
-<tr><td></td><td></td><td><p>[messbox]</p></td></tr>
-<tr><td></td><td></td><td><p>[parallel_port]</p></td></tr>
-<tr><td></td><td></td><td><p>[pd_netsocket]</p></td></tr>
-<tr><td></td><td></td><td><p>[system]</p></td></tr>
-<tr><td></td><td></td><td><p>[toggle]</p></td></tr>
-<tr><td>&nbsp;</td></tr>
-<td colspan="4" bgcolor="black">
-<img src="images/black.png" width="1" height="2"></td></tr>
-<tr><td colspan="4">
-<p><font size="-1">
-GridFlow 0.8.1 Documentation<br>
-Copyright &copy; 2001,2002,2003,2004,2005,2006 by Mathieu Bouchard
-<a href="mailto:matju@artengine.ca">matju@artengine.ca</a>
-</font></p>
-</td></tr></table></body></html>
-
-
diff --git a/externals/gridflow/doc/reference.xml b/externals/gridflow/doc/reference.xml
deleted file mode 100644
index e7bf94a1..00000000
--- a/externals/gridflow/doc/reference.xml
+++ /dev/null
@@ -1,1607 +0,0 @@
-<?xml version="1.0" standalone="no" ?>
-<!DOCTYPE documentation SYSTEM 'gridflow.dtd'>
-<documentation title="Reference Manual: Flow Classes" indexcols="3">
-<!-- $Id: reference.xml,v 1.2 2006-03-15 04:44:50 matju Exp $ -->
-<!--
- GridFlow Reference Manual: Class Reference
- Copyright (c) 2001,2002,2003,2004,2005,2006
- by Mathieu Bouchard and Alexandre Castonguay
--->
-
-<section name="Objects for making grids and breaking them down">
- <class name="#import">
- <icon text="[#import {240 320 3}]"/>
- <help text="[#import {240 320 3}]" image="#importexport" />
- <p>This object allows you to produce grids from non-grid data, such as
- integers and lists of integers. This object also reframes/resyncs
- grids so that multiple grids may be joined together, or
- single grids may be split. That kind of operation is already done implicitly in many
- cases (e.g. sending an integer or list to a grid-receiving inlet),
- but using this object you have greater flexibility on the conversion.</p>
- <attr name="shape" type="GridShape|symbol(per_message)" default="per_message">
- a list specifying a grid shape that the numbers
- will fit into; or "per_message" indicating each incoming message
- will be turned into a vector.
- </attr>
- <attr name="cast" type="NumberType" default="int32"/>
- <method name="init">
- <arg name="shape" isattr="yes"/>
- <arg name="cast" isattr="yes"/>
- </method>
- <inlet id="0">
- <method name="int">
- begins a new grid if there is no current grid.
- puts that integer in the current grid.
- ends the grid if it is full.
- the constructed grid is not stored: it is streamed.
- the stream is buffered, so the output is in packets
- of about a thousand numbers.
- </method>
- <method name="list">
- just like a sequence of ints sent one after another,
- except in a single message.
- </method>
- <method name="symbol">
- considered as a list of ascii characters.
- </method>
- <method name="reset">
- aborts the current grid if there is one.
- </method>
- <method name="grid">
- <arg name="grid" type="grid(dims...)"/>
- this is the equivalent of filtering this grid through
- an <k>[#export]</k> object and sending the resulting integers
- to this <k>[#import]</k> object, except that it's over
- 10 times faster.
- </method>
- </inlet>
- <inlet id="1" attr="shape">
- <method name="per_message">
- old synonym for "shape per_message"
- </method>
- </inlet>
- <outlet id="0">
- <method name="grid"><arg name="grid" type="grid"/>
- the grid produced from incoming integers and/or grids.
- </method>
- </outlet>
- </class>
-
- <class name="#export">
- <help text="[#export]" image="#importexport" />
-
- <p>this object is the opposite of #import.</p>
- <method name="init">
- this object is not configurable because there isn't
- anything that could possibly be configured here.
- </method>
- <inlet id="0">
- <method name="grid"><arg name="grid" type="grid(dims...)"/>
- transforms this grid into a sequence of integer messages.
- </method>
- </inlet>
- <outlet id="0">
- <method name="int">
- elements of the incoming grid.
- </method>
- </outlet>
- </class>
-
- <class name="#export_list">
- <help text="[#export_list]" image="#importexport" />
-
- <p>this object is another opposite of <k>[#import]</k>, which puts
- all of its values in a list.</p>
- <method name="init" />
- <inlet id="0">
- <method name="grid"><arg name="grid" type="grid(dims...)"/>
- transforms this grid into a single message containing
- a list of integers.
- </method>
- </inlet>
- <outlet id="0">
- <method name="list">
- elements of the incoming grid.
- </method>
- </outlet>
- </class>
-
- <class name="#export_symbol">
- <p>this object is another opposite of #import, which constructs a symbol
- from its input. The values are expected to be valid ASCII codes, but no check
- will be performed for that, and additionally, no check will be made that the generated
- symbol only contains characters that can be put in a symbol.</p>
- <method name="init" />
- <inlet id="0">
- <method name="grid"><arg name="grid" type="grid(dims...)"/>
- transforms this grid into a single message containing
- a list of integers.
- </method>
- </inlet>
- <outlet id="0"><method name="symbol">generated symbol</method></outlet>
- </class>
-
- <class name="#pack">
- <p>Similar to <k>[#join]</k>, but takes individual integers, and builds a Dim(N) vector out of it.
- </p>
-
- <attr name="trigger_by" type="TriggerBy" default="any">
- The value "any" (and the only available value for now) causes an output
- to produced when an integer is received thru any inlet, contrary to most
- other object classes, that only act upon reception of a value thru inlet 0.
- </attr>
-
- <method name="init">
- <arg name="inputs" type="integer">how many inlets the object should have.</arg>
- </method>
- <inlet id="*"><method name="int"/></inlet>
- <outlet id="0"><method name="grid">
- combination of inputs given in all inlets.
- this is produced according to the value of the trigger attribute.
- </method></outlet>
- </class>
-
- <class name="#color">
- <p>Triple slider for the selection of RGB values.</p>
- <method name="init">
- <arg name="min" type="float"></arg>
- <arg name="max" type="float"></arg>
- <arg name="hidepreview" type="0,1"></arg>
- </method>
- <inlet id="0"><method name="grid">
- changes all three values (R,G,B). The grid must
- be a Dim(3).
- </method>
- <method name="delegate">
- sends the rest of the message to each of the three sliders.
- this relies on the fact that [#color] is implemented using
- three [hsl] and this might not still work in the far future.
- </method></inlet>
- <outlet id="0"><method name="grid">
- Produces a Dim(3) grid of RGB values.
- </method></outlet>
- </class>
-
- <class name="#unpack">
- <method name="init">
- <arg name="outputs" type="integer">
- how many outlets the object should have.
- (depending on the version of the software, the number of visible outlets
- may have been frozen to 4. If it is so, then the value of this argument
- must not exceed 4; and if it is below 4, then don't use the extraneous outlets.)
- </arg>
- </method>
- <inlet id="0"><method name="grid(N)">
- the input vector is split in N parts containing one number each.
- numbers are sent left-to-right, that is, outlet 0 is triggered first, then outlet 1, etc.
- </method></inlet>
- <outlet id="*"><method name="int">
- </method></outlet>
- </class>
-
- <class name="#centroid">
- <method name="init"/>
- <inlet id="0"><method name="grid(rows,columns,1)">
- will compute the centroid of the given grid, which
- is a weighted average, namely, the average position weighted
- by the pixel values.
- </method></inlet>
- <outlet id="0">
- <method name="grid(2)">
- result
- </method>
- </outlet>
- </class>
- <class name="#centroid2">
- a new experimental and faster version of #centroid.
- <method name="init"/>
- <inlet id="0"><method name="grid(rows,columns,1)">
- will compute the centroid of the given grid, which
- is a weighted average, namely, the average position weighted
- by the pixel values.
- </method></inlet>
- <outlet id="0">
- <method name="grid(2)">
- result
- </method>
- </outlet>
- </class>
-
- <class name="#for">
- <icon text="[#for 0 320 1]"/>
- <help text="[#for 0 320 1]"/>
-
- <p>when given scalar bounds, works like a regular <k>[for]</k> object plugged
- to a <k>[#import]</k> tuned for a Dim(size) where size is the number of values
- produced by a bang to that <k>[for]</k>.</p>
-
- <p>when given vector bounds, will work like any number of [for] objects
- producing all possible combinations of their values in the proper order.
- This replaces the old <k>[#identity_transform]</k> object.</p>
-
- <method name="init">
- <arg name="from" type="integer"/>
- <arg name="to" type="integer"/>
- <arg name="step" type="integer"/>
- </method>
- <inlet id="0"><method name="grid"><arg name="grid" type="grid(index)"/>
- replaces the "from" value and produces output.
- </method></inlet>
- <inlet id="1"><method name="grid"><arg name="grid" type="grid(index)"/>
- replaces the "to" value.
- </method></inlet>
- <inlet id="2"><method name="grid"><arg name="grid" type="grid(index_steps)"/>
- replaces the "step" value.
- </method></inlet>
- <outlet id="0">
- <method name="grid"><arg name="grid" type="grid(size)"/>
- where size is floor((to-from+1)/step)
- [for scalar bounds]
- </method>
- <method name="grid"><arg name="grid" type="grid(*size,dimension)"/>
- where *size is floor((to-from+1)/step)
- [for vector bounds]
- </method>
- </outlet>
- </class>
-</section>
-
-<section name="Objects for Computing">
- <class name="#">
- <icon text="[# +]" image="images/op/add.png" />
- <help text="two-input operators"/>
-
- <attr name="op" type="grid"/>
- <attr name="right_hand" type="grid" default="0">
-
- </attr>
-
- <p>This object outputs a grid by computing "in parallel" a same
- operation on each left-hand element with its corresponding right-hand
- element.
- </p>
-
- <method name="init">
- <arg name="op" isattr="yes"/>
- <arg name="right_hand" isattr="yes"/>
- </method>
-
- <inlet id="0">
- <method name="grid"><arg name="grid" type="grid(dims...)"/>
- on each element of this grid, perform the operation
- together with the corresponding element of inlet 1.
- in the table of operators (at the top of this document)
- elements of inlet 0 are called "A" and elements of inlet 1
- are called "B". the resulting grid is the same size as the
- one in inlet 0.
- </method>
- </inlet>
- <inlet id="1">
- <method name="grid"><arg name="grid" type="grid(dims...)"/>
- any grid, preferably shaped like the one that will be put
- in the left inlet, or like a subpart of it (anyway the contents
- will be redim'ed on-the-fly to fit the grid of inlet-0,
- but the stored grid will not be modified itself)
- </method>
- <method name="int">
- stores a single int in the right inlet; the same int will
- be applied in all computations; this is like sending a
- Dim(1) or Dim() grid with that number in it.
- </method>
- </inlet>
- <outlet id="0">
- <method name="grid"><arg name="grid" type="grid"/>
- </method>
- </outlet>
-
- </class>
-
- <class name="@complex_sq">
- <p>this object computes the square of complex numbers.
- If seeing imaginary as Y and real as X, then this operation squares
- the distance of a point from origin and doubles the angle between it
- and the +X half-axis clockwise. (fun, eh?)
- </p>
- <p>used on an indexmap, this makes each thing appear twice,
- each apparition spanning half of the original angle.</p>
- <inlet id="0"><method name="grid">
- <arg name="grid" type="grid(dims... {imaginary real})"/>
- </method></inlet>
- <outlet id="0"><method name="grid">
- <arg name="grid" type="grid(dims... {imaginary real})"/>
- </method></outlet>
- </class>
-
- <class name="#fold">
- <icon text="[#fold +]"/>
- <help text="[#fold +]" image="#foldinnerouter"/>
-
- <p><list>
- <li><k>[#fold +]</k> computes totals</li>
- <li><k>[#fold inv+]</k> is an alternated sum (+/-)</li>
- <li><k>[#fold * 1]</k> can compute the size of a grid using its dimension list</li>
- <li><k>[#fold &amp; 1]</k> can mean "for all"</li>
- <li><k>[#fold | 0]</k> can mean "there exists (at least one)"</li>
- <li><k>[#fold ^ 0]</k> can mean "there exists an odd number of..."</li>
- <li><k>[#fold ^ 1]</k> can mean "there exists an even number of...".</li>
- </list></p>
-
- <method name="init">
- <arg name="operator" type="numop2"/>
- <arg name="seed" type="grid" default="0"/>
- <arg name="right_hand" type="grid"/>
- </method>
-
- <inlet id="0">
- <method name="grid"><arg name="grid" type="grid(dims..., last)"/>
- replaces every Dim(last) subgrid by the result of a cascade on that subgrid.
- Doing that
- with seed value 0 and operation + on grid "2 3 5 7" will compute
- ((((0+2)+3)+5)+7) find the total "17".
- produces a Dim(dims) grid.
- </method>
- </inlet>
- <inlet id="1" attr="seed"/>
- <outlet id="0"></outlet>
- </class>
-
- <class name="#scan">
- <icon text="[#scan +]"/>
- <help text="[#scan +]"/>
-
- <p><k>[#scan +]</k> computes subtotals; this can be used, for example,
- to convert a regular probability distribution into a cumulative one.
- (or in general, discrete integration)
- </p>
-
- <method name="init">
- <arg name="operator" type="numop2"/>
- <arg name="seed" type="grid" default="0"/>
- </method>
-
- <inlet id="0">
- <method name="grid"><arg name="grid" type="grid(dims..., last)"/>
-
- replaces every Dim(last) subgrid by all the results of
- cascading the operator on that subgrid,
- producing a Dim(dims,last) grid.
-
- For example, with base value 0 and operation + on grid "2 3 5
- 7" will compute 0+2=2, 2+3=5, 5+5=10, 10+7=17, and give the
- subtotals "2 5 10 17".
-
- </method>
- </inlet>
- <inlet id="1" attr="seed"/>
- <outlet id="0">
- </outlet>
-
- </class>
-
- <class name="#outer">
- <icon text="[#outer +]"/>
- <help text="[#outer +]" image="#foldinnerouter"/>
-
- <method name="init">
- <arg name="operator" type="numop2"/>
- <arg name="value" type="grid"/>
- the operator must be picked from the table of two-input operators.
- the grid is optional and corresponds to inlet 1.
- </method>
-
- <inlet id="0">
- <method name="grid"><arg name="grid" type="grid(anyA...)"/></method>
- produces a grid of size Dim(anyA..., anyB...), where numbers
- are the results of the operation on every element of A and
- every element of B. the resulting array can be very big. Don't
- try this on two pictures (the result will have 6 dimensions)
- </inlet>
- <inlet id="1">
- <method name="grid"><arg name="grid" type="grid(anyB...)"/></method>
- stores the specified grid, to be used when inlet 0 is activated.
- </inlet>
- <outlet id="0">
- </outlet>
-
- <p>When given a grid of Dim(3) and a grid of Dim(5) <k>[#outer]</k> will
- produce a grid of Dim(3,5) with the selected two-input operation
- applied on each of the possible pairs combinations between numbers
- from the left grid and the ones from the right. for example :
- (10,20,30) [#outer +] (1,2,3) will give :
- ((11,12,13),(21,22,23),(31,32,33)) </p>
-
- </class>
-
- <class name="#inner">
- <help text="[#inner]"/>
-
- <p>think of this one as a special combination of <k>[#outer]</k>, <k>[#]</k> and
- <k>[#fold]</k>. this is one of the most complex operations. It is very useful
- for performing linear transforms like rotations, scalings, shearings,
- and some kinds of color remappings. A linear transform is done by
- something called matrix multiplication, which happens to be <k>[#inner * +
- 0]</k>. <k>[#inner]</k> also does dot product and other funny operations.</p>
-
- <method name="init">
- <arg name="op_para" type="numop2"/>
- <arg name="op_fold" type="numop2"/>
- <arg name="base" type="integer"/>
- <arg name="right_hand" type="grid"/>
- op_para and op_fold are two operators picked from the table
- of two-input operators.
- the base value has to be specified (has no default value yet).
- </method>
- <inlet id="0">
- <method name="grid"><arg name="grid" type="grid(anyA..., lastA)"/>
-
- Splits the Dim(anyA...,lastA) left-hand grid into Dim(anyA...)
- pieces of Dim(lastA) size.
-
- Splits the Dim(firstB,anyB...) right-hand grid into
- Dim(anyB...) pieces of Dim(firstB) size.
-
- On every piece pair, does <k>[#]</k> using the specified
- op_para operation, followed by a <k>[#fold]</k> using
- the specified op_fold operator and base value.
-
- creates a Dim(anyA...,anyB...) grid by assembling all
- the results together.
-
- (note: lastA must be equal to firstB.)
- </method>
- </inlet>
- <inlet id="1">
- <method name="int">
- changes the base value to that.
- </method>
- </inlet>
- <inlet id="2">
- <method name="grid"><arg name="grid" type="grid(anyB..., lastB)"/>
- changes the right-hand side grid to that.
- </method>
- </inlet>
- <outlet id="0">
- </outlet>
- </class>
-
- <class name="@join">
- <method name="init">
- <arg name="which_dim"/>
- Which_dim is the number of the dimension by which the join will
- occur. For N-dimensional grids, the dimensions are numbered from 0
- to N-1. In addition, negative numbers from -N to -1 may be used, to
- which N will be added.
- </method>
- <inlet id="0">
- <method name="grid"><arg name="grid" type="grid"/>
- The left grid and right grid must have the same number
- of elements in all dimensions except the one specified.
- The result will have the same number of elements in all
- dimensions except the one specified, which will be the
- sum of the two corresponding one.
-
- <p>For example, joining a RGB picture Dim[y,x,3] and a
- greyscale picture Dim[y,x,1] on dimension 2 (or -1) could
- make a RGBA picture Dim[y,x,4] in which the greyscale image
- becomes the opacity channel.
- </p>
- </method>
- </inlet>
- <inlet id="1"><method name="grid"><arg name="grid" type="grid"/></method></inlet>
- <outlet id="0">
- </outlet>
- </class>
-
- <class name="#finished">
- <inlet id="0">
- <method name="grid"><arg name="grid" type="grid"/>any grid</method>
- </inlet>
- <outlet id="0">
- a bang is emitted every time a grid transmission ends.
- </outlet>
- </class>
-
- <class name="#cast">
- <method name="init">
- <arg name="numbertype" type="numbertype"/>
- </method>
- <inlet id="0">
- <method name="grid"><arg name="grid" type="grid"/>any grid</method>
- </inlet>
- <outlet id="0">
- <method name="grid"><arg name="grid" type="grid"/>a grid of the same shape containing all the same
- values after type conversion. note that while casting to
- a smaller type, values that are overflowing will be truncated.
- </method>
- </outlet>
- </class>
-
- <class name="#ravel">
- <inlet id="0"><method name="grid"><arg name="grid" type="grid"/>any grid</method></inlet>
- <outlet id="0"><method name="grid"><arg name="grid" type="grid"/>
- like <k>[#redim]</k> but always produce a 1-D grid
- with the same total number of elements.
- </method></outlet>
- </class>
-
- <class name="#grade">
- <inlet id="0"><method name="grid"><arg name="grid" type="grid"/>any grid</method></inlet>
- <outlet id="0"><method name="grid"><arg name="grid" type="grid"/>
- <p>splits a Dim[A...,B] grid into Dim[B] vectors,
- producing new Dim[B] vectors that each contain numbers from
- 0 to B-1 indicating the ordering of the values. The result is
- a Dim[A...,B] grid.</p>
- <p>for example, connecting a [#grade] to a <k>[#outer ignore {0}]</k>
- to a <k>[#store]</k> object, storing a single vector into <k>[#store]</k>, and
- sending the same vector to <k>[#grade]</k>, will sort the values of the
- vector. however for higher-dimensional grids, what should go
- between <k>[#store]</k> and <k>[#grade]</k> to achieve the same result would
- be more complex.</p>
- <p>you may achieve different kinds of sorting by applying various
- filters before <k>[#grade]</k>. the possibilities are unlimited.</p>
- <p>if you plug <k>[#grade]</k> directly into another <k>[#grade]</k>, you will
- get the inverse arrangement, which allows to take the sorted values
- and make them unsorted in the original way. note that this is really
- not the same as just listing the values backwards.</p>
- </method></outlet>
- </class>
-
- <class name="#perspective">
- <method name="init">
- <arg name="depth" type="integer"/>
- </method>
- <inlet id="0"><method name="grid"><arg name="grid" type="grid"/>any grid</method></inlet>
- <outlet id="0"><method name="grid"><arg name="grid" type="grid"/>
- <p>transforms a Dim[A...,B] grid into a Dim[A...,B-1] grid.
- There is a projection plane perpendicular to the last axis and
- whose position is given by the "depth" parameter. Each vector's
- length is adjusted so that it lies onto that plane. Then the
- last dimension of each vector is dropped.</p>
-
- <p>useful for converting from 3-D geometry to 2-D geometry. Also
- useful for converting homogeneous 3-D into regular 3-D, as
- homogeneous 3-D is really just regular 4-D...(!)</p>
- </method></outlet>
- </class>
-
- <class name="#transpose">
- <method name="init">
- <arg name="dim1" type="integer"/>
- <arg name="dim2" type="integer"/>
- </method>
- <inlet id="0"><method name="grid"><arg name="grid" type="grid"/>
- swaps the two specified dimensions; dimension numbers are as in <k>[#join]</k>.
- </method></inlet>
- </class>
-
- <class name="#fade">
- <method name="init">
- <arg name="rate" type="integer"/>
- </method>
- <inlet id="0"><method name="grid"><arg name="grid" type="grid"/>
- produces on outlet 0 a linear recurrent fading according to the flow of
- incoming messages. For example, if rate=5, then 20% (one fifth)
- of each new message will be blended with 80% of the previous output.
- </method></inlet>
- </class>
-
- <class name="#fade_lin">
- <method name="init">
- <arg name="maxraise" type="integer"/>
- <arg name="maxdrop" type="integer"/>
- </method>
- <inlet id="0"><method name="grid"><arg name="grid" type="grid"/>
- produces on outlet 0 a piecewise-linear nonrecurrent fading according to the flow of
- incoming messages. For example, if maxraise=2 and maxdrop=4, then with each
- new message an output is produced that is at most 2 more or 4 less than the
- previous output.
- </method></inlet>
- </class>
-
- <class name="#reverse">
- <method name="init">
- <arg name="whichdim"/>
- Whichdim is the number of the dimension by which the reverse will
- occur. For N-dimensional grids, the dimensions are numbered from 0
- to N-1. In addition, negative numbers from -N to -1 may be used, to
- which N will be added.
- </method>
- </class>
-</section>
-
-<section name="Objects for Coordinate Transforms">
- <class name="#redim">
- <icon text="[#redim {2}]"/>
- <help text="[#redim 2]"/>
-
- <method name="init">
- <arg name="dims" type="dim_list"/>
- a list specifying a grid shape that the numbers
- will fit into.
- (same as with <k>[#import]</k>)
- </method>
- <inlet id="0">
- <method name="grid"><arg name="grid" type="grid(dims...)"/>
- the elements of this grid are serialized. if the resulting grid
- must be larger, the sequence is repeated as much as necessary.
- if the resulting grid must be smaller, the sequence is truncated.
- then the elements are deserialized to form the resulting grid.
- </method>
- </inlet>
- <inlet id="1">
- <method name="grid"><arg name="grid" type="grid(rank)"/>
- this grid is a dimension list that replaces the one
- specified in the constructor.
- (same as with <k>[#import]</k>)
- </method>
- </inlet>
- <outlet id="0">
- <method name="grid"><arg name="grid" type="grid"/>
- redimensioned grid potentially containing repeating data.
- </method>
- </outlet>
-
- <p>example: with a 240 320 RGB image, <k>[#redim 120 640 3]</k> will visually
- separate the even lines (left) from the odd lines (right). contrary
- to this, <k>[#redim 640 120 3]</k> will split every line and put its left half
- on a even line and the right half on the following odd line. <k>[#redim]</k>
- 480 320 3 will repeat the input image twice in the output image.
- <k>[#redim]</k> 240 50 3 will only keep the 50 top lines.</p>
-
- </class>
- <class name="#store">
- <help text="[#store]"/>
-
- <p>A <k>[#store]</k> object can store exactly one grid, using the right
- inlet. You fetch it back, or selected subparts thereof, using the left
- inlet.</p>
-
- <method name="init">
- <arg name="contents" type="grid"/>
- </method>
-
- <inlet id="0">
- <method name="bang">
- the stored grid is fully sent to the outlet.
- </method>
- <method name="grid"><arg name="grid" type="grid(dims..., indices)"/>
- in this grid, the last dimension refers to subparts of
- the stored grid. sending a Dim(200,200,2) on a <k>[#store]</k>
- that holds a Dim(240,320,3) will cause the <k>[#store]</k> to handle
- the incoming grid as a Dim(200,200) of Dim(2)'s, where each
- Dim(2) represents a position in a Dim(240,320) of Dim(3)'s.
- therefore the resulting grid will be a Dim(200,200) of
- Dim(3) which is a Dim(200,200,3). in practice this example
- would be used for generating a 200*200 RGB picture from a
- 200*200 XY map and a 240*320 RGB picture. this object can
- be logically used in the same way for many purposes
- including color palettes, tables of probabilities, tables
- of statistics, whole animations, etc.
- </method>
- </inlet>
- <inlet id="1">
- <method name="grid"><arg name="grid" type="grid(dims...)"/>
- replace the whole grid, or a subpart of it (see other options on inlet 1)
- </method>
- </inlet>
- <inlet id="1">
- <method name="reassign">(Future Use):
- makes it so that sending a grid to inlet 1 detaches the old buffer from [#store]
- and attaches a new one instead. This is the default.
- </method>
- <method name="put_at"><rest name="indices"/>(Future Use):
- makes it so that sending a grid to inlet 1 writes into the existing buffer of [#store].
- <p>
- example: suppose you have <k>[#store {10 240 320 3}]</k>. then "put_at 3"
- will allow to write a Dim[240,320,3] grid in indices (3,y,x,c) where y,x,c are indices of the incoming grid;
- in other words, if that's a buffer of 10 RGB frames, you'd be replacing frame #3. Furthermore,
- it also allows you to write a Dim[n,240,320,3] grid at (3+f,y,x,c) where f,y,x,c are indices of the incoming grid,
- replacing frame #3, #4, ... up to #3+n-1. Here n is at most 7 because the last frame in the buffer is #9.
- </p>
- <p>that way of working extends to other kinds of data you'd put in Grids, in any numbers of dimensions;
- because, as usual, [#store] wouldn't know the difference.
- </p>
- </method>
- </inlet>
- <outlet id="0">
- grids as stored, as indexed, or as assembled from multiple
- indexings.
- </outlet>
- </class>
-
- <class name="#scale_to">
- <help text="[#scale_to]"/>
-
- <method name="init">
- <arg name="size">{height width} pair.</arg>
- </method>
-
- <inlet id="0">
- <method name="grid"><arg name="grid" type="grid"/>a 3-channel picture to be scaled.</method>
- </inlet>
- <inlet id="1">
- <method name="int">a {height width} pair.</method>
- </inlet>
- <outlet id="0">
- <method name="grid"><arg name="grid" type="grid"/>a scaled 3-channel picture.</method>
- </outlet>
- </class>
-
- <class name="#scale_by">
- <help text="[#scale_by]"/>
-
- <method name="init">
- <arg name="factor" type="grid dim() or dim(2)"/>
- factor is optional (default is 2).
- if it's a single value, then that factor is to be used
- for both rows and columns.
- </method>
- <inlet id="0">
- <method name="grid"><arg name="grid" type="grid(y x channels)"/>
- duplicates each pixel several times in width and several times in height,
- where the number of times is determined by the factor described above.
- twice those of the incoming grid. It is several times faster.
- </method>
- </inlet>
- <inlet id="1"><method name="grid"><arg name="grid" type="grid(1 or 2)"/>sets factor</method></inlet>
- <outlet id="0">
- <method name="grid">
- <arg name="grid" type="grid((factor*y) (factor*x) channels)"/>
- </method>
- </outlet>
- </class>
-
- <class name="#downscale_by">
- <method name="init">
- <arg name="factor" type="+integer"/>
- <arg name="how" type="optional symbol(smoothly)"/>
- factor is optional (default is 2).
- if it's a single value, then that factor is to be used
- for both rows and columns.
- </method>
- <inlet id="0">
- <method name="grid"><arg name="grid" type="grid(y x channels)"/>
- Scales down picture by specified amount. (See scale factor above)
- </method>
- </inlet>
- <inlet id="1"><method name="grid">
- <arg name="grid" type="grid(1 or 2)"/>sets scale factor</method></inlet>
- <outlet id="0">
- <method name="grid">
- <arg name="grid" type="grid((factor/y) (factor/x) channels)"/>
- </method>
- </outlet>
- </class>
-
- <class name="#spread">
- <help text="[#spread]"/>
-
- <p>typically you plug a <k>[#for]</k> into this object,
- and you plug this object into the left side of a <k>[#store]</k>. it will
- scatter pixels around, giving an "unpolished glass" effect.</p>
-
- <p>if you put a picture in it, however, it will add noise. The
- resulting values may be out of range, so you may need to clip them
- using min/max.</p>
-
- <method name="init">
- <arg name="factor">same as inlet 1</arg>
- </method>
-
- <inlet id="0">
- <method name="grid"><arg name="grid" type="grid"/>a coordinate map.</method>
- </inlet>
- <inlet id="1">
- <method name="int">a spread factor.</method>
- </inlet>
- <outlet id="0">
- <method name="grid"><arg name="grid" type="grid"/>a coordinate map.</method>
- </outlet>
-
-
- <p><k>[#spread]</k> scatters the pixels in an image. Not all original pixels
- will appear, and some may get duplicated (triplicated, etc)
- randomly. Some wrap-around effect will occur close to the edges.
- </p>
-
- <p> Sending an integer to inlet 1 sets the amount of spreading in
- maximum number of pixels + 1. even values translate the whole image
- by half a pixel due to rounding.</p>
-
- </class>
-
- <class name="#rotate">
- <p>performs rotations on indexmaps and polygons and such.</p>
-
- <method name="init">
- <arg name="angle" type="0...35999"/>
- </method>
- <inlet id="0"><method name="grid">
- <arg name="grid" type="grid(anyA 2)"/></method></inlet>
- <inlet id="1"><method name="int">rotation angle; 0...36000</method>
- </inlet>
- <outlet id="0"><method name="grid">
- <arg name="grid" type="grid(anyA 2)"/>
- </method></outlet>
- </class>
-
- <class name="#remap_image">
- <p>if you chain indexmap (coordinate) transformations from outlet 1
- to inlet 1, then sending an image in inlet 0 will emit its
- deformation out of outlet 0.</p>
-
- <inlet id="0"/>
- <inlet id="1"/>
- <outlet id="0"/>
- <outlet id="1"/>
- </class>
-</section>
-
-<section name="Objects for Reporting">
- <class name="#dim">
- <help text="[#dim]"/>
-
- <p>Returns list of dimensions as a grid. Given a grid sized like Dim(240,320,4),
- <k>[#dim]</k> will return a grid like Dim(3), whose values are 240, 320, 4. </p>
-
- <method name="init">
- no arguments.
- </method>
- <inlet id="0">
- <method name="grid"><arg name="grid" type="grid(dims...)"/>
- ignores any data contained within.
- sends a grid dim(length of dims) containing dims.
- </method>
- </inlet>
- <outlet id="0">
- <method name="grid"><arg name="grid" type="grid(rank)"/>
- the list of dimensions of the incoming grid.
- </method>
- </outlet>
- </class>
-
- <class name="#type">
- <p>gives a symbol representing the numeric type of the grid received.
- </p>
- <outlet id="0"><method name="&lt;numeric type symbol&gt;"/></outlet>
- </class>
-
- <class name="#print">
- <method name="init"/>
- <inlet id="0">
- <method name="grid"><arg name="grid" type="grid(dims...)"/>
- prints the dimensions of the grid.
- prints all the grid data if there are 2 dimensions or less.
- </method>
- </inlet>
- </class>
-
- <class name="rubyprint">
- This is only for testing the translation from PD to Ruby.
- <method name="init"/>
- <inlet id="0">
- <method name="(any)">
- prints the message to the console.
- </method>
- </inlet>
- </class>
-
- <class name="printargs">
- This is only for testing the translation from PD to Ruby.
- <method name="init">
- <rest name="any"/>
- prints everything.
- </method>
- </class>
-
- <class name="display">
- GUI object equivalent to [print] and [#print].
- <method name="(any)">
- Displays the received message in the box, resizing the box so that the message fits exactly.
- </method>
- </class>
-</section>
-
-<section name="Objects for Color Conversion">
- <class name="#apply_colormap_channelwise">
- <p>This object is useful for color correction. For each pixel
- it takes it apart, looks up each part separately in the colormap,
- and constructs a new pixel from that. You may also color-correct
- colormaps themselves.</p>
-
- <p>Only works for things that have 3 channels.</p>
-
- <p>Note: if you just need to apply a palette on an indexed-color
- picture, you don't need this. Just use #store instead.</p>
-
- <inlet id="0"><method name="grid">
- <arg name="grid" type="grid(rows columns channels)"/>
- picture
- </method></inlet>
- <inlet id="1">
- <method name="grid">
- <arg name="grid" type="grid(intensities channels)"/>
- colormap ("palette")
- </method></inlet>
- <outlet id="0"><method name="grid">
- <arg name="grid" type="grid(rows columns channels)"/>
- picture
- </method></outlet>
- </class>
-
- <class name="#rgb_to_greyscale">
- <inlet id="0"><method name="grid">
- <arg name="grid" type="grid(rows columns {red green blue})"/>
- </method></inlet>
- <outlet id="0"><method name="grid">
- <arg name="grid" type="grid(rows columns {white})"/></method>
- </outlet>
- </class>
-
- <class name="#greyscale_to_rgb">
- <inlet id="0"><method name="grid">
- <arg name="grid" type="grid(rows columns {white})"/></method>
- </inlet>
- <outlet id="0"><method name="grid">
- <arg name="grid" type="grid(rows columns {red green blue})"/>
- </method></outlet>
- </class>
-
- <class name="#yuv_to_rgb">
- <p>note: may change slightly to adapt to actual video standards.</p>
- <inlet id="0"><method name="grid">
- <arg name="grid" type="grid(rows columns {y u v})"/></method>
- </inlet>
- <outlet id="0"><method name="grid">
- <arg name="grid" type="grid(rows columns {red green blue})"/>
- </method></outlet>
- </class>
-
- <class name="#rgb_to_yuv">
- <p>note: may change slightly to adapt to actual video standards.</p>
- <inlet id="0"><method name="grid">
- <arg name="grid" type="grid(rows columns {red green blue})"/></method>
- </inlet>
- <outlet id="0"><method name="grid">
- <arg name="grid" type="grid(rows columns {y u v})"/>
- </method></outlet>
- </class>
-</section>
-
-<section name="Objects for Miscellaneous Picture Processing">
- <class name="#convolve">
- <help text="[#convolve]"/>
-
- <p>this is the object for blurring, sharpening, finding edges,
- embossing, cellular automata, and many other uses.</p>
-<!--NYI
- <attr name="seed">
-
- </attr>
--->
- <method name="init">
- <arg name="op_para" type="numop2"/>
- <arg name="op_fold" type="numop2"/>
- <arg name="seed" type="grid"/>
- <arg name="right_hand" type="grid" default="none"/>
- </method>
- <inlet id="0">
- <method name="grid">
- <arg name="grid" type="grid(rows columns rest...)"/>
- splits the incoming grid into dim(rest...) parts.
- for each of those parts at (y,x), a rectangle of such
- parts, centered around (y,x), is combined with the
- convolution grid like a <k>[#]</k> of operation op_para. Then
- each such result is folded like <k>[#fold]</k> of operation
- op_fold and specified base. the results are assembled
- into a grid that is sent to the outlet. near the borders of
- the grid, coordinates wrap around. this means the whole grid
- has to be received before production of the next grid
- starts.
- </method>
- </inlet>
- <inlet id="1">
- <method name="grid">
- <arg name="grid" type="grid(rows2 columns2)"/>
- this is the convolution grid and it gets stored in
- the object. if rows2 and/or columns2 are odd numbers,
- then the centre of convolution is the middle of the convolution
- grid. if they are even numbers, then the chosen centre will
- be slightly more to the left and/or to the top, because the
- actual middle is between cells of the grid.
- </method>
- </inlet>
- <outlet id="0">
- <method name="grid">
- <arg name="grid" type="grid(rows columns rest...)"/>
- </method>
- </outlet>
- </class>
-
- <class name="#contrast">
- <help text="[#contrast]"/>
-
- <method name="init">
- <arg name="iwhiteness" default="256">same as inlet 1.</arg>
- <arg name="contrast" default="256">same as inlet 2.</arg>
- </method>
-
- <inlet id="0">
- <method name="grid">
- <arg name="grid" type="grid(rows columns channels)"/>
- produces a grid like the incoming grid but with
- different constrast.
- </method>
- <p><k>[#contrast]</k> adjusts the intensity in an image.
- resulting values outside 0-255 are automatically clipped.</p>
- </inlet>
- <inlet id="1">
- <method name="int">
- this is the secondary contrast (inverse whiteness).
- it makes the incoming black
- correspond to a certain fraction between output black and the
- master contrast value. no effect is 256. default value is 256.
- </method>
- </inlet>
- <inlet id="2">
- <method name="int">
- this is the master contrast. it makes the incoming white
- correspond to a certain fraction between output black and output
- white. no effect is 256. default value is 256.
- </method>
- </inlet>
- <outlet>
- <method name="grid">
- <arg name="grid" type="grid(rows columns channels)"/>
- </method>
- </outlet>
- </class>
-
- <class name="#posterize">
- <help text="[#posterize]"/>
-
- <p><k>[#posterize]</k> reduces the number of possible intensities in an image;
- it rounds the color values.The effect is mostly apparent with a low
- number of levels.</p>
-
- <method name="init">
- <arg name="levels">same as inlet 1</arg>
- </method>
-
- <inlet id="0">
- <method name="grid">
- <arg name="grid" type="grid(rows columns channels)"/>
- produces a posterized picture from the input picture.
- </method>
- </inlet>
-
- <inlet id="1">
- <method name="int">
- this is the number of possible levels per channel. the
- levels are equally spaced, with the lowest at 0 and the
- highest at 255. the minimum number of levels is 2, and the
- default value is 2.
- </method>
- </inlet>
-
- <outlet id="0">
- </outlet>
-
- <p>example: simulate the 216-color "web" palette using 6 levels.
- simulate a 15-bit display using 32 levels.</p>
- </class>
-
- <class name="#solarize">
- <p>makes medium intensities brightest; formerly brightest colours
- become darkest; formerly darkest stays darkest. This filter is linear:
- it's like a 200% contrast except that overflows are <i>mirrored</i>
- instead of clipped or wrapped.</p>
- <inlet id="0">
- <method name="grid">
- <arg name="grid" type="grid(rows columns channels)"/></method>
- </inlet>
- <outlet id="0">
- <method name="grid">
- <arg name="grid" type="grid(rows columns channels)"/></method>
- </outlet>
- </class>
-
- <class name="#checkers">
- <inlet id="0">
- <method name="grid">
- <arg name="grid" type="grid(y x {y x})"/>
- result from a <k>[#for {0 0} {height width} {1 1}]</k>
- </method>
- </inlet>
- <outlet id="0">
- <method name="grid">
- <arg name="grid" type="grid(y x {r g b})"/>
- checkered pattern of 50%/75% greys
- in 8x8 squares
- </method>
- </outlet>
- </class>
-
- <class name="#layer">
- <inlet id="0">
- <method name="grid">
- <arg name="grid" type="grid(y x {r g b a})"/>
- a picture that has an opacity channel.
- will be used as foreground.
- </method>
- </inlet>
- <inlet id="1">
- <method name="grid">
- <arg name="grid" type="grid(y x {r g b})"/>
- a picture that has NO opacity channel.
- will be used as background.
- </method>
- </inlet>
- <outlet id="0">
- <method name="grid">
- <arg name="grid" type="grid(y x {r g b})"/>
- a picture that has NO opacity channel.
- the opacity channel of the foreground is used as
- a weighting of how much of either picture is seen
- in the result.
- </method>
- </outlet>
- </class>
-
- <class name="#draw_image">
- <method name="init">
- <arg name="operator" type="numop2">
- Normally you would use the "put" operator here;
- but abnormally I recommend + and ^ for psychedelic effects.
- </arg>
- <arg name="picture" type="grid(y,x,channels)"/>
- <arg name="position" type="grid({y x})"/>
- </method>
- <inlet id="0">
- <method name="grid"><arg name="grid" type="grid(y x channels)"/>
- picture onto which another picture will be superimposed.
- </method>
- <method name="tile"><arg name="flag" type="0 or 1"/>
- if enabled, inlet 1 picture will be repeated to cover the inlet 0 picture.
- </method>
- <method name="alpha"><arg name="flag" type="0 or 1"/>
- if enabled, inlet 1 picture will be combined with inlet 0 picture using
- the selected operator,
- and then blended with inlet 0 picture according to transparency of
- the inlet 1 picture, and then inserted in the result.
- if disabled, the blending doesn't occur, as the transparency level
- is considered to be "opaque". note that with alpha enabled,
- the last channel of inlet 1 picture is considered to represent transparency.
- </method>
- </inlet>
- <inlet id="1">
- <method name="grid"><arg name="grid" type="grid(y x channels)"/>
- picture that will be superimposed onto another picture.
- </method>
- </inlet>
- <inlet id="2">
- <method name="grid"><arg name="grid" type="grid({y x})"/>
- position of the inlet 0 picture corresponding to top-left corner
- of inlet 1 picture.
- </method>
- </inlet>
- <outlet id="0">
- <method name="grid"><arg name="grid" type="grid(y x channels)"/>
- resulting picture.
- </method>
- </outlet>
- </class>
-
- <class name="#draw_polygon">
- <method name="init">
- <arg name="operator" type="numop2">
- Normally you would use the "put" operator here;
- but abnormally I recommend + and ^ for psychedelic effects.
- </arg>
- <arg name="color" type="grid(channels)"/>
- <arg name="vertices" type="grid(vertices,{y x})"/>
- </method>
- <inlet id="0">
- <method name="grid"><arg name="grid" type="grid(y x channels)"/>
- picture on which the polygon will be superimposed.
- </method>
- </inlet>
- <inlet id="1">
- <method name="grid"><arg name="grid" type="grid(channels)"/>
- color of each pixel
- </method>
- </inlet>
- <inlet id="2">
- <method name="grid"><arg name="grid" type="grid(vertices {y x})"/>
- vertices of the polygon.
- </method>
- </inlet>
- <outlet id="0">
- <method name="grid">
- <arg name="grid" type="grid(y x channels)"/>
- modified picture.
- note: starting with 0.7.2, drawing a 1-by-1
- square really generates a 1-by-1 square, and
- so on. This is because the right-hand border of a
- polygon is excluded, whereas it was included
- before, leading to slightly-wider-than-expected polygons.
- </method>
- </outlet>
- </class>
-
- <class name="#text_to_image">
- <p>inlet 2 receives a font grid, for example, [#in grid file lucida-typewriter-12.grid.gz]</p>
- <p>inlet 1 receives a 2 by 3 matrix representing the colours to use (e.g. (2 3 # 0 170 0 255 255 0) means yellow on green)</p>
- <p>inlet 0 receives a bang, transforming the data into an image suitable for #draw_image.</p>
- </class>
- <class name="#hueshift">
- <p>inlet 1 receives an angle (0..36000)</p>
- <p>inlet 0 receives a RGB picture that gets hueshifted by a rotation in the colorwheel by the specified angle; it gets sent to outlet 0.</p>
- </class>
-</section>
-
-<section name="Other Objects">
- <class name="rtmetro">This class has been removed (0.7.7).</class>
-
- <class name="bindpatcher">
- <p>sets the receive-symbol for the Pd patcher it is in.</p>
- <p>has no inlets, no outlets.</p>
- <p>EXPERIMENTAL.</p>
- <method name="init">
- <arg name="symbol" type="symbol"/>
- </method>
- </class>
-
- <class name="pingpong">
- Transforms linear counting (0, 1, 2, 3, 4, ...) into a back-and-forth counting (0, 1, 2, 1, 0, ...)
- from 0 to a specified upper bound.
- <method name="init">
- <arg name="top" type="int"/>
- </method>
- <inlet id="1">
- <method name="float"><arg name="top" type="float"/></method>
- </inlet>
- <inlet id="0">
- <method name="float">
- a value to be transformed.
- If, for example, top=10, then values 0 thru 10 are left unchanged,
- values 11 thru 19 are mapped to 9 thru 1 respectively, and 20 thru 30
- are mapped to 0 thru 10, and so on.
- </method>
- </inlet>
- </class>
-
- <class name="#global">
- <help text="[#global]" />
-
- <p>
- objects of this class do nothing by themselves and are just
- an access point to features that don't belong to any object in
- particular.
- </p>
- <method name="profiler_reset">
- resets all the time counters.
- </method>
- <method name="profiler_dump">
- displays the time counters in decreasing order, with
- the names of the classes those objects are in. this is
- an experimental feature. like most statistics,
- it could be vaguely relied upon if
- only you knew to which extent it is unreliable. more on this
- in a future section called "profiling".
- </method>
- </class>
-
- <class name="fps">
- <method name="init">
- <arg name="clocktype" type="symbol(real|user|system|cpu)">
- which clock to use. "real" uses wallclock time. "user" uses
- the amount of time spent in the process. "system" uses the
- amount of time spent in the kernel on behalf of the process.
- "cpu" uses the Pentium clock, which is like a more precise
- version of "real" if you have a Pentium.
- </arg>
- <arg name="detailed" type="symbol(detailed)">optional</arg>
- </method>
- <method name="init detailed">
- </method>
- <inlet id="0">
- <method name="bang">
- Times at which bangs are received are stored until a large
- enough sample of those is accumulated. Large enough is defined
- to be whenever the timespan exceeds one second. Then a report
- is made through the outlet.
- </method>
- <method name="(else)">
- messages other than bangs are ignored.
- </method>
- </inlet>
- <outlet id="0">
- <method name="float">
- non-detailed mode only.
- this is the messages-per-second rating.
- </method>
- <method name="list(float,6)">
- detailed mode only.
- this is: messages-per-second, followed by five values of
- milliseconds-per-message: minimum, median, maximum, average,
- standard deviation.
- (the average happens to be simply 1000 divided by the
- messages-per-second, but it is convenient to have it anyway)
- </method>
- </outlet>
- </class>
-
- <class name="unix_time">
- <p>
- This object returns the Unix timestamp. The first
- outlet does so with ASCII, the second in seconds and the third outlet
- outputs the fractions of seconds up to 1/100 000 th of a second which is useful for creating
- filenames.
- </p>
- <inlet id="0"><method name="bang"/></inlet>
- <outlet id="0"><method name="symbol"/>Outputs the time and date in ASCII format</outlet>
- <outlet id="1"><method name="float"/>Outputs the Unix timestamp in seconds</outlet>
- <outlet id="2"><method name="float"/>Outputs the fractions of a second up to 10 microseconds (?) (actual precision is platform-dependent afaik)</outlet>
- </class>
-
- <class name="ls">
- <p>
- This object is similar to the Unix list command
- 'ls'. It returns the names of files in a given
- directory. May be used with [listlength] to retrieve the number of files.
- Hidden files are displayed.
- </p>
- <inlet id="0"><method name="symbol">
- lists all files in a given directory
- </method>
- <method name="glob">
- lists all files matching a given pattern.
- "symbol hello" is like "glob hello/*"
- </method></inlet>
- </class>
-
- <class name="exec">
- <p>
- This object launches a Unix shell program or script.
- </p>
- <inlet id="0"><method name="symbol"/></inlet>
- </class>
-
- <class name="renamefile">
- <p>
- This object accepts a list of two elements as arguments.
- The current file name being the first and the second is the desired change
- in name.
- </p>
- <inlet id="0"><method name="list"/></inlet>
- </class>
-
- <class name="plotter_control">
- <p>
- This object produces HPGL instructions in ASCII form
- that can be sent to the comport object in order to control an HPGL
- compatible plotter.
- </p>
- <inlet id="0"><method name="symbol"/></inlet>
- <outlet id="0"><method name="symbol"/>Outputs the HPGL commands in ASCII format</outlet>
- </class>
-
- <class name="rubyarray">
- <p>inlet 0 float : sends the specified array entry to outlet 0</p>
- <p>inlet 1 list: writes that list as an array entry in position last specified by inlet 0.</p>
- <p>inlet 0 save(symbol filename): writes the array contents to a file of the given filename as a CSV</p>
- <p>inlet 0 save(symbol filename, symbol format): same thing but using a sprintf string such as %x,%f or whatever</p>
- <p>inlet 0 load(symbol filename): replace all array contents by the contents of a CSV file</p>
- </class>
-</section>
-
-<section name="jMax emulation">
- <p>those classes emulate jMax functionality,
- for use within PureData and Ruby.</p>
-
- <class name="fork">
- <p>Every incoming message is sent to inlet 1 and then sent to
- inlet 0 as well. Messages remain completely unaltered. Contrast
- with PureData's "t a a" objects, which have the same purpose but
- transform bangs into zeros and such.</p>
-
- <inlet id="0"><method name="(any)"/></inlet>
- <outlet id="0"/>
- <outlet id="1"/>
- </class>
- <class name="jmax_udpsend">
- Sends messages (but not grids nor dspsignals) via UDP (which
- does not involve a connection, and may lose packets in case of
- network overload or noise or etc).
-
- <p>This works with jMax 2.5 and 4.1 but not 4.0.</p>
-
- <method name="init">
- <arg name="host" type="host"/>
- <arg name="port" type="integer"/>
- </method>
-
- <inlet id="0"><method name="&lt;any&gt;"/></inlet>
- </class>
- <class name="jmax_udpreceive">
- <p>Counterpart of jmax_udpsend</p>
-
- <p>This works with jMax 2.5 and 4.1 but not 4.0.</p>
-
- <method name="init">
- <arg name="port" type="integer"/>
- </method>
- <outlet id="0"><method name="&lt;any&gt;"/></outlet>
- <outlet id="1"><method name="list">
- <arg name="protocol_name"/>
- <arg name="sender_port"/>
- <arg name="sender_host"/>
- <arg name="sender_ip_address"/>
- </method>
- </outlet>
- </class>
- <class name="foreach">
- <inlet id="0"><method name="list"><rest/>
- Outputs N messages, one per list element, in order.
- </method></inlet>
- </class>
- <class name="rubysprintf">
- <method name="init">
- <arg name="format" type="symbol"/>
- </method>
- <inlet id="0"><method name="list">
- Outputs the format string with %-codes replaced
- by elements of the list formatted as the %-codes say.
- To get a list of those codes, consult a Ruby manual
- (Equivalently, Perl, Python, Tcl and C all have equivalents of this,
- and it's almost always called sprintf, or the % operator, or both)
- </method></inlet>
- <inlet id="1" attr="format" type="symbol"/>
- </class>
- <class name="listflatten">
- <inlet id="0"><method name="list"><rest/>
- </method></inlet>
- </class>
- <class name="listmake">
- Emulation of jMax's [list] (but there cannot be a class named [list] in Pd)
- <method name="init">
- <rest name="list" isattr="yes"/>
- </method>
- <inlet id="0">
- <method name="bang">send "list" to outlet 0</method>
- <method name="list">as sending to inlet 1 and then banging; that is, passes thru and remembers.</method>
- </inlet>
- <inlet id="1" attr="list"/>
- </class>
- <class name="listlength">
- <inlet id="0"><method name="list">
- outputs the number of elements in the incoming list.
- </method></inlet>
- </class>
- <class name="listelement">
- <method name="init">
- <arg name="index" type="int" isattr="yes"/>
- </method>
- <inlet id="0"><method name="list"><rest/>
- Outputs one element of the list, as selected by "index".
- Also accepts negative indices (e.g.: -1 means "last"), like Ruby, but unlike jMax.
- </method></inlet>
- <inlet id="1" attr="index"/>
- </class>
- <class name="listsublist">
- <method name="init">
- <arg name="index" type="int" isattr="yes"/>
- <arg name="length" type="int" isattr="yes"/>
- </method>
- <inlet id="0"><method name="list"><rest/>
- Outputs consecutive elements of the list, as selected by "index" and "length".
- Also accepts negative indices (e.g.: -1 means "last"), like Ruby, but unlike jMax.
- </method></inlet>
- <inlet id="1" attr="index"/>
- <inlet id="2" attr="length"/>
- </class>
- <class name="listprepend">
- <method name="init">
- <rest name="list" isattr="yes"/>
- </method>
- <inlet id="0"><method name="list"><rest/>
- Outputs the stored list followed by the incoming list, all in one message.
- </method></inlet>
- <inlet id="1" attr="list"/>
- </class>
- <class name="listappend">
- <method name="init">
- <rest name="list" isattr="yes"/>
- </method>
- <inlet id="0"><method name="list"><rest/>
- Outputs the incoming list followed by the stored list, all in one message.
- </method></inlet>
- <inlet id="1" attr="list"/>
- </class>
- <class name="listreverse">
- <inlet id="0"><method name="list"><rest/>
- Outputs the incoming list, from last element to first element.
- </method></inlet>
- </class>
- <class name="oneshot">
- Like [spigot], but turns itself off after each message, so you have to turn it on
- again to making it pass another message.
- </class>
- <class name="inv+">
- <method name="init">
- <arg name="b" type="float" isattr="yes"/>
- </method>
- <inlet id="0"><method name="float"><arg name="a" type="float"/>
- outputs b-a
- </method></inlet>
- <inlet id="1" attr="b"/>
- </class>
- <class name="inv*">
- <method name="init">
- <arg name="b" type="float" isattr="yes"/>
- </method>
- <inlet id="0"><method name="float"><arg name="a" type="float"/>
- outputs b/a
- </method></inlet>
- <inlet id="1" attr="b"/>
- </class>
- <class name="messageprepend">
- (This is not in jMax, but is there to help port $* messageboxes)
- <method name="init"><rest name="list" isattr="yes"/></method>
- <inlet id="0"><method name="&lt;any&gt;"><rest/>
- Like [listprepend], but operates on whole messages, that is, including the selector.
- </method></inlet>
- <inlet id="1" attr="list"/>
- </class>
- <class name="messageappend">
- (This is not in jMax, but is there to help port $* messageboxes)
- <method name="init"><rest name="list" isattr="yes"/></method>
- <inlet id="0"><method name="&lt;any&gt;"><rest/>
- Like [listappend], but operates on whole messages, that is, including the selector.
- </method>
- </inlet>
- <inlet id="1" attr="list"/>
- </class>
- <class name="shunt">
- Compatible with jMax's [demux].
- <method name="init">
- <arg name="n">number of outlets</arg>
- <arg name="i" default="0">initial selected outlet</arg>
- </method>
- <inlet id="0"><method name="&lt;any&gt;"><rest/>
- Routes a message to the active outlet.
- </method></inlet>
- <inlet id="1"><method name="int"><arg name="i" type="int"/>
- Selects which outlet is active.
- </method></inlet>
- </class>
- <class name="demux">
- please use shunt instead (name conflict with another Pd external)
- </class>
- <class name="range">
- <method name="init">
- <rest name="separators" type="float"></rest>
- </method>
- <inlet id="0"><method name="float">
- a value to be sent to one of the outlets. The first outlet is for values
- smaller than the first argument; else the second outlet is for values smaller
- than the second argument; and so on; and the last outlet is for values greater
- or equal to the last argument.
- </method></inlet>
- <inlet id="1..n"><method name="float">
- sets the corresponding separator in the separator list.
- </method></inlet>
- </class>
-</section>
-
-<section name="PureData emulation">
- <class name="pd_netsend">
- same as jmax_udpsend but for PureData UDP connections.
- </class>
- <class name="pd_netreceive">
- same as jmax_udpreceive but for PureData UDP connections.
- </class>
-</section>
-
-</documentation>
diff --git a/externals/gridflow/doc/tutorials/0-0-intro_page.pd b/externals/gridflow/doc/tutorials/0-0-intro_page.pd
deleted file mode 100755
index 3ac9fb86..00000000
--- a/externals/gridflow/doc/tutorials/0-0-intro_page.pd
+++ /dev/null
@@ -1,89 +0,0 @@
-#N canvas 226 0 429 638 10;
-#X obj -22 -68 cnv 1 430 80 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj -24 49 cnv 1 430 520 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj -24 82 cnv 1 430 2 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj -24 57 cnv 1 430 2 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj -17 49 cnv 1 2 480 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj 390 50 cnv 1 2 480 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj -24 144 cnv 1 430 2 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj -24 168 cnv 1 430 2 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X text 26 98 1.1 What is a grid?;
-#X obj 41 534 cnv 15 300 30 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X text 53 539 Stephanie Brodeur & Darsha Hewitt 2005;
-#X obj -22 7 cnv 15 430 30 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj 88 -3 cnv 15 100 17 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj 88 -5 GridFlow 0.8.0;
-#X obj -22 -68 cnv 1 430 1 empty empty empty 20 12 0 14 -66577 -66577
-0;
-#X obj -23 37 cnv 1 430 1 empty empty empty 20 12 0 14 -66577 -66577
-0;
-#X obj 189 11 cnv 15 63 17 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj 188 8 Tutorials;
-#X obj -24 48 cnv 1 430 1 empty empty empty 20 12 0 14 -66577 -66577
-0;
-#X obj -24 528 cnv 1 430 1 empty empty empty 20 12 0 14 -66577 -66577
-0;
-#X text 14 63 1;
-#X obj 32 62 Introduction to Grids;
-#X text 26 178 2.1 How does GridFlow understand images?;
-#X text 15 150 2;
-#X obj 36 147 Introduction to Images;
-#X text 419 224 2.3 Different options on how to open an image.;
-#X text 445 241 2.3.1 Opening different images in one window.;
-#X text 445 258 2.3.2 Opening images using send and receive.;
-#X obj -24 310 cnv 1 430 2 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj -24 334 cnv 1 430 2 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X text 18 317 3;
-#X obj 39 315 Introduction to Video;
-#X text 482 201 REMOVE 2.3 -- see pd tuts;
-#X text 17 405 4;
-#X obj 38 405 Introduction to Live Feed;
-#X obj 37 481 Putting it all Together;
-#X text 20 482 5;
-#X text 30 430 4.1 Opening a live video feed;
-#X text 30 446 4.2 Motion Detection;
-#X text 29 372 3.3 Recording video;
-#X obj -24 310 cnv 1 430 2 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj -24 334 cnv 1 430 2 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj -24 400 cnv 1 430 2 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj -24 424 cnv 1 430 2 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj -24 400 cnv 1 430 2 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj -24 424 cnv 1 430 2 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj -24 476 cnv 1 430 2 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj -24 500 cnv 1 430 2 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj -24 476 cnv 1 430 2 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj -24 500 cnv 1 430 2 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X text 26 114 1.2 How to create a grid;
-#X text 26 197 2.2 Opening an image;
-#X text 26 214 2.3 Image manipulation;
-#X text 55 244 2.3.2 Resizing an image;
-#X text 55 228 2.3.1 Numop;
-#X text 55 273 2.3.4 Remap image;
-#X text 55 259 2.3.3 Greyscale;
-#X text 55 286 2.3.5 Convolve;
-#X text 29 342 3.1 Opening a video;
-#X text 29 358 3.2 Video manipulation;
diff --git a/externals/gridflow/doc/tutorials/2-3-4-image-modification-2-remap-image.pd b/externals/gridflow/doc/tutorials/2-3-4-image-modification-2-remap-image.pd
deleted file mode 100755
index b6e4755d..00000000
--- a/externals/gridflow/doc/tutorials/2-3-4-image-modification-2-remap-image.pd
+++ /dev/null
@@ -1,55 +0,0 @@
-#N canvas 41 17 876 618 10;
-#X obj 10 519 cnv 15 720 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X msg 53 173 open b001.jpg;
-#X obj 23 116 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 23 204 #in;
-#X obj 23 142 t b b;
-#X obj 23 351 #out window;
-#X obj 102 323 #print;
-#X obj 184 160 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X floatatom 203 225 5 0 0 0 - - -;
-#X obj 173 184 #for (0 0) (240 320) (1 1);
-#X obj 173 134 metro 100;
-#X obj 173 109 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X obj 23 292 #remap_image;
-#X text 18 526 GridFlow 0.8.0;
-#X text 243 224 <-- Modify the value to see transformations.;
-#X obj 173 257 # / 1;
-#X text 227 261 The remap object works with numops.;
-#X obj 9 -17 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj 9 -52 cnv 15 430 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 15 -17 2.4 Image Manipulation;
-#X text 16 -46 2 Introduction to Images;
-#X text 15 2 2.4.4 Remap Image;
-#X text 26 408 Remap image permits you to modify an image using numeric
-operators. Different numeric Operators have different effects ton the
-image and can be changed to give the desired effect. The multiplication
-operator multiplies the values and distorts the image. The division
-operator does the same but shrinks the operator...;
-#X text 467 24 Have the list of operators and what they do in order
-to know the various effects.;
-#X text 468 77 example:;
-#X obj 474 121 # / 2;
-#X text 523 114 multiplication multiplies the numbers in the grid and
-distorts the image.;
-#N canvas 0 0 450 300 META 0;
-#X restore 130 527 pd META;
-#X connect 1 0 3 0;
-#X connect 2 0 4 0;
-#X connect 3 0 12 0;
-#X connect 4 0 3 0;
-#X connect 4 1 1 0;
-#X connect 7 0 9 0;
-#X connect 8 0 15 1;
-#X connect 9 0 15 0;
-#X connect 10 0 9 0;
-#X connect 11 0 10 0;
-#X connect 12 0 5 0;
-#X connect 12 1 6 0;
-#X connect 15 0 12 1;
diff --git a/externals/gridflow/doc/tutorials/2-3-5-image-modification-2-convolve.pd b/externals/gridflow/doc/tutorials/2-3-5-image-modification-2-convolve.pd
deleted file mode 100755
index 4a099537..00000000
--- a/externals/gridflow/doc/tutorials/2-3-5-image-modification-2-convolve.pd
+++ /dev/null
@@ -1,120 +0,0 @@
-#N canvas 47 0 787 658 10;
-#X msg 468 148 3 3 # 0 4 0 4 9 -4 0 -4 0;
-#X msg 467 100 3 3 # 4 0 0 0 1 0 0 0 4;
-#X obj 80 219 #store;
-#X obj 80 270 # / 9;
-#X msg 467 75 3 3 # 1 1 1 1 1 1 1 1 1;
-#X obj -13 201 #out window;
-#X msg 470 263 1 3 # 0 9 -9;
-#X obj -21 117 #in;
-#X msg 468 124 3 3 # 2 2 2 2 -7 2 2 2 2;
-#X obj 80 145 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1
-;
-#X obj 70 325 @! abs;
-#X obj -21 77 loadbang;
-#X obj 80 182 metro 33.3667;
-#X obj -21 139 t a;
-#X obj 80 244 #convolve \, seed 4;
-#X obj 401 78 loadbang;
-#X obj 80 299 shunt 2;
-#X obj 124 270 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0
-1;
-#X msg 170 280 0;
-#X obj 124 351 # + 128;
-#X msg 170 304 1;
-#X obj 469 174 display;
-#X obj -13 225 fps;
-#X obj -13 250 print;
-#X obj -50 466 cnv 15 780 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text -42 473 GridFlow 0.8.0;
-#X text -42 473 GridFlow 0.8.0;
-#X msg 470 242 1 3 # 0 2 -2;
-#X msg 470 325 3 3 # 0 -1 0 -1 4 -1 0 -1 0;
-#X msg 470 348 3 3 # -1 -1 -1 -1 8 -1 -1 -1 -1;
-#X msg 470 416 3 3 # 0 -1 0 -1 13 -1 0 -1 0;
-#X obj 124 325 # << 4;
-#X msg -21 97 open babbage.jpg \, bang;
-#X obj -49 -111 cnv 15 780 15 empty empty empty 20 12 0 14 -228992
--66577 0;
-#X obj -49 -146 cnv 15 780 30 empty empty empty 20 12 0 14 -233017
--66577 0;
-#X obj 470 218 cnv 15 100 15 empty empty empty 20 12 0 14 -260818 -66577
-0;
-#X obj 468 52 cnv 15 37 15 empty empty empty 20 12 0 14 -260818 -66577
-0;
-#X text 470 218 Edge detection;
-#X obj 470 303 cnv 15 110 15 empty empty empty 20 12 0 14 -260818 -66577
-0;
-#X text 472 303 Laplacian masks;
-#X obj 470 393 cnv 15 50 15 empty empty empty 20 12 0 14 -260818 -66577
-0;
-#X text 470 393 Sharpen;
-#X obj -21 383 #clip;
-#X obj 190 118 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577
-0;
-#X obj 210 97 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577
-0;
-#X text 146 97 <-- step #1: load image;
-#X obj 173 141 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577
-0;
-#X text 109 141 <-- step #3: start metro;
-#X text 154 118 step #2: select transformation -->;
-#X text 468 52 Blurs;
-#N canvas 0 0 450 300 META 0;
-#X restore 69 473 pd META;
-#X text -44 -140 2 Introduction to Images;
-#X text -44 -112 2.4 Image Manipulation;
-#X obj -49 24 cnv 15 780 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X text -49 23 (Source convolve.pd : Copyright Mathieu Bouchard 2002)
-;
-#X text -16 -67 Convolve is an abstraction used for modifying an image.
-In this patch you can choose to create a "blur" \, to view "edge detection"
-\, to add a "laplacian mask" or to "sharpen" an image. The image must
-be loaded \, the transformation selected and the metro started before
-seeing the transformation applied to the image.;
-#X obj -17 -89 cnv 15 100 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X text -17 -90 2.4.4 Convolve;
-#X connect 0 0 18 0;
-#X connect 0 0 14 1;
-#X connect 0 0 21 0;
-#X connect 1 0 18 0;
-#X connect 1 0 14 1;
-#X connect 2 0 14 0;
-#X connect 3 0 16 0;
-#X connect 4 0 18 0;
-#X connect 4 0 14 1;
-#X connect 5 0 22 0;
-#X connect 6 0 14 1;
-#X connect 6 0 20 0;
-#X connect 7 0 13 0;
-#X connect 8 0 18 0;
-#X connect 8 0 14 1;
-#X connect 9 0 12 0;
-#X connect 10 0 42 0;
-#X connect 11 0 32 0;
-#X connect 12 0 2 0;
-#X connect 13 0 2 1;
-#X connect 13 0 5 0;
-#X connect 14 0 3 0;
-#X connect 15 0 4 0;
-#X connect 16 0 10 0;
-#X connect 16 1 31 0;
-#X connect 17 0 16 1;
-#X connect 18 0 17 0;
-#X connect 19 0 42 0;
-#X connect 20 0 17 0;
-#X connect 22 0 23 0;
-#X connect 27 0 18 0;
-#X connect 27 0 14 1;
-#X connect 28 0 14 1;
-#X connect 28 0 20 0;
-#X connect 29 0 20 0;
-#X connect 29 0 14 1;
-#X connect 30 0 18 0;
-#X connect 30 0 14 1;
-#X connect 31 0 19 0;
-#X connect 32 0 7 0;
-#X connect 42 0 13 0;
diff --git a/externals/gridflow/doc/tutorials/2-3-6-image-modification-2-cross-fade.pd b/externals/gridflow/doc/tutorials/2-3-6-image-modification-2-cross-fade.pd
deleted file mode 100755
index 6b8fe50a..00000000
--- a/externals/gridflow/doc/tutorials/2-3-6-image-modification-2-cross-fade.pd
+++ /dev/null
@@ -1,93 +0,0 @@
-#N canvas 92 129 774 521 10;
-#X text 24 355 note: the #layer/#join objects can make the crossfade
-process simpler but it's still not faster.;
-#X obj 14 95 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1;
-#X obj 14 120 metro 33.3667;
-#X obj 14 140 float;
-#X obj 26 169 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10
--262144 -1 -1 0 256;
-#X obj 58 139 + 4;
-#X obj 14 190 pingpong 256;
-#X obj 25 212 hsl 129 15 0 256 0 0 empty empty empty -2 -6 0 8 -260818
--1 -1 0 1;
-#X text 25 393 also #draw_image/#join is a possibility;
-#X obj 13 40 cnv 15 680 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 27 53 Copyright 2002 Mathieu Bouchard;
-#X text 27 37 cross_fade.pd;
-#X obj 6 324 cnv 15 680 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 18 326 GridFlow 0.8.0;
-#N canvas 515 126 450 300 cross_fade 0;
-#X obj 40 198 # *>>8;
-#X text 67 242 first picture plus a fraction of the difference;
-#X obj 40 240 # +;
-#X obj 40 177 #store;
-#X obj 264 137 # inv+;
-#X obj 95 261 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 1
-;
-#X msg 422 195 open r001.jpg \, cast int16 \, bang;
-#X obj 321 156 #in;
-#X obj 40 156 #finished;
-#X text 116 264 click to clip out-of-range colours;
-#X text 89 197 multiply by a N/256 fraction;
-#X obj 88 302 # max 0;
-#X obj 254 89 #in;
-#X obj 88 281 # min 255;
-#X obj 44 337 #out window;
-#X obj 40 116 #cast int16;
-#X text 88 177 keep the difference between both pictures;
-#X obj 447 99 t b b;
-#X obj 445 74 loadbang;
-#X obj 40 260 shunt 2;
-#X obj 40 135 t a a;
-#X msg 459 137 open g001.jpg \, cast int16 \, bang;
-#X obj 30 75 inlet;
-#X connect 0 0 2 0;
-#X connect 2 0 19 0;
-#X connect 3 0 0 0;
-#X connect 4 0 3 1;
-#X connect 5 0 19 1;
-#X connect 6 0 7 0;
-#X connect 7 0 4 1;
-#X connect 8 0 3 0;
-#X connect 11 0 14 0;
-#X connect 12 0 4 0;
-#X connect 12 0 2 1;
-#X connect 13 0 11 0;
-#X connect 15 0 20 0;
-#X connect 17 0 21 0;
-#X connect 17 1 6 0;
-#X connect 18 0 17 0;
-#X connect 19 0 14 0;
-#X connect 19 1 13 0;
-#X connect 20 0 8 0;
-#X connect 20 1 0 1;
-#X connect 21 0 12 0;
-#X connect 22 0 15 0;
-#X restore 13 261 pd cross_fade;
-#X obj 15 11 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X text 18 11 What is a grid?;
-#X obj 15 -24 cnv 15 430 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 20 -25 2 Images;
-#X text 22 -11 Description: opening multiple images from one window.
-;
-#X obj 11 416 cnv 15 430 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 19 423 GridFlow 0.8.0;
-#X text 219 118 some objects have been created to perform specoific
-tasks. One of these is the crossfade patch it permits you to fade from
-one image to another. you can chose the images you want to ping pong
-between \, to get a nice steady fade between two images.;
-#N canvas 0 0 450 300 META 0;
-#X restore 146 428 pd META;
-#X connect 1 0 2 0;
-#X connect 2 0 3 0;
-#X connect 3 0 4 0;
-#X connect 3 0 5 0;
-#X connect 3 0 6 0;
-#X connect 5 0 3 1;
-#X connect 6 0 7 0;
-#X connect 6 0 14 0;
diff --git a/externals/gridflow/doc/tutorials/2nd-part-numop.pd b/externals/gridflow/doc/tutorials/2nd-part-numop.pd
deleted file mode 100755
index a6f96f9c..00000000
--- a/externals/gridflow/doc/tutorials/2nd-part-numop.pd
+++ /dev/null
@@ -1,80 +0,0 @@
-#N canvas 66 33 927 601 10;
-#X obj 16 -206 cnv 15 200 170 empty empty empty 20 12 0 14 -228992
--66577 0;
-#X obj 38 -178 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1
--1;
-#X obj 24 -127 #in;
-#X obj 82 -114 hsl 128 15 0 255 0 0 empty empty empty -2 -6 0 8 -241291
--1 -1 0 1;
-#X obj 24 -88 # + \$1;
-#X obj 125 -157 metro 33.3;
-#X obj 125 -177 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0
-1;
-#X obj 462 -153 cnv 15 400 350 empty empty empty 20 12 0 14 -228992
--66577 0;
-#X obj 482 -109 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1
--1;
-#X obj 468 -30 #in;
-#X msg 468 -132 open b001.jpg;
-#X obj 508 -49 hsl 128 15 0 255 0 0 empty empty empty -2 -6 0 8 -241291
--1 -1 0 1;
-#X obj 468 84 # + \$1;
-#X obj 514 -109 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 1
-1;
-#X obj 468 128 #clip;
-#X obj 24 -60 s slider_metro;
-#X obj 468 154 s slider_metro_clip;
-#X floatatom 79 -86 5 0 0 0 - - -;
-#X text 10 210 In all these examples the [# +] numop is used. All the
-numeric operators can be found in the numeric operator help patch (right
-click on the [# +] and select help to view them). If you want to see
-what effects other numops can do \, try replacing the [# +] numop with
-another one (either cut and past a different numop from the help file
-or create the object in the current canvas.;
-#X obj 514 -89 metro 33.3;
-#X obj 552 -21 #color;
-#X msg 552 44 255 0 0;
-#X text 614 44 donner une liste changer couleurs;
-#X obj 552 88 #scale_by (8 8);
-#X msg 552 66 2 2 3 # 255 0 0 0 255 0 0 0 255 191 191 191;
-#X obj 834 211 r slider_metro;
-#X obj 843 238 r slider_metro_clip;
-#X obj 834 265 #out window;
-#X obj 16 -284 cnv 15 70 15 empty empty empty 20 12 0 14 -260818 -66577
-0;
-#X text 15 -284 Example #4;
-#X text 15 -261 Will demonstrate how to use the metro (see pd_intro
-#4) and the slider which allows you to scroll through values and modify
-a grid in real-time.;
-#X msg 24 -202 open b001.jpg;
-#X obj 456 -281 cnv 15 70 15 empty empty empty 20 12 0 14 -260818 -66577
-0;
-#X text 455 -281 Example #5;
-#X text 457 -260 We introduce the [#clip] object. It is used with numops
-in order to set constraints on the pixel to eliminate color wrapping.
-Colour wrapping occurs when the individual pixel values in a grid exceed
-255 which results in over-saturation of colour. GridFlow reads colours
-as values from 0 (black) to 255 (white). Refer to glossary for more
-information on colour.;
-#X connect 1 0 2 0;
-#X connect 2 0 4 0;
-#X connect 3 0 4 1;
-#X connect 3 0 17 0;
-#X connect 4 0 15 0;
-#X connect 5 0 2 0;
-#X connect 6 0 5 0;
-#X connect 8 0 9 0;
-#X connect 9 0 12 0;
-#X connect 10 0 9 0;
-#X connect 11 0 12 1;
-#X connect 12 0 14 0;
-#X connect 13 0 19 0;
-#X connect 14 0 16 0;
-#X connect 19 0 9 0;
-#X connect 20 0 12 1;
-#X connect 21 0 12 1;
-#X connect 23 0 12 1;
-#X connect 24 0 23 0;
-#X connect 25 0 27 0;
-#X connect 26 0 27 0;
-#X connect 31 0 2 0;
diff --git a/externals/gridflow/doc/tutorials/3-1-0-open-video.pd b/externals/gridflow/doc/tutorials/3-1-0-open-video.pd
deleted file mode 100755
index 2abf0e74..00000000
--- a/externals/gridflow/doc/tutorials/3-1-0-open-video.pd
+++ /dev/null
@@ -1,38 +0,0 @@
-#N canvas 48 56 545 431 10;
-#X obj 100 156 #in;
-#X obj 100 222 #out window;
-#X obj 124 33 openpanel;
-#X obj 124 9 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X msg 124 58 open \$1;
-#X obj 17 11 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1;
-#X obj 17 45 metro 33.33;
-#X floatatom 317 190 5 0 0 0 - - -;
-#X obj 401 166 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 401 193 print go;
-#X msg 201 124 loop 0;
-#X msg 201 97 loop 1;
-#X msg 283 13 open home/steph/Desktop/PDDP_summer;
-#X obj 7 -37 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X text 10 -37 What is a grid?;
-#X obj 7 -72 cnv 15 430 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 12 -73 2 Images;
-#X text 14 -59 Description: opening multiple images from one window.
-;
-#X obj 8 320 cnv 15 430 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 16 327 GridFlow 0.8.0;
-#X connect 0 0 1 0;
-#X connect 0 1 7 0;
-#X connect 2 0 4 0;
-#X connect 3 0 2 0;
-#X connect 4 0 0 0;
-#X connect 5 0 6 0;
-#X connect 6 0 0 0;
-#X connect 8 0 9 0;
-#X connect 10 0 0 0;
-#X connect 11 0 0 0;
-#X connect 12 0 0 0;
diff --git a/externals/gridflow/doc/tutorials/3-2-video-manipulation.pd b/externals/gridflow/doc/tutorials/3-2-video-manipulation.pd
deleted file mode 100755
index 78a7b427..00000000
--- a/externals/gridflow/doc/tutorials/3-2-video-manipulation.pd
+++ /dev/null
@@ -1 +0,0 @@
-#N canvas 0 0 450 300 10;
diff --git a/externals/gridflow/doc/tutorials/3-3-record-video.pd b/externals/gridflow/doc/tutorials/3-3-record-video.pd
deleted file mode 100755
index ff158554..00000000
--- a/externals/gridflow/doc/tutorials/3-3-record-video.pd
+++ /dev/null
@@ -1,51 +0,0 @@
-#N canvas 151 21 517 609 10;
-#X obj 15 320 #camera;
-#X obj 15 260 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1
-;
-#X obj 142 370 #out window;
-#X obj 90 260 hsl 128 15 20 300 0 0 empty empty empty -2 -6 0 8 -260818
--1 -1 0 1;
-#X obj 142 395 fps detailed;
-#X obj 142 419 print;
-#X obj 15 294 metro 100;
-#X obj 53 473 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 129 506 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X text 149 505 stop recording;
-#X text 73 471 select filename;
-#X text 111 488 start recording;
-#X obj 91 489 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 15 528 #record_quicktime;
-#X text 21 54 To record a video from a live stream or a video... you
-can use this patch.;
-#X text 224 315 xinitrc ssh pdrc bach rc export bookmarks;
-#X text 11 110 The outside of the patch uses objects seen in previous
-patches. The [#record_quicktime] object is an abstraction in which
-the settings and the optins are situated. to contruct the patch ...
-Do we explain how to do it if it is in an abstraction???;
-#X text 86 198 we don't nec have to explain how to build it since its
-available to them through the pd_examples and they have been through
-enough patvhes to easily understand what's going on.;
-#X obj 11 29 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X text 14 29 What is a grid?;
-#X obj 11 -6 cnv 15 430 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 21 -7 2 Images;
-#X text 18 7 Description: opening multiple images from one window.
-;
-#X obj 13 561 cnv 15 430 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 21 568 GridFlow 0.8.0;
-#X connect 0 0 2 0;
-#X connect 0 0 13 0;
-#X connect 1 0 6 0;
-#X connect 2 0 4 0;
-#X connect 3 0 6 1;
-#X connect 4 0 5 0;
-#X connect 6 0 0 0;
-#X connect 7 0 13 1;
-#X connect 8 0 13 3;
-#X connect 12 0 13 2;
diff --git a/externals/gridflow/doc/tutorials/4-0-open-live-stream.pd b/externals/gridflow/doc/tutorials/4-0-open-live-stream.pd
deleted file mode 100755
index 7ce60b4d..00000000
--- a/externals/gridflow/doc/tutorials/4-0-open-live-stream.pd
+++ /dev/null
@@ -1,24 +0,0 @@
-#N canvas 286 99 571 305 10;
-#X obj 91 104 #camera;
-#X obj 40 40 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1
-;
-#X obj 91 12 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1;
-#X obj 91 59 metro 50;
-#X obj 91 151 #out window;
-#X text 162 103 In this case there is no need for the [#in] objec.
-Thereis one in the [#camera] object already.;
-#X obj 7 -37 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X text 10 -37 What is a grid?;
-#X obj 7 -72 cnv 15 430 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 12 -73 2 Images;
-#X text 14 -59 Description: opening multiple images from one window.
-;
-#X obj 10 197 cnv 15 430 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 18 204 GridFlow 0.8.0;
-#X connect 0 0 4 0;
-#X connect 1 0 0 0;
-#X connect 2 0 3 0;
-#X connect 3 0 0 0;
diff --git a/externals/gridflow/doc/tutorials/4-1-2-simple-motion-detection-absolute-value.pd b/externals/gridflow/doc/tutorials/4-1-2-simple-motion-detection-absolute-value.pd
deleted file mode 100755
index a4021d41..00000000
--- a/externals/gridflow/doc/tutorials/4-1-2-simple-motion-detection-absolute-value.pd
+++ /dev/null
@@ -1,31 +0,0 @@
-#N canvas 452 202 450 438 10;
-#X obj 91 104 #camera;
-#X obj 40 40 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1
-;
-#X obj 91 12 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1;
-#X obj 91 59 metro 50;
-#X obj 100 253 #out window;
-#X obj 88 134 trigger anything anything;
-#X obj 133 162 # -;
-#X obj 133 201 #clip;
-#X obj 343 223 @! abs;
-#X obj 343 254 # + 50;
-#X obj 7 -37 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X text 10 -37 What is a grid?;
-#X obj 7 -72 cnv 15 430 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 12 -73 2 Images;
-#X text 14 -59 Description: opening multiple images from one window.
-;
-#X obj 8 320 cnv 15 430 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 16 327 GridFlow 0.8.0;
-#X connect 0 0 5 0;
-#X connect 1 0 0 0;
-#X connect 2 0 3 0;
-#X connect 3 0 0 0;
-#X connect 5 0 6 1;
-#X connect 5 1 6 0;
-#X connect 6 0 7 0;
-#X connect 7 0 4 0;
diff --git a/externals/gridflow/doc/tutorials/4-1-3-motion-detection-more-advanced-and-more-options.pd b/externals/gridflow/doc/tutorials/4-1-3-motion-detection-more-advanced-and-more-options.pd
deleted file mode 100755
index 112d2f8c..00000000
--- a/externals/gridflow/doc/tutorials/4-1-3-motion-detection-more-advanced-and-more-options.pd
+++ /dev/null
@@ -1,49 +0,0 @@
-#N canvas 476 26 450 542 10;
-#X obj 91 104 #camera;
-#X obj 248 302 #out window;
-#X obj 40 40 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1
-;
-#X text 167 102 there is an [#in] within [#camera];
-#X obj 80 12 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1;
-#X obj 248 325 fps detailed;
-#X obj 248 351 print;
-#X obj 108 20 metro 50;
-#X obj 248 198 # -;
-#X obj 248 269 #clip;
-#X obj 248 220 @! abs;
-#X obj 248 244 # + 50;
-#X obj 164 141 trigger anything anything;
-#X text 281 197 230400 (240x320x3);
-#X obj 101 303 #rgb_to_greyscale;
-#X obj 101 326 #centroid;
-#X floatatom 154 404 5 0 0 0 - - -;
-#X floatatom 200 403 5 0 0 0 - - -;
-#X obj 85 375 display;
-#X obj 7 -37 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X text 10 -37 What is a grid?;
-#X obj 7 -72 cnv 15 430 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 12 -73 2 Images;
-#X text 14 -59 Description: opening multiple images from one window.
-;
-#X obj 6 432 cnv 15 430 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 14 439 GridFlow 0.8.0;
-#X connect 0 0 12 0;
-#X connect 1 0 5 0;
-#X connect 2 0 0 0;
-#X connect 4 0 7 0;
-#X connect 5 0 6 0;
-#X connect 7 0 0 0;
-#X connect 8 0 10 0;
-#X connect 9 0 1 0;
-#X connect 9 0 14 0;
-#X connect 10 0 11 0;
-#X connect 11 0 9 0;
-#X connect 12 0 8 1;
-#X connect 12 1 8 0;
-#X connect 14 0 15 0;
-#X connect 15 0 18 0;
-#X connect 15 1 16 0;
-#X connect 15 2 17 0;
diff --git a/externals/gridflow/doc/tutorials/4-1-simple-motion-detection.pd b/externals/gridflow/doc/tutorials/4-1-simple-motion-detection.pd
deleted file mode 100755
index bb3962a1..00000000
--- a/externals/gridflow/doc/tutorials/4-1-simple-motion-detection.pd
+++ /dev/null
@@ -1,37 +0,0 @@
-#N canvas 83 181 707 437 10;
-#X obj 91 104 #camera;
-#X obj 40 40 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1
-;
-#X obj 91 12 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1;
-#X obj 91 59 metro 50;
-#X obj 100 253 #out window;
-#X obj 40 136 trigger anything anything;
-#X obj 89 187 # -;
-#X obj 89 226 #clip;
-#X text 245 235 as a short cut you can use [t a a]. The values of one
-frame are substracted from the previous frame only keeps the difference
-and gives allows you to see the movement that occured between the first
-seconde frame in relation to the first one.;
-#X text 242 38 Motion detection is a way to view only the movement
-in a space. Movement can be detected in darkness and seen as a video
-image. the detection occurs when one frame it substractes the current
-frame froom the last frame.;
-#X obj 7 -37 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X text 10 -37 What is a grid?;
-#X obj 7 -72 cnv 15 430 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 12 -73 2 Images;
-#X text 14 -59 Description: opening multiple images from one window.
-;
-#X obj 8 320 cnv 15 430 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 16 327 GridFlow 0.8.0;
-#X connect 0 0 5 0;
-#X connect 1 0 0 0;
-#X connect 2 0 3 0;
-#X connect 3 0 0 0;
-#X connect 5 0 6 1;
-#X connect 5 1 6 0;
-#X connect 6 0 7 0;
-#X connect 7 0 4 0;
diff --git a/externals/gridflow/doc/tutorials/PD-GF-Lecture.pd b/externals/gridflow/doc/tutorials/PD-GF-Lecture.pd
deleted file mode 100755
index 1f7b6d52..00000000
--- a/externals/gridflow/doc/tutorials/PD-GF-Lecture.pd
+++ /dev/null
@@ -1,80 +0,0 @@
-#N canvas 23 16 880 578 10;
-#X obj 5 6 cnv 15 870 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 5 550 cnv 15 870 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 666 549 Copyright Ben Bogart 2005 \; (See COPYING.TXT for details)
-;
-#X text 9 13 Welcome to Pure-Data...;
-#X obj 6 46 cnv 15 430 15 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X text 11 46 What is Pure-Data (aka PD)?;
-#X obj 4 233 cnv 15 430 145 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X obj 25 271 pddp_open pure-data-1;
-#X obj 25 294 pddp_open pure-data-2;
-#X obj 25 317 pddp_open pure-data-3;
-#X obj 25 340 pddp_open pure-data-4;
-#X text 200 271 Pure-Data Introduction;
-#X text 200 294 GUI Objects for Interaction;
-#X text 200 317 Creating your first patch;
-#X text 200 340 Control: metro \, random & counter;
-#X obj 444 233 cnv 15 430 145 empty empty empty 20 12 0 14 -179884
--66577 0;
-#X obj 5 391 cnv 15 430 145 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X obj 25 416 pddp_open pure-data-5;
-#X obj 25 439 pddp_open pure-data-6;
-#X text 200 439 The powerful message object;
-#X obj 25 462 pddp_open pure-data-7;
-#X text 200 462 More about lists;
-#X text 200 485 Nesting collections of objects;
-#X text 200 416 Connectionless communications;
-#X obj 25 485 pddp_open pure-data-8;
-#X text 200 509 Using GUI's in abstractions;
-#X obj 25 509 pddp_open pure-data-9;
-#X obj 445 391 cnv 15 430 145 empty empty empty 20 12 0 14 -179884
--66577 0;
-#X text 642 296 Introduction to Images;
-#X obj 468 271 pddp_open GridFlow-1;
-#X obj 468 294 pddp_open GridFlow-2;
-#X obj 468 317 pddp_open GridFlow-3;
-#X obj 468 340 pddp_open GridFlow-4;
-#X text 642 319 Introduction to video;
-#X text 642 342 Introduction to Live Feeds;
-#X obj 446 46 cnv 15 430 15 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X text 451 46 What is GridFLow?;
-#X text 642 457 Putting it all together;
-#X text 641 428 Interfacing with sensors;
-#X text 642 273 Introduction to Grids;
-#X obj 467 429 pddp_open GridFlow-6;
-#X obj 467 452 pddp_open GridFlow-7;
-#X text 451 236 2 Introduction to GridFlow;
-#X text 454 144 This section deals with the particular objects related
-to GridFlow. GridFlow uses the usual PD "control" objects \, as well
-as a set of GridFlow specific objects. Before we get into the tutorials
-we will explain the grid "#" \, the most important concept in GridFlow.
-;
-#X text 453 84 GridFlow is a plug-in for PureData that introduces the
-frid (#) data type into the PD environment. GridFlow allows you to
-work with live video \, still images and video files in a real-time
-environment.;
-#X text 14 85 Pure-Data is an open-source patching environment for
-multi-media (audio+image). Pure-Data is a programming language where
-you create relationships by connecting visual boxes (rather than typing
-complex commands). This lecture is separated into three sections: An
-Introduction to Pure-Data \, An introduction to GridFlow and intermediate
-PD and GridFlow.;
-#X obj 448 236 cnv 15 15 15 empty empty empty 20 12 0 14 -262144 -66577
-0;
-#X text 451 236 2 Introduction to GridFlow;
-#X obj 8 395 cnv 15 15 15 empty empty empty 20 12 0 14 -262144 -66577
-0;
-#X obj 449 395 cnv 15 15 15 empty empty empty 20 12 0 14 -262144 -66577
-0;
-#X obj 7 236 cnv 15 15 15 empty empty empty 20 12 0 14 -262144 -66577
-0;
-#X text 452 395 4 Intermediate GridFlow;
-#X text 10 236 1 Introduction to Pure-Data;
-#X text 11 395 3 Intermediate Pure-Data;
diff --git a/externals/gridflow/doc/tutorials/PD-Lecture.pd b/externals/gridflow/doc/tutorials/PD-Lecture.pd
deleted file mode 100755
index e2f269c5..00000000
--- a/externals/gridflow/doc/tutorials/PD-Lecture.pd
+++ /dev/null
@@ -1,64 +0,0 @@
-#N canvas 116 102 890 501 10;
-#X obj 8 6 cnv 15 870 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 8 457 cnv 15 870 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 668 459 Copyright Ben Bogart 2005 \; (See COPYING.TXT for details)
-;
-#X text 12 13 Welcome to Pure-Data...;
-#X obj 8 46 cnv 15 430 15 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X text 13 46 What is Pure-Data (aka PD)?;
-#X text 28 74 Pure-Data is an open-source patching environment for
-multi-media (audio+image). Pure-Data is a programming language where
-you create relationships by connecting visual boxes (rather than typing
-complex commands). This lecture is separated into three sections: An
-Introduction to Pure-Data \, An introduction to Gem and intermediate
-PD and Gem.;
-#X obj 8 176 cnv 15 430 120 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X obj 22 198 pddp_open pure-data-1;
-#X obj 22 221 pddp_open pure-data-2;
-#X obj 22 244 pddp_open pure-data-3;
-#X obj 22 267 pddp_open pure-data-4;
-#X text 197 198 Pure-Data Introduction;
-#X text 197 221 GUI Objects for Interaction;
-#X text 197 244 Creating your first patch;
-#X text 197 267 Control: metro \, random & counter;
-#X obj 8 306 cnv 15 430 145 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X text 13 176 Introduction to Pure-Data;
-#X text 13 306 Introduction to Gem (Graphics Environment for Multimedia)
-;
-#X obj 22 328 pddp_open gem-1;
-#X obj 22 351 pddp_open gem-2;
-#X obj 22 374 pddp_open gem-3;
-#X obj 22 397 pddp_open gem-4;
-#X obj 22 421 pddp_open gem-5;
-#X text 197 328 Gem Introduction;
-#X text 197 351 What are gemchains?;
-#X text 197 374 translate \, rotate and scale;
-#X text 197 397 Texturing using pix objects;
-#X text 197 421 Video & Free Exploration;
-#X obj 448 46 cnv 15 430 145 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X text 453 46 Intermediate Pure-Data;
-#X obj 462 68 pddp_open pure-data-5;
-#X obj 462 91 pddp_open pure-data-6;
-#X text 637 91 The powerful message object;
-#X obj 462 114 pddp_open pure-data-7;
-#X text 637 114 More about lists;
-#X text 637 137 Nesting collections of objects;
-#X text 637 68 Connectionless communications;
-#X obj 462 137 pddp_open pure-data-8;
-#X text 637 161 Using GUI's in abstractions;
-#X obj 462 161 pddp_open pure-data-9;
-#X obj 448 200 cnv 15 430 95 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X text 637 222 Grouping Gem entities;
-#X text 637 245 Gem render order;
-#X text 453 200 Intermediate Gem;
-#X obj 462 222 pddp_open gem-6;
-#X obj 462 245 pddp_open gem-7;
-#X obj 462 268 pddp_open gem-8;
-#X text 637 268 Video Tracking & Pixel Operations;
diff --git a/externals/gridflow/doc/tutorials/colors.pd b/externals/gridflow/doc/tutorials/colors.pd
deleted file mode 100755
index 39582d52..00000000
--- a/externals/gridflow/doc/tutorials/colors.pd
+++ /dev/null
@@ -1,12 +0,0 @@
-#N canvas 50 148 450 206 10;
-#X obj -10 -171 #pack 3;
-#X obj 46 -203 hsl 128 15 0 255 0 0 empty empty empty -2 -6 0 8 -241291
--1 -1 0 1;
-#X obj 46 -223 hsl 128 15 0 255 0 0 empty empty empty -2 -6 0 8 -241291
--1 -1 0 1;
-#X obj 46 -243 hsl 128 15 0 255 0 0 empty empty empty -2 -6 0 8 -241291
--1 -1 0 1;
-#X obj -6 -132 #color;
-#X connect 1 0 0 2;
-#X connect 2 0 0 1;
-#X connect 3 0 0 0;
diff --git a/externals/gridflow/doc/tutorials/d_gf_2_0-Intro_to_images_open_image.pd b/externals/gridflow/doc/tutorials/d_gf_2_0-Intro_to_images_open_image.pd
deleted file mode 100644
index a95ac185..00000000
--- a/externals/gridflow/doc/tutorials/d_gf_2_0-Intro_to_images_open_image.pd
+++ /dev/null
@@ -1,62 +0,0 @@
-#N canvas 0 0 887 417 10;
-#X obj 4 278 cnv 15 868 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 12 285 GridFlow 0.8.0;
-#X obj 5 -67 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj 5 -106 cnv 15 868 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 5 -106 cnv 15 780 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 12 -99 2 Introduction to Images;
-#X text 556 86 <--- click here;
-#N canvas 0 0 450 300 META 0;
-#X restore 126 285 pd META;
-#X obj 452 191 #out window;
-#X msg 452 84 open b001.jpg;
-#X obj 473 107 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1
--1;
-#X text 13 84 step 3: Add a [bang<.;
-#X text 13 105 step 4: Create a [#out window].;
-#X text 13 63 step 2: Create [#in] object.;
-#X text 14 27 step 1: create message box [open< with the file name
-and extension you want to open.;
-#X text 506 110 <--- then click here;
-#X obj 447 -67 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X text 450 -67 1.2 How to create a grid.;
-#X obj 447 -67 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X text 8 -68 2.1 Opening an image.;
-#X text 456 -66 2.1 Patch example.;
-#X obj 452 130 cnv 15 22 15 empty empty empty 20 12 0 14 -241291 -66577
-0;
-#X obj 452 129 #in;
-#X text 12 150 Tip: In order for GridFlow to be able to find your images
-you have to specify the correct path.;
-#X obj 14 151 cnv 15 25 15 empty empty empty 20 12 0 14 -260818 -66577
-0;
-#X text 12 -33 One of the first things you need to know when working
-with GridFlow is how to open an image. GridFlow accepts several image
-formats (.jpg \, .png \, .tiff etc.).;
-#X text 12 150 Tip: In order for GridFlow to be able to find your images
-you have to specify the correct path. Gridflow has an "images" folder
-\, put them there to access them by filename only.;
-#X obj 451 38 cnv 15 25 15 empty empty empty 20 12 0 14 -260818 -66577
-0;
-#X text 450 38 Tip: Sometimes the display window opens behind the patch
-\, try moving the patch if the display seems to be missing.;
-#X text 447 -45 To view the image you must initialize the patch. This
-is done in "run mode" by clicking on the message box \, and then on
-the bang. The image will be displayed in a display window \, off to
-the side of the patch.;
-#X text 476 216 In order to close the parent window displaying your
-image \, the [#out window] object must be deleted.;
-#X obj 512 133 cnv 15 25 15 empty empty empty 20 12 0 14 -260818 -66577
-0;
-#X text 489 132 <--Tip: remember \, as with the rest of PD \, you can
-obtain information regarding specific objects by right-clicking on
-it. Try this for [#in].;
-#X connect 9 0 22 0;
-#X connect 10 0 22 0;
-#X connect 22 0 8 0;
diff --git a/externals/gridflow/doc/tutorials/d_gf_2_2_1-image-modification-1-numop-all-in-one2.pd b/externals/gridflow/doc/tutorials/d_gf_2_2_1-image-modification-1-numop-all-in-one2.pd
deleted file mode 100644
index ddf83eb1..00000000
--- a/externals/gridflow/doc/tutorials/d_gf_2_2_1-image-modification-1-numop-all-in-one2.pd
+++ /dev/null
@@ -1,127 +0,0 @@
-#N canvas 53 0 670 470 10;
-#X obj 20 -34 cnv 15 130 150 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj 70 2 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1
-;
-#X obj 35 41 #in;
-#X msg 35 -28 open b001.jpg;
-#X obj 35 91 # +;
-#X obj 21 231 cnv 15 185 150 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj 29 313 #in;
-#X msg 29 239 open b001.jpg;
-#X obj 96 323 hsl 128 15 0 255 0 0 empty empty empty -2 -6 0 8 -260818
--1 -1 4300 1;
-#X obj 29 349 # + \$1;
-#X obj 54 287 metro 33.3;
-#X obj 54 265 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1
-;
-#X obj 82 64 cnv 15 25 17 empty empty empty 20 12 0 14 -241291 -66577
-0;
-#X obj 82 42 cnv 15 25 17 empty empty empty 20 12 0 14 -241291 -66577
-0;
-#X obj 83 86 cnv 15 25 17 empty empty empty 20 12 0 14 -241291 -66577
-0;
-#X msg 82 64 67;
-#X msg 82 42 2;
-#X msg 83 86 199;
-#X floatatom 93 349 5 0 0 0 - - -;
-#X text 21 -501 Numeric Operators (numop): transform an image or video
-by applying a mathematical operation to each pixel value in the grid.
-;
-#X obj 21 -522 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj 23 -678 cnv 15 430 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 18 606 cnv 15 430 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 27 614 GridFlow 0.8.0;
-#X obj 339 -267 cnv 15 130 150 empty empty empty 20 12 0 14 -228992
--66577 0;
-#X obj 404 -228 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1
--1;
-#X obj 358 -199 #in;
-#X msg 358 -260 open b001.jpg;
-#X obj 378 -171 cnv 15 25 17 empty empty empty 20 12 0 14 -241291 -66577
-0;
-#X obj 20 -352 cnv 15 50 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj 23 -86 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X text 26 -87 Example #2 demonstrates how to send the numop an argument
-using a message box. This method allows you to send the numop several
-different arguments.;
-#X text 35 -671 2.4 Image manipulation;
-#X text 57 -523 2.4.1 Numop;
-#X text 25 -445 To transform a grid (in this case an image) using numop
-\, it must first be given an argument (a number value). That value
-will be applied by numop to every value in the grid. The following
-examples show you the three methods that can be used to give the numop
-an argument.;
-#X obj 35 121 s to_out_window;
-#X obj 358 -142 s to_out_window;
-#X obj 29 382 s to_out_window;
-#X obj 246 546 r to_out_window;
-#X msg 498 547 close;
-#X msg 393 544 open window;
-#X obj 30 -294 cnv 15 200 180 empty empty empty 20 12 0 14 -228992
--66577 0;
-#X obj 161 -215 cnv 15 25 17 empty empty empty 20 12 0 14 -241291 -66577
-0;
-#X obj 199 -318 display;
-#X msg 79 -282 1 2 3 4 5 6 7 8 9;
-#X obj 79 -253 #import (3 3);
-#X obj 179 -479 display;
-#X obj 140 -215 # + 42;
-#X obj 358 -171 # + 42;
-#X text 337 -288 Here is an example with an image.;
-#X text 19 -352 Example 1: shows how values in a grid are altered when
-an argument is placed directly into the numeric operator object.;
-#X text 157 63 1 click on the argument;
-#X text 124 6 2 click on the bang to see the updated image;
-#X text 94 8 <--;
-#X text 116 42 <--;
-#X text 116 65 <--;
-#X text 116 87 <--;
-#X text 194 -221 <-- argument in this case is 42;
-#X obj 353 581 #out window;
-#X text 22 433 In all these examples the [# +] numop is used. All the
-numeric operators can be found in the numeric operator help patch (right
-click on the [# +] and select help to view them). If you want to see
-what effects other numops can do \, try replacing the [# +] numop with
-another one (either cut and paste a different numop from the help file
-or create the object in the current canvas.;
-#X obj 20 181 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X text 26 179 Example #3 using the slider and metro.;
-#X text 467 -617 split into 3 patches using ben's switch arrange canvases
-and colors;
-#X text 24 -635 GridFlow performs high level grid processing \; in
-other words its main function is the manipulation of images and video.
-The numeric operators is one of the most common ways to modify an image.
-;
-#X connect 1 0 2 0;
-#X connect 2 0 4 0;
-#X connect 3 0 2 0;
-#X connect 4 0 35 0;
-#X connect 6 0 9 0;
-#X connect 7 0 6 0;
-#X connect 8 0 9 1;
-#X connect 8 0 18 0;
-#X connect 9 0 37 0;
-#X connect 10 0 6 0;
-#X connect 11 0 10 0;
-#X connect 15 0 4 1;
-#X connect 16 0 4 1;
-#X connect 17 0 4 1;
-#X connect 25 0 26 0;
-#X connect 26 0 48 0;
-#X connect 27 0 26 0;
-#X connect 38 0 58 0;
-#X connect 39 0 58 0;
-#X connect 40 0 58 0;
-#X connect 44 0 45 0;
-#X connect 45 0 46 0;
-#X connect 45 0 47 0;
-#X connect 47 0 43 0;
-#X connect 48 0 36 0;
diff --git a/externals/gridflow/doc/tutorials/d_gf_2_2_2.pd b/externals/gridflow/doc/tutorials/d_gf_2_2_2.pd
deleted file mode 100644
index a918d620..00000000
--- a/externals/gridflow/doc/tutorials/d_gf_2_2_2.pd
+++ /dev/null
@@ -1,68 +0,0 @@
-#N canvas 38 0 687 415 10;
-#X obj 31 -223 cnv 15 243 358 empty empty empty 20 12 0 14 -228992
--66577 0;
-#X obj 39 -141 #in;
-#X msg 39 -215 open b001.jpg;
-#X obj 79 -132 hsl 128 15 0 255 0 0 empty empty empty -2 -6 0 8 -260818
--1 -1 0 1;
-#X obj 39 -18 # + \$1;
-#X obj 62 -189 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 1 1
-;
-#X obj 69 76 #clip;
-#X obj 28 -322 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj 62 -167 metro 33.3;
-#X obj 94 -99 #color;
-#X obj 23 -678 cnv 15 430 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 36 168 cnv 15 430 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 44 175 GridFlow 0.8.0;
-#X obj 39 108 #out window;
-#X text 35 -671 2.2 Image manipulation \, colour wrapping;
-#X obj 12 -518 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X text 18 -519 Example #1 colour wrapping;
-#X msg 74 -491 240 0 0;
-#X obj 179 -368 display;
-#X obj 74 -457 # + 20;
-#X obj 178 -423 #cast uint8;
-#X obj 23 -368 display;
-#X text 274 -429 <-- This transforms the grid into 8 bit values \,
-that corresponds to the way that images are usually shown in images
-and video;
-#X text 42 -323 Example #2 clipping the values;
-#X text 10 -545 Tip: Refer to glossary for more information on colour.
-;
-#X text 215 -132 <-- add value to all channels at once;
-#X obj 39 37 shunt;
-#X obj 69 11 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 1 1;
-#X text 93 12 <-- switch to see clip's effect;
-#X text 96 38 <-- directs the flow of data;
-#X text 7 -643 When an image is represented as a grid every pixel value
-will vary between 0 and 255 Color wrapping occurs when the result of
-the operation on the pixel value would be higher than 255 Values above
-255 are counted from 0 For example: if a pixel has a red value of 240
-and 20 is added to it \, you get 5 instead of displaying 260 (240 +
-20 - 255 = 5);
-#X text 450 -583 aks matju to fix bug in [display]'s display;
-#X text 32 -301 The [#clip] object is used with numops in order to
-set an lower and upper range to pixel values in order to eliminate
-color wrapping (those nifty 60s effects).;
-#X text 288 -70 <-- drag to add value to specific channel;
-#X text 163 -206 remember to load the image and strat the metro;
-#X connect 1 0 4 0;
-#X connect 2 0 1 0;
-#X connect 3 0 4 1;
-#X connect 4 0 26 0;
-#X connect 5 0 8 0;
-#X connect 6 0 13 0;
-#X connect 8 0 1 0;
-#X connect 9 0 4 1;
-#X connect 17 0 19 0;
-#X connect 19 0 20 0;
-#X connect 19 0 21 0;
-#X connect 20 0 18 0;
-#X connect 26 0 13 0;
-#X connect 26 1 6 0;
-#X connect 27 0 26 1;
diff --git a/externals/gridflow/doc/tutorials/gf_1_0-Introduction_to_grids.pd b/externals/gridflow/doc/tutorials/gf_1_0-Introduction_to_grids.pd
deleted file mode 100755
index fb78a496..00000000
--- a/externals/gridflow/doc/tutorials/gf_1_0-Introduction_to_grids.pd
+++ /dev/null
@@ -1,98 +0,0 @@
-#N canvas 0 207 762 514 10;
-#X obj 470 287 display;
-#X obj 7 6 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj 7 -29 cnv 15 970 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 7 -29 cnv 15 780 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 12 661 cnv 15 970 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 20 668 GridFlow 0.8.0;
-#X text 10 6 1.1 What is a grid?;
-#X text 12 -22 1 Introduction to Grids;
-#X text 10 333 GridFlow can create a grid from a list of numbers. The
-[#import] object permits you to set the desired amount of rows and
-columns. A message box permits you to tell the grid which numbers to
-display.;
-#X msg 473 429 3 3 # 6 1 3 6 3 324 6 3 4;
-#X msg 550 169 reset;
-#X msg 494 475 3 3 # 1 0 0 0;
-#X obj 474 572 display;
-#X obj 9 307 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X text 12 307 1.2 How to create a grid.;
-#X obj 9 307 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X text 13 307 1.2 How to create a grid using the [#import] object.
-;
-#X text 10 427 1 - Create a list of numbers using a message box. The
-numbers must be seperated by a space. The list can have as many numbers
-as you want but only the amount defined by [#import] will be displayed.
-As you click on the message box the numbers will appear in the grid.
-The numbers are positioned in the grid from left to right and from
-the top to the bottom.;
-#X text 12 605 3 - Connect the objects to a [display] object or a [print]
-object to see the resulting grid. You don't have to "see" the grid
-in order to manipulate it.;
-#X text 558 306 display object;
-#N canvas 0 0 450 300 META 0;
-#X restore 921 616 pd META;
-#X obj 457 6 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X text 460 6 1.2 How to create a grid.;
-#X obj 457 6 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj 663 43 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577
-0;
-#X obj 469 238 cnv 15 92 15 empty empty empty 20 12 0 14 -241291 -66577
-0;
-#X obj 469 237 #import (3 3);
-#X obj 473 520 cnv 15 37 15 empty empty empty 20 12 0 14 -241291 -66577
-0;
-#X obj 473 519 # + 0;
-#X text 8 267 The following examples illustrate how grids are interpreted
-and represented in GridFlow.;
-#X text 3 402 Steps for creating a grid:;
-#X text 11 537 2 - Create the [#import] object and indicate the parameters
-you want as grid dimensions. By indicating 3 3 in brackets following
-[#import] \, you are creating a grid that has 3 rows and 3 columns.
-This 3 by 3 grid will display 9 numbers.;
-#X text 518 516 works like the [#import] object but allows you to put
-your grid parameters and values into one message box;
-#X text 10 29 A grid is composed of rows and columns that contain numeric
-data. For instance \, a checkerboard is a grid that consists in a series
-of rows and columns containing information: a dark square or a light
-square.;
-#X text 10 91 Computers interpret images as three-dimentional grids:
-the rows (height) and columns (width) contain pixel positions. There
-are usually three channels (depth) of rows and columns. Channels are
-the colours that make up an image. Each channel is a single colour
-\, usually red \, green and blue (RGB). Videos are also interpreted
-as grids since they are a series of still images.;
-#X text 9 194 Because GridFlow uses grids \, images and videos are
-represented as such. GridFlow objects that accept or produce grids
-are identified by the number sign "#" (think of that symbol as a mini
-grid). From now on we will refer to images and videos as grids.;
-#X msg 469 44 1 2 3 4 5 6 7 8 9;
-#X msg 537 107 1 2 3 4;
-#X text 466 6 1.2 Patch example.;
-#X text 471 405 Other objects can create grids...;
-#X text 601 42 <-- step 1: click here to view the numbers from the
-list in a grid.;
-#X text 601 104 <-- click here three times to see how import only outputs
-a grid once it recieves the number of values iassociated with its dimensions
-;
-#X text 602 169 <-- resets the grid to only display the numbers from
-the list;
-#X obj 634 236 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577
-0;
-#X text 572 236 <-- step 2: This object creates a grid that is 3 rows
-by 3 columns;
-#X connect 9 0 28 0;
-#X connect 10 0 26 0;
-#X connect 11 0 28 0;
-#X connect 26 0 0 0;
-#X connect 28 0 12 0;
-#X connect 36 0 26 0;
-#X connect 37 0 26 0;
diff --git a/externals/gridflow/doc/tutorials/gf_2-2-3-resize-image_dec_2005.pd b/externals/gridflow/doc/tutorials/gf_2-2-3-resize-image_dec_2005.pd
deleted file mode 100644
index 02cf9166..00000000
--- a/externals/gridflow/doc/tutorials/gf_2-2-3-resize-image_dec_2005.pd
+++ /dev/null
@@ -1,60 +0,0 @@
-#N canvas 127 0 672 603 10;
-#X obj 22 160 metro 10;
-#X obj 22 118 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1
-;
-#X floatatom 80 298 5 1 4 0 - - -;
-#X obj 7 -37 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj 7 -72 cnv 15 430 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 26 478 cnv 15 430 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 34 485 GridFlow 0.8.0;
-#X obj 22 438 #out window;
-#X obj 59 248 #in;
-#X msg 59 225 load bluemarble.jpg;
-#X obj 80 387 #pack 2;
-#X floatatom 124 369 5 1 4 0 - - -;
-#X obj 22 272 #store;
-#X text 21 -67 2.4 Image manipulation;
-#X text 46 -37 2.4.1 Resizing an image;
-#X obj 22 272 #store;
-#X obj 59 202 loadbang;
-#N canvas 0 0 450 300 META 0;
-#X restore 154 484 pd META;
-#X obj 274 226 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577
-0;
-#X obj 23 414 cnv 15 63 15 empty empty empty 20 12 0 14 -241291 -66577
-0;
-#X obj 113 118 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577
-0;
-#X text 49 117 <-- step #2 : start the metro;
-#X obj 22 413 #scale_by;
-#X obj 468 344 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577
-0;
-#X obj 165 379 cnv 15 152 15 empty empty empty 20 12 0 14 -260818 -66577
-0;
-#X text 167 365 changing this number permits you to change the image's
-horizontal parameters.;
-#X text 404 344 <-- step #3 : change the parameters;
-#X text 11 -10 [#scale_by] resizes grids by multiplying its parameters
-(width and height). To resize an image proportionatily a specific scaleing
-size must appylied \, ex: [#scale_by 4].;
-#X text 11 31 [# pack] lets you resize grids by altering the vertical
-and horizontal parameters.;
-#X text 88 157 the metro refreshes the display window so you don't
-have to reload the grid every time it's altered.;
-#X text 210 225 <-- step #1 : load the image;
-#X text 132 295 changing this number changes the grid's vertical parameters.
-(a slider can be connected to [#pack] instead of a number box.;
-#X connect 0 0 12 0;
-#X connect 0 0 15 0;
-#X connect 1 0 0 0;
-#X connect 2 0 10 0;
-#X connect 8 0 12 1;
-#X connect 8 0 15 1;
-#X connect 9 0 8 0;
-#X connect 10 0 22 1;
-#X connect 11 0 10 1;
-#X connect 15 0 22 0;
-#X connect 16 0 9 0;
diff --git a/externals/gridflow/doc/tutorials/gf_2-2-4-greyscale_dec_2005.pd b/externals/gridflow/doc/tutorials/gf_2-2-4-greyscale_dec_2005.pd
deleted file mode 100644
index cbb11af1..00000000
--- a/externals/gridflow/doc/tutorials/gf_2-2-4-greyscale_dec_2005.pd
+++ /dev/null
@@ -1,27 +0,0 @@
-#N canvas 183 58 542 460 10;
-#X obj 21 207 #rgb_to_greyscale;
-#X obj 7 -37 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj 7 -72 cnv 15 430 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 8 320 cnv 15 430 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 16 327 GridFlow 0.8.0;
-#X obj 21 178 #in;
-#X text 21 -67 2.4 Image manipulation;
-#X text 48 -37 2.4.2 Greyscale;
-#N canvas 0 0 450 300 META 0;
-#X restore 147 327 pd META;
-#X text 149 242 This patch and other image modifications can be can
-be found in the gridflow help files.;
-#X text 159 102 insert your own images to convert it to greyscale.
-click on the message to load image.;
-#X text 19 4 To convert an image to greyscale use [#rgb_to_greyscale].
-It transforms colour information into a black to white gradient.;
-#X obj 33 157 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X msg 21 135 open bluemarble.jpg;
-#X obj 21 282 #out window;
-#X connect 5 0 0 0;
-#X connect 12 0 5 0;
-#X connect 13 0 5 0;
diff --git a/externals/gridflow/doc/tutorials/gf_2_0-Intro_to_images_open_image.pd b/externals/gridflow/doc/tutorials/gf_2_0-Intro_to_images_open_image.pd
deleted file mode 100755
index ea6aa98d..00000000
--- a/externals/gridflow/doc/tutorials/gf_2_0-Intro_to_images_open_image.pd
+++ /dev/null
@@ -1,62 +0,0 @@
-#N canvas 0 0 894 417 10;
-#X obj 4 278 cnv 15 868 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 12 285 GridFlow 0.8.0;
-#X obj 5 -67 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj 5 -106 cnv 15 868 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 5 -106 cnv 15 780 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 12 -99 2 Introduction to Images;
-#X text 556 86 <--- click here;
-#N canvas 0 0 450 300 META 0;
-#X restore 126 285 pd META;
-#X obj 452 191 #out window;
-#X msg 452 84 open b001.jpg;
-#X obj 473 107 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1
--1;
-#X text 13 84 step 3: Add a [bang<.;
-#X text 13 105 step 4: Create a [#out window].;
-#X text 13 63 step 2: Create [#in] object.;
-#X text 14 27 step 1: create message box [open< with the file name
-and extension you want to open.;
-#X text 506 110 <--- then click here;
-#X obj 447 -67 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X text 450 -67 1.2 How to create a grid.;
-#X obj 447 -67 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X text 8 -68 2.1 Opening an image.;
-#X text 456 -66 2.1 Patch example.;
-#X obj 452 130 cnv 15 22 15 empty empty empty 20 12 0 14 -241291 -66577
-0;
-#X obj 452 129 #in;
-#X text 12 150 Tip: In order for GridFlow to be able to find your images
-you have to specify the correct path.;
-#X obj 14 151 cnv 15 25 15 empty empty empty 20 12 0 14 -260818 -66577
-0;
-#X text 12 -33 One of the first things you need to know when working
-with GridFlow is how to open an image. GridFlow accepts several image
-formats (.jpg \, .png \, .tiff etc.).;
-#X text 12 150 Tip: In order for GridFlow to be able to find your images
-you have to specify the correct path. Gridflow has an "images" folder
-\, put them there to access them by filename only.;
-#X obj 451 38 cnv 15 25 15 empty empty empty 20 12 0 14 -260818 -66577
-0;
-#X text 450 38 Tip: Sometimes the display window opens behind the patch
-\, try moving the patch if the display seems to be missing.;
-#X text 447 -45 To view the image you must initialize the patch. This
-is done in "run mode" by clicking on the message box \, and then on
-the bang. The image will be displayed in a display window \, off to
-the side of the patch.;
-#X text 476 216 In order to close the parent window displaying your
-image \, the [#out window] object must be deleted.;
-#X obj 512 133 cnv 15 25 15 empty empty empty 20 12 0 14 -260818 -66577
-0;
-#X text 489 132 <--Tip: remember \, as with the rest of PD \, you can
-obtain information regarding specific objects by right-clicking on
-it. Try this for [#in].;
-#X connect 9 0 22 0;
-#X connect 10 0 22 0;
-#X connect 22 0 8 0;
diff --git a/externals/gridflow/doc/tutorials/gf_2_2_1-image-modification-1-numop-all-in-one2.pd b/externals/gridflow/doc/tutorials/gf_2_2_1-image-modification-1-numop-all-in-one2.pd
deleted file mode 100755
index cc1d1902..00000000
--- a/externals/gridflow/doc/tutorials/gf_2_2_1-image-modification-1-numop-all-in-one2.pd
+++ /dev/null
@@ -1,127 +0,0 @@
-#N canvas 53 0 670 470 10;
-#X obj 20 -34 cnv 15 130 150 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj 70 2 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1
-;
-#X obj 35 41 #in;
-#X msg 35 -28 open b001.jpg;
-#X obj 35 91 # +;
-#X obj 21 231 cnv 15 185 150 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj 29 313 #in;
-#X msg 29 239 open b001.jpg;
-#X obj 96 323 hsl 128 15 0 255 0 0 empty empty empty -2 -6 0 8 -260818
--1 -1 4300 1;
-#X obj 29 349 # + \$1;
-#X obj 54 287 metro 33.3;
-#X obj 54 265 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1
-;
-#X obj 82 64 cnv 15 25 17 empty empty empty 20 12 0 14 -241291 -66577
-0;
-#X obj 82 42 cnv 15 25 17 empty empty empty 20 12 0 14 -241291 -66577
-0;
-#X obj 83 86 cnv 15 25 17 empty empty empty 20 12 0 14 -241291 -66577
-0;
-#X msg 82 64 67;
-#X msg 82 42 2;
-#X msg 83 86 199;
-#X floatatom 93 349 5 0 0 0 - - -;
-#X text 21 -501 Numeric Operators (numop): transform an image or video
-by applying a mathematical operation to each pixel value in the grid.
-;
-#X obj 21 -522 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj 23 -678 cnv 15 430 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 18 606 cnv 15 430 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 27 614 GridFlow 0.8.0;
-#X obj 339 -267 cnv 15 130 150 empty empty empty 20 12 0 14 -228992
--66577 0;
-#X obj 404 -228 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1
--1;
-#X obj 358 -199 #in;
-#X msg 358 -260 open b001.jpg;
-#X obj 378 -171 cnv 15 25 17 empty empty empty 20 12 0 14 -241291 -66577
-0;
-#X obj 20 -352 cnv 15 50 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj 23 -86 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X text 26 -87 Example #2 demonstrates how to send the numop an argument
-using a message box. This method allows you to send the numop several
-different arguments.;
-#X text 35 -671 2.4 Image manipulation;
-#X text 57 -523 2.4.1 Numop;
-#X text 25 -445 To transform a grid (in this case an image) using numop
-\, it must first be given an argument (a number value). That value
-will be applied by numop to every value in the grid. The following
-examples show you the three methods that can be used to give the numop
-an argument.;
-#X obj 35 121 s to_out_window;
-#X obj 358 -142 s to_out_window;
-#X obj 29 382 s to_out_window;
-#X obj 246 546 r to_out_window;
-#X msg 498 547 close;
-#X msg 393 544 open window;
-#X obj 30 -294 cnv 15 200 180 empty empty empty 20 12 0 14 -228992
--66577 0;
-#X obj 161 -215 cnv 15 25 17 empty empty empty 20 12 0 14 -241291 -66577
-0;
-#X obj 199 -318 display;
-#X msg 79 -282 1 2 3 4 5 6 7 8 9;
-#X obj 79 -253 #import (3 3);
-#X obj 179 -479 display;
-#X obj 140 -215 # + 42;
-#X obj 358 -171 # + 42;
-#X text 337 -288 Here is an example with an image.;
-#X text 19 -352 Example 1: shows how values in a grid are altered when
-an argument is placed directly into the numeric operator object.;
-#X text 157 63 1 click on the argument;
-#X text 124 6 2 click on the bang to see the updated image;
-#X text 94 8 <--;
-#X text 116 42 <--;
-#X text 116 65 <--;
-#X text 116 87 <--;
-#X text 194 -221 <-- argument in this case is 42;
-#X obj 353 581 #out window;
-#X text 22 433 In all these examples the [# +] numop is used. All the
-numeric operators can be found in the numeric operator help patch (right
-click on the [# +] and select help to view them). If you want to see
-what effects other numops can do \, try replacing the [# +] numop with
-another one (either cut and paste a different numop from the help file
-or create the object in the current canvas.;
-#X obj 20 181 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X text 26 179 Example #3 using the slider and metro.;
-#X text 467 -617 split into 3 patches using ben's switch arrange canvases
-and colors;
-#X text 24 -635 GridFlow performs high level grid processing \; in
-other words its main function is the manipulation of images and video.
-There are several ways to modify images \, one of the most common is
-the numeric operators.;
-#X connect 1 0 2 0;
-#X connect 2 0 4 0;
-#X connect 3 0 2 0;
-#X connect 4 0 35 0;
-#X connect 6 0 9 0;
-#X connect 7 0 6 0;
-#X connect 8 0 9 1;
-#X connect 8 0 18 0;
-#X connect 9 0 37 0;
-#X connect 10 0 6 0;
-#X connect 11 0 10 0;
-#X connect 15 0 4 1;
-#X connect 16 0 4 1;
-#X connect 17 0 4 1;
-#X connect 25 0 26 0;
-#X connect 26 0 48 0;
-#X connect 27 0 26 0;
-#X connect 38 0 58 0;
-#X connect 39 0 58 0;
-#X connect 40 0 58 0;
-#X connect 44 0 45 0;
-#X connect 45 0 46 0;
-#X connect 45 0 47 0;
-#X connect 47 0 43 0;
-#X connect 48 0 36 0;
diff --git a/externals/gridflow/doc/tutorials/gf_2_2_2.pd b/externals/gridflow/doc/tutorials/gf_2_2_2.pd
deleted file mode 100644
index 2728c61c..00000000
--- a/externals/gridflow/doc/tutorials/gf_2_2_2.pd
+++ /dev/null
@@ -1,68 +0,0 @@
-#N canvas 38 0 687 415 10;
-#X obj 31 -223 cnv 15 243 358 empty empty empty 20 12 0 14 -228992
--66577 0;
-#X obj 39 -141 #in;
-#X msg 39 -215 open b001.jpg;
-#X obj 79 -132 hsl 128 15 0 255 0 0 empty empty empty -2 -6 0 8 -260818
--1 -1 0 1;
-#X obj 39 -18 # + \$1;
-#X obj 62 -189 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 1 1
-;
-#X obj 69 76 #clip;
-#X obj 28 -322 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj 62 -167 metro 33.3;
-#X obj 94 -99 #color;
-#X obj 23 -678 cnv 15 430 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 36 168 cnv 15 430 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 44 175 GridFlow 0.8.0;
-#X obj 39 108 #out window;
-#X text 35 -671 2.2 Image manipulation \, colour wrapping;
-#X obj 12 -518 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X text 18 -519 Example #1 colour wrapping;
-#X msg 74 -491 240 0 0;
-#X obj 179 -368 display;
-#X obj 74 -457 # + 20;
-#X obj 178 -423 #cast uint8;
-#X obj 23 -368 display;
-#X text 274 -429 <-- This transforms the grid into 8 bit values \,
-that corresponds to the way that images are usually shown in images
-and video;
-#X text 42 -323 Example #2 clipping the values;
-#X text 10 -545 Tip: Refer to glossary for more information on colour.
-;
-#X text 215 -132 <-- add value to all channels at once;
-#X obj 39 37 shunt;
-#X obj 69 11 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 1 1;
-#X text 93 12 <-- switch to see clip's effect;
-#X text 96 38 <-- directs the flow of data;
-#X text 7 -643 When an image is represented as a grid every pixel value
-will vary between 0 and 255 Color wrapping occurs when the result of
-the operation on the pixel value would be higher than 255 Values above
-255 are counted from 0 For example: if a pixel has a red value of 240
-and 20 is added to it \, you get 5 instead of displaying 260 (240 +
-20 - 255 = 5);
-#X text 451 -583 aks matju to fix bug in [display]'s display;
-#X text 32 -301 The [#clip] object is used with numops in order to
-set an lower and upper range to pixel values in order to eliminate
-color wrapping (those nifty 60s effects).;
-#X text 288 -70 <-- drag to add value to specific channel;
-#X text 163 -206 remember to load the image and strat the metro;
-#X connect 1 0 4 0;
-#X connect 2 0 1 0;
-#X connect 3 0 4 1;
-#X connect 4 0 26 0;
-#X connect 5 0 8 0;
-#X connect 6 0 13 0;
-#X connect 8 0 1 0;
-#X connect 9 0 4 1;
-#X connect 17 0 19 0;
-#X connect 19 0 20 0;
-#X connect 19 0 21 0;
-#X connect 20 0 18 0;
-#X connect 26 0 13 0;
-#X connect 26 1 6 0;
-#X connect 27 0 26 1;
diff --git a/externals/gridflow/doc/tutorials/grid-intro.pd b/externals/gridflow/doc/tutorials/grid-intro.pd
deleted file mode 100755
index e3aa53b8..00000000
--- a/externals/gridflow/doc/tutorials/grid-intro.pd
+++ /dev/null
@@ -1,10 +0,0 @@
-#N canvas 0 0 476 213 10;
-#X text 29 30 GridFlow is a plug-in for PureData that introduces the
-frid (#) data type into the PD environment. GridFlow allows you to
-work with live video \, still images and video files in a rel-time
-environment.;
-#X text 32 97 This section deals with the particular objects related
-to GridFlow. GridFlow uses the usual PD "control" objects \, as well
-as a set of GridFlow specific objects. Before we get into the tutorials
-we will explain the grid "#" \, the most important concept in GridFlow.
-;
diff --git a/externals/gridflow/doc/tutorials/probably_not_good_2-3-0-1-image-modification-1-numop-all-in-one.pd b/externals/gridflow/doc/tutorials/probably_not_good_2-3-0-1-image-modification-1-numop-all-in-one.pd
deleted file mode 100755
index a743e82d..00000000
--- a/externals/gridflow/doc/tutorials/probably_not_good_2-3-0-1-image-modification-1-numop-all-in-one.pd
+++ /dev/null
@@ -1,123 +0,0 @@
-#N canvas 0 0 977 630 10;
-#X obj 17 -114 #out window;
-#X obj 43 -174 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1
--1;
-#X obj 17 -143 #in;
-#X msg 17 -205 open b001.jpg;
-#X obj 507 -245 cnv 15 185 150 empty empty empty 20 12 0 14 -228992
--66577 0;
-#X obj 529 -205 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1
--1;
-#X obj 515 -166 #in;
-#X msg 515 -238 open b001.jpg;
-#X obj 555 -167 hsl 128 15 0 255 0 0 empty empty empty -2 -6 0 8 -260818
--1 -1 0 1;
-#X obj 515 -110 s slider;
-#X obj 515 -138 # + 1;
-#X text 11 -499 Numeric Operators (numop): transform an image or video
-by applying a mathematical operation to each pixel value in the grid.
-;
-#X text 12 -445 To transform a grid (in this case an image) using numop
-\, it must first be given an argument (a number value) in order to
-affect a pixel value. The examples here show you the three methods
-that can be used to give the numop an argument.;
-#X obj 3 -643 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj 3 -678 cnv 15 970 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 10 -618 GridFlow performs high level grid processing \; in
-other words its main function is the manipulation of images and video.
-There are several ways to madify images in GridFlow \, some are very
-basic while others are more advanced (and are saved for the intermediate
-tutorials.) In this section we will introduce some very basic functions
-of the numeric operator \, one of the most common methods used for
-image transformation.;
-#X obj 155 -220 cnv 15 130 150 empty empty empty 20 12 0 14 -228992
--66577 0;
-#X obj 220 -181 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1
--1;
-#X obj 174 -152 #in;
-#X msg 174 -213 open b001.jpg;
-#X obj 199 -124 cnv 15 25 17 empty empty empty 20 12 0 14 -241291 -66577
-0;
-#X obj 174 -124 # + 109;
-#X obj 174 -95 s argument;
-#X text 235 -125 <--- argument in this case is 109;
-#X obj 13 -273 + 1;
-#X floatatom 13 -297 5 0 0 0 - - -;
-#X floatatom 13 -249 5 0 0 0 - - -;
-#X text 54 -282 this is a basic numop. GridFlow has its own set of
-numops that are applied to grids \, 3 dimensions \, on each channel.
-;
-#X obj 14 -357 cnv 15 70 15 empty empty empty 20 12 0 14 -260818 -66577
-0;
-#X text 11 -672 2.4 Image manipulation;
-#X text 11 -644 2.4.3 Numop;
-#X obj 500 -559 cnv 15 130 150 empty empty empty 20 12 0 14 -228992
--66577 0;
-#X obj 550 -523 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1
--1;
-#X obj 515 -484 #in;
-#X msg 515 -553 open b001.jpg;
-#X obj 515 -434 # +;
-#X obj 515 -404 s message;
-#X obj 562 -461 cnv 15 25 17 empty empty empty 20 12 0 14 -241291 -66577
-0;
-#X obj 562 -483 cnv 15 25 17 empty empty empty 20 12 0 14 -241291 -66577
-0;
-#X obj 563 -439 cnv 15 25 17 empty empty empty 20 12 0 14 -241291 -66577
-0;
-#X msg 562 -461 67;
-#X msg 562 -483 2;
-#X msg 563 -439 199;
-#X text 596 -461 <--- messages used as arguments;
-#X text 596 -486 <---;
-#X text 596 -438 <---;
-#X obj 764 -116 r argument;
-#X obj 891 -91 #out window;
-#X obj 842 -115 r message;
-#X obj 911 -115 r slider;
-#X obj 3 -67 cnv 15 970 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 14 -57 GridFlow 0.8.0;
-#N canvas 0 0 450 300 META 0;
-#X restore 919 -60 pd META;
-#X text 13 -357 Example #1;
-#X text 12 -338 Shows you how to put an argument directly into the
-numeric operator object.;
-#X obj 507 -320 cnv 15 70 15 empty empty empty 20 12 0 14 -260818 -66577
-0;
-#X obj 497 -629 cnv 15 70 15 empty empty empty 20 12 0 14 -260818 -66577
-0;
-#X text 496 -628 Example #2;
-#X text 506 -320 Example #3;
-#X text 497 -608 Demonstrates how to send the numop an argument using
-a message box. This method allows you to send the numop several different
-arguments.;
-#X text 507 -299 Introduces the use of the slider as a method to give
-the numop an argument. The slider allows you to easily scroll through
-a series of values.;
-#X connect 1 0 2 0;
-#X connect 2 0 0 0;
-#X connect 3 0 2 0;
-#X connect 5 0 6 0;
-#X connect 6 0 10 0;
-#X connect 7 0 6 0;
-#X connect 8 0 10 1;
-#X connect 10 0 9 0;
-#X connect 17 0 18 0;
-#X connect 18 0 21 0;
-#X connect 19 0 18 0;
-#X connect 21 0 22 0;
-#X connect 24 0 26 0;
-#X connect 25 0 24 0;
-#X connect 32 0 33 0;
-#X connect 33 0 35 0;
-#X connect 34 0 33 0;
-#X connect 35 0 36 0;
-#X connect 40 0 35 1;
-#X connect 41 0 35 1;
-#X connect 42 0 35 1;
-#X connect 46 0 47 0;
-#X connect 48 0 47 0;
-#X connect 49 0 47 0;
diff --git a/externals/gridflow/doc/tutorials/probably_not_good_2-3-0-2.pd b/externals/gridflow/doc/tutorials/probably_not_good_2-3-0-2.pd
deleted file mode 100644
index 18625731..00000000
--- a/externals/gridflow/doc/tutorials/probably_not_good_2-3-0-2.pd
+++ /dev/null
@@ -1,61 +0,0 @@
-#N canvas 58 0 665 421 10;
-#X obj 29 -473 cnv 15 185 190 empty empty empty 20 12 0 14 -228992
--66577 0;
-#X obj 37 -391 #in;
-#X msg 37 -465 open b001.jpg;
-#X obj 77 -382 hsl 128 15 0 255 0 0 empty empty empty -2 -6 0 8 -260818
--1 -1 0 1;
-#X obj 37 -359 # + \$1;
-#X obj 60 -439 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1
-;
-#X obj 37 -315 #clip;
-#X obj 27 -634 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj 60 -417 metro 33.3;
-#X obj 278 -430 #pack 3;
-#X obj 326 -455 hsl 128 15 0 255 0 0 empty empty empty -2 -6 0 8 -260818
--1 -1 0 1;
-#X obj 326 -475 hsl 128 15 0 255 0 0 empty empty empty -2 -6 0 8 -260818
--1 -1 0 1;
-#X obj 326 -495 hsl 128 15 0 255 0 0 empty empty empty -2 -6 0 8 -260818
--1 -1 0 1;
-#X obj 286 -391 #color;
-#X msg 269 -301 255 0 0;
-#X text 336 -304 donner une liste changer couleurs;
-#X obj 234 -245 #scale_by (8 8);
-#X msg 235 -265 2 2 3 # 255 0 0 0 255 0 0 0 255 191 191 191;
-#X obj 37 -273 s to_out_window;
-#X text 29 -633 Example #4 the [#clip] object is used with numops in
-order to set constraints on pixels to eliminate color wrapping. Colour
-wrapping occurs when the individual pixel values in a grid exceed 255
-which results in of colour. GridFlow reads colours as values from 0
-(black) to 255 (white). Refer to glossary for more information on colour.
-;
-#X obj 23 -678 cnv 15 430 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 35 -671 2.4 Image manipulation;
-#X obj 25 -102 cnv 15 430 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 34 -94 GridFlow 0.8.0;
-#X obj 253 -162 r to_out_window;
-#X msg 505 -161 close;
-#X msg 400 -164 open window;
-#X obj 360 -127 #out window;
-#X connect 1 0 4 0;
-#X connect 2 0 1 0;
-#X connect 3 0 4 1;
-#X connect 4 0 6 0;
-#X connect 5 0 8 0;
-#X connect 6 0 18 0;
-#X connect 8 0 1 0;
-#X connect 9 0 4 1;
-#X connect 10 0 9 2;
-#X connect 11 0 9 1;
-#X connect 12 0 9 0;
-#X connect 13 0 4 1;
-#X connect 14 0 4 1;
-#X connect 16 0 4 1;
-#X connect 17 0 16 0;
-#X connect 24 0 27 0;
-#X connect 25 0 27 0;
-#X connect 26 0 27 0;
diff --git a/externals/gridflow/doc/tutorials/pure-data-1.pd b/externals/gridflow/doc/tutorials/pure-data-1.pd
deleted file mode 100755
index 7be2a91a..00000000
--- a/externals/gridflow/doc/tutorials/pure-data-1.pd
+++ /dev/null
@@ -1,71 +0,0 @@
-#N canvas 221 110 894 498 10;
-#N canvas 0 22 450 300 this 0;
-#X obj 192 128 inlet;
-#X obj 192 171 outlet;
-#X text 8 7 If you're looking at this you're just going to confuse
-yourself!;
-#X connect 0 0 1 0;
-#X restore 499 380 pd this is an object;
-#X text 509 358 <- This is a connection;
-#X msg 499 319 10;
-#X text 13 348 Objects are like filters \, they change the way messages
-flow through them.;
-#X text 13 153 You can think of a patch as plumbing. The way water
-flows through the plumbing of your house \, messages flow through the
-connections in your patch. Objects change the flow of the messages
-to allow different things to happen. Messages always go into objects
-at the top \, called the inlet \, and always come out at the bottom
-\, called the outlet. In PD messages flow from top to bottom.;
-#X text 458 236 This is a very simple example of a patch \, the message
-"10" can be sent through the "pd this is an object" and can be seen
-being passed out the outlet.;
-#X floatatom 499 416 5 0 0 0 - - -;
-#X text 539 415 <- This number box shows the float message;
-#X text 553 334 and watch the output!;
-#X obj 8 6 cnv 15 870 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 8 46 cnv 15 430 15 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X text 13 252 You can work with PD in two ways \, the first is in
-"edit mode". Edit-mode is where you create your patch by adding objects
-and the connections between them. "Run mode" is when you're done with
-the construction of your patch \, and you wish to send messages through
-it. In run-mode your cursor is an arrow (as it is right now since we
-are in run-mode) \, in edit-mode your cursor is a pointing hand.;
-#X text 458 136 Messages are what allow objects to communicate with
-one and other. Messages can change the way an object acts \, and/or
-express the work the object is doing. Messages come in different types.
-They can contain words \, numbers and groups of these. The main types
-of messages we will be dealing with are floats (numbers). You can click
-on a message \, when in run-mode \, to send it through your patch.
-;
-#X obj 448 46 cnv 15 430 15 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X obj 448 290 cnv 15 430 15 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X obj 8 447 cnv 15 870 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 668 449 Copyright Ben Bogart 2005 \; (See COPYING.TXT for details)
-;
-#X text 12 20 DESCRIPTION: What is a patch? An object? A message?;
-#N canvas 0 22 466 316 META 0;
-#X text 12 5 CATEGORY: tutorial;
-#X text 12 15 KEYWORDS: metaphor object message GUI introduction;
-#X restore 16 453 pd META;
-#X text 457 67 GUI objects allow you to interact with your PD patch
-as it is running. They allow you to change what your patch is doing
-without reconnecting the objects. The simplest GUI object is the "Message"
-that simply contains a message you want to send in your patch.;
-#X text 453 290 A patch that connects a GUI to an object to a second
-GUI.;
-#X text 531 320 <- This GUI sends a float message (click on it);
-#X text 13 66 When working with PD you are dealing primarily with objects
-\, GUI (Graphical User Interface) objects \, connections and messages.
-These are the building blocks of PD programming. When you connect objects
-\, GUI objects \, and messages you are creating a "patch". Patching
-is making something complex out of smaller building blocks.;
-#X text 13 46 The "patch" \, "objects" and "connections";
-#X text 453 46 "GUI objects" and "messages";
-#X text 12 8 1 Introduction to Pure-Data & its Metaphors;
-#X connect 0 0 6 0;
-#X connect 2 0 0 0;
diff --git a/externals/gridflow/doc/tutorials/pure-data-2.pd b/externals/gridflow/doc/tutorials/pure-data-2.pd
deleted file mode 100755
index 151af26f..00000000
--- a/externals/gridflow/doc/tutorials/pure-data-2.pd
+++ /dev/null
@@ -1,73 +0,0 @@
-#N canvas 197 100 899 548 10;
-#X obj 8 6 cnv 15 870 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 8 46 cnv 15 430 15 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X obj 448 46 cnv 15 430 15 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X obj 8 497 cnv 15 870 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 668 499 Copyright Ben Bogart 2005 \; (See COPYING.TXT for details)
-;
-#N canvas 0 22 470 320 META 0;
-#X text 12 5 CATEGORY: tutorial;
-#X text 12 15 KEYWORDS: GUI slider toggle number message introduction
-;
-#X restore 16 503 pd META;
-#X text 12 20 DESCRIPTION: Message \, slider \, toggle \, bang and
-number;
-#X msg 93 145 hello world;
-#X obj 93 168 print;
-#X text 181 146 <- Click on this message;
-#X text 18 74 Messages control the behavior of objects and it is the
-objects that change what a patch does. The first object we're going
-to learn is "print". All "print" does is print out the messages you
-send it to the terminal:;
-#X text 19 197 TIP: If you forget what an object does you can always
-double-click (on a mac) or right-click (on a PC) and then choose "help".
-;
-#X text 19 250 In this tutorial we will use two different types of
-objects: "objects" (of which "print" is an example) and GUI objects
-\, (of which "message" is an example). GUI objects allow you to interact
-with your patch \, control PD and change parameters of objects. We
-are going to learn four types of GUI objects (but there are many more):
-Slider \, Toggle \, Bang \, and Number.;
-#X obj 76 355 hsl 300 30 0 127 0 0 empty empty This_is_a_HSlider_(Horizontal)
-10 15 1 10 -262144 -1 -1 0 1;
-#X obj 73 393 print;
-#X text 21 421 This "hslider" is connected to the print object. This
-way we can see what messages the "hslider" sends. Try clicking and
-dragging in the Slider. You can change the scale (and other properties)
-of some GUI Objects by double-clicking (mac) or right-clicking (pc)
-and choosing "properties".;
-#X text 13 46 The "message" and "hslider" GUI Objects:;
-#X text 453 46 "toggle" \, "bang" \, "number";
-#X obj 519 176 tgl 30 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X obj 629 176 bng 30 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 629 210 print Bang;
-#X obj 519 210 print Toggle;
-#X obj 739 210 print Number;
-#X floatatom 739 192 5 0 0 0 - - -;
-#X text 466 76 "slider" \, "toggle" and "number" all send messages
-made up of floats (numbers). "bang" is a special case and it only sends
-the message "bang". Below we're using an argument to the print object
-that tags each message sent to the terminal. This way when we have
-multiple "print" objects in one patch we can differenciate thier output.
-;
-#X text 465 268 "toggle" sends the message "1" or "0" \, "bang" always
-sends "bang" and if you click and drag on the "number" you can see
-it acts a lot like a Slider. With "number" you can also click once
-\, and then type a number to send.;
-#X text 467 335 TIP: You can send floating point numbers by holding
-down the SHIFT key as you click and drag on the "number".;
-#X text 467 375 There are other types of GUI objects not covered here.
-See the guis-about.pd PDDP patch:;
-#X text 12 8 2 PD Introduction - Some Useful GUI Objects in Pure-Data
-;
-#X connect 7 0 8 0;
-#X connect 13 0 14 0;
-#X connect 18 0 21 0;
-#X connect 19 0 20 0;
-#X connect 23 0 22 0;
diff --git a/externals/gridflow/doc/tutorials/pure-data-3.pd b/externals/gridflow/doc/tutorials/pure-data-3.pd
deleted file mode 100755
index 729b2dc7..00000000
--- a/externals/gridflow/doc/tutorials/pure-data-3.pd
+++ /dev/null
@@ -1,70 +0,0 @@
-#N canvas 261 121 900 544 10;
-#X obj 8 6 cnv 15 870 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 8 46 cnv 15 430 15 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X obj 448 366 cnv 15 430 15 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X obj 8 497 cnv 15 870 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 668 499 Copyright Ben Bogart 2005 \; (See COPYING.TXT for details)
-;
-#N canvas 0 22 474 324 META 0;
-#X text 12 5 CATEGORY: tutorial;
-#X text 12 15 KEYWORDS: patch first connecting placing place connect
-;
-#X restore 16 503 pd META;
-#X text 12 20 DESCRIPTION: Using PD to create your first patch;
-#X text 13 46 Adding Objects:;
-#X text 19 75 In order to create a patch you need to first place objects
-and GUI objects \, and second make connections between these objects.
-To place an object you need to be in "edit-mode". You should now be
-in run mode \, so please go to the "Edit" pull-down menu and choose
-"Edit mode" at the bottom. You should see your cursor change from an
-arrow to a pointing hand.;
-#X text 19 175 SHORTCUT: You can press "Control" and "e" simultaneously
-in order to toggle (switch) between edit and Run modes.;
-#X obj 448 386 cnv 15 430 100 empty empty empty 20 12 0 14 -233017
--66577 0;
-#X floatatom 506 406 5 0 0 0 - - -;
-#X text 19 355 SHORTCUT: You can press "Control" and "3" simultaneously
-in order to place a number. All shortcuts are listed next to the items
-in the "Put" menu.;
-#X text 453 366 Patch work area:;
-#X text 19 215 Once you are in "edit-mode" you are now free to place
-objects. To place an object go to the "Put" pull-down menu and choose
-"Number". Once you have chosen this menu item you will see that a "number"
-gui is attached to your mouse pointer. In order to place the number
-into the patch move your pointer to the grey area to the right (in
-the "Patch work area" -> Click once to release it from your mouse.
-Note that the number is coloured blue. The blue colour shows that an
-item in your patch is selected. To unselect any item simply click once
-on the blank (white) space between items.;
-#X obj 520 440 print;
-#X obj 448 156 cnv 15 430 15 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X text 453 156 Connecting Objects:;
-#X text 19 411 Next we're going to place the familar "print" object
-beneath the "number" GUI. Press "Control" and "1" to place an object
-box. Again the object gets attached to your mouse and again click once
-to place it in the patch area somewhere under the "number".;
-#X text 459 41 While the number box is still selected (coloured blue)
-you can see a flashing cursor. Type the word "print" into the object
-box. The object will retain a dashed line while you type. In order
-to create the object you simply need to unselect \, by clicking somewhere
-outside the object. Note that once you have clicked to create the object
-the dashed line turns solid and an inlet (small rectangle) gets drawn
-around the word "print". The objects have now been created!;
-#X text 459 185 All connections between objects in PD are created from
-outlet to inlet (top to bottom). To start making a connection move
-your hand-pointer over the outlet of the "number" gui. When over the
-outlet your pointer will change to a circle. When you see the circle
-press and hold the mouse button. As you drag (holding the mouse button
-down) the pointer you see a line being drawn from the outlet to your
-pointer. To attach this connection to another object drag your mouse
-to an inlet of another object. The pointer will again change to a circle
-and at this point you can release the mouse button. Once released the
-objects are now connected! To play with your patch go back into run-mode
-and click and drag on the number-box while watching the terminal.;
-#X text 12 8 3 PD Introduction - Creating your first patch;
-#X connect 11 0 15 0;
diff --git a/externals/gridflow/doc/tutorials/pure-data-4.pd b/externals/gridflow/doc/tutorials/pure-data-4.pd
deleted file mode 100755
index 4d38f41d..00000000
--- a/externals/gridflow/doc/tutorials/pure-data-4.pd
+++ /dev/null
@@ -1,87 +0,0 @@
-#N canvas 183 61 890 531 10;
-#X obj 8 6 cnv 15 870 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 8 96 cnv 15 430 15 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X obj 8 487 cnv 15 870 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 668 489 Copyright Ben Bogart 2005 \; (See COPYING.TXT for details)
-;
-#N canvas 0 22 478 328 META 0;
-#X text 12 5 CATEGORY: tutorial;
-#X text 12 15 KEYWORDS: metro counter random;
-#X restore 16 493 pd META;
-#X text 12 20 DESCRIPTION: Learning "metro" \, "counter" & "random"
-;
-#X text 13 96 Using the "metro" object:;
-#X text 21 47 In this section we will learn three new objects \, "metro"
-\, "counter" \, and "random". Metro sends a bang at regular intervals
-\, just like a metronome.;
-#X obj 164 142 metro 250;
-#X obj 164 123 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X obj 164 163 bng 15 100 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X floatatom 222 123 5 0 0 0 - - -;
-#X text 21 187 You can turn a Metro on and off by sending it a "1"
-or "0" message. Because a toggle sends 0/1 messages \, we can simply
-connect it directly. Metro also accepts an argument (words or numbers
-wirtten after the object name). This argument is how fast the metro
-should send out bangs (in milliseconds). You can always change the
-speed of the metro by sending it number messages through the rightmost
-inlet.;
-#X obj 8 306 cnv 15 430 15 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X text 13 306 Using the "random" object:;
-#X text 21 277 For more info see the metro-help.pd patch.;
-#X obj 168 385 bng 15 100 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 168 425 print;
-#X obj 168 404 random 100;
-#X floatatom 233 385 5 0 0 0 - - -;
-#X text 20 327 The Random object returns a number between 0 and the
-(number) argument when it receives a bang message in the leftmost inlet.
-You can also change the upper limit by sending a message to the rightmost
-inlet.;
-#X obj 448 46 cnv 15 430 15 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X text 453 46 Using the "random" object:;
-#X obj 559 154 bng 15 100 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X floatatom 590 154 3 1 3 0 - - -;
-#X floatatom 621 174 3 0 0 0 - - -;
-#X floatatom 652 194 3 0 0 0 - - -;
-#X obj 652 234 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X floatatom 559 234 8 0 0 0 - - -;
-#X obj 559 213 counter 0 10 1;
-#X text 21 447 For more info see the random-help.pd patch.;
-#X text 461 77 "counter" is simply an object that counts. It can count
-up \, count down and count up and then down. Where it starts and where
-it stops are all definable. This is the counter that in included with
-Gem \, it is not compatible with other counter objects.;
-#X text 461 274 The first argument for counter is the lower limit (number
-to start counting at). The second is the upper limit to count to. The
-third argument is the direction in which to count. "1" means forward
-\, "2" means backward and "3" means forward and then backward. You
-can also use the three rightmost inlets to change the behaviour of
-counter. The rightmost inlet is the upper limit \, the second right-most
-the lower limit \, and the third right-most as the direction. The rightmost
-outlet sends out a bang message when the counter loops.;
-#X text 681 193 Rightmost inlet;
-#X text 651 173 Second Rightmost inlet;
-#X text 621 153 Third Rightmost inlet;
-#X text 461 407 For more info see the counter-help.pd patch.;
-#X text 12 8 4 Introduction to PD - More objects;
-#X connect 8 0 10 0;
-#X connect 9 0 8 0;
-#X connect 11 0 8 1;
-#X connect 16 0 18 0;
-#X connect 18 0 17 0;
-#X connect 19 0 18 1;
-#X connect 23 0 29 0;
-#X connect 24 0 29 1;
-#X connect 25 0 29 2;
-#X connect 26 0 29 3;
-#X connect 29 0 28 0;
-#X connect 29 1 27 0;
diff --git a/externals/gridflow/doc/tutorials/pure-data-5.pd b/externals/gridflow/doc/tutorials/pure-data-5.pd
deleted file mode 100755
index dc357bb1..00000000
--- a/externals/gridflow/doc/tutorials/pure-data-5.pd
+++ /dev/null
@@ -1,108 +0,0 @@
-#N canvas -235 0 891 673 10;
-#X obj 8 6 cnv 15 870 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 8 46 cnv 15 430 15 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X obj 8 627 cnv 15 870 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 668 629 Copyright Ben Bogart 2005 \; (See COPYING.TXT for details)
-;
-#N canvas 0 22 482 332 META 0;
-#X text 12 5 CATEGORY: tutorial;
-#X text 12 15 KEYWORDS: send receive netsend netreceive cordless communication
-network TCP/IP UDP internet;
-#X restore 16 633 pd META;
-#X obj 448 46 cnv 15 430 15 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X text 12 20 DESCRIPTION: Communicating between objects w/out connections
-;
-#X text 13 46 "send" & "receive";
-#X obj 86 223 send invisible-link;
-#X obj 86 248 receive invisible-link;
-#X floatatom 86 273 5 0 0 0 - - -;
-#X msg 86 198 10;
-#X floatatom 266 273 5 0 0 0 - - -;
-#X floatatom 266 203 5 0 0 0 - - -;
-#X obj 266 223 s invisible-link2;
-#X obj 266 248 r invisible-link2;
-#X obj 102 483 r send-from-number;
-#X floatatom 102 508 5 0 0 0 - - -;
-#X floatatom 102 462 5 0 0 0 - - send-from-number;
-#X floatatom 242 462 5 0 0 0 - - -;
-#X obj 242 483 s send-to-number2;
-#X floatatom 242 508 5 0 0 0 - send-to-number2 -;
-#X text 19 385 Note: Many GUI objects have built-in send and receive
-objects. The tag names are specified in the GUI properties. Remeber
-to get the GUI properties Right-Click or Control-Click on the GUI object
-and select "Properties".;
-#X text 453 46 "netsend" & "netreceive";
-#X text 19 575 For more info see: send-help.pd \, receive-help.pd \,
-netsend-help.pd and netreceive-help.pd;
-#X text 459 75 While "send" and "receive" allow you to send messages
-without connecting objects with patch-cords "netsend" and "netreceive"
-do the same but communicate between objects using TCP/IP the internet
-protocol. This means that you can send messages from a patch running
-on one machine to a second patch running on a second machine on the
-same network \, or even over the internet.;
-#X text 19 545 You can also send messages using UDP rather than TCP/IP.
-See "more info" below for details.;
-#X obj 589 292 netreceive 8001;
-#X text 459 185 The first argument of "netreceive" is the port the
-netrecive should listen on. "netsend" can connect to this port from
-other machines. "netreceive" has two outlets. The first outlet sends
-out the messages it receives over network \, and the second argument
-send a "1" when netsend is connected and "0" when netsend disconnects.
-;
-#X obj 589 318 print;
-#X obj 689 318 tgl 16 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
-1;
-#X obj 503 563 netsend;
-#X text 459 355 "netsend" is controlled using three messages: "connect"
-\, "disconnect" and "send". "connect" has two arguments \, the host
-or IP and the port number you wish to connect to. There needs to be
-a "netreceive" listening on the port you connect to. "disconnect" drops
-the current connection. "send" sends any arguments to the "netreceive"
-over the network. The single outlet of "netsend" prints "1" when a
-connection is made and "0" when the connection is lost.;
-#X obj 503 586 tgl 16 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
-1;
-#X msg 503 486 connect localhost 8001;
-#X msg 516 511 disconnect;
-#X msg 525 537 send hello from the internet;
-#X text 602 510 Close connection;
-#X text 673 486 Connect to this machine;
-#X text 733 536 Send message;
-#X text 19 75 In some cases you will want to send messages without
-connecting objects. You may be sending one message to many different
-places that would make connections too laborious. "send" and "receive"
-both have a single argument. This argument is the tag name for the
-communication. "send" will always send any messages it gets in it inlet
-to any number of "receive" objects in a patch with the same tag name.
-"s" and "r" can be used in the place of "send" and "receive".;
-#X obj 86 336 s broadcast;
-#X floatatom 86 317 5 0 0 0 - - -;
-#X obj 176 316 r broadcast;
-#X floatatom 176 339 5 0 0 0 - - -;
-#X obj 266 316 r broadcast;
-#X floatatom 266 339 5 0 0 0 - - -;
-#X text 12 8 5 Intermediate Pure-Data - send and receive;
-#X msg 585 598 send \$1;
-#X floatatom 584 567 5 0 0 0 - - -;
-#X text 651 596 send variables to another computer;
-#X connect 9 0 10 0;
-#X connect 11 0 8 0;
-#X connect 13 0 14 0;
-#X connect 15 0 12 0;
-#X connect 16 0 17 0;
-#X connect 19 0 20 0;
-#X connect 27 0 29 0;
-#X connect 27 1 30 0;
-#X connect 31 0 33 0;
-#X connect 34 0 31 0;
-#X connect 35 0 31 0;
-#X connect 36 0 31 0;
-#X connect 42 0 41 0;
-#X connect 43 0 44 0;
-#X connect 45 0 46 0;
-#X connect 48 0 31 0;
-#X connect 49 0 48 0;
diff --git a/externals/gridflow/doc/tutorials/pure-data-6.pd b/externals/gridflow/doc/tutorials/pure-data-6.pd
deleted file mode 100755
index 01e6dcd7..00000000
--- a/externals/gridflow/doc/tutorials/pure-data-6.pd
+++ /dev/null
@@ -1,92 +0,0 @@
-#N canvas 304 98 891 675 10;
-#X obj 8 6 cnv 15 870 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 8 627 cnv 15 870 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 668 629 Copyright Ben Bogart 2005 \; (See COPYING.TXT for details)
-;
-#N canvas 0 22 486 336 META 0;
-#X text 12 5 CATEGORY: tutorial;
-#X text 12 15 KEYWORDS: message comma semicolon dollersign receive
-list;
-#X restore 16 633 pd META;
-#X text 12 20 DESCRIPTION: Advanced uses for the message object;
-#X text 19 45 In Pure-Data there are two distinct concepts with the
-name "message". Messages are the data that gets send in PD from object
-to object. There is also the Messsage object that contains a message
-you want to send. The message object is the first GUI object we covered
-in this tutorial. The message is not the only way to send messages
-in a patch \, since all GUI objects also send messages. So what makes
-the message object different? The message object can sent messages
-of any type \, where a number for example can only send float (number)
-messages. There are a number of powerful features in the message object.
-We are familar with the "usual" way of using the message object:;
-#X msg 163 208 hello;
-#X msg 212 208 bye;
-#X obj 196 238 print messages;
-#X text 459 556 Note: It is a very common mistake to confuse the message
-object with an object box. The object box is framed in a rectangle.
-The message object has a notch removed from the right edge.;
-#X obj 106 385 print messages;
-#X msg 106 358 hello \, bye;
-#X text 19 305 You can send multiple messages in succession from a
-single message box by using a comma " \, " between the messages. The
-messages get send from left to right.;
-#X obj 8 276 cnv 15 430 15 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X obj 8 416 cnv 15 430 15 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X text 13 416 Semicolon in message boxes;
-#X text 13 276 Comma in message boxes;
-#X text 19 445 Just like you can specify receive tags directly in GUI
-objects you can also use a message box to send a message directly to
-a particular "receive".;
-#X obj 34 536 r myreceive;
-#X floatatom 34 560 5 0 0 0 - - -;
-#X text 189 360 Click to send both messages;
-#X text 136 502 send "10" to receive tag "myreceive";
-#X text 19 585 For more info see: message-help.pd 04.messages.pd 10.more.messages.pd
-;
-#X msg 34 498 \; myreceive 10;
-#X obj 448 46 cnv 15 430 15 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X text 453 46 Dollarsign in message boxes;
-#X msg 534 175 \$1 \$1 \$1;
-#X msg 534 154 10;
-#X text 459 75 In messages there are placeholders that start with "$".
-These placeholders are variables that get replaced with messages you
-send to the message box. In the example below we have a single message
-"10". Each "$1" in the message box gets replaced with the message "10".
-;
-#X text 601 175 \$1 placeholder gets replaced;
-#X text 570 154 message sent to message box;
-#X msg 534 304 list 1 2;
-#X text 600 304 a list with items "1" and "2";
-#X msg 534 325 \$2 \$1;
-#X text 584 325 \$1 becomes "1" and \$2 becomes "2";
-#X obj 534 347 print reverse-list;
-#X text 459 235 The "$1" placeholder refers to the first element of
-the list the message box gets from its inlet. We can use this to use
-a message box to reverse the order of elements (called atoms) in a
-list.;
-#X text 459 385 In this case the list "1 2" has two elements (called
-atoms) when this list gets sent to the inlet of a message box its atoms
-are available to the message box through the $ variables. \$1 gets
-replaced with the first element \, \$2 the second and so on.;
-#X obj 534 197 print repeated-message;
-#X obj 480 511 print complex-message;
-#X msg 480 468 list Fred Marcus;
-#X text 607 468 a list with two symbol atoms;
-#X msg 480 489 Hi \$1. \, Ya know \$2?;
-#X text 623 489 Becomes: "Hi Fred \, Ya know Marcus?";
-#X text 12 8 6 Intermediate Pure-Data - Using the message object;
-#X connect 6 0 8 0;
-#X connect 7 0 8 0;
-#X connect 11 0 10 0;
-#X connect 18 0 19 0;
-#X connect 26 0 38 0;
-#X connect 27 0 26 0;
-#X connect 31 0 33 0;
-#X connect 33 0 35 0;
-#X connect 40 0 42 0;
-#X connect 42 0 39 0;
diff --git a/externals/gridflow/doc/tutorials/pure-data-7.pd b/externals/gridflow/doc/tutorials/pure-data-7.pd
deleted file mode 100755
index 0d8360ec..00000000
--- a/externals/gridflow/doc/tutorials/pure-data-7.pd
+++ /dev/null
@@ -1,106 +0,0 @@
-#N canvas 280 89 936 678 10;
-#X obj 8 6 cnv 15 870 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 8 627 cnv 15 870 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 668 629 Copyright Ben Bogart 2005 \; (See COPYING.TXT for details)
-;
-#N canvas 0 22 482 332 META 0;
-#X text 12 5 CATEGORY: tutorial;
-#X text 12 15 KEYWORDS: send receive netsend netreceive cordless communication
-network TCP/IP UDP internet;
-#X restore 16 633 pd META;
-#X obj 8 266 cnv 15 430 15 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X text 13 266 "pack" object;
-#X msg 96 543 2;
-#X msg 45 521 1;
-#X obj 45 588 print mylist;
-#X text 12 20 DESCRIPTION: Using pack \, unpack and route with lists
-;
-#X text 19 75 In the Pure-Data introduction we discussed the three
-different types of data in PD. These are floats (numbers) \, symbols
-(words) and lists (groups of floats and words). Floats and symbols
-are known as atoms. Atoms are single elements \, they do not contain
-spaces or other special characters. Atoms can be grouped into lists.
-;
-#X obj 8 46 cnv 15 430 15 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X text 13 46 What is a list?;
-#X msg 145 216 list one two three;
-#X obj 145 239 print this is a list;
-#X text 19 155 Lists can be created in a number of ways \, but we are
-going to cover the two most common ways of creating lists. The most
-simple way to create a list is to type the list into a message box
-starting with the word (symbol) "list":;
-#X text 19 295 The "pack" object is the second most common way to create
-a list. "pack" allows you to take individual atoms and combine them
-into a single list. "pack" accepts a number of arguments. Each argument
-defines the type of atom in the resulting list. The "f" argument creates
-an inlet that accepts float atoms. The "s" argument creates an inlet
-accepts symbol atoms. The number of arguments is the same as the number
-of elements in the resultant list.;
-#X text 19 405 "pack" is the first object we are going to learn that
-has a "cold" inlet. Some control objects in PD have "hot" and "cold"
-inlets. When you send a message to a "cold" inlet the object does not
-generate any output (it does not send any messages). When "hot" inlets
-get messages then the object does generate output. The leftmost inlet
-is always the "hot" inlet and all other inlets are "cold" or in some
-cases all inlets are "hot";
-#X text 75 521 sets the first atom "1" and then sends the list;
-#X text 132 543 sets the second atom "2";
-#X obj 45 566 pack f f;
-#X text 459 45 Note that if you do not set the second and onwards atoms
-via thier "cold" inlets and you generate the list by setting the first
-atom via the "hot" inlet then all float atoms will be set to "0" and
-all symbol atoms will be set to "symbol" in the resultant list.;
-#X obj 448 126 cnv 15 430 15 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X text 453 126 "unpack" object;
-#X obj 596 241 unpack f f f;
-#X msg 596 219 list 1 2 3;
-#X floatatom 596 294 5 0 0 0 - - -;
-#X floatatom 635 277 5 0 0 0 - - -;
-#X floatatom 675 262 5 0 0 0 - - -;
-#X text 639 293 First Atom;
-#X text 678 277 Second Atom;
-#X text 718 261 Third Atom;
-#X text 459 156 The "unpack" object is very similar to the "pack" object
-except it works in reverse. "unpack" takes a list and splits it up
-into a number of atoms. It uses the same arguments as "pack" but generates
-outlets rather than inlets.;
-#X obj 448 319 cnv 15 430 15 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X text 453 319 "route" object;
-#X text 459 349 The "route" object sorts lists based on the first atom
-of the list. It as a number of float or symbol arguments. For each
-argument "route" creates one outlet. "route" also creates one additional
-rightmost outlet for rejections. For each list route gets it compares
-the first atom to all its arguments. If the first atom matches one
-of the arguments it the rest of the list \, without the first atom
-\, gets send through the outlet corresponding to that argument. If
-the first atom of the list does not match any arguments the entire
-list \, including the first atom \, gets sent out the rejection outlet.
-;
-#X msg 688 493 rejection 1;
-#X obj 685 553 print rejection;
-#X msg 538 493 o1 2;
-#X msg 613 493 o2 3;
-#X obj 613 531 route o1 o2;
-#X obj 613 593 print o1;
-#X obj 649 573 print o2;
-#X text 12 8 7 Intermediate Pure-Data - Working with lists;
-#X connect 6 0 20 1;
-#X connect 7 0 20 0;
-#X connect 13 0 14 0;
-#X connect 20 0 8 0;
-#X connect 24 0 26 0;
-#X connect 24 1 27 0;
-#X connect 24 2 28 0;
-#X connect 25 0 24 0;
-#X connect 36 0 40 0;
-#X connect 38 0 40 0;
-#X connect 39 0 40 0;
-#X connect 40 0 41 0;
-#X connect 40 1 42 0;
-#X connect 40 2 37 0;
diff --git a/externals/gridflow/doc/tutorials/pure-data-8.pd b/externals/gridflow/doc/tutorials/pure-data-8.pd
deleted file mode 100755
index aa95c087..00000000
--- a/externals/gridflow/doc/tutorials/pure-data-8.pd
+++ /dev/null
@@ -1,89 +0,0 @@
-#N canvas 238 94 891 621 10;
-#X obj 8 6 cnv 15 870 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 8 577 cnv 15 870 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 668 579 Copyright Ben Bogart 2005 \; (See COPYING.TXT for details)
-;
-#N canvas 0 22 482 332 META 0;
-#X text 12 5 CATEGORY: tutorial;
-#X text 12 15 KEYWORDS: send receive netsend netreceive cordless communication
-network TCP/IP UDP internet;
-#X restore 16 583 pd META;
-#X obj 8 46 cnv 15 430 15 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X text 12 20 DESCRIPTION: nested patches using abstractions & subpatches
-;
-#X text 13 46 What is an abstraction?;
-#X text 23 76 Since objects are very simple in Pure-Data doing complex
-tasks often leads to very complex patches. Often it is useful to use
-the same bit of patching you do for one project for another. Pure-Data
-has a facility to "nest" \, that is to take a number of objects in
-a collection and place them into a group that looks like a single object.
-This is also handy to make a complex patch look simple and clear by
-hiding the nitty-gritty details. There are two types of these collections
-\, the subpatch and the abstraction.;
-#X obj 8 216 cnv 15 430 15 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X text 13 216 The subpatch;
-#X text 23 246 Subpatches are collections of objects that get "hidden"
-inside a container that looks like a normal PD object. Subpatches are
-created by creating an object box \, and typing the word "pd" followed
-by whatever you want to describe the contents of the subpatch. Subpatches
-are saved at the same time as the "parent" patch. Here is a subpatch:
-;
-#N canvas 0 22 460 310 subpatch 0;
-#X obj 30 34 inlet;
-#X obj 30 77 outlet;
-#X text 99 35 This is inside the subpatch.;
-#X connect 0 0 1 0;
-#X restore 178 359 pd subpatch;
-#X floatatom 178 336 5 0 0 0 - - -;
-#X floatatom 178 387 5 0 0 0 - - -;
-#X text 23 416 To open a subpatch simply click once on the subpatch
-in run-mode or control-click (or right-click) and select open in edit-mode.
-Both subpatches and abstractions communicate with the parent patch
-through special objects called "inlet" and "outlet" for each "inlet"
-in a subpatch or abstraction an inlet is created on the subpatch. This
-example has one inlet and one outlet.;
-#X obj 448 46 cnv 15 430 15 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X text 453 46 The abstraction;
-#X text 463 76 Abstractions are very similar to subpatches. They are
-collections of objects that are "hidden" inside PD objects \, and they
-both use "inlet" and "outlet" objects to communicate with the parent
-patch. The difference between subpatches and abstractions is that abstractions
-are saved in a separate file from the parent. This means when you save
-the parent patch containing abstractions the abstractions are not saved.
-The abstractions are saved as separate files so that they can be used
-in multiple patches. A second feature that exists in abstractions and
-not in subpatches is the ability to use arguments. "send" and "receive"
-can be used inside abstractions to send data without connections (patch-cords).
-;
-#X obj 682 253 r output;
-#X obj 682 277 print;
-#X obj 564 253 abstraction 1 2;
-#X text 463 316 To create an abstraction all you need to do is create
-a new PD patch ("File" -> "New"). Create the contents of the abstraction
-and then save it in the same directory as the patch you want to use
-it in. In this case the abstraction is saved as "abstraction.pd". Once
-saved you can easily embed the abstraction simply by typing its name
-\, without the .pd extension \, into an object box.;
-#X obj 448 416 cnv 15 430 15 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X text 453 416 Dollarsign in object boxes;
-#X text 463 446 If you open the above example you will see that the
-familiar "pack" object has a number of "$" arguments. The "$" arguments
-in a object box differ entirely from the "$" used in message objects.
-When you use a "$" in an object box inside an abstraction the values
-get replaced with the arguments to that abstraction. In the case above
-the "pack" object's first argument "$1" gets replaced with the first
-argument of the abstraction "1" "$2" gets replaced with the second
-argument "2".;
-#X text 23 536 For more info see: 12.PART2.subpatch.pd 14.dollersign.pd
-;
-#X text 12 8 8 Intermediate Pure-Data - Using abstractions and subpacthes
-;
-#X connect 11 0 13 0;
-#X connect 12 0 11 0;
-#X connect 18 0 19 0;
diff --git a/externals/gridflow/doc/tutorials/pure-data-9.pd b/externals/gridflow/doc/tutorials/pure-data-9.pd
deleted file mode 100755
index e5188ee0..00000000
--- a/externals/gridflow/doc/tutorials/pure-data-9.pd
+++ /dev/null
@@ -1,43 +0,0 @@
-#N canvas 291 108 450 562 10;
-#X obj 8 6 cnv 15 430 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 8 517 cnv 15 430 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 228 519 Copyright Ben Bogart 2005 \; (See COPYING.TXT for details)
-;
-#N canvas 0 22 486 336 META 0;
-#X text 12 5 CATEGORY: tutorial;
-#X text 12 15 KEYWORDS: GOP graph parent abstraction nesting ui interface
-;
-#X restore 16 523 pd META;
-#X obj 8 46 cnv 15 430 15 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X text 12 20 DESCRIPTION: Using Graph on Parent abstractions;
-#X text 13 46 What is Graph on Parent?;
-#X text 13 76 Graph on Parent is a feature of PD that allows you to
-show the GUI objects contained in an abstraction on the parent patch.
-This means that you can create abstractions that not only include a
-collection of objects but can also include a user interface. To use
-graph on parent you simply need to create an abstraction the usual
-way but before saving it you need should Control-Click (Right-Click)
-on the background (white area) in the abstraction and choose "properties".
-From the properties menu check the "graph on parent" option. Now when
-you save the patch and embed it in a second patch all GUI objects will
-be visible.;
-#X obj 154 250 gop_abstraction;
-#X text 13 331 In this simple example there is only one GUI object
-\, a slider. Inside the abstraction the slider is connected to an inlet
-and an outlet. If you move the slider you can see the result in the
-outlet. If you set a value in the inlet with the number GUI you can
-see the position of the slider change.;
-#X floatatom 154 231 5 0 0 0 - - -;
-#X floatatom 154 297 5 0 0 0 - - -;
-#X text 13 421 Note you can change the size of the abstractions bounding
-box by Control-Click (Right-Click) on the abstraction and choose "properties".
-The size of the bounding-box is specified by the "screen width" and
-"screen height".;
-#X text 13 487 For more info see:;
-#X text 12 8 9 Intermediate Pure-Data - Using GUI's in abstractions
-;
-#X connect 8 0 11 0;
-#X connect 10 0 8 0;
diff --git a/externals/gridflow/doc/tutorials/randomly-select-an-image.pd b/externals/gridflow/doc/tutorials/randomly-select-an-image.pd
deleted file mode 100755
index 5817aa32..00000000
--- a/externals/gridflow/doc/tutorials/randomly-select-an-image.pd
+++ /dev/null
@@ -1,53 +0,0 @@
-#N canvas 417 0 446 428 10;
-#X text 6 15 You can open multiple images in the same window. To do
-so you connect the outputs from the images to the inlet of the out
-window.;
-#X obj 136 295 #out window;
-#X obj 65 198 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 28 232 #in;
-#X msg 28 160 open b001.jpg;
-#X obj 188 197 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 151 231 #in;
-#X msg 151 159 open r001.jpg;
-#X obj 301 196 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 264 230 #in;
-#X msg 264 158 open g001.jpg;
-#X obj 7 -37 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X text 10 -37 What is a grid?;
-#X obj 8 320 cnv 15 430 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 16 327 GridFlow 0.8.0;
-#X obj 7 -72 cnv 15 430 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 12 -73 2 Images;
-#X text 14 -59 Description: opening multiple images from one window.
-;
-#X obj 56 115 random 3;
-#X floatatom 195 81 5 0 0 0 - - -;
-#X obj 3 55 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1;
-#X obj 163 112 sel 0;
-#X obj 226 127 sel 1;
-#X obj 304 115 sel 2;
-#X obj 55 92 metro 1000;
-#X connect 2 0 3 0;
-#X connect 3 0 1 0;
-#X connect 4 0 3 0;
-#X connect 5 0 6 0;
-#X connect 6 0 1 0;
-#X connect 7 0 6 0;
-#X connect 8 0 9 0;
-#X connect 9 0 1 0;
-#X connect 10 0 9 0;
-#X connect 18 0 19 0;
-#X connect 19 0 21 0;
-#X connect 19 0 22 0;
-#X connect 19 0 23 0;
-#X connect 20 0 24 0;
-#X connect 21 0 2 0;
-#X connect 22 0 5 0;
-#X connect 23 0 8 0;
-#X connect 24 0 18 0;
diff --git a/externals/gridflow/doc/tutorials/title-page-pd-gf-in-one.pd b/externals/gridflow/doc/tutorials/title-page-pd-gf-in-one.pd
deleted file mode 100755
index 18798314..00000000
--- a/externals/gridflow/doc/tutorials/title-page-pd-gf-in-one.pd
+++ /dev/null
@@ -1,129 +0,0 @@
-#N canvas 18 0 762 514 10;
-#X obj 102 -15 cnv 15 430 50 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 102 66 cnv 1 430 430 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 102 98 cnv 1 430 2 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj 102 73 cnv 1 430 2 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj 108 66 cnv 1 2 430 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj 516 67 cnv 1 2 430 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj 102 158 cnv 1 430 2 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj 102 182 cnv 1 430 2 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X text 152 114 1.1 What is a grid?;
-#X obj 142 456 cnv 15 300 30 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X text 154 461 Stephanie Brodeur & Darsha Hewitt 2005;
-#X obj 102 36 cnv 15 430 30 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj 214 -6 cnv 15 100 17 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj 214 -6 GridFlow 0.8.0;
-#X obj 102 -15 cnv 1 430 1 empty empty empty 20 12 0 14 -66577 -66577
-0;
-#X obj 102 34 cnv 1 430 1 empty empty empty 20 12 0 14 -66577 -66577
-0;
-#X obj 315 8 cnv 15 63 17 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj 314 8 Tutorials;
-#X obj 102 65 cnv 1 430 1 empty empty empty 20 12 0 14 -66577 -66577
-0;
-#X obj 102 495 cnv 1 430 1 empty empty empty 20 12 0 14 -66577 -66577
-0;
-#X text 140 79 1;
-#X obj 158 78 Introduction to Grids;
-#X text 152 130 1.2 How to create grid.;
-#X text 152 192 2.1 How does GridFlow understand images?;
-#X text 141 164 2;
-#X obj 162 161 Introduction to Images;
-#X text 152 211 2.2 Opening an image.;
-#X text 152 230 2.3 Different options on how to open an image.;
-#X text 178 247 2.3.1 Opening different images in one window.;
-#X text 178 264 2.3.2 Opening images using send and receive.;
-#X obj 102 356 cnv 1 430 2 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X obj 102 380 cnv 1 430 2 empty empty empty 20 12 0 14 -228992 -66577
-0;
-#X text 141 362 3;
-#X obj 162 359 Introduction to Video;
-#X text 178 300 2.4.1 Resizing an image.;
-#X text 151 284 2.4 Image manipulation.;
-#X text 178 315 2.4.2 Greyscale.;
-#X text 178 330 2.4.3 numop.;
-#X text 149 394 4 Introduction to live feed;
-#X text 150 422 5 Putting it all together;
-#X obj -401 -18 cnv 15 455 30 empty empty empty 20 12 0 14 -233017
--66577 0;
-#X obj -398 898 cnv 15 870 30 empty empty empty 20 12 0 14 -233017
--66577 0;
-#X text -393 898 Copyright Ben Bogart 2005 \; (See COPYING.TXT for
-details);
-#X text -397 -11 Welcome to Pure-Data...;
-#X obj -401 22 cnv 15 455 15 empty empty empty 20 12 0 14 -179884 -66577
-0;
-#X text -396 22 What is Pure-Data (aka PD)?;
-#X text -381 50 Pure-Data is an open-source patching environment for
-multi-media (audio+image). Pure-Data is a programming language where
-you create relationships by connecting visual boxes (rather than typing
-complex commands). This lecture is separated into three sections: An
-Introduction to Pure-Data \, An introduction to Gem and intermediate
-PD and Gem.;
-#X obj -381 152 cnv 15 430 120 empty empty empty 20 12 0 14 -179884
--66577 0;
-#X obj -367 174 pddp_open pure-data-1;
-#X obj -367 197 pddp_open pure-data-2;
-#X obj -367 220 pddp_open pure-data-3;
-#X obj -367 243 pddp_open pure-data-4;
-#X text -192 174 Pure-Data Introduction;
-#X text -192 197 GUI Objects for Interaction;
-#X text -192 220 Creating your first patch;
-#X text -192 243 Control: metro \, random & counter;
-#X obj -382 376 cnv 15 430 145 empty empty empty 20 12 0 14 -179884
--66577 0;
-#X obj -378 580 cnv 15 430 145 empty empty empty 20 12 0 14 -179884
--66577 0;
-#X obj -364 602 pddp_open pure-data-5;
-#X obj -364 625 pddp_open pure-data-6;
-#X text -189 625 The powerful message object;
-#X obj -364 648 pddp_open pure-data-7;
-#X text -189 648 More about lists;
-#X text -189 671 Nesting collections of objects;
-#X text -189 602 Connectionless communications;
-#X obj -364 671 pddp_open pure-data-8;
-#X text -189 695 Using GUI's in abstractions;
-#X obj -364 695 pddp_open pure-data-9;
-#X obj -378 787 cnv 15 430 95 empty empty empty 20 12 0 14 -179884
--66577 0;
-#X text -194 422 Introduction to Images;
-#X text -194 468 Introduction to Live Feeds;
-#X obj -401 308 cnv 15 455 15 empty empty empty 20 12 0 14 -179884
--66577 0;
-#X text -189 837 Putting it all together;
-#X text -190 808 Interfacing with sensors;
-#X text -194 399 Introduction to Grids;
-#X text -384 331 GridFlow is a multidimentional dataflow processing
-library for PureData and Ruby \, designed for interactive multimedia.
-;
-#X text -377 376 2 Introduction to GridFlow;
-#X text -376 152 1 Introduction to Pure-Data;
-#X text -373 580 3 Intermediate Pure-Data;
-#X text -373 787 4 Intermediate GridFlow;
-#X obj -401 542 cnv 15 455 15 empty empty empty 20 12 0 14 -179884
--66577 0;
-#X text -396 542 What is GridFLow?;
-#X obj -400 751 cnv 15 455 15 empty empty empty 20 12 0 14 -179884
--66577 0;
-#X text -395 751 What is GridFLow?;
-#X obj -283 400 GridFlow-1;
-#X obj -283 423 GridFlow-2;
-#X obj -283 446 GridFlow-3;
-#X obj -283 469 GridFlow-4;
-#X obj -281 809 GridFlow-6;
-#X obj -281 832 GridFlow-7;
-#X text -395 308 What is GridFlow?;
-#X text -194 445 Introduction to Video;
diff --git a/externals/gridflow/doc/tutorials/txt-for-resize-image.pd b/externals/gridflow/doc/tutorials/txt-for-resize-image.pd
deleted file mode 100755
index f991ba07..00000000
--- a/externals/gridflow/doc/tutorials/txt-for-resize-image.pd
+++ /dev/null
@@ -1,3 +0,0 @@
-#N canvas 0 0 450 300 10;
-#X text 48 29 How to resize an image:;
-#X text 39 70 # scale 640 480 pour les images;
diff --git a/externals/gridflow/examples/bounce.pd b/externals/gridflow/examples/bounce.pd
deleted file mode 100644
index 46421cad..00000000
--- a/externals/gridflow/examples/bounce.pd
+++ /dev/null
@@ -1,32 +0,0 @@
-#N canvas 0 0 450 300 10;
-#X obj 34 284 #out window;
-#X floatatom 48 71 5 0 0 0 - - -;
-#X obj 34 16 metro 30;
-#X obj 6 19 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1;
-#X obj 34 42 f;
-#X obj 95 34 + 1;
-#X msg 34 265 set_geometry \$1 \$2 200 200;
-#X obj 34 93 t f f;
-#X obj 34 246 pack 0 0;
-#X obj 64 136 expr $f1-int($f1);
-#X obj 64 156 expr 2*if($f1>=.5 \, $f1 \, (1-$f1));
-#X obj 64 176 expr $f1*400;
-#X obj 64 115 / 200;
-#X obj 95 53 % 1000;
-#X obj 34 206 expr 400-200*abs(sin($f1/3.1416/5));
-#X connect 2 0 4 0;
-#X connect 3 0 2 0;
-#X connect 4 0 5 0;
-#X connect 4 0 1 0;
-#X connect 4 0 7 0;
-#X connect 5 0 13 0;
-#X connect 6 0 0 0;
-#X connect 7 0 14 0;
-#X connect 7 1 12 0;
-#X connect 8 0 6 0;
-#X connect 9 0 10 0;
-#X connect 10 0 11 0;
-#X connect 11 0 8 1;
-#X connect 12 0 9 0;
-#X connect 13 0 4 1;
-#X connect 14 0 8 0;
diff --git a/externals/gridflow/examples/doodle.pd b/externals/gridflow/examples/doodle.pd
deleted file mode 100644
index 8ec75c39..00000000
--- a/externals/gridflow/examples/doodle.pd
+++ /dev/null
@@ -1,31 +0,0 @@
-#N canvas 0 0 450 427 10;
-#X obj 22 22 metro 33.3667;
-#X obj 1 22 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1;
-#X obj 143 74 t b l;
-#X obj 282 93 loadbang;
-#X msg 182 74 put_at ( \$1 \$2 0 );
-#X msg 284 120 0 192 255;
-#X obj 22 114 #store (64 64 3 #);
-#X obj 22 133 #scale_by 8;
-#X obj 22 152 #out window;
-#X obj 22 171 #mouse;
-#X obj 22 190 # / 8;
-#X obj 22 209 #export_list;
-#X obj 143 93 #store;
-#X obj 232 154 #color;
-#X connect 0 0 6 0;
-#X connect 1 0 0 0;
-#X connect 2 0 12 0;
-#X connect 2 1 4 0;
-#X connect 3 0 5 0;
-#X connect 4 0 6 1;
-#X connect 5 0 13 0;
-#X connect 6 0 7 0;
-#X connect 7 0 8 0;
-#X connect 8 0 9 0;
-#X connect 9 0 10 0;
-#X connect 9 1 10 0;
-#X connect 10 0 11 0;
-#X connect 11 0 2 0;
-#X connect 12 0 6 1;
-#X connect 13 0 12 1;
diff --git a/externals/gridflow/examples/heat.pd b/externals/gridflow/examples/heat.pd
deleted file mode 100644
index 743fc4e6..00000000
--- a/externals/gridflow/examples/heat.pd
+++ /dev/null
@@ -1,173 +0,0 @@
-#N canvas 59 155 741 486 10;
-#X obj 228 23 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#N canvas 199 246 450 453 heat 1;
-#X obj 129 23 inlet mask;
-#X obj 22 42 t a a;
-#X obj 22 224 # +;
-#X obj 22 23 inlet heatmap;
-#X obj 24 394 outlet heatmap;
-#X obj 241 154 #greyscale_to_rgb;
-#X obj 241 175 #out window;
-#X obj 22 80 #store;
-#X obj 22 61 #finished;
-#X obj 52 167 # + 128;
-#X obj 52 186 # >> 8;
-#X obj 52 134 # *;
-#X obj 52 103 #convolve (3 3 # 0 1 0 1 -4 1);
-#X obj 52 205 # + 2;
-#X obj 52 225 # >> 4;
-#X connect 0 0 11 1;
-#X connect 1 0 8 0;
-#X connect 1 1 7 1;
-#X connect 1 1 12 0;
-#X connect 2 0 4 0;
-#X connect 3 0 1 0;
-#X connect 5 0 6 0;
-#X connect 7 0 2 0;
-#X connect 8 0 7 0;
-#X connect 9 0 10 0;
-#X connect 10 0 13 0;
-#X connect 11 0 9 0;
-#X connect 12 0 11 0;
-#X connect 13 0 14 0;
-#X connect 14 0 2 1;
-#X restore 27 81 pd heat;
-#X obj 27 61 #store;
-#X obj 94 42 loadbang;
-#X obj 27 16 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
-;
-#X obj 27 363 #out window;
-#X obj 227 157 #greyscale_to_rgb;
-#X obj 227 138 # >> 2;
-#X obj 48 23 s metro;
-#X obj 27 382 #mouse \, ...;
-#X obj 120 382 # >> 1;
-#X obj 27 344 #scale_by 2;
-#X msg 94 61 240 320 1 # 0;
-#N canvas 205 52 520 286 finger 0;
-#X obj 28 62 shunt 2;
-#X msg 289 71 4 2 # 0 0 0 1 1 1 1 0;
-#X obj 289 90 # * 8;
-#X obj 289 109 # - 4;
-#X obj 289 128 # +;
-#X obj 28 23 inlet;
-#X obj 28 142 outlet;
-#X obj 289 14 inlet position;
-#X obj 72 23 inlet button;
-#X obj 289 33 #export_list;
-#X obj 289 52 t b a;
-#X obj 72 81 #draw_polygon + (4000);
-#X connect 0 0 6 0;
-#X connect 0 1 11 0;
-#X connect 1 0 2 0;
-#X connect 2 0 3 0;
-#X connect 3 0 4 0;
-#X connect 4 0 11 2;
-#X connect 5 0 0 0;
-#X connect 7 0 9 0;
-#X connect 8 0 0 1;
-#X connect 9 0 10 0;
-#X connect 10 0 1 0;
-#X connect 10 1 4 1;
-#X connect 11 0 6 0;
-#X restore 27 163 pd finger;
-#X obj 15 436 fps detailed;
-#X obj 16 456 display;
-#X obj 27 119 shunt 2;
-#X obj 90 104 f;
-#X obj 115 104 + 1;
-#X obj 27 100 t a b;
-#X obj 140 123 ==;
-#X obj 140 104 % 4;
-#N canvas 340 133 341 379 render 0;
-#X obj 12 285 # +;
-#X obj 26 23 inlet heatmap;
-#X obj 12 323 outlet rgb;
-#X obj 123 23 inlet mask;
-#X obj 26 53 t a a;
-#X obj 26 80 #inner (1 3 # 2 4 6) \, op >>;
-#X obj 82 161 t a a;
-#X obj 88 189 # -;
-#X obj 88 227 # + 128;
-#X obj 12 304 #clip;
-#X obj 88 208 # << 6;
-#X obj 26 108 shunt 2;
-#X obj 79 109 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
-;
-#X connect 0 0 9 0;
-#X connect 1 0 4 0;
-#X connect 3 0 0 1;
-#X connect 4 0 5 0;
-#X connect 5 0 11 0;
-#X connect 6 0 7 1;
-#X connect 6 1 7 0;
-#X connect 7 0 10 0;
-#X connect 8 0 0 0;
-#X connect 9 0 2 0;
-#X connect 10 0 8 0;
-#X connect 11 0 0 0;
-#X connect 11 1 6 0;
-#X connect 12 0 11 1;
-#X restore 28 271 pd render;
-#X obj 295 232 #fold +;
-#X obj 295 251 #fold +;
-#X obj 295 289 #fold +;
-#X obj 245 23 loadbang;
-#X obj 227 100 # max;
-#X obj 227 81 # << 1;
-#X obj 227 119 # min 256;
-#X obj 227 62 # - 40;
-#X obj 295 270 # / 320;
-#X obj 295 308 # / 240;
-#X obj 295 327 #export;
-#X floatatom 294 356 5 0 0 0 - - -;
-#X obj 27 42 metro 12;
-#X text 542 3 heat propagation simulation;
-#X text 396 43 use a greyscale image here;
-#X text 493 17 Copyright 2005 by Mathieu Bouchard;
-#X obj 227 43 #in ../images/pmask.png;
-#X text 396 57 as a heat conduction map;
-#X connect 0 0 39 0;
-#X connect 1 0 19 0;
-#X connect 2 0 1 0;
-#X connect 3 0 12 0;
-#X connect 4 0 35 0;
-#X connect 5 0 9 0;
-#X connect 5 0 14 0;
-#X connect 6 0 22 1;
-#X connect 7 0 6 0;
-#X connect 9 0 10 0;
-#X connect 9 1 10 0;
-#X connect 9 4 13 1;
-#X connect 10 0 13 2;
-#X connect 11 0 5 0;
-#X connect 12 0 2 1;
-#X connect 13 0 2 1;
-#X connect 13 0 22 0;
-#X connect 14 0 15 0;
-#X connect 16 0 2 1;
-#X connect 16 1 13 0;
-#X connect 17 0 18 0;
-#X connect 18 0 21 0;
-#X connect 19 0 16 0;
-#X connect 19 1 17 0;
-#X connect 20 0 16 1;
-#X connect 21 0 17 1;
-#X connect 21 0 20 0;
-#X connect 22 0 11 0;
-#X connect 23 0 24 0;
-#X connect 24 0 31 0;
-#X connect 25 0 32 0;
-#X connect 26 0 39 0;
-#X connect 27 0 29 0;
-#X connect 28 0 27 0;
-#X connect 29 0 1 1;
-#X connect 29 0 7 0;
-#X connect 30 0 28 0;
-#X connect 31 0 25 0;
-#X connect 32 0 33 0;
-#X connect 33 0 34 0;
-#X connect 35 0 2 0;
-#X connect 35 0 8 0;
-#X connect 39 0 30 0;
diff --git a/externals/gridflow/examples/markov.pd b/externals/gridflow/examples/markov.pd
deleted file mode 100644
index d6bbe262..00000000
--- a/externals/gridflow/examples/markov.pd
+++ /dev/null
@@ -1,133 +0,0 @@
-#N canvas 238 57 825 641 10;
-#X obj 70 203 dac~;
-#X obj 71 141 osc~;
-#X obj 71 103 mtof;
-#X obj 71 122 t f b;
-#X obj 105 142 line~;
-#X obj 70 160 *~;
-#X obj 74 86 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144
--1 -1 6700 1;
-#X obj 70 179 *~ 0.1;
-#X obj 33 6 key;
-#X obj 409 139 messageprepend set;
-#X obj 497 110 t l;
-#X msg 409 89 list \$1;
-#X obj 409 109 listprepend;
-#X msg 481 84 list;
-#X obj 97 7 loadbang;
-#X obj 34 29 listfind;
-#X obj 34 48 sel -1;
-#X obj 71 67 + 60;
-#X msg 114 28 list 113 50 119 51 101 114 53 116 54 121 55 117 105 57
-111 48 112 91 61 93 127;
-#X obj 409 69 key;
-#X msg 111 123 0.7 \, 0 400;
-#X floatatom 105 68 5 0 0 0 - - -;
-#X msg 200 180 list \$1;
-#X obj 275 199 listsublist 0 2;
-#X obj 200 199 listappend;
-#X obj 483 388 display;
-#X msg 270 264 1;
-#X msg 305 240 put_at ( \$2 \$1 );
-#X obj 166 319 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 75 309 f;
-#X obj 39 410 #store;
-#X obj 97 393 #fold +;
-#X obj 96 417 display;
-#X obj 275 219 t l l l;
-#X msg 184 279 bang;
-#X obj 8 387 #finished;
-#X floatatom 99 311 5 0 0 0 - - -;
-#X obj 90 288 t f;
-#X obj 17 262 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
-;
-#X msg 192 299 list \$1;
-#X obj 46 366 t a a;
-#X obj 39 502 #scan +;
-#X obj 200 157 spigot;
-#X obj 82 440 # rand;
-#X obj 80 472 display;
-#X obj 38 546 # <;
-#X obj 50 595 #fold +;
-#X obj 280 512 display;
-#X obj 132 596 #export;
-#X obj 248 157 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X obj 104 329 + 60;
-#X obj 148 368 spigot;
-#X obj 199 367 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X obj 17 286 metro 100;
-#X obj 50 617 display;
-#X obj 67 568 display;
-#X obj 90 537 display;
-#X obj 191 322 #store (17 17 #) \, op +;
-#X text 536 12 This will be an example of Markov Chains;
-#X text 536 27 But it's not too clean yet;
-#X connect 1 0 5 0;
-#X connect 2 0 3 0;
-#X connect 3 0 1 0;
-#X connect 3 1 20 0;
-#X connect 4 0 5 1;
-#X connect 5 0 7 0;
-#X connect 6 0 2 0;
-#X connect 7 0 0 0;
-#X connect 7 0 0 1;
-#X connect 8 0 15 0;
-#X connect 10 0 12 1;
-#X connect 11 0 12 0;
-#X connect 12 0 10 0;
-#X connect 12 0 9 0;
-#X connect 13 0 12 1;
-#X connect 14 0 18 0;
-#X connect 15 0 16 0;
-#X connect 16 1 17 0;
-#X connect 16 1 42 0;
-#X connect 17 0 6 0;
-#X connect 17 0 21 0;
-#X connect 18 0 15 1;
-#X connect 19 0 11 0;
-#X connect 20 0 4 0;
-#X connect 22 0 24 0;
-#X connect 23 0 24 1;
-#X connect 23 0 33 0;
-#X connect 24 0 23 0;
-#X connect 26 0 57 1;
-#X connect 27 0 57 1;
-#X connect 28 0 57 0;
-#X connect 29 0 39 0;
-#X connect 30 0 41 0;
-#X connect 30 0 47 0;
-#X connect 31 0 32 0;
-#X connect 31 0 43 0;
-#X connect 33 0 34 0;
-#X connect 33 1 26 0;
-#X connect 33 2 27 0;
-#X connect 34 0 57 0;
-#X connect 35 0 30 0;
-#X connect 36 0 50 0;
-#X connect 37 0 29 1;
-#X connect 37 0 36 0;
-#X connect 38 0 53 0;
-#X connect 39 0 57 0;
-#X connect 40 0 35 0;
-#X connect 40 1 30 1;
-#X connect 40 1 31 0;
-#X connect 41 0 45 0;
-#X connect 41 0 56 0;
-#X connect 42 0 22 0;
-#X connect 43 0 44 0;
-#X connect 43 0 45 1;
-#X connect 45 0 46 0;
-#X connect 45 0 55 0;
-#X connect 46 0 48 0;
-#X connect 46 0 54 0;
-#X connect 48 0 37 0;
-#X connect 49 0 42 1;
-#X connect 50 0 6 0;
-#X connect 51 0 40 0;
-#X connect 52 0 51 1;
-#X connect 53 0 29 0;
-#X connect 57 0 25 0;
-#X connect 57 0 51 0;
diff --git a/externals/gridflow/examples/mechanics.pd b/externals/gridflow/examples/mechanics.pd
deleted file mode 100644
index 944dcb7c..00000000
--- a/externals/gridflow/examples/mechanics.pd
+++ /dev/null
@@ -1,121 +0,0 @@
-#N canvas 491 20 624 716 10;
-#X obj 188 65 # rand;
-#X obj 81 97 #store;
-#X obj 188 8 loadbang;
-#X obj 134 120 #transpose;
-#X obj 64 8 tgl 17 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1;
-#X obj 81 171 #inner \, op sq- \, fold +;
-#X msg 139 56 1;
-#X msg 100 56 0;
-#X obj 81 120 shunt 2;
-#X obj 81 29 t b b b b;
-#X obj 27 244 #transpose 1 3;
-#X obj 27 282 #fold +;
-#X obj 27 357 # inv*;
-#X obj 159 424 # +;
-#X msg 188 27 bang;
-#X obj 12 648 #out window;
-#X obj 12 29 t b b;
-#X obj 12 667 fps detailed;
-#X obj 190 471 # inv+;
-#X obj 279 235 # + 1;
-#X obj 279 216 # * -2;
-#X obj 185 424 # *;
-#X msg 261 76 7 2 # 0;
-#X obj 12 574 # min 255;
-#X obj 81 8 metro 40;
-#X obj 350 598 #dim;
-#X msg 350 636 \$1;
-#X msg 349 674 \$1 2;
-#X obj 350 617 #export_list;
-#X obj 287 500 t a a;
-#X obj 350 655 * 6;
-#X obj 27 225 #outer sq-;
-#X msg 188 46 7 2 # 5760 7680;
-#X obj 240 521 # / 16;
-#X obj 27 322 # >> 8;
-#X obj 46 496 display;
-#X obj 190 452 # >> 8;
-#X obj 74 357 # << 8;
-#X obj 27 263 # * (2 2 # 1 0 0 1);
-#X obj 81 190 #outer ignore (2 #);
-#X obj 279 178 # abs- (2880 3840);
-#X obj 279 197 # >= (2880 3840);
-#X obj 290 460 # min (36000 48000);
-#X obj 290 479 # max (0 0);
-#X obj 240 541 #inner (2 6 2 # 1 0 1 0 1 0 1 0 1 0 0 0 0 1 0 1 0 1
-0 1 0 1 0 0);
-#X obj 240 573 # + (6 2 # -8 -8 -8 8 8 8 8 -8 -8 -8 180 240);
-#X obj 12 555 # *>>8 (232 242 252);
-#X obj 12 536 #draw_polygon + \, color (3 # 130);
-#X obj 12 517 #store (360 480 3 # 0);
-#X obj 28 376 #fold + \, seed (2 #);
-#X obj 231 613 #redim (42 2);
-#X text 310 8 This was supposed to be some kind of;
-#X text 310 24 Newtonian physics simulation;
-#X text 310 42 But it doesn't quite work;
-#X connect 0 0 1 1;
-#X connect 1 0 8 0;
-#X connect 2 0 14 0;
-#X connect 3 0 5 1;
-#X connect 3 0 31 1;
-#X connect 4 0 24 0;
-#X connect 5 0 39 0;
-#X connect 6 0 8 1;
-#X connect 7 0 8 1;
-#X connect 8 0 5 0;
-#X connect 8 0 31 0;
-#X connect 8 1 3 0;
-#X connect 8 1 18 1;
-#X connect 8 1 40 0;
-#X connect 9 0 16 0;
-#X connect 9 1 7 0;
-#X connect 9 2 1 0;
-#X connect 9 3 6 0;
-#X connect 10 0 38 0;
-#X connect 11 0 34 0;
-#X connect 12 0 49 0;
-#X connect 13 0 21 1;
-#X connect 13 0 36 0;
-#X connect 14 0 32 0;
-#X connect 14 0 22 0;
-#X connect 15 0 17 0;
-#X connect 16 0 48 0;
-#X connect 16 1 1 0;
-#X connect 18 0 29 0;
-#X connect 19 0 21 0;
-#X connect 20 0 19 0;
-#X connect 21 0 13 1;
-#X connect 22 0 13 1;
-#X connect 22 0 21 1;
-#X connect 23 0 15 0;
-#X connect 23 0 48 1;
-#X connect 24 0 9 0;
-#X connect 25 0 28 0;
-#X connect 26 0 30 0;
-#X connect 27 0 50 1;
-#X connect 28 0 26 0;
-#X connect 29 0 1 1;
-#X connect 29 0 33 0;
-#X connect 29 1 25 0;
-#X connect 30 0 27 0;
-#X connect 31 0 10 0;
-#X connect 32 0 0 0;
-#X connect 33 0 44 0;
-#X connect 34 0 12 0;
-#X connect 36 0 18 0;
-#X connect 36 0 35 0;
-#X connect 37 0 12 1;
-#X connect 38 0 11 0;
-#X connect 39 0 37 0;
-#X connect 40 0 41 0;
-#X connect 41 0 20 0;
-#X connect 42 0 43 0;
-#X connect 43 0 29 0;
-#X connect 44 0 45 0;
-#X connect 45 0 50 0;
-#X connect 46 0 23 0;
-#X connect 47 0 46 0;
-#X connect 48 0 47 0;
-#X connect 49 0 13 0;
-#X connect 50 0 47 2;
diff --git a/externals/gridflow/extra/gf.valgrind2 b/externals/gridflow/extra/gf.valgrind2
deleted file mode 100644
index d823b34b..00000000
--- a/externals/gridflow/extra/gf.valgrind2
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- hello1
- Memcheck:Cond
- fun:mark_locations_array
-}
-{
- hello2
- Memcheck:Cond
- fun:gc_mark
-}
-{
- hello3
- Memcheck:Value4
- fun:gc_mark
-}
-{
- hello4
- Memcheck:Cond
- fun:gc_mark_children
-}
-{
- hello5
- Memcheck:Value4
- fun:gc_mark_children
-}
-{
- hello6
- Memcheck:Cond
- fun:_dl_relocate_object_internal
-}
-{
- hello7
- Memcheck:Value4
- fun:st_lookup
- fun:rb_mark_generic_ivar
-}
-{
- hello8
- Memcheck:Cond
- fun:st_lookup
- fun:rb_mark_generic_ivar
-}
diff --git a/externals/gridflow/extra/jmax_format.rb b/externals/gridflow/extra/jmax_format.rb
deleted file mode 100644
index 8fba0a73..00000000
--- a/externals/gridflow/extra/jmax_format.rb
+++ /dev/null
@@ -1,167 +0,0 @@
-=begin
- $Id: jmax_format.rb,v 1.2 2006-03-15 04:40:47 matju Exp $
-
- GridFlow
- Copyright (c) 2001,2002,2003 by Mathieu Bouchard
-
- 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.
-
- See file ../COPYING for further informations on licensing terms.
-
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-=end
-
-
-class JMaxFileHandler
- Size = [4,1,2,4]
- Packer = ["N","c","n","N"]
- OpTable = [
- [0, :return],
- [1, :push, :int],
- [2, :push, :float],
- [3, :push, :symbol],
- [5, :set, :int],
- [6, :set, :float],
- [7, :set, :symbol],
- [9, :pop_args, :int],
- [10, :push_obj, :int],
- [11, :mv_obj, :int],
- [12, :pop_objs, :int],
- [13, :make_obj, :int],
- [14, :put_prop, :symbol],
- [16, :obj_mess, :int, :symbol, :int],
- [18, :push_obj_table, :int],
- [19, :pop_obj_table],
- [20, :connect],
- [21, :make_top_obj, :int],
- ]
- OpTableById = {}
- OpTableByName = {}
- OpTable.each {|entry|
- id,name,arg = entry
- OpTableById[id] = entry
- OpTableByName[name] = entry
- }
-end
-
-class JObject
- attr_reader :properties
- attr_accessor :parent_patcher
- attr_reader :init_messages
- attr_reader :connections
- def self.[](*args) new(*args) end
- def initialize(*args)
- @args = args
- @properties = {}
- @init_messages = []
- end
- def send_in(inlet,*args)
- @init_messages << [inlet,*args]
- end
- def connect(inlet,target,outlet)
- end
- def subobjects
- @subobjects={} if not defined? @subobjects
- @subobjects
- end
-end
-
-class JMaxFileReader < JMaxFileHandler
- def initialize(f,factory=JObject)
- @f = f
- @symbols = []
- @estack = []
- @ostack = []
- @tstack = []
- @factory = factory
- end
- def parse
- magic, code_size, n_symbols = @f.read(12).unpack("a4NN")
- case magic
- when "bMax"; #ok
- when "bMa2"; raise "bMa2 format (jMax 4) is not supported yet"
- else raise "not a jMax file"
- end
- @code = @f.read code_size
- @symbols = @f.read.split(/\0/).map {|x| x.intern }
- @index = 0
- while @index < @code.size
- read_opcode
- end
- raise "@estack.size!=0" if @estack.size!=0
- raise "@ostack.size!=1" if @ostack.size!=1
- raise "@tstack.size!=0" if @tstack.size!=0
- @ostack[0]
- end
- def read_opcode
- #puts "#{@index} of #{@code.size}"
- op = @code[@index]; @index+=1
- op1,op2 = op&0x3f,op>>6
- entry = OpTableById[op1]
- if not entry
- puts "skipping unknown opcode #{op1},#{op2}"
- return
- end
- args = []
- (entry.length-2).times {|i|
- args << (case entry[2+i]
- when :int
- n=Size[op2]; v=@code[@index,n].unpack(Packer[op2])[0]
- x = if v[8*n-1]!=0 then ~(~v&((1<<(8*n-1))-1)) else v end
- #STDERR.puts "WARNING: #{v} -> #{x}" if x<0
- x
- when :float
- n=4; @code[@index,4].unpack("g")[0]
- when :symbol
- n=Size[op2]; @symbols[@code[@index,n].unpack(Packer[op2])[0]]
- when nil
- end)
- @index+=n
- }
- #text = sprintf "%05d: %2d,%1d: %s", @index, op1, op2, entry[1]
- #text << "(" << args.map{|x|x.inspect}.join(",") << ")"
- #puts text
- send entry[1], *args
- end
- def push x; @estack << x end
- def set x
- if @estack.size>0 then @estack[-1]=x else @estack << x end
- end
- def put_prop x; @ostack[-1].properties[x] = @estack[-1] end
- def make_obj x
- patcher = @ostack[-1] if @ostack.size>0
- baby = @factory[*(@estack[-x,x].reverse)]
- @ostack << baby
- @ostack[-1].parent_patcher = patcher
- patcher.subobjects[baby]=true if patcher
- end
- alias :make_top_obj :make_obj
- def pop_args x; @estack[-x,x]=[] end
- def push_obj_table x; @tstack<<[] end
- def mv_obj x; @tstack[-1][x]=@ostack[-1] end
- def pop_objs x; @ostack[-x,x]=[] end
- def obj_mess i,s,n
- o = @ostack[-1]
- m = @estack[-n,n].reverse
- if i<0 then o.send s,*m else o.send_in i,s,*m end
- end
- def push_obj x; @ostack<<@tstack[-1][x] end
- def connect; @ostack[-1].connect @estack[-1],@ostack[-2],@estack[-2] end
- def pop_obj_table; @tstack.pop end
- def return; end
-end
-
-if $0 == __FILE__
- jff = JMaxFileReader.new File.open("samples/fire.jmax")
- jff.parse
-end
diff --git a/externals/gridflow/extra/puredata_format.rb b/externals/gridflow/extra/puredata_format.rb
deleted file mode 100644
index eaf32962..00000000
--- a/externals/gridflow/extra/puredata_format.rb
+++ /dev/null
@@ -1,129 +0,0 @@
-=begin
- $Id: puredata_format.rb,v 1.2 2006-03-15 04:40:47 matju Exp $
-
- GridFlow
- Copyright (c) 2001,2002,2003 by Mathieu Bouchard
-
- 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.
-
- See file ../COPYING for further informations on licensing terms.
-
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-=end
-
-class PureDataFileWriter
- def initialize filename
- @f = File.open filename, "w"
- end
- def close; @f.close end
- def write_patcher o
- pr = o.properties
- @f.puts "#N canvas #{pr[:wx]} #{pr[:wy]} #{pr[:ww]} #{pr[:wh]} 10;"
- ol = o.subobjects.keys
- x=0
- ol.find_all {|a| a.classname=="inlet"}.sort {|a,b| a.argv[0] <=> b.argv[0] }.each {|a|
- if x>a.properties[:x]
- a.properties[:x]=x+16
- STDERR.puts "warning: moving inlet #{a.argv[0]} to the right"
- end
- x=a.properties[:x]
- }
- x=0
- ol.find_all {|a| a.classname=="outlet"}.sort {|a,b| a.argv[0] <=> b.argv[0] }.each {|a|
- if x>a.properties[:x]
- a.properties[:x]=x+16
- STDERR.puts "warning: moving outlet #{a.argv[0]} to the right"
- end
- x=a.properties[:x]
- }
- ol.each {|so| write_object so }
- ol.each_with_index {|so,i|
- next if not so.instance_eval{defined? @outlets}
- so.outlets.each_with_index {|conns,outlet|
- next if not conns
- conns.each {|target,inlet|
- @f.puts "#X connect #{i} #{outlet} #{ol.index target} #{inlet};"
- }
- }
- }
- end
-
- def list_to_s l
- l.map {|x|
- if Array===x then "( " + list_to_s(x) + " )" else escape(x.to_s) end
- }.join " "
- end
-
- # what am i supposed to do?
- def escape x; x.gsub(/[;,]/) {|x| " \\#{x}" }.gsub(/\n/) {"\\\n"} end
- def escape2 x; x.gsub(/[,]/) {|x| " \\#{x} " }.gsub(/[;\$\"]/) {|x| "\\#{x}" }.gsub(/\n/) {"\\\n"} end
-
- def write_object o
- pr = o.properties
- #classname = o.class.instance_eval{@foreign_name}
- classname = o.classname
- if classname=="jpatcher"
- #@f.print "#N canvas 0 0 "
- write_patcher o
- end
-
- case classname
- when "display"; classname="print"
- when "list"; classname="listmake"
- end
-
- t = case classname
- when "jcomment"; "text"
- when "messbox"; "msg"
- when "jpatcher"; "restore"
- when "intbox"; "floatatom"
- else "obj"
- end
- @f.print "#X #{t} #{pr[:x]} #{pr[:y]} "
-
- case classname
- when "button"
- @f.print "bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1"
- when "jcomment"
- @f.print escape2(pr[:comment].to_s)
- when "messbox"
- av=o.argv[0]
- i=0
- dollar="$".intern
- while i<av.length
- if av[i]==dollar then av[i,2]=("\\$"+av[i+1].to_s).intern else i+=1 end
- end
- @f.print(list_to_s(av))
- when "slider"
- #doradio = pr[:maxValue]-pr[:minValue]<=10
- doradio = false
- #p doradio
- name = case pr[:orientation]
- when 1; if doradio then "hradio" else "hsl" end
- when 2,nil; if doradio then "vradio" else "vsl" end
- else raise "bogus slider orientation?" end
- @f.print "#{name} "+
- "#{pr[:w]} #{pr[:h]} #{pr[:minValue]} #{pr[:maxValue]} 0 0 "+
- "empty empty empty -2 -6 0 8 -262144 -1 -1 0 1"
- when "intbox"
- @f.print "5 0 0 0 - - -;"
- when "inlet"; @f.print "inlet"
- when "outlet"; @f.print "outlet"
- when "jpatcher"
- @f.print("pd ",list_to_s(o.argv))
- else
- @f.print(classname," ",list_to_s(o.argv))
- end
- @f.puts ";"
- end
-end
diff --git a/externals/gridflow/extra/ruby.valgrind b/externals/gridflow/extra/ruby.valgrind
deleted file mode 100644
index 64603378..00000000
--- a/externals/gridflow/extra/ruby.valgrind
+++ /dev/null
@@ -1,82 +0,0 @@
-# From: Tanaka Akira <akr@m17n.org>
-# matz@ruby-lang.org (Yukihiro Matsumoto) writes:
-#
-#> Some reports from valgrind is due to Ruby's conservative GC, which
-#> touch all C stack region.
-#
-#I use following suppression file to suppress such reports.
-
-{
- memcpy/rb_thread_save_context(Value1)
- Addr1
- fun:memcpy
- fun:rb_thread_save_context
-}
-
-{
- memcpy/rb_thread_restore_context(Value1)
- Addr1
- fun:memcpy
- fun:rb_thread_restore_context
-}
-
-{
- strchr/_dl_catch_error(Cond)
- Cond
- fun:strchr
- obj:/lib/libc-2.2.5.so
- fun:_dl_catch_error
-}
-
-{
- mark_locations_array(Cond)
- Cond
- fun:mark_locations_array
-}
-
-{
- mark_locations_array(Value4)
- Value4
- fun:mark_locations_array
-}
-
-{
- mark_locations_array(Value4)
- Addr4
- fun:mark_locations_array
-}
-
-{
- rb_gc_mark(Cond)
- Cond
- fun:rb_gc_mark
-}
-
-{
- rb_gc_mark(Value4)
- Value4
- fun:rb_gc_mark
-}
-
-{
- rb_gc_mark_children(Value4)
- Value4
- fun:rb_gc_mark_children
-}
-
-{
- rb_gc_mark_children(Cond)
- Cond
- fun:rb_gc_mark_children
-}
-
-#--
-#Tanaka Akira
-
-
-# additional attempt by matju:
-{
- libc
- Cond
- obj:/lib/libc-2.2.5.so
-}
diff --git a/externals/gridflow/extra/server_1_grid.rb b/externals/gridflow/extra/server_1_grid.rb
deleted file mode 100644
index fcc847f2..00000000
--- a/externals/gridflow/extra/server_1_grid.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# $Id: server_1_grid.rb,v 1.2 2006-03-15 04:40:47 matju Exp $
-
-require "socket"
-require "smpte" # in this folder
-
-picture = "\x7fGRID \000\003"
-picture << [240,320,3].pack("N*")
-make_smpte(picture) {|*rgb| rgb.pack "N*" }
-
-# File.open("blah.grid","w") {|f| f.write picture }
-
-serv = TCPServer.new 4242
-loop {
- puts "waiting for connection (port 4242)"
- sock = serv.accept
- puts "incoming connection"
- begin
- loop {
- sock.write picture
- puts "wrote one picture"
- }
- rescue Errno::EPIPE # Broken Pipe
- puts "connection closed (by client)"
- # it's ok, go back to waiting.
- end
-}
diff --git a/externals/gridflow/extra/server_1_ppm.rb b/externals/gridflow/extra/server_1_ppm.rb
deleted file mode 100644
index 5f2ec52e..00000000
--- a/externals/gridflow/extra/server_1_ppm.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# $Id: server_1_ppm.rb,v 1.2 2006-03-15 04:40:47 matju Exp $
-
-require "socket"
-
-picture = File.open("../images/teapot.ppm") {|x| x.read }
-
-serv = TCPServer.new 4242
-loop {
- puts "waiting for connection (port 4242)"
- sock = serv.accept
- begin
- loop {
- sock.write picture
- puts "wrote one picture"
- }
- rescue Errno::EPIPE # Broken Pipe
- puts "connection closed (by client)"
- # it's ok, go back to waiting.
- end
-}
diff --git a/externals/gridflow/extra/server_2.rb b/externals/gridflow/extra/server_2.rb
deleted file mode 100644
index 4807d502..00000000
--- a/externals/gridflow/extra/server_2.rb
+++ /dev/null
@@ -1,65 +0,0 @@
-# a server program to connect 2 or more clients together.
-# by Mathieu Bouchard
-
-require "fcntl"
-require "socket"
-
-class IO
- def nonblock=flag
- bit = Fcntl::O_NONBLOCK
- fcntl(Fcntl::F_SETFL, (fcntl(Fcntl::F_GETFL) & ~bit) |
- if flag then bit else 0 end)
- end
- # does not work with any ruby version, due to a bug. see below.
- def read_at_most n
- s=""
- k=1<<(Math.log(n)/Math.log(2)).to_i
- while k>0
- unless k+s.length>n
- puts "trying #{k}"
- (s << read(k)) rescue Errno::EWOULDBLOCK
- end
- k>>=1
- end
- s
- end
- # this one works but is slow.
- def bugfree_read_at_most n
- s=""
- (s << (read 1) while s.length<n) rescue Errno::EWOULDBLOCK
- s
- end
-end
-
-serv = TCPServer.new 4242
-socks = [serv]
-
-loop {
- puts "waiting for connection (port 4242)"
- begin
- loop {
- puts "waiting"
- ready,blah,crap = IO.select socks, [], socks, 1
- (ready||[]).each {|s|
- if s==serv then
- sock = serv.accept
- sock.nonblock=true
- socks << sock
- puts "incoming connection (total: #{socks.length-1})"
- else
- other = socks.find_all{|x|not TCPServer===x} - [s]
- stuff = s.bugfree_read_at_most 1024
- p stuff
- (s.close; socks.delete s) if not stuff or stuff.length==0
- other.each {|x|
- p x
- x.write stuff
- }
- end
- }
- }
- rescue Errno::EPIPE # Broken Pipe
- puts "connection closed (by client)"
- # it's ok, go back to waiting.
- end
-}
diff --git a/externals/gridflow/extra/smpte.rb b/externals/gridflow/extra/smpte.rb
deleted file mode 100644
index 6b568de2..00000000
--- a/externals/gridflow/extra/smpte.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# Copyright 2001 by Mathieu Bouchard
-# $Id: smpte.rb,v 1.2 2006-03-15 04:40:47 matju Exp $
-
-# The standard SMPTE color test pattern.
-# AS SEEN ON TV !!! (but this is a cheap plastic imitation)
-
-def make_smpte(picture="")
- row_1 = ""
- row_2 = ""
- row_3 = ""
- row_3_c = [[0,63,105],[255,255,255],[64,0,119]]
- (0...320).each {|x|
- n_barre_1 = 7 - x*7/320
- n_barre_2 = if n_barre_1&1==0 then 0 else 8 - n_barre_1 end
- row_1 << yield (*([1,2,0].map{|c| 255 * ((n_barre_1 >> c)&1) }))
- row_2 << yield (*([1,2,0].map{|c| 255 * ((n_barre_2 >> c)&1) }))
- row_3 << yield (*(row_3_c[x/57] || [0,0,0]))
- }
- 160.times { picture << row_1 }
- 20 .times { picture << row_2 }
- 60 .times { picture << row_3 }
- picture
-end
diff --git a/externals/gridflow/format/aalib.c b/externals/gridflow/format/aalib.c
deleted file mode 100644
index cf029dfe..00000000
--- a/externals/gridflow/format/aalib.c
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- $Id: aalib.c,v 1.2 2006-03-15 04:37:46 matju Exp $
-
- GridFlow
- Copyright (c) 2001,2002,2003 by Mathieu Bouchard
-
- 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.
-
- See file ../COPYING for further informations on licensing terms.
-
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include "../base/grid.h.fcs"
-#define aa_hardwareparams aa_hardware_params
-#include <aalib.h>
-
-/* MINNOR is a typo in aalib.h, sorry */
-typedef
-#if AA_LIB_MINNOR == 2
- int
-#else
- enum aa_attribute
-#endif
-AAAttr;
-
-\class FormatAALib < Format
-struct FormatAALib : Format {
- aa_context *context;
- aa_renderparams *rparams;
- int autodraw; /* as for X11 */
- bool raw_mode;
-
- FormatAALib () : context(0), autodraw(1) {}
-
- \decl void initialize (Symbol mode, Symbol target);
- \decl void close ();
- \decl void _0_hidecursor ();
- \decl void _0_print (int y, int x, int a, Symbol text);
- \decl void _0_draw ();
- \decl void _0_autodraw (int autodraw);
- \decl void _0_dump ();
- \grin 0 int
-};
-
-GRID_INLET(FormatAALib,0) {
- if (!context) RAISE("boo");
- if (in->dim->n != 3)
- RAISE("expecting 3 dimensions: rows,columns,channels");
- switch (in->dim->get(2)) {
- case 1: raw_mode = false; break;
- case 2: raw_mode = true; break;
- default:
- RAISE("expecting 1 greyscale channel (got %d)",in->dim->get(2));
- }
- in->set_factor(in->dim->get(1)*in->dim->get(2));
-} GRID_FLOW {
- int f = in->factor();
- if (raw_mode) {
- int sx = min(f,aa_scrwidth(context));
- int y = in->dex/f;
- while (n) {
- if (y>=aa_scrheight(context)) return;
- for (int x=0; x<sx; x++) {
- context->textbuffer[y*aa_scrwidth(context)+x]=data[x*2+0];
- context->attrbuffer[y*aa_scrwidth(context)+x]=data[x*2+1];
- }
- y++;
- n-=f;
- data+=f;
- }
- } else {
- int sx = min(f,context->imgwidth);
- int y = in->dex/f;
- while (n) {
- if (y>=context->imgheight) return;
- for (int x=0; x<sx; x++) aa_putpixel(context,x,y,data[x]);
- y++;
- n-=f;
- data+=f;
- }
- }
-} GRID_FINISH {
- if (!raw_mode) {
- aa_palette pal;
- for (int i=0; i<256; i++) aa_setpalette(pal,i,i,i,i);
- aa_renderpalette(context,pal,rparams,0,0,
- aa_scrwidth(context),aa_scrheight(context));
- }
- if (autodraw==1) aa_flush(context);
-} GRID_END
-
-\def void close () {
- if (context) {
- aa_close(context);
- context=0;
- }
-}
-
-\def void _0_hidecursor () { aa_hidemouse(context); }
-\def void _0_draw () { aa_flush(context); }
-\def void _0_print (int y, int x, int a, Symbol text) {
- aa_puts(context,x,y,(AAAttr)a,(char *)rb_sym_name(text));
- if (autodraw==1) aa_flush(context);
-}
-\def void _0_autodraw (int autodraw) {
- if (autodraw<0 || autodraw>1)
- RAISE("autodraw=%d is out of range",autodraw);
- this->autodraw = autodraw;
-}
-\def void _0_dump () {
- int32 v[] = {aa_scrheight(context), aa_scrwidth(context), 2};
- GridOutlet out(this,0,new Dim(3,v));
- for (int y=0; y<aa_scrheight(context); y++) {
- for (int x=0; x<aa_scrwidth(context); x++) {
- STACK_ARRAY(int32,data,2);
- data[0] = context->textbuffer[y*aa_scrwidth(context)+x];
- data[1] = context->attrbuffer[y*aa_scrwidth(context)+x];
- out.send(2,data);
- }
- }
-}
-
-/* !@#$ varargs missing here */
-\def void initialize (Symbol mode, Symbol target) {
- rb_call_super(argc,argv);
- argc-=2; argv+=2;
- char *argv2[argc];
- for (int i=0; i<argc; i++)
- argv2[i] = strdup(rb_str_ptr(rb_funcall(argv[i],SI(to_s),0)));
- if (mode!=SYM(out)) RAISE("write-only, sorry");
- aa_parseoptions(0,0,&argc,argv2);
- for (int i=0; i<argc; i++) free(argv2[i]);
- Ruby drivers = rb_ivar_get(rb_obj_class(rself),SI(@drivers));
- Ruby driver_address = rb_hash_aref(drivers,target);
- if (driver_address==Qnil)
- RAISE("unknown aalib driver '%s'",rb_sym_name(target));
- aa_driver *driver = FIX2PTR(aa_driver,driver_address);
- context = aa_init(driver,&aa_defparams,0);
- rparams = aa_getrenderparams();
- if (!context) RAISE("opening aalib didn't work");
- int32 v[]={context->imgheight,context->imgwidth,1};
- gfpost("aalib image size: %s",(new Dim(3,v))->to_s());
-}
-
-\classinfo {
- Ruby drivers = rb_ivar_set(rself,SI(@drivers),rb_hash_new());
- const aa_driver *const *p = aa_drivers;
- for (; *p; p++) {
- rb_hash_aset(drivers,ID2SYM(rb_intern((*p)->shortname)), PTR2FIX(*p));
- }
-// IEVAL(rself,"GridFlow.post('aalib supports: %s', @drivers.keys.join(', '))");
- IEVAL(rself,"install '#in:aalib',1,1;@flags=2;@comment='Ascii Art Library'");
-}
-\end class FormatAALib
-void startup_aalib () {
- \startall
-}
diff --git a/externals/gridflow/format/dc1394.c b/externals/gridflow/format/dc1394.c
deleted file mode 100644
index 5349c231..00000000
--- a/externals/gridflow/format/dc1394.c
+++ /dev/null
@@ -1,346 +0,0 @@
-/*
- $Id: dc1394.c,v 1.2 2006-03-15 04:37:46 matju Exp $
-
- GridFlow
- Copyright (c) 2001,2002,2003,2004 by Mathieu Bouchard
-
- 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.
-
- See file ../COPYING for further informations on licensing terms.
-
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include <libraw1394/raw1394.h>
-#include <libdc1394/dc1394_control.h>
-#include "../base/grid.h.fcs"
-
-typedef raw1394handle_t RH;
-typedef nodeid_t NID;
-
-static const int ruby_lineno = __LINE__;
-static const char *ruby_code =
-\ruby
-
-def choice(*)end
-class CStruct
- def initialize(*) end
-end
-
-choice :name,:Speed,:start,0,:values,%w(SPEED_100 SPEED_200 SPEED_400)
-choice :name,:Framerate,:start,32,:values,
-%w(FRAMERATE_1_875 FRAMERATE_3_75 FRAMERATE_7_5 FRAMERATE_15
- FRAMERATE_30 FRAMERATE_60)
-
-choice :name,:Format0Mode,:start,64,:values,%w(
- MODE_160x120_YUV444 MODE_320x240_YUV422
- MODE_640x480_YUV411 MODE_640x480_YUV422
- MODE_640x480_RGB MODE_640x480_MONO
- MODE_640x480_MONO16)
-
-choice :name,:Format1Mode,:start,96,:values,%w(
- MODE_800x600_YUV422 MODE_800x600_RGB
- MODE_800x600_MONO MODE_1024x768_YUV422
- MODE_1024x768_RGB MODE_1024x768_MONO
- MODE_800x600_MONO16 MODE_1024x768_MONO16)
-
-choice :name,:Format2Mode,:start,128,:values,%w(
- MODE_1280x960_YUV422 MODE_1280x960_RGB
- MODE_1280x960_MONO MODE_1600x1200_YUV422
- MODE_1600x1200_RGB MODE_1600x1200_MONO
- MODE_1280x960_MONO16 MODE_1600x1200_MONO16)
-
-choice :name,:Format6Mode,:start,256,:values,%w(MODE_EXIF)
-
-choice :name,:Format7Mode,:start,288,:values,%w(
- MODE_FORMAT7_0 MODE_FORMAT7_1 MODE_FORMAT7_2 MODE_FORMAT7_3
- MODE_FORMAT7_4 MODE_FORMAT7_5 MODE_FORMAT7_6 MODE_FORMAT7_7)
-
-choice :name,:Format7ColorMode,:start,320,:values,%w(
- COLOR_FORMAT7_MONO8 COLOR_FORMAT7_YUV411
- COLOR_FORMAT7_YUV422 COLOR_FORMAT7_YUV444
- COLOR_FORMAT7_RGB8 COLOR_FORMAT7_MONO16
- COLOR_FORMAT7_RGB16)
-
-choice :name,:TriggerMode,:start,352,:values,%w(
- TRIGGER_MODE_0 TRIGGER_MODE_1 TRIGGER_MODE_2 TRIGGER_MODE_3)
-
-choice :name,:CameraImageFormat,:start,384,:values,%w(
- FORMAT_VGA_NONCOMPRESSED FORMAT_SVGA_NONCOMPRESSED_1
- FORMAT_SVGA_NONCOMPRESSED_2 skip 3
- FORMAT_STILL_IMAGE FORMAT_SCALABLE_IMAGE_SIZE)
-
-choice :name,:CameraFeatures,:start,416,:values,%w(
- FEATURE_BRIGHTNESS FEATURE_EXPOSURE
- FEATURE_SHARPNESS FEATURE_WHITE_BALANCE
- FEATURE_HUE FEATURE_SATURATION
- FEATURE_GAMMA FEATURE_SHUTTER
- FEATURE_GAIN FEATURE_IRIS
- FEATURE_FOCUS FEATURE_TEMPERATURE
- FEATURE_TRIGGER skip 19
- FEATURE_ZOOM FEATURE_PAN
- FEATURE_TILT FEATURE_OPTICAL_FILTER
- skip 12 FEATURE_CAPTURE_SIZE
- FEATURE_CAPTURE_QUALITY skip 14)
-
-choice :name,:DCBool,:start,0,:values,%w(False True)
-
-#define MAX_CHARS 32
-#define SUCCESS 1
-#define FAILURE -1
-#define NO_CAMERA 0xffff
-
-# Parameter flags for setup_format7_capture()
-#define QUERY_FROM_CAMERA -1
-#define USE_MAX_AVAIL -2
-#define USE_RECOMMENDED -3
-
-# all dc1394_ prefixes removed
-# raw1394handle_t = RH
-# nodeid_t = NID
-# RH+NID = RN
-
-CameraInfo = CStruct.new %{
- RH rh;
- NID id;
- octlet_t ccr_offset;
- u_int64_t euid_64;
- char vendor[MAX_CHARS + 1];
- char model[MAX_CHARS + 1];
-}
-
-CameraCapture = CStruct.new %{
- NID node;
- int channel, frame_rate, frame_width, frame_height;
- int * capture_buffer;
- int quadlets_per_frame, quadlets_per_packet;
- const unsigned char * dma_ring_buffer;
- int dma_buffer_size, dma_frame_size, num_dma_buffers, dma_last_buffer;
- const char * dma_device_file;
- int dma_fd, port;
- struct timeval filltime;
- int dma_extra_count;
- unsigned char * dma_extra_buffer;
- int drop_frames;
-}
-
-MiscInfo = CStruct.new %{
- int format, mode, framerate;
- bool is_iso_on;
- int iso_channel, iso_speed, mem_channel_number;
- int save_channel, load_channel;
-}
-
-FeatureInfo = CStruct.new %{
- uint feature_id;
- bool available, one_push, readout_capable, on_off_capable;
- bool auto_capable, manual_capable, polarity_capable, one_push_active;
- bool is_on, auto_active;
- char trigger_mode_capable_mask;
- int trigger_mode;
- bool trigger_polarity;
- int min, max, value, BU_value, RV_value, target_value;
-}
-
-FeatureSet = CStruct.new %{
- FeatureInfo feature[NUM_FEATURES];
-}
-#void print_feature_set(FeatureSet *features);
-#extern const char *feature_desc[NUM_FEATURES];
-#void print_feature(FeatureInfo *feature);
-#RawFire create_handle(int port);
-#destroy_handle(RH rh);
-#void print_camera_info(camerainfo *info);
-
-class RH; %{
- # those two:
- # Return -1 in numCameras and NULL from the call if there is a problem
- # otherwise the number of cameras and the NID array from the call
- NID* get_camera_nodes(int *numCameras, int showCameras);
- NID* get_sorted_camera_nodes(int numids, int *ids, int *numCameras, int showCameras);
- release_camera(CameraCapture *camera);
- single_capture(CameraCapture *camera);
-# this one returns FAILURE or SUCCESS
- multi_capture(CameraCapture *cams, int num);
-}end
-
-class RN; %{
- init_camera();
- is_camera(bool *value);
- get_camera_feature_set(FeatureSetFeatureInfo *features);
- get_camera_feature(FeatureInfo *feature);
- get_camera_misc_info(miscinfo *info);
- get_sw_version(quadlet_t *value);
- get_camera_info(camerainfo *info);
- query_supported_formats(quadlet_t *value);
- query_supported_modes(uint format, quadlet_t *value);
- query_supported_framerates(uint format, uint mode, quadlet_t *value);
- query_revision(int mode, quadlet_t *value);
- query_basic_functionality(quadlet_t *value);
- query_advanced_feature_offset(quadlet_t *value);
- attr set_video_framerate(uint framerate);
- attr video_mode(uint mode);
- attr video_format(uint format);
- double_attr iso_channel_and_speed(uint channel, uint speed);
- camera_on();
- camera_off();
- start_iso_transmission();
- stop_iso_transmission();
- get_iso_status(bool *is_on);
- set_one_shot();
- unset_one_shot();
- set_multi_shot(uint numFrames);
- unset_multi_shot();
-# attributes :
-# those are get_/set_ methods where the get has an input parameter
-# and the set has an output parameter
- attr uint brightness
- attr uint exposure
- attr uint sharpness
- double_attr set_white_balance(uint u_b_value, uint v_r_value);
- attr uint hue
- attr uint saturation(uint saturation);
- attr uint gamma(uint gamma);
- attr shutter(uint shutter);
- attr uint gain
- attr uint iris
- attr uint focus
- attr uint trigger_mode
- attr uint zoom
- attr uint pan
- attr uint tilt
- attr uint optical_filter
- attr uint capture_size
- attr uint capture_quality
- int get_temperature(uint *target_temperature, uint *temperature);
- int set_temperature(uint target_temperature);
-
- get_memory_load_ch(uint *channel);
- get_memory_save_ch(uint *channel);
- is_memory_save_in_operation(bool *value);
- set_memory_save_ch(uint channel);
- memory_save();
- memory_load(uint channel);
- attr bool trigger_polarity
- trigger_has_polarity(bool *polarity);
- attr bool set_trigger_on_off
-
-# this one returns SUCCESS on success, FAILURE otherwise
- setup_capture(
- int channel, int format, int mode, int speed, int frame_rate,
- CameraCapture *camera);
- dma_setup_capture(
- int channel, int format, int mode, int speed, int frame_rate,
- int num_dma_buffers, int drop_frames, const char *dma_device_file,
- CameraCapture *camera);
- setup_format7_capture(
- int channel, int mode, int speed, int bytes_per_packet,
- uint left, uint top, uint width, uint height, CameraCapture *camera);
- dma_setup_format7_capture(
- int channel, int mode, int speed, int bytes_per_packet,
- uint left, uint top, uint width, uint height,
- int num_dma_buffers, CameraCapture *camera);
-}end
-
-#RNF = RN+uint feature
-class RNF; %{
- query_feature_control(uint *availability);
- query_feature_characteristics(quadlet_t *value);
- attr uint feature_value
- is_feature_present(bool *value);
- has_one_push_auto(bool *value);
- is_one_push_in_operation(bool *value);
- start_one_push_operation();
- can_read_out(bool *value);
- can_turn_on_off(bool *value);
- is_feature_on(bool *value);
- feature_on_off(uint value);
- has_auto_mode(bool *value);
- has_manual_mode(bool *value);
- is_feature_auto(bool *value);
- auto_on_off(uint value);
- get_min_value(uint *value);
- get_max_value(uint *value);
-}end
-
-# DMA Capture Functions
-#dma_release_camera(RH rh, CameraCapture *camera);
-#dma_unlisten(RH rh, CameraCapture *camera);
-#dma_single_capture(CameraCapture *camera);
-#dma_multi_capture(CameraCapture *cams,int num);
-#dma_done_with_buffer(CameraCapture * camera);
-
-# default return type is int, prolly means SUCCESS/FAILURE
-
-#RNM = RN+uint mode
-class RNM; %{
- query_format7_max_image_size(uint *horizontal_size, uint *vertical_size);
- query_format7_unit_size(uint *horizontal_unit, uint *vertical_unit);
- query_format7_color_coding(quadlet_t *value);
- query_format7_pixel_number(uint *pixnum);
- query_format7_total_bytes(uint *total_bytes);
- query_format7_packet_para(uint *min_bytes, uint *max_bytes);
- query_format7_recommended_byte_per_packet(uint *bpp);
- query_format7_packet_per_frame(uint *ppf);
- query_format7_unit_position(uint *horizontal_pos, uint *vertical_pos);
- # those were query/set pairs.
- double_qattr format7_image_position(uint left, uint top);
- double_qattr format7_image_size(uint width, uint height);
- qattr uint format7_color_coding_id
- qattr uint format7_byte_per_packet
- query_format7_value_setting(uint *present, uint *setting1, uint *err_flag1, uint *err_flag2);
- set_format7_value_setting(); //huh?
-}end
-
-\end ruby
-;
-
-\class FormatDC1394 < Format
-struct FormatDC1394 : Format {
- \decl void initialize (Symbol mode);
- \decl void frame ();
-};
-
-\def void initialize(Symbol mode) {
- gfpost("DC1394: hello world");
- RH rh = raw1394_new_handle();
- int numPorts = raw1394_get_port_info(rh,0,0);
- raw1394_destroy_handle(rh);
- gfpost("there are %d Feuerweuer ports",numPorts);
- if (mode!=SYM(in)) RAISE("sorry, read-only");
- for(int port=0; port<numPorts; port++) {
- gfpost("trying port #%d...",port);
- RH rh = dc1394_create_handle(port);
- int numCameras=0xDEADBEEF;
- NID *nodes = dc1394_get_camera_nodes(rh,&numCameras,0);
- gfpost("port #%d has %d cameras",port,numCameras);
- for (int i=0; i<numCameras; i++) gfpost("camera at node #%d",nodes[i]);
- // I'm stuck here, can't find that iSight camera. -- matju
- }
- dc1394_destroy_handle(rh);
-}
-
-\def void frame () {
- gfpost("i'd like to get a frame from the cam, but how?");
-}
-
-\classinfo {
- IEVAL(rself,"install '#io:dc1394',1,1;@flags=4;@comment='Video4linux 1.x'");
- //IEVAL(rself,ruby_code);
- rb_funcall(rself,SI(instance_eval),3,rb_str_new2(ruby_code),
- rb_str_new2(__FILE__),INT2NUM(ruby_lineno+3));
-}
-\end class FormatDC1394
-void startup_dc1394 () {
- \startall
-}
diff --git a/externals/gridflow/format/jpeg.c b/externals/gridflow/format/jpeg.c
deleted file mode 100644
index 4363be52..00000000
--- a/externals/gridflow/format/jpeg.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- $Id: jpeg.c,v 1.2 2006-03-15 04:37:46 matju Exp $
-
- GridFlow
- Copyright (c) 2001,2002,2003,2004 by Mathieu Bouchard
-
- 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.
-
- See file ../COPYING for further informations on licensing terms.
-
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-//!@#$ not handling abort on compress
-//!@#$ not handling abort on decompress
-
-#include "../base/grid.h.fcs"
-/* removing macros (removing warnings) */
-#undef HAVE_PROTOTYPES
-#undef HAVE_STDLIB_H
-#undef EXTERN
-extern "C" {
-#include <jpeglib.h>
-};
-
-\class FormatJPEG < Format
-struct FormatJPEG : Format {
- P<BitPacking> bit_packing;
- struct jpeg_compress_struct cjpeg;
- struct jpeg_decompress_struct djpeg;
- struct jpeg_error_mgr jerr;
- int fd;
- FILE *f;
- \decl Ruby frame ();
- \decl void quality (short quality);
- \decl void initialize (Symbol mode, Symbol source, String filename);
- \grin 0 int
-};
-
-GRID_INLET(FormatJPEG,0) {
- if (in->dim->n != 3)
- RAISE("expecting 3 dimensions: rows,columns,channels");
- if (in->dim->get(2) != 3)
- RAISE("expecting 3 channels (got %d)",in->dim->get(2));
- in->set_factor(in->dim->get(1)*in->dim->get(2));
- cjpeg.err = jpeg_std_error(&jerr);
- jpeg_create_compress(&cjpeg);
- jpeg_stdio_dest(&cjpeg,f);
- cjpeg.image_width = in->dim->get(1);
- cjpeg.image_height = in->dim->get(0);
- cjpeg.input_components = 3;
- cjpeg.in_color_space = JCS_RGB;
- jpeg_set_defaults(&cjpeg);
- jpeg_start_compress(&cjpeg,TRUE);
-} GRID_FLOW {
- int rowsize = in->dim->get(1)*in->dim->get(2);
- int rowsize2 = in->dim->get(1)*3;
- uint8 row[rowsize2];
- uint8 *rows[1] = { row };
- while (n) {
- bit_packing->pack(in->dim->get(1),data,Pt<uint8>(row,rowsize));
- jpeg_write_scanlines(&cjpeg,rows,1);
- n-=rowsize; data+=rowsize;
- }
-} GRID_FINISH {
- jpeg_finish_compress(&cjpeg);
- jpeg_destroy_compress(&cjpeg);
-} GRID_END
-
-static bool gfeof(FILE *f) {
- off_t cur,end;
- cur = ftell(f);
- fseek(f,0,SEEK_END);
- end = ftell(f);
- fseek(f,cur,SEEK_SET);
- return cur==end;
-}
-
-\def Ruby frame () {
- off_t off = NUM2LONG(rb_funcall(rb_ivar_get(rself,SI(@stream)),SI(tell),0));
- fseek(f,off,SEEK_SET);
- if (gfeof(f)) return Qfalse;
- djpeg.err = jpeg_std_error(&jerr);
- jpeg_create_decompress(&djpeg);
- jpeg_stdio_src(&djpeg,f);
- jpeg_read_header(&djpeg,TRUE);
- int sx=djpeg.image_width, sy=djpeg.image_height, chans=djpeg.num_components;
- GridOutlet out(this,0,new Dim(sy, sx, chans),
- NumberTypeE_find(rb_ivar_get(rself,SI(@cast))));
- jpeg_start_decompress(&djpeg);
- uint8 row[sx*chans];
- uint8 *rows[1] = { row };
- for (int n=0; n<sy; n++) {
- jpeg_read_scanlines(&djpeg,rows,1);
- out.send(sx*chans,Pt<uint8>(row,sx*chans));
- }
- jpeg_finish_decompress(&djpeg);
- jpeg_destroy_decompress(&djpeg);
- return Qnil;
-}
-
-\def void quality (short quality) {
- quality = min(max((int)quality,0),100);
- // should the last arg ("baseline") be set to true ?
- // and what is it for? is it for accuracy of the DC component?
- jpeg_set_quality(&cjpeg,quality,false);
-}
-
-\def void initialize (Symbol mode, Symbol source, String filename) {
- rb_call_super(argc,argv);
- if (source!=SYM(file)) RAISE("usage: jpeg file <filename>");
- rb_funcall(rself,SI(raw_open),3,mode,source,filename);
- Ruby stream = rb_ivar_get(rself,SI(@stream));
- fd = NUM2INT(rb_funcall(stream,SI(fileno),0));
- f = fdopen(fd,mode==SYM(in)?"r":"w");
- uint32 mask[3] = {0x0000ff,0x00ff00,0xff0000};
- bit_packing = new BitPacking(is_le(),3,3,mask);
-}
-
-\classinfo {
- IEVAL(rself,
- "install '#io:jpeg',1,1;@mode=6;"
- "include GridFlow::EventIO; suffixes_are'jpeg','jpg'");
-}
-\end class FormatJPEG
-void startup_jpeg () {
- \startall
-}
diff --git a/externals/gridflow/format/main.rb b/externals/gridflow/format/main.rb
deleted file mode 100644
index 1cac124f..00000000
--- a/externals/gridflow/format/main.rb
+++ /dev/null
@@ -1,807 +0,0 @@
-=begin
- $Id: main.rb,v 1.2 2006-03-15 04:37:46 matju Exp $
-
- GridFlow
- Copyright (c) 2001,2002,2003,2004 by Mathieu Bouchard
-
- 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.
-
- See file ../COPYING for further informations on licensing terms.
-
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-=end
-
-require "socket"
-require "fcntl"
-
-module GridFlow
-
-class<<self
- def max_rank; 16; end
- def max_size; 64*1024**2; end
- def max_packet; 1024*2; end
-end
-
-ENDIAN_BIG,ENDIAN_LITTLE,ENDIAN_SAME,ENDIAN_DIFF = 0,1,2,3
-
-OurByteOrder = case [1].pack("L")
- when "\0\0\0\1"; ENDIAN_BIG # Mac, Sun, SiliconGraphics
- when "\1\0\0\0"; ENDIAN_LITTLE # Intel
- else raise "Cannot determine byte order" end
-
-class Format < GridObject
- FF_R,FF_W = 4,2 # flags indicating support of :in and :out respectively.
- attr_accessor :parent
-=begin API (version 0.8)
- mode is :in or :out
- def initialize(mode,*args) :
- open a file handler (do it via .new of class)
- attr_reader :description :
- a _literal_ (constant) string describing the format handler
- def self.info() optional :
- return a string describing the format handler differently
- than self.description(). in particular, it can list
- compile-time options and similar things. for example,
- quicktime returns a list of codecs.
- def frame() :
- read one frame, send through outlet 0
- return values :
- Integer >= 0 : frame number of frame read.
- false : no frame was read : end of sequence.
- nil : a frame was read, but can't say its number.
- note that trying to read a nonexistent frame should no longer
- rewind automatically (@in handles that part), nor re-read the
- last frame (mpeg/quicktime used to do this)
- def seek(Integer i) : select one frame to be read next (by number)
- def length() : ^Integer returns number of frames (never implemented ?)
- def close() : close a handler
- inlet 0 :
- grid : frame to write
- other : special options
- outlet 0 : grid : frame just read
- outlet 1 : everything else
-=end
-
- def initialize(mode,*)
- super
- @cast = :int32
- @colorspace = :rgb
- @mode = mode
- @frame = 0
- @parent = nil
- @stream = nil
- flags = self.class.instance_eval{if defined?@flags then @flags else 6 end}
- # FF_W, FF_R, FF_RW
- case mode
- when :in; flags[2]==1
- when :out; flags[1]==1
- else raise "Format opening mode is incorrect"
- end or raise \
- "Format '#{self.class.instance_eval{@symbol_name}}'"\
- " does not support mode '#{mode}'"
- end
-
- def close
- @stream.close if defined? @stream and @stream
- end
-
- def self.suffixes_are(*suffixes)
- suffixes.map{|s|s.split(/[, ]/)}.flatten.each {|suffix|
- Format.suffixes[suffix] = self
- }
- end
-
- class<<self
- attr_reader :symbol_name
- attr_reader :description
- attr_reader :flags
- attr_reader :suffixes
- end
- @suffixes = {}
- def seek frame
- (rewind; return) if frame == 0
- raise "don't know how to seek for frame other than # 0"
- end
-
- # this is what you should use to rewind
- # different file-sources may redefine this as something else
- # (eg: gzip)
- def rewind
- raise "Nothing to rewind about..." if not @stream
- @stream.seek 0,IO::SEEK_SET
- @frame = 0
- end
-
- # This is different from IO#eof, which waits until a read has failed
- # doesn't work in nonblocking mode? (I don't recall why)
- def eof?
- thispos = (@stream.seek 0,IO::SEEK_CUR; @stream.tell)
- lastpos = (@stream.seek 0,IO::SEEK_END; @stream.tell)
- @stream.seek thispos,IO::SEEK_SET
- return thispos == lastpos
- rescue Errno::ESPIPE # just ignore if seek is not possible
- return false
- end
-
- # "ideal" buffer size or something
- # the buffer may be bigger than this but usually not by much.
- def self.buffersize; 16384 end
-
- def _0_headerless(*args) #!@#$ goes in FormatGrid ?
- args=args[0] if Array===args[0]
- #raise "expecting dimension list..."
- args.map! {|a|
- Numeric===a or raise "expecting dimension list..."
- a.to_i
- }
- @headerless = args
- end
- def _0_headerful #!@#$ goes in FormatGrid ?
- @headerless = nil
- end
- def _0_type arg
- #!@#$ goes in FormatGrid ?
- #!@#$ bug: should not be able to modify this _during_ a transfer
- case arg
- when :uint8; @bpv=8; @bp=BitPacking.new(ENDIAN_LITTLE,1,[0xff])
- when :int16; @bpv=16; @bp=BitPacking.new(ENDIAN_LITTLE,1,[0xffff])
- when :int32; @bpv=32; @bp=nil
- else raise "unsupported number type: #{arg}"
- end
- end
- def _0_cast arg
- case arg
- when :uint8, :int16, :int32, :int64, :float32, :float64
- @cast = arg
- else raise "unsupported number type: #{arg}"
- end
- end
- def frame; @frame+=1; @frame-1 end
-end
-
-# common parts between GridIn and GridOut
-module GridIO
- def check_file_open; if not @format then raise "can't do that: file not open" end end
- def _0_close; check_file_open; @format.close; @format = nil end
- def delete; @format.close if @format; @format = nil; super end
- attr_reader :format
-
- def _0_open(sym,*a)
- sym = sym.intern if String===sym
- if a.length==0 and /\./ =~ sym.to_s then a=[sym]; sym=:file end
- qlass = GridFlow.fclasses["\#io:#{sym}"]
- if not qlass then raise "unknown file format identifier: #{sym}" end
- _0_close if @format
- @format = qlass.new @mode, *a
- @format.connect 0,self,1
- @format.connect 1,self,2
- @format.parent = self
- @loop = true
- end
-
- def _0_timelog flag; @timelog = Integer(flag)!=0 end
- def _0_loop flag; @loop = Integer(flag)!=0 end
- def method_missing(*message)
- sel = message[0].to_s
- if sel =~ /^_0_/
- message[0] = sel.sub(/^_0_/,"").intern
- @format.send_in 0, *message
- elsif sel =~ /^_2_/
- sel = sel.sub(/^_2_/,"").intern
- message.shift
- send_out 1, sel, *message
- else
- return super
- end
- end
-end
-
-GridObject.subclass("#in",1,2) {
- install_rgrid 0
- include GridIO
- def initialize(*a)
- super
- @format = nil
- @timelog = false
- @framecount = 0
- @time = Time.new
- @mode = :in
- return if a.length==0
- _0_open(*a)
- end
- def _0_bang
- check_file_open
- framenum = @format.frame
- if framenum == false
- send_out 1
- return if not @loop
- @format.seek 0
- framenum = @format.frame
- if framenum == false
- raise "can't read frame: the end is at the beginning???"
- end
- end
- send_out 1, framenum if framenum
- end
- def _0_float frame; _0_set frame; _0_bang end
- def _0_set frame; check_file_open; @format.seek frame end
- def _0_reset; check_file_open; @format.seek 0; end
- def _1_grid(*a) send_out 0,:grid,*a end
- def _0_load(*a); _0_open(*a); _0_bang; _0_close end
-}
-
-GridObject.subclass("#out",1,1) {
- include GridIO
- def initialize(*a)
- super
- @format = nil
- @timelog = false
- @framecount = 0
- @time = Time.new
- @mode = :out
- return if a.length==0
- if Integer===a[0] or Float===a[0]
- _0_open :x11,:here
- _0_out_size a[0],a[1]
- else
- _0_open(*a)
- end
- end
-
- def _0_list(*a) @format._0_list(*a) end
-
- # hacks
- def _1_grid(*a) send_out 0,:grid,*a end # for aalib
- def _1_position(*a) send_out 0,:position,*a end
- def _1_keypress(*a) send_out 0,:keypress,*a end
- def _1_keyrelease(*a) send_out 0,:keyrelease,*a end
-
- def _0_grid(*a)
- check_file_open
- @format._0_grid(*a)
- send_out 0,:bang
- log if @timelog
- @framecount+=1
- end
-
- def log
- time = Time.new
- post("\#out: frame#%04d time: %10.3f s; diff: %5d ms",
- @framecount, time, ((time-@time)*1000).to_i)
- @time = time
- end
- install_rgrid 0
-}
-
-class BitPacking
- alias pack pack2
- alias unpack unpack2
-end
-
-# adding event-driven IO to a Format class
-module EventIO
- def read_wait?; !!@action; end
-
- def initialize(*)
- @acceptor = nil
- @buffer = nil
- @action = nil
- @chunksize = nil
- @rewind_redefined = false
- @clock = Clock.new self
- @delay = 100 # ms
- super
- end
-
- def call() try_read end
-
- def on_read(n,&action)
- @action = action
- @chunksize = n
- end
-
- def try_accept
- #!@#$ use setsockopt(SO_REUSEADDR) here???
- TCPSocket.do_not_reverse_lookup = true # hack
- @acceptor.nonblock = true
- @stream = @acceptor.accept
- @stream.nonblock = true
- @stream.sync = true
- @clock.unset
-# send_out 0, :accept # does not work
- rescue Errno::EAGAIN
- end
-
- def try_read(dummy=nil)
- n = @chunksize-(if @buffer then @buffer.length else 0 end)
- t = @stream.read(n) # or raise EOFError
- if not t
- raise "heck" if not @stream.eof?
- rewind
- t = @stream.read(n) or raise "can't read any of #{n} bytes?"
- end
- if @buffer then @buffer << t else @buffer = t end
- if @buffer.length == @chunksize
- action,buffer = @action,@buffer
- @action,@buffer = nil,""
- @clock.unset
- action.call buffer
- end
- rescue Errno::EAGAIN
- post "read would block"
- end
-
- def raw_open_gzip_in(filename)
- r,w = IO.pipe
- if pid=fork
- GridFlow.subprocesses[pid]=true
- w.close
- @stream = r
- else
- r.close
- STDOUT.reopen w
- STDIN.reopen filename, "r"
- exec "gzip", "-dc"
- end
- end
- def raw_open_gzip_out(filename)
- r,w = IO.pipe
- if pid=fork
- GridFlow.subprocesses[pid]=true
- r.close
- @stream = w
- else
- w.close
- STDIN.reopen r
- STDOUT.reopen filename, "w"
- exec "gzip", "-c"
- end
- end
- def raw_open(mode,source,*args)
- @raw_open_args = mode,source,*args
- fmode = case mode
- when :in; "r"
- when :out; "w"
- else raise "bad mode" end
- @stream.close if @stream
- case source
- when :file
- filename = args[0].to_s
- filename = GridFlow.find_file filename if mode==:in
- @stream = File.open filename, fmode
- when :gzfile
- filename = args[0].to_s
- filename = GridFlow.find_file filename if mode==:in
- if mode==:in then
- raw_open_gzip_in filename
- else
- raw_open_gzip_out filename
- end
- def self.rewind
- raw_open(*@raw_open_args)
- @frame = 0
- end unless @rewind_redefined
- @rewind_redefined = true
- when :tcp
- if RUBY_VERSION < "1.6.6"
- raise "use at least 1.6.6 (reason: bug in socket code)"
- end
- post "-----------"
- time = Time.new
- TCPSocket.do_not_reverse_lookup = true # hack
- @stream = TCPSocket.open(args[0].to_s,args[1].to_i)
- post "----------- #{Time.new-time}"
- @stream.nonblock = true
- @stream.sync = true
- @clock.delay @delay
- when :tcpserver
- TCPSocket.do_not_reverse_lookup = true # hack
- TCPServer.do_not_reverse_lookup = true # hack
- post "-----------"
- time = Time.new
- @acceptor = TCPServer.open(args[0].to_s)
- post "----------- #{Time.new-time}"
- @acceptor.nonblock = true
- #$tasks[self] = proc {self.try_accept} #!!!!!
- else
- raise "unknown access method '#{source}'"
- end
- end
- def close
- @acceptor.close if @acceptor
- @stream.close if @stream
- GridFlow.hunt_zombies
- end
-end
-
-Format.subclass("#io:file",1,1) {
- def self.new(mode,file)
- file=file.to_s
- a = [mode,:file,file]
- if not /\./=~file then raise "no filename suffix?" end
- suf=file.split(/\./)[-1]
- h=Format.suffixes[suf]
- if not h then raise "unknown suffix '.#{suf}'" end
- h.new(*a)
- end
- @comment="format autodetection proxy"
-}
-
-Format.subclass("#io:grid",1,1) {
- include EventIO
- install_rgrid 0
- @comment = "GridFlow file format"
- suffixes_are "grid"
-=begin
- This is the Grid format I defined:
- 1 uint8: 0x7f
- 4 uint8: "GRID" big endian | "grid" little endian
- 1 uint8: type {
- number of bits in 8,16,32,64, plus one of: 1:unsigned 2:float
- but float8,float16 are not allowed (!)
- }
- 1 uint8: reserved (supported: 0)
- 1 uint8: number of dimensions N (supported: at least 0..4)
- N uint32: number of elements per dimension D[0]..D[N-1]
- raw data goes there.
-=end
- # bits per value: 32 only
- attr_accessor :bpv # Fixnum: bits-per-value
- # endianness
- # attr_accessor :endian # ENDIAN_LITTLE or ENDIAN_BIG
- # IO or File or TCPSocket
- attr_reader :stream
- # nil=headerful; array=assumed dimensions of received grids
- #attr_accessor :headerless
-
- def initialize(mode,source,*args)
- super
- @bpv = 32
- @headerless = nil
- @endian = OurByteOrder
- raw_open mode,source,*args
- end
-
- def post(*s)
- # because i'm using miller_0_38 and it can't disable the console
- # i am using fprintf stderr instead of post.
- ### STDERR.puts(sprintf(*s))
- # disabled because i don't need it now
- end
-
- # rewinding and starting
- def frame
- raise "can't get frame when there is no connection" if not @stream
- raise "already waiting for input" if read_wait?
- return false if eof?
- post "----- 1"
- if @headerless then
- @n_dim=@headerless.length
- @dim = @headerless
- @dex = 0
- set_bufsize
- send_out_grid_begin 0, @dim
- on_read(bufsize) {|data| frame3 data }
- else
- on_read(8) {|data| frame1 data }
- end
- post "----- 2"
- (try_read nil while read_wait?) if not TCPSocket===@stream
- post "----- 3"
- super
- post "----- 4"
- end
-
- def set_bufsize
- @prod = 1
- @dim.each {|x| @prod *= x }
- n = @prod/@dim[0]
- k = GridFlow.max_packet / n
- k=1 if k<1
- @bufsize = k*n*@bpv/8
- @bufsize = @prod if @bufsize > @prod
- end
-
- # the header
- def frame1 data
- post "----- frame1"
- head,@bpv,reserved,@n_dim = data.unpack "a5ccc"
- @endian = case head
- when "\x7fGRID"; ENDIAN_BIG
- when "\x7fgrid"; ENDIAN_LITTLE
- else raise "grid header: invalid (#{data.inspect})" end
- case bpv
- when 8, 16, 32; # ok
- else raise "unsupported bpv (#{@bpv})"
- end
- if reserved!=0
- raise "reserved field is not zero"
- end
- if @n_dim > GridFlow.max_rank
- raise "too many dimensions (#{@n_dim})"
- end
- on_read(4*@n_dim) {|data| frame2 data }
- end
-
- # the dimension list
- def frame2 data
- post "----- frame2"
- @dim = data.unpack(if @endian==ENDIAN_LITTLE then "V*" else "N*" end)
- set_bufsize
- if @prod > GridFlow.max_size
- raise "dimension list: invalid prod (#{@prod})"
- end
- send_out_grid_begin 0, @dim, @cast
-
- on_read(bufsize) {|data| frame3 data }
- @dex = 0
- end
-
- attr_reader :bufsize
-
- # for each slice of the body
- def frame3 data
- post "----- frame3 with dex=#{@dex.inspect}, prod=#{@prod.inspect}"
- n = data.length
- nn = n*8/@bpv
- # is/was there a problem with the size of the data being read?
- case @bpv
- when 8
- @bp = BitPacking.new(@endian,1,[0xff])
- send_out_grid_flow(0, @bp.unpack(data))
- @dex += data.length
- when 16
- @bp = BitPacking.new(@endian,2,[0xffff])
- send_out_grid_flow(0, @bp.unpack(data))
- @dex += data.length/2
- when 32
- data.swap32! if @endian!=OurByteOrder
- send_out_grid_flow 0, data
- @dex += data.length/4
- end
- if @dex >= @prod
- @clock.unset
- else
- on_read(bufsize) {|data| frame3 data }
- end
- end
-
- def _0_rgrid_begin
- if not @stream
- raise "can't send frame when there is no connection"
- end
- @dim = inlet_dim 0
- post "@dim=#{@dim.inspect}"
- return if @headerless
- # header
- @stream.write(
- [if @endian==ENDIAN_LITTLE then "\x7fgrid" else "\x7fGRID" end,
- @bpv,0,@dim.length].pack("a5ccc"))
- # dimension list
- @stream.write(
- @dim.to_a.pack(if @endian==ENDIAN_LITTLE then "V*" else "N*" end))
- end
-
- def _0_rgrid_flow data
- case @bpv
- when 8, 16
- @stream.write @bp.pack(data)
- when 32
- data.swap32! if GridFlow::OurByteOrder != @endian
- @stream.write data
- end
- end
-
- def _0_rgrid_end; @stream.flush end
-
- def endian(a)
- @endian = case a
- when :little; ENDIAN_LITTLE
- when :big; ENDIAN_BIG
- when :same; ENDIAN_SAME
- else raise "argh"
- end
- end
-
- def headerless(*args)
- args=args[0] if Array===args[0]
- args.map! {|a|
- Numeric===a or raise "expecting dimension list..."
- a.to_i
- }
- @headerless = args
- end
-
- def headerful; @headerless = nil end
-
- #!@#$ method name conflict ?
- def type(nt)
- #!@#$ bug: should not be able to modify this _during_ a transfer
- case nt
- when :uint8; @bpv= 8; @bp=BitPacking.new(ENDIAN_LITTLE,1,[0xff])
- when :int16; @bpv=16; @bp=BitPacking.new(ENDIAN_LITTLE,1,[0xffff])
- when :int32; @bpv=32; @bp=nil
- else raise "unsupported number type"
- end
- end
-}
-
-module PPMandTarga
- # "and false" disables features that may cause crashes and don't
- # accelerate gridflow that much.
- def frame_read_body height, width, channels
- bs = width*channels
- n = bs*height
- bs = (self.class.buffersize/bs)*bs+bs # smallest multiple of bs over BufferSize
- buf = ""
- if RUBY_VERSION >= "1.8.0" and false
- data = "x"*bs # must preallocate (bug in 1.8.0.pre1-3)
- while n>0 do
- bs=n if bs>n
- @stream.read(bs,data) or raise EOFError
- if @bp then
- send_out_grid_flow 0, @bp.unpack(data,buf)
- else
- send_out_grid_flow 0, data, :uint8
- end
- n-=bs
- end
- else
- nothing = ""
- while n>0 do
- bs=n if bs>n
- data = @stream.read(bs) or raise EOFError
- if @bp then
- send_out_grid_flow 0, @bp.unpack(data,buf)
- else
- send_out_grid_flow 0, data, :uint8
- end
- data.replace nothing and false # prevent clogging memory
- n-=bs
- end
- end
- end
-end
-
-Format.subclass("#io:ppm",1,1) {
- install_rgrid 0
- @comment = "Portable PixMap (PPM) File Format"
- suffixes_are "ppm"
- include EventIO, PPMandTarga
-
- def initialize(mode,source,*args)
- @bp = if mode==:out
- BitPacking.new(ENDIAN_LITTLE,3,[0x0000ff,0x00ff00,0xff0000])
- else nil end
- super
- raw_open mode,source,*args
- end
- def frame
- #@stream.sync = false
- metrics=[]
- return false if eof?
- line = @stream.gets
- (rewind; line = @stream.gets) if not line # hack
- line.chomp!
- if line != "P6" then raise "Wrong format (needing PPM P6)" end
- while metrics.length<3
- line = @stream.gets
- next if line =~ /^#/
- metrics.push(*(line.split(/\s+/).map{|x| Integer x }))
- end
- metrics[2]==255 or
- raise "Wrong color depth (max_value=#{metrics[2]} instead of 255)"
-
- send_out_grid_begin 0, [metrics[1], metrics[0], 3], @cast
- frame_read_body metrics[1], metrics[0], 3
- super
- end
-
- def _0_rgrid_begin
- dim = inlet_dim 0
- raise "expecting (rows,columns,channels)" if dim.length!=3
- raise "expecting channels=3" if dim[2]!=3
- @stream.write "P6\n"
- @stream.write "# generated using GridFlow #{GF_VERSION}\n"
- @stream.write "#{dim[1]} #{dim[0]}\n255\n"
- @stream.flush
- inlet_set_factor 0, 3
- end
- def _0_rgrid_flow(data) @stream.write @bp.pack(data) end
- def _0_rgrid_end; @stream.flush end
- self
-}.subclass("#io:tk",1,1) {
- install_rgrid 0
- def initialize(mode)
- if mode!=:out then raise "only #out" end
- super(mode,:file,"/tmp/tk-#{$$}-#{object_id}.ppm")
- GridFlow.gui "toplevel .#{object_id}\n"
- GridFlow.gui "wm title . GridFlow/Tk\n"
- GridFlow.gui "image create photo #{object_id} -width 320 -height 240\n"
- GridFlow.gui "pack [label .#{object_id}.im -image #{object_id}]\n"
- end
- def _0_rgrid_end
- super
- @stream.seek 0,IO::SEEK_SET
- GridFlow.gui "image create photo #{object_id} -file /tmp/tk-#{$$}-#{object_id}.ppm\n"
- end
- def delete
- GridFlow.gui "destroy .#{object_id}\n"
- GridFlow.gui "image delete #{object_id}\n"
- end
- alias close delete
-}
-
-Format.subclass("#io:targa",1,1) {
- install_rgrid 0
- @comment = "TrueVision Targa"
- suffixes_are "tga"
- include EventIO, PPMandTarga
-=begin
-targa header is like:
- [:comment, Uint8, :length],
- [:colortype, Uint8],
- [:colors, Uint8], 5,
- [:origin_x, Int16],
- [:origin_y, Int16],
- [:w, Uint16],
- [:h, Uint16],
- [:depth, Uint8], 1,
- [:comment, String8Unpadded, :data],
-=end
- def initialize(mode,source,*args)
- super
- raw_open mode,source,*args
- end
-
- def set_bitpacking depth
- @bp = case depth
- #!@#$ endian here doesn't seem to be changing much ?
- when 24; BitPacking.new(ENDIAN_LITTLE,3,[0xff0000,0x00ff00,0x0000ff])
- when 32; BitPacking.new(ENDIAN_LITTLE,4,
- [0x00ff0000,0x0000ff00,0x000000ff,0xff000000])
- else
- raise "tga: unsupported colour depth: #{depth}\n"
- end
- end
-
- def frame
- return false if eof?
- head = @stream.read(18)
- comment_length,colortype,colors,w,h,depth = head.unpack("cccx9vvcx")
- comment = @stream.read(comment_length)
- raise "unsupported color format: #{colors}" if colors != 2
-# post "tga: size y=#{h} x=#{w} depth=#{depth} colortype=#{colortype}"
-# post "tga: comment: \"#{comment}\""
- set_bitpacking depth
- send_out_grid_begin 0, [ h, w, depth/8 ], @cast
- frame_read_body h, w, depth/8
- super
- end
-
- def _0_rgrid_begin
- dim = inlet_dim 0
- raise "expecting (rows,columns,channels)" if dim.length!=3
- raise "expecting channels=3 or 4" if dim[2]!=3 and dim[2]!=4
- # comment = "created using GridFlow"
- #!@#$ why did i use that comment again?
- comment = "generated using GridFlow #{GF_VERSION}"
- @stream.write [comment.length,colortype=0,colors=2,"\0"*9,
- dim[1],dim[0],8*dim[2],(8*(dim[2]-3))|32,comment].pack("ccca9vvcca*")
- set_bitpacking 8*dim[2]
- inlet_set_factor 0, dim[2]
- end
- def _0_rgrid_flow data; @stream.write @bp.pack(data) end
- def _0_rgrid_end; @stream.flush end
-}
-end # module GridFlow
diff --git a/externals/gridflow/format/mpeg3.c b/externals/gridflow/format/mpeg3.c
deleted file mode 100644
index c2b85192..00000000
--- a/externals/gridflow/format/mpeg3.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- $Id: mpeg3.c,v 1.2 2006-03-15 04:37:46 matju Exp $
-
- GridFlow
- Copyright (c) 2001,2002,2003 by Mathieu Bouchard
-
- 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.
-
- See file ../COPYING for further informations on licensing terms.
-
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#define LIBMPEG_INCLUDE_HERE
-#include "../base/grid.h.fcs"
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-
-\class FormatMPEG3 < Format
-struct FormatMPEG3 : Format {
- mpeg3_t *mpeg;
- P<BitPacking> bit_packing;
- int track;
- FormatMPEG3 () : track(0) {}
- \decl void initialize (Symbol mode, Symbol source, String filename);
- \decl void seek (int frame);
- \decl Ruby frame ();
- \decl void close ();
-};
-
-\def void seek (int frame) { mpeg3_set_frame(mpeg,frame,track); }
-
-\def Ruby frame () {
- int nframe = mpeg3_get_frame(mpeg,track);
- if (nframe >= mpeg3_video_frames(mpeg,track)) return Qfalse;
-
- int sx = mpeg3_video_width(mpeg,track);
- int sy = mpeg3_video_height(mpeg,track);
- int npixels = sx*sy;
- int channels = 3;
- Pt<uint8> buf = ARRAY_NEW(uint8,sy*sx*channels+16);
- uint8 *rows[sy];
- for (int i=0; i<sy; i++) rows[i]=buf+i*sx*channels;
- int result = mpeg3_read_frame(mpeg,rows,0,0,sx,sy,sx,sy,MPEG3_RGB888,track);
-
- GridOutlet out(this,0,new Dim(sy, sx, channels),
- NumberTypeE_find(rb_ivar_get(rself,SI(@cast))));
- int bs = out.dim->prod(1);
- STACK_ARRAY(int32,b2,bs);
- for(int y=0; y<sy; y++) {
- Pt<uint8> row = buf+channels*sx*y;
- /* bit_packing->unpack(sx,row,b2); out.send(bs,b2); */
- out.send(bs,row);
- }
- delete[] (uint8 *)buf;
- return INT2NUM(nframe);
-}
-
-\def void close () {
-// fprintf(stderr, "begin mpeg3_close...\n");
- if (mpeg) { mpeg3_close(mpeg); mpeg=0; }
- rb_call_super(argc,argv);
-// fprintf(stderr, "end mpeg3_close...\n");
-}
-
-// libmpeg3 may be nice, but it won't take a filehandle, only filename
-\def void initialize (Symbol mode, Symbol source, String filename) {
- rb_call_super(argc,argv);
- if (mode!=SYM(in)) RAISE("read-only, sorry");
- if (source!=SYM(file)) RAISE("usage: mpeg file <filename>");
- if (TYPE(filename)!=T_STRING) RAISE("PATATE POILUE");
- filename = rb_funcall(mGridFlow,SI(find_file),1,filename);
- mpeg = mpeg3_open(rb_str_ptr(filename));
- if (!mpeg) RAISE("IO Error: can't open file `%s': %s", filename, strerror(errno));
- uint32 mask[3] = {0x0000ff,0x00ff00,0xff0000};
- bit_packing = new BitPacking(is_le(),3,3,mask);
-}
-
-\classinfo {
- IEVAL(rself,"install '#io:mpeg',1,1;@flags=4;"
- "@comment='Motion Picture Expert Group Format"
- " (using HeroineWarrior\\'s)';suffixes_are'mpg,mpeg'");
-}
-\end class FormatMPEG3
-void startup_mpeg3 () {
- \startall
-}
diff --git a/externals/gridflow/format/opengl.c b/externals/gridflow/format/opengl.c
deleted file mode 100644
index 39979f68..00000000
--- a/externals/gridflow/format/opengl.c
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- $Id: opengl.c,v 1.1 2006-03-15 04:54:54 matju Exp $
-
- GridFlow
- Copyright (c) 2001,2002,2003,2004,2005 by Mathieu Bouchard
-
- 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.
-
- See file ../COPYING for further informations on licensing terms.
-
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include "../base/grid.h.fcs"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <sys/time.h>
-#include <signal.h>
-#ifdef MACOSX
-#include <OpenGL/gl.h>
-#include <OpenGL/glu.h>
-#else
-#include <GL/gl.h>
-#include <GL/glu.h>
-#include <GL/glut.h>
-#endif
-#include <setjmp.h>
-
-static bool in_use = false;
-
-\class FormatOpenGL < Format
-struct FormatOpenGL : Format {
- int window;
- GLuint gltex;
- P<BitPacking> bit_packing;
- P<Dim> dim;
- Pt<uint8> buf;
- \decl void call ();
- \decl void initialize (Symbol mode);
- \decl void close ();
- \decl void resize_window (int sx, int sy);
- \grin 0
-};
-
-static jmp_buf hack;
-static void my_idle () { longjmp(hack,1); }
-
-\def void call () {
- int32 sy = dim->get(0);
- int32 sx = dim->get(1);
- glEnable(GL_TEXTURE_2D);
- if (!gltex) {
- }
- glTexSubImage2D(GL_TEXTURE_2D,0,0,0,sx,sy,GL_RGBA,GL_UNSIGNED_BYTE,buf);
- glBindTexture(GL_TEXTURE_2D, gltex);
- glBegin(GL_QUADS);
- glColor3f(1.f,1.f,1.f);
- glTexCoord2f(0.f,0.f); glVertex2f(0.f,0.f);
- glTexCoord2f(1.f,0.f); glVertex2f( sx,0.f);
- glTexCoord2f(1.f,1.f); glVertex2f( sx, sy);
- glTexCoord2f(0.f,1.f); glVertex2f(0.f, sy);
- glEnd();
-
- //Here comes some (un)fair amount of arm-twisting
- //This is for processing queued events and then "returning".
- glutIdleFunc(my_idle);
- if(!setjmp(hack)) glutMainLoop();
- //done
-
- IEVAL(rself,"@clock.delay 100");
-}
-
-\def void resize_window (int sx, int sy) {L
- dim = new Dim(sy,sx,3);
- char foo[666];
- sprintf(foo,"GridFlow/GL (%d,%d,3)",sy,sx);
- if ((unsigned)window==0xDeadBeef) {
- glutInitWindowSize(sx,sy);
- window = glutCreateWindow(foo);
- } else {
- glutReshapeWindow(sx,sy);
- }
- if (buf) delete buf.p;
- buf = ARRAY_NEW(uint8,sy*sx*4);
- glViewport(0,0,sx,sy);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(0,sx,sy,0,-99999,99999);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
-
- if (gltex) glDeleteTextures(1, (GLuint*)&gltex);
- glGenTextures(1, (GLuint*)&gltex);
- glBindTexture(GL_TEXTURE_2D,gltex);
- glPixelStorei(GL_UNPACK_ALIGNMENT,1);
- glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_CLAMP);
- glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP);
- glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
- glTexEnvf(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_MODULATE);
- glTexImage2D(GL_TEXTURE_2D,0,GL_RGBA,sx,sy,0,GL_RGBA,GL_UNSIGNED_BYTE,NULL);
-
-}
-
-GRID_INLET(FormatOpenGL,0) {
- if (in->dim->n != 3)
- RAISE("expecting 3 dimensions: rows,columns,channels");
- if (in->dim->get(2) != 3)
- RAISE("expecting 3 channels: red,green,blue (got %d)",in->dim->get(2));
- int sxc = in->dim->prod(1);
- int sx = in->dim->get(1), osx = dim->get(1);
- int sy = in->dim->get(0), osy = dim->get(0);
- in->set_factor(sxc);
- if (sx!=osx || sy!=osy) resize_window(0,0,sx,sy);
-} GRID_FLOW {
- int sxc = in->dim->prod(1);
- int sx = in->dim->get(1);
- int bypl = 4*sx;
- int y = in->dex / sxc;
- assert((in->dex % sxc) == 0);
- assert((n % sxc) == 0);
- for (; n>0; y++, data+=sxc, n-=sxc) bit_packing->pack(sx, data, buf+y*bypl);
- } GRID_FINISH {
-} GRID_END
-
-\def void close () {
- IEVAL(rself,"@clock.unset");
- if (gltex) glDeleteTextures(1, (GLuint*)&gltex);
- if (buf) delete buf.p;
- in_use=false;
- if ((unsigned)window!=0xDeadBeef) {
- glutDestroyWindow(window);
- window=0xDeadBeef;
- }
-}
-
-\def void initialize (Symbol mode) {
- rb_call_super(argc,argv);
- if (in_use) RAISE("only one #io:opengl object at a time; sorry");
- in_use=true;
- if (mode!=SYM(out)) RAISE("write-only, sorry");
- gltex = 0;
- glEnable(GL_TEXTURE_2D);
- glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST);
- glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
- glClear(GL_COLOR_BUFFER_BIT);
- glDisable(GL_ALPHA_TEST);
- glDisable(GL_CULL_FACE);
- glDisable(GL_DITHER);
- glDisable(GL_DEPTH_TEST);
- glDisable(GL_LIGHTING);
- window = 0xDeadBeef;
- int dummy = 0;
- glutInit(&dummy,0);
- glutInitDisplayMode(GLUT_RGBA);
- resize_window(0,0,320,240);
- uint32 mask[3] = {0xff000000,0x00ff0000,0x0000ff00};
- bit_packing = new BitPacking(4,4,3,mask);
- IEVAL(rself,"@clock = Clock.new self; @clock.delay 0");
- gfpost("@clock = Clock.new self");
-}
-
-\classinfo {
- IEVAL(rself,"install '#io:opengl',1,1;@comment='Silicon Graphics OpenGL'");
-}
-\end class FormatOpenGL
-void startup_opengl () {
- \startall
-} \ No newline at end of file
diff --git a/externals/gridflow/format/png.c b/externals/gridflow/format/png.c
deleted file mode 100644
index 5db0c254..00000000
--- a/externals/gridflow/format/png.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- $Id: png.c,v 1.2 2006-03-15 04:37:46 matju Exp $
-
- GridFlow
- Copyright (c) 2001,2002,2003,2004 by Mathieu Bouchard
-
- 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.
-
- See file ../COPYING for further informations on licensing terms.
-
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-/* !@#$ not handling abort on compress */
-/* !@#$ not handling abort on decompress */
-
-#include "../base/grid.h.fcs"
-extern "C" {
-#include <libpng12/png.h>
-};
-
-\class FormatPNG < Format
-struct FormatPNG : Format {
- P<BitPacking> bit_packing;
- png_structp png;
- png_infop info;
- int fd;
- FILE *f;
- FormatPNG () : bit_packing(0), png(0), f(0) {}
- \decl Ruby frame ();
- \decl void initialize (Symbol mode, Symbol source, String filename);
- \grin 0 int
-};
-
-GRID_INLET(FormatPNG,0) {
- if (in->dim->n != 3)
- RAISE("expecting 3 dimensions: rows,columns,channels");
- if (in->dim->get(2) != 3)
- RAISE("expecting 3 channels (got %d)",in->dim->get(2));
- in->set_factor(in->dim->get(1)*in->dim->get(2));
- RAISE("bother, said pooh, as the PNG encoding was found unimplemented");
-} GRID_FLOW {
- int rowsize = in->dim->get(1)*in->dim->get(2);
- int rowsize2 = in->dim->get(1)*3;
- uint8 row[rowsize2];
- while (n) {
- bit_packing->pack(in->dim->get(1),data,Pt<uint8>(row,rowsize));
- n-=rowsize; data+=rowsize;
- }
-} GRID_FINISH {
-} GRID_END
-
-\def Ruby frame () {
- uint8 sig[8];
- if (!fread(sig, 1, 8, f)) return Qfalse;
- if (!png_check_sig(sig, 8)) RAISE("bad signature");
- png = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
- if (!png) RAISE("!png");
- info = png_create_info_struct(png);
- if (!info) {
- png_destroy_read_struct(&png, NULL, NULL); RAISE("!info");
- }
- if (setjmp(png_jmpbuf(png))) {
- png_destroy_read_struct(&png, &info, NULL); RAISE("png read error");
- }
- png_init_io(png, f);
- png_set_sig_bytes(png, 8); // we already read the 8 signature bytes
- png_read_info(png, info); // read all PNG info up to image data
- png_uint_32 width, height;
- int bit_depth, color_type;
- png_get_IHDR(png, info, &width, &height, &bit_depth, &color_type, 0,0,0);
-
- png_bytepp row_pointers = 0;
- if (color_type == PNG_COLOR_TYPE_PALETTE
- || (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
- || png_get_valid(png, info, PNG_INFO_tRNS))
- png_set_expand(png);
- // 16bpp y, 32bpp ya, 48bpp rgb, 64bpp rgba...
- if (bit_depth == 16) png_set_strip_16(png);
-
- double display_gamma = 2.2;
- double gamma;
- if (png_get_gAMA(png, info, &gamma))
- png_set_gamma(png, display_gamma, gamma);
- png_read_update_info(png, info);
-
- int rowbytes = png_get_rowbytes(png, info);
- int channels = (int)png_get_channels(png, info);
- Pt<uint8> image_data = ARRAY_NEW(uint8,rowbytes*height);
- row_pointers = new png_bytep[height];
- //gfpost("png: color_type=%d channels=%d, width=%d, rowbytes=%ld, height=%ld, gamma=%f",
- // color_type, channels, width, rowbytes, height, gamma);
- for (int i=0; i<(int)height; i++) row_pointers[i] = image_data + i*rowbytes;
- if ((uint32)rowbytes != width*channels)
- RAISE("rowbytes mismatch: %d is not %d*%d=%d",
- rowbytes, width, channels, width*channels);
- png_read_image(png, row_pointers);
- delete row_pointers;
- row_pointers = 0;
- png_read_end(png, 0);
-
- GridOutlet out(this,0,new Dim(height, width, channels),
- NumberTypeE_find(rb_ivar_get(rself,SI(@cast))));
- out.send(rowbytes*height,image_data);
- free(image_data);
- png_destroy_read_struct(&png, &info, NULL);
- return Qnil;
-}
-
-\def void initialize (Symbol mode, Symbol source, String filename) {
- rb_call_super(argc,argv);
- if (source!=SYM(file)) RAISE("usage: png file <filename>");
- rb_funcall(rself,SI(raw_open),3,mode,source,filename);
- Ruby stream = rb_ivar_get(rself,SI(@stream));
- fd = NUM2INT(rb_funcall(stream,SI(fileno),0));
- f = fdopen(fd,mode==SYM(in)?"r":"w");
- uint32 mask[3] = {0x0000ff,0x00ff00,0xff0000};
- bit_packing = new BitPacking(is_le(),3,3,mask);
-}
-
-\classinfo {
- IEVAL(rself,
- "install '#io:png',1,1;@mode=4;include GridFlow::EventIO; suffixes_are'png'");
-}
-\end class FormatPNG
-void startup_png () {
- \startall
-}
diff --git a/externals/gridflow/format/quartz.m b/externals/gridflow/format/quartz.m
deleted file mode 100644
index 9cb00078..00000000
--- a/externals/gridflow/format/quartz.m
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- $Id: quartz.m,v 1.2 2006-03-15 04:37:46 matju Exp $
-
- GridFlow
- Copyright (c) 2001,2002,2003 by Mathieu Bouchard
-
- 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.
-
- See file ../COPYING for further informations on licensing terms.
-
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-/*
- This is written in Objective C++, which is the union of C++ and Objective C;
- Their intersection is C or almost. They add quite different sets of features.
- I need Objective C here because the Cocoa API is for Objective C and Java only,
- and the Objective C one was the easiest to integrate in GridFlow.
-
- The next best possibility may be using RubyCocoa, a port of the Cocoa API to Ruby;
- However I haven't checked whether Quartz is wrapped, and how easy it is to
- process images.
-*/
-
-#include <stdio.h>
-#include <objc/Object.h>
-
-/* wrapping name conflict */
-#define T_DATA T_COCOA_DATA
-#include <Cocoa/Cocoa.h>
-#undef T_DATA
-
-#include "../base/grid.h.fcs"
-
-@interface GFView: NSView {
- Pt<uint8> imdata;
- int imwidth;
- int imheight;
-}
-- (id) drawRect: (NSRect)rect;
-- (id) imageHeight: (int)w width: (int)h;
-- (uint8 *) imageData;
-- (int) imageDataSize;
-@end
-
-@implementation GFView
-
-- (uint8 *) imageData { return imdata; }
-- (int) imageDataSize { return imwidth*imheight*4; }
-
-- (id) imageHeight: (int)h width: (int)w {
- if (imheight==h && imwidth==w) return self;
- gfpost("new size: y=%d x=%d",h,w);
- imheight=h;
- imwidth=w;
- if (imdata) delete imdata.p;
- int size = [self imageDataSize];
- imdata = ARRAY_NEW(uint8,size);
- uint8 *p = imdata;
- CLEAR(imdata,size);
- NSSize s = {w,h};
- [[self window] setContentSize: s];
- return self;
-}
-
-- (id) initWithFrame: (NSRect)r {
- [super initWithFrame: r];
- imdata=Pt<uint8>(); imwidth=-1; imheight=-1;
- [self imageHeight: 240 width: 320];
- return self;
-}
-
-- (id) drawRect: (NSRect)rect {
- [super drawRect: rect];
- if (![self lockFocusIfCanDraw]) return self;
- CGContextRef g = (CGContextRef)
- [[NSGraphicsContext graphicsContextWithWindow: [self window]]
- graphicsPort];
- CGColorSpaceRef cs = CGColorSpaceCreateDeviceRGB();
- CGDataProviderRef dp = CGDataProviderCreateWithData(
- NULL, imdata, imheight*imwidth*4, NULL);
- CGImageRef image = CGImageCreate(imwidth, imheight, 8, 32, imwidth*4,
- cs, kCGImageAlphaFirst, dp, NULL, 0, kCGRenderingIntentDefault);
- CGDataProviderRelease(dp);
- CGColorSpaceRelease(cs);
- CGRect rectangle = CGRectMake(0,0,imwidth,imheight);
- CGContextDrawImage(g,rectangle,image);
- CGImageRelease(image);
- [self unlockFocus];
- return self;
-}
-@end
-
-/* workaround: bus error in gcc */
-Pt<uint8> GFView_imageData(GFView *self) {
- return Pt<uint8>([self imageData], [self imageDataSize]);
-}
-void GFView_imageHeight_width(GFView *self, int height, int width) {
- [self imageHeight: height width: width];
-}
-
-void GFView_display(GFView *self) {
- NSRect r = {{0,0},{self->imheight,self->imwidth}};
- [self displayRect: r];
- [self setNeedsDisplay: YES];
- [self display];
-}
-
-\class FormatQuartz < Format
-struct FormatQuartz : Format {
- NSWindow *window;
- NSWindowController *wc;
- GFView *widget; /* GridFlow's Cocoa widget */
- NSDate *distantFuture;
- \decl void initialize (Symbol mode);
- \decl void delete_m ();
- \decl void close ();
- \decl void call ();
- \grin 0
-};
-
-static NSDate *distantFuture, *distantPast;
-
-\def void call() {
- NSEvent *e = [NSApp nextEventMatchingMask: NSAnyEventMask
- // untilDate: distantFuture // blocking
- untilDate: distantPast // nonblocking
- inMode: NSDefaultRunLoopMode
- dequeue: YES];
- if (e) {
- NSLog(@"%@", e);
- [NSApp sendEvent: e];
- }
- [NSApp updateWindows];
- [this->window flushWindowIfNeeded];
- IEVAL(rself,"@clock.delay 20");
-}
-
-template <class T, class S>
-static void convert_number_type(int n, Pt<T> out, Pt<S> in) {
- for (int i=0; i<n; i++) out[i]=(T)in[i];
-}
-
-GRID_INLET(FormatQuartz,0) {
- if (in->dim->n!=3) RAISE("expecting 3 dims, not %d", in->dim->n);
- int c=in->dim->get(2);
- if (c!=3&&c!=4) RAISE("expecting 3 or 4 channels, not %d", in->dim->get(2));
-// [widget imageHeight: in->dim->get(0) width: in->dim->get(1) ];
- GFView_imageHeight_width(widget,in->dim->get(0),in->dim->get(1));
- in->set_factor(in->dim->prod(1));
-} GRID_FLOW {
- int off = in->dex/in->dim->prod(2);
- int c=in->dim->get(2);
- NSView *w = widget;
- Pt<uint8> data2 = GFView_imageData(w)+off*4;
-// convert_number_type(n,data2,data);
- if (c==3) {
- while(n) {
- data2[0]=255;
- data2[1]=data[0];
- data2[2]=data[1];
- data2[3]=data[2];
- data+=3; data2+=4; n-=3;
- }
- } else {
- while(n) {
- data2[0]=255;
- data2[1]=data[0];
- data2[2]=data[1];
- data2[3]=data[2];
- data+=4; data2+=4; n-=4;
- }
- }
-} GRID_FINISH {
- GFView_display(widget);
-} GRID_END
-
-\def void initialize (Symbol mode) {
- rb_call_super(argc,argv);
- NSRect r = {{0,0}, {320,240}};
- window = [[NSWindow alloc]
- initWithContentRect: r
- styleMask: NSTitledWindowMask | NSMiniaturizableWindowMask | NSClosableWindowMask
- backing: NSBackingStoreBuffered
- defer: YES
- ];
- widget = [[GFView alloc] initWithFrame: r];
- [window setContentView: widget];
- [window setTitle: @"GridFlow"];
- [window makeKeyAndOrderFront: NSApp];
- [window orderFrontRegardless];
- wc = [[NSWindowController alloc]
- initWithWindow: window];
- IEVAL(rself,"@clock = Clock.new self");
- [window makeFirstResponder: widget];
- gfpost("mainWindow = %08lx",(long)[NSApp mainWindow]);
- gfpost(" keyWindow = %08lx",(long)[NSApp keyWindow]);
- NSColor *color = [NSColor clearColor];
- [window setBackgroundColor: color];
-}
-
-\def void delete_m () {
- [window autorelease];
-}
-
-\def void close () {
- IEVAL(rself,"@clock.unset");
- rb_call_super(argc,argv);
- [window autorelease];
- [window setReleasedWhenClosed: YES];
- [window close];
-}
-
-\classinfo {
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- distantFuture = [NSDate distantFuture];
- distantPast = [NSDate distantPast];
- [NSApplication sharedApplication];
- IEVAL(rself,
-\ruby
- install '#io:quartz',1,1
- @comment = "Apple Quartz/Cocoa"
- @flags = 2
-\end ruby
-);}
-
-\end class FormatQuartz
-void startup_quartz () {
- \startall
-}
-
diff --git a/externals/gridflow/format/quicktimeapple.c b/externals/gridflow/format/quicktimeapple.c
deleted file mode 100644
index 2a485424..00000000
--- a/externals/gridflow/format/quicktimeapple.c
+++ /dev/null
@@ -1,500 +0,0 @@
-/*
- $Id: quicktimeapple.c,v 1.2 2006-03-15 04:37:46 matju Exp $
-
- GridFlow
- Copyright (c) 2001,2002,2003,2004 by Mathieu Bouchard
-
- 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.
-
- See file ../COPYING for further informations on licensing terms.
-
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#define T_DATA T_COCOA_DATA
-#include <Quicktime/Quicktime.h>
-#include <Quicktime/Movies.h>
-#include <Quicktime/QuickTimeComponents.h>
-#undef T_DATA
-#include "../base/grid.h.fcs"
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <CoreServices/CoreServices.h>
-
-typedef ComponentInstance VideoDigitizerComponent, VDC;
-typedef ComponentResult VideoDigitizerError, VDE;
-
-//enum {VDCType='vdig', vdigInterfaceRev=2 };
-//enum {ntscIn=0, currentIn=0, palIn, secamIn, ntscReallyIn };
-//enum {compositeIn, sVideoIn, rgbComponentIn, rgbComponentSyncIn, yuvComponentIn, yuvComponentSyncIn, tvTunerIn, sdiIn};
-//enum {vdPlayThruOff, vdPlayThruOn};
-//enum {vdDigitizerBW, vdDigitizerRGB};
-//enum {vdBroadcastMode, vdVTRMode};
-//enum {vdUseAnyField, vdUseOddField, vdUseEvenField};
-//enum {vdTypeBasic, vdTypeAlpha, vdTypeMask, vdTypeKey};
-/*enum {digiInDoesNTSC, digiInDoesPAL, digiInDoesSECAM, skip 4,
- digiInDoesGenLock, digiInDoesComposite, digiInDoesSVideo, digiInDoesComponent,
- digiInVTR_Broadcast, digiInDoesColor, digiInDoesBW, skip 17,
- digiInSignalLock};*/
-/*bitset {digiOutDoes1, digiOutDoes2, digiOutDoes4,
- digiOutDoes8, digiOutDoes16, digiOutDoes32,
- digiOutDoesDither, digiOutDoesStretch, digiOutDoesShrink,
- digiOutDoesMask, skip 1,
- digiOutDoesDouble, digiOutDoesQuad, digiOutDoesQuarter, digiOutDoesSixteenth,
- digiOutDoesRotate, digiOutDoesHorizFlip, digiOutDoesVertFlip, digiOutDoesSkew,
- digiOutDoesBlend, digiOutDoesWarp, digiOutDoesHW_DMA,
- digiOutDoesHWPlayThru, digiOutDoesILUT, digiOutDoesKeyColor,
- digiOutDoesAsyncGrabs, digiOutDoesUnreadableScreenBits,
- digiOutDoesCompress, digiOutDoesCompressOnly,
- digiOutDoesPlayThruDuringCompress, digiOutDoesCompressPartiallyVisible,
- digiOutDoesNotNeedCopyOfCompressData};*/
-/*struct DigitizerInfo {
- short vdigType;
- long inputCapabilityFlags, outputCapabilityFlags;
- long inputCurrentFlags, outputCurrentFlags;
- short slot;
- GDHandle gdh, maskgdh;
- short minDestHeight, minDestWidth;
- short maxDestHeight, maxDestWidth;
- short blendLevels;
- long reserved;};*/
-/*struct VdigType { long digType, reserved;};*/
-/*struct VdigTypeList { short count; VdigType list[1];};*/
-/*struct VdigBufferRec { PixMapHandle dest; Point location; long reserved;};*/
-/*struct VdigBufferRecList {
- short count; MatrixRecordPtr matrix; RgnHandle mask; VdigBufferRec list[1];};*/
-//typedef VdigBufferRecList *VdigBufferRecListPtr;
-//typedef VdigBufferRecListPtr *VdigBufferRecListHandle;
-//typedef CALLBACK_API(void,VdigIntProcPtr)(long flags, long refcon);
-//typedef STACK_UPP_TYPE(VdigIntProcPtr);
-/*struct VDCompressionList {
- CodecComponent codec; CodecType cType; Str63 typeName, name;
- long formatFlags, compressFlags, reserved;};*/
-//typedef VDCompressionList * VDCompressionListPtr;
-//typedef VDCompressionListPtr *VDCompressionListHandle;
-/*bitset {
- dmaDepth1, dmaDepth2, dmaDepth4, dmaDepth8, dmaDepth16, dmaDepth32,
- dmaDepth2Gray, dmaDepth4Gray, dmaDepth8Gray};*/
-//enum {kVDIGControlledFrameRate=-1};
-//bitset {vdDeviceFlagShowInputsAsDevices, vdDeviceFlagHideDevice};
-/*bitset {
- vdFlagCaptureStarting, vdFlagCaptureStopping,
- vdFlagCaptureIsForPreview, vdFlagCaptureIsForRecord,
- vdFlagCaptureLowLatency, vdFlagCaptureAlwaysUseTimeBase,
- vdFlagCaptureSetSettingsBegin, vdFlagCaptureSetSettingsEnd};*/
-/*\class VDC
-VDE VDGetMaxSrcRect (short inputStd, Rect *maxSrcRect)
-VDE VDGetActiveSrcRect(short inputStd, Rect *activeSrcRect)
-VDE VD[GS]etDigitizerRect(Rect *digitizerRect)
-VDE VDGetVBlankRect(short inputStd, Rect *vBlankRect)
-VDE VDGetMaskPixMap(PixMapHandlemaskPixMap)
-VDE VDGetPlayThruDestination(PixMapHandle * dest, Rect *destRect, MatrixRecord * m, RgnHandle *mask)
-VDE VDUseThisCLUT(CTabHandle colorTableHandle)
-VDE VD[SG*]etInputGammaValue(Fixed channel1, Fixed channel2, Fixed channel3)
-VDE VD[GS]etBrightness(uint16 *)
-VDE VD[GS]etContrast(uint16 *)
-VDE VD[GS]etHue(uint16 *)
-VDE VD[GS]etSharpness(uint16 *)
-VDE VD[GS]etSaturation(uint16 *)
-VDE VDGrabOneFrame(VDC ci)
-VDE VDGetMaxAuxBuffer(PixMapHandle *pm, Rect *r)
-VDE VDGetDigitizerInfo(DigitizerInfo *info)
-VDE VDGetCurrentFlags(long *inputCurrentFlag, long *outputCurrentFlag)
-VDE VD[SG*]etKeyColor(long index)
-VDE VDAddKeyColor(long *index)
-VDE VDGetNextKeyColor(long index)
-VDE VD[GS]etKeyColorRange(RGBColor minRGB, RGBColor maxRGB)
-VDE VDSetDigitizerUserInterrupt(long flags, VdigIntUPP userInterruptProc, long refcon)
-VDE VD[SG*]etInputColorSpaceMode(short colorSpaceMode)
-VDE VD[SG*]etClipState(short clipEnable)
-VDE VDSetClipRgn(RgnHandle clipRegion)
-VDE VDClearClipRgn(RgnHandle clipRegion)
-VDE VDGetCLUTInUse(CTabHandle *colorTableHandle)
-VDE VD[SG*]etPLLFilterType(short pllType)
-VDE VDGetMaskandValue(uint16 blendLevel, long *mask, long *value)
-VDE VDSetMasterBlendLevel(uint16 *blendLevel)
-VDE VDSetPlayThruDestination(PixMapHandledest, RectPtr destRect, MatrixRecordPtr m, RgnHandle mask)
-VDE VDSetPlayThruOnOff(short state)
-VDE VD[SG*]etFieldPreference(short fieldFlag)
-VDE VDPreflightDestination(Rect *digitizerRect, PixMap **dest, RectPtr destRect, MatrixRecordPtr m)
-VDE VDPreflightGlobalRect(GrafPtr theWindow, Rect *globalRect)
-VDE VDSetPlayThruGlobalRect(GrafPtr theWindow, Rect *globalRect)
-VDE VDSetInputGammaRecord(VDGamRecPtrinputGammaPtr)
-VDE VDGetInputGammaRecord(VDGamRecPtr *inputGammaPtr)
-VDE VD[SG]etBlackLevelValue(uint16 *)
-VDE VD[SG]etWhiteLevelValue(uint16 *)
-VDE VDGetVideoDefaults(uint16 *blackLevel, uint16 *whiteLevel, uint16 *brightness, uint16 *hue, uint16 *saturation, uint16 *contrast, uint16 *sharpness)
-VDE VDGetNumberOfInputs(short *inputs)
-VDE VDGetInputFormat(short input, short *format)
-VDE VD[SG*]etInput(short input)
-VDE VDSetInputStandard(short inputStandard)
-VDE VDSetupBuffers(VdigBufferRecListHandle bufferList)
-VDE VDGrabOneFrameAsync(short buffer)
-VDE VDDone(short buffer)
-VDE VDSetCompression(OSTypecompressType, short depth, Rect *bounds, CodecQspatialQuality, CodecQtemporalQuality, long keyFrameRate)
-VDE VDCompressOneFrameAsync(VDC ci)
-VDE VDCompressDone(UInt8 *queuedFrameCount, Ptr *theData, long *dataSize, UInt8 *similarity, TimeRecord *t)
-VDE VDReleaseCompressBuffer(Ptr bufferAddr)
-VDE VDGetImageDescription(ImageDescriptionHandle desc)
-VDE VDResetCompressSequence(VDC ci)
-VDE VDSetCompressionOnOff(Boolean)
-VDE VDGetCompressionTypes(VDCompressionListHandle h)
-VDE VDSetTimeBase(TimeBase t)
-VDE VDSetFrameRate(Fixed framesPerSecond)
-VDE VDGetDataRate(long *milliSecPerFrame, Fixed *framesPerSecond, long *bytesPerSecond)
-VDE VDGetSoundInputDriver(Str255 soundDriverName)
-VDE VDGetDMADepths(long *depthArray, long *preferredDepth)
-VDE VDGetPreferredTimeScale(TimeScale *preferred)
-VDE VDReleaseAsyncBuffers(VDC ci)
-VDE VDSetDataRate(long bytesPerSecond)
-VDE VDGetTimeCode(TimeRecord *atTime, void *timeCodeFormat, void *timeCodeTime)
-VDE VDUseSafeBuffers(Boolean useSafeBuffers)
-VDE VDGetSoundInputSource(long videoInput, long *soundInput)
-VDE VDGetCompressionTime(OSTypecompressionType, short depth, Rect *srcRect, CodecQ *spatialQuality, CodecQ *temporalQuality, ulong *compressTime)
-VDE VDSetPreferredPacketSize(long preferredPacketSizeInBytes)
-VDE VD[SG*]etPreferredImageDimensions(long width, long height)
-VDE VDGetInputName(long videoInput, Str255 name)
-VDE VDSetDestinationPort(CGrafPtr destPort)
-VDE VDGetDeviceNameAndFlags(Str255 outName, UInt32 *outNameFlags)
-VDE VDCaptureStateChanging(UInt32inStateFlags)
-VDE VDGetUniqueIDs(UInt64 *outDeviceID, UInt64 *outInputID)
-VDE VDSelectUniqueIDs(const UInt64 *inDeviceID, const UInt64 *inInputID)
-\end class VDC
-*/
-
-\class FormatQuickTimeCamera < Format
-struct FormatQuickTimeCamera : Format {
- P<Dim> dim;
- Pt<uint8> buf;
- VDC vdc;
- int m_newFrame;
- SeqGrabComponent m_sg;
- SGChannel m_vc;
- short m_pixelDepth;
- Rect rect;
- GWorldPtr m_srcGWorld;
- PixMapHandle m_pixMap;
- Ptr m_baseAddr;
- long m_rowBytes;
- int m_quality;
-//int m_colorspace;
- FormatQuickTimeCamera() : vdc(0) {}
- \decl void initialize (Symbol mode, Symbol source, String filename);
- \decl void frame ();
- \decl void close ();
- \grin 0 int
-};
-
-// /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Components.h
-
-static int nn(int c) {return c?c:' ';}
-
-\def void initialize (Symbol mode, Symbol source, String filename) {
- L
-//vdc = SGGetVideoDigitizerComponent(c);
- rb_call_super(argc,argv);
- dim = new Dim(240,320,4);
- OSErr e;
- rect.top=rect.left=0;
- rect.bottom=dim->v[0]; rect.right=dim->v[1];
- int n=0;
- Component c = 0;
- ComponentDescription cd;
- cd.componentType = SeqGrabComponentType;
- cd.componentSubType = 0;
- cd.componentManufacturer = 0;
- cd.componentFlags = 0;
- cd.componentFlagsMask = 0;
- for(;;) {
- c = FindNextComponent(c, &cd);
- if (!c) break;
- ComponentDescription cd2;
- Ptr name=0,info=0,icon=0;
- GetComponentInfo(c,&cd2,&name,&info,&icon);
- gfpost("Component #%d",n);
- char *t = (char *)&cd.componentType;
- gfpost(" type='%c%c%c%c'",nn(t[3]),nn(t[2]),nn(t[1]),nn(t[0]));
- t = (char *)&cd.componentSubType;
- gfpost(" subtype='%c%c%c%c'",nn(t[3]),nn(t[2]),nn(t[1]),nn(t[0]));
- gfpost(" name=%08x, *name='%*s'",name, *name, name+1);
- gfpost(" info=%08x, *info='%*s'",info, *name, info+1);
- n++;
- }
- gfpost("number of components: %d",n);
- m_sg = OpenDefaultComponent(SeqGrabComponentType, 0);
- if(!m_sg) RAISE("could not open default component");
- e=SGInitialize(m_sg);
- if(e!=noErr) RAISE("could not initialize SG");
- e=SGSetDataRef(m_sg, 0, 0, seqGrabDontMakeMovie);
- if (e!=noErr) RAISE("dataref failed");
- e=SGNewChannel(m_sg, VideoMediaType, &m_vc);
- if(e!=noErr) gfpost("could not make new SG channel");
- e=SGSetChannelBounds(m_vc, &rect);
- if(e!=noErr) gfpost("could not set SG ChannelBounds");
- e=SGSetChannelUsage(m_vc, seqGrabPreview);
- if(e!=noErr) gfpost("could not set SG ChannelUsage");
-// m_rowBytes = m_vidXSize*4;
- switch (3) {
- case 0: e=SGSetChannelPlayFlags(m_vc, channelPlayNormal); break;
- case 1: e=SGSetChannelPlayFlags(m_vc, channelPlayHighQuality); break;
- case 2: e=SGSetChannelPlayFlags(m_vc, channelPlayFast); break;
- case 3: e=SGSetChannelPlayFlags(m_vc, channelPlayAllData); break;
- }
- int dataSize = dim->prod();
- buf = ARRAY_NEW(uint8,dataSize);
- m_rowBytes = dim->prod(1);
- e=QTNewGWorldFromPtr (&m_srcGWorld,k32ARGBPixelFormat,
- &rect,NULL,NULL,0,buf,m_rowBytes);
- if (0/*yuv*/) {
- int dataSize = dim->prod()*2/4;
- buf = ARRAY_NEW(uint8,dataSize);
- m_rowBytes = dim->prod(1)*2/4;
- e=QTNewGWorldFromPtr (&m_srcGWorld,k422YpCbCr8CodecType,
- &rect,NULL,NULL,0,buf,m_rowBytes);
- }
- if (e!=noErr) RAISE("error #%d at QTNewGWorldFromPtr",e);
- if (!m_srcGWorld) RAISE("Could not allocate off screen");
- SGSetGWorld(m_sg,(CGrafPtr)m_srcGWorld, NULL);
- SGStartPreview(m_sg);
-}
-
-/*pascal Boolean pix_videoDarwin :: SeqGrabberModalFilterProc (DialogPtr theDialog, const EventRecord *theEvent, short *itemHit, long refCon){
- Boolean handled = false;
- if ((theEvent->what == updateEvt) &&
- ((WindowPtr) theEvent->message == (WindowPtr) refCon)) {
- BeginUpdate ((WindowPtr) refCon);
- EndUpdate ((WindowPtr) refCon);
- handled = true;
- }
- WindowRef awin = GetDialogWindow(theDialog);
- ShowWindow (awin);
- SetWindowClass(awin,kUtilityWindowClass);
- //ChangeWindowAttributes(awin,kWindowStandardHandlerAttribute,0); SGPanelEvent(m_sg,m_vc,theDialog,0,theEvent,itemHit,&handled);
- // AEProcessAppleEvent (theEvent);
- return handled;
-}
-void pix_videoDarwin :: DoVideoSettings(){
- Rect newActiveVideoRect;
- Rect curBounds, curVideoRect, newVideoRect;
- ComponentResult err;
- SGModalFilterUPP seqGragModalFilterUPP;
- err = SGGetChannelBounds (m_vc, &curBounds);
- err = SGGetVideoRect (m_vc, &curVideoRect);
- err = SGPause (m_sg, true);
- seqGragModalFilterUPP = (SGModalFilterUPP)NewSGModalFilterUPP(SeqGrabberModalFilterProc);
- err = SGSettingsDialog(m_sg, m_vc, 0,
- NULL, seqGrabSettingsPreviewOnly, seqGragModalFilterUPP, (long)m_srcGWorld);
- DisposeSGModalFilterUPP(seqGragModalFilterUPP);
- err = SGGetVideoRect (m_vc, &newVideoRect);
- err = SGGetSrcVideoBounds (m_vc, &newActiveVideoRect);
- err = SGPause (m_sg, false);
-}
-*/
-
-\def void frame () {
- GridOutlet out(this,0,dim);
- out.send(dim->prod(),buf);
-L}
-
-\def void close () {
- L
- if (m_vc) {
- if (::SGDisposeChannel(m_sg, m_vc)) RAISE("SGDisposeChannel");
- m_vc=0;
- }
- if (m_sg) {
- if (::CloseComponent(m_sg)) RAISE("CloseComponent");
- m_sg = NULL;
- if (m_srcGWorld) {
- ::DisposeGWorld(m_srcGWorld);
- m_pixMap = NULL;
- m_srcGWorld = NULL;
- m_baseAddr = NULL;
- }
- }
-}
-
-GRID_INLET(FormatQuickTimeCamera,0) {
- RAISE("Unimplemented. Sorry.");
-//!@#$
- if (in->dim->n != 3)
- RAISE("expecting 3 dimensions: rows,columns,channels");
- if (in->dim->get(2) != 3)
- RAISE("expecting 3 channels (got %d)",in->dim->get(2));
- in->set_factor(in->dim->prod());
-} GRID_FLOW {
-} GRID_FINISH {
-} GRID_END
-
-\classinfo {
- IEVAL(rself,
-\ruby
- install '#io:quicktimecamera',1,1
- @comment="Apple Quicktime (CAMERA MODULE)"
- @flags=4
-\end ruby
-);}
-\end class FormatQuickTimeCamera
-
-\class FormatQuickTimeApple < Format
-struct FormatQuickTimeApple : Format {
- Movie movie;
- TimeValue time;
- short movie_file;
- GWorldPtr gw; /* just like an X11 Image or Pixmap, maybe. */
- Pt<uint8> buffer;
- P<Dim> dim;
- int nframe, nframes;
-
- FormatQuickTimeApple() : movie(0), time(0), movie_file(0), gw(0),
- buffer(), dim(0), nframe(0), nframes(0) {}
- \decl void initialize (Symbol mode, Symbol source, String filename);
- \decl void close ();
- \decl void codec_m (String c);
- \decl void colorspace_m (Symbol c);
- \decl Ruby frame ();
- \decl void seek (int frame);
- \grin 0
-};
-
-\def void seek (int frame) {
- nframe=frame;
-}
-
-\def Ruby frame () {
- CGrafPtr savedPort;
- GDHandle savedDevice;
- SetMovieGWorld(movie,gw,GetGWorldDevice(gw));
- Rect r;
- GetMovieBox(movie,&r);
- PixMapHandle pixmap = GetGWorldPixMap(gw);
- short flags = nextTimeStep;
- if (nframe>=nframes) return Qfalse;
- if (nframe==0) flags |= nextTimeEdgeOK;
- TimeValue duration;
- OSType mediaType = VisualMediaCharacteristic;
- GetMovieNextInterestingTime(movie,
- flags,1,&mediaType,time,0,&time,&duration);
- if (time<0) {
- time=0;
- return Qfalse;
- }
-// gfpost("quicktime frame #%d; time=%d duration=%d", nframe, (long)time, (long)duration);
- SetMovieTimeValue(movie,nframe*duration);
- MoviesTask(movie,0);
- GridOutlet out(this,0,dim);
- Pt<uint32> bufu32 = Pt<uint32>((uint32 *)buffer.p,dim->prod()/4);
- int n = dim->prod()/4;
- int i;
- for (i=0; i<n&-4; i+=4) {
- bufu32[i+0]=(bufu32[i+0]<<8)+(bufu32[i+0]>>24);
- bufu32[i+1]=(bufu32[i+1]<<8)+(bufu32[i+1]>>24);
- bufu32[i+2]=(bufu32[i+2]<<8)+(bufu32[i+2]>>24);
- bufu32[i+3]=(bufu32[i+3]<<8)+(bufu32[i+3]>>24);
- }
- for (; i<n; i++) {
- bufu32[i+0]=(bufu32[i+0]<<8)+(bufu32[i+0]>>24);
- }
-
- out.send(dim->prod(),buffer);
- int nf=nframe;
- nframe++;
- return INT2NUM(nf);
-}
-
-GRID_INLET(FormatQuickTimeApple,0) {
- RAISE("Unimplemented. Sorry.");
-//!@#$
- if (in->dim->n != 3)
- RAISE("expecting 3 dimensions: rows,columns,channels");
- if (in->dim->get(2) != 3)
- RAISE("expecting 3 channels (got %d)",in->dim->get(2));
- in->set_factor(in->dim->prod());
-} GRID_FLOW {
-} GRID_FINISH {
-} GRID_END
-
-\def void codec_m (String c) { RAISE("Unimplemented. Sorry."); }
-\def void colorspace_m (Symbol c) { RAISE("Unimplemented. Sorry."); }
-
-\def void close () {
-//!@#$
- if (movie) {
- DisposeMovie(movie);
- DisposeGWorld(gw);
- CloseMovieFile(movie_file);
- movie_file=0;
- }
- rb_call_super(argc,argv);
-}
-
-\def void initialize (Symbol mode, Symbol source, String filename) {
- int err;
- rb_call_super(argc,argv);
- if (source==SYM(file)) {
- filename = rb_funcall(mGridFlow,SI(find_file),1,filename);
- FSSpec fss;
- FSRef fsr;
- err = FSPathMakeRef((const UInt8 *)rb_str_ptr(filename), &fsr, NULL);
- if (err) goto err;
- err = FSGetCatalogInfo(&fsr, kFSCatInfoNone, NULL, NULL, &fss, NULL);
- if (err) goto err;
- err = OpenMovieFile(&fss,&movie_file,fsRdPerm);
- if (err) goto err;
- } else {
- RAISE("usage: quicktime [file <filename> | camera bleh]");
- }
- NewMovieFromFile(&movie, movie_file, NULL, NULL, newMovieActive, NULL);
- Rect r;
- GetMovieBox(movie, &r);
- gfpost("handle=%d movie=%d tracks=%d",
- movie_file, movie, GetMovieTrackCount(movie));
- gfpost("duration=%d; timescale=%d cHz",
- (long)GetMovieDuration(movie),
- (long)GetMovieTimeScale(movie));
- nframes = GetMovieDuration(movie); /* i don't think so */
- gfpost("rect=((%d..%d),(%d..%d))",
- r.top, r.bottom, r.left, r.right);
- OffsetRect(&r, -r.left, -r.top);
- SetMovieBox(movie, &r);
- dim = new Dim(r.bottom-r.top, r.right-r.left, 4);
- SetMoviePlayHints(movie, hintsHighQuality, hintsHighQuality);
- buffer = ARRAY_NEW(uint8,dim->prod());
- err = QTNewGWorldFromPtr(&gw, k32ARGBPixelFormat, &r,
- NULL, NULL, 0, buffer, dim->prod(1));
- if (err) goto err;
- return;
-err:
- RAISE("can't open file `%s': error #%d (%s)", rb_str_ptr(filename),
- err,
- rb_str_ptr(rb_funcall(mGridFlow,SI(macerr),1,INT2NUM(err))));
-}
-
-\classinfo {
- EnterMovies();
-IEVAL(rself,
-\ruby
- install '#io:quicktime',1,1
- @comment="Apple Quicktime (using Apple's)"
- @flags=4
- suffixes_are'mov'
- def self.new(mode,source,filename)
- if source==:camera then FormatQuickTimeCamera.new(mode,source,filename) else super end
- end
-\end ruby
-);}
-\end class FormatQuickTimeApple
-void startup_quicktimeapple () {
- \startall
-}
diff --git a/externals/gridflow/format/quicktimehw.c b/externals/gridflow/format/quicktimehw.c
deleted file mode 100644
index 58f415a0..00000000
--- a/externals/gridflow/format/quicktimehw.c
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
- $Id: quicktimehw.c,v 1.2 2006-03-15 04:37:46 matju Exp $
-
- GridFlow
- Copyright (c) 2001,2002,2003,2004,2005,2006 by Mathieu Bouchard
-
- 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.
-
- See file ../COPYING for further informations on licensing terms.
-
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#define QUICKTIMEHW_INCLUDE_HERE
-#include "../base/grid.h.fcs"
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-
-\class FormatQuickTimeHW < Format
-struct FormatQuickTimeHW : Format {
- quicktime_t *anim;
- int track;
- P<Dim> dim;
- char *codec;
- int colorspace;
- int channels;
- bool started;
- P<Dim> force;
- int length; // in frames
- float64 framerate;
- P<BitPacking> bit_packing;
- FormatQuickTimeHW() : track(0), dim(0), codec(QUICKTIME_RAW),
- started(false), force(0), framerate(29.97), bit_packing(0) {}
- \decl void initialize (Symbol mode, Symbol source, String filename);
- \decl void close ();
- \decl Ruby frame ();
- \decl void seek (int frame);
-
- \decl void _0_force_size (int32 height, int32 width);
- \decl void _0_codec (String c);
- \decl void _0_colorspace (Symbol c);
- \decl void _0_parameter (Symbol name, int32 value);
- \decl void _0_framerate (float64 f);
- \decl void _0_size (int32 height, int32 width);
- \grin 0 int
-};
-
-\def void _0_force_size (int32 height, int32 width) { force = new Dim(height, width); }
-\def void seek (int frame) {quicktime_set_video_position(anim,frame,track);}
-
-\def Ruby frame () {
- int nframe = quicktime_video_position(anim,track);
- int length2 = quicktime_video_length(anim,track);
- if (nframe >= length) {
-// gfpost("nframe=%d length=%d length2=%d",nframe,length,length2);
- return Qfalse;
- }
- /* if it works, only do it once, to avoid silly stderr messages forgotten in LQT */
- if (!quicktime_reads_cmodel(anim,colorspace,0) && !started) {
- RAISE("LQT says this video cannot be decoded into the chosen colorspace");
- }
- int sx = quicktime_video_width(anim,track);
- int sy = quicktime_video_height(anim,track);
- int sz = quicktime_video_depth(anim,track);
- channels = sz/8; // hack. how do i get the video's native colormodel ?
- switch (sz) {
- case 24: colorspace=BC_RGB888; break;
- case 32: colorspace=BC_RGBA8888; break;
- default: gfpost("strange quicktime. ask matju."); break;
- }
- if (force) {
- sy = force->get(0);
- sx = force->get(1);
- }
- Pt<uint8> buf = ARRAY_NEW(uint8,sy*sx*channels);
- uint8 *rows[sy]; for (int i=0; i<sy; i++) rows[i]=buf+i*sx*channels;
- int result = quicktime_decode_scaled(anim,0,0,sx,sy,sx,sy,colorspace,rows,track);
- GridOutlet out(this,0,new Dim(sy, sx, channels),
- NumberTypeE_find(rb_ivar_get(rself,SI(@cast))));
- int bs = out.dim->prod(1);
- out.give(sy*sx*channels,buf);
- started=true;
- return INT2NUM(nframe);
-}
-
-//!@#$ should also support symbol values (how?)
-\def void _0_parameter (Symbol name, int32 value) {
- quicktime_set_parameter(anim, (char*)rb_sym_name(name), &value);
-}
-
-\def void _0_framerate (float64 f) {
- framerate=f;
- quicktime_set_framerate(anim, f);
-}
-
-\def void _0_size (int32 height, int32 width) {
- if (dim) RAISE("video size already set!");
- // first frame: have to do setup
- dim = new Dim(height, width, 3);
- quicktime_set_video(anim,1,dim->get(1),dim->get(0),framerate,codec);
- quicktime_set_cmodel(anim,colorspace);
-}
-
-GRID_INLET(FormatQuickTimeHW,0) {
- if (in->dim->n != 3) RAISE("expecting 3 dimensions: rows,columns,channels");
- if (in->dim->get(2)!=channels) RAISE("expecting %d channels (got %d)",channels,in->dim->get(2));
- in->set_factor(in->dim->prod());
- if (dim) {
- if (!dim->equal(in->dim)) RAISE("all frames should be same size");
- } else {
- // first frame: have to do setup
- dim = in->dim;
- quicktime_set_video(anim,1,dim->get(1),dim->get(0),framerate,codec);
- quicktime_set_cmodel(anim,colorspace);
- quicktime_set_depth(anim,8*channels,track);
- }
-} GRID_FLOW {
- int sx = quicktime_video_width(anim,track);
- int sy = quicktime_video_height(anim,track);
- uint8 *rows[sy];
- if (sizeof(T)>1) {
- uint8 data2[n];
- bit_packing->pack(sx*sy,data,Pt<uint8>(data2,n));
- for (int i=0; i<sy; i++) rows[i]=data2+i*sx*channels;
- quicktime_encode_video(anim,rows,track);
- } else {
- for (int i=0; i<sy; i++) rows[i]=data+i*sx*channels;
- quicktime_encode_video(anim,rows,track);
- }
-} GRID_FINISH {
-} GRID_END
-
-\def void _0_codec (String c) {
- //fprintf(stderr,"codec = %s\n",rb_str_ptr(rb_inspect(c)));
-#ifdef LQT_VERSION
- char buf[5];
- strncpy(buf,rb_str_ptr(c),4);
- for (int i=rb_str_len(c); i<4; i++) buf[i]=' ';
- buf[4]=0;
- Ruby fourccs = rb_ivar_get(rb_obj_class(rself),SI(@fourccs));
- if (Qnil==rb_hash_aref(fourccs,rb_str_new2(buf)))
- RAISE("warning: unknown fourcc '%s' (%s)",
- buf, rb_str_ptr(rb_inspect(rb_funcall(fourccs,SI(keys),0))));
-#endif
- codec = strdup(buf);
-}
-
-\def void _0_colorspace (Symbol c) {
- if (0) {
- } else if (c==SYM(rgb)) { channels=3; colorspace=BC_RGB888;
- } else if (c==SYM(rgba)) { channels=4; colorspace=BC_RGBA8888;
- } else if (c==SYM(bgr)) { channels=3; colorspace=BC_BGR888;
- } else if (c==SYM(bgrn)) { channels=4; colorspace=BC_BGR8888;
- } else if (c==SYM(yuv)) { channels=3; colorspace=BC_YUV888;
- } else if (c==SYM(yuva)) { channels=4; colorspace=BC_YUVA8888;
- } else if (c==SYM(YUV420P)) { channels=3; colorspace=BC_YUV420P;
- } else RAISE("unknown colorspace '%s' (supported: rgb, rgba, bgr, bgrn, yuv, yuva)",rb_sym_name(c));
-}
-
-\def void close () {
- if (anim) { quicktime_close(anim); anim=0; }
- rb_call_super(argc,argv);
-}
-
-// libquicktime may be nice, but it won't take a filehandle, only filename
-\def void initialize (Symbol mode, Symbol source, String filename) {
- rb_call_super(argc,argv);
- if (source!=SYM(file)) RAISE("usage: quicktime file <filename>");
- filename = rb_funcall(mGridFlow,SI(find_file),1,filename);
- anim = quicktime_open(rb_str_ptr(filename),mode==SYM(in),mode==SYM(out));
- if (!anim) RAISE("can't open file `%s': %s", rb_str_ptr(filename), strerror(errno));
- if (mode==SYM(in)) {
- length = quicktime_video_length(anim,track);
- gfpost("quicktime: codec=%s height=%d width=%d depth=%d framerate=%f",
- quicktime_video_compressor(anim,track),
- quicktime_video_height(anim,track),
- quicktime_video_width(anim,track),
- quicktime_video_depth(anim,track),
- quicktime_frame_rate(anim,track));
-/* This doesn't really work: (is it just for encoding?)
- if (!quicktime_supported_video(anim,track))
- RAISE("quicktime: unsupported codec: %s",
- quicktime_video_compressor(anim,track));
-*/
- }
- _0_colorspace(0,0,SYM(rgb));
- quicktime_set_cpus(anim,1);
- uint32 mask[3] = {0x0000ff,0x00ff00,0xff0000};
- bit_packing = new BitPacking(is_le(),3,3,mask);
-}
-
-\classinfo {
- IEVAL(rself,
-\ruby
- install '#io:quicktime',1,1
- @comment=%[Burkhard Plaum's (or HeroineWarrior's) libquicktime]
- suffixes_are 'mov'
- @flags=6
- def self.info; %[codecs: #{@codecs.keys.join' '}] end
-\end ruby
-);
-
-//#define L fprintf(stderr,"%s:%d in %s\n",__FILE__,__LINE__,__PRETTY_FUNCTION__);
-
-#ifdef LQT_VERSION
- lqt_registry_init();
- int n = lqt_get_num_video_codecs();
- Ruby codecs = rb_hash_new();
- Ruby fourccs = rb_hash_new();
- for (int i=0; i<n; i++) {
- const lqt_codec_info_t *s = lqt_get_video_codec_info(i);
- if (!s->name) {
- fprintf(stderr,"[#in quicktime]: skipping codec with null name!\n");
- continue;
- }
- Ruby name = rb_str_new2(s->name);
- Ruby f = rb_ary_new2(s->num_fourccs);
- for (int j=0; j<s->num_fourccs; j++) {
- Ruby fn = rb_str_new2(s->fourccs[j]);
- rb_ary_push(f,fn);
- rb_hash_aset(fourccs,fn,name);
- }
- rb_hash_aset(codecs,name,f);
- }
- rb_ivar_set(rself,SI(@codecs),codecs);
- rb_ivar_set(rself,SI(@fourccs),fourccs);
-#endif
-}
-\end class FormatQuickTimeHW
-void startup_quicktimehw () {
- \startall
-}
diff --git a/externals/gridflow/format/sdl.c b/externals/gridflow/format/sdl.c
deleted file mode 100644
index 32ba64a5..00000000
--- a/externals/gridflow/format/sdl.c
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- $Id: sdl.c,v 1.2 2006-03-15 04:37:46 matju Exp $
-
- GridFlow
- Copyright (c) 2001,2002,2003,2004 by Mathieu Bouchard
-
- 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.
-
- See file ../COPYING for further informations on licensing terms.
-
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include "../base/grid.h.fcs"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <sys/time.h>
-#include <signal.h>
-#include <SDL/SDL.h>
-
-static bool in_use = false;
-
-\class FormatSDL < Format
-struct FormatSDL : Format {
- SDL_Surface *screen;
- P<BitPacking> bit_packing;
- P<Dim> dim;
- void resize_window (int sx, int sy);
- void call ();
- Pt<uint8> pixels () {
- return Pt<uint8>((uint8 *)screen->pixels,
- dim->prod(0,1)*bit_packing->bytes);
- }
- \decl void initialize (Symbol mode);
- \decl void close ();
- \grin 0 int
-};
-
-void FormatSDL::call() {
- SDL_Event event;
- while(SDL_PollEvent(&event)) {}
- IEVAL(rself,"@clock.delay 20");
-}
-
-void FormatSDL::resize_window (int sx, int sy) {
- dim = new Dim(sy,sx,3);
- screen = SDL_SetVideoMode(sx,sy,0,SDL_SWSURFACE);
- if (!screen)
- RAISE("Can't switch to (%d,%d,%dbpp): %s", sy,sx,24, SDL_GetError());
-}
-
-GRID_INLET(FormatSDL,0) {
- if (in->dim->n != 3)
- RAISE("expecting 3 dimensions: rows,columns,channels");
- if (in->dim->get(2) != 3)
- RAISE("expecting 3 channels: red,green,blue (got %d)",in->dim->get(2));
- int sxc = in->dim->prod(1);
- int sx = in->dim->get(1), osx = dim->get(1);
- int sy = in->dim->get(0), osy = dim->get(0);
- in->set_factor(sxc);
- if (sx!=osx || sy!=osy) resize_window(sx,sy);
-} GRID_FLOW {
- int bypl = screen->pitch;
- int sxc = in->dim->prod(1);
- int sx = in->dim->get(1);
- int y = in->dex / sxc;
- assert((in->dex % sxc) == 0);
- assert((n % sxc) == 0);
- if (SDL_MUSTLOCK(screen)) if (SDL_LockSurface(screen) < 0) return; //???
- for (; n>0; y++, data+=sxc, n-=sxc) {
- /* convert line */
- bit_packing->pack(sx, data, pixels()+y*bypl);
- }
- if (SDL_MUSTLOCK(screen)) SDL_UnlockSurface(screen);
-} GRID_FINISH {
- SDL_UpdateRect(screen,0,0,in->dim->get(1),in->dim->get(0));
-} GRID_END
-
-\def void close () {
- IEVAL(rself,"@clock.unset");
- in_use=false;
-}
-
-\def void initialize (Symbol mode) {
- dim=0;screen=0;
- rb_call_super(argc,argv);
- if (in_use) RAISE("only one FormatSDL object at a time; sorry");
- in_use=true;
- if (SDL_Init(SDL_INIT_VIDEO)<0)
- RAISE("SDL_Init() error: %s",SDL_GetError());
- atexit(SDL_Quit);
- resize_window(320,240);
- SDL_PixelFormat *f = screen->format;
- uint32 mask[3] = {f->Rmask,f->Gmask,f->Bmask};
- switch (f->BytesPerPixel) {
- case 1: RAISE("8 bpp not supported"); break;
- case 2: case 3: case 4:
- bit_packing = new BitPacking(is_le(),f->BytesPerPixel,3,mask);
- break;
- default: RAISE("%d bytes/pixel: how do I deal with that?",f->BytesPerPixel); break;
- }
- IEVAL(rself,"@clock = Clock.new self");
-}
-
-\classinfo {
- IEVAL(rself,"install '#io:sdl',1,1;@flags=2;@comment='Simple Directmedia Layer'");
-}
-\end class FormatSDL
-void startup_sdl () {
- \startall
-}
diff --git a/externals/gridflow/format/videodev.c b/externals/gridflow/format/videodev.c
deleted file mode 100644
index 0f458408..00000000
--- a/externals/gridflow/format/videodev.c
+++ /dev/null
@@ -1,544 +0,0 @@
-/*
- $Id: videodev.c,v 1.2 2006-03-15 04:37:46 matju Exp $
-
- GridFlow
- Copyright (c) 2001,2002,2003,2004 by Mathieu Bouchard
-
- 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.
-
- See file ../COPYING for further informations on licensing terms.
-
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include "../base/grid.h.fcs"
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <linux/videodev.h>
-#include <sys/ioctl.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-
-/* **************************************************************** */
-
-typedef video_capability VideoCapability;
-typedef video_channel VideoChannel ;
-typedef video_tuner VideoTuner ;
-typedef video_window VideoWindow ;
-typedef video_picture VideoPicture ;
-typedef video_mbuf VideoMbuf ;
-typedef video_mmap VideoMmap ;
-
-static const char *ruby_code =
-\ruby
-flags :name,:VideoTypeFlags,:start,0,:values,%w(
- CAPTURE TUNER TELETEXT OVERLAY CHROMAKEY CLIPPING FRAMERAM
- SCALES MONOCHROME SUBCAPTURE
- MPEG_DECODER MPEG_ENCODER MJPEG_DECODER MJPEG_ENCODER
-)
-flags :name,:TunerFlags,:start,0,:values,%w(
- PAL NTSC SECAM LOW NORM DUMMY5 DUMMY6 STEREO_ON RDS_ON MBS_ON
-)
-flags :name,:ChannelFlags,:start,0,:values,%w(
- TUNER AUDIO NORM
-)
-choice :name,:VideoPaletteChoice,:start,0,:values,%w(
- NIL GREY HI240
- RGB565 RGB24 RGB32 RGB555
- YUV422 YUYV UYVY YUV420 YUV411 RAW
- YUV422P YUV411P YUV420P YUV410P
-)
-choice :name,:VideoModeChoice,:start,0,:values,%w(
- PAL NTSC SECAM AUTO
-)
-\end ruby
-;
-
-/* **************************************************************** */
-
-/*
-#define WH(_field_,_spec_) \
- sprintf(buf+strlen(buf), "%s: " _spec_ "; ", #_field_, self->_field_);
-#define WHYX(_name_,_fieldy_,_fieldx_) \
- sprintf(buf+strlen(buf), "%s: y=%d, x=%d; ", #_name_, self->_fieldy_, self->_fieldx_);
-#define WHFLAGS(_field_,_table_) { \
- char *foo; \
- sprintf(buf+strlen(buf), "%s: %s; ", #_field_, \
- foo=flags_to_s(self->_field_,COUNT(_table_),_table_)); \
- delete[] foo;}
-#define WHCHOICE(_field_,_table_) { \
- char *foo; \
- sprintf(buf+strlen(buf), "%s: %s; ", #_field_, \
- foo=choice_to_s(self->_field_,COUNT(_table_),_table_));\
- delete[] foo;}
-static char *flags_to_s(int value, int n, named_int *table) {
- char foo[256];
- *foo = 0;
- for(int i=0; i<n; i++) {
- if ((value & (1<<i)) == 0) continue;
- if (*foo) strcat(foo," | ");
- strcat(foo,table[i].name);
- }
- if (!*foo) strcat(foo,"0");
- return strdup(foo);
-}
-static char *choice_to_s(int value, int n, named_int *table) {
- if (value < 0 || value >= n) {
- char foo[64];
- sprintf(foo,"(Unknown #%d)",value);
- return strdup(foo);
- } else {
- return strdup(table[value].name);
- }
-}
-*/
-
-class RStream {
-public:
- Ruby a;
- RStream(Ruby a) : a(a) {}
- RStream &operator <<(/*Ruby*/ void *v) { rb_ary_push(a,(Ruby)v); return *this; }
- RStream &operator <<(int v) { return *this<<(void *)INT2NUM(v); }
-};
-
-static void gfpost(VideoChannel *self) {
- RStream rs(rb_ary_new());
- rs << (void *)SYM(VideoChannel) << self->channel
- << (void *)rb_str_new(self->name,strnlen(self->name,32))
- << self->tuners << self->flags << self->type << self->norm;
- rb_p(rs.a);
-}
-
-static void gfpost(VideoTuner *self) {
- RStream rs(rb_ary_new());
- rs << (void *)SYM(VideoTuner) << self->tuner
- << (void *)rb_str_new(self->name,strnlen(self->name,32))
- << self->rangelow << self->rangehigh
- << self->flags << self->mode << self->signal;
- rb_p(rs.a);
-}
-
-static void gfpost(VideoCapability *self) {
- RStream rs(rb_ary_new());
- rs << (void *)SYM(VideoCapability)
- << (void *)rb_str_new(self->name,strnlen(self->name,32))
- << self->type
- << self->channels << self->audios
- << self->maxheight << self->maxwidth
- << self->minheight << self->minwidth;
- rb_p(rs.a);
-}
-
-static void gfpost(VideoWindow *self) {
- RStream rs(rb_ary_new());
- rs << (void *)SYM(VideoWindow)
- << self->y << self->x
- << self->height << self->width
- << self->chromakey << self->flags << self->clipcount;
- rb_p(rs.a);
-}
-
-static void gfpost(VideoPicture *self) {
- RStream rs(rb_ary_new());
- rs << (void *)SYM(VideoPicture)
- << self->brightness << self->contrast << self->colour
- << self->hue << self->whiteness << self->depth << self->palette;
- rb_p(rs.a);
-}
-
-static void gfpost(VideoMbuf *self) {
- RStream rs(rb_ary_new());
- rs << (void *)SYM(VideoMBuf) << self->size << self->frames;
- for (int i=0; i<4; i++) rs << self->offsets[i];
- rb_p(rs.a);
-}
-
-static void gfpost(VideoMmap *self) {
- RStream rs(rb_ary_new());
- rs << (void *)SYM(VideoMMap) << self->frame
- << self->height << self->width << self->format;
- rb_p(rs.a);
-};
-
-/* **************************************************************** */
-
-\class FormatVideoDev < Format
-struct FormatVideoDev : Format {
- VideoCapability vcaps;
- VideoMbuf vmbuf;
- VideoMmap vmmap;
- Pt<uint8> image;
- int palette;
- int queue[8], queuesize, queuemax, next_frame;
- int current_channel, current_tuner;
- bool use_mmap;
- P<BitPacking> bit_packing;
- P<Dim> dim;
-
- FormatVideoDev () : queuesize(0), queuemax(2), next_frame(0), use_mmap(true), bit_packing(0), dim(0) {}
- void frame_finished (Pt<uint8> buf);
-
- \decl void initialize (Symbol mode, String filename, Symbol option=Qnil);
- \decl void initialize2 ();
- \decl void close ();
- \decl void alloc_image ();
- \decl void dealloc_image ();
- \decl void frame ();
- \decl void frame_ask ();
- \grin 0 int
-
- \decl void _0_size (int sy, int sx);
- \decl void _0_norm (int value);
- \decl void _0_tuner (int value);
- \decl void _0_channel (int value);
- \decl void _0_frequency (int value);
- \decl void _0_transfer (Symbol sym, int queuemax=2);
- \decl void _0_colorspace (Symbol c);
- \decl void _0_get (Symbol attr=0);
- \decl void _0_brightness (uint16 value);
- \decl void _0_hue (uint16 value);
- \decl void _0_colour (uint16 value);
- \decl void _0_contrast (uint16 value);
- \decl void _0_whiteness (uint16 value);
-};
-
-#define DEBUG(args...) 42
-//#define DEBUG(args...) gfpost
-
-#define IOCTL(_f_,_name_,_arg_) \
- (DEBUG("fd%d.ioctl(0x%08x(:%s),0x%08x)\n",_f_,_name_,#_name_,_arg_), \
- ioctl(_f_,_name_,_arg_))
-
-#define WIOCTL(_f_,_name_,_arg_) \
- (DEBUG("fd%d.ioctl(0x%08x(:%s),0x%08x)\n",_f_,_name_,#_name_,_arg_), \
- ioctl(_f_,_name_,_arg_) < 0) && \
- (gfpost("ioctl %s: %s",#_name_,strerror(errno)),1)
-
-#define WIOCTL2(_f_,_name_,_arg_) \
- ((DEBUG("fd%d.ioctl(0x%08x(:%s),0x%08x)\n",_f_,_name_,#_name_,_arg_), \
- ioctl(_f_,_name_,_arg_) < 0) && \
- (gfpost("ioctl %s: %s",#_name_,strerror(errno)), \
- RAISE("ioctl error"), 0))
-
-#define GETFD NUM2INT(rb_funcall(rb_ivar_get(rself,SI(@stream)),SI(fileno),0))
-
-\def void _0_size (int sy, int sx) {
- int fd = GETFD;
- VideoWindow grab_win;
- // !@#$ bug here: won't flush the frame queue
- dim = new Dim(sy,sx,3);
- WIOCTL(fd, VIDIOCGWIN, &grab_win);
- gfpost(&grab_win);
- grab_win.clipcount = 0;
- grab_win.flags = 0;
- if (sy && sx) {
- grab_win.height = sy;
- grab_win.width = sx;
- }
- gfpost(&grab_win);
- WIOCTL(fd, VIDIOCSWIN, &grab_win);
- WIOCTL(fd, VIDIOCGWIN, &grab_win);
- gfpost(&grab_win);
-}
-
-\def void dealloc_image () {
- if (!image) return;
- if (!use_mmap) {
- delete[] (uint8 *)image;
- } else {
- munmap(image, vmbuf.size);
- image = Pt<uint8>();
- }
-}
-
-\def void alloc_image () {
- if (!use_mmap) {
- image = ARRAY_NEW(uint8,dim->prod(0,1)*bit_packing->bytes);
- return;
- }
- int fd = GETFD;
- WIOCTL2(fd, VIDIOCGMBUF, &vmbuf);
- image = Pt<uint8>((uint8 *)
- mmap(0,vmbuf.size,PROT_READ|PROT_WRITE,MAP_SHARED,fd,0),
- vmbuf.size);
- if (((int)image)<=0) {
- image=Pt<uint8>();
- RAISE("mmap: %s", strerror(errno));
- }
-}
-
-\def void frame_ask () {
- int fd = GETFD;
- if (queuesize>=queuemax) RAISE("queue is full (queuemax=%d)",queuemax);
- if (queuesize>=vmbuf.frames) RAISE("queue is full (vmbuf.frames=%d)",vmbuf.frames);
- vmmap.frame = queue[queuesize++] = next_frame;
- vmmap.format = palette;
- vmmap.width = dim->get(1);
- vmmap.height = dim->get(0);
- WIOCTL2(fd, VIDIOCMCAPTURE, &vmmap);
- next_frame = (next_frame+1) % vmbuf.frames;
-}
-
-void FormatVideoDev::frame_finished (Pt<uint8> buf) {
- GridOutlet out(this,0,dim,NumberTypeE_find(rb_ivar_get(rself,SI(@cast))));
- /* picture is converted here. */
- int sy = dim->get(0);
- int sx = dim->get(1);
- int bs = dim->prod(1);
- if (palette==VIDEO_PALETTE_YUV420P) {
- STACK_ARRAY(uint8,b2,bs);
- for(int y=0; y<sy; y++) {
- Pt<uint8> bufy = buf+sx*y;
- Pt<uint8> bufu = buf+sx*sy +(sx/2)*(y/2);
- Pt<uint8> bufv = buf+sx*sy*5/4+(sx/2)*(y/2);
- for (int x=0; x<sx; x++) {
- b2[x*3+0]=bufy[x];
- b2[x*3+1]=bufu[x/2];
- b2[x*3+2]=bufv[x/2];
- }
- out.send(bs,b2);
- }
- } else if (bit_packing) {
- STACK_ARRAY(uint8,b2,bs);
- for(int y=0; y<sy; y++) {
- Pt<uint8> buf2 = buf+bit_packing->bytes*sx*y;
- bit_packing->unpack(sx,buf2,b2);
- out.send(bs,b2);
- }
- } else {
- out.send(sy*bs,buf);
- }
-}
-
-static int read2(int fd, uint8 *image, int n) {
- int r=0;
- for (; n>0; ) {
- int rr=read(fd,image,n);
- if (rr<0) return rr;
- r+=rr, image+=rr, n-=rr;
- }
- return r;
-}
-
-static int read3(int fd, uint8 *image, int n) {
- int r=read(fd,image,n);
- if (r<0) return r;
- return n;
-}
-
-\def void frame () {
- if (!image) rb_funcall(rself,SI(alloc_image),0);
- int fd = GETFD;
- if (!use_mmap) {
- /* picture is read at once by frame() to facilitate debugging. */
- int tot = dim->prod(0,1) * bit_packing->bytes;
- int n = (int) read3(fd,image,tot);
- if (n==tot) frame_finished(image);
- if (0> n) RAISE("error reading: %s", strerror(errno));
- if (n < tot) RAISE("unexpectedly short picture: %d of %d",n,tot);
- return;
- }
- while(queuesize<queuemax) rb_funcall(rself,SI(frame_ask),0);
- vmmap.frame = queue[0];
- uint64 t0 = gf_timeofday();
- WIOCTL2(fd, VIDIOCSYNC, &vmmap);
- uint64 t1 = gf_timeofday();
- //if (t1-t0 > 100) gfpost("VIDIOCSYNC delay: %d us",t1-t0);
- frame_finished(image+vmbuf.offsets[queue[0]]);
- queuesize--;
- for (int i=0; i<queuesize; i++) queue[i]=queue[i+1];
- rb_funcall(rself,SI(frame_ask),0);
-}
-
-GRID_INLET(FormatVideoDev,0) {
- RAISE("can't write.");
-} GRID_FLOW {
-} GRID_FINISH {
-} GRID_END
-
-\def void _0_norm (int value) {
- int fd = GETFD;
- VideoTuner vtuner;
- vtuner.tuner = current_tuner;
- if (value<0 || value>3) RAISE("norm must be in range 0..3");
- if (0> IOCTL(fd, VIDIOCGTUNER, &vtuner)) {
- gfpost("no tuner #%d", value);
- } else {
- vtuner.mode = value;
- gfpost(&vtuner);
- WIOCTL(fd, VIDIOCSTUNER, &vtuner);
- }
-}
-
-\def void _0_tuner (int value) {
- int fd = GETFD;
- VideoTuner vtuner;
- vtuner.tuner = current_tuner = value;
- if (0> IOCTL(fd, VIDIOCGTUNER, &vtuner)) RAISE("no tuner #%d", value);
- vtuner.mode = VIDEO_MODE_NTSC; //???
- gfpost(&vtuner);
- WIOCTL(fd, VIDIOCSTUNER, &vtuner);
-}
-
-\def void _0_channel (int value) {
- int fd = GETFD;
- VideoChannel vchan;
- vchan.channel = value;
- current_channel = value;
- if (0> IOCTL(fd, VIDIOCGCHAN, &vchan)) RAISE("no channel #%d", value);
- gfpost(&vchan);
- WIOCTL(fd, VIDIOCSCHAN, &vchan);
- if (vcaps.type & VID_TYPE_TUNER) rb_funcall(rself,SI(_0_tuner),1,INT2NUM(0));
-}
-
-\def void _0_frequency (int value) {
- int fd = GETFD;
- if (0> IOCTL(fd, VIDIOCSFREQ, &value)) RAISE("can't set frequency to %d",value);
-}
-
-\def void _0_transfer (Symbol sym, int queuemax=2) {
- if (sym == SYM(read)) {
- rb_funcall(rself,SI(dealloc_image),0);
- use_mmap = false;
- gfpost("transfer read");
- } else if (sym == SYM(mmap)) {
- rb_funcall(rself,SI(dealloc_image),0);
- use_mmap = true;
- rb_funcall(rself,SI(alloc_image),0);
- queuemax=min(queuemax,vmbuf.frames);
- gfpost("transfer mmap with queuemax=%d (max max is vmbuf.frames=%d)"
- ,queuemax,vmbuf.frames);
- this->queuemax=queuemax;
- } else RAISE("don't know that transfer mode");
-}
-
-#define PICTURE_ATTR(_name_) {\
- int fd = GETFD; \
- VideoPicture vp; \
- WIOCTL(fd, VIDIOCGPICT, &vp); \
- vp._name_ = value; \
- WIOCTL(fd, VIDIOCSPICT, &vp);}
-
-\def void _0_brightness (uint16 value) {PICTURE_ATTR(brightness)}
-\def void _0_hue (uint16 value) {PICTURE_ATTR(hue)}
-\def void _0_colour (uint16 value) {PICTURE_ATTR(colour)}
-\def void _0_contrast (uint16 value) {PICTURE_ATTR(contrast)}
-\def void _0_whiteness (uint16 value) {PICTURE_ATTR(whiteness)}
-
-#define PICTURE_ATTR_GET(_name_) { \
- int fd = GETFD; \
- VideoPicture vp; \
- WIOCTL(fd, VIDIOCGPICT, &vp); \
- Ruby argv[3] = {INT2NUM(1), SYM(_name_), INT2NUM(vp._name_)}; \
- send_out(COUNT(argv),argv);}
-
-\def void _0_get (Symbol attr) {
- if (!attr) {
- _0_get(0,0,SYM(brightness));
- _0_get(0,0,SYM(hue ));
- _0_get(0,0,SYM(colour ));
- _0_get(0,0,SYM(contrast ));
- _0_get(0,0,SYM(whiteness ));
- _0_get(0,0,SYM(frequency ));
- } else if (attr==SYM(brightness)) { PICTURE_ATTR_GET(brightness);
- } else if (attr==SYM(hue )) { PICTURE_ATTR_GET(hue );
- } else if (attr==SYM(colour )) { PICTURE_ATTR_GET(colour );
- } else if (attr==SYM(contrast )) { PICTURE_ATTR_GET(contrast );
- } else if (attr==SYM(whiteness )) { PICTURE_ATTR_GET(whiteness );
- } else if (attr==SYM(frequency )) {
- int fd = GETFD;
- int value;
- WIOCTL(fd, VIDIOCGFREQ, &value);
- {Ruby argv[3] ={INT2NUM(1), SYM(frequency), INT2NUM(value)}; send_out(COUNT(argv),argv);}
- } else { RAISE("What you say?"); }
-}
-
-\def void close () {
- if (image) rb_funcall(rself,SI(dealloc_image),0);
- rb_call_super(argc,argv);
-}
-
-\def void _0_colorspace (Symbol c) {
- if (c==SYM(RGB24)) palette=VIDEO_PALETTE_RGB24;
- else if (c==SYM(YUV420P)) palette=VIDEO_PALETTE_YUV420P;
- else RAISE("supported: RGB24, YUV420P");
-
- int fd = GETFD;
- VideoPicture *gp = new VideoPicture;
- WIOCTL(fd, VIDIOCGPICT, gp);
- gp->palette = palette;
- WIOCTL(fd, VIDIOCSPICT, gp);
- WIOCTL(fd, VIDIOCGPICT, gp);
- //if (bit_packing) { delete bit_packing; bit_packing=0; }
- switch(palette) {
- case VIDEO_PALETTE_RGB24:{
- uint32 masks[3] = { 0xff0000,0x00ff00,0x0000ff };
- bit_packing = new BitPacking(is_le(),3,3,masks);
- }break;
- case VIDEO_PALETTE_YUV420P:{
- // woops, special case already, can't do that with bit_packing
- }
- default:
- RAISE("can't handle palette %d", gp->palette);
- }
- delete gp;
-}
-
-\def void initialize2 () {
- int fd = GETFD;
- VideoPicture *gp = new VideoPicture;
-/* long flags;
- fcntl(fd,F_GETFL,&flags);
- flags |= O_NONBLOCK;
- fcntl(fd,F_SETFL,&flags); */
-
- WIOCTL(fd, VIDIOCGCAP, &vcaps);
- gfpost(&vcaps);
- rb_funcall(rself,SI(_0_size),2,INT2NUM(vcaps.maxheight),INT2NUM(vcaps.maxwidth));
- WIOCTL(fd, VIDIOCGPICT, gp);
- gfpost(gp);
- char buf[1024] = "";
- int n = 17 /*COUNT(video_palette_choice)*/;
- for (int i=0; i<n; i++) {
- gp->palette = i;
- ioctl(fd, VIDIOCSPICT, gp);
- ioctl(fd, VIDIOCGPICT, gp);
- if (gp->palette == i) {
- if (*buf) strcpy(buf+strlen(buf),", ");
- //strcpy(buf+strlen(buf),video_palette_choice[i].name);
- sprintf(buf+strlen(buf),"%d",i);
- }
- }
- gfpost("This card supports palettes: %s", buf);
- _0_colorspace(0,0,SYM(RGB24));
- rb_funcall(rself,SI(_0_channel),1,INT2NUM(0));
- delete gp;
-}
-
-\def void initialize (Symbol mode, String filename, Symbol option=Qnil) {
- rb_call_super(argc,argv);
- image = Pt<uint8>();
- rb_ivar_set(rself,SI(@stream),
- rb_funcall(rb_cFile,SI(open),2,filename,rb_str_new2("r+")));
- rb_funcall(rself,SI(initialize2),0);
-}
-
-\classinfo {
- IEVAL(rself,"install '#io:videodev',1,1;@flags=4;@comment='Video4linux 1.x'");
-}
-\end class FormatVideoDev
-void startup_videodev () {
- \startall
-}
diff --git a/externals/gridflow/format/x11.c b/externals/gridflow/format/x11.c
deleted file mode 100644
index 9237a6b6..00000000
--- a/externals/gridflow/format/x11.c
+++ /dev/null
@@ -1,669 +0,0 @@
-/*
- $Id: x11.c,v 1.2 2006-03-15 04:37:46 matju Exp $
-
- GridFlow
- Copyright (c) 2001,2002,2003,2004,2005 by Mathieu Bouchard
-
- 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.
-
- See file ../COPYING for further informations on licensing terms.
-
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
- Note: some of the code was adapted from PDP's (the XVideo stuff).
-*/
-#include "../base/grid.h.fcs"
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <sys/time.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/StringDefs.h>
-#ifdef HAVE_X11_SHARED_MEMORY
-#include <sys/ipc.h>
-#include <sys/shm.h>
-#include <X11/extensions/XShm.h>
-#endif
-#ifdef HAVE_X11_XVIDEO
-#include <X11/extensions/Xv.h>
-#include <X11/extensions/Xvlib.h>
-#endif
-
-#undef L
-#define L gfpost("%s:%d in %s",__FILE__,__LINE__,__PRETTY_FUNCTION__);
-
-/* X11 Error Handler type */
-typedef int (*XEH)(Display *, XErrorEvent *);
-
-\class FormatX11 < Format
-struct FormatX11 : Format {
-/* at the Display/Screen level */
- Display *display; /* connection to xserver */
- Visual *visual; /* screen properties */
- Window root_window;
- Colormap colormap; /* for 256-color mode */
- short depth;
- int transfer; /* 0=plain 1=xshm 2=xvideo */
- bool use_stripes; /* use alternate conversion in 256-color mode */
-/* at the Window level */
- Window window; /* X11 window number */
- Window parent; /* X11 window number of the parent */
- GC imagegc; /* X11 graphics context (like java.awt.Graphics) */
- XImage *ximage; /* X11 image descriptor */
- Pt<uint8> image; /* the real data (that XImage binds to) */
- bool is_owner;
- int32 pos[2];
- P<BitPacking> bit_packing;
- P<Dim> dim;
- bool lock_size;
- bool override_redirect;
-#ifdef HAVE_X11_SHARED_MEMORY
- XShmSegmentInfo *shm_info; /* to share memory with X11/Unix */
-#endif
-#ifdef HAVE_X11_XVIDEO
- int xv_format;
- int xv_port;
- XvImage *xvi;
- unsigned char *data;
- int last_encoding;
-#endif
- FormatX11 () : transfer(0), use_stripes(false),
- window(0), ximage(0), image(Pt<uint8>()), is_owner(true),
- dim(0), lock_size(false), override_redirect(false)
-#ifdef HAVE_X11_SHARED_MEMORY
- , shm_info(0)
-#endif
- {}
- template <class T> void frame_by_type (T bogus);
- void show_section(int x, int y, int sx, int sy);
- void set_wm_hints ();
- void dealloc_image ();
- bool alloc_image (int sx, int sy);
- void resize_window (int sx, int sy);
- void open_display(const char *disp_string);
- void report_pointer(int y, int x, int state);
- void prepare_colormap();
- Window FormatX11::search_window_tree (Window xid, Atom key, const char *value, int level=0);
- \decl void initialize (...);
- \decl void frame ();
- \decl void close ();
- \decl void call ();
- \decl void _0_out_size (int sy, int sx);
- \decl void _0_setcursor (int shape);
- \decl void _0_hidecursor ();
- \decl void _0_set_geometry (int y, int x, int sy, int sx);
- \decl void _0_fall_thru (int flag);
- \decl void _0_transfer (Symbol s);
- \decl void _0_title (String s=Qnil);
- \grin 0 int
-};
-
-/* ---------------------------------------------------------------- */
-
-static const char *xfers[3] = {"plain","xshm","xvideo"};
-
-void FormatX11::show_section(int x, int y, int sx, int sy) {
- int zy=dim->get(0), zx=dim->get(1);
- if (y>zy||x>zx) return;
- if (y+sy>zy) sy=zy-y;
- if (x+sx>zx) sx=zx-x;
- switch (transfer) {
- case 0: XPutImage(display,window,imagegc,ximage,x,y,x,y,sx,sy);
- XFlush(display);
- break;
-#ifdef HAVE_X11_SHARED_MEMORY
- case 1: XSync(display,False);
- XShmPutImage(display,window,imagegc,ximage,x,y,x,y,sx,sy,False);
- XFlush(display);
- //XPutImage( display,window,imagegc,ximage,x,y,x,y,sx,sy);
- // should completion events be waited for? looks like a bug
- break;
-#endif
-#ifdef HAVE_X11_XVIDEO
- case 2:
- break;
-#endif
- default: RAISE("transfer mode '%s' not available", xfers[transfer]);
- }
-}
-
-/* window manager hints, defines the window as non-resizable */
-void FormatX11::set_wm_hints () {
- Ruby title = rb_ivar_get(rself,SI(@title));
- if (!is_owner) return;
- XWMHints wmh;
- char buf[256],*bufp=buf;
- if (title==Qnil) {
- sprintf(buf,"GridFlow (%d,%d,%d)",dim->get(0),dim->get(1),dim->get(2));
- } else {
- sprintf(buf,"%.255s",rb_str_ptr(title));
- }
- XTextProperty wtitle; XStringListToTextProperty((char **)&bufp, 1, &wtitle);
- XSizeHints sh;
- sh.flags=PSize|PMaxSize|PMinSize;
- sh.min_width = sh.max_width = sh.width = dim->get(1);
- sh.min_height = sh.max_height = sh.height = dim->get(0);
- wmh.input = True;
- wmh.flags = InputHint;
- XSetWMProperties(display,window,&wtitle,&wtitle,0,0,&sh,&wmh,0);
-}
-
-void FormatX11::report_pointer(int y, int x, int state) {
- Ruby argv[5] = {
- INT2NUM(0), SYM(position),
- INT2NUM(y), INT2NUM(x), INT2NUM(state) };
- send_out(COUNT(argv),argv);
-}
-
-\def void call() {
- XEvent e;
- for (;;) {
- int xpending = XEventsQueued(display, QueuedAfterFlush);
- if (!xpending) break;
- XNextEvent(display,&e);
- switch (e.type) {
- case Expose:{
- XExposeEvent *ex = (XExposeEvent *)&e;
- if (rb_ivar_get(rself,SI(@mode)) == SYM(out)) {
- show_section(ex->x,ex->y,ex->width,ex->height);
- }
- }break;
- case ButtonPress:{
- XButtonEvent *eb = (XButtonEvent *)&e;
- eb->state |= 128<<eb->button;
- report_pointer(eb->y,eb->x,eb->state);
- }break;
- case ButtonRelease:{
- XButtonEvent *eb = (XButtonEvent *)&e;
- eb->state &= ~(128<<eb->button);
- report_pointer(eb->y,eb->x,eb->state);
- }break;
- case KeyPress:
- case KeyRelease:{
- XKeyEvent *ek = (XKeyEvent *)&e;
- //XLookupString(ek, buf, 63, 0, 0);
- char *kss = XKeysymToString(XLookupKeysym(ek, 0));
- char buf[64];
- if (!kss) return; /* unknown keys ignored */
- if (isdigit(*kss)) sprintf(buf,"D%s",kss); else strcpy(buf,kss);
- Ruby argv[6] = {
- INT2NUM(0), e.type==KeyPress ? SYM(keypress) : SYM(keyrelease),
- INT2NUM(ek->y), INT2NUM(ek->x), INT2NUM(ek->state),
- rb_funcall(rb_str_new2(buf),SI(intern),0) };
- send_out(COUNT(argv),argv);
- //XFree(kss);
- }break;
- case MotionNotify:{
- XMotionEvent *em = (XMotionEvent *)&e;
- report_pointer(em->y,em->x,em->state);
- }break;
- case DestroyNotify:{
- gfpost("This window is being closed, so this handler will close too!");
- rb_funcall(rself,SI(close),0);
- return;
- }break;
- case ConfigureNotify:break; // as if we cared
- }
- }
- IEVAL(rself,"@clock.delay 20");
-}
-
-\def void frame () {
- XGetSubImage(display, window, 0, 0, dim->get(1), dim->get(0),
- (unsigned)-1, ZPixmap, ximage, 0, 0);
- GridOutlet out(this,0,dim,NumberTypeE_find(rb_ivar_get(rself,SI(@cast))));
- int sy=dim->get(0), sx=dim->get(1), bs=dim->prod(1);
- STACK_ARRAY(uint8,b2,bs);
- for(int y=0; y<sy; y++) {
- Pt<uint8> b1 = Pt<uint8>(image,ximage->bytes_per_line*dim->get(0))
- + ximage->bytes_per_line * y;
- bit_packing->unpack(sx,b1,b2);
- out.send(bs,b2);
- }
-}
-
-/* loathe Xlib's error handlers */
-static FormatX11 *current_x11;
-static int FormatX11_error_handler (Display *d, XErrorEvent *xee) {
- gfpost("XErrorEvent: type=0x%08x display=0x%08x xid=0x%08x",
- xee->type, xee->display, xee->resourceid);
- gfpost("... serial=0x%08x error=0x%08x request=0x%08lx minor=0x%08x",
- xee->serial, xee->error_code, xee->request_code, xee->minor_code);
- if (current_x11->transfer==1) {
- gfpost("(note: turning shm off)");
- current_x11->transfer = 0;
- }
- return 42; /* it seems that the return value is ignored. */
-}
-
-bool FormatX11::alloc_image (int sx, int sy) {
- dim = new Dim(sy,sx,3);
- dealloc_image();
- if (sx==0 || sy==0) return false;
- current_x11 = this;
- switch (transfer) {
- case 0: {
- ximage = XCreateImage(display,visual,depth,ZPixmap,0,0,sx,sy,8,0);
- int size = ximage->bytes_per_line*ximage->height;
- if (!ximage) RAISE("can't create image");
- image = ARRAY_NEW(uint8,size);
- ximage->data = (int8 *)image;
- } break;
-#ifdef HAVE_X11_SHARED_MEMORY
- case 1: {
- shm_info = new XShmSegmentInfo;
- ximage = XShmCreateImage(display,visual,depth,ZPixmap,0,shm_info,sx,sy);
- if (!ximage) {gfpost("shm got disabled, retrying..."); transfer=0;}
- XSync(display,0);
- if (transfer==0) return alloc_image(sx,sy);
- int size = ximage->bytes_per_line*ximage->height;
- gfpost("size = %d",size);
- shm_info->shmid = shmget(IPC_PRIVATE,size,IPC_CREAT|0777);
- if(shm_info->shmid < 0) RAISE("shmget() failed: %s",strerror(errno));
- ximage->data = shm_info->shmaddr = (char *)shmat(shm_info->shmid,0,0);
- if ((long)(shm_info->shmaddr) == -1) RAISE("shmat() failed: %s",strerror(errno));
- gfpost("shmaddr=%p",shm_info->shmaddr);
- image = Pt<uint8>((uint8 *)ximage->data,size);
- shm_info->readOnly = False;
- if (!XShmAttach(display, shm_info)) RAISE("ERROR: XShmAttach: big problem");
- XSync(display,0); // make sure the server picks it up
- // yes, this can be done now. should cause auto-cleanup.
- shmctl(shm_info->shmid,IPC_RMID,0);
- if (transfer==0) return alloc_image(sx,sy);
- } break;
-#endif
-#ifdef HAVE_X11_XVIDEO
- case 2: {
- unsigned int ver, rel, req, ev, err, i, j, adaptors, formats;
- XvAdaptorInfo *ai;
- if (Success != XvQueryExtension(display,&ver,&rel,&req,&ev,&err)) RAISE("XvQueryExtension problem");
- /* find + lock port */
- if (Success != XvQueryAdaptors(display,DefaultRootWindow(display),&adaptors,&ai)) RAISE("XvQueryAdaptors problem");
- for (i = 0; i < adaptors; i++) {
- if (ai[i].type&XvInputMask && ai[i].type&XvImageMask) {
- for (j=0; j<ai[i].num_ports; j++) {
- if (Success != XvGrabPort(display,ai[i].base_id+j,CurrentTime)) RAISE("XvGrabPort problem");
- xv_port = ai[i].base_id + j;
- goto breakout;
- }
- }
- }
- breakout:
- XFree(ai);
- if (!xv_port) RAISE("no xv_port");
-/* unsigned int encn;
- XvEncodingInfo *enc;
- XvQueryEncodings(display,xv_port,&encn,&enc);
- for (i=0; i<encn; i++) gfpost("XvEncodingInfo: name='%s' encoding_id=0x%08x",enc[i].name,enc[i].encoding_id);*/
- gfpost("pdp_xvideo: grabbed port %d on adaptor %d",xv_port,i);
- size_t size = sx*sy*4;
- data = new uint8[size];
- for (i=0; i<size; i++) data[i]=0;
- xvi = XvCreateImage(display,xv_port,0x51525762,(char *)data,sx,sy);
- last_encoding=-1;
- if (!xvi) RAISE("XvCreateImage problem");
- } break;
-#endif
- default: RAISE("transfer mode '%s' not available", xfers[transfer]);
- }
- int status = XInitImage(ximage);
- if (status!=1) gfpost("XInitImage returned: %d", status);
- return true;
-retry:
- gfpost("shm got disabled, retrying...");
- return alloc_image(sx,sy);
-}
-
-void FormatX11::dealloc_image () {
- if (!ximage) return;
- switch (transfer) {
- case 0: XFree(ximage); ximage=0; image=Pt<uint8>(); break;
-#ifdef HAVE_X11_SHARED_MEMORY
- case 1:
- shmdt(ximage->data);
- XShmDetach(display,shm_info);
- if (shm_info) {delete shm_info; shm_info=0;}
- XFree(ximage);
- ximage = 0;
- image = Pt<uint8>();
- break;
-#endif
-#ifdef HAVE_X11_XVIDEO
- case 2: {
- if (data) delete[] data;
- if (xvi) XFree(xvi);
- xvi=0;
- data=0;
- }
- break;
-#endif
- default: RAISE("transfer mode '%s' not available",xfers[transfer]);
- }
-}
-
-void FormatX11::resize_window (int sx, int sy) {
- if (sy<16) sy=16; if (sy>4096) RAISE("height too big");
- if (sx<16) sx=16; if (sx>4096) RAISE("width too big");
- alloc_image(sx,sy);
- if (window) {
- if (is_owner && !lock_size) {
- set_wm_hints();
- XResizeWindow(display,window,sx,sy);
- }
- } else {
- XSetWindowAttributes xswa;
- xswa.do_not_propagate_mask = 0; //?
- xswa.override_redirect = override_redirect; //#!@#$
- window = XCreateWindow(display,
- parent, pos[1], pos[0], sx, sy, 0,
- CopyFromParent, InputOutput, CopyFromParent,
- CWOverrideRedirect|CWDontPropagate, &xswa);
- if(!window) RAISE("can't create window");
- set_wm_hints();
- _0_fall_thru(0,0,is_owner);
- if (is_owner) XMapRaised(display, window);
- imagegc = XCreateGC(display, window, 0, NULL);
- if (visual->c_class == PseudoColor) prepare_colormap();
- }
- XSync(display,0);
-}
-
-GRID_INLET(FormatX11,0) {
- if (in->dim->n != 3)
- RAISE("expecting 3 dimensions: rows,columns,channels");
- if (in->dim->get(2)!=3 && in->dim->get(2)!=4)
- RAISE("expecting 3 or 4 channels: red,green,blue,ignored (got %d)",in->dim->get(2));
- int sxc = in->dim->prod(1);
- int sx = in->dim->get(1), osx = dim->get(1);
- int sy = in->dim->get(0), osy = dim->get(0);
- in->set_factor(sxc);
- if (sx!=osx || sy!=osy) resize_window(sx,sy);
- if (in->dim->get(2)!=bit_packing->size) {
- bit_packing->mask[3]=0;
- bit_packing = new BitPacking(bit_packing->endian,
- bit_packing->bytes, in->dim->get(2), bit_packing->mask);
- }
-} GRID_FLOW {
- int bypl = ximage->bytes_per_line;
- int sxc = in->dim->prod(1);
- int sx = in->dim->get(1);
- int y = in->dex/sxc;
- int oy = y;
- for (; n>0; y++, data+=sxc, n-=sxc) {
- // convert line
- if (use_stripes) {
- int o=y*bypl;
- for (int x=0, i=0, k=y%3; x<sx; x++, i+=3, k=(k+1)%3) {
- image[o+x] = (k<<6) | data[i+k]>>2;
- }
- } else {
- bit_packing->pack(sx, data, image+y*bypl);
- }
- }
-} GRID_FINISH {
- show_section(0,0,in->dim->get(1),in->dim->get(0));
-} GRID_END
-
-\def void close () {
- if (!this) RAISE("stupid error: trying to close display NULL. =)");
- bit_packing=0;
- IEVAL(rself,"@clock.unset");
- if (is_owner) XDestroyWindow(display,window);
- XSync(display,0);
- dealloc_image();
- XCloseDisplay(display);
- display=0;
- rb_call_super(argc,argv);
-}
-
-\def void _0_out_size (int sy, int sx) { resize_window(sx,sy); }
-
-\def void _0_setcursor (int shape) {
- shape = 2*(shape&63);
- Cursor c = XCreateFontCursor(display,shape);
- XDefineCursor(display,window,c);
- XFlush(display);
-}
-
-\def void _0_hidecursor () {
- Font font = XLoadFont(display,"fixed");
- XColor color; /* bogus */
- Cursor c = XCreateGlyphCursor(display,font,font,' ',' ',&color,&color);
- XDefineCursor(display,window,c);
- XFlush(display);
-}
-
-void FormatX11::prepare_colormap() {
- Colormap colormap = XCreateColormap(display,window,visual,AllocAll);
- XColor colors[256];
- if (use_stripes) {
- for (int i=0; i<192; i++) {
- int k=(i&63)*0xffff/63;
- colors[i].pixel = i;
- colors[i].red = (i>>6)==0 ? k : 0;
- colors[i].green = (i>>6)==1 ? k : 0;
- colors[i].blue = (i>>6)==2 ? k : 0;
- colors[i].flags = DoRed | DoGreen | DoBlue;
- }
- XStoreColors(display,colormap,colors,192);
- } else {
- for (int i=0; i<256; i++) {
- colors[i].pixel = i;
- colors[i].red = ((i>>0)&7)*0xffff/7;
- colors[i].green = ((i>>3)&7)*0xffff/7;
- colors[i].blue = ((i>>6)&3)*0xffff/3;
- colors[i].flags = DoRed | DoGreen | DoBlue;
- }
- XStoreColors(display,colormap,colors,256);
- }
- XSetWindowColormap(display,window,colormap);
-}
-
-void FormatX11::open_display(const char *disp_string) {
- display = XOpenDisplay(disp_string);
- if(!display) RAISE("ERROR: opening X11 display: %s",strerror(errno));
- // btw don't expect too much from Xlib error handling.
- // Xlib, you are so free of the ravages of intelligence...
- XSetErrorHandler(FormatX11_error_handler);
- Screen *screen = DefaultScreenOfDisplay(display);
- int screen_num = DefaultScreen(display);
- visual = DefaultVisual(display, screen_num);
- root_window = DefaultRootWindow(display);
- depth = DefaultDepthOfScreen(screen);
- colormap = 0;
-
- switch(visual->c_class) {
- // without colormap
- case TrueColor: case DirectColor: break;
- // with colormap
- case PseudoColor: if (depth!=8) RAISE("ERROR: with colormap, only supported depth is 8 (got %d)", depth); break;
- default: RAISE("ERROR: visual type not supported (got %d)", visual->c_class);
- }
-
-#if defined(HAVE_X11_XVIDEO)
- transfer = 2;
-#elif defined(HAVE_X11_SHARED_MEMORY)
- transfer = !! XShmQueryExtension(display);
-#else
- transfer = 0;
-#endif
-}
-
-Window FormatX11::search_window_tree (Window xid, Atom key, const char *value, int level) {
- if (level>2) return 0xDeadBeef;
- Window root_r, parent_r;
- Window *children_r;
- unsigned int nchildren_r;
- XQueryTree(display,xid,&root_r,&parent_r,&children_r,&nchildren_r);
- Window target = 0xDeadBeef;
- for (int i=0; i<(int)nchildren_r; i++) {
- Atom actual_type_r;
- int actual_format_r;
- unsigned long nitems_r, bytes_after_r;
- unsigned char *prop_r;
- XGetWindowProperty(display,children_r[i],key,0,666,0,AnyPropertyType,
- &actual_type_r,&actual_format_r,&nitems_r,&bytes_after_r,&prop_r);
- uint32 value_l = strlen(value);
- bool match = prop_r && nitems_r>=value_l &&
- strncmp((char *)prop_r+nitems_r-value_l,value,value_l)==0;
- XFree(prop_r);
- if (match) {target=children_r[i]; break;}
- target = search_window_tree(children_r[i],key,value,level+1);
- if (target != 0xDeadBeef) break;
- }
- if (children_r) XFree(children_r);
- return target;
-}
-
-\def void _0_set_geometry (int y, int x, int sy, int sx) {
- pos[0]=y; pos[1]=x;
- XMoveWindow(display,window,x,y);
- resize_window(sx,sy);
- XFlush(display);
-}
-
-\def void _0_fall_thru (int flag) {
- int mask = ExposureMask | StructureNotifyMask;
- if (flag) mask |= ExposureMask|StructureNotifyMask|PointerMotionMask|
- ButtonPressMask|ButtonReleaseMask|ButtonMotionMask|
- KeyPressMask|KeyReleaseMask;
- XSelectInput(display, window, mask);
- XFlush(display);
-}
-
-\def void _0_transfer (Symbol s) {
- if (s==SYM(plain)) transfer=0;
- else if (s==SYM(xshm)) transfer=1;
- else if (s==SYM(xvideo)) transfer=2;
- else RAISE("unknown transfer mode (possible: plain xshm xvideo)");
-}
-
-\def void _0_title (String s=Qnil) {
- rb_ivar_set(rself,SI(@title),s);
- set_wm_hints();
-}
-
-\def void initialize (...) {
- int sy=240, sx=320; // defaults
- rb_call_super(argc,argv);
- rb_ivar_set(rself,SI(@title),Qnil);
- argv++, argc--;
- VALUE domain = argc<1 ? SYM(here) : argv[0];
- int i;
- char host[256];
- if (domain==SYM(here)) {
- open_display(0);
- i=1;
- } else if (domain==SYM(local)) {
- if (argc<2) RAISE("open x11 local: not enough args");
- sprintf(host,":%ld",NUM2LONG(argv[1]));
- open_display(host);
- i=2;
- } else if (domain==SYM(remote)) {
- if (argc<3) RAISE("open x11 remote: not enough args");
- sprintf(host,"%s:%ld",rb_sym_name(argv[1]),NUM2LONG(argv[2]));
- open_display(host);
- i=3;
- } else if (domain==SYM(display)) {
- if (argc<2) RAISE("open x11 display: not enough args");
- strcpy(host,rb_sym_name(argv[1]));
- for (int k=0; host[k]; k++) if (host[k]=='%') host[k]==':';
- gfpost("mode `display', DISPLAY=`%s'",host);
- open_display(host);
- i=2;
- } else {
- RAISE("x11 destination syntax error");
- }
-
- for(;i<argc;i++) {
- Ruby a=argv[i];
- if (a==SYM(override_redirect)) override_redirect = true;
- else if (a==SYM(use_stripes)) use_stripes = true;
- else RAISE("argument '%s' not recognized",rb_sym_name(argv[i]));
- }
-
- pos[1]=pos[0]=0;
- parent = root_window;
- if (i>=argc) {
- } else {
- VALUE winspec = argv[i];
- if (winspec==SYM(root)) {
- window = root_window;
- is_owner = false;
- } else if (winspec==SYM(embed)) {
- Ruby title_s = rb_funcall(argv[i+1],SI(to_s),0);
- char *title = strdup(rb_str_ptr(title_s));
- sy = sx = pos[0] = pos[1] = 0;
- parent = search_window_tree(root_window,XInternAtom(display,"WM_NAME",0),title);
- free(title);
- if (parent == 0xDeadBeef) RAISE("Window not found.");
- } else if (winspec==SYM(embed_by_id)) {
- const char *winspec2 = rb_sym_name(argv[i+1]);
- if (strncmp(winspec2,"0x",2)==0) {
- parent = strtol(winspec2+2,0,16);
- } else {
- parent = atoi(winspec2);
- }
- } else {
- if (TYPE(winspec)==T_SYMBOL) {
- const char *winspec2 = rb_sym_name(winspec);
- if (strncmp(winspec2,"0x",2)==0) {
- window = strtol(winspec2+2,0,16);
- } else {
- window = atoi(winspec2); // huh?
- }
- } else {
- window = INT(winspec);
- }
- is_owner = false;
- sy = sx = pos[0] = pos[1] = 0;
- }
- }
-
- // "resize" also takes care of creation
- resize_window(sx,sy);
-
- if (is_owner) {
- Atom wmDeleteAtom = XInternAtom(display, "WM_DELETE_WINDOW", False);
- XSetWMProtocols(display,window,&wmDeleteAtom,1);
- }
-
- Visual *v = visual;
- int disp_is_le = !ImageByteOrder(display);
- int bpp = ximage->bits_per_pixel;
- switch(visual->c_class) {
- case TrueColor: case DirectColor: {
- uint32 masks[3] = { v->red_mask, v->green_mask, v->blue_mask };
- bit_packing = new BitPacking(disp_is_le, bpp/8, 3, masks);
- } break;
- case PseudoColor: {
- uint32 masks[3] = { 0x07, 0x38, 0xC0 };
- bit_packing = new BitPacking(disp_is_le, bpp/8, 3, masks);
- } break;
- default: { RAISE("huh?"); }
- }
- IEVAL(rself,"@clock = Clock.new self; @clock.delay 0");
- show_section(0,0,sx,sy);
-}
-
-\classinfo {
- IEVAL(rself,"install '#io:x11',1,1;@mode=6;@comment='X Window System Version 11.x'");
-}
-\end class FormatX11
-void startup_x11 () {
- \startall
-}
-
diff --git a/externals/gridflow/images/README b/externals/gridflow/images/README
deleted file mode 100644
index f5ff58d0..00000000
--- a/externals/gridflow/images/README
+++ /dev/null
@@ -1,53 +0,0 @@
-Here's the file to list the authors of the pictures, as
-far as I (matju) know:
-
-b001.jpg, r001.jpg:
- Eyewire Catalogue, 1999 or before. It should be checked
- whether there still exists a copyright on this, because
- the original provider has disappeared (bankruptcy??)
- several years ago.
-
-g001.jpg:
- by Alexandre Castonguay, 1999 (?).
-
-bluemarble.jpg:
- NASA (?)
-
-lada.jpg:
- hungarian newspaper ad.
-
-lena.jpg:
- Lena Sjööblom Soderberg, centerfold of Playboy 1972.11.
- Researchers in infographics have extensively used that
- picture without necessarily asking for copyright, and
- apparently Playboy doesn't mind.
-
-lucida-typewriter-12.grid.gz:
- a grid(256,13,7) containing the Lucida Typewriter 12
- medium font.
-
-opensource.png:
- modification of a World War Two poster. Both authors
- (original's and spoof's) are unknown to me. Should check.
-
-rose.jpg:
- unknown origin.
-
-ruby0216.jpg:
- photo from a conference about the Ruby programming language,
- held somewhere in Japan in 2003 or so. (?)
-
-teapot.png:
- Researchers in infographics have also extensively used
- that picture (actually the wireframe model). This is
- (afaik) the original model, produced in the 1970's (?)
- by one such researcher, and then was rendered in the
- 1990's using the Povray raytracer, and then bundled as
- teapot.ppm in Tcl/Tk, and finally in 2001 I grabbed
- that picture
-
-test.mpeg:
- unknown origin. Too small to be copyrightable.
-
-tux.tga.gz:
- unknown origin.
diff --git a/externals/gridflow/images/b001.jpg b/externals/gridflow/images/b001.jpg
deleted file mode 100644
index 444bf24e..00000000
--- a/externals/gridflow/images/b001.jpg
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/images/babbage.jpg b/externals/gridflow/images/babbage.jpg
deleted file mode 100644
index 1f8eef37..00000000
--- a/externals/gridflow/images/babbage.jpg
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/images/bluemarble.jpg b/externals/gridflow/images/bluemarble.jpg
deleted file mode 100644
index ea182f5f..00000000
--- a/externals/gridflow/images/bluemarble.jpg
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/images/g001.jpg b/externals/gridflow/images/g001.jpg
deleted file mode 100644
index ff2b5019..00000000
--- a/externals/gridflow/images/g001.jpg
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/images/lada.jpg b/externals/gridflow/images/lada.jpg
deleted file mode 100644
index d53a5ed2..00000000
--- a/externals/gridflow/images/lada.jpg
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/images/lena.jpg b/externals/gridflow/images/lena.jpg
deleted file mode 100644
index 11c051f1..00000000
--- a/externals/gridflow/images/lena.jpg
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/images/lucida-typewriter-12.grid.gz b/externals/gridflow/images/lucida-typewriter-12.grid.gz
deleted file mode 100644
index 89064d1a..00000000
--- a/externals/gridflow/images/lucida-typewriter-12.grid.gz
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/images/opensource.png b/externals/gridflow/images/opensource.png
deleted file mode 100644
index aca9d1cf..00000000
--- a/externals/gridflow/images/opensource.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/images/r001.jpg b/externals/gridflow/images/r001.jpg
deleted file mode 100644
index c2374f9c..00000000
--- a/externals/gridflow/images/r001.jpg
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/images/rose.jpg b/externals/gridflow/images/rose.jpg
deleted file mode 100644
index b34ca5d3..00000000
--- a/externals/gridflow/images/rose.jpg
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/images/ruby0216.jpg b/externals/gridflow/images/ruby0216.jpg
deleted file mode 100644
index 55ddb3cc..00000000
--- a/externals/gridflow/images/ruby0216.jpg
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/images/teapot.png b/externals/gridflow/images/teapot.png
deleted file mode 100644
index 3632eb7c..00000000
--- a/externals/gridflow/images/teapot.png
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/images/test.mpeg b/externals/gridflow/images/test.mpeg
deleted file mode 100644
index bc10ef44..00000000
--- a/externals/gridflow/images/test.mpeg
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/images/tux.tga.gz b/externals/gridflow/images/tux.tga.gz
deleted file mode 100644
index d520fc4e..00000000
--- a/externals/gridflow/images/tux.tga.gz
+++ /dev/null
Binary files differ
diff --git a/externals/gridflow/optional/lti.rb b/externals/gridflow/optional/lti.rb
deleted file mode 100644
index f46c4141..00000000
--- a/externals/gridflow/optional/lti.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-include GridFlow
-
-FObject.subclass("lti",1,1) {
- # huh
-}
diff --git a/externals/gridflow/optional/rblti/LICENSE b/externals/gridflow/optional/rblti/LICENSE
deleted file mode 100644
index 34bac119..00000000
--- a/externals/gridflow/optional/rblti/LICENSE
+++ /dev/null
@@ -1,462 +0,0 @@
-The GNU Lesser General Public License (LGPL)
-
-Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple
-Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to
-copy and distribute verbatim copies of this license document, but
-changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
-as the successor of the GNU Library Public License, version 2, hence
-the version number 2.1.]
-
-Preamble
-
-The licenses for most software are designed to take away your freedom
-to share and change it. By contrast, the GNU General Public Licenses
-are intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.
-
-This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations
-below.
-
-When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
-To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
-For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
-We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
-To protect each distributor, we want to make it very clear that there
-is no warranty for the free library. Also, if the library is modified
-by someone else and passed on, the recipients should know that what
-they have is not the original version, so that the original author's
-reputation will not be affected by problems that might be introduced
-by others.
-
-Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
-Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
-When a program is linked with a library, whether statically or using a
-shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
-We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
-For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it
-becomes a de-facto standard. To achieve this, non-free programs must
-be allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
-In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
-Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
-The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
-TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-0. This License Agreement applies to any software library or other
- program which contains a notice placed by the copyright holder or
- other authorized party saying it may be distributed under the terms
- of this Lesser General Public License (also called "this
- License"). Each licensee is addressed as "you".
-
-A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-"Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control
-compilation and installation of the library.
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does and
-what the program that uses the Library does.
-
-1. You may copy and distribute verbatim copies of the Library's
- complete source code as you receive it, in any medium, provided
- that you conspicuously and appropriately publish on each copy an
- appropriate copyright notice and disclaimer of warranty; keep
- intact all the notices that refer to this License and to the
- absence of any warranty; and distribute a copy of this License
- along with the Library.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a
-fee.
-
-2. You may modify your copy or copies of the Library or any portion of
- it, thus forming a work based on the Library, and copy and
- distribute such modifications or work under the terms of Section 1
- above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
- c) You must cause the whole of the work to be licensed at no charge
- to all third parties under the terms of this License.
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
-(For example, a function in a library to compute square roots has a
-purpose that is entirely well-defined independent of the
-application. Therefore, Subsection 2d requires that any
-application-supplied function or table used by this function must be
-optional: if the application does not supply it, the square root
-function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-3. You may opt to apply the terms of the ordinary GNU General Public
- License instead of this License to a given copy of the Library. To
- do this, you must alter all the notices that refer to this License,
- so that they refer to the ordinary GNU General Public License,
- version 2, instead of to this License. (If a newer version than
- version 2 of the ordinary GNU General Public License has appeared,
- then you can specify that version instead if you wish.) Do not make
- any other change in these notices.
-
-Once this change is made in a given copy, it is irreversible for that
-copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-This option is useful when you wish to copy part of the code of the
-Library into a program that is not a library.
-
-4. You may copy and distribute the Library (or a portion or derivative
- of it, under Section 2) in object code or executable form under the
- terms of Sections 1 and 2 above provided that you accompany it with
- the complete corresponding machine-readable source code, which must
- be distributed under the terms of Sections 1 and 2 above on a
- medium customarily used for software interchange.
-
-If distribution of object code is made by offering access to copy from
-a designated place, then offering equivalent access to copy the source
-code from the same place satisfies the requirement to distribute the
-source code, even though third parties are not compelled to copy the
-source along with the object code.
-
-5. A program that contains no derivative of any portion of the
- Library, but is designed to work with the Library by being compiled
- or linked with it, is called a "work that uses the Library". Such a
- work, in isolation, is not a derivative work of the Library, and
- therefore falls outside the scope of this License.
-
-However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License. Section
-6 states terms for distribution of such executables.
-
-When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is
-not. Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
-If such an object file uses only numerical parameters, data structure
-layouts and accessors, and small macros and small inline functions
-(ten lines or less in length), then the use of the object file is
-unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section
-6. Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
-6. As an exception to the Sections above, you may also combine or link
- a "work that uses the Library" with the Library to produce a work
- containing portions of the Library, and distribute that work under
- terms of your choice, provided that the terms permit modification
- of the work for the customer's own use and reverse engineering for
- debugging such modifications.
-
-You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
-a) Accompany the work with the complete corresponding machine-readable
- source code for the Library including whatever changes were used in
- the work (which must be distributed under Sections 1 and 2 above);
- and, if the work is an executable linked with the Library, with the
- complete machine-readable "work that uses the Library", as object
- code and/or source code, so that the user can modify the Library
- and then relink to produce a modified executable containing the
- modified Library. (It is understood that the user who changes the
- contents of definitions files in the Library will not necessarily
- be able to recompile the application to use the modified
- definitions.)
-
-b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
-c) Accompany the work with a written offer, valid for at least three
- years, to give the same user the materials specified in Subsection
- 6a, above, for a charge no more than the cost of performing this
- distribution.
-
-d) If distribution of the work is made by offering access to copy from
- a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
-e) Verify that the user has already received a copy of these materials
- or that you have already sent this user a copy.
-
-For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
-It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
-7. You may place library facilities that are a work based on the
- Library side-by-side in a single library together with other
- library facilities not covered by this License, and distribute such
- a combined library, provided that the separate distribution of the
- work based on the Library and of the other library facilities is
- otherwise permitted, and provided that you do these two things:
-
-a) Accompany the combined library with a copy of the same work based
- on the Library, uncombined with any other library facilities. This
- must be distributed under the terms of the Sections above.
-
-b) Give prominent notice with the combined library of the fact that
- part of it is a work based on the Library, and explaining where to
- find the accompanying uncombined form of the same work.
-
-8. You may not copy, modify, sublicense, link with, or distribute the
- Library except as expressly provided under this License. Any
- attempt otherwise to copy, modify, sublicense, link with, or
- distribute the Library is void, and will automatically terminate
- your rights under this License. However, parties who have received
- copies, or rights, from you under this License will not have their
- licenses terminated so long as such parties remain in full
- compliance.
-
-9. You are not required to accept this License, since you have not
- signed it. However, nothing else grants you permission to modify or
- distribute the Library or its derivative works. These actions are
- prohibited by law if you do not accept this License. Therefore, by
- modifying or distributing the Library (or any work based on the
- Library), you indicate your acceptance of this License to do so,
- and all its terms and conditions for copying, distributing or
- modifying the Library or works based on it.
-
-10. Each time you redistribute the Library (or any work based on the
- Library), the recipient automatically receives a license from the
- original licensor to copy, distribute, link with or modify the
- Library subject to these terms and conditions. You may not impose
- any further restrictions on the recipients' exercise of the rights
- granted herein. You are not responsible for enforcing compliance
- by third parties with this License.
-
-11. If, as a consequence of a court judgment or allegation of patent
- infringement or for any other reason (not limited to patent
- issues), conditions are imposed on you (whether by court order,
- agreement or otherwise) that contradict the conditions of this
- License, they do not excuse you from the conditions of this
- License. If you cannot distribute so as to satisfy simultaneously
- your obligations under this License and any other pertinent
- obligations, then as a consequence you may not distribute the
- Library at all. For example, if a patent license would not permit
- royalty-free redistribution of the Library by all those who
- receive copies directly or indirectly through you, then the only
- way you could satisfy both it and this License would be to refrain
- entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply, and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-12. If the distribution and/or use of the Library is restricted in
- certain countries either by patents or by copyrighted interfaces,
- the original copyright holder who places the Library under this
- License may add an explicit geographical distribution limitation
- excluding those countries, so that distribution is permitted only
- in or among countries not thus excluded. In such case, this
- License incorporates the limitation as if written in the body of
- this License.
-
-13. The Free Software Foundation may publish revised and/or new
- versions of the Lesser General Public License from time to
- time. Such new versions will be similar in spirit to the present
- version, but may differ in detail to address new problems or
- concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
-14. If you wish to incorporate parts of the Library into other free
- programs whose distribution conditions are incompatible with
- these, write to the author to ask for permission. For software
- which is copyrighted by the Free Software Foundation, write to the
- Free Software Foundation; we sometimes make exceptions for
- this. Our decision will be guided by the two goals of preserving
- the free status of all derivatives of our free software and of
- promoting the sharing and reuse of software generally.
-
-NO WARRANTY
-
-15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
- WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE
- LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS
- AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY
- OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
- PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE
- DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR
- OR CORRECTION.
-
-16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
- WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
- MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE
- LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
- INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
- INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF
- DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
- OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY
- OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
- ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-END OF TERMS AND CONDITIONS
-
-
-
diff --git a/externals/gridflow/optional/rblti/Makefile b/externals/gridflow/optional/rblti/Makefile
deleted file mode 100644
index d50b1aa7..00000000
--- a/externals/gridflow/optional/rblti/Makefile
+++ /dev/null
@@ -1,47 +0,0 @@
-LTIPREFIX = /usr/local
-#LTIPREFIX = /home/matju
-LIBS = $(LTIPREFIX)/lib/ltilib/libltir.a -lpng -ljpeg
-INCS = -I$(LTIPREFIX)/include/ltilib -I/usr/share/swig1.3/std
-PINC = -I/usr/include/python
-RINC = -I`ruby -rrbconfig -e'h=Config::CONFIG;puts h["rubylibdir"]+"/"+h["arch"]'`
-
-default:: python
-
-python:: _pylti.so
- python -c 'import pylti'
- python testpylti.py fan.jpg
-
-_pylti.so: pylti_wrap.o Makefile
- g++ -shared -o _pylti.so pylti_wrap.o $(LIBS)
-
-pylti_wrap.o: pylti_wrap.cxx
- g++ $(PINC) -Ipatched $(INCS) -c pylti_wrap.cxx
-
-pylti_wrap.cxx: ./swig/pylti.i
- swig -v -c++ -python -DHAVE_LIBJPEG -DHAVE_LIBPNG -I./generated -I./patched \
- $(INCS) -w509,-312,-362,-389 -o ./pylti_wrap.cxx ./swig/pylti.i
- #swig -c++ -python -DHAVE_LIBJPEG -DHAVE_LIBPNG -I./generated_python -I./patched \
- # $(INCS) -w509,-312,-362,-389 pylti.i
-
-ruby:: rblti.so
- ruby -e 'require "rblti"'
-
-rblti.so: rblti_wrap.o Makefile
- g++ -shared -o rblti.so rblti_wrap.o $(LIBS)
-
-rblti_wrap.o: rblti_wrap.cxx
- g++ $(RINC) -Ipatched $(INCS) -c rblti_wrap.cxx
-
-rblti_wrap.s: rblti_wrap.cxx
- g++ $(RINC) -Ipatched $(INCS) -S rblti_wrap.cxx
-
-rblti_wrap.cxx: rblti.i
- swig -c++ -ruby -DHAVE_LIBJPEG -DHAVE_LIBPNG -I./generated -I./patched \
- -fcompact -fvirtual $(INCS) -w509,-312,-362,-389,-801,-314 rblti.i
-
-clean::
- rm -f \
- pylti.so pylti_wrap.o pylti_wrap.cxx \
- rblti.so rblti_wrap.o rblti_wrap.cxx
-
-
diff --git a/externals/gridflow/optional/rblti/gen_ltilib_classes.py b/externals/gridflow/optional/rblti/gen_ltilib_classes.py
deleted file mode 100644
index 09c2aee9..00000000
--- a/externals/gridflow/optional/rblti/gen_ltilib_classes.py
+++ /dev/null
@@ -1,354 +0,0 @@
-#!/usr/bin/env python
-#******************************************************************************
-# rblti, Copyright 2005 by Mathieu Bouchard and Heri Andria
-# pylti, Copyright 2005 by Michael Neuroth
-# a wrapper for ltilib using SWIG
-#******************************************************************************
-#
-# Tool to generate header files for SWIG to process the nested classes "parameters"
-#
-# 1) generate XML files for the ltilib with doxygen (tested with version 1.4.3) (use this switch in doc.cfg file: GENERATE_XML = YES)
-# 2) generate the new header files for SWIG with this python script
-
-from xml.dom import minidom
-import os
-import sys
-from distutils.text_file import TextFile
-str_version = '0.32'
-
-basedir=None
-# handle the settings: WORKAREA has to be defined !
-if len(sys.argv)>1:
- basedir = sys.argv[1]
-else:
- workarea = os.getenv('WORKAREA')
- # is pylti not part of the ltilib ? Yes --> than we need a directory structure of WORKAREA_PATH/import/ltilib/xml
- if workarea<>None:
- basedir = workarea+os.sep+'import'+os.sep+'ltilib'+os.sep+'xml'+os.sep
- # check if we are in misc directory of the ltilib distribution (ltilib/misc/pylti)
- # very simple way: navigate up and navigate down again
- else:
- strCheckPath = '..'+os.sep+'..'+os.sep+'misc'+os.sep+'pylti'+'-'+str_version
- try:
- # try to read lti.i, this is a good indication of a pylti directory
- aTestFile = TextFile(filename=strCheckPath+os.sep+'lti.i')
- basedir = '..'+os.sep+'..'+os.sep+'xml'+os.sep # move up ltipy and misc directory
- except IOError: pass
-
-output_dir = 'generated'
-#output_dir = 'generated_ruby'
-
-def f(x): return 'classlti_1_1'+x+'.xml'
-#def g(x): return 'lti::_'+x+'::_'+x+'_parameters'
-def g(x): return 'lti::_'+x+'::'+x+'_parameters'
-
-# list of tuples with ( xml-file-name, full-qualified-name of the base class )
-lst = [ (f('functor_1_1parameters'), 'lti::ioObject')
- , (f('ioFunctor_1_1parameters'), g('functor'))
- , (f('ioImage_1_1parameters'), g('ioFunctor'))
- , (f('usePalette_1_1parameters'), g('functor'))
- , (f('segmentation_1_1parameters'), g('functor'))
- , (f('regionGrowing_1_1parameters'), g('segmentation'))
- , (f('meanShiftSegmentation_1_1parameters'), g('segmentation'))
- , (f('kMeansSegmentation_1_1parameters'), g('segmentation'))
- , (f('whiteningSegmentation_1_1parameters'), g('segmentation'))
- , (f('csPresegmentation_1_1parameters'), g('segmentation'))
- , (f('colorQuantization_1_1parameters'), g('functor'))
- , (f('kMColorQuantization_1_1parameters'), g('colorQuantization'))
- , (f('viewerBase_1_1parameters'), g('functor'))
- , (f('externViewer_1_1parameters'), g('viewerBase'))
- , (f('objectsFromMask_1_1parameters'), g('segmentation'))
- , (f('objectsFromMask_1_1objectStruct'), 'lti::ioObject')
- , (f('tree_1_1node'), 'lti::ioObject')
- , (f('featureExtractor_1_1parameters'), g('functor'))
- , (f('globalFeatureExtractor_1_1parameters'),g('featureExtractor'))
- , (f('localFeatureExtractor_1_1parameters'), g('featureExtractor'))
- , (f('geometricFeatures_1_1parameters'), g('globalFeatureExtractor'))
- , (f('localMoments_1_1parameters'), g('localFeatureExtractor'))
- , (f('chromaticityHistogram_1_1parameters'), g('globalFeatureExtractor'))
- , (f('modifier_1_1parameters'), g('functor'))
- , (f('polygonApproximation_1_1parameters'), g('modifier'))
- , (f('transform_1_1parameters'), g('functor'))
- , (f('gradientFunctor_1_1parameters'), g('transform'))
- , (f('skeleton_1_1parameters'), g('transform'))
- , (f('colorContrastGradient_1_1parameters'), g('gradientFunctor'))
- , (f('edgeDetector_1_1parameters'), g('modifier'))
- , (f('classicEdgeDetector_1_1parameters'), g('edgeDetector'))
- , (f('cannyEdges_1_1parameters'), g('edgeDetector'))
- , (f('filter_1_1parameters'), g('modifier'))
- , (f('convolution_1_1parameters'), g('filter'))
- , (f('morphology_1_1parameters'), g('modifier'))
- , (f('dilation_1_1parameters'), g('morphology'))
- , (f('erosion_1_1parameters'), g('morphology'))
- , (f('distanceTransform_1_1parameters'), g('morphology'))
- , (f('classifier_1_1parameters'), 'lti::ioObject')
- , (f('classifier_1_1outputTemplate'), 'lti::ioObject')
- , (f('classifier_1_1outputVector'), 'lti::ioObject')
- , (f('decisionTree_1_1parameters'), g('classifier'))
- , (f('ioBMP_1_1parameters'), g('ioFunctor'))
- , (f('ioPNG_1_1parameters'), g('ioFunctor'))
- , (f('ioJPEG_1_1parameters'), g('ioFunctor'))
- , (f('distanceTransform_1_1sedMask'), None)
- ]
-
-# some constants
-nl = '\n'
-
-# Doku:
-#-------
-# 'memberdef' ==> 'kind'=function
-# --> 'name'
-# --> 'type' # Return Type
-# --> 'param' # Argumente
-# --> 'type'
-
-def WriteFile(name,txt):
- f = open(name,'w')
- f.write(txt)
-
-def GetAttribute(attribs,key):
- for k,v in attribs:
- if k==key:
- return v
-
-def GetValue(elem):
- #print elem,elem.firstChild,elem.nodeType
- if elem.nodeType == elem.TEXT_NODE:
- return elem.data
- elif elem.nodeType == elem.ELEMENT_NODE:
- if elem.firstChild <> None:
- s = ''
- for e in elem.childNodes:
- s += GetValue(e) #+' '
- return s
- return ''
- elif elem.nodeType == elem.ATTRIBUTE_NODE:
- return 'xxxx'
- elif elem.firstChild.nodeType == elem.TEXT_NODE:
- return elem.firstChild.data
- return '???'
-
-def GetValueForItem(node,itemname,bOnlyFirst=False):
- s = ''
- nodes = node.getElementsByTagName(itemname)
- #print '>>>>>>>',nodes,itemname,len(nodes)
- if bOnlyFirst:
- s += GetValue( nodes[0] )
- else:
- for node in nodes:
- s += GetValue( node )
- s += ' '
- return s
-
-def ProcessFunction(member,classname,newclassname,bIsConst=False,bIsPureVirtual=False,bIsHeader=True):
- s = ''
- arg = 'arg'
- names = member.getElementsByTagName('name')
- # es sollte immer nur einen Namen geben !
- nameNode = names[0]
- name = GetValue(nameNode)
-
- s += GetValueForItem(member,'type',bOnlyFirst=True)
- s += ' '
- if not bIsHeader:
- s += classname+'::'
- s += GetValueForItem(member,'name')
- s += '( '
-
- # Behandlung des Constructors
- bIsConstructor = (name == classname)
-
- params = member.getElementsByTagName('param')
- for i in range(len(params)):
- if i>0:
- s += ', '
- s += GetValueForItem(params[i],'type')
- s += ' '+arg+str(i)
-
- s += ' )'
- if bIsConst:
- s += ' const'
- if bIsPureVirtual:
- s += ' = 0'
-
- if not bIsHeader:
- s += nl
- s += '{'+nl
- s += ' '+'pObj->'+name+'('
- for i in range(len(params)):
- if i>0:
- s += ', '
- s += arg+str(i)
- s += ');'+nl
- s += '}'
-
- s += ';'+nl
-
- # dies ist fuer das manuelle name mangling notwendig !
- s = s.replace(classname,newclassname)
-
- return s
-
-def VerifyParameterType(sType):
- """
- Sonderbehandlung fuer den Typ, falls es ein parameters Typ ist,
- notwendig, da der parameters Typ mit einem define umbenannt wird...
-
- Beispiel: gradientFunctor::parameters --> gradientFunctor_parameters
- """
- s = sType
- elem = sType.split('::')
- if len(elem)>1 and elem[-1]=='parameters':
- s = 'lti_'+sType.replace('::','_')
- print "FOUND:",s
- return s
-
-def ProcessAttribute(member):
- s = ''
- sType = GetValueForItem(member,'type',bOnlyFirst=True)
- sType = VerifyParameterType(sType)
- s += sType
- s += ' '
- s += GetValueForItem(member,'name')
- s += GetValueForItem(member,'argsstring')
- s += ';'
- return s
-
-def ProcessEnum(member):
- s = ''
- s += 'enum '
- name = GetValueForItem(member,'name',bOnlyFirst=True)
- # Behandlung der unbenannten enums
- if name[0]=='@':
- name = ''
- s += name
- s += ' {'+nl
- items = member.getElementsByTagName('enumvalue')
- for i in range(len(items)):
- e = items[i]
- if i>0:
- s += ','
- s += GetValueForItem(e,'name')
- val = GetValueForItem(e,'initializer')
- if val<>None and len(val)>0:
- s += ' = ' + val
- s += nl
- s += '};'+nl
- return s
-
-def ProcessMember(member,classname,newclassname,bIsHeader):
- s = ''
- attribs = member.attributes.items()
- if GetAttribute(attribs,'prot')=='public':
- if GetAttribute(attribs,'kind')=='function':
- s = ProcessFunction(member, classname, newclassname, GetAttribute(attribs,'const')=='yes', GetAttribute(attribs,'virt')=='pure-virtual', bIsHeader ) #, GetAttribute(attribs,'virtual')=='virtual'
- elif GetAttribute(attribs,'kind')=='variable':
- s = ProcessAttribute(member)
- elif GetAttribute(attribs,'kind')=='enum':
- s = ProcessEnum(member)
- else:
- s = '/* not a function or attribute */'
- return s+'\n'
-
-def ProcessAllMembers(theclassname,thenewclassname,members,bIsHeader=True,indent=' '*4):
- s = ''
- for member in members:
- s += indent+ProcessMember(member,theclassname,thenewclassname,bIsHeader)
- return s
-
-def ProcessHeaderFile(classname,theclassname,thenewclassname,members,baseclassname=None):
- s = ''
- s += '#ifndef _'+thenewclassname+'_h'+nl
- s += '#define _'+thenewclassname+'_h'+nl
- s += nl
- sClose = ''
- names = classname.split('::')
- sTypedef = 'typedef '
- for n in range(len(names)):
- if n<len(names)-1:
- s += 'namespace '
- sPre = ''
- if n>0:
- sPre += '_'
- s += sPre+names[n]+' {'+nl
- if n<len(names)-2:
- sClose += '}'+nl
- sTypedef += sPre+names[n]+'::'
- s += 'class '+thenewclassname
- if baseclassname<>None:
- s += ' : public '+baseclassname
- s += nl
- s += '{'+nl
- s += 'public:'+nl
- s += ProcessAllMembers(theclassname,thenewclassname,members)
- #s += 'private:'+nl
- #s += ' /*pObj*/'+nl
- s += '};'+nl
- s += sClose
-# s += sTypedef+thenewclassname+' '+thenewclassname[1:]+';'+nl # erstes _ vom Klassennamen entfernen
- s += sTypedef+thenewclassname+' '+thenewclassname+';'+nl
- s += '}'
- s += nl
- s += '#endif'+nl
- return s
-
-def ProcessCppFile(classname,theclassname,thenewclassname,members):
- s = ''
- s += nl
- s += '#include "'+thenewclassname+'.h"'+nl
- s += nl
- s += ProcessAllMembers(theclassname,thenewclassname,members,bIsHeader=False,indent='')
- s += nl
- return s
-
-def ProcessClass(classname,theclassname,thenewclassname,members,baseclassname=None):
- s = ''
- s += ProcessHeaderFile(classname,theclassname,thenewclassname,members,baseclassname)
- s += nl
- #s += ProcessCppFile(classname,theclassname,thenewclassname,members)
- return s
-
-def ProcessFile(filename,baseclassname,add_to_output=None):
- dom = minidom.parse(filename)
-
- #elem = dom.getElementsByTagName('compoundname')
- members = dom.getElementsByTagName('memberdef')
-
- classitem = dom.getElementsByTagName('compoundname')
- classname = GetValue(classitem[0]) # lti::object
- print "processing",classname,"...",
-
- nameitems = classname.split('::')
-
- theclassname = nameitems[-1] # object
- s = ''
- for i in range(len(nameitems)):
- # ignoriere das erste lti::
- if i>0:
-# s += '_'
- if i>1: s += '_' #to prevent class names starting with '_', Ruby hates that
- s += nameitems[i]
-
- thenewclassname = s #classname.replace('::','_') # lti_object
- print thenewclassname
-
-# outputfilename = thenewclassname
- outputfilename = '_'+thenewclassname
- if add_to_output<>None:
- outputfilename += add_to_output
- outputfilename += '.h'
-
- s = ProcessClass(classname,theclassname,thenewclassname,members,baseclassname)
-
- WriteFile(output_dir+os.sep+outputfilename,s)
-
-def ProcessAllFiles(lst):
- for e in lst:
- filename = basedir+e[0]
- ProcessFile(filename,e[1])
-
-#-------------------------------------------------
-
-ProcessAllFiles(lst)
-
-
diff --git a/externals/gridflow/optional/rblti/lti_manual.h b/externals/gridflow/optional/rblti/lti_manual.h
deleted file mode 100644
index 1228f3a8..00000000
--- a/externals/gridflow/optional/rblti/lti_manual.h
+++ /dev/null
@@ -1,7 +0,0 @@
-
-/*
- Do not delete,
-
- here you can add manual wraped functions and classes...
-
-*/
diff --git a/externals/gridflow/optional/rblti/rblti.i b/externals/gridflow/optional/rblti/rblti.i
deleted file mode 100644
index 0cb9686f..00000000
--- a/externals/gridflow/optional/rblti/rblti.i
+++ /dev/null
@@ -1,775 +0,0 @@
-//******************************************************************************
-// rblti, Copyright 2005 by Mathieu Bouchard and Heri Andria
-// pylti, Copyright 2005 by Michael Neuroth
-// a wrapper for ltilib using SWIG
-
-%module rblti
-%rename(inplace_add) operator +=;
-%rename(inplace_sub) operator -=;
-%rename(inplace_mul) operator *=;
-%rename(inplace_div) operator /=;
-%rename(not_equal) operator !=;
-%include "std_list_ruby.i"
-%include "std_string.i"
-//%include "std_list.i"
-//%include "std_vector.i"
-//%include "std_map.i"
-
-using namespace std;
-
-// sollte nach dem include der std_*.i Dateien stehen, ansonsten gibt swig einen Fehlercode zurueck !
-//%feature("autodoc","1")
-
-std::string _getStdString(std::string * pStr);
-bool _setStdString(std::string * pStr, const std::string & strValue);
-
-// for the access to c arrays
-%include "carrays.i"
-%array_functions(float,floatArray)
-%array_functions(double,doubleArray)
-%array_functions(int,intArray)
-%array_class(float,floatArr)
-%array_class(double,doubleArr)
-%array_class(int,intArr)
-
-//test:
-//namespace std {
-// %template(sdmap) map<string,double>; // TODO: does not work yet ...
-//}
-//namespace std {
-// %template(vectordouble) vector<double>;
-//}
-
-// **************************************************************************
-// **************************************************************************
-// This part is for the c++ wrapper compile phase !
-// This code will be copied into the wrapper-code (generated from swig)
-%{
-#include <string>
-
-// TODO: to be removed, only for tests
-std::string _getStdString(std::string * pStr) {return *pStr;}
-bool _setStdString(std::string * pStr, const std::string & strValue) {
- if(pStr) *pStr = strValue;
- return !!pStr;
-}
-// </to-be-removed>
-
-#undef PACKAGE_NAME
-#undef PACKAGE_TARNAME
-#undef PACKAGE_STRING
-#undef PACKAGE_VERSION
-
-#include "ltiObject.h"
-//#include "ltiTypes.h"
-#include "ltiIoHandler.h"
-#include "ltiIoObject.h"
-#include "ltiMathObject.h"
-#include "ltiRGBPixel.h"
-#include "ltiPoint.h"
-#include "ltiPointList.h"
-#include "ltiPolygonPoints.h"
-#include "ltiGeometry.h"
-#include "ltiGenericVector.h" // MODIFIED for SWIG !
-#include "ltiVector.h"
-#include "ltiArray.h"
-#include "ltiGenericMatrix.h" // MODIFIED for SWIG !
-#include "ltiMatrix.h" // MODIFIED for SWIG !
-#include "ltiTree.h"
-#include "ltiHistogram.h"
-#include "ltiImage.h"
-#include "ltiContour.h"
-#include "ltiLinearKernels.h"
-#include "ltiGradientKernels.h"
-#include "ltiHessianKernels.h"
-#include "ltiLaplacianKernel.h"
-#include "ltiSecondDerivativeKernels.h"
-
-#include "ltiFunctor.h"
-// durch SWIG manipulierte typ parameters in functor wieder zurueck benennen
-#define _functor functor // wegen Namenskonflikt mit schon deklarierter Klasse und dem Trick ueber den namespace um die Parameter-Klassen zu generieren (gen_ltilib_class.py)
-#define _functor_parameters parameters // sezte den aus dem XML generierten Parameter-Klassen-Namen wieder zurueck auf den urspruenglichen Namen
-// notwendig fuer die plain Methoden lti::write(...) und lti::read(...)
-namespace lti {typedef lti::functor::parameters functor_parameters;}
-#include "ltiModifier.h"
-#define _modifier modifier
-#define _modifier_parameters parameters
-namespace lti {typedef lti::modifier::parameters modifier_parameters;}
-#include "ltiFilter.h"
-#define _filter filter
-#define _filter_parameters parameters
-namespace lti {typedef lti::filter::parameters filter_parameters;}
-#include "ltiIOFunctor.h"
-#define _ioFunctor ioFunctor
-#define _ioFunctor_parameters parameters
-namespace lti {typedef lti::ioFunctor::parameters ioFunctor_parameters;}
-#include "ltiBMPFunctor.h"
-#define _ioBMP ioBMP
-#define _ioBMP_parameters parameters
-#define lti_ioBMP_parameters ioBMP_parameters // TODO: PATCH !
-namespace lti {typedef lti::ioBMP::parameters ioBMP_parameters;}
-#include "ltiJPEGFunctor.h"
-#define _ioJPEG ioJPEG
-#define _ioJPEG_parameters parameters
-#define lti_ioJPEG_parameters ioJPEG_parameters // TODO: PATCH !
-namespace lti {typedef lti::ioJPEG::parameters ioJPEG_parameters;}
-#include "ltiPNGFunctor.h"
-#define _ioPNG ioPNG
-#define _ioPNG_parameters parameters
-#define lti_ioPNG_parameters ioPNG_parameters
-namespace lti {typedef lti::ioPNG::parameters ioPNG_parameters;}
-#include "ltiALLFunctor.h"
-#define _ioImage ioImage
-#define _ioImage_parameters parameters
-#define ioImage_parameters parameters // TODO: PATCH !
-namespace lti {typedef lti::ioImage::parameters ioImage_parameters;}
-#include "ltiViewerBase.h"
-#define _viewerBase viewerBase
-#define _viewerBase_parameters parameters
-namespace lti {typedef lti::viewerBase::parameters viewerBase_parameters;}
-#include "ltiExternViewer.h"
-#define _externViewer externViewer
-#define _externViewer_parameters parameters
-namespace lti {typedef lti::externViewer::parameters externViewer_parameters;}
-#include "ltiSplitImage.h"
-#include "ltiSplitImageTorgI.h"
-
-#include "ltiUsePalette.h"
-#define _usePalette usePalette
-#define _usePalette_parameters parameters
-namespace lti {typedef lti::usePalette::parameters usePalette_parameters;}
-#include "ltiTransform.h"
-#define _transform transform
-#define _transform_parameters parameters
-namespace lti {typedef lti::transform::parameters transform_parameters;}
-#include "ltiGradientFunctor.h"
-#define _gradientFunctor gradientFunctor
-#define _gradientFunctor_parameters parameters
-#define lti_gradientFunctor_parameters gradientFunctor_parameters // TODO: PATCH !
-namespace lti {typedef lti::gradientFunctor::parameters gradientFunctor_parameters;}
-#include "ltiColorContrastGradient.h"
-#define _colorContrastGradient colorContrastGradient
-#define _colorContrastGradient_parameters parameters
-#define lti_colorContrastGradient_parameters colorContrastGradient_parameters // TODO: PATCH !
-namespace lti {typedef lti::colorContrastGradient::parameters colorContrastGradient_parameters;}
-#include "ltiEdgeDetector.h"
-#define _edgeDetector edgeDetector
-#define _edgeDetector_parameters parameters
-namespace lti {typedef lti::edgeDetector::parameters edgeDetector_parameters;}
-#include "ltiClassicEdgeDetector.h"
-#define _classicEdgeDetector classicEdgeDetector
-#define _classicEdgeDetector_parameters parameters
-namespace lti {typedef lti::classicEdgeDetector::parameters classicEdgeDetector_parameters;}
-#include "ltiCannyEdges.h"
-#define _cannyEdges cannyEdges
-#define _cannyEdges_parameters parameters
-namespace lti {typedef lti::cannyEdges::parameters cannyEdges_parameters;}
-#include "ltiConvolution.h"
-#define _convolution convolution
-#define _convolution_parameters parameters
-namespace lti {typedef lti::convolution::parameters convolution_parameters;}
-#include "ltiSegmentation.h"
-#define _segmentation segmentation
-#define _segmentation_parameters parameters
-namespace lti {typedef lti::segmentation::parameters segmentation_parameters;}
-#include "ltiRegionGrowing.h"
-#define _regionGrowing regionGrowing
-#define _regionGrowing_parameters parameters
-namespace lti {typedef lti::regionGrowing::parameters regionGrowing_parameters;}
-#include "ltiObjectsFromMask.h"
-#define _objectsFromMask objectsFromMask
-#define _objectsFromMask_parameters parameters
-#define _objectsFromMask_objectStruct objectStruct
-namespace lti {
-typedef lti::objectsFromMask::objectStruct objectStruct;
-typedef lti::objectsFromMask::objectStruct objectsFromMask_objectStruct;
-typedef lti::objectsFromMask::parameters objectsFromMask_parameters;
-}
-////TODO: add better tree support !!!
-////#define _tree tree
-//#define _tree_objectStruct_node node
-//#define _tree tree<objectStruct>
-//namespace lti {
-//typedef lti::tree<objectStruct>::node tree_objectStruct_node;
-//}
-#include "ltiPolygonApproximation.h"
-#define _polygonApproximation polygonApproximation
-#define _polygonApproximation_parameters parameters
-namespace lti {typedef lti::polygonApproximation::parameters polygonApproximation_parameters;}
-#include "ltiColorQuantization.h"
-#define _colorQuantization colorQuantization
-#define _colorQuantization_parameters parameters
-namespace lti {typedef lti::colorQuantization::parameters colorQuantization_parameters;}
-#include "ltiKMColorQuantization.h"
-#define _kMColorQuantization kMColorQuantization
-#define _kMColorQuantization_parameters parameters
-namespace lti {
-typedef lti::kMColorQuantization::parameters kMColorQuantization_parameters;
-//typedef lti::kMColorQuantization::parameters lti_kMColorQuantization_parameters;
-}
-typedef lti::kMColorQuantization::parameters lti_kMColorQuantization_parameters;
-#include "ltiMeanShiftSegmentation.h"
-#define _meanShiftSegmentation meanShiftSegmentation
-#define _meanShiftSegmentation_parameters parameters
-namespace lti {typedef lti::meanShiftSegmentation::parameters meanShiftSegmentation_parameters;}
-#include "ltiKMeansSegmentation.h"
-#define _kMeansSegmentation kMeansSegmentation
-#define _kMeansSegmentation_parameters parameters
-namespace lti {
-typedef lti::kMeansSegmentation::parameters kMeansSegmentation_parameters;
-//typedef lti::kMeansSegmentation::parameters lti_kMeansSegmentation_parameters;
-}
-typedef lti::kMeansSegmentation::parameters lti_kMeansSegmentation_parameters;
-
-#include "ltiWhiteningSegmentation.h"
-#define _whiteningSegmentation whiteningSegmentation
-#define _whiteningSegmentation_parameters parameters
-namespace lti {typedef lti::whiteningSegmentation::parameters whiteningSegmentation_parameters;}
-#include "ltiCsPresegmentation.h"
-#define _csPresegmentation csPresegmentation
-#define _csPresegmentation_parameters parameters
-namespace lti {typedef lti::csPresegmentation::parameters csPresegmentation_parameters;}
-#include "ltiFeatureExtractor.h"
-#define _featureExtractor featureExtractor
-#define _featureExtractor_parameters parameters
-namespace lti {typedef lti::featureExtractor::parameters featureExtractor_parameters;}
-#include "ltiGlobalFeatureExtractor.h"
-#define _globalFeatureExtractor globalFeatureExtractor
-#define _globalFeatureExtractor_parameters parameters
-namespace lti {typedef lti::globalFeatureExtractor::parameters globalFeatureExtractor_parameters;}
-#include "ltiGeometricFeatures.h"
-#define _geometricFeatures geometricFeatures
-#define _geometricFeatures_parameters parameters
-namespace lti {typedef lti::geometricFeatures::parameters geometricFeatures_parameters;}
-#include "ltiChromaticityHistogram.h"
-#define _chromaticityHistogram chromaticityHistogram
-#define _chromaticityHistogram_parameters parameters
-namespace lti {typedef lti::chromaticityHistogram::parameters chromaticityHistogram_parameters;}
-#include "ltiLocalFeatureExtractor.h"
-#define _localFeatureExtractor localFeatureExtractor
-#define _localFeatureExtractor_parameters parameters
-namespace lti {typedef lti::localFeatureExtractor::parameters localFeatureExtractor_parameters;}
-#include "ltiLocalMoments.h"
-#define _localMoments localMoments
-#define _localMoments_parameters parameters
-namespace lti {typedef lti::localMoments::parameters localMoments_parameters;}
-#include "ltiMorphology.h"
-#define _morphology morphology
-#define _morphology_parameters parameters
-namespace lti {typedef lti::morphology::parameters morphology_parameters;}
-#include "ltiDilation.h"
-#define _dilation dilation
-#define _dilation_parameters parameters
-namespace lti {typedef lti::dilation::parameters dilation_parameters;}
-#include "ltiErosion.h"
-#define _erosion erosion
-#define _erosion_parameters parameters
-namespace lti {typedef lti::erosion::parameters erosion_parameters;}
-#include "ltiDistanceTransform.h"
-#define _distanceTransform distanceTransform
-#define _distanceTransform_parameters parameters
-namespace lti {typedef lti::distanceTransform::parameters distanceTransform_parameters;}
-#include "ltiSkeleton.h"
-#define _skeleton skeleton
-#define _skeleton_parameters parameters
-namespace lti {typedef lti::skeleton::parameters skeleton_parameters;}
-#include "ltiClassifier.h"
-#define _classifier classifier
-#define _classifier_parameters parameters
-#define _classifier_outputTemplate outputTemplate
-#define _classifier_outputVector outputVector
-namespace lti {
-typedef lti::classifier::parameters classifier_parameters;
-typedef lti::classifier::outputTemplate classifier_outputTemplate;
-typedef lti::classifier::outputVector classifier_outputVector;
-}
-#include "ltiSupervisedInstanceClassifier.h"
-#define _supervisedInstanceClassifier supervisedInstanceClassifier
-#define _supervisedInstanceClassifier_parameters parameters
-namespace lti {typedef lti::supervisedInstanceClassifier::parameters supervisedInstanceClassifier_parameters;}
-/* TODO
-#include "ltiDecisionTree.h"
-#define _decisionTree decisionTree
-#define _decisionTree_parameters parameters
-namespace lti {
-typedef lti::decisionTree::parameters decisionTree_parameters;
-}
-*/
-
-#include "ltiSplitImageToHSI.h"
-#include "ltiSplitImageToHSV.h"
-#include "ltiSplitImageToHLS.h"
-#include "ltiSplitImageToRGB.h"
-#include "ltiSplitImageToYUV.h"
-
-typedef std::ostream ostream;
-typedef std::istream istream;
-
-using namespace lti;
-
-#include "lti_manual.h"
-
-%}
-// **************************************************************************
-// This part is for the swig parser phase !
-// This code will be used by swig to build up the type hierarchy.
-// for successful mapping of const ubyte & to simple data types !!!
-typedef unsigned char ubyte;
-typedef signed char byte;
-typedef unsigned short int uint16;
-typedef signed short int int16;
-typedef unsigned int uint32;
-typedef signed int int32;
-/* #ifdef LOSEDOWS
-typedef unsigned __int64 uint64;
-typedef signed __int64 int64;
-#else
-typedef unsigned long long uint64;
-typedef signed long long int64;
-#endif */
-typedef point<int> ipoint;
-
-%include "ltiObject.h"
-%include "ltiIoHandler.h"
-%include "ltiIoObject.h"
-%include "ltiMathObject.h"
-%include "ltiRGBPixel.h"
-%include "ltiPoint.h"
-namespace lti {
- %template(ipoint) tpoint<int>;
- %template(fpoint) tpoint<float>;
- %template(dpoint) tpoint<double>;
-}
-%template(list_ipoint) std::list<lti::ipoint>;
-%include "ltiPointList.h"
-%extend lti::tpointList {
-// TODO: add a better (pythonic) support for iterators
-void * createIterator()
-{
- lti::tpointList<T>::iterator * pIter = new lti::tpointList<T>::iterator;
- (*pIter) = self->begin();
- return (void *) (pIter);
-}
-void deleteIterator(void *p)
-{
- lti::tpointList<T>::iterator * pIter = (lti::tpointList<T>::iterator *)p;
- delete pIter;
-}
-bool isEnd(void *p)
-{
- lti::tpointList<T>::iterator * pIter = (lti::tpointList<T>::iterator *)p;
- return *pIter == self->end();
-}
-tpoint<T> nextElement(void * p)
-{
- lti::tpointList<T>::iterator * pIter = (lti::tpointList<T>::iterator *)p;
- tpoint<T> aPointOut = *(*pIter);
- ++(*pIter);
- return aPointOut;
-}
-}
-namespace lti {
- %template(pointList) tpointList<int>;
-}
-%include "ltiPolygonPoints.h"
-namespace lti {
-// %template(ipolygonPoints) tpolygonPoints<int>; // PATCH in ltiPolygonPoints.h
-}
-%include "ltiGeometry.h"
-namespace lti {
-//TODO: %template(iintersection) intersection<ipoint>;
-}
-%include "ltiGenericVector.h"
-%extend lti::genericVector {
- // add index support for python (Warning: this is Python-specific!)
- const T & __getitem__( int index )
- {
- return self->at(index);
- }
- void __setitem__( int index, const T & value )
- {
- (*self)[index] = value;
- }
-}
-namespace lti {
- %template(dgenericVector) genericVector<double>;
- %template(fgenericVector) genericVector<float>;
- %template(igenericVector) genericVector<int>;
- %template(bgenericVector) genericVector<ubyte>;
- %template(rgbgenericVector) genericVector<rgbPixel>;
-}
-%include "ltiVector.h"
-namespace lti {
- %template(dvector) vector<double>;
- %template(fvector) vector<float>;
- %template(ivector) vector<int>;
- %template(uvector) vector<ubyte>;
- %template(palette) vector<rgbPixel>;
-}
-%include "ltiArray.h"
-namespace lti {
- %template(iarray) array<int>;
- %template(farray) array<float>;
- %template(darray) array<double>;
- %template(barray) array<ubyte>;
-}
-%include "ltiGenericMatrix.h"
-%extend lti::genericMatrix {
- // add index support for python (Warning: this is Python-specific!)
- const T & __getitem__( int index )
- {
- return self->at(index);
- }
- void __setitem__( int index, const genericVector<T> & value )
- {
- (*self)[index] = value;
- }
- // TODO: check
- // The original at()-method makes some problems! is it because of 'inline' ?
- const T & at( int row, int col )
- {
- return self->at(row,col);
- }
- void setAt( int row, int col, const T & value )
- {
- (*self)[row][col] = value;
- }
-}
-namespace lti {
- %template(bgenericMatrix) genericMatrix<ubyte>;
- %template(igenericMatrix) genericMatrix<int>;
- %template(fgenericMatrix) genericMatrix<float>;
- %template(dgenericMatrix) genericMatrix<double>;
- %template(rgbPixelgenericMatrix) genericMatrix<rgbPixel>;
-}
-%include "ltiMatrix.h"
-namespace lti {
- %template(imatrix) matrix<int>;
- %template(fmatrix) matrix<float>;
- %template(dmatrix) matrix<double>;
- %template(bmatrix) matrix<ubyte>;
- %template(rgbPixelmatrix) matrix<rgbPixel>;
-}
-%include "ltiHistogram.h"
-//namespace lti {
-// %template(histogram) thistogram<double>;
-//}
-
-%include "ltiImage.h"
-%include "ltiContour.h"
-
-// has to be included AFTER the definition of borderPoints !!!
-%include "_objectsFromMask_objectStruct.h"
-#include "_objectsFromMask_objectStruct.h"
-
-// TODO: add better tree support !
-//%include "ltiTree.h"
-//namespace lti {
-// //%template(tree_objectStruct) tree<objectsFromMask_objectStruct>; // does not work because of a syntactical difference to tree<objectStruct>, unforunately is swig not so clever to handel that :-(
-// %template(tree_objectStruct) tree<objectStruct>;
-//}
-////#define node tree_objectStruct_node
-//%include "_tree_node.h"
-
-%include "ltiLinearKernels.h"
-namespace lti {
- %template(ikernel1D) kernel1D<int>;
- %template(fkernel1D) kernel1D<float>;
- %template(dkernel1D) kernel1D<double>;
- %template(bkernel1D) kernel1D<ubyte>;
- %template(ikernel2D) kernel2D<int>;
- %template(fkernel2D) kernel2D<float>;
- %template(dkernel2D) kernel2D<double>;
- %template(bkernel2D) kernel2D<ubyte>;
- %template(isepKernel) sepKernel<int>;
- %template(fsepKernel) sepKernel<float>;
- %template(dsepKernel) sepKernel<double>;
- %template(usepKernel) sepKernel<ubyte>;
-}
-%include "ltiGradientKernels.h"
-namespace lti {
- // TODO %template(igradientKernelX) gradientKernelX<int>;
-}
-%include "ltiHessianKernels.h"
-%include "ltiLaplacianKernel.h"
-%include "ltiSecondDerivativeKernels.h"
-namespace lti {
- %template(iandoKernelXX) andoKernelXX<int>;
- %template(iandoKernelXY) andoKernelXY<int>;
- %template(iandoKernelYY) andoKernelYY<int>;
- %template(fandoKernelXX) andoKernelXX<float>;
- %template(fandoKernelXY) andoKernelXY<float>;
- %template(fandoKernelYY) andoKernelYY<float>;
-}
-
-// TODO: ok: mit SWIG 1.3.21 !!! und SWIG 1.3.24 + VC7
-%template(list_ioPoints) std::list<lti::ioPoints>;
-%template(list_borderPoints) std::list<lti::borderPoints>;
-%template(list_areaPoints) std::list<lti::areaPoints>;
-
-// parameters in functor (eindeutig) umbenennen
-#define parameters functor_parameters
-%include "_functor_parameters.h"
-%include "ltiFunctor.h"
-#undef parameters
-
-#define parameters modifier_parameters
-%include "_modifier_parameters.h"
-%include "ltiModifier.h"
-#undef parameters
-
-#define parameters filter_parameters
-%include "_filter_parameters.h"
-%include "ltiFilter.h"
-#undef parameters
-
-#define parameters ioFunctor_parameters
-%include "_ioFunctor_parameters.h"
-%include "ltiIOFunctor.h"
-#undef parameters
-
-#define parameters ioBMP_parameters
-%include "_ioBMP_parameters.h"
-%include "ltiBMPFunctor.h"
-#undef parameters
-
-#define parameters ioJPEG_parameters
-%include "_ioJPEG_parameters.h"
-%include "ltiJPEGFunctor.h"
-#undef parameters
-
-#define parameters ioPNG_parameters
-%include "_ioPNG_parameters.h"
-%include "ltiPNGFunctor.h"
-#undef parameters
-
-#define parameters ioImage_parameters
-%include "_ioImage_parameters.h"
-%include "ltiALLFunctor.h"
-#undef parameters
-
-#define parameters viewerBase_parameters
-%include "_viewerBase_parameters.h"
-%include "ltiViewerBase.h"
-#undef parameters
-
-#define parameters externViewer_parameters
-%include "_externViewer_parameters.h"
-%include "ltiExternViewer.h"
-#undef parameters
-
-%include "ltiSplitImage.h"
-%include "ltiSplitImageTorgI.h"
-
-#define parameters usePalette_parameters
-%include "_usePalette_parameters.h"
-%include "ltiUsePalette.h"
-#undef parameters
-
-#define parameters transform_parameters
-%include "_transform_parameters.h"
-%include "ltiTransform.h"
-#undef parameters
-
-#define parameters gradientFunctor_parameters
-%include "_gradientFunctor_parameters.h"
-%include "ltiGradientFunctor.h"
-#undef parameters
-
-#define parameters colorContrastGradient_parameters
-%include "_colorContrastGradient_parameters.h"
-%include "ltiColorContrastGradient.h"
-#undef parameters
-
-#define parameters edgeDetector_parameters
-%include "_edgeDetector_parameters.h"
-%include "ltiEdgeDetector.h"
-#undef parameters
-
-#define parameters classicEdgeDetector_parameters
-%include "_classicEdgeDetector_parameters.h"
-%include "ltiClassicEdgeDetector.h"
-#undef parameters
-
-#define parameters cannyEdges_parameters
-%include "_cannyEdges_parameters.h"
-%include "ltiCannyEdges.h"
-#undef parameters
-
-// TODO: problems with private class accumulator !!! --> can we solve this with generated header file out of the XML-output ?
-#define parameters convolution_parameters
-%include "_convolution_parameters.h"
-%include "ltiConvolution.h"
-#undef parameters
-
-#define parameters segmentation_parameters
-%include "_segmentation_parameters.h"
-%include "ltiSegmentation.h"
-#undef parameters
-
-#define parameters regionGrowing_parameters
-%include "_regionGrowing_parameters.h"
-%include "ltiRegionGrowing.h"
-#undef parameters
-
-////#define objectStruct objectsFromMask_objectStruct
-//%include "_objectsFromMask_objectStruct.h"
-////%include "ltiObjectsFromMask.h"
-////#undef objectStruct
-
-#define parameters objectsFromMask_parameters
-%include "_objectsFromMask_parameters.h"
-%include "ltiObjectsFromMask.h"
-#undef parameters
-
-#define parameters polygonApproximation_parameters
-%include "_polygonApproximation_parameters.h"
-%include "ltiPolygonApproximation.h"
-#undef parameters
-
-#define parameters colorQuantization_parameters
-%include "_colorQuantization_parameters.h"
-%include "ltiColorQuantization.h"
-#undef parameters
-
-#define parameters kMColorQuantization_parameters
-%include "_kMColorQuantization_parameters.h"
-%include "ltiKMColorQuantization.h"
-#undef parameters
-
-#define parameters meanShiftSegmentation_parameters
-%include "_meanShiftSegmentation_parameters.h"
-%include "ltiMeanShiftSegmentation.h"
-#undef parameters
-
-#define parameters kMeansSegmentation_parameters
-%include "_kMeansSegmentation_parameters.h"
-%include "ltiKMeansSegmentation.h"
-#undef parameters
-
-%extend lti::_kMeansSegmentation::_kMeansSegmentation_parameters {
-// TODO: is there a better way to support complex attributes ?
-// a helper method to set complex attributes of a parameters-class
-void setQuantParameters(const lti::_kMColorQuantization::kMColorQuantization_parameters & value)
-{
- self->quantParameters = value;
-}
-};
-
-#define parameters whiteningSegmentation_parameters
-%include "_whiteningSegmentation_parameters.h"
-%include "ltiWhiteningSegmentation.h"
-#undef parameters
-
-#define parameters csPresegmentation_parameters
-%include "_csPresegmentation_parameters.h"
-%include "ltiCsPresegmentation.h"
-#undef parameters
-
-#define parameters featureExtractor_parameters
-%include "_featureExtractor_parameters.h"
-%include "ltiFeatureExtractor.h"
-#undef parameters
-
-#define parameters globalFeatureExtractor_parameters
-%include "_globalFeatureExtractor_parameters.h"
-%include "ltiGlobalFeatureExtractor.h"
-#undef parameters
-
-#define parameters localFeatureExtractor_parameters
-%include "_localFeatureExtractor_parameters.h"
-%include "ltiLocalFeatureExtractor.h"
-#undef parameters
-
-#define parameters localMoments_parameters
-%include "_localMoments_parameters.h"
-%include "ltiLocalMoments.h"
-#undef parameters
-
-#define parameters geometricFeatures_parameters
-%include "_geometricFeatures_parameters.h"
-%include "ltiGeometricFeatures.h"
-#undef parameters
-
-#define parameters chromaticityHistogram_parameters
-%include "_chromaticityHistogram_parameters.h"
-%include "ltiChromaticityHistogram.h"
-#undef parameters
-
-#define parameters morphology_parameters
-%include "_morphology_parameters.h"
-%include "ltiMorphology.h"
-#undef parameters
-
-#define parameters dilation_parameters
-%include "_dilation_parameters.h"
-%include "ltiDilation.h"
-#undef parameters
-
-#define parameters erosion_parameters
-%include "_erosion_parameters.h"
-%include "ltiErosion.h"
-#undef parameters
-
-#define parameters distanceTransform_parameters
-%rename (distanceTransform_sedMask) lti::distanceTransform::sedMask;
-%include "_distanceTransform_parameters.h"
-%include "ltiDistanceTransform.h"
-#undef parameters
-
-#define parameters skeleton_parameters
-%include "_skeleton_parameters.h"
-%include "ltiSkeleton.h"
-#undef parameters
-
-#define parameters classifier_parameters
-#define outputTemplate classifier_outputTemplate
-#define outputVector classifier_outputVector
-%include "_classifier_outputVector.h"
-%include "_classifier_outputTemplate.h"
-%include "_classifier_parameters.h"
-%include "ltiClassifier.h"
-#undef parameters
-
-#define parameters supervisedInstanceClassifier_parameters
-//%include "_supervisedInstanceClassifier_parameters.h"
-%include "ltiSupervisedInstanceClassifier.h"
-#undef parameters
-
-//#define parameters decisionTree_parameters
-//%include "_decisionTree_parameters.h"
-//%include "ltiDecisionTree.h"
-//#undef parameters
-
-%include "ltiSplitImageToHSI.h"
-%extend lti::splitImageToHSI {
- // transfer the HSI value as a rgbPixel (TODO: maybe better as a Python tuple? How?)
- lti::rgbPixel apply( const rgbPixel &pixel )
- {
- ubyte H, S, I;
- self->apply( pixel, H, S, I );
- return lti::rgbPixel( H, S, I );
- }
-/* TODO --> does not work !
- int[3] apply( const rgbPixel &pixel )
- {
- int ret[3];
- ubyte H, S, I;
- self->apply( pixel, H, S, I );
- ret[0] = H;
- ret[1] = S;
- ret[2] = I;
- return ret;
- }
-*/
-}
-%include "ltiSplitImageToHSV.h"
-%include "ltiSplitImageToHLS.h"
-%include "ltiSplitImageToRGB.h"
-%include "ltiSplitImageToYUV.h"
-
-// **************************************************************************
-
-%include "lti_manual.h"
-
-
diff --git a/externals/gridflow/optional/rblti/std_list_ruby.i b/externals/gridflow/optional/rblti/std_list_ruby.i
deleted file mode 100644
index baf66d91..00000000
--- a/externals/gridflow/optional/rblti/std_list_ruby.i
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- Lists
-*/
-
-%fragment("StdListTraits","header",fragment="StdSequenceTraits")
-%{
- namespace swig {
- template <class T >
- struct traits_asptr<std::list<T> > {
- static int asptr(PyObject *obj, std::list<T> **lis) {
- return traits_asptr_stdseq<std::list<T> >::asptr(obj, lis);
- }
- };
-
- template <class T>
- struct traits_from<std::list<T> > {
- static PyObject *from(const std::list<T> & vec) {
- return traits_from_stdseq<std::list<T> >::from(vec);
- }
- };
- }
-%}
-
-#define %swig_list_methods(Type...) %swig_sequence_methods(Type)
-#define %swig_list_methods_val(Type...) %swig_sequence_methods_val(Type);
-
-%include <std/std_list.i>
-
diff --git a/externals/gridflow/optional/usb.c b/externals/gridflow/optional/usb.c
deleted file mode 100644
index b12b5a10..00000000
--- a/externals/gridflow/optional/usb.c
+++ /dev/null
@@ -1,359 +0,0 @@
-/*
- $Id: usb.c,v 1.2 2006-03-15 04:45:31 matju Exp $
-
- GridFlow
- Copyright (c) 2001,2002,2003 by Mathieu Bouchard
-
- 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.
-
- See file ../COPYING for further informations on licensing terms.
-
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include <usb.h>
-#include "../base/grid.h.fcs"
-
-static Ruby cUSB;
-
-struct named_int {const char *name; int v;};
-
-named_int usb_class_choice[] = {
- {"USB_CLASS_PER_INTERFACE",0},
- {"USB_CLASS_AUDIO",1},
- {"USB_CLASS_COMM",2},
- {"USB_CLASS_HID",3},
- {"USB_CLASS_PRINTER",7},
- {"USB_CLASS_MASS_STORAGE",8},
- {"USB_CLASS_HUB",9},
- {"USB_CLASS_DATA",10},
- {"USB_CLASS_VENDOR_SPEC",0xff},
- {0,0},
-};
-
-named_int usb_descriptor_types_choices[] = {
- {"USB_DT_DEVICE",0x01},
- {"USB_DT_CONFIG",0x02},
- {"USB_DT_STRING",0x03},
- {"USB_DT_INTERFACE",0x04},
- {"USB_DT_ENDPOINT",0x05},
- {"USB_DT_HID",0x21},
- {"USB_DT_REPORT",0x22},
- {"USB_DT_PHYSICAL",0x23},
- {"USB_DT_HUB",0x29},
- {0,0},
-};
-
-named_int usb_descriptor_types_sizes[] = {
- {"USB_DT_DEVICE_SIZE",18},
- {"USB_DT_CONFIG_SIZE",9},
- {"USB_DT_INTERFACE_SIZE",9},
- {"USB_DT_ENDPOINT_SIZE",7},
- {"USB_DT_ENDPOINT_AUDIO_SIZE",9},/* Audio extension */
- {"USB_DT_HUB_NONVAR_SIZE",7},
- {0,0},
-};
-
-named_int usb_endpoints_choices[] = {
- {"USB_ENDPOINT_ADDRESS_MASK",0x0f},/* in bEndpointAddress */
- {"USB_ENDPOINT_DIR_MASK",0x80},
- {"USB_ENDPOINT_TYPE_MASK",0x03},/* in bmAttributes */
- {"USB_ENDPOINT_TYPE_CONTROL",0},
- {"USB_ENDPOINT_TYPE_ISOCHRONOUS",1},
- {"USB_ENDPOINT_TYPE_BULK",2},
- {"USB_ENDPOINT_TYPE_INTERRUPT",3},
- {0,0},
-};
-
-named_int usb_requests_choice[] = {
- {"USB_REQ_GET_STATUS",0x00},
- {"USB_REQ_CLEAR_FEATURE",0x01},
- {"USB_REQ_SET_FEATURE",0x03},
- {"USB_REQ_SET_ADDRESS",0x05},
- {"USB_REQ_GET_DESCRIPTOR",0x06},
- {"USB_REQ_SET_DESCRIPTOR",0x07},
- {"USB_REQ_GET_CONFIGURATION",0x08},
- {"USB_REQ_SET_CONFIGURATION",0x09},
- {"USB_REQ_GET_INTERFACE",0x0A},
- {"USB_REQ_SET_INTERFACE",0x0B},
- {"USB_REQ_SYNCH_FRAME",0x0C},
- {0,0},
-};
-
-named_int usb_type_choice[] = {
- {"USB_TYPE_STANDARD",(0x00 << 5)},
- {"USB_TYPE_CLASS",(0x01 << 5)},
- {"USB_TYPE_VENDOR",(0x02 << 5)},
- {"USB_TYPE_RESERVED",(0x03 << 5)},
- {0,0},
-};
-
-named_int usb_recipient_choice[] = {
- {"USB_RECIP_DEVICE",0x00},
- {"USB_RECIP_INTERFACE",0x01},
- {"USB_RECIP_ENDPOINT",0x02},
- {"USB_RECIP_OTHER",0x03},
- {0,0},
-};
-
-named_int usb_misc[] = {
- {"USB_MAXENDPOINTS",32},
- {"USB_MAXINTERFACES",32},
- {"USB_MAXALTSETTING",128},
- {"USB_MAXCONFIG",8},
- {"USB_ENDPOINT_IN",0x80},
- {"USB_ENDPOINT_OUT",0x00},
- {"USB_ERROR_BEGIN",500000},
- {0,0},
-};
-
-named_int* usb_all_defines[] = {
- usb_class_choice,
- usb_descriptor_types_choices,
- usb_descriptor_types_sizes,
- usb_endpoints_choices,
- usb_requests_choice,
- usb_type_choice,
- usb_recipient_choice,
- usb_misc,
-};
-
-#define COMMA ,
-
-//14
-#define USB_DEVICE_DESCRIPTOR(MANGLE,SEP) \
- MANGLE(bLength)SEP\
- MANGLE(bDescriptorType)SEP\
- MANGLE(bcdUSB)SEP\
- MANGLE(bDeviceClass)SEP\
- MANGLE(bDeviceSubClass)SEP\
- MANGLE(bDeviceProtocol)SEP\
- MANGLE(bMaxPacketSize0)SEP\
- MANGLE(idVendor)SEP\
- MANGLE(idProduct)SEP\
- MANGLE(bcdDevice)SEP\
- MANGLE(iManufacturer)SEP\
- MANGLE(iProduct)SEP\
- MANGLE(iSerialNumber)SEP\
- MANGLE(bNumConfigurations)
-
-//8
-#define USB_ENDPOINT_DESCRIPTOR(MANGLE,SEP) \
- MANGLE(bLength)SEP\
- MANGLE(bDescriptorType)SEP\
- MANGLE(bEndpointAddress)SEP\
- MANGLE(bmAttributes)SEP\
- MANGLE(wMaxPacketSize)SEP\
- MANGLE(bInterval)SEP\
- MANGLE(bRefresh)SEP\
- MANGLE(bSynchAddress)
-// MANGLE(extras)
-
-//9
-#define USB_INTERFACE_DESCRIPTOR(MANGLE,SEP) \
- MANGLE(bLength)SEP\
- MANGLE(bDescriptorType)SEP\
- MANGLE(bInterfaceNumber)SEP\
- MANGLE(bAlternateSetting)SEP\
- MANGLE(bNumEndpoints)SEP\
- MANGLE(bInterfaceClass)SEP\
- MANGLE(bInterfaceSubClass)SEP\
- MANGLE(bInterfaceProtocol)SEP\
- MANGLE(iInterface)
-// MANGLE(endpoint)
-// MANGLE(extras)
-
-//8
-#define USB_CONFIG_DESCRIPTOR(MANGLE,SEP) \
- MANGLE(bLength)SEP\
- MANGLE(bDescriptorType)SEP\
- MANGLE(wTotalLength)SEP\
- MANGLE(bNumInterfaces)SEP\
- MANGLE(bConfigurationValue)SEP\
- MANGLE(iConfiguration)SEP\
- MANGLE(bmAttributes)SEP\
- MANGLE(MaxPower)
-// MANGLE(interface)
-// MANGLE(extras)
-
-static Ruby usb_get_endpoint (struct usb_endpoint_descriptor *self) {
-#define MANGLE(X) INT2NUM(self->X)
- return rb_funcall(rb_const_get(cUSB,SI(Endpoint)),SI(new),8,
- USB_ENDPOINT_DESCRIPTOR(MANGLE,COMMA));
-#undef MANGLE
-}
-
-static Ruby usb_get_interface (struct usb_interface_descriptor *self) {
-#define MANGLE(X) INT2NUM(self->X)
- return rb_funcall(rb_const_get(cUSB,SI(Interface)),SI(new),9+1,
- USB_INTERFACE_DESCRIPTOR(MANGLE,COMMA),
- usb_get_endpoint(self->endpoint));
-#undef MANGLE
-}
-
-static Ruby usb_get_config (struct usb_config_descriptor *self) {
- if (!self) {
- fprintf(stderr,"warning: usb_get_config: null pointer\n");
- return Qnil;
- }
-#define MANGLE(X) INT2NUM(self->X)
- Ruby interface = rb_ary_new();
- for (int i=0; i<self->interface->num_altsetting; i++) {
- rb_ary_push(interface, usb_get_interface(&self->interface->altsetting[i]));
- }
- return rb_funcall(rb_const_get(cUSB,SI(Config)),SI(new),8+1,
- USB_CONFIG_DESCRIPTOR(MANGLE,COMMA), interface);
-#undef MANGLE
-}
-
-static Ruby usb_scan_bus (usb_bus *bus) {
- Ruby rbus = rb_ary_new();
- for (struct usb_device *dev=bus->devices; dev; dev=dev->next) {
- struct usb_device_descriptor *devd = &dev->descriptor;
- Ruby config = rb_ary_new();
- for (int i=0; i<devd->bNumConfigurations; i++) {
- rb_ary_push(config,usb_get_config(&dev->config[i]));
- }
-#define MANGLE(X) INT2NUM(devd->X)
- rb_ary_push(rbus, rb_funcall(rb_const_get(cUSB,SI(Device)),SI(new),14+3,
- USB_DEVICE_DESCRIPTOR(MANGLE,COMMA),
- rb_str_new2(dev->filename),
- PTR2FIX(dev),
- config));
-#undef MANGLE
- }
- return rbus;
-}
-
-\class USB < CObject
-class USB : public CObject {
- usb_dev_handle *h;
-public:
- \decl void initialize (Ruby dev);
- \decl int close ();
- \decl int bulk_write (int ep, String s, int timeout);
- \decl int bulk_read (int ep, String s, int timeout);
- \decl int claim_interface(int interface);
- \decl int release_interface(int interface);
- \decl int set_configuration(int configuration);
- \decl int set_altinterface(int alternate);
- \decl int control_msg(int requesttype, int request, int value, int index, String s, int timeout);
- \decl int resetep(int ep);
- \decl int clear_halt(int ep);
- \decl int reset();
- //\decl int get_string(int index, int langid, String s);
- //\decl int get_string_simple(int index, String s);
-};
-
-\def void initialize (Ruby dev) {
- Ruby ptr = rb_funcall(dev,SI(ptr),0);
- rb_ivar_set(rself, SI(@dev), ptr);
- h = usb_open(FIX2PTR(struct usb_device,ptr));
- if (!h) RAISE("usb_open returned null handle");
-}
-
-\def int close () {
- if (!h) RAISE("USB closed");
- int r = usb_close(h);
- h=0;
- return r;
-}
-
-#define TRAP(stuff) int r=(stuff); if (r<0) RAISE("%s", usb_strerror()); else return r;
-
-\def int bulk_write (int ep, String s, int timeout) {
- if (!h) RAISE("USB closed");
- TRAP(usb_bulk_write(h, ep, rb_str_ptr(s), rb_str_len(s), timeout));}
-\def int bulk_read (int ep, String s, int timeout) {
- if (!h) RAISE("USB closed");
- gfpost("%d, '%s', %d",ep,rb_str_ptr(s),timeout);
- TRAP(usb_bulk_read(h, ep, rb_str_ptr(s), rb_str_len(s), timeout));}
-\def int claim_interface(int interface) {
- TRAP(usb_claim_interface(h, interface));}
-\def int release_interface(int interface) {
- TRAP(usb_release_interface(h, interface));}
-\def int set_configuration(int configuration) {
- TRAP(usb_set_configuration(h, configuration));}
-\def int set_altinterface(int alternate) {
- TRAP(usb_set_altinterface(h, alternate));}
-\def int control_msg(int requesttype, int request, int value, int index, String s, int timeout) {
- TRAP(usb_control_msg(h, requesttype, request, value, index, rb_str_ptr(s), rb_str_len(s), timeout));}
-\def int resetep(int ep) {
- TRAP(usb_resetep(h, ep));}
-\def int clear_halt(int ep) {
- TRAP(usb_clear_halt(h, ep));}
-\def int reset() {
- TRAP(usb_reset(h));}
-/*\def int get_string(int index, int langid, String s) {
- TRAP(usb_get_string(h, index, langid, rb_str_ptr(s), rb_str_len(s)));}*/
-/*\def int get_string_simple(int index, String s) {
- TRAP(usb_get_string_simple(h, index, rb_str_ptr(s), rb_str_len(s)));}*/
-
-// not handled yet:
-// struct usb_string_descriptor
-// struct usb_hid_descriptor
-// void usb_set_debug(int level);
-// Device usb_device(USB dev);
-// get_string and get_string_simple (not present in libusb 0.1.4)
-
-\classinfo
-\end class USB
-
-static Ruby USB_s_new(Ruby argc, Ruby *argv, Ruby qlass) {
- USB *self = new USB();
- Ruby rself = Data_Wrap_Struct(qlass, 0, CObject_free, self);
- self->rself = rself;
- Ruby keep = rb_ivar_get(mGridFlow, rb_intern("@fobjects"));
- rb_hash_aset(keep,rself,Qtrue); /* prevent sweeping (leak) (!@#$ WHAT??) */
- rb_funcall2(rself,SI(initialize),argc,argv);
- return rself;
-}
-
-#define SDEF(_class_,_name_,_argc_) \
- rb_define_singleton_method(c##_class_,#_name_,(RMethod)_class_##_s_##_name_,_argc_)
-
-void startup_usb () {
- cUSB = rb_define_class_under(mGridFlow, "USB", rb_cObject);
- //rb_define_singleton_method(cUSB, "new", USB_new, 1);
- EVAL("class Symbol; def decap; x=to_s; x[0..0]=x[0..0].downcase; x.intern end end");
- SDEF(USB,new,-1);
- define_many_methods(cUSB, ciUSB.methodsn, ciUSB.methods);
-#define MANGLE(X) rb_funcall(SYM(X),SI(decap),0)
- rb_const_set(cUSB, SI(Device), rb_funcall(EVAL("Struct"),SI(new),14+3,
- USB_DEVICE_DESCRIPTOR(MANGLE,COMMA), SYM(filename), SYM(ptr), SYM(config)));
- rb_const_set(cUSB, SI(Endpoint), rb_funcall(EVAL("Struct"),SI(new),8,
- USB_ENDPOINT_DESCRIPTOR(MANGLE,COMMA)));
- rb_const_set(cUSB, SI(Interface), rb_funcall(EVAL("Struct"),SI(new),9+1,
- USB_INTERFACE_DESCRIPTOR(MANGLE,COMMA), SYM(endpoint)));
- rb_const_set(cUSB, SI(Config), rb_funcall(EVAL("Struct"),SI(new),8+1,
- USB_CONFIG_DESCRIPTOR(MANGLE,COMMA), SYM(interface)));
-#undef MANGLE
- for(int i=0; i<COUNT(usb_all_defines); i++) {
- named_int *ud = usb_all_defines[i];
- for(; ud->name; ud++) {
- rb_const_set(cUSB, rb_intern(ud->name), INT2NUM(ud->v));
- }
- }
- //usb_set_debug(42);
- usb_init();
- usb_find_busses();
- usb_find_devices();
- Ruby busses = rb_hash_new();
- rb_ivar_set(cUSB, SI(@busses), busses);
- for (usb_bus *bus=usb_get_busses(); bus; bus=bus->next) {
- rb_hash_aset(busses,rb_str_new2(bus->dirname),usb_scan_bus(bus));
- }
- //IEVAL(cUSB,"STDERR.print '@busses = '; STDERR.puts @busses.inspect");
- rb_require("gridflow/optional/usb.rb");
-}
-
diff --git a/externals/gridflow/optional/usb.rb b/externals/gridflow/optional/usb.rb
deleted file mode 100644
index 98191329..00000000
--- a/externals/gridflow/optional/usb.rb
+++ /dev/null
@@ -1,107 +0,0 @@
-=begin
- $Id: usb.rb,v 1.1 2006-03-15 04:46:22 matju Exp $
-
- GridFlow
- Copyright (c) 2001,2002,2003,2004,2005 by Mathieu Bouchard
-
- 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.
-
- See file ../COPYING for further informations on licensing terms.
-
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-=end
-
-module GridFlow
-
-class<<USB
- attr_reader :busses
-end
-
-FObject.subclass("delcomusb",1,1) {
- Vendor,Product=0x0FC5,0x1222
- def self.find
- r=[]
- USB.busses.each {|dir,bus|
- bus.each {|dev|
- r<<dev if dev.idVendor==Vendor and dev.idProduct==Product
- }
- }
- r
- end
- def initialize #(bus=nil,dev=nil)
- r=DelcomUSB.find
- raise "no such device" if r.length<1
- raise "#{r.length} such devices (which one???)" if r.length>1
- @usb=USB.new(r[0])
- if_num=nil
- r[0].config.each {|config|
- config.interface.each {|interface|
- if_num = interface.bInterfaceNumber
- }
- }
- # post "Interface # %i\n", if_num
- @usb.set_configuration 1
- @usb.claim_interface if_num
- @usb.set_altinterface 0 rescue ArgumentError
- end
- # libdelcom had this:
- # uint8 recipient, deviceModel, major, minor, dataL, dataM;
- # uint16 length; uint8[8] extension;
- def _0_send_command(major,minor,dataL,dataM,extension="\0\0\0\0\0\0\0\0")
- raise "closed" if not @usb
- raise "extension.length!=8" if extension.length!=8
- @usb.control_msg(
- 0x000000c8, 0x00000012,
- minor*0x100+major,
- dataM*0x100+dataL,
- extension, 5000)
- end
- def delete; @usb.close; end
-}
-
-FObject.subclass("klippeltronics",1,1) {
- def self.find
- r=[]
- USB.busses.each {|dir,bus|
- bus.each {|dev|
- GridFlow.post "dir=%s, vendor=%x, product=%x",
- dir, dev.idVendor, dev.idProduct
- r<<dev if dev.idVendor==0xDead and dev.idProduct==0xBEEF
- }
- }
- r
- end
- def initialize
- r=self.class.find
- post "%s", r.inspect
- raise "no such device" if r.length<1
- raise "#{r.length} such devices (which one???)" if r.length>1
- $iobox=@usb=USB.new(r[0])
- if_num=nil
- r[0].config.each {|config|
- config.interface.each {|interface|
- #post "interface=%s", interface.to_s
- if_num = interface.bInterfaceNumber
- }
- }
- # post "Interface # %i\n", if_num
- # @usb.set_configuration 0
- @usb.claim_interface if_num
- @usb.set_altinterface 0 rescue ArgumentError
- end
- #@usb.control_msg(0b10100001,0x01,0,0,"",1000)
- #@usb.control_msg(0b10100001,0x01,0,1," ",0)
- def delete; @usb.close; end
-}
-
-end # module GridFlow
diff --git a/externals/gridflow/pd_abstractions/#apply_colormap_channelwise.pd b/externals/gridflow/pd_abstractions/#apply_colormap_channelwise.pd
deleted file mode 100644
index 2402036a..00000000
--- a/externals/gridflow/pd_abstractions/#apply_colormap_channelwise.pd
+++ /dev/null
@@ -1,12 +0,0 @@
-#N canvas 0 0 450 300 10;
-#X obj 17 17 inlet;
-#X obj 17 37 #outer & ( -1 0 );
-#X obj 17 57 # + ( 3 2 # 0 0 0 1 0 2 );
-#X obj 17 77 #store;
-#X obj 17 97 outlet;
-#X obj 67 17 inlet;
-#X connect 0 0 1 0;
-#X connect 1 0 2 0;
-#X connect 2 0 3 0;
-#X connect 3 0 4 0;
-#X connect 5 0 3 1;
diff --git a/externals/gridflow/pd_abstractions/#camera.pd b/externals/gridflow/pd_abstractions/#camera.pd
deleted file mode 100644
index 71780ad0..00000000
--- a/externals/gridflow/pd_abstractions/#camera.pd
+++ /dev/null
@@ -1,149 +0,0 @@
-#N canvas 192 66 485 362 10;
-#X obj 132 83 hradio 18 1 0 4 \$0-channel \$0-channel _0__1__2__3_
-0 14 0 8 -241291 -258699 -1 1;
-#X obj 299 31 hsl 128 15 0 65535 0 0 \$0-brightness \$0-brightness
-brightness 8 8 0 8 -260818 -1 -1 10250 1;
-#X obj 299 71 hsl 128 15 0 65535 0 0 \$0-hue \$0-hue hue 8 8 0 8 -260818
--1 -1 6600 1;
-#X obj 299 11 hsl 128 15 0 65535 0 0 \$0-contrast \$0-contrast contrast
-8 8 0 8 -260818 -1 -1 8800 1;
-#X obj 299 91 hsl 128 15 0 65635 0 0 \$0-whiteness \$0-whiteness whiteness
-8 8 0 8 -260818 -1 -1 0 1;
-#N canvas 256 168 546 412 camera 0;
-#X obj 20 387 outlet;
-#X obj 11 9 inlet;
-#X msg 160 126 contrast \$1;
-#X msg 160 186 whiteness \$1;
-#X msg 160 106 brightness \$1;
-#X msg 160 227 channel \$1;
-#X obj 270 106 r \$0-brightness;
-#X obj 270 126 r \$0-contrast;
-#X obj 270 186 r \$0-whiteness;
-#X obj 153 276 r \$0-size;
-#X obj 270 226 r \$0-channel;
-#X obj 270 166 r \$0-hue;
-#X msg 160 166 hue \$1;
-#X msg 160 146 colour \$1;
-#X obj 270 146 r \$0-colour;
-#X obj 23 198 t a;
-#X msg 319 382 open videodev \$1 \, get;
-#X obj 318 363 rubysprintf /dev/video%d;
-#X msg 160 206 frequency \$1;
-#X obj 270 206 r \$0-frequency;
-#X obj 318 344 r \$0-device;
-#X obj 153 346 #export_list;
-#X msg 153 295 list \$1;
-#X msg 154 365 size \$1 \$2;
-#X obj 153 314 #store ( 4 2 # 120 160 240 320 480 640 120 180 240 360
-480 720 );
-#X obj 12 98 rubysprintf %d-%s;
-#X obj 11 117 pack s f;
-#X obj 12 77 t a a;
-#X msg 68 77 \$3;
-#X msg 11 136 \; \$1 \$2;
-#X obj 11 56 messageprepend \$0;
-#X msg 160 247 tuner \$1;
-#X obj 270 246 r \$0-tuner;
-#X connect 1 0 30 0;
-#X connect 2 0 15 0;
-#X connect 3 0 15 0;
-#X connect 4 0 15 0;
-#X connect 5 0 15 0;
-#X connect 6 0 4 0;
-#X connect 7 0 2 0;
-#X connect 8 0 3 0;
-#X connect 9 0 22 0;
-#X connect 10 0 5 0;
-#X connect 11 0 12 0;
-#X connect 12 0 15 0;
-#X connect 13 0 15 0;
-#X connect 14 0 13 0;
-#X connect 15 0 0 0;
-#X connect 16 0 0 0;
-#X connect 17 0 16 0;
-#X connect 18 0 15 0;
-#X connect 19 0 18 0;
-#X connect 20 0 17 0;
-#X connect 21 0 23 0;
-#X connect 22 0 24 0;
-#X connect 23 0 0 0;
-#X connect 24 0 21 0;
-#X connect 25 0 26 0;
-#X connect 26 0 29 0;
-#X connect 27 0 25 0;
-#X connect 27 1 28 0;
-#X connect 28 0 26 1;
-#X connect 30 0 27 0;
-#X connect 31 0 15 0;
-#X connect 32 0 31 0;
-#X restore 49 115 pd camera;
-#X msg 317 236 colorspace YUV420P;
-#X obj 66 177 #yuv_to_rgb;
-#X obj 299 51 hsl 128 15 0 65535 0 0 \$0-colour \$0-colour colour 8
-8 0 8 -260818 -1 -1 12700 1;
-#X obj 133 21 vradio 15 1 0 3 \$0-size \$0-size empty 0 -6 0 8 -241291
--258699 -1 1;
-#X text 151 21 120 \, 160;
-#X text 151 37 240 \, 320;
-#X text 151 52 480 \, 640;
-#X text 131 6 select size;
-#X text 132 68 select channel;
-#X obj 240 12 nbx 5 14 0 65535 0 0 \$0-contrast \$0-contrast empty
-0 -6 0 10 -260818 -1 -1 45410 256;
-#X obj 240 32 nbx 5 14 0 65535 0 0 \$0-brightness \$0-brightness empty
-0 -6 0 10 -260818 -1 -1 52892 256;
-#X obj 240 52 nbx 5 14 0 65535 0 0 \$0-colour \$0-colour empty 0 -6
-0 10 -260818 -1 -1 65535 256;
-#X obj 240 72 nbx 5 14 0 65535 0 0 \$0-hue \$0-hue empty 0 -6 0 10
--260818 -1 -1 34058 256;
-#X obj 240 92 nbx 5 14 0 65535 0 0 \$0-whiteness \$0-whiteness empty
-0 -6 0 10 -260818 -1 -1 0 256;
-#X text 17 6 Select a camera;
-#X msg 317 156 transfer mmap;
-#X msg 317 196 transfer read;
-#X msg 317 216 colorspace RGB24;
-#X text 316 140 Special options:;
-#X obj 22 115 #in;
-#X obj 22 245 outlet image;
-#X obj 21 33 hradio 18 1 0 4 \$0-device \$0-device _0__1__2__3_ 0 -4
-0 8 -241291 -258699 -1 0;
-#X obj 22 148 shunt 2;
-#X obj 141 206 vradio 15 1 0 2 empty empty empty 0 -6 0 8 -241291 -258699
--1 0;
-#X text 161 221 YUV->RGB;
-#X text 161 205 no conversion;
-#X obj 23 96 inlet;
-#X obj 66 198 # min 255;
-#X obj 66 217 # max 0;
-#X msg 317 176 transfer mmap 4;
-#X obj 132 117 hradio 18 1 0 4 \$0-tuner \$0-tuner _0__1__2__3_ 0 14
-0 8 -241291 -258699 -1 0;
-#X text 132 102 select tuner;
-#X obj 299 121 hsl 128 15 0 65635 0 0 \$0-frequency \$0-frequency frequency
-8 8 0 8 -62784 -44926 -44926 0 1;
-#X obj 240 122 nbx 5 14 0 65535 0 0 \$0-frequency \$0-frequency empty
-0 -6 0 10 -62784 -44926 -44926 0 256;
-#X obj 21 271 \$0;
-#X obj 47 272 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1
--1;
-#X obj 305 257 s \$0-o;
-#X msg 21 290 \; \$1-device 0 \; \$1-size 1 \; \$1-channel 1;
-#X obj 62 95 r \$0-o;
-#X connect 5 0 25 0;
-#X connect 6 0 42 0;
-#X connect 7 0 33 0;
-#X connect 21 0 42 0;
-#X connect 22 0 42 0;
-#X connect 23 0 42 0;
-#X connect 25 0 28 0;
-#X connect 25 1 5 0;
-#X connect 28 0 26 0;
-#X connect 28 1 7 0;
-#X connect 29 0 28 1;
-#X connect 32 0 25 0;
-#X connect 33 0 34 0;
-#X connect 34 0 26 0;
-#X connect 35 0 42 0;
-#X connect 40 0 43 0;
-#X connect 41 0 40 0;
-#X connect 44 0 25 0;
diff --git a/externals/gridflow/pd_abstractions/#camera_control.pd b/externals/gridflow/pd_abstractions/#camera_control.pd
deleted file mode 100644
index c759fd23..00000000
--- a/externals/gridflow/pd_abstractions/#camera_control.pd
+++ /dev/null
@@ -1,129 +0,0 @@
-#N canvas 287 295 576 286 10;
-#X obj 50 265 outlet;
-#X obj 239 124 hradio 18 1 0 4 \$0-channel \$0-channel _0__1__2__3_
-0 -4 0 8 -241291 -258699 -1 0;
-#X obj 413 63 hsl 128 15 0 65535 0 0 \$0-brightness \$0-brightness
-brightness 8 8 0 8 -260818 -1 -1 0 1;
-#X obj 413 103 hsl 128 15 0 65535 0 0 \$0-hue \$0-hue hue 8 8 0 8 -260818
--1 -1 0 1;
-#X obj 413 43 hsl 128 15 0 65535 0 0 \$0-contrast \$0-contrast contrast
-8 8 0 8 -260818 -1 -1 0 1;
-#X obj 413 123 hsl 128 15 0 65635 0 0 \$0-whiteness \$0-whiteness whiteness
-8 8 0 8 -260818 -1 -1 0 1;
-#X text 119 245 <-- open to access more camera controls;
-#N canvas 170 20 420 404 camera 0;
-#X obj 9 362 outlet;
-#X obj 9 8 inlet;
-#X msg 66 153 contrast \$1;
-#X msg 66 213 whiteness \$1;
-#X msg 66 133 brightness \$1;
-#X msg 171 383 size 120 160;
-#X msg 190 363 size 240 320;
-#X msg 209 343 size 480 640;
-#X msg 72 277 channel \$1;
-#X obj 176 133 r \$0-brightness;
-#X obj 176 153 r \$0-contrast;
-#X obj 176 213 r \$0-whiteness;
-#X obj 171 299 r \$0-size;
-#X obj 182 277 r \$0-channel;
-#X obj 176 193 r \$0-hue;
-#X msg 66 193 hue \$1;
-#X msg 66 173 colour \$1;
-#X obj 176 173 r \$0-colour;
-#X obj 171 319 sel 0 1 2;
-#X obj 67 55 s \$0-brightness;
-#X obj 77 75 s \$0-contrast;
-#X obj 197 55 s \$0-colour;
-#X obj 207 75 s \$0-hue;
-#X obj 217 95 s \$0-whiteness;
-#X obj 32 245 t a;
-#X obj 9 35 route symbol brightness contrast colour hue whiteness;
-#X msg 9 109 open videodev \$1 \, get;
-#X connect 1 0 25 0;
-#X connect 2 0 24 0;
-#X connect 3 0 24 0;
-#X connect 4 0 24 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 4 0;
-#X connect 10 0 2 0;
-#X connect 11 0 3 0;
-#X connect 12 0 18 0;
-#X connect 13 0 8 0;
-#X connect 14 0 15 0;
-#X connect 15 0 24 0;
-#X connect 16 0 24 0;
-#X connect 17 0 16 0;
-#X connect 18 0 5 0;
-#X connect 18 1 6 0;
-#X connect 18 2 7 0;
-#X connect 24 0 0 0;
-#X connect 25 0 26 0;
-#X connect 25 1 19 0;
-#X connect 25 2 20 0;
-#X connect 25 3 21 0;
-#X connect 25 4 22 0;
-#X connect 25 5 23 0;
-#X connect 25 6 0 0;
-#X connect 26 0 0 0;
-#X restore 50 245 pd camera;
-#X msg 83 196 colorspace YUV420P;
-#X text 218 196 <-- click here if your webcam uses this colorspace
-;
-#X obj 103 222 #yuv_to_rgb;
-#X text 185 222 <-- add this after [#in] to translate the colorspaces
-;
-#X obj 413 83 hsl 128 15 0 65535 0 0 \$0-colour \$0-colour colour 8
-8 0 8 -260818 -1 -1 0 1;
-#X text 98 266 plug this to #in;
-#X obj 241 53 vradio 15 1 0 3 \$0-size \$0-size empty 0 -6 0 8 -241291
--258699 -1 0;
-#X text 259 53 120 \, 160;
-#X text 259 69 240 \, 320;
-#X text 259 84 480 \, 640;
-#X text 239 38 select size;
-#X text 239 101 select channel;
-#X obj 10 245 inlet;
-#X obj 354 44 nbx 5 14 0 65535 0 0 \$0-contrast \$0-contrast empty
-0 -6 0 10 -260818 -1 -1 0 256;
-#X obj 354 64 nbx 5 14 0 65535 0 0 \$0-brightness \$0-brightness empty
-0 -6 0 10 -260818 -1 -1 0 256;
-#X obj 354 84 nbx 5 14 0 65535 0 0 \$0-colour \$0-colour empty 0 -6
-0 10 -260818 -1 -1 0 256;
-#X obj 354 104 nbx 5 14 0 65535 0 0 \$0-hue \$0-hue empty 0 -6 0 10
--260818 -1 -1 0 256;
-#X obj 354 124 nbx 5 14 0 65535 0 0 \$0-whiteness \$0-whiteness empty
-0 -6 0 10 -260818 -1 -1 0 256;
-#X msg 50 28 symbol /dev/video0;
-#X msg 50 48 symbol /dev/video1;
-#X msg 50 68 symbol /dev/video2;
-#X msg 50 88 symbol /dev/video3;
-#X text 17 6 Select a camera;
-#X obj 31 28 bng 15 250 50 0 empty empty empty 0 -6 0 8 -241291 -1
--1;
-#X obj 31 48 bng 15 250 50 0 empty empty empty 0 -6 0 8 -241291 -1
--1;
-#X obj 31 68 bng 15 250 50 0 empty empty empty 0 -6 0 8 -241291 -1
--1;
-#X obj 31 88 bng 15 250 50 0 empty empty empty 0 -6 0 8 -241291 -1
--1;
-#X msg 81 133 transfer mmap;
-#X msg 81 153 transfer read;
-#X msg 83 176 colorspace RGB24;
-#X text 70 115 Special options:;
-#X connect 7 0 0 0;
-#X connect 8 0 7 0;
-#X connect 20 0 7 0;
-#X connect 26 0 7 0;
-#X connect 27 0 7 0;
-#X connect 28 0 7 0;
-#X connect 29 0 7 0;
-#X connect 31 0 26 0;
-#X connect 32 0 27 0;
-#X connect 33 0 28 0;
-#X connect 34 0 29 0;
-#X connect 35 0 7 0;
-#X connect 36 0 7 0;
-#X connect 37 0 7 0;
diff --git a/externals/gridflow/pd_abstractions/#centre_of_gravity.pd b/externals/gridflow/pd_abstractions/#centre_of_gravity.pd
deleted file mode 100644
index 543b409d..00000000
--- a/externals/gridflow/pd_abstractions/#centre_of_gravity.pd
+++ /dev/null
@@ -1,113 +0,0 @@
-#N canvas 311 42 543 559 10;
-#X obj 166 26 inlet;
-#X obj 51 106 #rgb_to_greyscale;
-#X obj 51 162 #fold +;
-#X obj 51 188 # >> 8;
-#N canvas 0 0 450 300 gravity 0;
-#X obj 77 20 inlet;
-#X obj 75 276 outlet;
-#X obj 77 54 t a a;
-#X obj 41 90 #finished;
-#X obj 125 79 #dim;
-#X obj 126 105 #fold +;
-#X obj 68 140 #for 0 0 1;
-#X obj 172 190 #fold +;
-#X obj 72 179 # *;
-#X obj 72 199 #fold +;
-#X obj 72 249 # /;
-#X connect 0 0 2 0;
-#X connect 2 0 3 0;
-#X connect 2 1 4 0;
-#X connect 2 1 7 0;
-#X connect 2 1 8 1;
-#X connect 3 0 6 0;
-#X connect 4 0 5 0;
-#X connect 5 0 6 1;
-#X connect 6 0 8 0;
-#X connect 7 0 10 1;
-#X connect 8 0 9 0;
-#X connect 9 0 10 0;
-#X connect 10 0 1 0;
-#X restore 36 221 pd gravity;
-#X obj 50 244 #export;
-#X obj 84 277 #two;
-#X obj 85 301 #export_list;
-#X obj 86 367 # ==;
-#X obj 51 132 #fold +;
-#X obj 85 344 #for ( 0 0 ) ( 288 352 ) ( 1 1 );
-#X obj 264 253 #finished;
-#X obj 86 388 #fold |;
-#X obj 194 319 inlet;
-#X obj 98 441 #finished;
-#X obj 98 469 #store;
-#X obj 110 499 #outer * ( 255 -255 -255 );
-#X obj 112 520 # +;
-#X obj 112 540 # min 255;
-#X obj 112 560 # max 0;
-#X obj 112 586 outlet;
-#X obj 122 162 #fold +;
-#X obj 122 189 # >> 8;
-#N canvas 0 0 450 300 gravity 0;
-#X obj 77 20 inlet;
-#X obj 75 276 outlet;
-#X obj 77 54 t a a;
-#X obj 41 90 #finished;
-#X obj 125 79 #dim;
-#X obj 126 105 #fold +;
-#X obj 68 140 #for 0 0 1;
-#X obj 172 190 #fold +;
-#X obj 72 179 # *;
-#X obj 72 199 #fold +;
-#X obj 72 249 # /;
-#X connect 0 0 2 0;
-#X connect 2 0 3 0;
-#X connect 2 1 4 0;
-#X connect 2 1 7 0;
-#X connect 2 1 8 1;
-#X connect 3 0 6 0;
-#X connect 4 0 5 0;
-#X connect 5 0 6 1;
-#X connect 6 0 8 0;
-#X connect 7 0 10 1;
-#X connect 8 0 9 0;
-#X connect 9 0 10 0;
-#X connect 10 0 1 0;
-#X restore 134 219 pd gravity;
-#X obj 141 242 #export;
-#X obj 9 352 print list;
-#X obj 91 414 fork;
-#X obj 166 51 fork;
-#X obj 9 332 outlet;
-#X obj 122 134 #transpose;
-#X connect 0 0 27 0;
-#X connect 1 0 9 0;
-#X connect 2 0 3 0;
-#X connect 3 0 4 0;
-#X connect 4 0 5 0;
-#X connect 5 0 6 0;
-#X connect 6 0 7 0;
-#X connect 7 0 8 1;
-#X connect 7 0 28 0;
-#X connect 8 0 12 0;
-#X connect 9 0 2 0;
-#X connect 9 0 29 0;
-#X connect 10 0 8 0;
-#X connect 11 0 10 0;
-#X connect 12 0 26 0;
-#X connect 13 0 10 1;
-#X connect 14 0 15 0;
-#X connect 15 0 16 0;
-#X connect 16 0 17 0;
-#X connect 17 0 18 0;
-#X connect 18 0 19 0;
-#X connect 19 0 20 0;
-#X connect 21 0 22 0;
-#X connect 22 0 23 0;
-#X connect 23 0 24 0;
-#X connect 24 0 6 1;
-#X connect 26 0 14 0;
-#X connect 26 1 15 1;
-#X connect 27 0 11 0;
-#X connect 27 0 1 0;
-#X connect 27 1 17 1;
-#X connect 29 0 21 0;
diff --git a/externals/gridflow/pd_abstractions/#centroid.pd b/externals/gridflow/pd_abstractions/#centroid.pd
deleted file mode 100644
index 646b828a..00000000
--- a/externals/gridflow/pd_abstractions/#centroid.pd
+++ /dev/null
@@ -1,80 +0,0 @@
-#N canvas 494 135 339 225 10;
-#X obj -63 82 #fold +;
-#X obj -63 101 # >> 8;
-#N canvas 0 0 450 300 gravity 0;
-#X obj 77 20 inlet;
-#X obj 75 276 outlet;
-#X obj 77 54 t a a;
-#X obj 41 90 #finished;
-#X obj 125 79 #dim;
-#X obj 126 105 #fold +;
-#X obj 68 140 #for 0 0 1;
-#X obj 172 190 #fold +;
-#X obj 72 179 # *;
-#X obj 72 199 #fold +;
-#X obj 72 249 # /;
-#X connect 0 0 2 0;
-#X connect 2 0 3 0;
-#X connect 2 1 4 0;
-#X connect 2 1 7 0;
-#X connect 2 1 8 1;
-#X connect 3 0 6 0;
-#X connect 4 0 5 0;
-#X connect 5 0 6 1;
-#X connect 6 0 8 0;
-#X connect 7 0 10 1;
-#X connect 8 0 9 0;
-#X connect 9 0 10 0;
-#X connect 10 0 1 0;
-#X restore -63 120 pd gravity;
-#X obj -63 139 #export;
-#X obj -63 25 #fold +;
-#X obj 30 83 #fold +;
-#X obj 30 102 # >> 8;
-#N canvas 0 0 450 300 gravity 0;
-#X obj 77 20 inlet;
-#X obj 75 276 outlet;
-#X obj 77 54 t a a;
-#X obj 41 90 #finished;
-#X obj 125 79 #dim;
-#X obj 126 105 #fold +;
-#X obj 68 140 #for 0 0 1;
-#X obj 172 190 #fold +;
-#X obj 72 179 # *;
-#X obj 72 199 #fold +;
-#X obj 72 249 # /;
-#X connect 0 0 2 0;
-#X connect 2 0 3 0;
-#X connect 2 1 4 0;
-#X connect 2 1 7 0;
-#X connect 2 1 8 1;
-#X connect 3 0 6 0;
-#X connect 4 0 5 0;
-#X connect 5 0 6 1;
-#X connect 6 0 8 0;
-#X connect 7 0 10 1;
-#X connect 8 0 9 0;
-#X connect 9 0 10 0;
-#X connect 10 0 1 0;
-#X restore 30 121 pd gravity;
-#X obj 30 140 #export;
-#X obj 30 63 #transpose;
-#X obj -63 44 t a a;
-#X obj -63 178 #pack 2;
-#X obj -63 197 outlet position;
-#X obj -63 6 inlet greyscale_image;
-#X connect 0 0 1 0;
-#X connect 1 0 2 0;
-#X connect 2 0 3 0;
-#X connect 3 0 11 0;
-#X connect 4 0 10 0;
-#X connect 5 0 6 0;
-#X connect 6 0 7 0;
-#X connect 7 0 8 0;
-#X connect 8 0 11 1;
-#X connect 9 0 5 0;
-#X connect 10 0 0 0;
-#X connect 10 1 9 0;
-#X connect 11 0 12 0;
-#X connect 13 0 4 0;
-#X coords 0 0 5.43251e-06 7.95071e-06 100 40 0;
diff --git a/externals/gridflow/pd_abstractions/#checkers.pd b/externals/gridflow/pd_abstractions/#checkers.pd
deleted file mode 100644
index 24ca52eb..00000000
--- a/externals/gridflow/pd_abstractions/#checkers.pd
+++ /dev/null
@@ -1,18 +0,0 @@
-#N canvas 0 0 450 300 10;
-#X obj 18 14 inlet;
-#X obj 18 34 # >> 3;
-#X obj 18 54 # & 1;
-#X obj 18 74 #fold ^;
-#X obj 18 94 # inv+;
-#X obj 18 114 # & 63;
-#X obj 18 134 # + 128;
-#X obj 18 154 #outer ignore ( 0 0 0 );
-#X obj 18 174 outlet;
-#X connect 0 0 1 0;
-#X connect 1 0 2 0;
-#X connect 2 0 3 0;
-#X connect 3 0 4 0;
-#X connect 4 0 5 0;
-#X connect 5 0 6 0;
-#X connect 6 0 7 0;
-#X connect 7 0 8 0;
diff --git a/externals/gridflow/pd_abstractions/#clip.pd b/externals/gridflow/pd_abstractions/#clip.pd
deleted file mode 100644
index c96553c0..00000000
--- a/externals/gridflow/pd_abstractions/#clip.pd
+++ /dev/null
@@ -1,20 +0,0 @@
-#N canvas 531 259 450 300 10;
-#X obj 87 22 inlet;
-#X obj 87 206 outlet;
-#X obj 87 94 # min \$1;
-#X obj 87 143 # max \$2;
-#X obj 196 38 inlet;
-#X obj 249 108 inlet;
-#X msg 132 59 255;
-#X obj 132 39 loadbang;
-#X obj 184 106 loadbang;
-#X msg 184 126 0;
-#X connect 0 0 2 0;
-#X connect 2 0 3 0;
-#X connect 3 0 1 0;
-#X connect 4 0 2 1;
-#X connect 5 0 3 1;
-#X connect 6 0 2 1;
-#X connect 7 0 6 0;
-#X connect 8 0 9 0;
-#X connect 9 0 3 1;
diff --git a/externals/gridflow/pd_abstractions/#color.pd b/externals/gridflow/pd_abstractions/#color.pd
deleted file mode 100644
index b7a38d9f..00000000
--- a/externals/gridflow/pd_abstractions/#color.pd
+++ /dev/null
@@ -1,75 +0,0 @@
-#N canvas 0 17 209 58 10;
-#X obj 75 28 hsl 128 15 0 255 0 0 empty empty empty -2 -6 0 8 -225271
--24198 -1 0 1;
-#X obj 75 43 hsl 128 15 0 255 0 0 empty empty empty -2 -6 0 8 -228992
--62784 -1 0 1;
-#X obj 75 13 hsl 128 15 0 255 0 0 empty empty empty -2 -6 0 8 -261689
--258699 -1 0 1;
-#X obj 3 76 #pack 3;
-#X obj 209 13 inlet rgb_color;
-#X obj 56 75 outlet rgb_color;
-#X obj 48 12 int;
-#X obj 48 27 int;
-#X obj 48 42 int;
-#X obj 196 2 cnv 10 60 10 empty \$0-cnv empty 20 12 0 14 -262144 -262144
-0;
-#X obj 125 192 s \$0-cnv;
-#X msg 125 172 color \$1;
-#X obj 4 154 #export;
-#X obj 3 133 # ^ -1;
-#X obj 3 114 #fold |;
-#X obj 194 85 loadbang;
-#X msg 194 161 range \$1 \$2;
-#X obj 194 142 #export_list;
-#X obj 194 104 listmake \$1 \$2;
-#X obj 59 134 loadbang;
-#X obj 88 154 - \$3;
-#X msg 59 154 1;
-#X obj 3 180 spigot;
-#X obj 209 33 route delegate;
-#X obj 244 53 #unpack 3;
-#X obj 1 14 nbx 4 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 8 -262144
--1 -1 0 256;
-#X obj 1 30 nbx 4 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 8 -262144
--1 -1 0 256;
-#X obj 1 46 nbx 4 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 8 -262144
--1 -1 0 256;
-#X obj 194 123 # || (0 255);
-#X obj 3 95 # << (16 8 0);
-#X text 64 218 should be sized 209 by 58 or something;
-#X connect 0 0 7 0;
-#X connect 1 0 8 0;
-#X connect 2 0 6 0;
-#X connect 3 0 5 0;
-#X connect 3 0 29 0;
-#X connect 4 0 23 0;
-#X connect 6 0 25 0;
-#X connect 7 0 26 0;
-#X connect 8 0 27 0;
-#X connect 11 0 10 0;
-#X connect 12 0 22 0;
-#X connect 13 0 12 0;
-#X connect 14 0 13 0;
-#X connect 15 0 18 0;
-#X connect 16 0 1 0;
-#X connect 16 0 0 0;
-#X connect 16 0 2 0;
-#X connect 17 0 16 0;
-#X connect 18 0 28 0;
-#X connect 19 0 21 0;
-#X connect 20 0 22 1;
-#X connect 21 0 20 0;
-#X connect 22 0 11 0;
-#X connect 23 0 2 0;
-#X connect 23 0 0 0;
-#X connect 23 0 1 0;
-#X connect 23 1 24 0;
-#X connect 24 0 2 0;
-#X connect 24 1 0 0;
-#X connect 24 2 1 0;
-#X connect 25 0 3 0;
-#X connect 26 0 3 1;
-#X connect 27 0 3 2;
-#X connect 28 0 17 0;
-#X connect 29 0 14 0;
-#X coords 0 0 1 1 120 56 1;
diff --git a/externals/gridflow/pd_abstractions/#contrast.pd b/externals/gridflow/pd_abstractions/#contrast.pd
deleted file mode 100644
index 13549341..00000000
--- a/externals/gridflow/pd_abstractions/#contrast.pd
+++ /dev/null
@@ -1,20 +0,0 @@
-#N canvas 0 0 450 300 10;
-#X obj 14 14 inlet;
-#X obj 14 34 # inv+ 255;
-#X obj 14 54 # *>>8;
-#X obj 14 74 # inv+ 255;
-#X obj 14 94 # *>>8;
-#X obj 14 114 # min 255;
-#X obj 14 134 # max 0;
-#X obj 14 154 outlet;
-#X obj 54 14 inlet;
-#X obj 94 14 inlet;
-#X connect 0 0 1 0;
-#X connect 1 0 2 0;
-#X connect 2 0 3 0;
-#X connect 3 0 4 0;
-#X connect 4 0 5 0;
-#X connect 5 0 6 0;
-#X connect 6 0 7 0;
-#X connect 8 0 2 1;
-#X connect 9 0 4 1;
diff --git a/externals/gridflow/pd_abstractions/#fade.pd b/externals/gridflow/pd_abstractions/#fade.pd
deleted file mode 100644
index ade53918..00000000
--- a/externals/gridflow/pd_abstractions/#fade.pd
+++ /dev/null
@@ -1,37 +0,0 @@
-#N canvas 398 352 418 256 10;
-#X obj 21 65 inlet;
-#X obj 21 233 outlet;
-#X obj 21 85 # +;
-#X obj 78 199 # *;
-#X obj 190 108 float \$1;
-#X obj 190 88 loadbang;
-#X obj 156 64 inlet;
-#X text 20 7 new = (x-1)/x of old input + 1/x of new input;
-#X obj 173 180 # - 1;
-#X text 198 65 select fade rate;
-#X text 61 65 input;
-#X text 70 236 output;
-#X obj 21 106 # +;
-#X obj 127 169 # / 2;
-#X obj 156 86 t a;
-#X text 19 21 now rounds to closest;
-#X obj 21 127 # *>>8;
-#X obj 70 128 # inv* 256;
-#X obj 21 213 t a a;
-#X text 19 34 also faster (uses *>>8 instead of /);
-#X connect 0 0 2 0;
-#X connect 2 0 12 0;
-#X connect 3 0 2 1;
-#X connect 4 0 14 0;
-#X connect 5 0 4 0;
-#X connect 6 0 14 0;
-#X connect 8 0 3 1;
-#X connect 12 0 16 0;
-#X connect 13 0 12 1;
-#X connect 14 0 13 0;
-#X connect 14 0 8 0;
-#X connect 14 0 17 0;
-#X connect 16 0 18 0;
-#X connect 17 0 16 1;
-#X connect 18 0 1 0;
-#X connect 18 1 3 0;
diff --git a/externals/gridflow/pd_abstractions/#fade_lin.pd b/externals/gridflow/pd_abstractions/#fade_lin.pd
deleted file mode 100644
index 22054260..00000000
--- a/externals/gridflow/pd_abstractions/#fade_lin.pd
+++ /dev/null
@@ -1,29 +0,0 @@
-#N canvas 614 446 450 300 10;
-#X obj 68 16 inlet;
-#X obj 92 146 outlet;
-#X obj 95 61 # -;
-#X obj 155 16 inlet;
-#X obj 65 123 # +;
-#X obj 95 124 t a;
-#X obj 155 36 f \$1;
-#X obj 140 101 # inv+ 0;
-#X obj 296 38 loadbang;
-#X obj 78 101 # max -1;
-#X obj 78 81 # min 1;
-#X obj 195 16 inlet;
-#X obj 195 37 f \$2;
-#X connect 0 0 2 0;
-#X connect 2 0 10 0;
-#X connect 3 0 6 0;
-#X connect 4 0 5 0;
-#X connect 5 0 4 1;
-#X connect 5 0 1 0;
-#X connect 5 0 2 1;
-#X connect 6 0 10 1;
-#X connect 7 0 9 1;
-#X connect 8 0 6 0;
-#X connect 8 0 12 0;
-#X connect 9 0 4 0;
-#X connect 10 0 9 0;
-#X connect 11 0 12 0;
-#X connect 12 0 7 0;
diff --git a/externals/gridflow/pd_abstractions/#greyscale_to_rgb.pd b/externals/gridflow/pd_abstractions/#greyscale_to_rgb.pd
deleted file mode 100644
index 612bcb14..00000000
--- a/externals/gridflow/pd_abstractions/#greyscale_to_rgb.pd
+++ /dev/null
@@ -1,8 +0,0 @@
-#N canvas 550 233 335 174 10;
-#X obj 10 10 inlet;
-#X obj 10 70 outlet;
-#X obj 10 30 #fold put;
-#X obj 10 50 #outer ignore ( 0 0 0 );
-#X connect 0 0 2 0;
-#X connect 2 0 3 0;
-#X connect 3 0 1 0;
diff --git a/externals/gridflow/pd_abstractions/#hueshift.pd b/externals/gridflow/pd_abstractions/#hueshift.pd
deleted file mode 100644
index 028801ea..00000000
--- a/externals/gridflow/pd_abstractions/#hueshift.pd
+++ /dev/null
@@ -1,31 +0,0 @@
-#N canvas 581 130 450 278 10;
-#X obj 13 105 inlet;
-#X obj 13 162 outlet;
-#X obj 59 48 #rgb_to_yuv;
-#X obj 59 124 #yuv_to_rgb;
-#X obj 59 67 # - 128;
-#X obj 59 105 # + 128;
-#X obj 171 10 inlet;
-#X obj 59 86 #rotate \, axis 1 2 3;
-#X obj 59 7 loadbang;
-#X obj 171 29 t b f;
-#X obj 212 29 \$1;
-#X obj 212 10 loadbang;
-#X obj 13 124 #inner;
-#X msg 59 29 3 3 # 256 0 0 0;
-#X obj 13 143 # >> 8;
-#X connect 0 0 12 0;
-#X connect 2 0 4 0;
-#X connect 3 0 12 1;
-#X connect 4 0 7 0;
-#X connect 5 0 3 0;
-#X connect 6 0 9 0;
-#X connect 7 0 5 0;
-#X connect 8 0 13 0;
-#X connect 9 0 13 0;
-#X connect 9 1 7 1;
-#X connect 10 0 9 0;
-#X connect 11 0 10 0;
-#X connect 12 0 14 0;
-#X connect 13 0 2 0;
-#X connect 14 0 1 0;
diff --git a/externals/gridflow/pd_abstractions/#motion_detection.pd b/externals/gridflow/pd_abstractions/#motion_detection.pd
deleted file mode 100644
index 2867cd2c..00000000
--- a/externals/gridflow/pd_abstractions/#motion_detection.pd
+++ /dev/null
@@ -1,64 +0,0 @@
-#N canvas 70 26 572 517 10;
-#X msg 152 39 1;
-#X msg 152 63 0;
-#X text 188 37 <-- take a snapshot;
-#X text 190 64 <-- compare incoming images;
-#X obj 61 153 t a a;
-#X obj 62 206 # -;
-#X obj 62 366 # min 255;
-#X obj 62 341 # max 0;
-#X obj 62 295 # abs-;
-#X obj 102 178 spigot;
-#X obj 86 109 inlet;
-#X obj 63 491 outlet;
-#X obj 301 445 #fold +;
-#X obj 317 467 #fold +;
-#X obj 331 490 #fold +;
-#X obj 337 516 #export;
-#X obj 371 542 route int;
-#X obj 385 564 / 10000;
-#X msg 289 257 1;
-#X msg 302 286 0;
-#X obj 252 401 spigot;
-#X text 325 255 <-- output values;
-#X obj 91 411 # -;
-#X obj 150 406 r noise;
-#X obj 64 453 # max 0;
-#X obj 310 348 r displaced;
-#X text 339 281 <-- save your cpu some work and turn it off;
-#X obj 486 592 s displaced_numb;
-#X obj 163 121 r snapshot;
-#X obj 134 242 r emboss;
-#X obj 134 295 # + 128;
-#X obj 62 230 # << 2;
-#X obj 62 267 shunt 2;
-#X connect 0 0 9 1;
-#X connect 1 0 9 1;
-#X connect 4 0 9 0;
-#X connect 4 1 5 0;
-#X connect 5 0 31 0;
-#X connect 6 0 20 0;
-#X connect 6 0 22 0;
-#X connect 7 0 6 0;
-#X connect 8 0 7 0;
-#X connect 9 0 5 1;
-#X connect 10 0 4 0;
-#X connect 12 0 13 0;
-#X connect 13 0 14 0;
-#X connect 14 0 15 0;
-#X connect 15 0 16 0;
-#X connect 16 0 17 0;
-#X connect 17 0 27 0;
-#X connect 18 0 20 1;
-#X connect 19 0 20 1;
-#X connect 20 0 12 0;
-#X connect 22 0 24 0;
-#X connect 23 0 22 1;
-#X connect 24 0 11 0;
-#X connect 25 0 20 1;
-#X connect 28 0 9 1;
-#X connect 29 0 32 1;
-#X connect 30 0 7 0;
-#X connect 31 0 32 0;
-#X connect 32 0 8 0;
-#X connect 32 1 30 0;
diff --git a/externals/gridflow/pd_abstractions/#mouse.pd b/externals/gridflow/pd_abstractions/#mouse.pd
deleted file mode 100644
index 7e87688e..00000000
--- a/externals/gridflow/pd_abstractions/#mouse.pd
+++ /dev/null
@@ -1,93 +0,0 @@
-#N canvas 313 211 690 428 10;
-#X obj 23 103 listsublist 0 2;
-#X obj 48 64 fork;
-#X obj 126 181 fork;
-#X text 153 149 is button pressed?;
-#X obj 129 209 -;
-#X obj 125 150 > 0;
-#X obj 183 86 listelement 2;
-#X obj 120 377 outlet;
-#X text 161 183 1=click \, 0=nochange \, -1=unclick;
-#X text 157 36 list (y \, x \, buttons);
-#X obj 49 8 inlet;
-#X obj 48 34 route position;
-#X text 93 8 compatible with output of [#out window];
-#X obj 142 246 inv+ 1;
-#X obj 98 397 outlet;
-#X obj 142 356 outlet;
-#X text 431 330 three toggle-compatible outputs;
-#X text 432 346 and one +1/0/-1 for the wheel;
-#X text 147 397 click;
-#X text 193 357 unclick;
-#X obj 468 60 listelement 2;
-#X obj 430 301 outlet;
-#X obj 480 301 outlet;
-#X obj 530 301 outlet;
-#X obj 580 301 outlet;
-#X obj 430 273 change;
-#X obj 108 63 fork;
-#X obj 468 86 #outer >> ( 8 9 10 11 12 );
-#X obj 469 115 # & 1;
-#X obj 469 173 unpack 0 0 0 0 0;
-#X obj 549 241 inv+;
-#X obj 480 274 change;
-#X obj 530 275 change;
-#X obj 580 276 change;
-#X obj 469 145 #export_list;
-#X obj 163 335 outlet;
-#X text 172 378 drag;
-#X text 214 337 move;
-#X obj 163 275 inv+ 1;
-#X obj 389 16 inlet;
-#X text 433 9 list of 3 toggles;
-#X text 434 23 which buttons should be active;
-#X obj 347 81 # << ( 8 9 10 );
-#X obj 345 107 #fold +;
-#X obj 345 131 #export;
-#X obj 125 126 &;
-#X text 151 126 check only wanted buttons;
-#X obj 305 33 loadbang;
-#X msg 305 57 1 1 1;
-#X obj 98 269 shunt 3;
-#X obj 120 302 shunt 2;
-#X connect 0 0 49 0;
-#X connect 1 0 0 0;
-#X connect 1 1 6 0;
-#X connect 2 0 4 1;
-#X connect 2 1 4 0;
-#X connect 2 1 38 0;
-#X connect 4 0 13 0;
-#X connect 5 0 2 0;
-#X connect 6 0 45 0;
-#X connect 10 0 11 0;
-#X connect 11 0 26 0;
-#X connect 13 0 49 1;
-#X connect 20 0 27 0;
-#X connect 25 0 21 0;
-#X connect 26 0 1 0;
-#X connect 26 1 20 0;
-#X connect 27 0 28 0;
-#X connect 28 0 34 0;
-#X connect 29 0 25 0;
-#X connect 29 1 31 0;
-#X connect 29 2 32 0;
-#X connect 29 3 30 0;
-#X connect 29 4 30 1;
-#X connect 30 0 33 0;
-#X connect 31 0 22 0;
-#X connect 32 0 23 0;
-#X connect 33 0 24 0;
-#X connect 34 0 29 0;
-#X connect 38 0 50 1;
-#X connect 39 0 42 0;
-#X connect 42 0 43 0;
-#X connect 43 0 44 0;
-#X connect 44 0 45 1;
-#X connect 45 0 5 0;
-#X connect 47 0 48 0;
-#X connect 48 0 42 0;
-#X connect 49 0 14 0;
-#X connect 49 1 50 0;
-#X connect 49 2 15 0;
-#X connect 50 0 7 0;
-#X connect 50 1 35 0;
diff --git a/externals/gridflow/pd_abstractions/#posterize.pd b/externals/gridflow/pd_abstractions/#posterize.pd
deleted file mode 100644
index 5e763eac..00000000
--- a/externals/gridflow/pd_abstractions/#posterize.pd
+++ /dev/null
@@ -1,15 +0,0 @@
-#N canvas 0 0 450 300 10;
-#X obj 13 11 inlet;
-#X obj 13 31 # *>>8;
-#X obj 13 51 # * 255;
-#X obj 13 71 # /;
-#X obj 92 31 # - 1;
-#X obj 13 91 outlet;
-#X obj 92 11 inlet;
-#X connect 0 0 1 0;
-#X connect 1 0 2 0;
-#X connect 2 0 3 0;
-#X connect 3 0 5 0;
-#X connect 4 0 3 1;
-#X connect 6 0 4 0;
-#X connect 6 0 1 1;
diff --git a/externals/gridflow/pd_abstractions/#ravel.pd b/externals/gridflow/pd_abstractions/#ravel.pd
deleted file mode 100644
index bf17742f..00000000
--- a/externals/gridflow/pd_abstractions/#ravel.pd
+++ /dev/null
@@ -1,15 +0,0 @@
-#N canvas 0 0 450 300 10;
-#X obj 14 15 inlet;
-#X obj 44 65 #dim;
-#X obj 44 85 #fold * \, seed 1;
-#X obj 44 105 #redim ( 1 );
-#X obj 14 125 #redim ( 42 );
-#X obj 14 35 t a a;
-#X obj 14 145 outlet;
-#X connect 0 0 5 0;
-#X connect 1 0 2 0;
-#X connect 2 0 3 0;
-#X connect 3 0 4 1;
-#X connect 4 0 6 0;
-#X connect 5 0 4 0;
-#X connect 5 1 1 0;
diff --git a/externals/gridflow/pd_abstractions/#remap_image.pd b/externals/gridflow/pd_abstractions/#remap_image.pd
deleted file mode 100644
index d56eae88..00000000
--- a/externals/gridflow/pd_abstractions/#remap_image.pd
+++ /dev/null
@@ -1,21 +0,0 @@
-#N canvas 0 0 450 300 10;
-#X obj 18 13 inlet;
-#X obj 168 163 inlet;
-#X obj 18 160 #store;
-#X obj 113 90 #dim;
-#X obj 18 33 t a a;
-#X obj 18 110 #finished;
-#X obj 18 130 #for ( 0 0 ) ( 0 0 ) ( 1 1 );
-#X obj 18 191 outlet;
-#X obj 113 110 #inner ( 3 2 # 1 0 0 );
-#X obj 68 191 outlet;
-#X connect 0 0 4 0;
-#X connect 1 0 2 0;
-#X connect 2 0 7 0;
-#X connect 3 0 8 0;
-#X connect 4 0 5 0;
-#X connect 4 1 3 0;
-#X connect 4 1 2 1;
-#X connect 5 0 6 0;
-#X connect 6 0 9 0;
-#X connect 8 0 6 1;
diff --git a/externals/gridflow/pd_abstractions/#rgb_to_greyscale.pd b/externals/gridflow/pd_abstractions/#rgb_to_greyscale.pd
deleted file mode 100644
index 24c5c0d9..00000000
--- a/externals/gridflow/pd_abstractions/#rgb_to_greyscale.pd
+++ /dev/null
@@ -1,10 +0,0 @@
-#N canvas 550 233 335 174 10;
-#X obj 10 10 inlet;
-#X obj 10 30 # * ( 77 151 28 );
-#X obj 10 50 #fold +;
-#X obj 10 70 #outer >> ( 8 );
-#X obj 10 90 outlet;
-#X connect 0 0 1 0;
-#X connect 1 0 2 0;
-#X connect 2 0 3 0;
-#X connect 3 0 4 0;
diff --git a/externals/gridflow/pd_abstractions/#rgb_to_yuv.pd b/externals/gridflow/pd_abstractions/#rgb_to_yuv.pd
deleted file mode 100644
index c144dda0..00000000
--- a/externals/gridflow/pd_abstractions/#rgb_to_yuv.pd
+++ /dev/null
@@ -1,10 +0,0 @@
-#N canvas 550 233 438 174 10;
-#X obj 10 10 inlet;
-#X obj 10 90 outlet;
-#X obj 10 70 # + ( 0 128 128 );
-#X obj 10 50 # >> 8;
-#X obj 10 30 #inner ( 3 3 # 76 -44 128 150 -85 -108 29 128 -21 );
-#X connect 0 0 4 0;
-#X connect 2 0 1 0;
-#X connect 3 0 2 0;
-#X connect 4 0 3 0;
diff --git a/externals/gridflow/pd_abstractions/#solarize.pd b/externals/gridflow/pd_abstractions/#solarize.pd
deleted file mode 100644
index 62cf7b75..00000000
--- a/externals/gridflow/pd_abstractions/#solarize.pd
+++ /dev/null
@@ -1,14 +0,0 @@
-#N canvas 0 0 450 300 10;
-#X obj 15 14 inlet;
-#X obj 15 34 # & 255;
-#X obj 15 54 # << 1;
-#X obj 15 74 # inv+ 255;
-#X obj 15 114 # inv+ 255;
-#X obj 15 134 outlet;
-#X obj 15 94 # abs-;
-#X connect 0 0 1 0;
-#X connect 1 0 2 0;
-#X connect 2 0 3 0;
-#X connect 3 0 6 0;
-#X connect 4 0 5 0;
-#X connect 6 0 4 0;
diff --git a/externals/gridflow/pd_abstractions/#spread.pd b/externals/gridflow/pd_abstractions/#spread.pd
deleted file mode 100644
index 41a6a8da..00000000
--- a/externals/gridflow/pd_abstractions/#spread.pd
+++ /dev/null
@@ -1,22 +0,0 @@
-#N canvas 0 0 450 300 10;
-#X obj 17 12 inlet;
-#X obj 17 52 # & 0;
-#X obj 17 72 # + 5;
-#X obj 17 92 # rand;
-#X obj 17 112 # - 2;
-#X obj 137 162 # +;
-#X obj 124 68 # >> 1;
-#X obj 17 32 t a a;
-#X obj 137 182 outlet;
-#X obj 124 32 inlet;
-#X connect 0 0 7 0;
-#X connect 1 0 2 0;
-#X connect 2 0 3 0;
-#X connect 3 0 4 0;
-#X connect 4 0 5 0;
-#X connect 5 0 8 0;
-#X connect 6 0 4 1;
-#X connect 7 0 1 0;
-#X connect 7 1 5 1;
-#X connect 9 0 6 0;
-#X connect 9 0 2 1;
diff --git a/externals/gridflow/pd_abstractions/#text_to_image.pd b/externals/gridflow/pd_abstractions/#text_to_image.pd
deleted file mode 100644
index f9d57480..00000000
--- a/externals/gridflow/pd_abstractions/#text_to_image.pd
+++ /dev/null
@@ -1,41 +0,0 @@
-#N canvas 305 189 450 300 10;
-#X obj 16 14 inlet text;
-#X obj 16 265 outlet image;
-#X obj 291 132 inlet font;
-#X obj 16 155 #store;
-#X obj 203 38 inlet colors;
-#X text 203 2 0: background;
-#X text 203 18 1: foreground;
-#X obj 203 66 t a;
-#X obj 16 174 #store;
-#X obj 229 66 loadbang;
-#X text 67 157 font;
-#X text 68 174 palette;
-#X obj 16 33 #outer ignore ( 0 );
-#X obj 16 212 t a a;
-#X obj 16 238 #redim ( );
-#X obj 154 161 #dim;
-#X obj 154 180 #unpack 4;
-#X obj 174 200 *;
-#X obj 16 193 #transpose 0 1;
-#X obj 154 228 pack 0 0 0;
-#X msg 229 85 2 3 # 0 0 0 255 255 255;
-#X connect 0 0 12 0;
-#X connect 2 0 3 1;
-#X connect 3 0 8 0;
-#X connect 4 0 7 0;
-#X connect 8 0 18 0;
-#X connect 9 0 20 0;
-#X connect 12 0 3 0;
-#X connect 13 0 14 0;
-#X connect 13 1 15 0;
-#X connect 14 0 1 0;
-#X connect 15 0 16 0;
-#X connect 16 0 19 0;
-#X connect 16 1 17 0;
-#X connect 16 2 17 1;
-#X connect 16 3 19 2;
-#X connect 17 0 19 1;
-#X connect 18 0 13 0;
-#X connect 19 0 14 1;
-#X connect 20 0 8 1;
diff --git a/externals/gridflow/pd_abstractions/#yuv_to_rgb.pd b/externals/gridflow/pd_abstractions/#yuv_to_rgb.pd
deleted file mode 100644
index 4856a10f..00000000
--- a/externals/gridflow/pd_abstractions/#yuv_to_rgb.pd
+++ /dev/null
@@ -1,10 +0,0 @@
-#N canvas 550 233 438 174 10;
-#X obj 10 10 inlet;
-#X obj 10 90 outlet;
-#X obj 10 30 # - ( 0 128 128 );
-#X obj 10 70 # >> 8;
-#X obj 10 50 #inner ( 3 3 # 256 256 256 0 -88 454 358 -183 0 );
-#X connect 0 0 2 0;
-#X connect 2 0 4 0;
-#X connect 3 0 1 0;
-#X connect 4 0 3 0;
diff --git a/externals/gridflow/pd_abstractions/@complex_sq.pd b/externals/gridflow/pd_abstractions/@complex_sq.pd
deleted file mode 100644
index 9b05de81..00000000
--- a/externals/gridflow/pd_abstractions/@complex_sq.pd
+++ /dev/null
@@ -1,8 +0,0 @@
-#N canvas 0 0 303 155 10;
-#X obj 17 15 inlet;
-#X obj 17 75 outlet;
-#X obj 17 35 #inner ( 2 2 2 # 0 2 1 -1 1 0 1 1 );
-#X obj 17 55 #fold * \, seed 1;
-#X connect 0 0 2 0;
-#X connect 2 0 3 0;
-#X connect 3 0 1 0;
diff --git a/externals/gridflow/pd_abstractions/count.pd b/externals/gridflow/pd_abstractions/count.pd
deleted file mode 100644
index 087bd40d..00000000
--- a/externals/gridflow/pd_abstractions/count.pd
+++ /dev/null
@@ -1,44 +0,0 @@
-#N canvas 448 36 450 300 10;
-#X obj 131 81 + 1;
-#X obj 132 37 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X floatatom 190 82 5 0 0 0 - - -;
-#X msg 131 61 1;
-#X obj 204 168 select 1;
-#X obj 191 195 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 70 39 inlet;
-#X obj 131 150 outlet;
-#X obj 239 80 inlet;
-#X obj 190 106 == \$2;
-#X floatatom 131 132 5 0 0 0 - - -;
-#X obj 191 218 outlet;
-#X obj 131 106 - 1;
-#X floatatom 191 130 5 0 0 0 - - -;
-#X obj 203 11 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 293 49 print;
-#X obj 222 63 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 192 38 float \$1;
-#X text 231 9 <-- bang this to reset;
-#X obj 219 -11 inlet;
-#X connect 0 0 2 0;
-#X connect 0 0 12 0;
-#X connect 1 0 3 0;
-#X connect 2 0 0 1;
-#X connect 2 0 9 0;
-#X connect 3 0 0 0;
-#X connect 4 0 5 0;
-#X connect 4 0 17 0;
-#X connect 5 0 11 0;
-#X connect 6 0 1 0;
-#X connect 8 0 9 1;
-#X connect 9 0 13 0;
-#X connect 10 0 7 0;
-#X connect 12 0 10 0;
-#X connect 13 0 4 0;
-#X connect 14 0 17 0;
-#X connect 16 0 2 0;
-#X connect 17 0 2 0;
-#X connect 19 0 14 0;
diff --git a/externals/gridflow/pd_abstractions/pingpong.pd b/externals/gridflow/pd_abstractions/pingpong.pd
deleted file mode 100644
index 406c9d16..00000000
--- a/externals/gridflow/pd_abstractions/pingpong.pd
+++ /dev/null
@@ -1,27 +0,0 @@
-#N canvas 0 0 450 270 10;
-#X text 50 11 counter;
-#X obj 67 40 inlet;
-#X obj 67 83 %;
-#X obj 67 103 -;
-#X obj 164 49 inlet;
-#X text 163 32 maxvalue;
-#X obj 83 62 * 2;
-#X obj 67 124 abs;
-#X obj 67 185 outlet;
-#X text 123 184 values from 0 to maxvalue;
-#X obj 67 145 -;
-#X obj 67 165 * -1;
-#X obj 164 70 float \$1;
-#X obj 206 49 loadbang;
-#X connect 1 0 2 0;
-#X connect 2 0 3 0;
-#X connect 3 0 7 0;
-#X connect 4 0 12 0;
-#X connect 6 0 2 1;
-#X connect 7 0 10 0;
-#X connect 10 0 11 0;
-#X connect 11 0 8 0;
-#X connect 12 0 6 0;
-#X connect 12 0 10 1;
-#X connect 12 0 3 1;
-#X connect 13 0 12 0;
diff --git a/externals/gridflow/pd_examples/binary_operations.pd b/externals/gridflow/pd_examples/binary_operations.pd
deleted file mode 100644
index cf4df98a..00000000
--- a/externals/gridflow/pd_examples/binary_operations.pd
+++ /dev/null
@@ -1,73 +0,0 @@
-#N canvas 401 211 734 490 10;
-#X text 163 212 posterize;
-#X obj 99 187 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 1
-;
-#X obj 143 187 hsl 59 15 2 8 0 0 empty empty empty -2 -6 0 8 -260818
--1 -1 0 1;
-#X obj 65 103 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 87 361 # ^;
-#X obj 135 336 hsl 137 15 0 255 0 0 empty empty empty -2 -6 0 8 -260818
--1 -1 0 1;
-#X obj 99 237 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 1
-;
-#X text 124 144 negative;
-#X obj 39 121 #in;
-#X text 146 361 munchies (XOR effect) in the colour domain;
-#X obj 39 187 shunt 2;
-#X obj 39 338 shunt 2;
-#X text 157 297 color wrapping;
-#X obj 88 261 # %;
-#X obj 98 338 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 1
-;
-#X obj 87 164 # inv+ 255;
-#X obj 99 142 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 1
-;
-#X obj 65 54 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1;
-#X obj 89 304 # /;
-#X obj 39 142 shunt 2;
-#X obj 39 423 #out window;
-#X obj 88 283 # * 255;
-#X obj 166 265 hsl 137 15 0 255 0 0 empty empty empty -2 -6 0 8 -260818
--1 -1 0 1;
-#X obj 39 237 shunt 2;
-#X text 88 105 image loader;
-#X msg 65 121 open r001.jpg \, bang;
-#X obj 65 78 metro 33.3667;
-#X obj 87 212 #posterize;
-#X obj 8 456 cnv 15 720 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 16 463 GridFlow 0.8.0;
-#X obj 8 5 cnv 15 720 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 11 5 binary_operations.pd;
-#X text 222 143 <-- try various combinations of checkboxes and settings.
-then click on the image loader to see the result.;
-#X text 11 19 Copyright Mathieu Bouchard;
-#X connect 1 0 10 1;
-#X connect 2 0 27 1;
-#X connect 3 0 25 0;
-#X connect 4 0 20 0;
-#X connect 5 0 4 1;
-#X connect 6 0 23 1;
-#X connect 8 0 19 0;
-#X connect 10 0 23 0;
-#X connect 10 1 27 0;
-#X connect 11 0 20 0;
-#X connect 11 1 4 0;
-#X connect 13 0 21 0;
-#X connect 14 0 11 1;
-#X connect 15 0 10 0;
-#X connect 16 0 19 1;
-#X connect 17 0 26 0;
-#X connect 18 0 11 0;
-#X connect 19 0 10 0;
-#X connect 19 1 15 0;
-#X connect 21 0 18 0;
-#X connect 22 0 18 1;
-#X connect 22 0 13 1;
-#X connect 23 0 11 0;
-#X connect 23 1 13 0;
-#X connect 25 0 8 0;
-#X connect 26 0 3 0;
-#X connect 27 0 23 0;
diff --git a/externals/gridflow/pd_examples/blob.pd b/externals/gridflow/pd_examples/blob.pd
deleted file mode 100644
index 12ea5ee6..00000000
--- a/externals/gridflow/pd_examples/blob.pd
+++ /dev/null
@@ -1,106 +0,0 @@
-#N canvas 19 81 792 575 10;
-#X floatatom 398 265 5 0 0 0 - - -;
-#X obj 368 225 r move;
-#X obj 56 129 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X msg 56 162 240 320 3 # 0;
-#X msg 461 407 300;
-#X obj 398 392 # * 300;
-#X obj 261 475 # cos*;
-#X msg 461 369 1600;
-#X msg 513 299 25;
-#X obj 368 263 +;
-#X msg 513 318 100;
-#X obj 505 244 hsl 128 15 100 2600 0 1 empty empty empty -2 -6 0 8
--260818 -1 -1 2297 1;
-#X text 314 474 make circular orbit of variable radius;
-#X floatatom 502 261 5 0 0 0 - - -;
-#X msg 461 388 800;
-#X text 294 375 frequency of the orbit;
-#X text 501 229 increment;
-#X msg 368 244 1;
-#X obj 58 108 s move;
-#X obj 73 128 loadbang;
-#X obj 19 50 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1;
-#X obj 75 392 #out window;
-#X obj 186 236 # +;
-#X obj 437 345 # + 50;
-#X text 394 250 counter;
-#X obj 19 91 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 261 494 # + ( 120 160 );
-#X obj 19 354 #store;
-#X text 65 147 blank image to start with;
-#X text 212 237 translate the square;
-#X text 546 297 make a wavy radius (50-100) \; the 1100 is its frequency
-\; tune it for fun and profit.;
-#X obj 19 108 t b b;
-#X obj 368 282 t a a a;
-#X msg 186 198 4 2 # -1 -1 -1 1 1 1 1 -1;
-#X obj 19 72 metro 1.367;
-#X obj 8 541 cnv 15 780 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 16 548 GridFlow 0.8.0;
-#X obj 8 12 cnv 15 780 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 21 12 Blob.pd;
-#X msg 514 337 10;
-#X obj 437 307 # * 1000;
-#X obj 101 265 #color;
-#X obj 101 221 loadbang;
-#X text 385 432 duplicate the angle \; make the 2nd 90 degrees apart
-(required for a circle \; else it'll be an oval or a line);
-#X obj 75 354 #draw_polygon + (3 # );
-#X text 21 25 Copyright 2002 Mathieu Bouchard and Alexandre Castonguay
-;
-#X text 185 182 a 2x2 square's coordinates;
-#X text 228 218 scale factor;
-#X obj 186 217 # * 8;
-#X obj 75 373 #solarize;
-#X text 400 49 This is the classic "Shadebob" effect of the demoscene
-;
-#X msg 101 243 12 24 36;
-#X text 6 331 superimpose the light of many squares;
-#X obj 437 326 # cos* 100;
-#X obj 261 444 #outer + (0 9000);
-#X connect 0 0 9 1;
-#X connect 1 0 17 0;
-#X connect 2 0 3 0;
-#X connect 3 0 27 1;
-#X connect 4 0 5 1;
-#X connect 5 0 54 0;
-#X connect 6 0 26 0;
-#X connect 7 0 5 1;
-#X connect 8 0 53 1;
-#X connect 9 0 0 0;
-#X connect 9 0 32 0;
-#X connect 10 0 53 1;
-#X connect 11 0 13 0;
-#X connect 13 0 40 1;
-#X connect 14 0 5 1;
-#X connect 17 0 9 0;
-#X connect 19 0 2 0;
-#X connect 20 0 34 0;
-#X connect 22 0 44 2;
-#X connect 23 0 6 1;
-#X connect 25 0 31 0;
-#X connect 26 0 22 1;
-#X connect 27 0 44 0;
-#X connect 31 0 27 0;
-#X connect 31 1 18 0;
-#X connect 32 0 33 0;
-#X connect 32 1 5 0;
-#X connect 32 2 40 0;
-#X connect 33 0 48 0;
-#X connect 34 0 25 0;
-#X connect 39 0 53 1;
-#X connect 40 0 53 0;
-#X connect 41 0 44 1;
-#X connect 42 0 51 0;
-#X connect 44 0 27 1;
-#X connect 44 0 49 0;
-#X connect 48 0 22 0;
-#X connect 49 0 21 0;
-#X connect 51 0 41 0;
-#X connect 53 0 23 0;
-#X connect 54 0 6 0;
diff --git a/externals/gridflow/pd_examples/cellular_1d.pd b/externals/gridflow/pd_examples/cellular_1d.pd
deleted file mode 100644
index 138b20a1..00000000
--- a/externals/gridflow/pd_examples/cellular_1d.pd
+++ /dev/null
@@ -1,160 +0,0 @@
-#N canvas 355 53 786 544 10;
-#X obj 33 103 loadbang;
-#X obj 93 352 tgl 15 0 empty empty empty 0 -6 0 8 -260818 -1 -1 0 1
-;
-#X obj 108 352 tgl 15 0 empty empty empty 0 -6 0 8 -260818 -1 -1 1
-1;
-#X obj 123 352 tgl 15 0 empty empty empty 0 -6 0 8 -260818 -1 -1 1
-1;
-#X obj 138 352 tgl 15 0 empty empty empty 0 -6 0 8 -260818 -1 -1 0
-1;
-#X obj 153 352 tgl 15 0 empty empty empty 0 -6 0 8 -260818 -1 -1 1
-1;
-#X obj 168 352 tgl 15 0 empty empty empty 0 -6 0 8 -260818 -1 -1 0
-1;
-#X obj 183 352 tgl 15 0 empty empty empty 0 -6 0 8 -260818 -1 -1 1
-1;
-#X obj 198 352 tgl 15 0 empty empty empty 0 -6 0 8 -260818 -1 -1 0
-1;
-#X obj 124 468 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10
--262144 -1 -1 86 256;
-#X obj -1 215 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1
--1;
-#X msg 17 312 1 256 # 1;
-#X msg 33 122 1 256 # 2;
-#X obj -1 77 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1;
-#X obj 415 245 loadbang;
-#X msg 415 264 1 256 # 0;
-#X text 131 452 characteristic number;
-#X obj 352 86 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10
--241291 -1 -1 0 256;
-#X msg 466 127 \$1 256;
-#X msg 352 122 set \$1;
-#X text 79 141 randomizer;
-#X text 91 331 specify behaviour here;
-#X text 24 234 compute new state;
-#X text 315 283 make scrollie;
-#X text 367 313 convert bit matrix to rgb image;
-#X text 313 296 (window height = 128);
-#X obj 159 74 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 151 307 loadbang;
-#X obj 95 182 t a a;
-#X obj 17 76 metro 33.3667;
-#X obj 366 165 t a a;
-#X obj 534 403 loadbang;
-#X msg 419 404 3 # 0;
-#X msg 595 405 3 # 255;
-#X text 460 405 background;
-#X text 648 407 foreground;
-#X obj 17 272 t a a;
-#X obj 33 141 # rand;
-#X obj 17 214 #store;
-#X obj 17 292 #finished;
-#X obj 17 332 # <<;
-#X obj 17 352 # &;
-#X obj 17 372 # != 0;
-#X obj 123 376 #pack 8;
-#X obj 124 415 #fold +;
-#X obj 124 436 #export;
-#X obj 159 91 #for 0 256 1;
-#X obj 159 110 # == 128;
-#X obj 159 129 #redim ( 1 256 );
-#X obj 366 184 #finished;
-#X obj 352 207 #for 1 128 1;
-#X obj 352 245 #store;
-#X obj 352 264 @join 0;
-#X obj 351 349 #store;
-#X obj 419 424 #color;
-#X obj 595 424 #color;
-#X obj 513 485 #pack 6;
-#X obj 17 252 #convolve (1 3 # 1 2 4);
-#X obj 124 396 # << (0 1 2 3 4 5 6 7);
-#X obj -4 510 cnv 15 780 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 4 517 GridFlow 0.8.0;
-#X obj -7 0 cnv 15 780 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 351 368 #out window;
-#X text -3 15 Copyright 2002 Mathieu Bouchard;
-#X text -3 1 Cellular_1d;
-#X obj 352 102 max 1;
-#X text 419 84 <-- number of new lines per frame;
-#X text 178 73 <-- make single dot;
-#X text 100 123 restart;
-#X obj 352 226 #outer ignore (0);
-#X obj 351 330 #outer ignore (0);
-#X obj 398 349 #redim (2 3);
-#X obj 366 146 #import (1 256);
-#X obj 419 484 #unpack 3;
-#X obj 595 484 #unpack 3;
-#X connect 0 0 12 0;
-#X connect 1 0 43 0;
-#X connect 2 0 43 1;
-#X connect 3 0 43 2;
-#X connect 4 0 43 3;
-#X connect 5 0 43 4;
-#X connect 6 0 43 5;
-#X connect 7 0 43 6;
-#X connect 8 0 43 7;
-#X connect 9 0 41 1;
-#X connect 10 0 38 0;
-#X connect 11 0 40 0;
-#X connect 12 0 37 0;
-#X connect 13 0 29 0;
-#X connect 14 0 15 0;
-#X connect 15 0 51 1;
-#X connect 17 0 65 0;
-#X connect 18 0 72 1;
-#X connect 19 0 50 0;
-#X connect 26 0 46 0;
-#X connect 27 0 2 0;
-#X connect 27 0 3 0;
-#X connect 27 0 7 0;
-#X connect 27 0 5 0;
-#X connect 28 0 38 1;
-#X connect 28 1 72 0;
-#X connect 29 0 38 0;
-#X connect 30 0 49 0;
-#X connect 30 1 52 1;
-#X connect 31 0 32 0;
-#X connect 31 0 33 0;
-#X connect 32 0 54 0;
-#X connect 33 0 55 0;
-#X connect 36 0 39 0;
-#X connect 36 1 40 1;
-#X connect 37 0 28 0;
-#X connect 38 0 57 0;
-#X connect 39 0 11 0;
-#X connect 40 0 41 0;
-#X connect 41 0 42 0;
-#X connect 42 0 28 0;
-#X connect 43 0 58 0;
-#X connect 44 0 45 0;
-#X connect 45 0 9 0;
-#X connect 46 0 47 0;
-#X connect 47 0 48 0;
-#X connect 48 0 28 0;
-#X connect 49 0 50 0;
-#X connect 50 0 69 0;
-#X connect 51 0 52 0;
-#X connect 52 0 51 1;
-#X connect 52 0 70 0;
-#X connect 53 0 62 0;
-#X connect 54 0 73 0;
-#X connect 55 0 74 0;
-#X connect 56 0 71 0;
-#X connect 57 0 36 0;
-#X connect 58 0 44 0;
-#X connect 65 0 19 0;
-#X connect 65 0 18 0;
-#X connect 69 0 51 0;
-#X connect 70 0 53 0;
-#X connect 71 0 53 1;
-#X connect 72 0 30 0;
-#X connect 73 0 56 0;
-#X connect 73 1 56 1;
-#X connect 73 2 56 2;
-#X connect 74 0 56 3;
-#X connect 74 1 56 4;
-#X connect 74 2 56 5;
diff --git a/externals/gridflow/pd_examples/color_correction.pd b/externals/gridflow/pd_examples/color_correction.pd
deleted file mode 100644
index 8c276f11..00000000
--- a/externals/gridflow/pd_examples/color_correction.pd
+++ /dev/null
@@ -1,154 +0,0 @@
-#N canvas 459 129 672 521 10;
-#X text 360 136 sigma (extremes);
-#X obj 134 465 #out window;
-#X text 361 211 linear (contrast);
-#X obj 134 404 shunt 2;
-#N canvas 1 96 188 188 color 0;
-#X obj 55 134 # inv+;
-#X obj 55 90 # inv+ 255;
-#X obj 127 89 inlet;
-#X obj 55 177 outlet 0;
-#X obj 55 43 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 55 22 inlet;
-#X obj 55 112 #outer <;
-#X obj 55 155 # & 255;
-#X obj 55 67 #for 0 256 1;
-#X connect 0 0 7 0;
-#X connect 1 0 6 0;
-#X connect 2 0 6 1;
-#X connect 4 0 8 0;
-#X connect 5 0 4 0;
-#X connect 6 0 0 0;
-#X connect 7 0 3 0;
-#X connect 8 0 1 0;
-#X restore 184 425 pd color correction graph generator;
-#X obj 59 285 #in;
-#X text 360 284 constant (brightness);
-#N canvas 604 262 237 400 color-correction 0;
-#X obj 23 214 # + 128;
-#X obj 23 194 # /;
-#X obj 23 112 # *;
-#X obj 23 291 # +;
-#X obj 77 112 # max 32;
-#X obj 23 317 # max 0;
-#X obj 77 151 # tanh* 512;
-#X obj 23 340 # min 255;
-#X obj 23 64 # gamma;
-#X obj 77 131 # << 5;
-#X obj 23 93 # - 128;
-#X obj 23 172 # tanh* 65535;
-#X obj 23 132 # >> 2;
-#X text 89 327 trim;
-#X obj 95 242 inlet linear;
-#X obj 114 264 inlet constant;
-#X obj 23 243 # *>>8;
-#X obj 77 93 inlet sigma;
-#X obj 34 38 inlet gamma;
-#X obj 23 12 inlet image;
-#X obj 23 369 outlet image;
-#X connect 0 0 16 0;
-#X connect 1 0 0 0;
-#X connect 2 0 12 0;
-#X connect 3 0 5 0;
-#X connect 4 0 2 1;
-#X connect 4 0 9 0;
-#X connect 5 0 7 0;
-#X connect 6 0 1 1;
-#X connect 7 0 20 0;
-#X connect 8 0 10 0;
-#X connect 9 0 6 0;
-#X connect 10 0 2 0;
-#X connect 11 0 1 0;
-#X connect 12 0 11 0;
-#X connect 14 0 16 1;
-#X connect 15 0 3 1;
-#X connect 16 0 3 0;
-#X connect 17 0 4 0;
-#X connect 18 0 8 1;
-#X connect 19 0 8 0;
-#X restore 176 314 pd color-correction;
-#X obj 134 425 #store;
-#X obj 29 45 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1;
-#X obj 29 81 #for 0 256 1;
-#X obj 164 338 #finished;
-#X obj 29 62 metro 33.3667;
-#X obj 59 247 loadbang;
-#X obj 256 92 vradio 15 1 0 3 empty empty empty 0 -6 0 8 -241291 -1
--1 0;
-#X text 277 93 regular;
-#X text 276 108 solarize;
-#X text 277 122 solarize 2;
-#X obj 29 119 shunt 3;
-#X obj 29 173 t a;
-#X obj 119 174 # sin* 255;
-#X obj 120 155 # / 255;
-#X obj 120 136 # * 18000;
-#X obj 190 391 vradio 15 1 0 2 empty empty empty 0 -6 0 8 -241291 -1
--1 0;
-#X text 209 391 see picture;
-#X text 209 406 see graph;
-#X obj 8 221 spigot;
-#X obj 57 222 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 1
-;
-#X text 13 204 enable stream;
-#X text 361 60 gamma (midtones);
-#X msg 254 183 3 # 256;
-#X obj 253 163 loadbang;
-#X msg 238 212 3 # 0;
-#X obj 8 310 #camera;
-#X obj 362 77 #color 0 1024 1;
-#X obj 362 152 #color 0 1024 1;
-#X obj 362 226 #color 0 1024 1;
-#X obj 362 298 #color -256 256 1;
-#X obj 51 140 #solarize;
-#X obj 134 445 #apply_colormap_channelwise;
-#X obj 2 2 cnv 15 720 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 15 15 Copyright 2002 Mathieu Bouchard;
-#X obj 2 487 cnv 15 720 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 10 494 GridFlow 0.8.0;
-#X text 15 2 color_correction.pd;
-#X obj 29 100 #outer + (0 0 0);
-#X msg 59 266 load teapot.png;
-#X connect 3 0 8 0;
-#X connect 3 1 4 0;
-#X connect 4 0 1 0;
-#X connect 5 0 8 1;
-#X connect 7 0 11 0;
-#X connect 7 0 4 1;
-#X connect 7 0 39 1;
-#X connect 8 0 39 0;
-#X connect 9 0 12 0;
-#X connect 10 0 45 0;
-#X connect 11 0 3 0;
-#X connect 12 0 10 0;
-#X connect 12 0 26 0;
-#X connect 13 0 46 0;
-#X connect 14 0 18 1;
-#X connect 18 0 19 0;
-#X connect 18 1 38 0;
-#X connect 18 2 22 0;
-#X connect 19 0 7 0;
-#X connect 20 0 19 0;
-#X connect 21 0 20 0;
-#X connect 22 0 21 0;
-#X connect 23 0 3 1;
-#X connect 26 0 33 0;
-#X connect 27 0 26 1;
-#X connect 30 0 34 0;
-#X connect 30 0 35 0;
-#X connect 30 0 36 0;
-#X connect 31 0 30 0;
-#X connect 31 0 32 0;
-#X connect 32 0 37 0;
-#X connect 33 0 8 1;
-#X connect 34 0 7 1;
-#X connect 35 0 7 2;
-#X connect 36 0 7 3;
-#X connect 37 0 7 4;
-#X connect 38 0 19 0;
-#X connect 39 0 1 0;
-#X connect 45 0 18 0;
-#X connect 46 0 5 0;
diff --git a/externals/gridflow/pd_examples/color_detect.pd b/externals/gridflow/pd_examples/color_detect.pd
deleted file mode 100644
index 91610cdb..00000000
--- a/externals/gridflow/pd_examples/color_detect.pd
+++ /dev/null
@@ -1,218 +0,0 @@
-#N canvas 562 75 668 715 10;
-#X obj 14 262 # > 0;
-#X obj 68 284 # + 128;
-#X obj 383 135 hsl 222 15 0 442 0 0 empty empty tolerance 8 8 0 8 -260818
--1 -1 10300 1;
-#X obj 224 530 #out window;
-#X obj 68 262 # tanh* 127;
-#X obj 86 2 #store;
-#X obj 277 177 tgl 15 1 empty empty empty 0 -6 0 8 -261689 -258699
--1 1 1;
-#X obj 31 -64 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 1 1
-;
-#X obj 14 179 # inv+;
-#X obj 14 284 # << 8;
-#X obj 14 160 #fold +;
-#X obj 315 360 loadbang;
-#X obj 298 398 #checkers;
-#X obj 224 468 # +;
-#X obj 224 445 # *;
-#X obj 297 446 # *;
-#X obj 224 489 # >> 8;
-#X obj 297 424 # inv+ 256;
-#X obj 271 490 # min 255;
-#X obj 298 362 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 380 76 #color;
-#X obj 72 22 s image;
-#X obj 240 426 r image;
-#X text 374 46 select a point in the color cube \; and a radius of
-accepted similarity.;
-#X obj 277 196 #pack 3;
-#X obj 299 177 tgl 15 1 empty empty empty 0 -6 0 8 -225271 -24198 -1
-1 1;
-#X obj 321 177 tgl 15 1 empty empty empty 0 -6 0 8 -228992 -62784 -1
-1 1;
-#X text 271 161 enable selection on:;
-#X text 339 178 all three = select sphere in color cube \; pick two
-= select circle in a color square \; pick one = select range in one
-channel;
-#X text 377 360 make background;
-#X obj 57 217 # inv+;
-#X obj 295 229 vradio 15 1 0 2 empty empty empty 0 -6 0 8 -241291 -66577
--1 0;
-#X text 314 228 erase nonselected;
-#X text 314 245 erase selected;
-#X obj 295 269 vradio 15 1 0 2 empty empty empty 0 -6 0 8 -241291 -66577
--1 1;
-#X text 317 268 strict;
-#X text 316 284 fuzzy;
-#X obj 296 325 vradio 15 1 0 2 empty empty empty 0 -6 0 8 -241291 -66577
--1 0;
-#X text 318 324 see filtered image on checkers;
-#X text 318 339 see opacity mask;
-#X obj 224 406 t a a;
-#N canvas 414 518 450 216 color 0;
-#X obj 25 3 inlet bang;
-#X obj 26 182 outlet image;
-#X obj 26 144 # min 255;
-#X obj 26 163 # max 0;
-#X obj 178 31 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 25 25 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 178 88 #outer + ( 0 0 9000 );
-#X obj 48 24 t b b;
-#X obj 26 81 #outer * ( 1 0 0 );
-#X obj 26 105 # +;
-#X obj 178 132 # + ( 0 128 128 );
-#X obj 178 48 #for 0 320 1;
-#X obj 179 67 # * 113;
-#X obj 26 62 #outer + ( 320 # 0 );
-#X obj 26 43 #for -120 360 2;
-#X obj 178 155 #redim ( 240 320 3 );
-#X obj 178 109 # cos* ( 0 128 128 );
-#X obj 26 124 #yuv_to_rgb;
-#X connect 0 0 7 0;
-#X connect 2 0 3 0;
-#X connect 3 0 1 0;
-#X connect 4 0 11 0;
-#X connect 5 0 14 0;
-#X connect 6 0 16 0;
-#X connect 7 0 5 0;
-#X connect 7 1 4 0;
-#X connect 8 0 9 0;
-#X connect 9 0 17 0;
-#X connect 10 0 15 0;
-#X connect 11 0 12 0;
-#X connect 12 0 6 0;
-#X connect 13 0 8 0;
-#X connect 14 0 13 0;
-#X connect 15 0 9 1;
-#X connect 16 0 10 0;
-#X connect 17 0 2 0;
-#X restore 133 21 pd color panorama;
-#X obj 133 2 loadbang;
-#X obj 210 -53 vradio 15 1 0 2 empty empty empty 0 -6 0 8 -241291 -66577
--1 1;
-#X text 229 -54 on video;
-#X text 229 -38 on color panorama;
-#X floatatom 336 136 5 0 0 0 - - -;
-#X obj 76 240 # *>>8 256;
-#X obj 338 302 hsl 129 15 4 4096 1 1 empty empty empty -2 -6 0 8 -260818
--1 -1 7000 1;
-#X floatatom 295 302 5 0 0 0 - - -;
-#X obj 58 87 #rgb_to_yuv;
-#X obj 90 55 vradio 15 1 0 2 empty empty empty 0 -6 0 8 -241291 -1
--1 0;
-#X text 107 55 RGB;
-#X text 107 70 YUV;
-#X text 141 55 warning: in YUV mode \,;
-#X text 140 81 green slider = U chroma;
-#X text 147 94 blue slider = V chroma;
-#X text 154 68 red slider = Y luma;
-#X obj 31 -39 metro 33.3667;
-#X obj 31 22 t a a;
-#X obj 31 1 #camera;
-#X obj 332 446 spigot;
-#X obj 379 447 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0
-1;
-#X text 398 448 recurrent layering;
-#X obj 224 511 t a;
-#X obj 14 141 # &;
-#X obj 40 141 # inv+;
-#X obj 36 397 # >> 6;
-#X obj 14 198 shunt 2;
-#X obj 14 241 shunt 2;
-#X obj 14 55 shunt 2;
-#X obj 14 306 shunt 2;
-#X obj 68 308 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 1
-;
-#X text 87 302 sort-of feather;
-#X obj 224 385 shunt 2;
-#X text 87 317 (8x8 square blur on mask);
-#X obj 31 -18 shunt 2;
-#X obj 36 377 # + 32;
-#X obj -2 561 cnv 15 740 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 6 568 GridFlow 0.8.0;
-#X obj 1 -118 cnv 15 740 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 14 -118 color_detect.pd;
-#X text 13 -105 Copyright 2001-2004 Mathieu Bouchard;
-#X obj 14 122 # sq-;
-#X obj 61 179 # sq-;
-#X obj 36 337 #convolve (8 1 # 1);
-#X obj 36 357 #convolve (1 8 # 1);
-#X obj 14 457 #outer ignore (3 # 0);
-#X obj 298 379 #for (0 0) (240 320) (1 1);
-#X connect 0 0 9 0;
-#X connect 1 0 71 0;
-#X connect 2 0 46 0;
-#X connect 4 0 1 0;
-#X connect 5 0 59 0;
-#X connect 6 0 24 0;
-#X connect 7 0 58 0;
-#X connect 8 0 68 0;
-#X connect 9 0 71 0;
-#X connect 10 0 8 0;
-#X connect 11 0 19 0;
-#X connect 12 0 15 1;
-#X connect 13 0 16 0;
-#X connect 14 0 13 0;
-#X connect 15 0 13 1;
-#X connect 16 0 64 0;
-#X connect 17 0 15 0;
-#X connect 18 0 64 0;
-#X connect 19 0 88 0;
-#X connect 20 0 83 1;
-#X connect 22 0 14 1;
-#X connect 24 0 66 0;
-#X connect 25 0 24 1;
-#X connect 26 0 24 2;
-#X connect 30 0 69 0;
-#X connect 31 0 68 1;
-#X connect 34 0 69 1;
-#X connect 37 0 74 1;
-#X connect 40 0 14 0;
-#X connect 40 1 17 0;
-#X connect 41 0 5 1;
-#X connect 42 0 41 0;
-#X connect 43 0 76 1;
-#X connect 46 0 84 0;
-#X connect 47 0 4 0;
-#X connect 48 0 49 0;
-#X connect 49 0 47 1;
-#X connect 50 0 83 0;
-#X connect 51 0 70 1;
-#X connect 58 0 76 0;
-#X connect 59 0 70 0;
-#X connect 59 1 21 0;
-#X connect 60 0 59 0;
-#X connect 61 0 15 1;
-#X connect 62 0 61 1;
-#X connect 64 0 3 0;
-#X connect 64 0 61 0;
-#X connect 65 0 10 0;
-#X connect 66 0 65 1;
-#X connect 67 0 87 0;
-#X connect 68 0 69 0;
-#X connect 68 1 30 0;
-#X connect 69 0 0 0;
-#X connect 69 1 47 0;
-#X connect 70 0 83 0;
-#X connect 70 1 50 0;
-#X connect 71 0 87 0;
-#X connect 71 1 85 0;
-#X connect 72 0 71 1;
-#X connect 74 0 40 0;
-#X connect 74 1 18 0;
-#X connect 76 0 60 0;
-#X connect 76 1 5 0;
-#X connect 77 0 67 0;
-#X connect 83 0 65 0;
-#X connect 84 0 8 1;
-#X connect 85 0 86 0;
-#X connect 86 0 77 0;
-#X connect 87 0 74 0;
-#X connect 88 0 12 0;
diff --git a/externals/gridflow/pd_examples/convolve.pd b/externals/gridflow/pd_examples/convolve.pd
deleted file mode 100644
index 19a08510..00000000
--- a/externals/gridflow/pd_examples/convolve.pd
+++ /dev/null
@@ -1,94 +0,0 @@
-#N canvas 17 90 652 511 10;
-#X msg 382 117 3 3 # 0 4 0 4 9 -4 0 -4 0;
-#X obj 20 29 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X msg 386 63 3 3 # 4 0 0 0 1 0 0 0 4;
-#X obj 20 130 #store;
-#X obj 116 218 # / 9;
-#X msg 381 37 3 3 # 1 1 1 1 1 1 1 1 1;
-#X obj 76 131 #out window;
-#X msg 399 180 1 3 # 0 9 -9;
-#X obj 58 85 #in;
-#X msg 387 90 3 3 # 2 2 2 2 -7 2 2 2 2;
-#X obj 20 -24 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1
-;
-#X obj 116 286 @! abs;
-#X obj 116 352 # max 0;
-#X text 331 -15 step 1: select one of those six grids;
-#X obj 116 331 # min 255;
-#X obj 58 45 loadbang;
-#X obj 20 2 metro 33.3667;
-#X obj 58 107 t a;
-#X obj 116 197 #convolve \, seed 4;
-#X obj 332 5 loadbang;
-#X text -7 149 feedback loop;
-#X obj 116 244 shunt 2;
-#X obj 171 246 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0
-1;
-#X msg 253 227 0;
-#X obj 163 307 # + 128;
-#X msg 253 251 1;
-#X obj 331 307 display;
-#X obj 48 233 fps;
-#X obj 40 277 print;
-#X obj -15 391 cnv 15 780 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text -7 398 GridFlow 0.8.0;
-#X text -7 398 GridFlow 0.8.0;
-#X obj -13 -85 cnv 15 780 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 0 -72 Copyright 2002 Mathieu Bouchard;
-#X text 0 -85 convolve.pd;
-#X msg 399 159 1 3 # 0 2 -2;
-#X msg 399 212 3 3 # 0 -1 0 -1 4 -1 0 -1 0;
-#X msg 397 235 3 3 # -1 -1 -1 -1 8 -1 -1 -1 -1;
-#X text 506 192 Laplacian masks;
-#X msg 396 280 3 3 # 0 -1 0 -1 13 -1 0 -1 0;
-#X text 542 261 Sharpen;
-#X text 507 17 Blurs;
-#X obj 163 265 # << 4;
-#X text 416 140 Edge detection;
-#X msg 58 65 open babbage.jpg \, bang;
-#X connect 0 0 23 0;
-#X connect 0 0 18 1;
-#X connect 0 0 26 0;
-#X connect 1 0 3 0;
-#X connect 2 0 23 0;
-#X connect 2 0 18 1;
-#X connect 3 0 18 0;
-#X connect 4 0 21 0;
-#X connect 5 0 23 0;
-#X connect 5 0 18 1;
-#X connect 6 0 27 0;
-#X connect 7 0 18 1;
-#X connect 7 0 25 0;
-#X connect 8 0 17 0;
-#X connect 9 0 23 0;
-#X connect 9 0 18 1;
-#X connect 10 0 16 0;
-#X connect 11 0 14 0;
-#X connect 12 0 17 0;
-#X connect 14 0 12 0;
-#X connect 15 0 44 0;
-#X connect 16 0 1 0;
-#X connect 17 0 3 1;
-#X connect 17 0 6 0;
-#X connect 18 0 4 0;
-#X connect 19 0 5 0;
-#X connect 21 0 11 0;
-#X connect 21 1 42 0;
-#X connect 22 0 21 1;
-#X connect 23 0 22 0;
-#X connect 24 0 14 0;
-#X connect 25 0 22 0;
-#X connect 27 0 28 0;
-#X connect 35 0 23 0;
-#X connect 35 0 18 1;
-#X connect 36 0 18 1;
-#X connect 36 0 25 0;
-#X connect 37 0 25 0;
-#X connect 37 0 18 1;
-#X connect 39 0 23 0;
-#X connect 39 0 18 1;
-#X connect 42 0 24 0;
-#X connect 44 0 8 0;
diff --git a/externals/gridflow/pd_examples/cross_fade.pd b/externals/gridflow/pd_examples/cross_fade.pd
deleted file mode 100644
index 1656b935..00000000
--- a/externals/gridflow/pd_examples/cross_fade.pd
+++ /dev/null
@@ -1,74 +0,0 @@
-#N canvas 397 101 680 501 10;
-#X obj 13 229 # *>>8;
-#X text 40 293 first picture plus a fraction of the difference;
-#X obj 13 291 # +;
-#X obj 13 210 #store;
-#X obj 211 157 # inv+;
-#X obj 68 311 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 1
-;
-#X text 12 372 note: the #layer/#join objects can make the crossfade
-process simpler but it's still not faster.;
-#X obj 13 46 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1;
-#X obj 264 130 #in;
-#X obj 13 191 #finished;
-#X text 85 311 click to clip out-of-range colours;
-#X text 60 229 multiply by a N/256 fraction;
-#X obj 211 111 #in;
-#X obj 13 353 #out window;
-#X obj 13 153 #cast int16;
-#X text 61 213 keep the difference between both pictures;
-#X obj 249 91 t b b;
-#X obj 249 72 loadbang;
-#X obj 13 310 shunt 2;
-#X obj 13 63 metro 33.3667;
-#X obj 13 82 float;
-#X obj 25 101 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10
--262144 -1 -1 0 256;
-#X obj 52 82 + 4;
-#X obj 13 117 pingpong 256;
-#X obj 21 136 hsl 129 15 0 256 0 0 empty empty empty -2 -6 0 8 -260818
--1 -1 0 1;
-#X obj 13 172 t a a;
-#X text 11 406 also #draw_image/#join is a possibility;
-#X obj 0 1 cnv 15 680 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 14 14 Copyright 2002 Mathieu Bouchard;
-#X text 14 -2 cross_fade.pd;
-#X obj 0 469 cnv 15 680 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 8 477 GridFlow 0.8.0;
-#X obj 57 329 #clip;
-#X msg 237 111 load b001.jpg;
-#X msg 289 130 load r001.jpg;
-#X obj 264 149 #cast s;
-#X obj 211 130 #cast s;
-#X connect 0 0 2 0;
-#X connect 2 0 18 0;
-#X connect 3 0 0 0;
-#X connect 4 0 3 1;
-#X connect 5 0 18 1;
-#X connect 7 0 19 0;
-#X connect 8 0 35 0;
-#X connect 9 0 3 0;
-#X connect 12 0 36 0;
-#X connect 14 0 25 0;
-#X connect 16 0 33 0;
-#X connect 16 1 34 0;
-#X connect 17 0 16 0;
-#X connect 18 0 13 0;
-#X connect 18 1 32 0;
-#X connect 19 0 20 0;
-#X connect 20 0 21 0;
-#X connect 20 0 22 0;
-#X connect 20 0 23 0;
-#X connect 22 0 20 1;
-#X connect 23 0 24 0;
-#X connect 23 0 14 0;
-#X connect 25 0 9 0;
-#X connect 25 1 0 1;
-#X connect 32 0 13 0;
-#X connect 33 0 12 0;
-#X connect 34 0 8 0;
-#X connect 35 0 4 1;
-#X connect 36 0 4 0;
-#X connect 36 0 2 1;
diff --git a/externals/gridflow/pd_examples/drag_rectangle.pd b/externals/gridflow/pd_examples/drag_rectangle.pd
deleted file mode 100644
index ab0d8ea8..00000000
--- a/externals/gridflow/pd_examples/drag_rectangle.pd
+++ /dev/null
@@ -1,110 +0,0 @@
-#N canvas 702 123 647 484 10;
-#X obj 231 -7 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1
-;
-#X obj 231 117 #out window;
-#X obj 21 144 hsl 128 15 0 319 0 0 h_end_o h_end_i empty -2 -8 1 10
--262144 -1 -1 0 1;
-#X obj 21 -4 hsl 128 15 0 319 0 0 h_start_o h_start_i empty 0 8 1 10
--262144 -66577 -258699 0 0;
-#X obj 3 13 vsl 15 128 239 0 0 0 v_start_o v_start_i empty 0 -8 1 10
--262144 -1 -1 0 1;
-#X obj 151 13 vsl 15 128 239 0 0 0 v_end_o v_end_i empty 0 -8 1 10
--262144 -1 -1 0 1;
-#N canvas 504 374 452 302 make_rectangle 0;
-#X obj 27 16 inlet;
-#X text 25 -3 image;
-#X obj 93 17 inlet;
-#X text 92 0 start pos;
-#X obj 172 18 inlet;
-#X text 172 1 end pos;
-#X obj 27 244 outlet;
-#X text 27 264 image;
-#X obj 93 37 unpack 0 0;
-#X obj 173 37 unpack 0 0;
-#X obj 126 61 #pack 4;
-#X obj 125 81 #export_list;
-#X msg 95 135 4 2 # \$1 \$2 \$1 \$4 \$3 \$4 \$3 \$2;
-#X obj 27 177 #draw_polygon >> ( 1 1 1 );
-#X connect 0 0 13 0;
-#X connect 2 0 8 0;
-#X connect 4 0 9 0;
-#X connect 8 0 10 0;
-#X connect 8 1 10 1;
-#X connect 9 0 10 2;
-#X connect 9 1 10 3;
-#X connect 10 0 11 0;
-#X connect 11 0 12 0;
-#X connect 12 0 13 2;
-#X connect 13 0 6 0;
-#X restore 231 97 pd make_rectangle;
-#X obj 231 43 metro 33.3667;
-#X text -22 -5 start;
-#X text 155 144 end;
-#X obj 328 23 loadbang;
-#X obj 231 72 #store;
-#X obj 393 25 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 315 117 #mouse \, ...;
-#X obj 260 268 listelement 0;
-#X obj 367 190 listelement 1;
-#X obj 260 225 listelement 0;
-#X obj 368 149 listelement 1;
-#X obj 368 168 s h_start_i;
-#X obj 367 209 s h_end_i;
-#X obj 260 287 s v_end_i;
-#X obj 260 244 s v_start_i;
-#X obj 378 65 loadbang;
-#X msg 378 84 0 0;
-#X obj 328 161 t a;
-#X obj 47 322 #out window;
-#X obj 86 221 t b a;
-#X obj 47 286 #store;
-#X msg 48 243 set ( \$1 \$2 );
-#X obj 327 43 #in b001.jpg;
-#X text 30 35 drag the mouse;
-#X text 56 20 step 2:;
-#X text 39 51 inside the;
-#X text 37 66 first window;
-#X text 218 -25 step 1: turn on;
-#X text 52 304 cropping (to 2nd window);
-#X obj -41 373 cnv 15 640 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text -33 380 GridFlow 0.8.0;
-#X text -33 380 GridFlow 0.8.0;
-#X obj -40 -77 cnv 15 640 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text -27 -64 Copyright 2002 Mathieu Bouchard;
-#X text -27 -77 drag_rectangle.pd;
-#X obj 47 267 #for (0 0) (0 0) (1 1);
-#X connect 0 0 7 0;
-#X connect 1 0 13 0;
-#X connect 6 0 1 0;
-#X connect 7 0 11 0;
-#X connect 10 0 29 0;
-#X connect 11 0 6 0;
-#X connect 12 0 29 0;
-#X connect 13 0 6 1;
-#X connect 13 0 16 0;
-#X connect 13 0 17 0;
-#X connect 13 0 28 0;
-#X connect 13 0 24 0;
-#X connect 13 1 24 0;
-#X connect 13 2 24 0;
-#X connect 13 2 26 0;
-#X connect 14 0 20 0;
-#X connect 15 0 19 0;
-#X connect 16 0 21 0;
-#X connect 17 0 18 0;
-#X connect 22 0 23 0;
-#X connect 23 0 6 1;
-#X connect 23 0 6 2;
-#X connect 24 0 14 0;
-#X connect 24 0 15 0;
-#X connect 24 0 6 2;
-#X connect 26 0 42 0;
-#X connect 26 1 42 1;
-#X connect 27 0 25 0;
-#X connect 28 0 42 0;
-#X connect 29 0 11 1;
-#X connect 29 0 27 1;
-#X connect 42 0 27 0;
diff --git a/externals/gridflow/pd_examples/eclipse.pd b/externals/gridflow/pd_examples/eclipse.pd
deleted file mode 100644
index 0c94440b..00000000
--- a/externals/gridflow/pd_examples/eclipse.pd
+++ /dev/null
@@ -1,80 +0,0 @@
-#N canvas 623 182 635 533 10;
-#X floatatom 242 293 5 0 0 0 - - -;
-#X msg 194 273 24;
-#X obj 61 -35 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1
-;
-#X obj 194 251 loadbang;
-#X msg 242 273 32;
-#X floatatom 194 293 5 0 0 0 - - -;
-#X obj 38 17 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 61 -6 metro 33.3667;
-#X text 189 228 size of subimages;
-#X obj 61 144 t a a;
-#X text 204 44 gain on colour blue;
-#X obj 61 17 #camera;
-#X obj 61 63 #scale_by 2;
-#X obj 141 119 #dim;
-#X obj 141 139 #inner (3 2 # 1 0 0 1 0 0);
-#X obj 61 125 #finished;
-#X obj 61 183 # /;
-#X obj 61 202 # *;
-#X obj 61 229 #store;
-#X obj 61 256 # *;
-#X obj 61 275 # >> 7;
-#X obj 61 294 # min 255;
-#X obj 61 313 #out window;
-#X obj 194 313 #pack 2;
-#X obj 141 206 # /;
-#X obj 107 229 #store;
-#X obj 107 206 # *;
-#X obj 61 164 #for (0 0) (240 320) (1 1);
-#X obj 107 186 #for (0 0) (240 320) (1 1);
-#X obj 61 44 # *>>8 (256 256 384);
-#X obj 1 418 cnv 15 640 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 9 425 GridFlow 0.8.0;
-#X text 9 425 GridFlow 0.8.0;
-#X obj 3 -85 cnv 15 640 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 16 -72 Copyright 2002 Mathieu Bouchard;
-#X text 121 17 <-- open this;
-#X text 16 -85 eclipse.pd;
-#X obj 61 102 t a a;
-#X connect 0 0 23 1;
-#X connect 1 0 5 0;
-#X connect 2 0 7 0;
-#X connect 3 0 4 0;
-#X connect 3 0 1 0;
-#X connect 4 0 0 0;
-#X connect 5 0 23 0;
-#X connect 6 0 11 0;
-#X connect 7 0 11 0;
-#X connect 9 0 27 0;
-#X connect 9 1 28 0;
-#X connect 11 0 29 0;
-#X connect 12 0 37 0;
-#X connect 13 0 14 0;
-#X connect 14 0 24 0;
-#X connect 14 0 27 1;
-#X connect 14 0 28 1;
-#X connect 15 0 9 0;
-#X connect 16 0 17 0;
-#X connect 17 0 18 0;
-#X connect 18 0 19 0;
-#X connect 19 0 20 0;
-#X connect 20 0 21 0;
-#X connect 21 0 22 0;
-#X connect 23 0 16 1;
-#X connect 23 0 17 1;
-#X connect 23 0 24 1;
-#X connect 24 0 26 1;
-#X connect 25 0 19 1;
-#X connect 26 0 25 0;
-#X connect 27 0 16 0;
-#X connect 28 0 26 0;
-#X connect 29 0 12 0;
-#X connect 37 0 15 0;
-#X connect 37 1 13 0;
-#X connect 37 1 18 1;
-#X connect 37 1 25 1;
diff --git a/externals/gridflow/pd_examples/epicycloid.pd b/externals/gridflow/pd_examples/epicycloid.pd
deleted file mode 100644
index 000bc8c0..00000000
--- a/externals/gridflow/pd_examples/epicycloid.pd
+++ /dev/null
@@ -1,125 +0,0 @@
-#N canvas 301 73 904 550 10;
-#X text 158 43 epicycloid;
-#X text 168 56 x(t) = (R+r) cos(t) - p*cos((R+r)t/r);
-#X text 168 69 y(t) = (R+r) sin(t) - p*sin((R+r)t/r);
-#X obj 24 273 #draw_polygon put 1;
-#X obj 24 292 #out window;
-#X obj -22 68 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1
-;
-#X obj 297 428 pack f f f f;
-#X msg 297 447 \$2 \$1 \$4 \$1 \$4 \$3 \$2 \$3;
-#X text 304 403 x;
-#X text 364 405 y;
-#X text 391 407 y+1;
-#X text 327 405 x+1;
-#X floatatom 303 381 5 0 0 0 - - -;
-#X obj 345 379 + 1;
-#X floatatom 390 382 5 0 0 0 - - -;
-#X obj 432 379 + 1;
-#X obj 303 358 t f f;
-#X obj 390 361 t f f;
-#X obj -16 108 s met;
-#X obj 258 428 r met;
-#X obj 388 197 hsl 128 15 5 100 0 1 empty empty empty -2 -6 0 8 -24198
--1 -1 5500 1;
-#X obj 515 238 hsl 128 15 -100 100 0 1 empty empty empty -2 -6 0 8
--44926 -1 -1 4000 1;
-#X obj 665 263 hsl 128 15 -150 150 0 1 empty empty empty -2 -6 0 8
--258699 -1 -1 3200 1;
-#X text 313 155 t = valeur en angles de 0 a 360;
-#X obj 385 241 t f f;
-#X obj 512 270 t f f;
-#X obj 662 283 t f f;
-#X obj 303 217 * 6.28319;
-#X obj 303 196 / 360;
-#X floatatom 303 178 5 0 0 0 - - -;
-#X obj 303 236 t f f;
-#X obj -22 273 #store;
-#X obj -14 129 loadbang;
-#X obj 390 323 expr ($f2+$f3)*sin($f1) - $f4*sin(($f2+$f3)*$f1/$f3)
-;
-#X obj 303 302 expr ($f2+$f3)*cos($f1) - $f4*cos(($f2+$f3)*$f1/$f3)
-;
-#X obj 303 135 + 1;
-#X msg 303 111 1;
-#X floatatom 335 138 5 0 0 0 - - -;
-#X msg 335 119 0;
-#X text 366 122 reset count;
-#X text 100 147 reset image;
-#X text 470 216 r = Rayon du deuxieme cercle -100 a 100;
-#X obj 390 342 + 150;
-#X obj 303 339 + 150;
-#X floatatom 397 223 5 0 0 0 - - -;
-#X floatatom 563 263 5 0 0 0 - - -;
-#X floatatom 712 286 5 0 0 0 - - -;
-#X obj -22 85 metro 1;
-#X obj 25 68 hsl 128 15 0 15 0 0 empty empty empty -2 -6 0 8 -260818
--1 -1 0 1;
-#X text 360 178 R = Rayon du premier cercle 5 a 100;
-#X obj -38 515 cnv 15 900 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text -29 522 GridFlow 0.8.0;
-#X text -29 522 GridFlow 0.8.0;
-#X obj -35 5 cnv 15 800 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj 88 213 #color;
-#X obj 88 175 loadbang;
-#X msg 88 194 230 224 0;
-#X msg -14 148 300 300 3 # 0;
-#X text -22 18 Copyright 2004 Alexandre Castonguay;
-#X text -22 5 epicycloid.pd;
-#X text 51 128 start with a blank \, black image;
-#X text 660 248 deuxieme cercle - 150 a 150;
-#X text 660 233 p = distance du centre du;
-#X obj 297 466 #import (4 2);
-#X connect 3 0 4 0;
-#X connect 3 0 31 1;
-#X connect 5 0 47 0;
-#X connect 6 0 7 0;
-#X connect 7 0 63 0;
-#X connect 12 0 6 0;
-#X connect 13 0 6 2;
-#X connect 14 0 6 1;
-#X connect 15 0 6 3;
-#X connect 16 0 12 0;
-#X connect 16 1 13 0;
-#X connect 17 0 14 0;
-#X connect 17 1 15 0;
-#X connect 19 0 6 0;
-#X connect 20 0 24 0;
-#X connect 20 0 44 0;
-#X connect 21 0 25 0;
-#X connect 21 0 45 0;
-#X connect 22 0 26 0;
-#X connect 22 0 46 0;
-#X connect 24 0 34 1;
-#X connect 24 1 33 1;
-#X connect 25 0 34 2;
-#X connect 25 1 33 2;
-#X connect 26 0 34 3;
-#X connect 26 1 33 3;
-#X connect 27 0 30 0;
-#X connect 28 0 27 0;
-#X connect 29 0 28 0;
-#X connect 30 0 34 0;
-#X connect 30 1 33 0;
-#X connect 31 0 3 0;
-#X connect 32 0 57 0;
-#X connect 33 0 42 0;
-#X connect 34 0 43 0;
-#X connect 35 0 37 0;
-#X connect 35 0 29 0;
-#X connect 36 0 35 0;
-#X connect 37 0 35 1;
-#X connect 38 0 37 0;
-#X connect 42 0 17 0;
-#X connect 43 0 16 0;
-#X connect 47 0 18 0;
-#X connect 47 0 31 0;
-#X connect 47 0 36 0;
-#X connect 48 0 47 1;
-#X connect 54 0 3 1;
-#X connect 55 0 56 0;
-#X connect 56 0 54 0;
-#X connect 57 0 31 1;
-#X connect 63 0 3 2;
diff --git a/externals/gridflow/pd_examples/feedback_fractal.pd b/externals/gridflow/pd_examples/feedback_fractal.pd
deleted file mode 100644
index abb70e80..00000000
--- a/externals/gridflow/pd_examples/feedback_fractal.pd
+++ /dev/null
@@ -1,147 +0,0 @@
-#N canvas 609 30 779 549 10;
-#N canvas 0 0 450 300 experimental 0;
-#X obj 32 212 outlet 0;
-#X obj 39 81 @for ( 0 0 ) ( 256 256 ) ( 1 1 );
-#X obj 39 55 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 207 64 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 206 87 @for ( 0 0 ) ( 256 256 ) ( 1 1 );
-#X obj 206 109 @ >> ( 4 6 );
-#X obj 39 104 @ << ( 4 2 );
-#X obj 198 140 @inner & ^ 1 ( 2 2 # 85 170 170 85 );
-#X obj 39 126 @ +;
-#X obj 39 33 inlet;
-#X connect 1 0 6 0;
-#X connect 2 0 1 0;
-#X connect 3 0 4 0;
-#X connect 4 0 5 0;
-#X connect 5 0 8 1;
-#X connect 6 0 8 0;
-#X connect 8 0 0 0;
-#X connect 9 0 2 0;
-#X restore 545 260 pd experimental features;
-#X text 515 193 Choose Julia Mapping or Rotation;
-#X obj 31 53 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 1 1;
-#X obj 414 145 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1
--1;
-#X text 135 196 apply transform (with feedback);
-#X floatatom 430 363 5 0 0 0 - - -;
-#X floatatom 518 387 5 0 0 0 - - -;
-#X text 434 375 zoom;
-#X text 518 397 move x;
-#X msg 518 368 -45;
-#X msg 430 344 128;
-#X obj 119 197 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1
--1;
-#X obj 444 119 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1
--1;
-#X obj 497 193 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0
-1;
-#X floatatom 472 387 5 0 0 0 - - -;
-#X text 471 398 move y;
-#X msg 472 368 193;
-#X obj 31 80 metro 33.3667;
-#X obj 442 191 shunt 2;
-#X obj 77 365 loadbang;
-#X obj 414 91 t b b;
-#X obj 414 67 loadbang;
-#X obj 31 338 t a;
-#X obj 131 220 loadbang;
-#X obj 131 239 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1
--1;
-#X obj 119 317 t a;
-#X obj 31 108 t b b;
-#X obj 73 109 float;
-#X obj 73 128 + 1;
-#X obj 84 148 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10
--262144 -1 -1 57 256;
-#X obj 486 323 t b;
-#X text 149 240 reset transform;
-#X obj 99 128 mod 60;
-#X obj 73 168 sel 59;
-#X obj 31 200 #store;
-#X obj 31 276 # << 7;
-#X obj 31 295 #fade 10;
-#X obj 31 314 # >> 7;
-#X obj 31 422 #store;
-#X obj 31 451 #out window;
-#X obj 414 478 # -;
-#X obj 438 454 # - 128;
-#X obj 414 390 # /;
-#X obj 414 296 #store;
-#X obj 442 172 #for ( -128 -128 ) ( 128 128 ) ( 1 1 );
-#X obj 442 210 @complex_sq;
-#X obj 485 229 #inner (2 2 # 120 30 -30 120);
-#X obj -13 0 cnv 15 780 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj -15 518 cnv 15 780 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text -7 525 GridFlow 0.8.0;
-#X text -7 525 GridFlow 0.8.0;
-#X text 0 0 feedback_fractal.pd;
-#X text 0 13 Copyright 2001 Mathieu Bouchard;
-#X obj 131 258 #for (0 0) (256 256) (1 1);
-#X obj 119 298 #store;
-#X obj 119 279 #store;
-#X obj 77 422 #cast b;
-#X obj 77 403 #in;
-#X msg 77 384 load teapot.png;
-#X obj 438 432 #pack;
-#X text 431 145 apply coords;
-#X text 462 118 apply type of transform;
-#X connect 0 0 43 1;
-#X connect 2 0 17 0;
-#X connect 3 0 43 0;
-#X connect 5 0 42 1;
-#X connect 6 0 59 1;
-#X connect 9 0 6 0;
-#X connect 10 0 5 0;
-#X connect 11 0 55 0;
-#X connect 12 0 44 0;
-#X connect 13 0 18 1;
-#X connect 14 0 59 0;
-#X connect 16 0 14 0;
-#X connect 17 0 26 0;
-#X connect 18 0 45 0;
-#X connect 18 1 46 0;
-#X connect 19 0 58 0;
-#X connect 20 0 3 0;
-#X connect 20 1 12 0;
-#X connect 20 1 30 0;
-#X connect 21 0 20 0;
-#X connect 22 0 38 0;
-#X connect 23 0 24 0;
-#X connect 24 0 53 0;
-#X connect 25 0 34 1;
-#X connect 25 0 54 1;
-#X connect 26 0 34 0;
-#X connect 26 1 27 0;
-#X connect 27 0 28 0;
-#X connect 28 0 29 0;
-#X connect 28 0 32 0;
-#X connect 28 0 33 0;
-#X connect 30 0 10 0;
-#X connect 30 0 16 0;
-#X connect 30 0 9 0;
-#X connect 32 0 27 1;
-#X connect 33 0 11 0;
-#X connect 34 0 35 0;
-#X connect 35 0 36 0;
-#X connect 36 0 37 0;
-#X connect 37 0 22 0;
-#X connect 38 0 39 0;
-#X connect 40 0 55 1;
-#X connect 41 0 40 1;
-#X connect 42 0 40 0;
-#X connect 43 0 42 0;
-#X connect 44 0 18 0;
-#X connect 45 0 43 1;
-#X connect 46 0 43 1;
-#X connect 53 0 34 1;
-#X connect 53 0 54 1;
-#X connect 54 0 25 0;
-#X connect 55 0 54 0;
-#X connect 56 0 38 1;
-#X connect 57 0 56 0;
-#X connect 58 0 57 0;
diff --git a/externals/gridflow/pd_examples/fire.pd b/externals/gridflow/pd_examples/fire.pd
deleted file mode 100644
index 2e9f8606..00000000
--- a/externals/gridflow/pd_examples/fire.pd
+++ /dev/null
@@ -1,289 +0,0 @@
-#N canvas 55 53 634 527 10;
-#X obj 377 355 loadbang;
-#X text 243 362 palette generator;
-#X obj 100 383 fps detailed;
-#X obj 264 400 #for 0 256 1;
-#X obj 19 240 #store;
-#X obj 264 422 #outer gamma;
-#X obj 100 402 print;
-#X msg 56 200 \$1 \$2 # 0;
-#X obj 264 379 #finished;
-#X obj 19 35 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 1 1;
-#X obj 200 39 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 332 379 fork;
-#X text 258 62 height width;
-#X obj 100 364 #out window;
-#X text 97 308 applying palette;
-#X obj 99 326 #store;
-#N canvas 127 200 450 300 circle 0;
-#X obj 47 146 #fold +;
-#X obj 47 203 # << 7;
-#X obj 47 165 # >> 6;
-#X obj 47 184 # == 10;
-#X obj 47 15 inlet size;
-#X obj 47 222 outlet matrix;
-#X obj 77 108 inlet pos;
-#X obj 47 53 t b a;
-#X obj 47 127 # sq-;
-#X obj 47 79 #for (0 0) (0 0) (1 1);
-#X obj 90 53 #export_list;
-#X connect 0 0 2 0;
-#X connect 1 0 5 0;
-#X connect 2 0 3 0;
-#X connect 3 0 1 0;
-#X connect 4 0 7 0;
-#X connect 6 0 8 1;
-#X connect 7 0 9 0;
-#X connect 7 1 10 0;
-#X connect 8 0 0 0;
-#X connect 9 0 8 0;
-#X connect 10 0 9 1;
-#X restore 222 200 pd circle generator;
-#N canvas 498 387 361 260 baseline 0;
-#X obj 18 123 #fold +;
-#X obj 127 149 - 4;
-#X obj 18 56 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 18 101 # & ( -1 0 );
-#X obj 18 146 # ==;
-#X obj 127 130 listelement 0;
-#X text 93 10 line generator;
-#X obj 18 166 # << 7;
-#X obj 18 79 #for ( 0 0 ) ( 0 0 ) ( 1 1 );
-#X obj 127 110 #export_list;
-#X obj 18 9 inlet size;
-#X obj 18 187 outlet matrix;
-#X obj 18 33 fork;
-#X text 154 151 four pixels from bottom;
-#X connect 0 0 4 0;
-#X connect 1 0 4 1;
-#X connect 2 0 8 0;
-#X connect 3 0 0 0;
-#X connect 4 0 7 0;
-#X connect 5 0 1 0;
-#X connect 7 0 11 0;
-#X connect 8 0 3 0;
-#X connect 9 0 5 0;
-#X connect 10 0 12 0;
-#X connect 12 0 2 0;
-#X connect 12 1 9 0;
-#X connect 12 1 8 1;
-#X restore 200 220 pd baseline generator;
-#X text 45 183 make blank image;
-#X text 26 223 feedback loop;
-#X obj 377 393 #color 0 800 1;
-#X msg 377 374 600 200 75;
-#X obj 220 38 loadbang;
-#N canvas 645 360 400 289 fire 0;
-#X obj 174 180 #store;
-#X obj 61 196 #export_list;
-#X obj 6 65 # >> 2;
-#X obj 6 26 fork;
-#X obj 6 235 # & 255;
-#X obj 174 115 listmake;
-#X obj 6 103 # / 80;
-#X msg 174 138 \$1 1 # 256;
-#X obj 174 97 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 174 78 route grid;
-#X obj 60 155 inlet;
-#X obj 274 146 # + 32;
-#X obj 60 177 #dim;
-#X obj 6 214 # +;
-#X obj 6 258 outlet 0;
-#X msg 274 101 256 \$2 # 64;
-#X obj 6 84 # *;
-#X obj 6 7 inlet image;
-#X obj 274 79 inlet size;
-#X text 102 8 this fire algorithm;
-#X text 101 22 was designed by matju in 1994;
-#X text 264 167 makes a cache of;
-#X text 264 180 random numbers;
-#X obj 174 159 # rand;
-#X obj 274 123 # rand;
-#X obj 6 46 #convolve (3 3 # 1 0 0 0 1 0 1 1 1);
-#X connect 0 0 16 1;
-#X connect 1 0 5 1;
-#X connect 2 0 16 0;
-#X connect 3 0 25 0;
-#X connect 3 1 9 0;
-#X connect 4 0 14 0;
-#X connect 5 0 7 0;
-#X connect 6 0 13 0;
-#X connect 7 0 23 0;
-#X connect 8 0 5 0;
-#X connect 9 0 8 0;
-#X connect 10 0 13 1;
-#X connect 10 0 12 0;
-#X connect 11 0 0 1;
-#X connect 12 0 1 0;
-#X connect 13 0 4 0;
-#X connect 15 0 24 0;
-#X connect 16 0 6 0;
-#X connect 17 0 3 0;
-#X connect 18 0 15 0;
-#X connect 23 0 0 0;
-#X connect 24 0 11 0;
-#X connect 25 0 2 0;
-#X restore 65 240 pd fire generator;
-#X text 166 108 note: reset the size if you change the generator;
-#X obj 19 58 metro 33.3667;
-#X obj 5 -4 cnv 15 620 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 15 -4 fire.pd;
-#X obj 5 483 cnv 15 620 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 13 491 GridFlow 0.8.0;
-#X obj 139 402 route position;
-#N canvas 268 301 442 406 cursor 0;
-#X obj 30 29 listmake;
-#X obj 107 48 listsublist 0 2;
-#X obj 107 10 inlet;
-#X obj 132 151 listsublist 0 48;
-#X obj 30 49 fork;
-#X obj 30 285 outlet;
-#X obj 30 131 @export_list;
-#X obj 30 151 listappend 0 0;
-#X obj 107 29 #export_list;
-#X obj 30 79 # -;
-#X obj 115 86 #finished;
-#X obj 115 105 #store (0 0);
-#X obj 30 170 #redim (25 2);
-#X obj 30 189 # sq-;
-#X obj 30 208 #fold +;
-#X obj 30 227 # sqrt;
-#X obj 30 246 #fold +;
-#X obj 30 266 # / 5;
-#X obj 30 9 r metro;
-#X connect 0 0 4 0;
-#X connect 1 0 0 1;
-#X connect 2 0 8 0;
-#X connect 3 0 7 1;
-#X connect 4 0 9 0;
-#X connect 4 1 11 1;
-#X connect 6 0 7 0;
-#X connect 7 0 3 0;
-#X connect 7 0 12 0;
-#X connect 8 0 1 0;
-#X connect 9 0 6 0;
-#X connect 9 0 10 0;
-#X connect 10 0 11 0;
-#X connect 11 0 9 1;
-#X connect 12 0 13 0;
-#X connect 13 0 14 0;
-#X connect 14 0 15 0;
-#X connect 15 0 16 0;
-#X connect 16 0 17 0;
-#X connect 17 0 5 0;
-#X connect 18 0 0 0;
-#X restore 371 162 pd cursor motion detector;
-#X obj 139 460 s cursor;
-#X msg 20 341 hidecursor;
-#N canvas 238 140 484 503 fuzzy 0;
-#X obj 47 281 outlet;
-#X obj 229 74 listsublist 0 2;
-#X obj 47 110 @fold +;
-#X obj 47 68 #for (0 0) (0 0) (1 1);
-#X obj 47 13 inlet size;
-#X obj 47 32 t b a;
-#X obj 86 32 #export_list;
-#X obj 47 91 # sq-;
-#X obj 47 263 # - 10;
-#X obj 47 243 # max 10;
-#X obj 47 224 # min 255;
-#X obj 47 205 # + 64;
-#X obj 47 186 # tanh* 64;
-#X obj 47 167 # << 8;
-#X obj 47 148 # inv+ 2;
-#X obj 47 129 # >> 2;
-#X obj 104 125 inlet radius;
-#X obj 229 55 #export_list;
-#X obj 229 36 inlet pos;
-#X connect 1 0 7 1;
-#X connect 2 0 15 0;
-#X connect 3 0 7 0;
-#X connect 4 0 5 0;
-#X connect 5 0 3 0;
-#X connect 5 1 6 0;
-#X connect 6 0 3 1;
-#X connect 7 0 2 0;
-#X connect 8 0 0 0;
-#X connect 9 0 8 0;
-#X connect 10 0 9 0;
-#X connect 11 0 10 0;
-#X connect 12 0 11 0;
-#X connect 13 0 12 0;
-#X connect 14 0 13 0;
-#X connect 15 0 14 0;
-#X connect 16 0 14 1;
-#X connect 17 0 1 0;
-#X connect 18 0 17 0;
-#X restore 276 181 pd fuzzy disk seed generator;
-#X text 177 440 #scale_by compensation;
-#X msg 139 421 \$1 \$2;
-#X obj 99 345 #scale_by 2;
-#X obj 139 440 # / 2;
-#X text 15 294 (height \, width \, 1) grid = grey image;
-#X text 16 260 (height \, width) grid = matrix;
-#X obj 200 123 shunt 3;
-#X obj 253 125 hradio 15 1 0 3 empty empty empty 0 -6 0 8 -241291 -1
--1 1;
-#X obj 500 203 r cursor;
-#X obj 501 222 t a;
-#X obj 204 90 listmake;
-#X obj 58 86 spigot;
-#X obj 19 86 t b b;
-#X obj 104 87 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 1 1
-;
-#X msg 200 62 120 160;
-#X obj 49 109 s metro;
-#X obj 67 277 #outer ignore (0);
-#X text 15 9 Copyright 2001 \, 2005 Mathieu Bouchard;
-#X connect 0 0 21 0;
-#X connect 2 0 6 0;
-#X connect 3 0 5 0;
-#X connect 4 0 23 0;
-#X connect 5 0 15 1;
-#X connect 7 0 4 1;
-#X connect 8 0 3 0;
-#X connect 9 0 25 0;
-#X connect 10 0 49 0;
-#X connect 11 0 8 0;
-#X connect 11 1 5 1;
-#X connect 13 0 2 0;
-#X connect 13 0 30 0;
-#X connect 15 0 37 0;
-#X connect 16 0 23 1;
-#X connect 17 0 23 1;
-#X connect 20 0 11 0;
-#X connect 21 0 20 0;
-#X connect 22 0 49 0;
-#X connect 23 0 4 1;
-#X connect 23 0 51 0;
-#X connect 25 0 47 0;
-#X connect 30 0 36 0;
-#X connect 31 0 34 1;
-#X connect 33 0 13 0;
-#X connect 34 0 23 1;
-#X connect 36 0 38 0;
-#X connect 37 0 13 0;
-#X connect 38 0 32 0;
-#X connect 41 0 17 0;
-#X connect 41 1 16 0;
-#X connect 41 2 34 0;
-#X connect 42 0 41 1;
-#X connect 43 0 44 0;
-#X connect 44 0 31 0;
-#X connect 44 0 16 1;
-#X connect 44 0 34 2;
-#X connect 45 0 41 0;
-#X connect 46 0 45 0;
-#X connect 47 0 4 0;
-#X connect 47 1 46 0;
-#X connect 47 1 50 0;
-#X connect 48 0 46 1;
-#X connect 49 0 7 0;
-#X connect 49 0 23 2;
-#X connect 49 0 45 0;
-#X connect 51 0 15 0;
diff --git a/externals/gridflow/pd_examples/game_of_life.pd b/externals/gridflow/pd_examples/game_of_life.pd
deleted file mode 100644
index d8820876..00000000
--- a/externals/gridflow/pd_examples/game_of_life.pd
+++ /dev/null
@@ -1,65 +0,0 @@
-#N canvas 400 83 791 374 10;
-#X obj 36 46 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1;
-#X obj 31 237 #out window;
-#X text 48 122 this is the feedback loop;
-#X obj 143 50 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 161 49 for 0 10 1;
-#X obj 262 87 loadbang;
-#X obj 141 103 #store;
-#X obj 161 68 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 31 275 print;
-#X obj 31 256 fps detailed;
-#X obj 31 143 fork;
-#X text 179 68 next;
-#N canvas 0 0 450 210 game 0;
-#X obj 28 64 inlet matrix;
-#X obj 28 141 outlet matrix;
-#X text 18 14 this part at the left defines the rule of the game (this
-is my own rewriting of the rules. it is equivalent to the original
-but faster to compute.);
-#X obj 28 83 # << (b # 1);
-#X obj 28 103 #convolve (3 3 b # 0 0 0 0 1) \, op >> \, seed (b # -5)
-;
-#X obj 28 122 # < (b # 3);
-#X connect 0 0 3 0;
-#X connect 3 0 4 0;
-#X connect 4 0 5 0;
-#X connect 5 0 1 0;
-#X restore 31 102 pd game of life;
-#X text 260 60 init with a random map;
-#X text 261 72 10% white dots;
-#X text 33 169 convert this 1-bit matrix to standard RGB \; 1 becomes
--1 becomes 255 \, but 0 stays 0;
-#X obj 53 45 metro 5;
-#X obj 5 329 cnv 15 780 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 13 336 GridFlow 0.8.0;
-#X text 13 336 GridFlow 0.8.0;
-#X obj 7 5 cnv 15 780 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 20 5 game_of_life.pd;
-#X text 20 18 Copyright 2001 Mathieu Bouchard;
-#X obj 262 125 # rand (b #);
-#X obj 262 144 # == (b # 0);
-#X msg 262 106 240 320 b # 10;
-#X obj 31 199 # inv+ (b # 0);
-#X obj 31 218 #outer ignore (3 b #);
-#X connect 0 0 16 0;
-#X connect 1 0 9 0;
-#X connect 3 0 4 0;
-#X connect 4 0 7 0;
-#X connect 5 0 25 0;
-#X connect 6 0 12 0;
-#X connect 7 0 6 0;
-#X connect 9 0 8 0;
-#X connect 10 0 26 0;
-#X connect 10 1 6 1;
-#X connect 12 0 10 0;
-#X connect 16 0 6 0;
-#X connect 23 0 24 0;
-#X connect 24 0 10 0;
-#X connect 25 0 23 0;
-#X connect 26 0 27 0;
-#X connect 27 0 1 0;
diff --git a/externals/gridflow/pd_examples/goop.pd b/externals/gridflow/pd_examples/goop.pd
deleted file mode 100644
index 8f96d2c4..00000000
--- a/externals/gridflow/pd_examples/goop.pd
+++ /dev/null
@@ -1,138 +0,0 @@
-#N canvas 481 120 730 701 10;
-#X obj 91 -43 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1
-;
-#X obj 91 8 #camera;
-#X obj 38 113 t a a;
-#X msg 96 114 240 320 3 #;
-#X obj 95 92 loadbang;
-#N canvas 286 95 450 300 analysis 0;
-#X obj 46 17 inlet;
-#X obj 49 236 outlet;
-#X obj 64 67 spigot;
-#X obj 46 44 t a a;
-#X obj 114 68 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 1
-;
-#X obj 114 15 inlet;
-#X obj 49 86 # -;
-#X obj 49 129 # - 30;
-#X obj 49 154 # max 0;
-#X obj 49 182 # * 20;
-#X obj 49 211 # min 256;
-#X obj 49 108 @! abs;
-#X connect 0 0 3 0;
-#X connect 2 0 6 1;
-#X connect 3 0 2 0;
-#X connect 3 1 6 0;
-#X connect 4 0 2 1;
-#X connect 5 0 4 0;
-#X connect 6 0 11 0;
-#X connect 7 0 8 0;
-#X connect 8 0 9 0;
-#X connect 9 0 10 0;
-#X connect 10 0 1 0;
-#X connect 11 0 7 0;
-#X restore 192 94 pd analysis;
-#X obj 275 94 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 1
-;
-#X obj 123 433 r cam;
-#X obj 113 67 s cam;
-#X obj 91 33 t a a b;
-#X obj 340 65 loadbang;
-#X msg 307 66 1;
-#X obj 417 85 loadbang;
-#X msg 306 88 0;
-#X obj 150 484 loadbang;
-#X msg 150 504 set_geometry 0 0 480 640 \, hidecursor;
-#X obj 338 89 delay 5000;
-#X obj 91 -17 metro 33.3667;
-#X obj -15 -84 cnv 15 640 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj -17 582 cnv 15 640 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text -6 592 GridFlow 0.8.0;
-#X text 157 9 <-- open this and set your camera up;
-#X obj 38 92 #store;
-#X obj 71 143 # put 63;
-#X obj 71 164 # rand;
-#X obj 38 184 # +;
-#X obj 161 144 # *>>8;
-#X obj 192 121 # inv+ 256;
-#X obj 38 211 #convolve (1 5 # 1);
-#X obj 39 233 #convolve (5 1 # 1);
-#X obj 39 306 # max -128;
-#X obj 39 325 # min 127;
-#X obj 39 344 # + 128;
-#X obj 39 365 #inner (3 3 # 3 0 1 1 3 0 0 1 3);
-#X obj 39 387 # >> 2;
-#X obj 113 383 # inv+ 255;
-#X obj 39 407 # *>>8;
-#X obj 39 431 # +;
-#X obj 70 431 # *>>8;
-#X obj 39 457 #clip;
-#X obj 337 209 #rgb_to_greyscale;
-#X obj 337 235 # +;
-#X obj 337 256 #convolve (1 3 # 1);
-#X obj 337 278 #convolve (3 1 # 1);
-#X obj 337 324 # min 255;
-#X obj 337 345 #greyscale_to_rgb;
-#X obj 116 547 #out window;
-#X text 1 -85 goop.pd;
-#X obj 39 478 #scale_by 2;
-#X obj 71 185 # - 31;
-#X obj 337 301 # *>>8 27;
-#X obj 39 287 # *>>8 25;
-#X text 1 -71 Copyright 2004 Mathieu Bouchard;
-#X obj 39 261 # + 5;
-#X connect 0 0 17 0;
-#X connect 1 0 9 0;
-#X connect 2 0 25 0;
-#X connect 2 1 23 0;
-#X connect 3 0 22 1;
-#X connect 4 0 3 0;
-#X connect 5 0 27 0;
-#X connect 5 0 40 0;
-#X connect 6 0 5 1;
-#X connect 7 0 38 0;
-#X connect 9 0 5 0;
-#X connect 9 1 8 0;
-#X connect 9 2 22 0;
-#X connect 10 0 11 0;
-#X connect 11 0 6 0;
-#X connect 12 0 16 0;
-#X connect 13 0 6 0;
-#X connect 14 0 15 0;
-#X connect 15 0 46 0;
-#X connect 16 0 13 0;
-#X connect 17 0 1 0;
-#X connect 22 0 2 0;
-#X connect 23 0 24 0;
-#X connect 24 0 49 0;
-#X connect 25 0 28 0;
-#X connect 26 0 22 1;
-#X connect 27 0 26 1;
-#X connect 28 0 29 0;
-#X connect 29 0 53 0;
-#X connect 30 0 31 0;
-#X connect 31 0 26 0;
-#X connect 31 0 32 0;
-#X connect 32 0 33 0;
-#X connect 33 0 34 0;
-#X connect 34 0 36 0;
-#X connect 35 0 36 1;
-#X connect 36 0 37 0;
-#X connect 37 0 39 0;
-#X connect 38 0 37 1;
-#X connect 39 0 48 0;
-#X connect 40 0 41 0;
-#X connect 41 0 42 0;
-#X connect 42 0 43 0;
-#X connect 43 0 50 0;
-#X connect 44 0 41 1;
-#X connect 44 0 45 0;
-#X connect 45 0 35 0;
-#X connect 45 0 38 1;
-#X connect 48 0 46 0;
-#X connect 49 0 25 1;
-#X connect 50 0 44 0;
-#X connect 51 0 30 0;
-#X connect 53 0 51 0;
diff --git a/externals/gridflow/pd_examples/hello-world.pd b/externals/gridflow/pd_examples/hello-world.pd
deleted file mode 100644
index e43e1a71..00000000
--- a/externals/gridflow/pd_examples/hello-world.pd
+++ /dev/null
@@ -1,50 +0,0 @@
-#N canvas 165 50 640 466 10;
-#X obj 6 67 # / 320;
-#X obj 6 187 # * 255;
-#X obj 6 153 # != 0;
-#X obj 6 -12 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1
-;
-#X obj 6 99 # inv+ 7;
-#X obj 6 15 #for 0 320 1;
-#X obj 6 48 # * 7;
-#X obj 6 -34 loadbang;
-#X text 26 -12 make one line:;
-#X text 14 31 numbers 0 to 319;
-#X text 15 84 numbers 0 to 6 repeated 45 or 46 times;
-#X text 16 116 numbers 7 down to 1 ...;
-#X text 13 172 3*1-bit rgb image line;
-#X text 13 205 3*8-bit rgb image line;
-#X text 135 223 repeat line 240 times;
-#X obj -13 -85 cnv 15 500 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 0 -86 hello-world.pd;
-#X obj 6 134 #outer & (2 4 1);
-#X obj 6 222 #redim (240 320 3);
-#X obj -14 349 cnv 15 500 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text -7 355 GridFlow 0.8.0;
-#X text -7 355 GridFlow 0.8.0;
-#X text 0 -72 Copyright 2001 Mathieu Bouchard;
-#X obj 289 297 #text_to_image;
-#X obj 289 278 #import per_message;
-#X msg 289 259 symbol Hello_World!;
-#X obj 290 319 #draw_image put (3 # 0) (0 0);
-#X obj 6 290 #out window;
-#X msg 288 240 load grid gzfile lucida-typewriter-12.grid.gz;
-#X obj 391 297 #in;
-#X text 328 216 FOR FUTURE USE:;
-#X connect 0 0 4 0;
-#X connect 1 0 18 0;
-#X connect 2 0 1 0;
-#X connect 3 0 5 0;
-#X connect 4 0 17 0;
-#X connect 5 0 6 0;
-#X connect 6 0 0 0;
-#X connect 7 0 3 0;
-#X connect 17 0 2 0;
-#X connect 18 0 27 0;
-#X connect 23 0 26 1;
-#X connect 24 0 23 0;
-#X connect 25 0 24 0;
-#X connect 28 0 29 0;
-#X connect 29 0 23 2;
diff --git a/externals/gridflow/pd_examples/image_stats.pd b/externals/gridflow/pd_examples/image_stats.pd
deleted file mode 100644
index ecb60e01..00000000
--- a/externals/gridflow/pd_examples/image_stats.pd
+++ /dev/null
@@ -1,62 +0,0 @@
-#N canvas 391 151 716 426 10;
-#X obj 214 261 print total_value;
-#X obj 473 191 #dim;
-#X obj 42 220 #export_list;
-#X obj 278 231 print number_of_values;
-#X obj 473 229 print number_of_dimensions;
-#X obj 473 210 #export;
-#X obj 205 181 #fold +;
-#X obj 205 301 /;
-#X obj 205 219 #fold +;
-#X obj 42 239 print total_pixel;
-#X obj 205 147 fork;
-#X obj 265 118 #in;
-#X obj 278 193 #fold * \, seed 1;
-#X obj 420 166 print dimensions;
-#X obj 205 320 print average_value;
-#X obj 205 238 #export;
-#X obj 205 200 #fold +;
-#X obj 420 147 #export_list;
-#X obj 420 128 #dim;
-#X obj 278 174 #dim;
-#X obj 278 212 #export;
-#X msg 291 55 open bluemarble.jpg \, bang;
-#X msg 291 75 open teapot.png \, bang;
-#X msg 291 95 open r001.jpg \, bang;
-#X obj 5 394 cnv 15 720 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 13 401 GridFlow 0.8.0;
-#X text 13 401 GridFlow 0.8.0;
-#X obj 7 5 cnv 15 720 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 15 18 Copyright 2001 Mathieu Bouchard;
-#X text 15 4 image_stats.pd;
-#X obj 42 201 #fold + \, seed (3 #);
-#X obj 42 182 #fold + \, seed (3 #);
-#X text 480 54 <-- click on one of these;
-#X connect 1 0 5 0;
-#X connect 2 0 9 0;
-#X connect 5 0 4 0;
-#X connect 6 0 16 0;
-#X connect 7 0 14 0;
-#X connect 8 0 15 0;
-#X connect 10 0 6 0;
-#X connect 10 0 31 0;
-#X connect 10 1 19 0;
-#X connect 11 0 10 0;
-#X connect 11 0 18 0;
-#X connect 12 0 20 0;
-#X connect 15 0 0 0;
-#X connect 15 0 7 0;
-#X connect 16 0 8 0;
-#X connect 17 0 13 0;
-#X connect 18 0 17 0;
-#X connect 18 0 1 0;
-#X connect 19 0 12 0;
-#X connect 20 0 3 0;
-#X connect 20 0 7 1;
-#X connect 21 0 11 0;
-#X connect 22 0 11 0;
-#X connect 23 0 11 0;
-#X connect 30 0 2 0;
-#X connect 31 0 30 0;
diff --git a/externals/gridflow/pd_examples/linear_transform.pd b/externals/gridflow/pd_examples/linear_transform.pd
deleted file mode 100644
index 1c2d4749..00000000
--- a/externals/gridflow/pd_examples/linear_transform.pd
+++ /dev/null
@@ -1,215 +0,0 @@
-#N canvas 76 11 784 587 10;
-#X text 359 43 click here to go in manual mode;
-#X floatatom 141 311 5 0 0 0 - - -;
-#X obj 27 374 # >> 11;
-#X obj 27 139 #store;
-#X obj 183 291 hsl 128 15 -4096 4096 0 0 empty empty empty -2 -6 0
-8 -260818 -1 -1 0 1;
-#X obj 505 208 * 3;
-#X obj 428 435 # sin*;
-#X obj 183 310 hsl 128 15 -4096 4096 0 0 empty empty empty -2 -6 0
-8 -260818 -1 -1 0 1;
-#X floatatom 141 257 5 0 0 0 - - -;
-#X msg 444 238 10000;
-#X obj 27 59 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 1 1;
-#X obj 183 253 hsl 128 15 -4096 4096 0 0 empty empty empty -2 -6 0
-8 -260818 -1 -1 0 1;
-#X obj 77 138 loadbang;
-#X text 180 234 linear transform;
-#X obj 27 395 # + 128;
-#X floatatom 141 275 5 0 0 0 - - -;
-#X floatatom 141 293 5 0 0 0 - - -;
-#X obj 183 272 hsl 128 15 -4096 4096 0 0 empty empty empty -2 -6 0
-8 -260818 -1 -1 0 1;
-#X obj 428 260 vsl 15 128 0 35999 0 0 empty empty empty 0 -8 0 8 -260818
--1 -1 0 1;
-#X obj 444 259 vsl 15 128 -32768 32768 0 0 empty empty empty 0 -8 0
-8 -260818 -1 -1 12700 1;
-#X obj 327 82 % 36000;
-#X obj 444 219 loadbang;
-#X text 432 185 rotozoomer;
-#X obj 505 227 # sin* 100;
-#X obj 288 43 shunt 2;
-#X msg 505 284 set \$1;
-#X obj 152 416 loadbang;
-#X obj 27 448 #store;
-#X obj 27 469 #out window;
-#X obj 343 44 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 1 1
-;
-#X obj 88 334 #pack 4;
-#X obj 27 95 t b b;
-#X obj 288 82 float;
-#X obj 327 63 + 100;
-#X obj 505 246 # inv* 100000;
-#X obj 505 265 #export;
-#X obj 83 426 #camera;
-#X obj 152 454 #in;
-#X obj 83 406 spigot;
-#X obj 131 407 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0
-1;
-#X obj 27 353 #inner;
-#X obj 88 237 loadbang;
-#X obj 27 488 fps detailed;
-#X obj 27 507 print;
-#X obj 2 0 cnv 15 780 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 21 13 Copyright 2002 Mathieu Bouchard;
-#X text 21 0 convolve.pd;
-#X obj 2 0 cnv 15 780 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 21 0 linear_transform.pd;
-#X obj 77 157 #for (-128 -128) (128 128) (1 1);
-#X obj 428 416 #outer + (9000 18000 0 9000);
-#X text 21 13 Copyright 2001 Mathieu Bouchard;
-#X obj 2 549 cnv 15 780 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 10 556 GridFlow 0.8.0;
-#X text 10 556 GridFlow 0.8.0;
-#X msg 152 435 load teapot.png;
-#X obj 27 76 metro 33.3667;
-#X obj 89 353 #redim (2 2);
-#X obj 333 335 #export;
-#X obj 333 316 # % 36000;
-#N canvas 0 0 450 300 scratch 0;
-#X obj 40 38 inlet;
-#X obj 40 245 outlet;
-#X obj 40 57 route keypress;
-#X msg 40 76 \$4;
-#X msg 40 115 -1;
-#X msg 79 115 1;
-#X obj 40 182 +;
-#X obj 40 207 int;
-#X obj 72 185 nbx 8 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10
--262144 -1 -1 0 256;
-#X obj 40 226 #fade 2;
-#X obj 65 207 inlet;
-#X obj 40 139 * 1500;
-#X obj 40 95 route Left Right;
-#X connect 0 0 2 0;
-#X connect 2 0 3 0;
-#X connect 3 0 12 0;
-#X connect 4 0 11 0;
-#X connect 5 0 11 0;
-#X connect 6 0 7 1;
-#X connect 6 0 8 0;
-#X connect 7 0 9 0;
-#X connect 8 0 6 1;
-#X connect 9 0 1 0;
-#X connect 10 0 7 0;
-#X connect 11 0 6 0;
-#X connect 12 0 4 0;
-#X connect 12 1 5 0;
-#X restore 333 297 pd scratch;
-#N canvas 0 0 304 312 scratch2 0;
-#X obj 30 23 inlet;
-#X obj 46 263 outlet;
-#X obj 30 42 route keypress;
-#X msg 30 90 \$4;
-#X msg 69 130 1;
-#X obj 45 197 +;
-#X obj 46 218 int;
-#X obj 71 199 nbx 8 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10
--262144 -1 -1 131526 256;
-#X obj 46 243 #fade 2;
-#X obj 71 218 inlet;
-#X obj 30 109 route Up Down;
-#X msg 30 130 -1;
-#X obj 30 70 t l l;
-#X msg 129 62 \$3;
-#X obj 129 81 & 1;
-#X obj 129 100 sel 0 1;
-#X obj 49 161 *;
-#X msg 130 120 1000;
-#X msg 168 120 5;
-#X connect 0 0 2 0;
-#X connect 2 0 12 0;
-#X connect 3 0 10 0;
-#X connect 4 0 16 0;
-#X connect 5 0 6 1;
-#X connect 5 0 7 0;
-#X connect 6 0 8 0;
-#X connect 7 0 5 1;
-#X connect 8 0 1 0;
-#X connect 9 0 6 0;
-#X connect 10 0 11 0;
-#X connect 10 1 4 0;
-#X connect 11 0 16 0;
-#X connect 12 0 3 0;
-#X connect 12 1 13 0;
-#X connect 13 0 14 0;
-#X connect 14 0 15 0;
-#X connect 15 0 17 0;
-#X connect 15 1 18 0;
-#X connect 16 0 5 0;
-#X connect 17 0 16 1;
-#X connect 18 0 16 1;
-#X restore 336 367 pd scratch2;
-#X obj 336 386 #export;
-#X floatatom 336 443 8 0 0 0 - - -;
-#X obj 336 405 / 10000;
-#X obj 336 424 exp;
-#X obj 505 373 t b;
-#X connect 1 0 30 3;
-#X connect 2 0 14 0;
-#X connect 3 0 40 0;
-#X connect 4 0 16 0;
-#X connect 5 0 23 0;
-#X connect 6 0 57 0;
-#X connect 7 0 1 0;
-#X connect 8 0 30 0;
-#X connect 9 0 19 0;
-#X connect 10 0 56 0;
-#X connect 11 0 8 0;
-#X connect 12 0 49 0;
-#X connect 14 0 27 0;
-#X connect 15 0 30 1;
-#X connect 16 0 30 2;
-#X connect 17 0 15 0;
-#X connect 18 0 50 0;
-#X connect 19 0 66 0;
-#X connect 20 0 32 1;
-#X connect 21 0 9 0;
-#X connect 23 0 34 0;
-#X connect 24 0 32 0;
-#X connect 25 0 19 0;
-#X connect 26 0 55 0;
-#X connect 27 0 28 0;
-#X connect 28 0 42 0;
-#X connect 28 0 60 0;
-#X connect 28 0 61 0;
-#X connect 29 0 24 1;
-#X connect 30 0 57 0;
-#X connect 31 0 3 0;
-#X connect 31 1 24 0;
-#X connect 31 1 38 0;
-#X connect 31 1 60 1;
-#X connect 31 1 61 1;
-#X connect 32 0 33 0;
-#X connect 32 0 18 0;
-#X connect 32 0 5 0;
-#X connect 33 0 20 0;
-#X connect 34 0 35 0;
-#X connect 35 0 25 0;
-#X connect 35 0 66 0;
-#X connect 36 0 27 1;
-#X connect 37 0 27 1;
-#X connect 38 0 36 0;
-#X connect 39 0 38 1;
-#X connect 40 0 2 0;
-#X connect 41 0 30 0;
-#X connect 42 0 43 0;
-#X connect 49 0 3 1;
-#X connect 50 0 6 0;
-#X connect 55 0 37 0;
-#X connect 56 0 31 0;
-#X connect 57 0 40 1;
-#X connect 58 0 18 0;
-#X connect 59 0 58 0;
-#X connect 60 0 59 0;
-#X connect 61 0 62 0;
-#X connect 62 0 64 0;
-#X connect 64 0 65 0;
-#X connect 65 0 63 0;
-#X connect 65 0 19 0;
-#X connect 65 0 6 1;
-#X connect 66 0 18 0;
diff --git a/externals/gridflow/pd_examples/motion_detect.pd b/externals/gridflow/pd_examples/motion_detect.pd
deleted file mode 100644
index c0d00178..00000000
--- a/externals/gridflow/pd_examples/motion_detect.pd
+++ /dev/null
@@ -1,44 +0,0 @@
-#N canvas 564 180 494 470 10;
-#X obj 32 -33 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1
-;
-#X obj 37 193 #downscale_by ( 15 20 ) smoothly;
-#X obj 37 219 #scale_by ( 32 32 );
-#X obj 37 251 #out window;
-#X obj 32 42 t a a;
-#X obj 37 68 # -;
-#X obj 37 91 @! abs;
-#X obj 37 114 # * 8;
-#X obj 37 140 # - 64;
-#X obj 61 291 fps detailed;
-#X obj 61 311 print;
-#X obj 32 -6 metro 33.3667;
-#X obj 32 18 #camera;
-#X obj 37 165 #clip;
-#X obj -15 353 cnv 15 500 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text -7 360 GridFlow 0.8.0;
-#X text -7 360 GridFlow 0.8.0;
-#X obj -13 -85 cnv 15 500 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text -5 -85 motion_detect.pd;
-#X text -6 -72 Copyright 2001 Mathieu Bouchard;
-#X obj 181 253 display;
-#X text 127 79 This patch demonstrates the basis of motion detection.
-The substraction of two subsequent frames after [t a a]. It then downscales
-and rescales the image \, breaking it down into larger regions that
-can be monitored for changes.;
-#X connect 0 0 11 0;
-#X connect 1 0 2 0;
-#X connect 1 0 20 0;
-#X connect 2 0 3 0;
-#X connect 3 0 9 0;
-#X connect 4 0 5 1;
-#X connect 4 1 5 0;
-#X connect 5 0 6 0;
-#X connect 6 0 7 0;
-#X connect 7 0 8 0;
-#X connect 8 0 13 0;
-#X connect 9 0 10 0;
-#X connect 11 0 12 0;
-#X connect 12 0 4 0;
-#X connect 13 0 1 0;
diff --git a/externals/gridflow/pd_examples/nervous_video.pd b/externals/gridflow/pd_examples/nervous_video.pd
deleted file mode 100644
index 1f20094e..00000000
--- a/externals/gridflow/pd_examples/nervous_video.pd
+++ /dev/null
@@ -1,154 +0,0 @@
-#N canvas 446 102 590 659 10;
-#X obj 33 30 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#N canvas 123 298 450 300 counter 0;
-#X obj 131 70 + 1;
-#X obj 131 23 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X floatatom 170 70 5 0 0 0 - - -;
-#X msg 131 47 1;
-#X floatatom 170 114 5 0 0 0 - - -;
-#X obj 132 157 select 1;
-#X msg 170 44 0;
-#X obj 132 178 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 70 25 inlet;
-#X obj 132 195 outlet;
-#X obj 220 65 inlet;
-#X obj 298 106 outlet;
-#X obj 170 95 >= 32;
-#X connect 0 0 2 0;
-#X connect 1 0 3 0;
-#X connect 2 0 0 1;
-#X connect 2 0 11 0;
-#X connect 2 0 12 0;
-#X connect 3 0 0 0;
-#X connect 4 0 5 0;
-#X connect 5 0 6 0;
-#X connect 5 0 7 0;
-#X connect 6 0 2 0;
-#X connect 7 0 9 0;
-#X connect 8 0 1 0;
-#X connect 10 0 12 1;
-#X connect 12 0 4 0;
-#X restore 241 137 pd counter;
-#X obj 24 252 / 10;
-#X floatatom 24 290 5 0 0 0 - - -;
-#X obj 24 -26 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1
-;
-#X floatatom 25 504 5 0 0 0 - - -;
-#X obj 24 484 fps;
-#X obj 24 2 metro 33.3667;
-#X msg 24 314 list \$1;
-#X msg 225 315 reassign \, 32 240 320 3 #;
-#X msg 225 295 reassign \, 32 120 160 3 #;
-#X msg 225 335 reassign \, 32 480 640 3 #;
-#X msg 316 94 32;
-#X obj 24 233 random 320;
-#X obj 24 461 #out window;
-#X floatatom 316 114 5 0 0 0 - - -;
-#X obj 347 94 loadbang;
-#X text 358 113 maximum value is 32;
-#X text 359 126 (see below);
-#X obj 24 120 float;
-#X text 203 277 the buffer size decides the maximum loop length;
-#X obj 24 189 shunt 4;
-#X obj 24 213 bang;
-#X obj 24 271 int;
-#X obj 145 163 vradio 15 1 0 4 empty empty empty 0 -6 0 8 -241291 -1
--1 0;
-#X text 166 163 caffeine twitch;
-#X text 166 178 ethanol lag;
-#X obj 131 233 * 2;
-#X obj 160 234 * -1;
-#X text 166 209 back flash acid;
-#X text 165 193 acid flash back;
-#X obj 255 369 vradio 15 1 0 4 empty empty empty 0 -6 0 8 -241291 -1
--1 0;
-#X text 273 366 plain;
-#X text 274 399 hilitemotion;
-#X text 273 415 embossmotion;
-#X obj 80 402 @! abs;
-#X text 133 -3 This patch was created by Alexandre Castonguay \,;
-#X text 133 10 as a clone of Edo Tannenbaum's "nervous video" effect
-\, http://effectv.sourceforge.net;
-#X text 133 38 Later modified by Mathieu to add more effects;
-#X obj 80 381 # -;
-#X obj 81 421 # << 2;
-#X obj 102 233 + 1;
-#X obj 135 382 # -;
-#X obj 136 401 # + 128;
-#X obj 136 421 # max 0;
-#X obj 80 441 # min 255;
-#X obj 24 358 shunt 4;
-#X obj 119 353 shunt 4;
-#X text 273 384 mix 50%;
-#X obj 34 421 # >> 1;
-#X obj 38 388 # +;
-#X obj 89 101 #camera;
-#X obj 24 53 t b b b;
-#X obj -16 536 cnv 15 700 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text -7 543 GridFlow 0.8.0;
-#X text -7 543 GridFlow 0.8.0;
-#X obj -17 -85 cnv 15 700 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text -6 -86 nervous_video.pd;
-#X text -7 -74 Copyright 2002 Alexandre Castonguay \, Mathieu Bouchard
-;
-#X text 146 101 <-- open this;
-#X obj 24 333 #store (32 240 320 3 #);
-#X msg 316 165 put_at ( \$1 0 0 0 );
-#X connect 0 0 52 0;
-#X connect 1 1 61 0;
-#X connect 1 1 19 1;
-#X connect 2 0 23 0;
-#X connect 3 0 8 0;
-#X connect 4 0 7 0;
-#X connect 6 0 5 0;
-#X connect 7 0 52 0;
-#X connect 8 0 60 0;
-#X connect 9 0 60 1;
-#X connect 10 0 60 1;
-#X connect 11 0 60 1;
-#X connect 12 0 15 0;
-#X connect 13 0 2 0;
-#X connect 14 0 6 0;
-#X connect 15 0 1 1;
-#X connect 16 0 12 0;
-#X connect 19 0 21 0;
-#X connect 21 0 22 0;
-#X connect 21 1 41 0;
-#X connect 21 2 27 0;
-#X connect 21 3 28 0;
-#X connect 22 0 13 0;
-#X connect 23 0 3 0;
-#X connect 24 0 21 1;
-#X connect 27 0 8 0;
-#X connect 28 0 8 0;
-#X connect 31 0 47 1;
-#X connect 31 0 46 1;
-#X connect 35 0 40 0;
-#X connect 39 0 35 0;
-#X connect 40 0 45 0;
-#X connect 41 0 8 0;
-#X connect 42 0 43 0;
-#X connect 43 0 44 0;
-#X connect 44 0 45 0;
-#X connect 45 0 14 0;
-#X connect 46 0 14 0;
-#X connect 46 1 50 0;
-#X connect 46 2 39 0;
-#X connect 46 3 42 0;
-#X connect 47 1 50 1;
-#X connect 47 2 39 1;
-#X connect 47 3 42 1;
-#X connect 49 0 14 0;
-#X connect 50 0 49 0;
-#X connect 51 0 47 0;
-#X connect 51 0 60 1;
-#X connect 52 0 19 0;
-#X connect 52 1 51 0;
-#X connect 52 2 1 0;
-#X connect 60 0 46 0;
-#X connect 61 0 60 1;
diff --git a/externals/gridflow/pd_examples/photo_pianoroll.pd b/externals/gridflow/pd_examples/photo_pianoroll.pd
deleted file mode 100644
index 9ad80e38..00000000
--- a/externals/gridflow/pd_examples/photo_pianoroll.pd
+++ /dev/null
@@ -1,158 +0,0 @@
-#N canvas 329 40 705 535 10;
-#X obj 146 62 #in lada.jpg;
-#X obj 38 290 #out window;
-#X obj 38 48 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 1 1;
-#X obj 38 114 #store;
-#X obj 164 41 loadbang;
-#X obj 146 42 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 255 466 dac~;
-#X obj 329 58 +;
-#X msg 329 39 1;
-#X obj 361 39 % 365;
-#N canvas 0 0 450 300 fft 0;
-#X obj 23 68 rifft~;
-#X obj 23 88 outlet~;
-#X obj 359 16 block~ 1024;
-#X obj 23 48 tabreceive~ array2;
-#X connect 0 0 1 0;
-#X connect 3 0 0 0;
-#X restore 255 423 pd fft;
-#X obj 17 85 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 38 84 t b b;
-#X msg 260 252 4 2 # 0 0 0 502 1 502 1 0;
-#X obj 260 271 # +;
-#X obj 38 233 t a b;
-#X msg 287 271 \$1 0;
-#X obj 38 252 #greyscale_to_rgb;
-#X obj 462 77 #store;
-#X obj 462 153 #export_list;
-#X obj 501 172 s array1;
-#X obj 171 177 # inv+ 255;
-#X obj 146 100 # min 255;
-#X obj 146 81 # * 3;
-#X msg 474 58 1 1 # \$1;
-#X obj 255 339 table array1 502;
-#X obj 462 172 t b a;
-#X obj 326 271 r row;
-#X obj 361 58 s row;
-#X obj 462 210 t f f;
-#X obj 462 305 tabwrite array2;
-#X obj 462 248 exp;
-#X obj 38 309 #mouse \, ...;
-#X obj 79 383 #draw_polygon put;
-#X obj 79 364 spigot;
-#X obj 29 413 t a a;
-#X obj 29 470 # +;
-#X obj 146 177 t a;
-#X msg 29 432 4 2 # 0 0 0 1 1 1 1 0;
-#X obj 29 451 # *;
-#X obj 105 459 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10
--262131 -1 -1 20 256;
-#X msg 185 217 365 502 1 # 255;
-#X text 296 217 clear;
-#X obj 462 286 tabread4 array1;
-#X obj 462 191 for 0 64 1;
-#X obj 462 96 #fade 5;
-#X obj 255 358 table array2 1024;
-#X obj 255 442 lop~ 1000;
-#X obj 462 229 / 20;
-#X obj 462 267 * 22;
-#X obj 105 473 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10
--262131 -1 -1 20 256;
-#X obj 54 470 #pack 2;
-#X obj 499 39 # >> 4;
-#X obj 146 138 # >> 2;
-#X obj 38 271 #draw_polygon put (3 # 255 0 0);
-#X obj 2 499 cnv 15 700 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 10 506 GridFlow 0.8.0;
-#X text 10 506 GridFlow 0.8.0;
-#X obj 2 0 cnv 15 700 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 17 -1 photo_pianoroll.pd;
-#X text 15 13 Copyright 2004 Mathieu Bouchard;
-#X obj 462 134 # / (f # 4000);
-#X obj 462 115 #cast f;
-#X obj 171 196 #convolve (1 7 # 1 1 2 8 2 1 1);
-#X obj 146 119 #convolve (2 2 # 1);
-#X msg 132 344 0;
-#X msg 136 364 1 # \$1;
-#X msg 162 344 255;
-#X obj 79 402 s feedback;
-#X obj 152 158 r feedback;
-#X obj 38 65 metro 46.44;
-#X text 575 7 How to play a car;
-#X connect 0 0 23 0;
-#X connect 1 0 32 0;
-#X connect 2 0 70 0;
-#X connect 3 0 15 0;
-#X connect 3 0 34 0;
-#X connect 4 0 0 0;
-#X connect 5 0 0 0;
-#X connect 7 0 9 0;
-#X connect 8 0 7 0;
-#X connect 9 0 7 1;
-#X connect 9 0 28 0;
-#X connect 9 0 24 0;
-#X connect 10 0 47 0;
-#X connect 11 0 12 0;
-#X connect 12 0 8 0;
-#X connect 12 1 3 0;
-#X connect 13 0 14 0;
-#X connect 14 0 54 2;
-#X connect 15 0 17 0;
-#X connect 15 1 13 0;
-#X connect 16 0 14 1;
-#X connect 17 0 54 0;
-#X connect 18 0 45 0;
-#X connect 19 0 26 0;
-#X connect 21 0 63 0;
-#X connect 22 0 64 0;
-#X connect 23 0 22 0;
-#X connect 24 0 18 0;
-#X connect 26 0 44 0;
-#X connect 26 1 20 0;
-#X connect 27 0 16 0;
-#X connect 29 0 48 0;
-#X connect 29 1 30 1;
-#X connect 31 0 49 0;
-#X connect 32 0 35 0;
-#X connect 32 1 35 0;
-#X connect 32 4 34 1;
-#X connect 32 4 65 0;
-#X connect 32 6 34 1;
-#X connect 32 6 67 0;
-#X connect 33 0 68 0;
-#X connect 34 0 33 0;
-#X connect 35 0 38 0;
-#X connect 35 1 36 1;
-#X connect 36 0 33 2;
-#X connect 37 0 3 1;
-#X connect 37 0 21 0;
-#X connect 38 0 39 0;
-#X connect 39 0 36 0;
-#X connect 40 0 51 0;
-#X connect 41 0 37 0;
-#X connect 43 0 30 0;
-#X connect 44 0 29 0;
-#X connect 45 0 62 0;
-#X connect 47 0 6 0;
-#X connect 47 0 6 1;
-#X connect 48 0 31 0;
-#X connect 49 0 43 0;
-#X connect 50 0 51 1;
-#X connect 51 0 39 1;
-#X connect 52 0 18 1;
-#X connect 53 0 37 0;
-#X connect 54 0 1 0;
-#X connect 61 0 19 0;
-#X connect 62 0 61 0;
-#X connect 63 0 52 0;
-#X connect 64 0 53 0;
-#X connect 65 0 66 0;
-#X connect 66 0 33 1;
-#X connect 67 0 33 1;
-#X connect 69 0 37 0;
-#X connect 70 0 12 0;
diff --git a/externals/gridflow/pd_examples/plot.pd b/externals/gridflow/pd_examples/plot.pd
deleted file mode 100644
index dad9db76..00000000
--- a/externals/gridflow/pd_examples/plot.pd
+++ /dev/null
@@ -1,73 +0,0 @@
-#N canvas 211 415 621 272 10;
-#N canvas 803 450 420 235 plot-a-function 0;
-#X obj 8 61 # inv+ 640;
-#X obj 8 40 #for 0 640 1;
-#X obj 105 59 outlet;
-#X obj 33 175 #outer <;
-#X obj 105 80 inlet;
-#X text 209 199 to rgb;
-#X text 97 176 make graph \, twotone channelless;
-#X obj 35 232 outlet;
-#X obj 105 34 #for 0 640 1;
-#X obj 105 10 inlet;
-#X obj 92 132 #finished;
-#X obj 105 103 t a a;
-#X obj 33 200 #outer * (255 255 255);
-#X connect 0 0 3 0;
-#X connect 1 0 0 0;
-#X connect 3 0 12 0;
-#X connect 4 0 11 0;
-#X connect 8 0 2 0;
-#X connect 9 0 8 0;
-#X connect 10 0 1 0;
-#X connect 11 0 10 0;
-#X connect 11 1 3 1;
-#X connect 12 0 7 0;
-#X restore 57 47 pd plot-a-function ( tm );
-#X obj 257 81 # + 320;
-#X obj 57 72 #out window;
-#X obj 256 -3 # - 320;
-#X obj 256 53 # tanh* 343;
-#X obj 256 25 # * 30;
-#X obj 33 15 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1
-;
-#X obj -16 -85 cnv 15 620 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj -15 152 cnv 15 620 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text -7 159 GridFlow 0.8.0;
-#X text -7 159 GridFlow 0.8.0;
-#X text -3 -86 plot.pd;
-#X obj 57 -10 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 1 1
-;
-#X obj 57 14 metro 100;
-#X obj 360 -3 hsl 128 15 0 500 0 0 empty empty empty -2 -6 0 8 -260818
--1 -1 3600 1;
-#X floatatom 314 -2 5 0 0 0 - - -;
-#X obj 358 25 hsl 128 15 0 500 0 0 empty empty empty -2 -6 0 8 -260818
--1 -1 1300 1;
-#X floatatom 311 26 5 0 0 0 - - -;
-#X obj 390 54 hsl 128 15 0 500 0 0 empty empty empty -2 -6 0 8 -260818
--1 -1 6700 1;
-#X floatatom 343 54 5 0 0 0 - - -;
-#X obj 361 82 hsl 128 15 0 500 0 0 empty empty empty -2 -6 0 8 -260818
--1 -1 5600 1;
-#X floatatom 314 82 5 0 0 0 - - -;
-#X text -3 -72 Copyright 2003 Mathieu Bouchard;
-#X connect 0 0 2 0;
-#X connect 0 1 3 0;
-#X connect 1 0 0 1;
-#X connect 3 0 5 0;
-#X connect 4 0 1 0;
-#X connect 5 0 4 0;
-#X connect 6 0 0 0;
-#X connect 12 0 13 0;
-#X connect 13 0 0 0;
-#X connect 14 0 15 0;
-#X connect 15 0 3 1;
-#X connect 16 0 17 0;
-#X connect 17 0 5 1;
-#X connect 18 0 19 0;
-#X connect 19 0 4 1;
-#X connect 20 0 21 0;
-#X connect 21 0 1 1;
diff --git a/externals/gridflow/pd_examples/polygon.pd b/externals/gridflow/pd_examples/polygon.pd
deleted file mode 100644
index a18980ea..00000000
--- a/externals/gridflow/pd_examples/polygon.pd
+++ /dev/null
@@ -1,123 +0,0 @@
-#N canvas 130 96 584 565 10;
-#X obj 35 250 #draw_polygon +;
-#X obj 18 1 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1
-;
-#X obj 35 214 #store;
-#X obj 35 -36 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 1 1
-;
-#X obj 35 378 #out window;
-#X obj 306 7 vsl 15 137 0 36000 0 1 empty empty empty -2 -6 0 8 -260818
--1 -1 3400 1;
-#N canvas 0 0 415 291 create 0;
-#X msg 82 66 0 \$1;
-#X obj 5 131 #outer + ( 0 9000 );
-#X obj 5 153 # +;
-#X obj 5 197 # + ( 120 160 );
-#X obj 5 175 # cos* 116;
-#X obj 5 109 # * 14400;
-#X obj 5 87 #for 0 5 1;
-#X obj 34 153 inlet rotation_angle;
-#X obj 5 10 inlet bang;
-#X obj 5 219 outlet polygon;
-#X obj 82 44 inlet tilt_factor;
-#X text 81 27 default: 9000 \, for flatness;
-#X connect 0 0 1 1;
-#X connect 1 0 2 0;
-#X connect 2 0 4 0;
-#X connect 3 0 9 0;
-#X connect 4 0 3 0;
-#X connect 5 0 1 0;
-#X connect 6 0 5 0;
-#X connect 7 0 2 1;
-#X connect 8 0 6 0;
-#X connect 10 0 0 0;
-#X restore 204 149 pd create star;
-#N canvas 0 0 450 300 color 0;
-#X obj 18 141 outlet 0;
-#X obj 18 95 # sin* 128;
-#X obj 18 117 # + 128;
-#X obj 18 37 # * 1146;
-#X obj 18 13 inlet;
-#X obj 18 60 #outer + ( 0 12000 24000 );
-#X text 139 52 each channel is a sine wave \; the three are offset
-from each other 120 degrees. it is almost like turning around in the
-color wheel except we don't support the HSV color model for now.;
-#X connect 1 0 2 0;
-#X connect 2 0 0 0;
-#X connect 3 0 5 0;
-#X connect 4 0 3 0;
-#X connect 5 0 1 0;
-#X restore 62 102 pd color generator;
-#X obj 35 -19 metro 33.3667;
-#X obj 35 0 t b b b;
-#X obj 35 71 t b;
-#X floatatom 307 151 6 0 0 0 - - -;
-#X obj 88 194 loadbang;
-#X obj 51 272 shunt 2;
-#X obj 104 274 tgl 15 1 empty empty empty 0 -6 0 8 -241291 -1 -1 1
-1;
-#X text 122 273 blur;
-#X msg 88 214 240 320 3 b # 0;
-#X obj 62 140 #cast b;
-#X obj 79 355 #solarize;
-#X obj 35 317 shunt 2;
-#X obj 88 319 tgl 15 1 empty empty empty 0 -6 0 8 -241291 -1 -1 1 1
-;
-#X obj 155 303 # >> (b # 2);
-#X obj 155 322 #convolve (1 3 b # 1 2 1) \, seed (b # 0);
-#X obj -15 442 cnv 15 580 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text -7 450 GridFlow 0.8.0;
-#X text -7 450 GridFlow 0.8.0;
-#X obj -13 -85 cnv 15 580 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 0 -72 Copyright 2002 Mathieu Bouchard;
-#X text 0 -86 polygon.pd;
-#X obj 79 336 #cast i;
-#X obj 82 30 + 1;
-#X obj 57 30 i;
-#X msg 22 26 0;
-#X obj 182 75 expr ($f1*$f1/2);
-#X obj 155 341 # >> (b # 2);
-#X obj 155 360 #convolve (3 1 b # 1 2 1) \, seed (b # 0);
-#X obj 5 27 bng 15 250 50 0 empty empty empty 0 -6 0 8 -258699 -1 -1
-;
-#X obj 62 121 # >> 3;
-#X connect 0 0 13 0;
-#X connect 0 0 19 0;
-#X connect 1 0 9 0;
-#X connect 2 0 0 0;
-#X connect 3 0 8 0;
-#X connect 5 0 11 0;
-#X connect 6 0 0 2;
-#X connect 7 0 37 0;
-#X connect 8 0 9 0;
-#X connect 9 0 10 0;
-#X connect 9 1 31 0;
-#X connect 9 2 6 0;
-#X connect 10 0 2 0;
-#X connect 11 0 6 2;
-#X connect 12 0 16 0;
-#X connect 13 0 2 1;
-#X connect 13 1 21 0;
-#X connect 14 0 13 1;
-#X connect 16 0 2 1;
-#X connect 17 0 0 1;
-#X connect 18 0 4 0;
-#X connect 19 0 4 0;
-#X connect 19 1 29 0;
-#X connect 20 0 19 1;
-#X connect 21 0 22 0;
-#X connect 22 0 34 0;
-#X connect 29 0 18 0;
-#X connect 30 0 31 1;
-#X connect 31 0 30 0;
-#X connect 31 0 7 0;
-#X connect 31 0 33 0;
-#X connect 32 0 31 0;
-#X connect 33 0 6 1;
-#X connect 34 0 35 0;
-#X connect 35 0 2 1;
-#X connect 36 0 32 0;
-#X connect 36 0 16 0;
-#X connect 37 0 17 0;
diff --git a/externals/gridflow/pd_examples/ripple.pd b/externals/gridflow/pd_examples/ripple.pd
deleted file mode 100644
index 634122d0..00000000
--- a/externals/gridflow/pd_examples/ripple.pd
+++ /dev/null
@@ -1,190 +0,0 @@
-#N canvas 103 42 683 618 10;
-#X obj 78 419 #out window;
-#X obj 47 173 #outer ignore ( 0 0 );
-#X obj 78 105 +;
-#X obj 47 326 # +;
-#X obj 283 170 #outer + ( 0 9000 );
-#X obj 47 370 shunt 2;
-#X obj 283 189 # sin* 256;
-#N canvas 609 247 325 236 distance 0;
-#X text 16 15 bang;
-#X obj 18 58 #for ( -128 -128 ) ( 128 128 ) ( 1 1 );
-#X text 15 167 distances to middle;
-#X obj 18 125 @! sqrt;
-#X obj 18 36 inlet;
-#X obj 18 103 #fold +;
-#X obj 18 81 # ** 2;
-#X text 89 101 pythagoras' theorem;
-#X obj 18 149 outlet;
-#X connect 1 0 6 0;
-#X connect 3 0 8 0;
-#X connect 4 0 1 0;
-#X connect 5 0 3 0;
-#X connect 6 0 5 0;
-#X restore 164 41 pd distance map;
-#X obj 78 440 fps detailed;
-#X obj 283 130 loadbang;
-#X obj 47 42 fork;
-#X obj 168 278 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0
-1;
-#X msg 78 86 1;
-#X obj 47 105 # -;
-#X obj 47 62 #store;
-#N canvas 659 552 420 225 apply 0;
-#X obj 60 48 #fold +;
-#X obj 12 190 outlet 0;
-#X obj 60 16 inlet;
-#X obj 12 124 # +;
-#X obj 12 167 # max 0;
-#X obj 12 146 # min 255;
-#X obj 12 16 inlet;
-#X obj 58 101 #outer *>>8;
-#X obj 130 69 inlet;
-#X obj 60 73 # << 2;
-#X connect 0 0 9 0;
-#X connect 2 0 0 0;
-#X connect 3 0 5 0;
-#X connect 4 0 1 0;
-#X connect 5 0 4 0;
-#X connect 6 0 3 0;
-#X connect 7 0 3 1;
-#X connect 8 0 7 1;
-#X connect 9 0 7 0;
-#X restore 78 400 pd apply shading;
-#X obj 47 -27 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1
-;
-#X obj 47 348 #store;
-#X obj 47 25 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 48 281 #finished;
-#X obj 164 329 #for ( 0 0 ) ( 256 256 ) ( 1 1 );
-#X obj 164 130 # + 10;
-#X text 187 278 shading on/off;
-#X obj 47 240 shunt 2;
-#X floatatom 106 108 5 0 0 0 - - -;
-#X obj 47 195 # *>>8;
-#X obj 164 310 loadbang;
-#X obj 164 21 loadbang;
-#X obj 47 303 #store;
-#X obj 78 462 print;
-#X obj 164 149 # inv* 10000;
-#N canvas 588 233 480 480 angle 0;
-#X obj 71 163 #outer atan;
-#X obj 71 55 #finished;
-#X text 70 210 angles to centre;
-#X text 168 63 bang;
-#X obj 167 82 inlet;
-#X obj 168 106 #for -128 128 1;
-#X obj 71 78 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 72 188 outlet 0;
-#X obj 71 107 #for -128 128 1;
-#X connect 0 0 7 0;
-#X connect 1 0 6 0;
-#X connect 4 0 5 0;
-#X connect 5 0 0 1;
-#X connect 5 0 1 0;
-#X connect 6 0 8 0;
-#X connect 8 0 0 0;
-#X restore 283 151 pd angle map;
-#X obj 47 151 # *>>8;
-#X obj 46 218 # *>>8;
-#X obj 259 235 hsl 128 15 -256 256 0 1 empty empty empty -2 -6 0 8
--260818 -1 -1 12600 1;
-#X obj 259 252 hsl 128 15 -256 256 0 1 empty empty empty -2 -6 0 8
--260818 -1 -1 3200 1;
-#N canvas 715 537 387 220 compute 0;
-#X obj 8 113 #store;
-#X obj 55 113 # sin* 64;
-#X obj 55 71 #for 0 1024 1;
-#X obj 55 50 loadbang;
-#X obj 55 92 # * 900;
-#X obj 125 51 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 8 135 outlet;
-#X text 75 151 This is somewhat like [# sin];
-#X text 75 166 but much faster (lookup table);
-#X obj 8 11 inlet;
-#X obj 8 30 #outer ignore (0);
-#X connect 0 0 6 0;
-#X connect 1 0 0 1;
-#X connect 2 0 4 0;
-#X connect 3 0 2 0;
-#X connect 4 0 1 0;
-#X connect 5 0 2 0;
-#X connect 9 0 10 0;
-#X connect 10 0 0 0;
-#X restore 47 128 pd compute sine;
-#X text 232 358 background image;
-#X obj 165 375 #in teapot.png;
-#X obj 165 356 loadbang;
-#X obj 48 261 t a a;
-#X text 215 219 intensity of wave;
-#X obj 47 4 metro 33.3667;
-#X text 246 5 waves.pd is more interesting;
-#X text 225 -9 this is a quite boring wave generator;
-#X text 95 61 table for distance map;
-#X floatatom 216 237 5 0 0 0 - - -;
-#X floatatom 216 253 5 0 0 0 - - -;
-#X obj 157 239 #pack 2;
-#X obj -13 -85 cnv 15 680 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 0 -72 Copyright 2002 Mathieu Bouchard;
-#X text 0 -85 ripple.pd;
-#X obj -15 501 cnv 15 680 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text -7 508 GridFlow 0.8.0;
-#X text -7 508 GridFlow 0.8.0;
-#X obj 246 410 #color;
-#X text 430 407 color of ripple shading;
-#X connect 0 0 8 0;
-#X connect 1 0 25 0;
-#X connect 2 0 24 0;
-#X connect 2 0 13 1;
-#X connect 3 0 17 0;
-#X connect 4 0 6 0;
-#X connect 5 0 15 0;
-#X connect 5 1 0 0;
-#X connect 6 0 25 1;
-#X connect 7 0 21 0;
-#X connect 7 0 14 1;
-#X connect 8 0 29 0;
-#X connect 9 0 31 0;
-#X connect 10 0 14 0;
-#X connect 10 1 12 0;
-#X connect 11 0 23 1;
-#X connect 11 0 5 1;
-#X connect 12 0 2 0;
-#X connect 13 0 36 0;
-#X connect 14 0 13 0;
-#X connect 15 0 0 0;
-#X connect 16 0 42 0;
-#X connect 17 0 5 0;
-#X connect 18 0 10 0;
-#X connect 19 0 28 0;
-#X connect 20 0 3 1;
-#X connect 21 0 30 0;
-#X connect 23 0 15 1;
-#X connect 23 0 40 0;
-#X connect 23 1 3 0;
-#X connect 24 0 2 1;
-#X connect 25 0 33 0;
-#X connect 26 0 20 0;
-#X connect 27 0 7 0;
-#X connect 28 0 3 0;
-#X connect 30 0 32 1;
-#X connect 31 0 4 0;
-#X connect 32 0 1 0;
-#X connect 33 0 23 0;
-#X connect 34 0 46 0;
-#X connect 35 0 47 0;
-#X connect 36 0 32 0;
-#X connect 38 0 17 1;
-#X connect 39 0 38 0;
-#X connect 40 0 19 0;
-#X connect 40 1 28 1;
-#X connect 42 0 18 0;
-#X connect 46 0 48 0;
-#X connect 47 0 48 1;
-#X connect 48 0 33 1;
-#X connect 55 0 15 2;
diff --git a/externals/gridflow/pd_examples/sand.pd b/externals/gridflow/pd_examples/sand.pd
deleted file mode 100644
index 1ba43753..00000000
--- a/externals/gridflow/pd_examples/sand.pd
+++ /dev/null
@@ -1,415 +0,0 @@
-#N canvas 524 30 680 557 10;
-#X text 287 159 disable falling;
-#X obj 2 96 fork;
-#X obj 273 294 # != 0;
-#X obj 334 332 #fold +;
-#X obj 8 414 s position;
-#X obj 192 29 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 1 1
-;
-#X obj 273 351 #export;
-#X obj 192 82 #store;
-#X obj 217 113 shunt 2;
-#N canvas 25 226 369 359 mouse 0;
-#X text 143 214 is there a click?;
-#X obj 44 114 != 0;
-#X text 112 256 coordinates;
-#X obj 19 8 inlet;
-#X text 56 9 #out's outlet 0;
-#X obj 44 93 >> 8;
-#X obj 65 237 listsublist 0 2;
-#X obj 16 31 route position;
-#X obj 94 214 outlet;
-#X obj 65 257 outlet;
-#X obj 16 214 shunt 2;
-#X obj 44 72 listelement 2;
-#X obj 16 51 t a a;
-#X connect 1 0 8 0;
-#X connect 1 0 10 1;
-#X connect 3 0 7 0;
-#X connect 5 0 1 0;
-#X connect 6 0 9 0;
-#X connect 7 0 12 0;
-#X connect 10 1 6 0;
-#X connect 11 0 5 0;
-#X connect 12 0 10 0;
-#X connect 12 1 11 0;
-#X restore 366 132 pd mouse click/drag;
-#X obj 327 132 # / 2;
-#X obj 273 313 #ravel;
-#X msg 8 76 100 100;
-#X obj 217 158 shunt 2;
-#X obj 34 96 s size;
-#X obj 273 332 #fold +;
-#X obj 420 95 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 1
-;
-#X obj 334 294 @! abs;
-#X obj 402 338 #export;
-#X obj 402 300 #ravel;
-#X obj 256 220 shunt 2;
-#X obj 271 159 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0
-1;
-#X obj 334 351 #export;
-#X obj 367 94 shunt 2;
-#X obj 2 230 #greyscale_to_rgb;
-#X obj 367 113 r position;
-#N canvas 504 75 496 430 falling 0;
-#X obj 42 147 # +;
-#X text 228 286 vertical falling;
-#X obj 70 327 # / 3;
-#X obj 138 25 inlet;
-#X text 179 25 Dim[rows \, columns \, {height}];
-#X obj 43 281 #store;
-#X obj 43 260 #finished;
-#X obj 69 168 # / 3;
-#X obj 70 306 # / 3;
-#X obj 42 168 # +;
-#X obj 43 306 # +;
-#X text 105 366 Dim[rows \, columns \, {height}];
-#X text 197 129 horizontal falling;
-#X obj 69 147 # / 3;
-#X obj 43 327 # +;
-#X obj 42 123 #store;
-#X obj 52 365 outlet;
-#X obj 42 104 #finished;
-#X obj 138 58 t a a;
-#X obj 133 218 t a a;
-#X obj 110 147 #convolve ( 1 2 # 1 1 0 ) \, fold inv+;
-#X obj 110 168 #convolve ( 1 3 # 1 1 0 ) \, fold inv+;
-#X obj 111 306 #convolve ( 2 1 # 1 1 ) \, fold inv+;
-#X obj 111 327 #convolve ( 3 1 # 1 1 0 ) \, fold inv+;
-#X connect 0 0 9 0;
-#X connect 2 0 14 1;
-#X connect 3 0 18 0;
-#X connect 5 0 10 0;
-#X connect 6 0 5 0;
-#X connect 7 0 9 1;
-#X connect 8 0 10 1;
-#X connect 9 0 19 0;
-#X connect 10 0 14 0;
-#X connect 13 0 0 1;
-#X connect 14 0 16 0;
-#X connect 15 0 0 0;
-#X connect 17 0 15 0;
-#X connect 18 0 17 0;
-#X connect 18 1 15 1;
-#X connect 18 1 20 0;
-#X connect 18 1 21 0;
-#X connect 19 0 6 0;
-#X connect 19 1 5 1;
-#X connect 19 1 22 0;
-#X connect 19 1 23 0;
-#X connect 20 0 13 0;
-#X connect 21 0 7 0;
-#X connect 22 0 8 0;
-#X connect 23 0 2 0;
-#X restore 217 178 pd falling sand;
-#X obj 2 373 #scale_by 2;
-#X obj 2 170 shunt 3;
-#X obj 2 452 print;
-#X obj 197 65 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1
--1;
-#X text 253 46 auto;
-#N canvas 292 75 480 513 falling 0;
-#X obj 105 177 # div 5;
-#X text 292 85 horizontal falling;
-#X obj 42 118 #store;
-#X obj 153 58 fork;
-#X obj 171 230 fork;
-#X obj 46 392 outlet;
-#X obj 42 147 # +;
-#X obj 46 307 # +;
-#X obj 46 281 #store;
-#X obj 42 91 #finished;
-#X obj 42 176 # +;
-#X obj 48 260 #finished;
-#X text 88 17 Dim[rows \, columns \, {height}];
-#X text 293 262 vertical falling;
-#X obj 106 336 # div 5;
-#X obj 102 148 # div 5;
-#X obj 46 336 # +;
-#X obj 103 307 # div 5;
-#X text 101 392 Dim[rows \, columns \, {height}];
-#X obj 47 17 inlet;
-#X obj 162 149 #convolve (1 2 # 1 1) \, fold inv+ \, seed -3;
-#X obj 166 177 #convolve (1 3 # 1 1 0) \, fold inv+ \, seed -3;
-#X obj 170 305 #convolve (2 1 # 1 1) \, fold inv+ \, seed -3;
-#X obj 171 335 #convolve (3 1 # 1 1 0) \, fold inv+ \, seed -3;
-#X connect 0 0 10 1;
-#X connect 2 0 6 0;
-#X connect 3 0 9 0;
-#X connect 3 1 2 1;
-#X connect 3 1 20 0;
-#X connect 3 1 21 0;
-#X connect 4 0 11 0;
-#X connect 4 1 8 1;
-#X connect 4 1 22 0;
-#X connect 4 1 23 0;
-#X connect 6 0 10 0;
-#X connect 7 0 16 0;
-#X connect 8 0 7 0;
-#X connect 9 0 2 0;
-#X connect 10 0 4 0;
-#X connect 11 0 8 0;
-#X connect 14 0 16 1;
-#X connect 15 0 6 1;
-#X connect 16 0 5 0;
-#X connect 17 0 7 1;
-#X connect 19 0 3 0;
-#X connect 20 0 15 0;
-#X connect 21 0 0 0;
-#X connect 22 0 17 0;
-#X connect 23 0 14 0;
-#X restore 262 198 pd falling sand ( 2 );
-#N canvas 525 58 536 584 finger 0;
-#X obj 192 7 inlet;
-#X obj 36 78 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 63 267 # / 20;
-#X obj 74 327 # *;
-#X obj 12 436 #store;
-#X obj 14 18 inlet;
-#X obj 73 309 #redim ( 64 64 1 );
-#X obj 279 51 loadbang;
-#X obj 13 38 fork;
-#X obj 63 247 #fold +;
-#X text 22 159 "dig" the sphere into the sand;
-#X text 240 104 compute a halfsphere;
-#X obj 192 29 # - 32;
-#X obj 63 225 #ravel;
-#N canvas 1 58 415 284 make 0;
-#X obj 28 129 #fold +;
-#X obj 28 66 # -;
-#X obj 28 108 @! sq;
-#X obj 28 45 #for ( -32 -32 ) ( 32 32 ) ( 1 1 );
-#X obj 28 171 outlet;
-#X obj 28 87 # << 2;
-#X obj 28 150 @! sqrt;
-#X text 63 21 bang;
-#X obj 27 20 inlet;
-#X text 98 92 make distance map;
-#X connect 0 0 6 0;
-#X connect 1 0 5 0;
-#X connect 2 0 0 0;
-#X connect 3 0 1 0;
-#X connect 5 0 2 0;
-#X connect 6 0 4 0;
-#X connect 8 0 3 0;
-#X restore 259 74 pd make distance map with center 32;
-#X obj 12 480 outlet;
-#X obj 260 53 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X text 83 293 find out how high the compensation torus should be;
-#X obj 73 349 # div 256;
-#X obj 36 58 route grid;
-#X obj 12 417 #finished;
-#X obj 13 206 t a a;
-#N canvas 669 471 315 202 halfsphere 0;
-#X obj 45 19 inlet distancemap;
-#X obj 45 143 outlet image;
-#X obj 46 102 @! sqrt;
-#X obj 46 122 #outer ignore ( 0 );
-#X obj 46 62 # inv+ 200;
-#X text 121 63 16 * radius^2;
-#X obj 46 41 @! sq;
-#X obj 46 82 # max 0;
-#X connect 0 0 6 0;
-#X connect 2 0 3 0;
-#X connect 3 0 1 0;
-#X connect 4 0 7 0;
-#X connect 6 0 4 0;
-#X connect 7 0 2 0;
-#X restore 126 120 pd halfsphere;
-#X obj 13 141 #draw_image - ( 1 1 1 # ) ( 0 0 );
-#X obj 12 457 #draw_image - ( 1 1 1 # ) ( 0 0 );
-#N canvas 0 0 323 279 torus 0;
-#X obj 59 26 inlet;
-#X obj 56 185 outlet;
-#X obj 57 97 # inv+ 200;
-#X obj 57 76 @! sq;
-#X text 102 54 toroidal radius;
-#X obj 57 162 #outer ignore ( 0 );
-#X obj 56 120 # max 0;
-#X text 138 99 16*radius^2;
-#X obj 57 141 @! sqrt;
-#X obj 57 56 # - 20;
-#X connect 0 0 9 0;
-#X connect 2 0 6 0;
-#X connect 3 0 2 0;
-#X connect 5 0 1 0;
-#X connect 6 0 8 0;
-#X connect 8 0 5 0;
-#X connect 9 0 3 0;
-#X restore 296 346 pd torus;
-#X text 65 475 put extra sand as a ring around the hole;
-#X connect 0 0 12 0;
-#X connect 1 0 16 0;
-#X connect 2 0 6 0;
-#X connect 3 0 18 0;
-#X connect 4 0 24 0;
-#X connect 5 0 8 0;
-#X connect 6 0 3 0;
-#X connect 7 0 14 0;
-#X connect 8 0 23 0;
-#X connect 8 1 19 0;
-#X connect 9 0 2 0;
-#X connect 12 0 23 2;
-#X connect 12 0 24 2;
-#X connect 13 0 9 0;
-#X connect 14 0 22 0;
-#X connect 14 0 25 0;
-#X connect 16 0 14 0;
-#X connect 18 0 24 1;
-#X connect 19 0 1 0;
-#X connect 20 0 4 0;
-#X connect 21 0 20 0;
-#X connect 21 1 13 0;
-#X connect 21 1 4 1;
-#X connect 22 0 23 1;
-#X connect 23 0 21 0;
-#X connect 24 0 15 0;
-#X connect 25 0 3 1;
-#X restore 260 132 pd finger;
-#X obj 310 266 # -;
-#X obj 334 313 #ravel;
-#X msg 2 56 240 320;
-#X obj 402 319 #fold +;
-#X obj 2 211 # + 128;
-#X obj 55 344 #greyscale_to_rgb;
-#X obj 270 115 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0
-1;
-#X text 325 220 enable stats;
-#X text 239 391 checking for conservation of amounts of sand;
-#X msg 2 115 \$1 \$2 1 # 0;
-#N canvas 56 229 441 265 lighting 0;
-#X obj 27 209 outlet;
-#X obj 27 180 # +;
-#X obj 17 9 inlet;
-#X obj 99 142 #convolve ( 2 1 # 1 1 ) \, op inv+;
-#X obj 100 65 #convolve ( 1 2 # 1 1 ) \, op inv+;
-#X obj 103 39 r size;
-#X obj 27 39 #redim ( );
-#X obj 27 79 #finished;
-#X obj 27 120 #store;
-#X obj 25 149 # + 128;
-#X obj 27 59 t a a;
-#X text 163 47 colourize the horizontal differences;
-#X text 113 123 colourize the vertical differences;
-#X obj 100 86 #outer & ( -1 0 0 );
-#X obj 99 164 #outer & ( -1 -1 0 );
-#X connect 1 0 0 0;
-#X connect 2 0 6 0;
-#X connect 3 0 14 0;
-#X connect 4 0 13 0;
-#X connect 5 0 6 1;
-#X connect 6 0 10 0;
-#X connect 7 0 8 0;
-#X connect 8 0 9 0;
-#X connect 9 0 1 0;
-#X connect 10 0 7 0;
-#X connect 10 1 4 0;
-#X connect 10 1 3 0;
-#X connect 13 0 8 1;
-#X connect 14 0 1 1;
-#X restore 26 268 pd lighting;
-#X obj 2 433 fps detailed;
-#X obj 309 221 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0
-1;
-#X text 213 65 step;
-#X obj 55 144 vradio 15 1 0 3 empty empty empty 0 -6 0 8 -241291 -1
--1 2;
-#X obj 2 394 #out window;
-#X obj 273 372 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10
--262144 -1 -1 0 256;
-#X obj 334 372 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10
--262144 -1 -1 0 256;
-#X obj 402 357 nbx 8 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10
--262144 -1 -1 0 256;
-#X text 74 158 differential;
-#X text 73 143 heightmap;
-#X text 73 174 topographic;
-#X obj 152 82 t a a;
-#X obj 217 220 t a a;
-#X obj 56 325 # * 255;
-#X obj 56 306 # >= 6;
-#X obj 56 287 # & 7;
-#X obj 2 37 loadbang;
-#X text 436 95 disable finger;
-#X obj 300 244 t a a;
-#X obj 2 192 # << 2;
-#X obj 192 46 metro 20;
-#X obj -15 499 cnv 15 680 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text -7 506 GridFlow 0.8.0;
-#X text -7 506 GridFlow 0.8.0;
-#X obj -13 -25 cnv 15 680 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 0 -12 Copyright 2002 Mathieu Bouchard;
-#X text 0 -25 sand.pd;
-#X text -1 21 set size & reset;
-#X obj 2 295 #clip;
-#X obj 26 249 # << 0;
-#X connect 1 0 43 0;
-#X connect 1 1 14 0;
-#X connect 2 0 11 0;
-#X connect 3 0 22 0;
-#X connect 5 0 65 0;
-#X connect 6 0 50 0;
-#X connect 7 0 8 0;
-#X connect 8 0 13 0;
-#X connect 8 1 33 0;
-#X connect 9 0 10 0;
-#X connect 9 1 23 0;
-#X connect 10 0 33 1;
-#X connect 11 0 15 0;
-#X connect 12 0 1 0;
-#X connect 13 0 26 0;
-#X connect 13 1 57 0;
-#X connect 15 0 6 0;
-#X connect 16 0 23 1;
-#X connect 17 0 35 0;
-#X connect 18 0 52 0;
-#X connect 19 0 37 0;
-#X connect 20 1 19 0;
-#X connect 20 1 63 0;
-#X connect 21 0 13 1;
-#X connect 22 0 51 0;
-#X connect 23 0 8 1;
-#X connect 24 0 73 0;
-#X connect 25 0 9 0;
-#X connect 26 0 57 0;
-#X connect 27 0 49 0;
-#X connect 28 0 64 0;
-#X connect 28 1 74 0;
-#X connect 28 2 60 0;
-#X connect 30 0 7 0;
-#X connect 32 0 57 0;
-#X connect 33 0 13 0;
-#X connect 34 0 17 0;
-#X connect 34 0 2 0;
-#X connect 35 0 3 0;
-#X connect 36 0 1 0;
-#X connect 37 0 18 0;
-#X connect 38 0 24 0;
-#X connect 39 0 27 0;
-#X connect 40 0 8 1;
-#X connect 43 0 56 0;
-#X connect 44 0 73 0;
-#X connect 45 0 29 0;
-#X connect 46 0 20 1;
-#X connect 48 0 28 1;
-#X connect 49 0 45 0;
-#X connect 49 0 4 0;
-#X connect 56 0 28 0;
-#X connect 56 1 7 1;
-#X connect 57 0 56 0;
-#X connect 57 1 20 0;
-#X connect 58 0 39 0;
-#X connect 59 0 58 0;
-#X connect 60 0 59 0;
-#X connect 61 0 36 0;
-#X connect 63 0 34 1;
-#X connect 63 1 34 0;
-#X connect 64 0 38 0;
-#X connect 65 0 7 0;
-#X connect 73 0 27 0;
-#X connect 74 0 44 0;
diff --git a/externals/gridflow/pd_examples/saturation.pd b/externals/gridflow/pd_examples/saturation.pd
deleted file mode 100644
index d6cbda6c..00000000
--- a/externals/gridflow/pd_examples/saturation.pd
+++ /dev/null
@@ -1,81 +0,0 @@
-#N canvas 904 61 449 319 10;
-#X obj 11 117 print;
-#X obj 11 77 #out window;
-#X text 342 55 OR;
-#X text 238 30 global saturation;
-#N canvas 0 0 441 339 #saturation 0;
-#X obj 63 88 # inv+ 255;
-#X obj 14 219 # +;
-#X obj 37 47 #rgb_to_greyscale;
-#X obj 14 239 # >> 8;
-#X obj 162 146 loadbang;
-#X obj 14 158 #finished;
-#X text 68 266 keep values inside visible range;
-#X obj 14 199 # *;
-#X obj 14 178 #store;
-#X obj 37 88 # *;
-#X msg 133 146 0;
-#X obj 8 9 inlet image;
-#X obj 14 293 outlet image;
-#X obj 107 126 inlet saturation;
-#X text 230 130 0 = grey \; 256 = identity;
-#X text 40 222 mix the original picture with its greyed version;
-#X obj 37 107 t a a;
-#X obj 8 28 t a a;
-#X obj 37 67 #greyscale_to_rgb;
-#X obj 107 146 t a;
-#X obj 14 265 #clip;
-#X connect 0 0 9 1;
-#X connect 1 0 3 0;
-#X connect 2 0 18 0;
-#X connect 3 0 20 0;
-#X connect 4 0 10 0;
-#X connect 5 0 8 0;
-#X connect 7 0 1 0;
-#X connect 8 0 7 0;
-#X connect 9 0 16 0;
-#X connect 10 0 19 0;
-#X connect 11 0 17 0;
-#X connect 13 0 19 0;
-#X connect 16 0 5 0;
-#X connect 16 1 1 1;
-#X connect 17 0 8 1;
-#X connect 17 1 2 0;
-#X connect 18 0 9 0;
-#X connect 19 0 7 1;
-#X connect 19 0 0 0;
-#X connect 20 0 12 0;
-#X restore 11 53 pd #saturation;
-#X obj 11 98 fps detailed;
-#X text 203 68 per-channel saturation;
-#X msg 194 25 0;
-#X obj 194 4 loadbang;
-#X obj 197 46 hsl 137 15 -256 512 0 0 empty empty empty -2 -6 0 8 -260818
--128992 -1 4533 1;
-#X floatatom 155 47 5 0 0 0 - - -;
-#X obj 11 -26 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1
-;
-#X obj 11 3 metro 33.3667;
-#X obj 11 30 #in teapot.png;
-#X obj 147 95 #color -256 512 1;
-#X msg 147 69 3 # \$1;
-#X obj -16 -85 cnv 15 450 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text -3 -72 Copyright 2002 Mathieu Bouchard;
-#X obj -15 203 cnv 15 450 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text -7 210 GridFlow 0.8.0;
-#X text -7 210 GridFlow 0.8.0;
-#X text -3 -85 saturation.pd;
-#X connect 1 0 5 0;
-#X connect 4 0 1 0;
-#X connect 5 0 0 0;
-#X connect 7 0 9 0;
-#X connect 8 0 7 0;
-#X connect 9 0 10 0;
-#X connect 9 0 15 0;
-#X connect 11 0 12 0;
-#X connect 12 0 13 0;
-#X connect 13 0 4 0;
-#X connect 14 0 4 1;
-#X connect 15 0 14 0;
diff --git a/externals/gridflow/pd_examples/scratch_video.pd b/externals/gridflow/pd_examples/scratch_video.pd
deleted file mode 100644
index d7a38e7e..00000000
--- a/externals/gridflow/pd_examples/scratch_video.pd
+++ /dev/null
@@ -1,121 +0,0 @@
-#N canvas 503 45 580 510 10;
-#X obj 109 94 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1
-;
-#X obj 109 352 listelement 1;
-#X floatatom 109 371 5 0 0 0 - - -;
-#X floatatom 132 279 5 0 0 0 - - -;
-#X obj 109 333 route position;
-#X obj 109 256 #in;
-#X msg 142 202 open /home/alx/Documents/images/videos/bus_1.mov;
-#X obj 112 410 hsl 128 15 1 320 0 0 empty empty empty -2 -6 0 8 -260818
--1 -1 0 1;
-#X obj -13 0 cnv 15 580 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj -16 477 cnv 15 580 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 16 484 GridFlow 0.8.0;
-#X text 16 484 GridFlow 0.8.0;
-#X text 0 13 Copyright 2003 Alexandre Castonguay;
-#X text 2 52 Use the mouse position to scratch the video \, a touchscreen
-works well.;
-#N canvas 0 0 450 300 decide_framerate 0;
-#X obj 6 56 - 160;
-#X floatatom 6 80 5 0 0 0 - - -;
-#X obj 55 122 hsl 128 15 20 150 0 0 empty empty empty -2 -6 0 8 -24198
--1 -1 0 1;
-#X obj 6 99 abs;
-#X floatatom 6 142 5 0 0 0 - - -;
-#X obj 6 121 / 3;
-#X floatatom 6 226 5 0 0 0 - - -;
-#X obj 6 184 abs;
-#X obj 6 162 - 64;
-#X obj 6 205 + 5;
-#X obj -25 21 inlet;
-#X obj 34 263 outlet;
-#X connect 0 0 1 0;
-#X connect 1 0 3 0;
-#X connect 3 0 2 0;
-#X connect 3 0 5 0;
-#X connect 4 0 8 0;
-#X connect 5 0 4 0;
-#X connect 6 0 11 0;
-#X connect 7 0 9 0;
-#X connect 8 0 7 0;
-#X connect 9 0 6 0;
-#X connect 10 0 0 0;
-#X restore 257 409 pd decide_framerate;
-#X obj 257 433 s framerate;
-#X obj 188 92 r framerate;
-#X obj 109 314 #out window;
-#X text 176 277 <-- frame number;
-#X text 213 351 <-- get x values;
-#X text 142 219 load your own until we get a bundled video for the
-docs;
-#X text 142 232 this one is 320 x 240;
-#N canvas 94 214 571 216 frame_count 0;
-#X msg 16 -5 1;
-#X floatatom 16 50 5 0 0 0 - - -;
-#X obj 48 30 float \$1;
-#X obj 16 -24 shunt 2;
-#X obj 16 30 + 1;
-#X msg 60 -5 -1;
-#X msg 111 49 0;
-#X obj 16 -54 inlet;
-#X obj 111 30 inlet;
-#X obj 16 102 outlet;
-#X floatatom 100 -38 5 0 0 0 - - -;
-#X obj 100 -22 > 160;
-#X text 145 -23 <-- is the direction left or right on a width of 320
-pixels;
-#X text 145 49 <-- reset;
-#X obj 100 -57 r position;
-#X obj 100 -3 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
-;
-#X connect 0 0 4 0;
-#X connect 1 0 2 0;
-#X connect 1 0 9 0;
-#X connect 2 0 4 1;
-#X connect 3 0 0 0;
-#X connect 3 1 5 0;
-#X connect 4 0 1 0;
-#X connect 5 0 4 0;
-#X connect 6 0 1 0;
-#X connect 7 0 3 0;
-#X connect 8 0 6 0;
-#X connect 10 0 11 0;
-#X connect 11 0 15 0;
-#X connect 14 0 10 0;
-#X connect 15 0 3 1;
-#X restore 109 168 pd frame_count;
-#X obj 202 141 bng 15 250 50 0 empty empty empty 0 -6 0 8 -241291 -1
--1;
-#X text 226 140 <-- reset;
-#X obj 93 433 s position;
-#X msg 314 265 loop 1;
-#X obj 206 301 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 330 146 r loopit;
-#X obj 236 299 print loopit;
-#X obj 109 111 metro 100.33;
-#X obj 91 257 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1
--1;
-#X text 0 0 scratch_video.pd;
-#X connect 0 0 30 0;
-#X connect 1 0 2 0;
-#X connect 2 0 7 0;
-#X connect 2 0 14 0;
-#X connect 2 0 25 0;
-#X connect 4 0 1 0;
-#X connect 5 0 17 0;
-#X connect 5 1 3 0;
-#X connect 5 1 27 0;
-#X connect 6 0 5 0;
-#X connect 14 0 15 0;
-#X connect 16 0 30 1;
-#X connect 17 0 4 0;
-#X connect 22 0 5 0;
-#X connect 23 0 22 1;
-#X connect 26 0 5 0;
-#X connect 27 0 29 0;
-#X connect 30 0 22 0;
-#X connect 31 0 5 0;
diff --git a/externals/gridflow/pd_examples/spectrogram.pd b/externals/gridflow/pd_examples/spectrogram.pd
deleted file mode 100644
index fb6730d2..00000000
--- a/externals/gridflow/pd_examples/spectrogram.pd
+++ /dev/null
@@ -1,108 +0,0 @@
-#N canvas 370 65 588 508 10;
-#X msg 147 208 reset;
-#X obj 21 50 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1;
-#X obj 297 54 adc~;
-#X obj 38 170 tabread4 array1;
-#X obj 21 69 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1
-;
-#X obj 332 55 table array1 1024;
-#X obj 208 212 loadbang;
-#X obj 191 214 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#N canvas 0 0 306 167 analysis 0;
-#X obj 24 -205 inlet~;
-#X obj 26 -135 tabsend~ array1;
-#X obj 24 -184 rfft~;
-#X obj 25 -157 expr~ sqrt($v1*$v1+$v2*$v2)/64;
-#X obj 148 -198 block~ 1024;
-#X connect 0 0 2 0;
-#X connect 2 0 3 0;
-#X connect 2 1 3 1;
-#X connect 3 0 1 0;
-#X restore 298 77 pd analysis;
-#X obj 284 256 vradio 15 1 0 2 empty empty empty 0 -6 0 8 -241291 -1
--1 0;
-#X obj 190 291 loadbang;
-#X obj 173 293 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 38 68 for 0 320 1;
-#X obj 38 189 * 2000;
-#X text 303 257 black stripes;
-#X text 302 270 graph;
-#X obj 38 117 / 2;
-#X text 83 189 <-- adding some extra gain;
-#X obj 81 138 exp;
-#X obj 194 136 vradio 15 1 0 2 empty empty empty 0 -6 0 8 -241291 -1
--1 0;
-#X text 216 136 linear;
-#X text 214 150 logarithmic;
-#X obj 82 117 / 51;
-#X obj 38 395 #fade;
-#X obj 130 396 loadbang;
-#X msg 79 395 16 4 1;
-#X obj 38 49 metro 23.22;
-#X text 115 117 = 1000*1024/44100;
-#X obj 38 208 #import ( 320 );
-#X obj 38 227 # *>>8;
-#X obj 38 246 #fade 2;
-#X obj 38 309 # inv+ 255;
-#X obj 113 292 #outer <;
-#X obj 113 311 # * 255;
-#X obj 113 330 #transpose;
-#X obj 38 357 #redim (120 320 1);
-#X obj 38 376 #greyscale_to_rgb;
-#X obj 38 414 #clip;
-#X obj 38 433 #scale_by 2;
-#X obj 38 452 #out window;
-#X obj 6 476 cnv 15 580 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 14 483 GridFlow 0.8.0;
-#X text 14 483 GridFlow 0.8.0;
-#X obj 6 5 cnv 15 580 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 19 5 spectrogram.pd;
-#X obj 173 310 #for 120 0 -1;
-#X obj 191 231 #for 0 320 1;
-#X obj 191 250 # + 10;
-#X text 19 18 Copyright 2004 Mathieu Bouchard;
-#X obj 38 91 shunt 2;
-#X obj 38 265 shunt 2;
-#X connect 0 0 28 0;
-#X connect 1 0 26 0;
-#X connect 2 0 8 0;
-#X connect 2 1 8 0;
-#X connect 3 0 13 0;
-#X connect 4 0 12 0;
-#X connect 6 0 7 0;
-#X connect 7 0 46 0;
-#X connect 9 0 50 1;
-#X connect 10 0 11 0;
-#X connect 11 0 45 0;
-#X connect 12 0 49 0;
-#X connect 13 0 28 0;
-#X connect 16 0 3 0;
-#X connect 18 0 3 0;
-#X connect 19 0 49 1;
-#X connect 22 0 18 0;
-#X connect 23 0 37 0;
-#X connect 24 0 25 0;
-#X connect 25 0 23 1;
-#X connect 26 0 12 0;
-#X connect 28 0 29 0;
-#X connect 29 0 30 0;
-#X connect 30 0 50 0;
-#X connect 31 0 35 0;
-#X connect 32 0 33 0;
-#X connect 33 0 34 0;
-#X connect 34 0 35 0;
-#X connect 35 0 36 0;
-#X connect 36 0 23 0;
-#X connect 37 0 38 0;
-#X connect 38 0 39 0;
-#X connect 45 0 32 1;
-#X connect 46 0 47 0;
-#X connect 47 0 29 1;
-#X connect 49 0 16 0;
-#X connect 49 1 22 0;
-#X connect 50 0 31 0;
-#X connect 50 1 32 0;
diff --git a/externals/gridflow/pd_examples/threshold.pd b/externals/gridflow/pd_examples/threshold.pd
deleted file mode 100644
index 0b90b07f..00000000
--- a/externals/gridflow/pd_examples/threshold.pd
+++ /dev/null
@@ -1,78 +0,0 @@
-#N canvas 660 79 581 531 10;
-#X obj 72 208 inv+ 0;
-#X obj 40 8 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1;
-#X obj 99 57 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 1
-;
-#X floatatom 124 224 5 0 0 0 - - -;
-#X obj 124 91 vsl 15 128 0 256 0 0 empty empty empty 0 -8 0 8 -260818
--1 -1 0 1;
-#X obj 40 67 shunt 2;
-#X text 7 104 simple per-channel threshold;
-#X text 276 53 bluescreen luma threshold;
-#X text 340 195 here we have a mask;
-#X text 320 207 (alpha as separate image);
-#X obj 257 278 @join 2;
-#X text 346 226 make a RGBA image;
-#X obj 270 88 t b a a;
-#X text 210 379 = medium blue;
-#X obj 257 221 t a a;
-#X obj 121 416 fps;
-#X floatatom 146 418 5 0 0 0 - - -;
-#X obj 40 29 metro 100;
-#X msg 70 378 240 320 3 # 0 0 170;
-#X text 279 68 with alpha channel;
-#X text 13 349 you could also load a picture;
-#X text 13 361 instead of using uniform blue;
-#X text 58 10 1000/100 = 10 fps (max) (adjustable);
-#X obj 40 48 #camera;
-#X obj -13 -45 cnv 15 580 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 0 -32 Copyright 2002 Mathieu Bouchard;
-#X obj -15 450 cnv 15 580 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text -7 457 GridFlow 0.8.0;
-#X text -7 457 GridFlow 0.8.0;
-#X text 0 -45 threshold.pd;
-#X obj 257 259 #store;
-#X obj 257 240 #finished;
-#X obj 314 145 # * 255;
-#X obj 314 126 # >=;
-#X obj 314 107 #rgb_to_greyscale;
-#X obj 70 397 #draw_image put \, alpha 1;
-#X obj 40 166 # -;
-#X obj 40 185 # max 0;
-#X obj 40 208 # ||;
-#X obj 40 227 # +;
-#X obj 40 416 #out window;
-#X text 387 -38 see also color_detect.pd;
-#X connect 0 0 38 1;
-#X connect 1 0 17 0;
-#X connect 2 0 5 1;
-#X connect 3 0 0 0;
-#X connect 3 0 33 1;
-#X connect 3 0 36 1;
-#X connect 3 0 39 1;
-#X connect 4 0 3 0;
-#X connect 5 0 36 0;
-#X connect 5 1 12 0;
-#X connect 10 0 35 1;
-#X connect 12 0 18 0;
-#X connect 12 1 14 0;
-#X connect 12 2 34 0;
-#X connect 14 0 31 0;
-#X connect 14 1 30 1;
-#X connect 15 0 16 0;
-#X connect 17 0 23 0;
-#X connect 18 0 35 0;
-#X connect 23 0 5 0;
-#X connect 30 0 10 0;
-#X connect 31 0 30 0;
-#X connect 32 0 10 1;
-#X connect 33 0 32 0;
-#X connect 34 0 33 0;
-#X connect 35 0 40 0;
-#X connect 36 0 37 0;
-#X connect 37 0 38 0;
-#X connect 38 0 39 0;
-#X connect 39 0 40 0;
-#X connect 40 0 15 0;
diff --git a/externals/gridflow/pd_examples/transform.pd b/externals/gridflow/pd_examples/transform.pd
deleted file mode 100644
index d8785933..00000000
--- a/externals/gridflow/pd_examples/transform.pd
+++ /dev/null
@@ -1,61 +0,0 @@
-#N canvas 726 225 674 481 10;
-#X obj 136 286 #remap_image;
-#X obj 136 324 #out window;
-#X obj 125 103 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 1 1
-;
-#X obj 294 376 # -;
-#X obj 294 202 t a a a;
-#X obj 356 261 # % 2;
-#X obj 356 280 # * -2;
-#X obj 356 299 # + 1;
-#X obj 316 300 # *;
-#X obj 403 230 # / 2;
-#X obj 377 167 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -261681
--1 -1 0 1;
-#X obj 316 281 # -;
-#X obj 374 190 t f;
-#X obj 316 262 # %;
-#X obj 356 242 # /;
-#X obj 186 214 #camera;
-#X obj 125 120 metro 10;
-#X obj 8 442 cnv 15 720 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text 16 449 GridFlow 0.8.0;
-#X obj 374 449 #reverse;
-#X text 293 450 see also :;
-#X obj 1 -2 cnv 15 720 15 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 4 -2 Transform.pd;
-#X obj 95 215 #in r001.jpg;
-#X obj 125 139 shunt;
-#X obj 164 140 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0
-1;
-#X text 68 32 By Mathieu Bouchard \, based on Clifford Smith's 'Transform'
-effect that is part of Fukuchi Kentaro's EffecTV : http://effectv.sourceforge.net
-;
-#X text 187 138 <-- choose from a still image or camera input;
-#X connect 0 0 1 0;
-#X connect 0 1 4 0;
-#X connect 2 0 16 0;
-#X connect 3 0 0 1;
-#X connect 4 0 3 0;
-#X connect 4 1 13 0;
-#X connect 4 2 14 0;
-#X connect 5 0 6 0;
-#X connect 6 0 7 0;
-#X connect 7 0 8 1;
-#X connect 8 0 3 1;
-#X connect 9 0 11 1;
-#X connect 10 0 12 0;
-#X connect 11 0 8 0;
-#X connect 12 0 9 0;
-#X connect 12 0 13 1;
-#X connect 12 0 14 1;
-#X connect 13 0 11 0;
-#X connect 14 0 5 0;
-#X connect 15 0 0 0;
-#X connect 16 0 24 0;
-#X connect 23 0 0 0;
-#X connect 24 0 23 0;
-#X connect 24 1 15 0;
-#X connect 25 0 24 1;
diff --git a/externals/gridflow/pd_examples/videodev_effects.pd b/externals/gridflow/pd_examples/videodev_effects.pd
deleted file mode 100644
index 36782931..00000000
--- a/externals/gridflow/pd_examples/videodev_effects.pd
+++ /dev/null
@@ -1,313 +0,0 @@
-#N canvas 522 50 597 660 10;
-#X obj 85 386 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 1
-;
-#X obj 71 138 # max 0;
-#N canvas 52 305 399 248 motion 0;
-#X obj 60 49 inlet;
-#X obj 60 72 # +;
-#X obj 60 158 outlet;
-#X msg 108 51 0;
-#X obj 60 142 fork;
-#X text 164 114 divide by 32 \, 16 \, 4;
-#X text 4 1 we do like #fade but faster (because of >>);
-#X text 4 15 feedback factors are 1/32 for red \, 1/16 for green \,
-1/8 for blue.;
-#X obj 60 114 # >> ( 5 4 2 );
-#X obj 175 85 # * ( 31 15 3 );
-#X connect 0 0 1 0;
-#X connect 1 0 8 0;
-#X connect 3 0 1 1;
-#X connect 4 0 2 0;
-#X connect 4 1 9 0;
-#X connect 8 0 4 0;
-#X connect 9 0 1 1;
-#X restore 129 207 pd motion fade;
-#X obj 27 252 shunt 2;
-#X obj 71 58 #downscale_by 2 smoothly;
-#X obj 27 387 shunt 2;
-#X obj 81 254 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 1
-;
-#X obj 86 77 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 1
-;
-#X obj 26 -36 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1
-;
-#X obj 315 250 fork;
-#X obj 27 37 shunt 2;
-#X msg 285 232 256;
-#X obj 27 463 #out window;
-#X obj 83 38 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 1
-;
-#X obj 27 504 print;
-#X obj 284 273 #for 0 256 1;
-#X floatatom 315 231 5 0 0 0 - - -;
-#N canvas 67 462 236 230 detect 0;
-#X obj 66 59 # * ( -1 -1 2 );
-#X obj 66 171 # max 0;
-#X obj 66 31 inlet;
-#X obj 66 222 #outer ignore ( 0 0 0 );
-#X obj 66 197 # min 255;
-#X obj 66 249 outlet;
-#X obj 65 82 #fold + \, seed -20;
-#X connect 0 0 6 0;
-#X connect 1 0 4 0;
-#X connect 2 0 0 0;
-#X connect 3 0 5 0;
-#X connect 4 0 3 0;
-#X connect 6 0 1 0;
-#X restore 436 225 pd detect blue;
-#X obj 71 274 #outer ignore ( 0 );
-#X obj 102 120 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -260818
--1 -1 0 1;
-#X obj 27 178 shunt 2;
-#X obj 169 324 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0
-1;
-#X obj 27 324 shunt 2;
-#X obj 27 484 fps detailed;
-#X obj 285 212 loadbang;
-#X obj 86 324 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 1
-;
-#X obj 71 296 #store;
-#N canvas 81 205 480 500 sort 0;
-#X obj 10 305 # * ( 1 0 );
-#X obj 180 260 # * 255;
-#X obj 194 331 #outer ignore ( 0 0 0 );
-#X obj 10 345 # >> 0;
-#X obj 43 432 outlet;
-#X obj 181 53 inlet;
-#X obj 225 191 # / 2;
-#X obj 10 285 #for ( 0 0 ) ( 288 352 ) ( 1 1 );
-#X obj 10 325 # +;
-#X obj 44 9 inlet;
-#X obj 242 150 # - 1;
-#X obj 121 382 # +;
-#X obj 180 238 # < 176;
-#X obj 10 369 #store;
-#X obj 97 31 #grade;
-#X obj 121 404 # >> 1;
-#X obj 283 269 # / 351;
-#X obj 97 53 shunt 2;
-#X obj 145 77 #grade;
-#X obj 112 210 #outer & ( 0 -1 );
-#X obj 121 127 inlet;
-#X text 271 128 extract width;
-#X obj 10 266 #finished;
-#X obj 283 247 # * 255;
-#X obj 96 9 #fold +;
-#X obj 97 153 shunt 4;
-#X obj 107 359 shunt 4;
-#X msg 235 126 \$2;
-#X obj 204 77 #dim;
-#X obj 44 37 t a a;
-#X msg 186 127 \$1 \$2;
-#X obj 204 97 #export_list;
-#X connect 0 0 8 0;
-#X connect 1 0 2 0;
-#X connect 2 0 4 0;
-#X connect 3 0 13 0;
-#X connect 5 0 17 1;
-#X connect 6 0 12 1;
-#X connect 7 0 0 0;
-#X connect 8 0 3 0;
-#X connect 9 0 29 0;
-#X connect 10 0 16 1;
-#X connect 11 0 15 0;
-#X connect 12 0 1 0;
-#X connect 13 0 26 0;
-#X connect 14 0 17 0;
-#X connect 15 0 4 0;
-#X connect 16 0 2 0;
-#X connect 17 0 25 0;
-#X connect 17 1 18 0;
-#X connect 18 0 25 0;
-#X connect 19 0 8 1;
-#X connect 20 0 25 1;
-#X connect 20 0 26 1;
-#X connect 22 0 7 0;
-#X connect 23 0 16 0;
-#X connect 24 0 14 0;
-#X connect 25 0 22 0;
-#X connect 25 0 19 0;
-#X connect 25 1 22 0;
-#X connect 25 1 19 0;
-#X connect 25 2 12 0;
-#X connect 25 3 23 0;
-#X connect 26 0 4 0;
-#X connect 26 1 11 0;
-#X connect 27 0 6 0;
-#X connect 27 0 10 0;
-#X connect 28 0 31 0;
-#X connect 29 0 24 0;
-#X connect 29 1 13 1;
-#X connect 29 1 28 0;
-#X connect 29 1 11 1;
-#X connect 30 0 7 1;
-#X connect 31 0 27 0;
-#X connect 31 0 30 0;
-#X restore 86 344 pd sort me out;
-#X obj 284 293 # gamma;
-#X obj 71 118 # -;
-#X obj 81 180 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 1
-;
-#X text 73 227 enable gamma correction;
-#X obj 284 255 bng 15 250 50 0 empty empty empty 0 -6 0 8 -241291 -1
--1;
-#N canvas 372 198 399 273 motion 0;
-#X obj 15 113 # << 2;
-#X obj 15 162 @! abs;
-#X obj 15 9 inlet;
-#X obj 18 80 # -;
-#X obj 70 174 # + 128;
-#X obj 15 245 outlet;
-#X obj 15 204 # min 255;
-#X obj 15 224 # max 0;
-#X obj 70 155 # << 2;
-#X obj 15 35 t a a;
-#X obj 15 134 shunt 2;
-#X obj 70 133 inlet render;
-#X obj 155 54 inlet type;
-#X obj 15 54 shunt 2;
-#X connect 0 0 10 0;
-#X connect 1 0 6 0;
-#X connect 2 0 9 0;
-#X connect 3 0 0 0;
-#X connect 4 0 6 0;
-#X connect 6 0 7 0;
-#X connect 7 0 5 0;
-#X connect 8 0 4 0;
-#X connect 9 0 13 0;
-#X connect 9 1 3 0;
-#X connect 10 0 1 0;
-#X connect 10 1 8 0;
-#X connect 11 0 10 1;
-#X connect 12 0 13 1;
-#X connect 13 0 3 1;
-#X restore 71 98 pd motion detection;
-#X obj 104 324 hradio 15 1 0 4 empty empty empty 0 -6 0 8 -241291 -1
--1 0;
-#X text 125 138 noise reduction (on find-edges only);
-#N canvas 67 462 236 230 detect 0;
-#X obj 66 171 # max 0;
-#X obj 66 31 inlet;
-#X obj 66 222 #outer ignore ( 0 0 0 );
-#X obj 66 197 # min 255;
-#X obj 66 249 outlet;
-#X obj 65 82 #fold + \, seed -20;
-#X obj 66 59 # * ( 2 -1 -1 );
-#X connect 0 0 3 0;
-#X connect 1 0 6 0;
-#X connect 2 0 4 0;
-#X connect 3 0 2 0;
-#X connect 5 0 0 0;
-#X connect 6 0 5 0;
-#X restore 436 206 pd detect red;
-#X obj 26 -8 metro 33.3667;
-#X obj 27 58 t a a;
-#X text 100 38 Smaller Picture;
-#X obj 27 78 shunt 2;
-#X obj 210 85 vradio 15 1 0 2 empty empty empty 0 -6 0 8 -241291 -1
--1 0;
-#X obj 162 416 #centroid;
-#X obj 162 437 #export_list;
-#X floatatom 164 476 5 0 0 0 - - -;
-#X obj 163 456 unpack 0 0;
-#X floatatom 228 476 5 0 0 0 - - -;
-#N canvas 639 147 477 267 crosshair 0;
-#X obj 12 224 outlet;
-#X obj 12 9 inlet;
-#X obj 95 169 # + ( 120 160 );
-#X msg 21 125 12 2 # \$1 \$2 \$1 \$3 \$2 \$3 \$2 \$4 \$3 \$4 \$3 \$3
-\$4 \$3 \$4 \$2 \$3 \$2 \$3 \$1 \$2 \$1 \$2 \$2;
-#X msg 54 95 -32 -1 1 32;
-#X obj 12 205 #draw_polygon + ( 0 170 0 );
-#X obj 175 37 #fade 8;
-#X obj 175 18 inlet;
-#X obj 170 60 #finished;
-#X connect 1 0 5 0;
-#X connect 2 0 5 2;
-#X connect 3 0 2 0;
-#X connect 4 0 3 0;
-#X connect 5 0 0 0;
-#X connect 6 0 2 1;
-#X connect 6 0 8 0;
-#X connect 7 0 6 0;
-#X connect 8 0 4 0;
-#X restore 71 417 pd crosshair;
-#X msg 127 -9 open dc1394;
-#X msg 216 -8 open mpeg file images/movies/washington_zoom_in.mpeg
-;
-#X msg 216 12 open xine images/movies/washington_zoom_in.mpeg;
-#X obj 27 16 #camera;
-#X obj 185 13 #in;
-#X obj 103 181 #fade;
-#X msg 144 181 32 16 4;
-#X obj 27 439 t a;
-#X text 230 99 emboss;
-#X text 229 85 hilite;
-#X text 109 386 designed to work with "hilite" above;
-#X obj 280 85 vradio 15 1 0 2 empty empty empty 0 -6 0 8 -241291 -1
--1 0;
-#X text 299 85 motion;
-#X text 300 99 presence;
-#X obj -15 542 cnv 15 620 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text -7 550 GridFlow 0.8.0;
-#X text -7 550 GridFlow 0.8.0;
-#X obj -13 -85 cnv 15 620 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X text 0 -72 Copyright 2002 Mathieu Bouchard;
-#X text 0 -86 videodev_effects.pd;
-#X connect 0 0 5 1;
-#X connect 1 0 20 0;
-#X connect 2 0 3 0;
-#X connect 3 0 22 0;
-#X connect 3 1 18 0;
-#X connect 4 0 38 0;
-#X connect 5 0 55 0;
-#X connect 5 1 42 0;
-#X connect 5 1 47 0;
-#X connect 6 0 3 1;
-#X connect 7 0 40 1;
-#X connect 8 0 37 0;
-#X connect 9 0 32 0;
-#X connect 9 1 28 1;
-#X connect 10 0 38 0;
-#X connect 10 1 4 0;
-#X connect 11 0 16 0;
-#X connect 12 0 23 0;
-#X connect 13 0 10 1;
-#X connect 15 0 28 0;
-#X connect 16 0 9 0;
-#X connect 18 0 26 0;
-#X connect 19 0 29 1;
-#X connect 20 0 3 0;
-#X connect 20 1 2 0;
-#X connect 21 0 27 2;
-#X connect 22 0 5 0;
-#X connect 22 1 27 0;
-#X connect 23 0 14 0;
-#X connect 24 0 11 0;
-#X connect 25 0 22 1;
-#X connect 26 0 22 0;
-#X connect 27 0 5 0;
-#X connect 28 0 26 1;
-#X connect 29 0 1 0;
-#X connect 30 0 20 1;
-#X connect 32 0 15 0;
-#X connect 33 0 29 0;
-#X connect 34 0 27 1;
-#X connect 37 0 51 0;
-#X connect 38 0 40 0;
-#X connect 40 0 20 0;
-#X connect 40 1 33 0;
-#X connect 41 0 33 1;
-#X connect 42 0 43 0;
-#X connect 42 0 47 1;
-#X connect 43 0 45 0;
-#X connect 45 0 44 0;
-#X connect 45 1 46 0;
-#X connect 47 0 55 0;
-#X connect 51 0 10 0;
-#X connect 53 0 3 0;
-#X connect 54 0 53 1;
-#X connect 55 0 12 0;
-#X connect 59 0 33 2;
diff --git a/externals/gridflow/pd_examples/waves.pd b/externals/gridflow/pd_examples/waves.pd
deleted file mode 100644
index 14dd10e5..00000000
--- a/externals/gridflow/pd_examples/waves.pd
+++ /dev/null
@@ -1,360 +0,0 @@
-#N canvas 461 0 783 699 10;
-#X obj 245 341 #greyscale_to_rgb;
-#X obj 167 66 loadbang;
-#X obj 107 85 fork;
-#X obj 241 497 print;
-#N canvas 23 304 369 368 mouse 0;
-#X text 109 189 coordinates;
-#X obj 56 189 outlet;
-#X obj 57 164 listsublist 0 2;
-#X obj 8 141 shunt 2;
-#X text 56 9 #out's outlet 0;
-#X obj 100 142 outlet;
-#X obj 41 94 >> 8;
-#X obj 41 115 != 0;
-#X obj 16 31 route position;
-#X text 154 143 is there a click?;
-#X obj 19 8 inlet;
-#X obj 16 55 fork;
-#X obj 41 73 listelement 2;
-#X connect 2 0 1 0;
-#X connect 3 1 2 0;
-#X connect 6 0 7 0;
-#X connect 7 0 5 0;
-#X connect 7 0 3 1;
-#X connect 8 0 11 0;
-#X connect 10 0 8 0;
-#X connect 11 0 3 0;
-#X connect 11 1 12 0;
-#X connect 12 0 6 0;
-#X restore 235 516 pd mouse click/drag;
-#X obj 10 49 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1;
-#N canvas 637 335 413 236 lighting 0;
-#X obj 56 203 outlet;
-#X obj 17 9 inlet;
-#X text 91 65 produce red/cyan from horiz differences;
-#X text 64 123 produce white/black from vertical differences;
-#X obj 56 177 # +;
-#X obj 108 10 #dim;
-#X obj 140 10 #export_list;
-#X obj 56 9 t a a;
-#X obj 56 49 t a a;
-#X msg 141 30 \$1 \$2;
-#X obj 56 29 #redim ();
-#X obj 86 82 #convolve (1 2 #) \, op ignore \, fold inv+;
-#X obj 86 101 #outer & (-1 0 0);
-#X obj 56 139 #convolve (2 1 #) \, op ignore \, fold inv+;
-#X obj 56 158 #outer & (-1 -1 0);
-#X connect 1 0 7 0;
-#X connect 4 0 0 0;
-#X connect 5 0 6 0;
-#X connect 6 0 9 0;
-#X connect 7 0 10 0;
-#X connect 7 1 5 0;
-#X connect 8 0 13 0;
-#X connect 8 1 11 0;
-#X connect 9 0 10 1;
-#X connect 10 0 8 0;
-#X connect 11 0 12 0;
-#X connect 12 0 4 1;
-#X connect 13 0 14 0;
-#X connect 14 0 4 0;
-#X restore 235 362 pd lighting;
-#X obj 235 535 # / 2;
-#X msg 107 104 \$1 \$2 1 # 0;
-#N canvas 137 251 392 303 finger 0;
-#X obj 149 39 #redim ( 4 2 );
-#X obj 71 16 inlet;
-#X obj 149 20 inlet;
-#X obj 71 217 outlet;
-#X obj 149 158 # +;
-#X obj 177 157 # *;
-#X msg 177 137 0 0 0 1 1 1 1 0;
-#X obj 193 79 inlet size;
-#X text 291 137 square or rect;
-#X obj 177 112 #finished;
-#X obj 70 195 #draw_polygon put ( 1000 );
-#X connect 0 0 4 0;
-#X connect 1 0 10 0;
-#X connect 2 0 0 0;
-#X connect 4 0 10 2;
-#X connect 5 0 4 1;
-#X connect 6 0 5 0;
-#X connect 7 0 9 0;
-#X connect 7 0 5 1;
-#X connect 9 0 6 0;
-#X connect 10 0 3 0;
-#X restore 206 634 pd finger;
-#X obj 141 85 s size;
-#X obj 235 438 #scale_by 2;
-#X obj 10 168 #store;
-#N canvas 53 323 453 223 wave 0;
-#X obj 26 20 inlet;
-#X obj 28 182 outlet;
-#X text 70 137 time differential;
-#X text 81 50 space differential: (d/dx)^2 + (d/dy)^2;
-#X text 71 8 Recurrence equation for propagation of oscillations;
-#X obj 28 137 # -;
-#X obj 54 102 # >> 4;
-#X obj 28 158 # *>>8 242;
-#X text 105 159 amortizing by ~5.5%;
-#X obj 24 46 t a a;
-#X obj 54 81 #convolve (3 3 # 1 4 1 4 0 4) \, seed 8;
-#X connect 0 0 9 0;
-#X connect 5 0 7 0;
-#X connect 6 0 5 0;
-#X connect 7 0 1 0;
-#X connect 9 0 5 1;
-#X connect 9 1 10 0;
-#X connect 10 0 6 0;
-#X restore 10 206 pd wave equation;
-#X obj 162 634 t a;
-#X obj 107 123 t a;
-#X obj 245 317 # >> 1;
-#X obj 36 85 s metro;
-#X msg 107 66 240 320;
-#X text 491 65 (Best complemented with a touchscreen);
-#X obj 341 244 vradio 15 1 0 3 empty empty empty 0 -6 0 8 -262144 -258699
--1 0;
-#X text 359 259 height greys;
-#X obj 294 205 vradio 15 1 0 2 empty empty empty 0 -6 0 8 -262144 -258699
--1 0;
-#X text 312 204 plain;
-#X text 312 220 line-art;
-#X text 309 153 smooth;
-#X obj 292 153 vradio 15 1 0 2 empty empty empty 0 -6 0 8 -262144 -258699
--1 0;
-#X text 310 167 raw;
-#X obj 417 503 hradio 18 1 1 4 empty empty _1__2__3__4_ 0 -4 0 8 -262144
--258699 -1 0;
-#X text 415 482 scale by...;
-#X obj 417 523 + 1;
-#X obj 573 105 loadbang;
-#X obj 573 276 spigot;
-#X obj 620 277 tgl 15 0 empty empty empty 18 8 0 8 -241291 -1 -62784
-0 1;
-#X obj 573 256 r metro;
-#N canvas 242 284 365 231 line-art 0;
-#X obj 32 123 # << 8;
-#X obj 32 37 inlet;
-#X obj 32 145 outlet;
-#X text 146 31 double-thresholding;
-#X text 146 114 else becomes 0;
-#X obj 32 82 # min 1;
-#X obj 32 103 # max -1;
-#X obj 32 60 # / 3;
-#X text 146 85 < -3 becomes -256;
-#X text 146 100 > +3 becomes +256;
-#X connect 0 0 2 0;
-#X connect 1 0 7 0;
-#X connect 5 0 6 0;
-#X connect 6 0 0 0;
-#X connect 7 0 5 0;
-#X restore 260 243 pd line-art;
-#X text 628 129 Background colour;
-#X text 637 277 enable video;
-#X text 357 244 four-colour emboss;
-#X obj 325 562 tgl 15 1 empty empty empty 0 -6 0 8 -241291 -1 -1 1
-1;
-#X obj 278 542 r metro;
-#X text 342 561 rain;
-#X obj 235 204 # >> 2;
-#X text 388 36 Originally made for Alexandre Castonguay's "DIGITALE"
-;
-#X text 505 50 But suitable for a lot more uses :-);
-#X msg 573 124 3 # 128;
-#X obj 573 143 #color;
-#X obj 235 223 shunt 2;
-#X obj 235 166 shunt 2;
-#X obj 349 618 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10
--262131 -1 -1 2 256;
-#X obj 349 632 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10
--262131 -1 -1 2 256;
-#X obj 235 400 # +;
-#X obj 372 449 #store;
-#X obj 396 381 shunt 2;
-#X obj 452 376 vradio 15 1 0 2 empty empty empty 0 -6 0 8 -262144 -258699
--1 0;
-#X text 470 375 plain;
-#X text 470 392 refraction;
-#X obj 235 381 t a;
-#N canvas 203 363 443 300 heightmap2indexmap 0;
-#X obj 48 220 outlet;
-#X obj 9 8 inlet;
-#X obj 48 143 # +;
-#X obj 100 9 #dim;
-#X obj 132 9 #export_list;
-#X obj 48 8 t a a;
-#X obj 48 48 t a a;
-#X msg 132 28 \$1 \$2;
-#X obj 48 201 # +;
-#X obj 90 181 loadbang;
-#X obj 73 181 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 48 162 # >> 1;
-#X obj 78 67 #convolve (1 2 #) \, op ignore \, fold inv+;
-#X obj 78 86 #outer & (-1 0);
-#X obj 48 105 #convolve (2 1 #) \, op ignore \, fold inv+;
-#X obj 48 124 #outer & (0 -1);
-#X obj 73 201 #for (0 0) (240 320) (1 1);
-#X obj 48 28 #redim ();
-#X connect 1 0 5 0;
-#X connect 2 0 11 0;
-#X connect 3 0 4 0;
-#X connect 4 0 7 0;
-#X connect 5 0 17 0;
-#X connect 5 1 3 0;
-#X connect 6 0 14 0;
-#X connect 6 1 12 0;
-#X connect 7 0 17 1;
-#X connect 8 0 0 0;
-#X connect 9 0 16 0;
-#X connect 10 0 16 0;
-#X connect 11 0 8 0;
-#X connect 12 0 13 0;
-#X connect 13 0 2 1;
-#X connect 14 0 15 0;
-#X connect 15 0 2 0;
-#X connect 16 0 8 1;
-#X connect 17 0 6 0;
-#X restore 372 430 pd heightmap2indexmap;
-#X obj -8 82 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1
-;
-#X obj 372 411 spigot;
-#X text 359 274 no reflection;
-#X obj 235 286 shunt 3;
-#X obj 235 243 t a;
-#X obj 293 317 # put 0;
-#X obj 162 615 shunt 2;
-#X obj 206 596 shunt 2;
-#X obj 10 66 metro 33.3667;
-#X obj 10 187 shunt 2;
-#X text 80 188 freeze time;
-#X obj 63 188 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 1
-;
-#X obj 132 123 r feedback;
-#X obj 162 653 s feedback;
-#X obj 10 226 t a;
-#X obj -13 5 cnv 15 780 30 empty empty empty 20 12 0 14 -233017 -66577
-0;
-#X obj -15 671 cnv 15 780 30 empty empty empty 20 12 0 14 -200249 -66577
-0;
-#X text -7 679 GridFlow 0.8.0;
-#X text -7 679 GridFlow 0.8.0;
-#X text 0 4 waves.pd;
-#X obj 573 296 #camera;
-#X obj 555 276 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1
--1;
-#X obj 573 315 spigot;
-#X obj 620 316 tgl 15 0 empty empty empty 18 8 0 8 -241291 -1 -62784
-0 1;
-#X text 637 315 test camera output;
-#X obj 10 85 t b;
-#X obj 278 561 spigot;
-#X obj 620 334 sel 0 1;
-#X msg 642 353 open window;
-#X obj 573 334 #out;
-#X msg 620 372 close;
-#X obj 241 478 fps detailed \, period 2;
-#X obj 574 226 #in;
-#X msg 574 207 load r001.jpg;
-#X obj 324 580 r size;
-#X obj 278 580 #store;
-#X obj 278 599 # rand;
-#X obj 235 457 #out window;
-#X obj 235 419 #clip;
-#X obj 235 185 #convolve (2 2 #) \, op ignore;
-#X obj 349 651 #pack 2;
-#X text 0 18 Copyright 2003 \, 2004 \, 2005 Mathieu Bouchard;
-#X connect 0 0 57 0;
-#X connect 1 0 18 0;
-#X connect 2 0 8 0;
-#X connect 2 1 10 0;
-#X connect 4 0 7 0;
-#X connect 4 1 66 0;
-#X connect 5 0 67 0;
-#X connect 6 0 57 0;
-#X connect 7 0 9 1;
-#X connect 8 0 15 0;
-#X connect 9 0 14 0;
-#X connect 11 0 96 0;
-#X connect 12 0 68 0;
-#X connect 13 0 73 0;
-#X connect 14 0 72 0;
-#X connect 15 0 12 1;
-#X connect 15 0 48 0;
-#X connect 16 0 0 0;
-#X connect 18 0 2 0;
-#X connect 20 0 62 1;
-#X connect 22 0 47 1;
-#X connect 26 0 48 1;
-#X connect 28 0 30 0;
-#X connect 30 0 7 1;
-#X connect 30 0 11 1;
-#X connect 31 0 45 0;
-#X connect 32 0 79 0;
-#X connect 33 0 32 1;
-#X connect 34 0 32 0;
-#X connect 35 0 63 0;
-#X connect 39 0 65 1;
-#X connect 39 0 66 1;
-#X connect 39 0 85 1;
-#X connect 40 0 85 0;
-#X connect 42 0 47 0;
-#X connect 45 0 46 0;
-#X connect 46 0 53 0;
-#X connect 47 0 63 0;
-#X connect 47 1 35 0;
-#X connect 48 0 98 0;
-#X connect 48 1 47 0;
-#X connect 49 0 99 0;
-#X connect 50 0 99 1;
-#X connect 51 0 97 0;
-#X connect 52 0 51 1;
-#X connect 53 0 51 1;
-#X connect 53 1 52 1;
-#X connect 54 0 53 1;
-#X connect 54 0 60 1;
-#X connect 57 0 51 0;
-#X connect 58 0 52 0;
-#X connect 59 0 84 0;
-#X connect 60 0 58 0;
-#X connect 62 0 6 0;
-#X connect 62 1 16 0;
-#X connect 62 2 64 0;
-#X connect 63 0 62 0;
-#X connect 63 0 60 0;
-#X connect 64 0 0 0;
-#X connect 65 0 14 0;
-#X connect 65 1 9 0;
-#X connect 66 0 65 1;
-#X connect 67 0 84 0;
-#X connect 68 0 13 0;
-#X connect 68 1 73 0;
-#X connect 70 0 68 1;
-#X connect 71 0 15 0;
-#X connect 73 0 65 0;
-#X connect 79 0 53 0;
-#X connect 79 0 81 0;
-#X connect 80 0 79 0;
-#X connect 81 0 88 0;
-#X connect 82 0 81 1;
-#X connect 82 0 86 0;
-#X connect 84 0 17 0;
-#X connect 84 0 12 0;
-#X connect 85 0 94 0;
-#X connect 86 0 89 0;
-#X connect 86 1 87 0;
-#X connect 87 0 88 0;
-#X connect 89 0 88 0;
-#X connect 90 0 3 0;
-#X connect 91 0 53 1;
-#X connect 92 0 91 0;
-#X connect 93 0 94 1;
-#X connect 94 0 95 0;
-#X connect 95 0 9 1;
-#X connect 96 0 4 0;
-#X connect 96 0 90 0;
-#X connect 97 0 11 0;
-#X connect 98 0 42 0;
-#X connect 99 0 9 2;
diff --git a/externals/gridflow/pd_help/@!.pd b/externals/gridflow/pd_help/@!.pd
deleted file mode 100644
index c52fe904..00000000
--- a/externals/gridflow/pd_help/@!.pd
+++ /dev/null
@@ -1,65 +0,0 @@
-#N canvas 301 131 593 440 10;
-#X obj 18 145 @! abs;
-#X obj 18 178 @export;
-#X obj 133 177 @export;
-#X obj 133 144 @! rand;
-#X obj 249 178 @export;
-#X obj 249 145 @! sqrt;
-#X floatatom 18 94 5 0 0 0 - - -;
-#X obj 364 144 @! sq;
-#X obj 364 178 @export;
-#X text 19 325 inlet: grid | outlet: grid;
-#X text 15 241 absolute value;
-#X text 363 241 A * A;
-#X text 14 14 the one-input operators: @! abs \, @! rand \, @! sqrt
-\, @! sq;
-#X obj 18 111 @import ( 1 );
-#X floatatom 133 94 5 0 0 0 - - -;
-#X obj 133 111 @import ( 1 );
-#X floatatom 249 95 5 0 0 0 - - -;
-#X obj 249 112 @import ( 1 );
-#X floatatom 364 95 5 0 0 0 - - -;
-#X obj 364 112 @import ( 1 );
-#X text 132 242 random non-;
-#X text 133 257 negative number;
-#X text 133 273 below A;
-#X text 246 325 A refers to the left inlet;
-#X text 250 257 of A rounded;
-#X text 249 242 sqare root;
-#X text 250 273 downwards;
-#X obj 115 94 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 18 197 route int;
-#X obj 133 196 route int;
-#X obj 249 197 route int;
-#X obj 364 197 route int;
-#X floatatom 18 217 5 0 0 0 - - -;
-#X floatatom 133 216 5 0 0 0 - - -;
-#X floatatom 249 217 5 0 0 0 - - -;
-#X floatatom 364 217 5 0 0 0 - - -;
-#X obj 94 376 @ +;
-#X text 19 371 see also:;
-#X text 514 13 gridflow;
-#X text 38 37 computes one of the four basic one-input operators;
-#X text 36 51 on each value of a grid;
-#X connect 0 0 1 0;
-#X connect 1 0 28 0;
-#X connect 2 0 29 0;
-#X connect 3 0 2 0;
-#X connect 4 0 30 0;
-#X connect 5 0 4 0;
-#X connect 6 0 13 0;
-#X connect 7 0 8 0;
-#X connect 8 0 31 0;
-#X connect 13 0 0 0;
-#X connect 14 0 15 0;
-#X connect 15 0 3 0;
-#X connect 16 0 17 0;
-#X connect 17 0 5 0;
-#X connect 18 0 19 0;
-#X connect 19 0 7 0;
-#X connect 27 0 14 0;
-#X connect 28 0 32 0;
-#X connect 29 0 33 0;
-#X connect 30 0 34 0;
-#X connect 31 0 35 0;
diff --git a/externals/gridflow/pd_help/@.pd b/externals/gridflow/pd_help/@.pd
deleted file mode 100644
index 8c891d2d..00000000
--- a/externals/gridflow/pd_help/@.pd
+++ /dev/null
@@ -1,115 +0,0 @@
-#N canvas 662 216 748 501 10;
-#X obj 19 157 @ +;
-#X obj 210 158 @ -;
-#X text 50 161 A + B;
-#X text 241 162 A - B;
-#X obj 402 158 @ inv+;
-#X text 458 161 B - A;
-#X obj 19 273 @ *;
-#X text 50 276 A * B;
-#X text 240 272 A / B;
-#X text 240 283 rounded towards zero;
-#X obj 210 274 @ /;
-#X obj 402 272 @ inv*;
-#X text 455 279 rounded towards zero;
-#X text 457 269 B / A;
-#X obj 20 390 @ %;
-#X obj 211 391 @ swap%;
-#X obj 403 392 @ rem;
-#X text 50 393 A % B \, modulo;
-#X text 270 395 B % A \, modulo;
-#X text 452 394 A % B \, remainder;
-#X floatatom 509 52 5 0 0 0 - - -;
-#X obj 509 76 @import ( 1 );
-#X floatatom 621 52 5 0 0 0 - - -;
-#X obj 621 76 @import ( 1 );
-#X obj 19 130 r l;
-#X obj 44 130 r r;
-#X obj 210 131 r l;
-#X obj 235 131 r r;
-#X obj 402 131 r l;
-#X obj 427 131 r r;
-#X obj 19 246 r l;
-#X obj 44 246 r r;
-#X obj 210 247 r l;
-#X obj 235 247 r r;
-#X obj 402 244 r l;
-#X obj 427 244 r r;
-#X obj 20 361 r l;
-#X obj 45 361 r r;
-#X obj 211 362 r l;
-#X obj 236 362 r r;
-#X obj 403 363 r l;
-#X obj 428 363 r r;
-#X obj 509 96 s l;
-#X obj 621 97 s r;
-#X floatatom 19 204 5 0 0 0 - - -;
-#X obj 19 185 @export_list;
-#X floatatom 210 204 5 0 0 0 - - -;
-#X obj 210 185 @export_list;
-#X floatatom 402 204 5 0 0 0 - - -;
-#X obj 402 185 @export_list;
-#X text 14 14 the two-input operators: *whoa \, there's a lot of them*
-;
-#X floatatom 19 320 5 0 0 0 - - -;
-#X obj 19 301 @export_list;
-#X floatatom 210 320 5 0 0 0 - - -;
-#X obj 210 301 @export_list;
-#X floatatom 402 320 5 0 0 0 - - -;
-#X obj 402 301 @export_list;
-#X floatatom 20 440 5 0 0 0 - - -;
-#X obj 20 421 @export_list;
-#X floatatom 211 440 5 0 0 0 - - -;
-#X obj 211 421 @export_list;
-#X floatatom 403 440 5 0 0 0 - - -;
-#X obj 403 421 @export_list;
-#X text 18 472 see also:;
-#X obj 99 476 @! abs;
-#X text 684 13 gridflow;
-#X text 14 80 angles are in hundredth of degrees \, so a full circle
-(two pi radians) is 36000 you can convert from radians to our angles
-by multiplying by 18000/pi.;
-#X text 14 54 for all of these \, A refers to the left inlet and B
-to the value on the right.;
-#X text 15 27 Consult doc/architecture.html to see all the 40 of them.
-;
-#X connect 0 0 45 0;
-#X connect 1 0 47 0;
-#X connect 4 0 49 0;
-#X connect 6 0 52 0;
-#X connect 10 0 54 0;
-#X connect 11 0 56 0;
-#X connect 14 0 58 0;
-#X connect 15 0 60 0;
-#X connect 16 0 62 0;
-#X connect 20 0 21 0;
-#X connect 21 0 42 0;
-#X connect 22 0 23 0;
-#X connect 23 0 43 0;
-#X connect 24 0 0 0;
-#X connect 25 0 0 1;
-#X connect 26 0 1 0;
-#X connect 27 0 1 1;
-#X connect 28 0 4 0;
-#X connect 29 0 4 1;
-#X connect 30 0 6 0;
-#X connect 31 0 6 1;
-#X connect 32 0 10 0;
-#X connect 33 0 10 1;
-#X connect 34 0 11 0;
-#X connect 35 0 11 1;
-#X connect 36 0 14 0;
-#X connect 37 0 14 1;
-#X connect 38 0 15 0;
-#X connect 39 0 15 1;
-#X connect 40 0 16 0;
-#X connect 41 0 16 1;
-#X connect 45 0 44 0;
-#X connect 47 0 46 0;
-#X connect 49 0 48 0;
-#X connect 52 0 51 0;
-#X connect 54 0 53 0;
-#X connect 56 0 55 0;
-#X connect 58 0 57 0;
-#X connect 60 0 59 0;
-#X connect 62 0 61 0;
diff --git a/externals/gridflow/pd_help/@apply_colormap_channelwise.pd b/externals/gridflow/pd_help/@apply_colormap_channelwise.pd
deleted file mode 100644
index 7f4cbbbf..00000000
--- a/externals/gridflow/pd_help/@apply_colormap_channelwise.pd
+++ /dev/null
@@ -1,29 +0,0 @@
-#N canvas 119 122 762 396 10;
-#X obj 19 118 @in;
-#X obj 19 239 @apply_colormap_channelwise;
-#X text 14 17 @apply_colormap_channelweb;
-#X obj 203 190 @import ( 256 3 );
-#X obj 203 168 random 255;
-#X msg 203 128 768;
-#X obj 203 148 until;
-#X text 305 108 colormap is a grid dim (2) (intensity channels);
-#X text 679 13 gridflow;
-#X msg 52 86 open bluemarble.jpg;
-#X obj 19 366 @out window;
-#X text 304 54 this object is useful for color correction. for each
-pixel it takes it apart \, looks up each part separately in the colormap
-and constructs a new pixel from that.;
-#X obj 19 40 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 19 59 fork;
-#X connect 0 0 1 0;
-#X connect 1 0 10 0;
-#X connect 3 0 1 1;
-#X connect 4 0 3 0;
-#X connect 5 0 6 0;
-#X connect 6 0 4 0;
-#X connect 9 0 0 0;
-#X connect 12 0 13 0;
-#X connect 13 0 0 0;
-#X connect 13 0 5 0;
-#X connect 13 1 9 0;
diff --git a/externals/gridflow/pd_help/@cast.pd b/externals/gridflow/pd_help/@cast.pd
deleted file mode 100644
index e8f18fa8..00000000
--- a/externals/gridflow/pd_help/@cast.pd
+++ /dev/null
@@ -1,57 +0,0 @@
-#N canvas 435 101 684 379 10;
-#X text 14 15 @cast;
-#X text 143 14 returns a grid of the same dimensions containing all
-the same values after type conversion. note that while casting to a
-smaller type \, overflowing values will be truncated.;
-#X text 626 13 gridflow;
-#X text 144 53 numbertypes are: uint8 \, int16 \, int32 \, int64 \,
-float32 \, float64. see doc/architecture.html for more info.;
-#X obj 126 90 nbx 8 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10
--262144 -1 -1 57.1416 256;
-#X obj 115 136 @pack 4 float32;
-#X obj 78 185 @store;
-#X obj 78 136 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X text 14 136 print it:;
-#X obj 136 234 @print;
-#X obj 44 210 t a a a a;
-#X obj 78 354 @print;
-#X obj 97 314 @print;
-#X obj 116 254 @cast uint8;
-#X obj 116 274 @print;
-#X obj 97 294 @cast int32;
-#X obj 78 334 @cast float64;
-#X obj 216 90 nbx 8 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10
--262144 -1 -1 145 256;
-#X obj 126 110 nbx 8 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10
--262144 -1 -1 2027 256;
-#X obj 216 110 nbx 8 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10
--262144 -1 -1 1e+10 256;
-#X obj 118 158 @redim ( 2 2 );
-#X text 182 295 normally the default;
-#X floatatom 70 87 5 0 0 0 - - -;
-#X obj 60 60 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10
--262144 -1 -1 0 256;
-#X obj 255 176 display;
-#X obj 266 217 display;
-#X obj 332 217 display;
-#X connect 4 0 5 0;
-#X connect 5 0 20 0;
-#X connect 6 0 10 0;
-#X connect 7 0 6 0;
-#X connect 10 0 16 0;
-#X connect 10 0 26 0;
-#X connect 10 1 15 0;
-#X connect 10 2 13 0;
-#X connect 10 2 25 0;
-#X connect 10 3 9 0;
-#X connect 10 3 24 0;
-#X connect 13 0 14 0;
-#X connect 15 0 12 0;
-#X connect 16 0 11 0;
-#X connect 17 0 5 1;
-#X connect 18 0 5 2;
-#X connect 19 0 5 3;
-#X connect 20 0 6 1;
-#X connect 22 0 5 0;
-#X connect 23 0 5 1;
diff --git a/externals/gridflow/pd_help/@checkers.pd b/externals/gridflow/pd_help/@checkers.pd
deleted file mode 100644
index a8de669e..00000000
--- a/externals/gridflow/pd_help/@checkers.pd
+++ /dev/null
@@ -1,13 +0,0 @@
-#N canvas 431 74 440 355 10;
-#X obj 20 47 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1
--1;
-#X obj 20 164 @checkers;
-#X obj 20 81 @for ( 0 0 ) ( 128 128 ) ( 1 1 );
-#X text 16 7 @checkers;
-#X text 216 297 see also;
-#X obj 283 301 @draw_polygon;
-#X text 354 7 gridflow;
-#X obj 20 309 @out window;
-#X connect 0 0 2 0;
-#X connect 1 0 7 0;
-#X connect 2 0 1 0;
diff --git a/externals/gridflow/pd_help/@complex_sq.pd b/externals/gridflow/pd_help/@complex_sq.pd
deleted file mode 100644
index 9adacae8..00000000
--- a/externals/gridflow/pd_help/@complex_sq.pd
+++ /dev/null
@@ -1,27 +0,0 @@
-#N canvas 301 131 637 303 10;
-#X text 14 14 @comlex_sq;
-#X obj 21 159 @complex_sq;
-#X text 96 15 this object computes the square of complex numbers. if
-seeing imaginary as Y and real as X \, then this operation squares
-the distance of a point from origin and doubles the angle between it
-and the +X half-axis clockwise. :);
-#X floatatom 21 108 5 0 0 0 - - -;
-#X obj 21 188 @export_list;
-#X floatatom 21 238 5 0 0 0 - - -;
-#X obj 21 128 @two;
-#X floatatom 64 108 5 0 0 0 - - -;
-#X obj 114 235 @print;
-#X obj 21 209 unpack;
-#X floatatom 58 238 5 0 0 0 - - -;
-#X text 572 13 gridflow;
-#X text 21 275 see also:;
-#X obj 94 279 @ +;
-#X obj 127 279 @! abs;
-#X connect 1 0 4 0;
-#X connect 1 0 8 0;
-#X connect 3 0 6 0;
-#X connect 4 0 9 0;
-#X connect 6 0 1 0;
-#X connect 7 0 6 1;
-#X connect 9 0 5 0;
-#X connect 9 1 10 0;
diff --git a/externals/gridflow/pd_help/@convolve.pd b/externals/gridflow/pd_help/@convolve.pd
deleted file mode 100644
index 31c77936..00000000
--- a/externals/gridflow/pd_help/@convolve.pd
+++ /dev/null
@@ -1,40 +0,0 @@
-#N canvas 923 183 662 404 10;
-#X obj 19 37 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1
--1;
-#X text 14 15 @convolve blurs \, sharpens \, finds edges \, emboss
-& more ...;
-#X obj 19 108 @in;
-#X obj 19 133 @convolve ^ + 0;
-#X msg 212 76 1 1 1 1 1 1 1 1 1;
-#X obj 212 96 @redim ( 3 3 );
-#X text 569 17 gridflow;
-#X text 18 363 see also:;
-#X obj 234 367 @solarize;
-#X obj 303 367 @layer;
-#X obj 158 367 @posterize;
-#X obj 89 367 @contrast;
-#X obj 212 57 loadbang;
-#X msg 42 85 open bluemarble.jpg;
-#X text 216 187 splits the incoming grid into dim(rest...) parts \,
-for each of those parts at (xy \, x). a rectangle of such parts \,
-centered around (y \, x) is combined with the convolution grid like
-a [@] of operation op_para. then each such result is folded like [@
-fold] of operation op_fold and specified base. the results are assembled
-into a grid that is sent to the outlet. near the borders of the grid
-\, coordinates wrap around. this means the whole grid has to be received
-before production of the next grid starts. this is the convolution
-grid and it gets stored in the object. rows2 and columns2 must be odd
-numbers.;
-#X text 145 130 here ^ is the parallel operator \, fold is indicated
-by + and 0 is its base.;
-#X obj 19 62 fork;
-#X obj 19 309 @out window;
-#X connect 0 0 16 0;
-#X connect 2 0 3 0;
-#X connect 3 0 17 0;
-#X connect 4 0 5 0;
-#X connect 5 0 3 1;
-#X connect 12 0 4 0;
-#X connect 13 0 2 0;
-#X connect 16 0 2 0;
-#X connect 16 1 13 0;
diff --git a/externals/gridflow/pd_help/@downscale_by.pd b/externals/gridflow/pd_help/@downscale_by.pd
deleted file mode 100644
index bf2356cc..00000000
--- a/externals/gridflow/pd_help/@downscale_by.pd
+++ /dev/null
@@ -1,26 +0,0 @@
-#N canvas 614 643 463 368 10;
-#X obj 144 82 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1
--1;
-#X obj 113 101 @in;
-#X obj 20 72 metro 10;
-#X obj 20 49 tgl 15 0 empty empty empty 0 -6 0 8 -233017 -1 -1 1 1
-;
-#X text 301 313 see also:;
-#X obj 377 312 @scale_to;
-#X obj 200 133 @import ( 1 );
-#X floatatom 200 113 5 0 0 0 - - -;
-#X obj 377 333 @scale_by;
-#X text 14 15 @downscale_by;
-#X text 384 17 gridflow;
-#X obj 113 157 @downscale_by;
-#X obj 113 310 @out window;
-#X msg 114 56 open bluemarble.jpg;
-#X connect 0 0 1 0;
-#X connect 1 0 11 0;
-#X connect 2 0 1 0;
-#X connect 3 0 2 0;
-#X connect 6 0 11 1;
-#X connect 7 0 6 0;
-#X connect 11 0 12 0;
-#X connect 13 0 1 0;
-#X connect 13 0 0 0;
diff --git a/externals/gridflow/pd_help/@draw_polygon.pd b/externals/gridflow/pd_help/@draw_polygon.pd
deleted file mode 100644
index b4325a02..00000000
--- a/externals/gridflow/pd_help/@draw_polygon.pd
+++ /dev/null
@@ -1,36 +0,0 @@
-#N canvas 386 391 634 338 10;
-#X obj 22 27 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1
--1;
-#X floatatom 58 142 5 0 255 0 - - -;
-#X obj 84 179 @three;
-#X floatatom 101 142 5 0 255 0 - - -;
-#X floatatom 144 142 5 0 255 0 - - -;
-#X obj 195 158 until;
-#X obj 195 177 random 128;
-#X text 16 7 @draw_polygon;
-#X text 362 6 gridflow;
-#X obj 20 237 @draw_polygon put 1;
-#X obj 20 48 fork;
-#X obj 51 48 fork;
-#X obj 20 106 @in;
-#X obj 196 196 @import ( 4 2 );
-#X msg 195 139 4;
-#X obj 20 309 @out window;
-#X msg 47 81 open r001.jpg;
-#X text 158 80 1 <-- open image;
-#X connect 0 0 10 0;
-#X connect 1 0 2 0;
-#X connect 2 0 9 1;
-#X connect 3 0 2 1;
-#X connect 4 0 2 2;
-#X connect 5 0 6 0;
-#X connect 6 0 13 0;
-#X connect 9 0 15 0;
-#X connect 10 0 12 0;
-#X connect 10 1 11 0;
-#X connect 11 0 2 0;
-#X connect 11 1 14 0;
-#X connect 12 0 9 0;
-#X connect 13 0 9 2;
-#X connect 14 0 5 0;
-#X connect 16 0 12 0;
diff --git a/externals/gridflow/pd_help/@finished.pd b/externals/gridflow/pd_help/@finished.pd
deleted file mode 100644
index b91ee5a7..00000000
--- a/externals/gridflow/pd_help/@finished.pd
+++ /dev/null
@@ -1,15 +0,0 @@
-#N canvas 551 311 442 238 10;
-#X text 21 22 @finished;
-#X text 22 53 a bang is emitted every time a grid transmission ends
-;
-#X obj 24 146 @finished;
-#X obj 24 175 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1
--1;
-#X obj 24 118 @two;
-#X floatatom 24 80 5 0 0 0 - - -;
-#X floatatom 47 98 5 0 0 0 - - -;
-#X text 371 15 gridflow;
-#X connect 2 0 3 0;
-#X connect 4 0 2 0;
-#X connect 5 0 4 0;
-#X connect 6 0 4 1;
diff --git a/externals/gridflow/pd_help/@fold.pd b/externals/gridflow/pd_help/@fold.pd
deleted file mode 100644
index dee0f54a..00000000
--- a/externals/gridflow/pd_help/@fold.pd
+++ /dev/null
@@ -1,39 +0,0 @@
-#N canvas 306 222 526 344 10;
-#X obj 18 103 @in;
-#X obj 18 280 print value;
-#X obj 18 137 @fold + 0;
-#X obj 18 160 @fold + 0;
-#X obj 18 184 @fold + 0;
-#X text 114 133 treats the grid as a grid of one- dimensional grids
-such that the same operation (here addition) will be performed on all
-its elements together with the base value. the results are combined
-back. each @fold operation removes a dimension. syntax: @fold <two-input
-operation> <starting value>;
-#X text 19 8 @fold;
-#X text 451 11 gridflow;
-#X obj 85 313 @inner2;
-#X text 14 309 see also:;
-#X obj 141 313 @join;
-#X obj 183 313 @perspective;
-#X msg 41 70 open bluemarble.jpg;
-#X obj 18 246 @export_list;
-#X msg 237 66 open b001.jpg;
-#X obj 18 49 fork;
-#X obj 9 29 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1
-;
-#X obj 214 41 fork;
-#X obj 199 21 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X connect 0 0 2 0;
-#X connect 2 0 3 0;
-#X connect 3 0 4 0;
-#X connect 4 0 13 0;
-#X connect 12 0 0 0;
-#X connect 13 0 1 0;
-#X connect 14 0 0 0;
-#X connect 15 0 0 0;
-#X connect 15 1 12 0;
-#X connect 16 0 15 0;
-#X connect 17 0 0 0;
-#X connect 17 1 14 0;
-#X connect 18 0 17 0;
diff --git a/externals/gridflow/pd_help/@foldinnerouter.pd b/externals/gridflow/pd_help/@foldinnerouter.pd
deleted file mode 100644
index 46f2dc6d..00000000
--- a/externals/gridflow/pd_help/@foldinnerouter.pd
+++ /dev/null
@@ -1,94 +0,0 @@
-#N canvas 63 0 747 645 10;
-#X obj 18 34 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1
--1;
-#X obj 18 233 @export;
-#X obj 18 96 @in;
-#X text 18 10 @fold \, @inner \, @outer;
-#X obj 18 264 print value;
-#X obj 18 137 @fold + 0;
-#X obj 18 160 @fold + 0;
-#X obj 18 184 @fold + 0;
-#X text 114 133 treats the grid as a grid of one- dimensional grids
-such that the same operation (here addition) will be performed on all
-its elements together with the base value. the results are combined
-back. each @fold operation removes a dimension. syntax: @fold <two-input
-operation> <starting value>;
-#X obj 19 309 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1
--1;
-#X obj 171 402 @ * 128;
-#X obj 19 400 spigot;
-#X obj 100 400 spigot;
-#X obj 67 400 == 0;
-#X obj 67 309 tgl 15 0 empty empty empty 0 -6 0 8 -233017 -1 -1 1 1
-;
-#X obj 19 432 @outer +;
-#X obj 100 431 @outer ^;
-#X obj 100 451 @ * 2;
-#X text 171 448 @outer does the same two-input operation between every
-possible pair of the left-side grid and the right side grid. @inner
-treats both input grids like @fold does \, then does a @outer on the
-other dimensions \, such that every two-input operation is like a @fold.
-this is a very powerful operation that can be used to do rotations
-\, rgb->yuv \, color conversions \, etc.;
-#X text 88 310 select pattern;
-#X text 17 566 combine channelless picture with gamma factors (r \,
-g \, b);
-#X obj 19 379 @import ( 128 );
-#X obj 19 359 until;
-#X msg 19 338 128;
-#X obj 60 359 float 1;
-#X obj 115 359 + 1;
-#X obj 19 525 @outer gamma;
-#X obj 171 360 until;
-#X obj 212 360 float 1;
-#X obj 267 360 + 1;
-#X msg 171 339 4;
-#X obj 171 381 @import ( 3 );
-#X text 665 16 gridflow;
-#X text 19 598 see also:;
-#X obj 87 603 @scan;
-#X obj 129 603 @join;
-#X obj 171 603 @finished;
-#X obj 241 603 @cast;
-#X obj 283 603 @ravel;
-#X obj 331 603 @grade;
-#X obj 380 603 @perspective;
-#X msg 41 76 open bluemarble.jpg;
-#X obj 18 55 fork;
-#X obj 19 547 @out window;
-#X connect 0 0 42 0;
-#X connect 1 0 4 0;
-#X connect 2 0 5 0;
-#X connect 5 0 6 0;
-#X connect 6 0 7 0;
-#X connect 7 0 1 0;
-#X connect 9 0 23 0;
-#X connect 9 0 30 0;
-#X connect 10 0 26 1;
-#X connect 11 0 15 0;
-#X connect 11 0 15 1;
-#X connect 12 0 16 0;
-#X connect 12 0 16 1;
-#X connect 13 0 12 1;
-#X connect 14 0 11 1;
-#X connect 14 0 13 0;
-#X connect 15 0 26 0;
-#X connect 16 0 17 0;
-#X connect 17 0 26 0;
-#X connect 21 0 11 0;
-#X connect 21 0 12 0;
-#X connect 22 0 24 0;
-#X connect 23 0 22 0;
-#X connect 24 0 25 0;
-#X connect 24 0 21 0;
-#X connect 25 0 24 1;
-#X connect 26 0 43 0;
-#X connect 27 0 28 0;
-#X connect 28 0 29 0;
-#X connect 28 0 31 0;
-#X connect 29 0 28 1;
-#X connect 30 0 27 0;
-#X connect 31 0 10 0;
-#X connect 41 0 2 0;
-#X connect 42 0 2 0;
-#X connect 42 1 41 0;
diff --git a/externals/gridflow/pd_help/@for.pd b/externals/gridflow/pd_help/@for.pd
deleted file mode 100644
index 9a9e1666..00000000
--- a/externals/gridflow/pd_help/@for.pd
+++ /dev/null
@@ -1,16 +0,0 @@
-#N canvas 923 183 569 289 10;
-#X text 14 15 @for;
-#X obj 20 136 @for 0 320 1;
-#X floatatom 20 73 5 0 0 0 - - -;
-#X floatatom 59 94 5 0 0 0 - - -;
-#X floatatom 99 116 5 0 0 0 - - -;
-#X text 137 141 works like a for object \, plugged to an @import tuned
-for a dim(size) where size is the number of values produced by a bang
-to that for. syntax: @for <from> <to> <step> outlet: grid dim(size)
-where size = floor(to-from+1)/step;
-#X obj 20 199 @print;
-#X text 490 16 gridflow;
-#X connect 1 0 6 0;
-#X connect 2 0 1 0;
-#X connect 3 0 1 1;
-#X connect 4 0 1 2;
diff --git a/externals/gridflow/pd_help/@global.pd b/externals/gridflow/pd_help/@global.pd
deleted file mode 100644
index 3031ff5f..00000000
--- a/externals/gridflow/pd_help/@global.pd
+++ /dev/null
@@ -1,9 +0,0 @@
-#N canvas 923 183 400 205 10;
-#X text 21 22 @global;
-#X text 22 53 dummy object for controlling the profiler;
-#X obj 24 146 @global;
-#X msg 48 95 profiler_reset;
-#X msg 59 115 profiler_dump;
-#X text 321 18 gridflow;
-#X connect 3 0 2 0;
-#X connect 4 0 2 0;
diff --git a/externals/gridflow/pd_help/@grade.pd b/externals/gridflow/pd_help/@grade.pd
deleted file mode 100644
index e7873d77..00000000
--- a/externals/gridflow/pd_help/@grade.pd
+++ /dev/null
@@ -1,20 +0,0 @@
-#N canvas 435 101 649 221 10;
-#X text 143 15 splits a dim[a... \, b] grid into dim[b] vectors that
-each contain numbers from 0 to b-1 indicating the ordering of the values.
-the result is a dim[a... \, b] grid.;
-#X text 14 15 @grade;
-#X obj 19 139 @grade;
-#X floatatom 19 74 5 0 0 0 - - -;
-#X floatatom 60 74 5 0 0 0 - - -;
-#X obj 19 168 @print;
-#X obj 19 106 @four;
-#X floatatom 101 74 5 0 0 0 - - -;
-#X floatatom 142 74 5 0 0 0 - - -;
-#X text 585 14 gridflow;
-#X text 146 175 (behaves unstable in 0.7.0);
-#X connect 2 0 5 0;
-#X connect 3 0 6 0;
-#X connect 4 0 6 1;
-#X connect 6 0 2 0;
-#X connect 7 0 6 2;
-#X connect 8 0 6 3;
diff --git a/externals/gridflow/pd_help/@greyscale_to_rgb.pd b/externals/gridflow/pd_help/@greyscale_to_rgb.pd
deleted file mode 100644
index 106126b1..00000000
--- a/externals/gridflow/pd_help/@greyscale_to_rgb.pd
+++ /dev/null
@@ -1,21 +0,0 @@
-#N canvas 119 122 433 374 10;
-#X obj 15 33 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1
--1;
-#X obj 19 105 @in;
-#X obj 19 141 @rgb_to_greyscale;
-#X obj 19 161 s xx;
-#X obj 19 185 r xx;
-#X obj 19 205 @greyscale_to_rgb;
-#X text 24 5 @greyscale_to_rgb;
-#X text 353 13 gridflow;
-#X msg 42 78 open bluemarble.jpg;
-#X obj 19 55 fork;
-#X obj 19 263 @out window;
-#X connect 0 0 9 0;
-#X connect 1 0 2 0;
-#X connect 2 0 3 0;
-#X connect 4 0 5 0;
-#X connect 5 0 10 0;
-#X connect 8 0 1 0;
-#X connect 9 0 1 0;
-#X connect 9 1 8 0;
diff --git a/externals/gridflow/pd_help/@importexport.pd b/externals/gridflow/pd_help/@importexport.pd
deleted file mode 100644
index 454d7149..00000000
--- a/externals/gridflow/pd_help/@importexport.pd
+++ /dev/null
@@ -1,51 +0,0 @@
-#N canvas 119 230 748 467 10;
-#X msg 75 125 reset;
-#X obj 33 47 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1
--1;
-#X msg 33 111 200;
-#X text 125 129 abort output of grid \, if any;
-#X text 14 9 @import \, @export \, @export_list converts integers to
-grids and back;
-#X obj 41 239 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1
--1;
-#X obj 33 283 @dim;
-#X obj 322 335 @export_list;
-#X obj 322 366 print export_list;
-#X obj 33 335 @export;
-#X obj 33 366 print export;
-#X obj 33 176 @out 240 320;
-#X obj 33 260 @in;
-#X text 70 285 gets the size of the picture;
-#X text 87 334 accepts grids and sends integers;
-#X text 416 328 accepts grids and sends lists of integers;
-#X obj 33 88 until;
-#X msg 33 67 230400;
-#X obj 33 157 @import ( 240 320 3 );
-#X text 188 158 syntax: @import ( <int colums> <int rows> <int dimension>
-);
-#X text 32 418 see also:;
-#X obj 162 421 @two;
-#X obj 196 421 @three;
-#X obj 244 421 @four;
-#X text 671 16 gridflow;
-#X obj 101 421 @in;
-#X obj 128 421 @out;
-#X obj 33 301 s size;
-#X obj 33 319 r size;
-#X obj 322 315 r size;
-#X msg 33 216 open jpeg file 1.jpg;
-#X connect 0 0 18 0;
-#X connect 1 0 17 0;
-#X connect 2 0 18 0;
-#X connect 5 0 12 0;
-#X connect 6 0 27 0;
-#X connect 7 0 8 0;
-#X connect 9 0 10 0;
-#X connect 12 0 6 0;
-#X connect 16 0 2 0;
-#X connect 17 0 16 0;
-#X connect 18 0 11 0;
-#X connect 28 0 9 0;
-#X connect 29 0 7 0;
-#X connect 30 0 12 0;
-#X connect 30 0 5 0;
diff --git a/externals/gridflow/pd_help/@inner2.pd b/externals/gridflow/pd_help/@inner2.pd
deleted file mode 100644
index 34cb3ad1..00000000
--- a/externals/gridflow/pd_help/@inner2.pd
+++ /dev/null
@@ -1,17 +0,0 @@
-#N canvas 63 0 748 632 10;
-#X obj 18 49 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1
--1;
-#X obj 18 125 @in;
-#X text 14 15 @inner;
-#X obj 18 169 @inner2 * + 0;
-#X text 660 16 gridflow;
-#X text 178 172 this has yet to be done!;
-#X obj 18 307 @out window;
-#X msg 41 95 open bluemarble.jpg;
-#X obj 18 70 fork;
-#X connect 0 0 8 0;
-#X connect 1 0 3 0;
-#X connect 3 0 6 0;
-#X connect 7 0 1 0;
-#X connect 8 0 1 0;
-#X connect 8 1 7 0;
diff --git a/externals/gridflow/pd_help/@inout.pd b/externals/gridflow/pd_help/@inout.pd
deleted file mode 100644
index fdf1e8b0..00000000
--- a/externals/gridflow/pd_help/@inout.pd
+++ /dev/null
@@ -1,63 +0,0 @@
-#N canvas 281 197 649 652 10;
-#X obj 35 213 @in;
-#X msg 52 283 option timelog \$1;
-#X obj 52 263 tgl 15 0 empty empty empty 0 -6 0 8 -233017 -1 -1 0 1
-;
-#X text 274 307 upload a grid;
-#X text 261 80 upload a grid;
-#X text 194 108 open default display for screenshot;
-#X msg 73 134 open videodev /dev/video0;
-#X text 260 136 open a video device;
-#X msg 75 332 open x11 here;
-#X msg 87 356 open x11 local 10;
-#X text 182 285 show/hide timing statistics;
-#X text 178 334 connect to default display;
-#X text 218 358 connect to display #10 on this machine;
-#X msg 100 380 open x11 remote.host.bla.net 0;
-#X text 324 382 connect to remote machine on display #0;
-#X text 290 161 open mpeg video stream;
-#X obj 35 441 @out;
-#X text 14 15 @in \, @out communicating grids (pictures) to/from devices
-\, sockets \, files;
-#X text 272 155 *;
-#X text 36 558 * path is where you started pd from. usually $home.
-;
-#X text 308 188 open an image file;
-#X msg 114 450 close;
-#X text 577 15 gridflow;
-#X text 37 590 see also:;
-#X obj 108 595 @import ( 1 );
-#X obj 205 595 @export;
-#X obj 260 595 @export_list;
-#X obj 350 595 @export_symbol;
-#X obj 454 595 @two;
-#X obj 488 595 @three;
-#X obj 536 595 @four;
-#X msg 90 161 open lsd.mpeg;
-#X msg 55 107 open x11 here;
-#X msg 35 80 open host.bla.net 7777;
-#X msg 113 404 open img/bla.jpg;
-#X text 300 405 open single file in jpg format;
-#X msg 108 186 open ./img/bla.jpg;
-#X text 35 481 incoming file is sent through the opened device/socket/file.
-in single file formats subsequent pictures overwrite the preceeding
-one. there are many more options. for more information see the reference
-manual in the "formats" and "objects for input/output" sections.;
-#X msg 65 307 open x.test.at 7777;
-#X msg 125 426 open window;
-#X text 228 426 opens a window x11 \, quartz or sdl;
-#X connect 0 0 16 0;
-#X connect 1 0 16 0;
-#X connect 2 0 1 0;
-#X connect 6 0 0 0;
-#X connect 8 0 16 0;
-#X connect 9 0 16 0;
-#X connect 13 0 16 0;
-#X connect 21 0 16 0;
-#X connect 31 0 0 0;
-#X connect 32 0 0 0;
-#X connect 33 0 0 0;
-#X connect 34 0 16 0;
-#X connect 36 0 0 0;
-#X connect 38 0 16 0;
-#X connect 39 0 16 0;
diff --git a/externals/gridflow/pd_help/@join.pd b/externals/gridflow/pd_help/@join.pd
deleted file mode 100644
index 3a8f3cdc..00000000
--- a/externals/gridflow/pd_help/@join.pd
+++ /dev/null
@@ -1,42 +0,0 @@
-#N canvas 297 501 659 362 10;
-#X obj 18 32 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1
--1;
-#X obj 18 96 @in;
-#X obj 211 30 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1
--1;
-#X obj 211 96 @in;
-#X obj 237 96 @rgb_to_greyscale;
-#X obj 18 161 @join 2;
-#X text 16 8 @join;
-#X text 204 238 the left grid and right grid must have the same number
-of elements in all dimensions except the one specified \, which will
-be the sum of the two corresponding;
-#X obj 18 208 @perspective;
-#X text 563 10 gridflow;
-#X text 17 306 see also:;
-#X obj 86 310 @fold +;
-#X obj 142 310 @scan +;
-#X obj 18 269 @out window;
-#X text 205 170 creation argument is the number of the dimensions by
-which the join will occur. for n-dimensional grids \, the dimensions
-are numbered from 0 to n-1. in addition \, negative numbers from -n
-to -1 may be used \, to which n will be added.;
-#X msg 41 73 open r001.jpg;
-#X msg 234 69 open b001.jpg;
-#X obj 18 53 fork;
-#X obj 211 48 fork;
-#X text 244 29 1 <--;
-#X text 45 31 2 <--;
-#X connect 0 0 17 0;
-#X connect 1 0 5 0;
-#X connect 2 0 18 0;
-#X connect 3 0 4 0;
-#X connect 4 0 5 1;
-#X connect 5 0 8 0;
-#X connect 8 0 13 0;
-#X connect 15 0 1 0;
-#X connect 16 0 3 0;
-#X connect 17 0 1 0;
-#X connect 17 1 15 0;
-#X connect 18 0 3 0;
-#X connect 18 1 16 0;
diff --git a/externals/gridflow/pd_help/@layer.pd b/externals/gridflow/pd_help/@layer.pd
deleted file mode 100644
index 98a68acd..00000000
--- a/externals/gridflow/pd_help/@layer.pd
+++ /dev/null
@@ -1,46 +0,0 @@
-#N canvas 297 501 656 323 10;
-#X obj 18 29 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1
--1;
-#X obj 18 96 @in;
-#X obj 211 28 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1
--1;
-#X obj 211 96 @in;
-#X obj 237 96 @rgb_to_greyscale;
-#X text 14 5 @layer;
-#X obj 18 208 @layer;
-#X obj 18 161 @join -1;
-#X obj 406 29 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1
--1;
-#X obj 406 96 @in;
-#X text 208 121 opacity channel file;
-#X text 51 95 foreground file;
-#X text 438 96 background file;
-#X text 579 14 gridflow;
-#X obj 18 269 @out window;
-#X text 206 209 a picture that has an opacity level will be used as
-foreground vs a picture that has no opacity channel. the output is
-a picture that has no opacity channel;
-#X msg 41 72 open r001.jpg;
-#X msg 234 69 open b001.jpg;
-#X msg 429 71 open g001.jpg;
-#X obj 18 50 fork;
-#X obj 211 47 fork;
-#X obj 406 50 fork;
-#X connect 0 0 19 0;
-#X connect 1 0 7 0;
-#X connect 2 0 20 0;
-#X connect 3 0 4 0;
-#X connect 4 0 7 1;
-#X connect 6 0 14 0;
-#X connect 7 0 6 0;
-#X connect 8 0 21 0;
-#X connect 9 0 6 1;
-#X connect 16 0 1 0;
-#X connect 17 0 3 0;
-#X connect 18 0 9 0;
-#X connect 19 0 1 0;
-#X connect 19 1 16 0;
-#X connect 20 0 3 0;
-#X connect 20 1 17 0;
-#X connect 21 0 9 0;
-#X connect 21 1 18 0;
diff --git a/externals/gridflow/pd_help/@perspective.pd b/externals/gridflow/pd_help/@perspective.pd
deleted file mode 100644
index db145d54..00000000
--- a/externals/gridflow/pd_help/@perspective.pd
+++ /dev/null
@@ -1,29 +0,0 @@
-#N canvas 280 56 664 282 10;
-#X text 403 215 see also:;
-#X obj 477 214 @redim;
-#X obj 259 173 @perspective;
-#X obj 20 147 @three;
-#X obj 530 214 @ravel;
-#X obj 20 125 random 10;
-#X obj 87 125 random 10;
-#X obj 155 125 random 10;
-#X obj 20 86 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X text 587 12 gridflow;
-#X text 14 15 @perspective;
-#X obj 20 210 @print;
-#X obj 259 210 @print;
-#X text 143 15 transforms a dim[a... \, b] grid into a dim[a... \,
-b-1] grid. there is a projection plane perpendicular to the last axis
-and whose position is given by the creation argument. each vector's
-length is adjusted so that it lies onto that plane. then the last dimension
-of each vector is dropped;
-#X connect 2 0 12 0;
-#X connect 3 0 2 0;
-#X connect 3 0 11 0;
-#X connect 5 0 3 0;
-#X connect 6 0 3 1;
-#X connect 7 0 3 2;
-#X connect 8 0 5 0;
-#X connect 8 0 6 0;
-#X connect 8 0 7 0;
diff --git a/externals/gridflow/pd_help/@posterize.pd b/externals/gridflow/pd_help/@posterize.pd
deleted file mode 100644
index e10e42ba..00000000
--- a/externals/gridflow/pd_help/@posterize.pd
+++ /dev/null
@@ -1,36 +0,0 @@
-#N canvas 432 100 640 338 10;
-#X obj 20 32 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1
--1;
-#X obj 20 100 @in;
-#X obj 19 174 @posterize;
-#X text 16 7 @posterize;
-#X floatatom 84 131 5 2 255 0 - - -;
-#X obj 84 147 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 19 127 @store;
-#X text 132 131 2 - 255;
-#X text 157 157 number of possible levels per channel. the levels are
-equally spaced \, with the lowest at 0 and the highest at 255 the minimum
-number of levels is 2 and the default value is also 2;
-#X text 572 6 gridflow;
-#X text 210 300 see also:;
-#X obj 281 304 @convolve;
-#X obj 419 304 @solarize;
-#X obj 488 304 @layer;
-#X obj 350 304 @contrast;
-#X obj 20 59 fork;
-#X msg 43 79 open bluemarble.jpg;
-#X obj 19 303 @out window;
-#X text 98 7 reduces the number of possible intensities in an image:
-it rounds the color values. the effect is mostly apparent with a low
-number of levels;
-#X connect 0 0 15 0;
-#X connect 1 0 6 1;
-#X connect 2 0 17 0;
-#X connect 4 0 2 1;
-#X connect 4 0 5 0;
-#X connect 5 0 6 0;
-#X connect 6 0 2 0;
-#X connect 15 0 1 0;
-#X connect 15 1 16 0;
-#X connect 16 0 1 0;
diff --git a/externals/gridflow/pd_help/@print.pd b/externals/gridflow/pd_help/@print.pd
deleted file mode 100644
index 1537faab..00000000
--- a/externals/gridflow/pd_help/@print.pd
+++ /dev/null
@@ -1,28 +0,0 @@
-#N canvas 435 101 688 277 10;
-#X text 191 203 see also:;
-#X obj 297 208 @export;
-#X obj 352 208 @export_list;
-#X obj 442 208 rubyprint;
-#X obj 19 123 @three;
-#X floatatom 19 73 5 0 0 0 - - -;
-#X floatatom 37 52 5 0 0 0 - - -;
-#X floatatom 56 73 5 0 0 0 - - -;
-#X obj 19 197 @print;
-#X text 14 15 @print;
-#X text 143 15 prints grids dimensions or all the grid data if there
-are 2 dimensions or less.;
-#X obj 112 123 @import ( 3 3 3 );
-#X obj 113 73 until;
-#X msg 113 53 27;
-#X obj 112 93 random 27;
-#X text 619 13 gridflow;
-#X obj 262 208 @dim;
-#X obj 512 208 printargs;
-#X connect 4 0 8 0;
-#X connect 5 0 4 0;
-#X connect 6 0 4 1;
-#X connect 7 0 4 2;
-#X connect 11 0 8 0;
-#X connect 12 0 14 0;
-#X connect 13 0 12 0;
-#X connect 14 0 11 0;
diff --git a/externals/gridflow/pd_help/@ravel.pd b/externals/gridflow/pd_help/@ravel.pd
deleted file mode 100644
index 65bcad40..00000000
--- a/externals/gridflow/pd_help/@ravel.pd
+++ /dev/null
@@ -1,31 +0,0 @@
-#N canvas 435 101 660 279 10;
-#X text 14 15 @ravel;
-#X text 143 15 like @redim but always produces a 1-D grid with the
-same total number of elements.;
-#X obj 20 102 @in;
-#X obj 20 40 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1
--1;
-#X obj 20 168 @dim;
-#X obj 20 190 @export_list;
-#X obj 20 211 print before;
-#X obj 140 129 @ravel;
-#X obj 259 170 @dim;
-#X obj 259 192 @export_list;
-#X obj 259 213 print after;
-#X text 403 215 see also:;
-#X obj 567 214 @perspective;
-#X text 575 14 gridflow;
-#X obj 477 214 @redim ( 1 );
-#X msg 43 81 open bluemarble.jpg;
-#X obj 20 60 fork;
-#X connect 2 0 4 0;
-#X connect 2 0 7 0;
-#X connect 3 0 16 0;
-#X connect 4 0 5 0;
-#X connect 5 0 6 0;
-#X connect 7 0 8 0;
-#X connect 8 0 9 0;
-#X connect 9 0 10 0;
-#X connect 15 0 2 0;
-#X connect 16 0 2 0;
-#X connect 16 1 15 0;
diff --git a/externals/gridflow/pd_help/@redim.pd b/externals/gridflow/pd_help/@redim.pd
deleted file mode 100644
index 69e47169..00000000
--- a/externals/gridflow/pd_help/@redim.pd
+++ /dev/null
@@ -1,21 +0,0 @@
-#N canvas 435 101 633 282 10;
-#X text 15 8 @redim;
-#X text 114 14 rearrange a grid's values according to new dimensions
-;
-#X obj 25 99 @in;
-#X obj 25 32 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1
--1;
-#X obj 25 132 @redim ( 120 120 3 );
-#X text 287 192 see also:;
-#X obj 367 195 @ravel;
-#X obj 418 195 @perspective;
-#X text 551 13 gridflow;
-#X msg 48 77 open bluemarble.jpg;
-#X obj 25 55 fork;
-#X obj 25 187 @out window;
-#X connect 2 0 4 0;
-#X connect 3 0 10 0;
-#X connect 4 0 11 0;
-#X connect 9 0 2 0;
-#X connect 10 0 2 0;
-#X connect 10 1 9 0;
diff --git a/externals/gridflow/pd_help/@rgb_to_greyscale.pd b/externals/gridflow/pd_help/@rgb_to_greyscale.pd
deleted file mode 100644
index c905d183..00000000
--- a/externals/gridflow/pd_help/@rgb_to_greyscale.pd
+++ /dev/null
@@ -1,19 +0,0 @@
-#N canvas 119 122 514 375 10;
-#X obj 19 47 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 19 100 @in;
-#X obj 19 132 @rgb_to_greyscale;
-#X text 14 15 @rgb_to_greyscale;
-#X obj 19 152 s xx;
-#X obj 18 215 r xx;
-#X obj 18 235 @greyscale_to_rgb;
-#X text 444 11 gridflow;
-#X obj 18 329 @out window;
-#X msg 44 72 open r001.jpg;
-#X connect 0 0 9 0;
-#X connect 0 0 1 0;
-#X connect 1 0 2 0;
-#X connect 2 0 4 0;
-#X connect 5 0 6 0;
-#X connect 6 0 8 0;
-#X connect 9 0 1 0;
diff --git a/externals/gridflow/pd_help/@scale_by.pd b/externals/gridflow/pd_help/@scale_by.pd
deleted file mode 100644
index fa73b249..00000000
--- a/externals/gridflow/pd_help/@scale_by.pd
+++ /dev/null
@@ -1,30 +0,0 @@
-#N canvas 614 643 589 398 10;
-#X obj 113 29 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1
--1;
-#X obj 113 101 @in;
-#X obj 20 72 metro 10;
-#X obj 20 49 tgl 15 0 empty empty empty 0 -6 0 8 -233017 -1 -1 1 1
-;
-#X text 26 359 see also:;
-#X text 14 15 @scale_by;
-#X obj 102 358 @scale_to;
-#X obj 113 157 @scale_by;
-#X floatatom 172 116 5 0 0 0 - - -;
-#X text 518 16 gridflow;
-#X obj 172 358 @downscale_by;
-#X obj 172 136 @import ( 1 );
-#X text 157 198 identical to scale_to with arguments that are exactly
-twice that of the incoming grid. it's several times faster.;
-#X obj 113 275 @out window;
-#X msg 136 71 open bluemarble.jpg;
-#X obj 113 50 fork;
-#X connect 0 0 15 0;
-#X connect 1 0 7 0;
-#X connect 2 0 1 0;
-#X connect 3 0 2 0;
-#X connect 7 0 13 0;
-#X connect 8 0 11 0;
-#X connect 11 0 7 1;
-#X connect 14 0 1 0;
-#X connect 15 0 1 0;
-#X connect 15 1 14 0;
diff --git a/externals/gridflow/pd_help/@scale_to.pd b/externals/gridflow/pd_help/@scale_to.pd
deleted file mode 100644
index 432e223f..00000000
--- a/externals/gridflow/pd_help/@scale_to.pd
+++ /dev/null
@@ -1,34 +0,0 @@
-#N canvas 497 180 649 321 10;
-#X obj 113 26 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1
--1;
-#X obj 113 101 @in;
-#X text 14 15 @scale_to;
-#X obj 20 49 tgl 15 0 empty empty empty 0 -6 0 8 -233017 -1 -1 1 1
-;
-#X obj 269 157 @two;
-#X obj 310 43 vsl 15 128 0 640 0 0 empty empty empty 0 -8 0 8 -262144
--1 -1 3300 1;
-#X obj 333 43 vsl 15 128 0 480 0 0 empty empty empty 0 -8 0 8 -262144
--1 -1 6300 1;
-#X obj 352 285 @scale_by;
-#X text 281 281 see also:;
-#X text 190 182 though not pointed out in the manual \, the initial
-arguments seem to be mandatory.;
-#X text 578 11 gridflow;
-#X obj 423 285 @downscale_by;
-#X obj 20 72 metro 100;
-#X obj 113 262 @out window;
-#X msg 135 74 open b001.jpg;
-#X obj 113 51 fork;
-#X obj 113 157 @scale_to ( 133 133 );
-#X connect 0 0 15 0;
-#X connect 1 0 16 0;
-#X connect 3 0 12 0;
-#X connect 4 0 16 1;
-#X connect 5 0 4 0;
-#X connect 6 0 4 1;
-#X connect 12 0 1 0;
-#X connect 14 0 1 0;
-#X connect 15 0 1 0;
-#X connect 15 1 14 0;
-#X connect 16 0 13 0;
diff --git a/externals/gridflow/pd_help/@scan.pd b/externals/gridflow/pd_help/@scan.pd
deleted file mode 100644
index 64f62f95..00000000
--- a/externals/gridflow/pd_help/@scan.pd
+++ /dev/null
@@ -1,26 +0,0 @@
-#N canvas 140 0 421 309 10;
-#X text 14 15 @scan;
-#X text 69 15 computes subtotals;
-#X obj 17 127 @scan +;
-#X obj 17 96 @three;
-#X floatatom 17 56 5 0 0 0 - - -;
-#X floatatom 62 56 5 0 0 0 - - -;
-#X floatatom 109 56 5 0 0 0 - - -;
-#X floatatom 17 225 5 0 0 0 - - -;
-#X obj 17 186 unpack f f f;
-#X floatatom 56 225 5 0 0 0 - - -;
-#X floatatom 96 225 5 0 0 0 - - -;
-#X obj 17 164 @export_list;
-#X text 73 129 second inlet seems to be dead;
-#X text 340 14 gridflow;
-#X text 14 266 see also:;
-#X obj 83 270 @fold +;
-#X connect 2 0 11 0;
-#X connect 3 0 2 0;
-#X connect 4 0 3 0;
-#X connect 5 0 3 1;
-#X connect 6 0 3 2;
-#X connect 8 0 7 0;
-#X connect 8 1 9 0;
-#X connect 8 2 10 0;
-#X connect 11 0 8 0;
diff --git a/externals/gridflow/pd_help/@solarize.pd b/externals/gridflow/pd_help/@solarize.pd
deleted file mode 100644
index 60c48b25..00000000
--- a/externals/gridflow/pd_help/@solarize.pd
+++ /dev/null
@@ -1,25 +0,0 @@
-#N canvas 432 100 613 339 10;
-#X obj 20 59 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1
--1;
-#X obj 20 138 @in;
-#X text 16 7 @solarize;
-#X obj 20 174 @solarize;
-#X text 98 7 makes medium intensities brightest. formerly brightest
-colors become darkest \, formerly darkest stays darkest. this filter
-is linear. it's like a 200% contrast \, except that overflows are mirrored
-instead of clipped or wrapped.;
-#X text 545 5 gridflow;
-#X text 202 305 see also:;
-#X obj 273 309 @convolve;
-#X obj 487 309 @layer;
-#X obj 342 309 @contrast;
-#X obj 411 309 @posterize;
-#X obj 20 222 @out window;
-#X msg 43 112 open bluemarble.jpg;
-#X obj 20 83 fork;
-#X connect 0 0 13 0;
-#X connect 1 0 3 0;
-#X connect 3 0 11 0;
-#X connect 12 0 1 0;
-#X connect 13 0 1 0;
-#X connect 13 1 12 0;
diff --git a/externals/gridflow/pd_help/@spread.pd b/externals/gridflow/pd_help/@spread.pd
deleted file mode 100644
index c3c39895..00000000
--- a/externals/gridflow/pd_help/@spread.pd
+++ /dev/null
@@ -1,64 +0,0 @@
-#N canvas 265 540 787 472 10;
-#X text 14 15 @spread;
-#X text 129 15 makes noise;
-#X obj 232 159 @in;
-#X obj 232 58 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1
--1;
-#X obj 232 207 spigot;
-#X obj 278 207 == 0;
-#X obj 275 140 tgl 15 0 empty empty empty 0 -6 0 8 -233017 -1 -1 0
-1;
-#X obj 310 207 spigot;
-#X obj 310 291 @ min 255;
-#X obj 310 270 @spread 1;
-#X obj 310 312 @ min 0;
-#X floatatom 368 241 5 0 0 0 - - -;
-#X obj 195 269 @store;
-#X obj 20 197 @spread 1;
-#X floatatom 78 163 5 0 0 0 - - -;
-#X obj 20 88 until;
-#X obj 20 51 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1
--1;
-#X msg 20 69 65536;
-#X obj 61 88 float;
-#X obj 101 88 + 1;
-#X obj 20 129 @import ( 256 256 2 );
-#X text 368 314 we limit here \, because the values might go out of
-range;
-#X text 702 13 gridflow;
-#X obj 195 393 @out window;
-#X obj 310 395 @out window;
-#X msg 255 112 open r001.jpg;
-#X obj 232 87 fork;
-#X obj 149 73 metro 50;
-#X obj 149 51 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
-;
-#X text 300 141 switch displays \, use this to get an image into the
-@store;
-#X connect 2 0 4 0;
-#X connect 2 0 7 0;
-#X connect 3 0 26 0;
-#X connect 4 0 12 1;
-#X connect 5 0 7 1;
-#X connect 6 0 4 1;
-#X connect 6 0 5 0;
-#X connect 7 0 9 0;
-#X connect 8 0 10 0;
-#X connect 9 0 8 0;
-#X connect 10 0 24 0;
-#X connect 11 0 9 1;
-#X connect 12 0 23 0;
-#X connect 13 0 12 0;
-#X connect 14 0 13 1;
-#X connect 15 0 18 0;
-#X connect 16 0 17 0;
-#X connect 17 0 15 0;
-#X connect 18 0 19 0;
-#X connect 18 0 20 0;
-#X connect 19 0 18 1;
-#X connect 20 0 13 0;
-#X connect 25 0 2 0;
-#X connect 26 0 2 0;
-#X connect 26 1 25 0;
-#X connect 27 0 2 0;
-#X connect 28 0 27 0;
diff --git a/externals/gridflow/pd_help/@store.pd b/externals/gridflow/pd_help/@store.pd
deleted file mode 100644
index 68dd5a14..00000000
--- a/externals/gridflow/pd_help/@store.pd
+++ /dev/null
@@ -1,48 +0,0 @@
-#N canvas 519 121 541 394 10;
-#X text 14 15 @store;
-#X obj 18 118 @two;
-#X floatatom 18 86 5 0 0 0 - - -;
-#X floatatom 63 86 5 0 0 0 - - -;
-#X text 92 15 stores a single grid and can recall parts of it.;
-#X obj 111 136 @export_list;
-#X floatatom 111 184 5 0 0 0 - - -;
-#X obj 73 221 @redim ( 1 2 );
-#X obj 73 266 @store;
-#X obj 73 307 @export_list;
-#X obj 294 119 @in;
-#X obj 294 45 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1
--1;
-#X obj 73 326 unpack f f f;
-#X floatatom 73 351 5 0 0 0 - - -;
-#X text 56 352 R:;
-#X floatatom 134 351 5 0 0 0 - - -;
-#X floatatom 194 351 5 0 0 0 - - -;
-#X text 117 352 G:;
-#X text 178 352 B:;
-#X text 130 262 this example allows you to select a single pixel from
-the loaded picture and view its rgb value.;
-#X obj 111 155 unpack;
-#X floatatom 164 185 5 0 0 0 - - -;
-#X text 92 185 X:;
-#X text 149 186 Y:;
-#X text 478 14 gridflow;
-#X msg 317 92 open r001.jpg;
-#X obj 294 70 fork;
-#X connect 1 0 5 0;
-#X connect 1 0 7 0;
-#X connect 2 0 1 0;
-#X connect 3 0 1 1;
-#X connect 5 0 20 0;
-#X connect 7 0 8 0;
-#X connect 8 0 9 0;
-#X connect 9 0 12 0;
-#X connect 10 0 8 1;
-#X connect 11 0 26 0;
-#X connect 12 0 13 0;
-#X connect 12 1 15 0;
-#X connect 12 2 16 0;
-#X connect 20 0 6 0;
-#X connect 20 1 21 0;
-#X connect 25 0 10 0;
-#X connect 26 0 10 0;
-#X connect 26 1 25 0;
diff --git a/externals/gridflow/pd_help/@twothreefour.pd b/externals/gridflow/pd_help/@twothreefour.pd
deleted file mode 100644
index fa57a796..00000000
--- a/externals/gridflow/pd_help/@twothreefour.pd
+++ /dev/null
@@ -1,70 +0,0 @@
-#N canvas 573 90 733 417 10;
-#X text 14 15 @two \, @three \, @four;
-#X text 173 16 hold 2 \, 3 or 4 values \, defaulting to all zeroes.
-each time one is changed (by sending an integer in that inlet) \, a
-dim(n) grid is sent through the inlet.;
-#X floatatom 20 95 5 0 0 0 - - -;
-#X floatatom 62 95 5 0 0 0 - - -;
-#X obj 20 129 @two;
-#X floatatom 113 95 5 0 0 0 - - -;
-#X floatatom 155 95 5 0 0 0 - - -;
-#X obj 113 129 @three;
-#X floatatom 197 95 5 0 0 0 - - -;
-#X floatatom 249 96 5 0 0 0 - - -;
-#X floatatom 291 96 5 0 0 0 - - -;
-#X floatatom 333 96 5 0 0 0 - - -;
-#X obj 249 130 @four;
-#X floatatom 376 96 5 0 0 0 - - -;
-#X obj 22 294 @export_list;
-#X obj 20 152 s _2;
-#X obj 113 152 s _3;
-#X obj 249 152 s _4;
-#X obj 22 272 r _2;
-#X obj 55 272 r _3;
-#X obj 88 272 r _4;
-#X floatatom 22 346 5 0 0 0 - - -;
-#X obj 165 295 @fold +;
-#X obj 165 273 r _2;
-#X obj 198 273 r _3;
-#X obj 231 273 r _4;
-#X obj 165 315 @export;
-#X obj 165 336 print sum;
-#X obj 309 273 r _2;
-#X obj 342 273 r _3;
-#X obj 375 273 r _4;
-#X obj 309 296 @export;
-#X obj 309 317 print;
-#X text 19 381 see also:;
-#X obj 149 385 @import ( 1 );
-#X obj 279 385 @export;
-#X obj 334 385 @export_list;
-#X obj 424 385 @export_symbol;
-#X text 658 16 gridflow;
-#X obj 245 385 @dim;
-#X obj 88 385 @in;
-#X obj 115 385 @for;
-#X connect 2 0 4 0;
-#X connect 3 0 4 1;
-#X connect 4 0 15 0;
-#X connect 5 0 7 0;
-#X connect 6 0 7 1;
-#X connect 7 0 16 0;
-#X connect 8 0 7 2;
-#X connect 9 0 12 0;
-#X connect 10 0 12 1;
-#X connect 11 0 12 2;
-#X connect 12 0 17 0;
-#X connect 13 0 12 3;
-#X connect 14 0 21 0;
-#X connect 18 0 14 0;
-#X connect 19 0 14 0;
-#X connect 20 0 14 0;
-#X connect 22 0 26 0;
-#X connect 23 0 22 0;
-#X connect 24 0 22 0;
-#X connect 25 0 22 0;
-#X connect 26 0 27 0;
-#X connect 28 0 31 0;
-#X connect 29 0 31 0;
-#X connect 30 0 31 0;
-#X connect 31 0 32 0;
diff --git a/externals/gridflow/pd_help/help_count.pd b/externals/gridflow/pd_help/help_count.pd
deleted file mode 100644
index 9d812919..00000000
--- a/externals/gridflow/pd_help/help_count.pd
+++ /dev/null
@@ -1,15 +0,0 @@
-#N canvas 85 117 336 239 10;
-#X obj 65 80 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X floatatom 65 144 5 0 0 0 - - -;
-#X obj 130 143 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X msg 130 79 42;
-#X obj 65 110 count 0 10;
-#X text 158 78 count limit;
-#X text 26 19 simple counter from a to b in increments of '1'. The
-arguments sets the range.;
-#X connect 0 0 4 0;
-#X connect 3 0 4 1;
-#X connect 4 0 1 0;
-#X connect 4 1 2 0;
diff --git a/externals/gridflow/pd_help/help_fade.pd b/externals/gridflow/pd_help/help_fade.pd
deleted file mode 100644
index e96fb054..00000000
--- a/externals/gridflow/pd_help/help_fade.pd
+++ /dev/null
@@ -1,19 +0,0 @@
-#N canvas 68 40 747 435 10;
-#X obj 197 148 @in;
-#X obj 215 114 @camera_control;
-#X obj 95 87 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
-;
-#X obj 197 190 @fade 10;
-#X text 268 184 the creation argument is the number of frames the fade
-occurs over;
-#X obj 251 161 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -260818
--1 -1 0 1;
-#X obj 122 86 metro 50;
-#X obj 197 240 @out window;
-#X text 514 13 gridflow;
-#X connect 0 0 3 0;
-#X connect 1 0 0 0;
-#X connect 2 0 6 0;
-#X connect 3 0 7 0;
-#X connect 5 0 3 1;
-#X connect 6 0 0 0;
diff --git a/externals/gridflow/pd_help/help_motion_detect.pd b/externals/gridflow/pd_help/help_motion_detect.pd
deleted file mode 100644
index 95e8123a..00000000
--- a/externals/gridflow/pd_help/help_motion_detect.pd
+++ /dev/null
@@ -1,76 +0,0 @@
-#N canvas 126 0 350 447 10;
-#X obj 37 24 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
-;
-#X obj 71 539 fps detailed;
-#X obj 71 559 print;
-#X obj 82 254 @motion_detection;
-#X floatatom 261 298 5 0 0 0 - displaced_numb -;
-#X obj 112 79 @camera_control;
-#X obj 71 116 @in;
-#X obj 261 272 tgl 15 0 displaced empty empty 0 0 128 4 -233017 -62784
--233017 0 1;
-#X text 283 271 <-- toggle displaced pixels on/off;
-#X text 229 78 <-- select and initialise the type of camera first;
-#X obj 264 246 hsl 128 15 0 30 0 0 noise empty noise_reduction 10 6
-128 12 -233017 -1 -62784 0 0;
-#X text 312 299 <-- total number of displaced pixels (divided by 100000)
-;
-#X obj 261 220 tgl 15 0 snapshot empty empty 0 0 128 4 -233017 -258699
--260818 0 1;
-#X text 284 219 <-- compare incoming images/ take a snapshot;
-#X obj 82 358 @centroid;
-#X obj 37 45 metro 50;
-#X obj 71 143 fork;
-#X obj 71 231 demux 2;
-#X obj 71 333 demux 2;
-#X obj 71 441 demux 2;
-#X obj 115 210 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0
-1;
-#X obj 115 313 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0
-1;
-#X obj 115 421 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0
-1;
-#X obj 71 518 @out window;
-#N canvas 0 0 450 300 pixelate 0;
-#X obj 55 92 @downscale_by ( 15 20 ) smoothly;
-#X obj 55 118 @scale_by ( 32 32 );
-#X obj 42 40 inlet;
-#X obj 39 168 outlet;
-#X connect 0 0 1 0;
-#X connect 1 0 3 0;
-#X connect 2 0 0 0;
-#X restore 82 464 pd pixelate;
-#N canvas 0 0 450 300 get_image_size 0;
-#X obj 39 70 @dim;
-#X obj 39 116 @export_list;
-#X obj 39 139 s size;
-#X obj 39 92 @inner * + 0 ( 3 2 # 1 0 0 1 0 0 );
-#X obj 30 28 inlet;
-#X connect 0 0 3 0;
-#X connect 1 0 2 0;
-#X connect 3 0 1 0;
-#X connect 4 0 0 0;
-#X restore 94 169 pd get_image_size;
-#X text 226 169 <-- necessary for centroid;
-#X text 208 357 <-- finds the centre of the displaced pixels;
-#X text 169 463 <-- make the image into 15 x 20 squares;
-#X connect 0 0 15 0;
-#X connect 1 0 2 0;
-#X connect 3 0 18 0;
-#X connect 5 0 6 0;
-#X connect 6 0 16 0;
-#X connect 14 0 19 0;
-#X connect 15 0 6 0;
-#X connect 16 0 17 0;
-#X connect 16 1 25 0;
-#X connect 17 0 18 0;
-#X connect 17 1 3 0;
-#X connect 18 0 19 0;
-#X connect 18 1 14 0;
-#X connect 19 0 23 0;
-#X connect 19 1 24 0;
-#X connect 20 0 17 1;
-#X connect 21 0 18 1;
-#X connect 22 0 19 1;
-#X connect 23 0 1 0;
-#X connect 24 0 23 0;
diff --git a/externals/gridflow/pd_help/help_mouse.pd b/externals/gridflow/pd_help/help_mouse.pd
deleted file mode 100644
index 3b5dc0a5..00000000
--- a/externals/gridflow/pd_help/help_mouse.pd
+++ /dev/null
@@ -1,55 +0,0 @@
-#N canvas 215 0 510 490 10;
-#X msg 147 123 option setcursor 32;
-#X text 49 22 How to get the mouse coordinates and hide / change the
-cursor?;
-#X msg 128 100 option hidecursor;
-#X text 273 98 <-- removes the cursor;
-#X text 307 120 <-- accepts 0 - 63;
-#X obj 206 168 print xy_clicked;
-#X obj 110 165 @out window;
-#X obj 207 214 print xy_unclicked;
-#X obj 107 341 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X obj 127 341 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X obj 147 341 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X floatatom 178 359 5 0 0 0 - - -;
-#X obj 178 333 +;
-#X obj 210 333 t a;
-#X obj 207 238 print xy_moved;
-#X obj 206 190 print xy_dragged;
-#X obj 110 267 @mouse \, ...;
-#X obj 380 376 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X obj 400 376 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X obj 420 376 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X obj 380 402 @three;
-#X obj 380 431 @export_list;
-#X obj 440 352 loadbang;
-#X text 281 332 select buttons to be considered in click/drag/unclick
-;
-#X connect 0 0 6 0;
-#X connect 2 0 6 0;
-#X connect 6 0 16 0;
-#X connect 12 0 13 0;
-#X connect 12 0 11 0;
-#X connect 13 0 12 1;
-#X connect 16 0 5 0;
-#X connect 16 1 15 0;
-#X connect 16 2 7 0;
-#X connect 16 3 14 0;
-#X connect 16 4 8 0;
-#X connect 16 5 9 0;
-#X connect 16 6 10 0;
-#X connect 16 7 12 0;
-#X connect 17 0 20 0;
-#X connect 18 0 20 1;
-#X connect 19 0 20 2;
-#X connect 20 0 21 0;
-#X connect 21 0 16 1;
-#X connect 22 0 17 0;
-#X connect 22 0 18 0;
-#X connect 22 0 19 0;
diff --git a/externals/gridflow/pd_help/help_record.pd b/externals/gridflow/pd_help/help_record.pd
deleted file mode 100644
index 9d963b3d..00000000
--- a/externals/gridflow/pd_help/help_record.pd
+++ /dev/null
@@ -1,29 +0,0 @@
-#N canvas 716 268 675 409 10;
-#X obj 79 104 #camera;
-#X obj 79 44 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1;
-#X obj 137 143 #out window;
-#X obj 154 44 hsl 128 15 20 300 0 0 empty empty empty -2 -6 0 8 -260818
--1 -1 0 1;
-#X obj 137 168 fps detailed;
-#X obj 137 192 print;
-#X obj 79 78 metro 100;
-#X obj 93 245 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 123 303 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X text 143 302 stop recording;
-#X text 113 243 select filename;
-#X text 128 273 start recording;
-#X obj 108 274 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
--1;
-#X obj 79 328 #record;
-#X connect 0 0 2 0;
-#X connect 0 0 13 0;
-#X connect 1 0 6 0;
-#X connect 2 0 4 0;
-#X connect 3 0 6 1;
-#X connect 4 0 5 0;
-#X connect 6 0 0 0;
-#X connect 7 0 13 1;
-#X connect 8 0 13 3;
-#X connect 12 0 13 2;
diff --git a/externals/gridflow/pd_help/live_video_feed.pd b/externals/gridflow/pd_help/live_video_feed.pd
deleted file mode 100644
index 04aff104..00000000
--- a/externals/gridflow/pd_help/live_video_feed.pd
+++ /dev/null
@@ -1,38 +0,0 @@
-#N canvas 526 77 450 614 10;
-#X obj 91 104 #camera;
-#X obj 248 302 #out window;
-#X obj 40 40 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1
-;
-#X text 167 102 there is an [#in] within [#camera];
-#X obj 80 12 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1;
-#X obj 248 325 fps detailed;
-#X obj 248 351 print;
-#X obj 108 20 metro 50;
-#X obj 248 198 # -;
-#X obj 248 269 #clip;
-#X obj 248 220 @! abs;
-#X obj 248 244 # + 50;
-#X obj 164 141 trigger anything anything;
-#X text 281 197 230400 (240x320x3);
-#X obj 101 303 #rgb_to_greyscale;
-#X obj 101 326 #centroid;
-#X floatatom 122 377 5 0 0 0 - - -;
-#X floatatom 168 376 5 0 0 0 - - -;
-#X obj 85 375 display;
-#X connect 0 0 12 0;
-#X connect 1 0 5 0;
-#X connect 2 0 0 0;
-#X connect 4 0 7 0;
-#X connect 5 0 6 0;
-#X connect 7 0 0 0;
-#X connect 8 0 10 0;
-#X connect 9 0 1 0;
-#X connect 9 0 14 0;
-#X connect 10 0 11 0;
-#X connect 11 0 9 0;
-#X connect 12 0 8 1;
-#X connect 12 1 8 0;
-#X connect 14 0 15 0;
-#X connect 15 0 18 0;
-#X connect 15 1 16 0;
-#X connect 15 2 17 0;
diff --git a/externals/gridflow/pd_help/modify_an_image.pd b/externals/gridflow/pd_help/modify_an_image.pd
deleted file mode 100644
index 619e561a..00000000
--- a/externals/gridflow/pd_help/modify_an_image.pd
+++ /dev/null
@@ -1,33 +0,0 @@
-#N canvas 270 176 450 432 10;
-#X obj 106 140 #in;
-#X msg 147 94 open babbage.jpg;
-#X obj 89 96 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1
-;
-#X obj 106 311 #out window;
-#X text 34 368 What about getting rid of this cool acid stuff?;
-#N canvas 0 0 450 300 next_patch 0;
-#X restore 36 396 pd next_patch;
-#X obj 169 153 hsl 128 15 0 1000 0 0 empty empty empty -2 -6 0 8 -260818
--1 -1 7200 1;
-#X obj 38 52 metro 33.33;
-#X obj 38 24 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 1 1;
-#X obj 106 288 #clip;
-#X obj 226 241 # - 42;
-#X obj 143 189 # - 42;
-#X text 293 386 do [#clip];
-#X text 293 402 clip is an abstraction;
-#X obj 129 257 #scale_by;
-#X obj 233 286 #color;
-#X obj 101 215 # * 0.2;
-#X obj 209 185 / 1000;
-#X floatatom 220 213 5 0 0 0 - - -;
-#X connect 0 0 16 0;
-#X connect 1 0 0 0;
-#X connect 2 0 0 0;
-#X connect 6 0 17 0;
-#X connect 7 0 0 0;
-#X connect 8 0 7 0;
-#X connect 9 0 3 0;
-#X connect 16 0 9 0;
-#X connect 17 0 16 1;
-#X connect 17 0 18 0;
diff --git a/externals/gridflow/pd_help/printargs.pd b/externals/gridflow/pd_help/printargs.pd
deleted file mode 100644
index 39ada19e..00000000
--- a/externals/gridflow/pd_help/printargs.pd
+++ /dev/null
@@ -1,10 +0,0 @@
-#N canvas 435 101 688 277 10;
-#X text 191 203 see also:;
-#X obj 297 208 @export;
-#X text 619 13 gridflow;
-#X obj 262 208 @dim;
-#X obj 352 208 @print;
-#X text 14 15 printargs;
-#X text 144 14 prints everything;
-#X obj 401 208 rubyprint;
-#X obj 17 101 printargs lallala;
diff --git a/externals/gridflow/pd_help/rubyprint.pd b/externals/gridflow/pd_help/rubyprint.pd
deleted file mode 100644
index 2cdc5e56..00000000
--- a/externals/gridflow/pd_help/rubyprint.pd
+++ /dev/null
@@ -1,26 +0,0 @@
-#N canvas 435 101 688 277 10;
-#X text 191 203 see also:;
-#X obj 297 208 @export;
-#X obj 19 123 @three;
-#X floatatom 19 73 5 0 0 0 - - -;
-#X floatatom 37 52 5 0 0 0 - - -;
-#X floatatom 56 73 5 0 0 0 - - -;
-#X obj 112 123 @import ( 3 3 3 );
-#X obj 113 73 until;
-#X msg 113 53 27;
-#X obj 112 93 random 27;
-#X text 619 13 gridflow;
-#X obj 262 208 @dim;
-#X obj 401 208 printargs;
-#X text 14 15 rubyprint;
-#X obj 352 208 @print;
-#X obj 19 197 rubyprint;
-#X text 144 15 prints the message to the console;
-#X connect 2 0 15 0;
-#X connect 3 0 2 0;
-#X connect 4 0 2 1;
-#X connect 5 0 2 2;
-#X connect 6 0 15 0;
-#X connect 7 0 9 0;
-#X connect 8 0 7 0;
-#X connect 9 0 6 0;