diff options
400 files changed, 0 insertions, 42404 deletions
diff --git a/externals/gridflow/COPYING b/externals/gridflow/COPYING deleted file mode 100644 index eeb586b3..00000000 --- a/externals/gridflow/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 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. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, 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 or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -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 give any other recipients of the Program a copy of this License -along with the Program. - -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 Program or any portion -of it, thus forming a work based on the Program, 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) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -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 Program, 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 Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) 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; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, 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 executable. However, as a -special exception, the source code 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. - -If distribution of executable or 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 counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program 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. - - 5. 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 Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program 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 to -this License. - - 7. 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 Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program 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 Program. - -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. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program 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. - - 9. The Free Software Foundation may publish revised and/or new versions -of the 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 Program -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 Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, 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 - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "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 PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. 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 PROGRAM 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 PROGRAM (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 PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) 19yy <name of author> - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) 19yy name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/externals/gridflow/ChangeLog b/externals/gridflow/ChangeLog deleted file mode 100644 index 9110e8b8..00000000 --- a/externals/gridflow/ChangeLog +++ /dev/null @@ -1,637 +0,0 @@ -/* $Id: ChangeLog 3986 2008-07-04 21:03:52Z matju $ */ - -version 0.9.4 (2008.07.04): - - * [#convolve] takes more RAM but gets faster on OSX - * added [listread], [receives], [ascii_to_f], [plotter_parser], [list.==] - * added [cv.Invert], [cv.SVD], [expect], [#hello] - * [plotter_control] supports most other commands and uppercase selectors - * added [#in dc1394] - * added [#window] (a shortcut for a [spigot] and a [#out window]) - * rewrote [listflatten] (was removed in 0.9.2) - * [#camera] greys out unavailable options and supports dc1394 - * added "GridFlow index" in Help menu (like Pd's right-click on blank) - * made arguments optional in [#border] [#draw_image] [#draw_polygon] - * [#draw_polygon]: added attribute "draw" (fill, line) - * [#draw_polygon]: added attribute "omit" (none, last, odd) - * support whitespace in symbols again (after bug in 0.9.2) - * fixed ppm loader - * [#fft]: added attribute "real" - * added example frequency_mask.pd - -version 0.9.3 (2008.06.06): - - * fixed bugs introduced in 0.9.2 relative to: [#in] loop, [#in] initbang, - [display] selector, [#out] initbang, [#print], [#labeling], [#out window] - * added example patches instant_blur.pd game_of_life_gem.pd - * added [class_exists] - * added [#in quicktimecamera] - * fixed some example patches - * fixed some recent OSX compilation problems - * fixed OSX QuickTime decoding on Intel (endianness problem) - * fixed existing GEM 0.89 and 0.90 support - * added GEM 0.91 support (GemBase::isRunnable) - * --gem-source renamed to --gem-include - * --gem-include=bundled can compile gem support without gem source code - * swapped outlets of [#import_pix] - * added SDL mouse position event report (but buttonup does not work) - * added SDL key report - * added some SDL options: title, hidecursor, partial setcursor - * added SDL fullscreen (use key f, F11 or Escape) - * x11: replaced method "transfer" by method "shared_memory". - -version 0.9.2 (2008.05.02): - - * removed libruby dependency - -version 0.9.1 (2008.04.16): - - * switched from CVS to SVN - * removed LTIlib support - * x11: added "warp" method for moving mouse cursor around - * removed all Ruby code (rewritten in C++ or Pd) - * rewrote PPM support. now relies on libnetpbm. - (apt-get install libnetpbm10-dev) - * removed broken Targa support - * removed timelog feature in [#in]/[#out] (redundant) - * removed [joystick_port], [SoundMixer], [pd_netsocket], [rubyarray], [ls], - [system], [exec], [regsub], [memstat], [#edit], [peephole], [listmake], - [gridflow]/[#global], [sendgui], [realtimer], [bindpatcher], [renamefile] - (contact me if you need any of them) - * added [gf.error], [usertime], [systemtime], [tsctime] - * added method to_ascii in [#import] - * [display] word-wrap - * [#import] defaults to per_message mode - * removed support for ~/.gridflow_startup and GridFlow.data_path - (contact me if you need them) - -version 0.9.0 (2007.11.20): - - * new object classes: [#slice], [#sort], [#line_to_polygon]. - * rewrote some object classes from Ruby to Pd. - * split compilation of the LTIlib support allows to compile - it with reasonable amounts of RAM. - * new classes: [seq_fold], [#seq_fold], [#.var], [#noise_gate_yuvs] - * updated [#camera] - * added PWC-specific options: framerate white_mode white_red white_blue - white_speed white_delay auto_gain compression noise_reduction - * added "pwc" option in [#camera], for enabling PWC-specific options. - * colorspace conversion directly in [#in videodev] (faster) - * grid messages no longer contain dim and numbertype (just a pointer) - * GridOutlet: added set_chunk (so set_factor is obsolete) - * removed GridFlow menu - * faster [#inner] for small matrix sizes - * GridFlow won't work in plain Ruby anymore (without Pd) - * removed [pd_netsend] [jmax_udpsend] [jmax4_udpsend] [pd_netreceive] - [jmax_udpreceive] [jmax4_udpreceive] [printargs] [rubyprint] - * removed Type.rb and Contract.rb and their use in videodev.c - * [#in quicktime]: added workaround for jpeg_quality problem - * [#in quicktime]: added method "get", that produces message "frames" - that gives the number of frames in a video - * [#out]: added method "autoclose" - * removed old documentation: *-icon.png - * renamed [#export] to [#to_float] - * renamed [#export_list] to [#to_list] - * renamed [#export_symbol] to [#to_symbol] - * renamed [#export_pix] to [#to_pix] - * fixed 256MB limit bug - * fixed reassign bug - -version 0.8.4 (2006.10.12): - - * resuming support for Ruby 1.8 ! - * added compatibility with more recent versions of Ruby 1.9 - * added compatibility with more recent versions of GCC 4.x - * much more LTIlib support! (a few dozen more object classes) - * [#camera]: improved - * rblti supports ltilib 1.9.15 and gcc 4 - * new object classes: [route2], [#polygon_each_edge], - [#polygon_moment], [#polygon_radial_map], [#polygon_comparator], - [#moment_polar]. - * new float-only numops: sin cos tanh exp log atan2 - * new float-only vecops: C.sin C.cos C.tanh C.exp C.log - * [#fft] can do RGB (per channel) - * can show added inlets/outlets at runtime. - * can remove inlets/outlets at runtime (and erase them from screen). - * much faster videodev !!! - - (also unfinished [#edit_polygon] and [#draw_rect]). - -version 0.8.3 (2006.04.02): - - * added Makefile rules for downloading+installing ruby 1.9 - * new numops: weight rol ror - * new vecops concept helps with complex numbers - * new vecops: C.* C.*conj C./ C./conj C.sq- C.abs- - * [#convolve]: added attr "wrap", "anti" - * [#inner]: faster! - * [#shunt]: added attr index,mode,lo,hi - * now also works with older (non-CVS) versions of GEM - * new object classes: [#fastblur], [#t], [#rgb_to_rgba], [#rgba_to_rgb], - [#change], [#swap], [#polygon_perimetre], [#polygon_area], [args], - [#gamma], [#saturation] - * now autodetects the .gz suffix (goes with ppm/targa/grid formats) - * moved the rest of pd_help/ to doc/flow_classes/ - * automatic attribute generator for Ruby - -version 0.8.2 (2006.03.17): - - * Ruby 1.9 required - * removed jmax2pd - * fixes of various compilation problems - * new object classes: [realtimer], [#export_pix], [#import_pix], - [#border], [#fft] - * beginning support for LTIlib. new object classes: - [lti], [lti.meanShiftSegmentation], etc. - * added "load" method in [gridflow]. (thanks Claude) - * automatic attribute generator for C++ - * added "help" and "get" methods to *all* classes (!!!) - * no more "make install" - * not using mkmf.rb (ruby's makefile generator) anymore - * removed --debug-harder (use "valgrind" instead) - -version 0.8.1 (2006.02.20): - - * [ls] now supports wildcards: ? [] * ** - * [#color] has new method: delegate - * added [regsub], [memstat], [listfind], [sendgui] - * x11: removed methods: draw,autodraw; added: use_shm,title - * examples : added markov.pd, bounce.pd, doodle.pd, mechanics.pd - * [#pack],[#unpack] now default to 2 values - * new numops: clip+,clip- - * fix for shared memory bug in [#out x11] - * added [#out tk] - * added [#out opengl] (using GLUT, hackishly) - * [unix_time] behaviour changed. (see manual) - -version 0.8.0 (2005.06.06): - - * removed support for jMax 2.5 and jMax 4.1 - * added GCC 3.4 support - * added AMD64 support - * added support for puredata "datastructure" pointers (aka gpointer) - * changing the @-prefix for a #-prefix, where the old prefix still works - (the old syntax is backwards-compatible, - the new syntax is forwards-compatible) - * 13 object-classes rewritten from Ruby to Pd abstractions - * merged [@],[@!] -> [#] and added message "op" - * removed all one-input ops (see next...) - * new two-input ops: abs- sq- avg hypot sqrt rand - * [#fold],[#scan]: removed seed arg and right outlet; added msgs "op" and "seed" - * [#inner],[#convolve] : added msgs "op" and "seed" - * [#inner],[#convolve] : removed three first args (usually * + 0) - * [#inner] : removed middle inlet - * major changes to the bridge API (Ruby<->PureData) - * project "Linux Devices For Ruby" got merged in, as devices4ruby/ - * source code cleanup - * internals: split Grid into Grid+GridPtr - * internals: GridObject no longer manages GridOutlet - * internals: added classes P,PtrGrid,... - * internals: beginning to use C++'s Standard Template Library (sometimes) - * [gridflow] now has "formats" msg (to list available formats) - * [#store] added msg "op" - * [#out x11] removed flag "verbose" - * some spaces may now be omitted in gf-lists. e.g.: - ( ( 2 1 ) ( ) ) ( 3 4 ( 5 ) ) can be shortened to: ((2 1) ()) (3 4 (5)) - * new object classes: - [display], [#reverse], [#unpack], [#centroid2], [ls], [renamefile], [unix_time], - [exec], [plotter_control], [#text_to_image], [#hueshift], [rubyarray] - * in pd_examples added Alx's epicycloid.pd, scratch_video.pd, threshold.pd - and Matju's goop.pd - * some new/updated help files by St�hanie Brodeur & Darsha Hewitt - -version 0.7.7 (2004.08.24): - - * GridFlow runs on MacOS 10.2 with PureData 0.37 - * updated drag_rectangle.pd, nervous_video.pd, fire.pd, color_correction.pd - * updated feedback_fractal.pd (added morphing) - * added pd_examples/waves.pd, pd_examples/sand.pd - * added pd_examples/color_detect.pd (supersedes chroma_key.pd) - * added pd_examples/spectrogram.pd, pd_examples/photo_pianoroll.pd - * removed [rtmetro] (obsolete) - * [@store]: added methods: put_at, reassign - * [pingpong]: added $1 - * [demux] renamed to [shunt] and extra optional arg added (for initial value) - * new object classes: - [range], [#mouse], [#pack], [#color], [bindpatcher], - [#camera], [#fade_lin], [#peephole] - * videodev: added method "get" - * [@out quartz] now works properly - * [@downscale_by] accepts any number of channels - * [@inner2] removed; instead use [@transpose] with [@inner] - * videodev: "transfer" message allows to change the queue's length - * quicktime(hw): added messages "parameter", "framerate", "size" - * quicktime(hw): fixed encoding bug - * png: fixed memory leak - * ./configure --lite disables float32 float64 int64 - * ./configure --verbose prints useless details - * doc: rewrote installation instructions - * x11: fixed memory leak in resizing window - * on MacOS 10 [@out window] now defaults to [@out quartz] - * doc: added credits section - -version 0.7.6 (2004.03.22): - - * GridFlow runs on MacOS 10.2 (only with jMax 2.5) - * [@out quartz] makes a native MacOS (Cocoa+Quartz) window (warning: very buggy) - * support for Apple QuickTime movie decoding (format/quicktimeapple.c) - * file suffix detector is now extensible - * added: Ruby interface for libUSB (base/usb.c) - * x11: now emits "keypress" and "keyrelease" messages - * [@downscale_by] now supports 4 channels (therefore [peephole] does too) - * fixed bugs in: x11, @draw_image, @import, @export, ... - * "open x11" now allows any DISPLAY spec - * now includes the pictures used in the examples - (not a separate download anymore) - * [@out x11 here override_redirect] (override window manager; be careful with this) - * [pd_netsocket] does like [netsend]/[netreceive] but two-way - (warning: not complete yet) - * support for nested lists in incoming messages - * new object classes: - [delcom_usb]: support for Delcom USB I/O controller - [joystick_port]: support for linux joystick drivers - [foreach], [rubysprintf], [listflatten] - [messageprepend], [messageappend], [@transpose] - [@fade], [@centroid] - jMax emulation: [listmake], [listlength], [listelement], [listsublist] - jMax emulation: [listprepend], [listappend], [listreverse], [oneshot] - jMax emulation: [inv+], [inv*] - * Pd main window: adding GridFlow menu, Ruby/Tcl evaluators (with command-history) - * added bin/jmax2pd (converts .jmax files to .pd files) - * ported all .jmax examples to .pd (using jmax2pd) (20 out of 20) - * support for variable number of inlets/outlets (only with PureData) - -version 0.7.5 (2003.09.28): - - * type aliases: int32,i32,i; int16,i16,s; uint8,u8,b; float32,f32,f - * added support for float64 (alias f64, d) - * added support for int64 (alias i64, l) - * doc: added number type table - * @convolve: supports even-sized grids - * fixed bug: puredata gf clock ran way too fast - * rewrote the profiler subsystem (and removed bugs) - * @scale_by: now works with any number of channels - * renamed samples/ to jmax_examples/ - * Algebraic Properties Descriptions (internal, used for accelerations) - * @convolve,@outer,@for,@inner,@draw_polygon: much faster - * quicktime: support for pluggable codecs (eg: dv, divx, rpza, ...) - * quicktime: fixed more bugs - * quicktime: major speed increase - * quicktime: added "colorspace" option - * videodev: fixed bugs - * videodev: removed obsolete option "noinit" - * videodev: added option "colormodel" (especially because of new camera drivers) - * sdl: added automatic resizing of window - * png: read support - * jMax bridge: more stable than ever - * PureData bridge: *much* more stable than ever - * Operator1, Operator2 renamed to Numop1, Numop2 - * x11: now also called "window", so you can write "@out window", "open window" - * new object classes: - @draw_image: picture-in-picture, with alpha blending, etc - jmax4_udpsend: send to a jMax 4.0.x system via UDP - jmax4_udpreceive: receive from a jMax 4.0.x system via UDP - pd_netsend: send to a pd system via UDP - pd_netreceive: receive from a pd system via UDP - @eight: (like @four, but with eight of them ;-) - peephole: like [@out x11] but as inset of a patcher (jMax 2.5 only) - * support for upcoming jMax 4.1 - * "open file" autodetects how to handle a file, by filename suffix - -version 0.7.2 (2003.04.24): - - * fixed bugs in: make install, jpeg reading - * added support for float32 - * added direct .jmax decoding - * added direct .pd encoding - * pd examples moved to separate directory - * ported some .jmax examples to .pd (automated) (8 out of 20) - * added motion_detect.pd - * new classes: demux, and more jmax emulations - * @in,@out: keyword "option" may be omitted - * configure: added --ruby-prefix - * adding custom C++ pre-preprocessor - * better type checking of message arguments (better error reporting too) - * @print supports 3 dimensions, and msg "base" with arg 2,8,10,16 - * can now write loadbang-messages into an object box using the comma - * major cleanup of the source code - * added operator *>>8 (multiplication by value then division by 256) - * new classes: @rgb_to_yuv, @yuv_to_rgb - * @rotate now works with multiple axis (can work on 3D points, etc) - -version 0.7.1 (2003.03.24): - - * fixed important bugs (crashes and such) - * @store,@ can now receive in inlet 1 while sending from outlet 0. - * @, when inlet 1 grid size is small but not 1, is now much faster. - * added memcpy() usage logging (see profiler_dump) - * added examples: drag_rectangle.jmax, plot.jmax, eclipse.jmax - * added example: cellular_1d.pd - * added classes: fork, jmax_udpsend, jmax_udpreceive - * added classes: @rotate, @remap_image, @type - * added operators: gcd,lcm (common divisors/multiples) - * quicktime: added encoding, added seek, fixed bugs - * @in inlet 1 tells frame number (int), end-of-file (bang) - * @in: added: set, option loop (controlling auto-rewind) - * updated cross_fade.jmax (much faster) - * @two,@three,@four allow inlet 0 bang trigger - * configure: simpler config for jMax 2.5 - * PD help patches (by Uli Berthold) - * PD: "make install" takes care of help patches and library - * CVS web interface on artengine.ca (thanks to Alex) - -version 0.7.0 (2003.02.01): - - * new classes: @cast, @join, @ravel, @grade, @perspective - * new grid protocol supports several number types (added uint8,int16) - * added number type support in most classes - * added "option cast" for @in in some formats - * can now specify number types in grid literals - * added some MMX support (accelerates by 0%..40%) - * @import: added optional 2nd arg specifying type. - * @import: can convert symbols to grids of their ascii codes. - * new [@import per_message] yields one grid per incoming message - * [fps]: added options "user" "system" "cpu" for selecting clock - * aalib: added options autodraw, draw, dump - * aalib: added raw input (two channels: characters, attributes) - * x11: added support for 256-color mode using a private colormap. - * x11: added "use_stripes" for alternate 256-color rendering. - * fixed problems with earlier versions of Ruby (like 1.6.2) - * new samples: polygon.jmax - * videodev_effects.jmax: added sort-effects, centre-of-gravity-tracking - * the time profiler is back to working !!! - * @scale_by, @downscale_by: added right inlet, for configuration - * @store is a bit faster - * ppm: accelerated by large amount - * @outer,@inner,@inner2,@fold accelerated by obscene amount - -version 0.6.5 (2003.01.10): - - * can now encode Targa-24, Targa-32, JPEG-24 - * can now output through aalib (ascii art library) - * fixed problems with libruby.a - * tested with the new version of Ruby (1.8) - * new classes: - fps, @rgb_to_greyscale, @greyscale_to_rgb, @solarize, - @complex_sq, @export_symbol, @draw_polygon, - @apply_colormap_channelwise - * new class FPatcher, a ruby patcher/abstraction system - * @scale_to,@contrast,@spread,@posterize now available in - PureData & Ruby; they also now accept arguments. - * [@scale_to]: back to working; inlets "height" and "width" merged - * [route grid_begin] replaced by [route grid] - * [route grid_end] replaced by [@finished] - * Most everything is 10-50% faster - * changes in the internal transmission of grids - * new two-input operators: div, swapdiv, put, ignore - * compilable on MacOS 10 - -version 0.6.4 (2002.12.23): - - * can now decode JPEG (using libjpeg.so) - * many bugs fixed (especially in file formats) - * operators: log* added; tanh renamed to tanh* - * @two,@three,@four are no longer specific to the jMax side - * format grid: option headerless for reading any kind of file - * format grid: option headerful (revert to actual .grid format mode) - * fixed problems with GNU C++ version 3 - * format ppm: accelerated writing - * format modifier gzfile: gzip support also works with [@out] - * format x11: the "here" specifier is now optional - * added @checkers - * [@scale_by {y x}] for different y,x scale factors - * [@in blah blah] means "open blah blah" -> [@in] (and same with @out) - * added @downscale_by with or without smoothing - * format targa: can now decode 32 bit RGBA - * @layer: combines RGBA foreground with RGB background, yielding RGB. - * format grid options: endian big, endian little, endian same - * formats ppm,grid: use 'option rewind' to overwrite same file - (by default, rewind is no longer done after each frame) - ('option rewind' also rewinds on reading) - -version 0.6.3 (2002.12.06): - - * removing the custom leak detector ("Valgrind" program used instead) - * removed all (?) memory leaks - * videodev: new options: frequency, transfer [read|mmap], noinit - * profiler summary code rewritten - * profiler wrapper code removed - * x11: option setcursor <0-63>, option hidecursor - * x11: outlet 0 tells cursor position / button state - * more C++ification of the code - * many bugs fixed (especially crashes) - -version 0.6.2 (2002.09.17): - - * jMax objects written in (or using) Ruby now can work in PureData too. - * new format: SDL (portable output to window) - * can now compile bridges without libruby.so - * changed grid-protocol: added direct object-to-object streaming. - * bug: gridflow's clock tick back to a decent value (sorry) - * all inlets supporting grids also convert int/float as 0-D grids - * @fold and @scan now accept grids in right inlet and constructor - * @convolve is 2-3 times faster - * %,swap% are now called rem,swaprem; new %,swap% is the true modulo. - * @for now allows vectorial from/to/step values - * @identity_transform removed, change to eg: [@for{0 0}{240 320}{1 1}] - * PD users: grid literals are written like: - [@for ( 0 0 ) ( 240 320 ) ( 1 1 )] with all those spaces - * @inner,@inner2,@convolve can take right inlet grid as 4th argument - * re-enabled and improved the memory leak detector (use --debug) - * fixed many bugs and leaks - * fixed bugs in @store - * added sample: zoom.pd - -version 0.6.1 (2002.08.29): - - * now compiling GridFlow as C++ (replacing C) - * now you can use Ruby 1.7, which is faster - note: if you do so, make sure your version is dated 2002 - * new objects: rubyprint, printargs, @print, @scan, @inner - * new format: apple quicktime (using libquicktime.so) - * @in gzip support (example: "open ppm gzfile teapot.ppm.gz") - also works with targa and grid - * BitPacking now supports 1 to 4 channels instead of just 3 - * using mkmf.rb makefile generation; some MSWindows support thru Cygwin - * added geiger counter simulator in [rtmetro] - * libruby.so is only needed when using GridFlow through jMax - * now can do grid literals in @ and @outer, like [@ + {0 1}] - * syntax of @redim,@import changed from [@redim 2 3] to [@redim {2 3}] - * "3 3 # 1 0 0 1" into inlet does automatic @redim, for all objects - * grid literals accept {2 3 # 1 4 5} as an implicit [@redim {2 3}] - * objects rewritten in Ruby language: @in, @out - * updated samples, templates, documentation. - * fixed bugs - -version 0.6.0 (2002.07.31): - - * THIS IS AN EXPERIMENTAL BRANCH (VERY BUGGY) - REAL PROJECTS SHOULD USE VERSION 0.5.0 INSTEAD - * GridFlow rewritten as a plugin for Ruby instead of jMax. - * GridFlow now includes a Ruby-for-jMax bridge. - * you need Ruby 1.6.6 (including libruby.so) or compatible - * you don't need GNU Bash anymore (configurator is now a Ruby program) - * format handlers for .ppm, .tga, .grid rewritten in Ruby - * merged all Makefiles together, etc. - * sources are in base/ and format/ instead of c/src/ - * many bugs removed, many bugs added. - * will read ~/.gridflow_startup if it exists - -version 0.5.0 (2002.06.08): - - * big changes to the internals (especially use of macros) - * can compile without X11; added --no-x11 in ./configure - * removed support for jMax 2.4 - * auto-detects jMax 2.5 and jMax 3.0 - * @inner renamed to @inner2 (new, proper @inner coming soon) - * faster unary operators - * added unary operator: sq (faster squaring) - * further separation of GridFlow from jMax - * major format API changes (added Stream class) - * format "grid" now supports 8 bits per value - * support for HeroineWarrior's LibMPEG3 (reading + seeking) - * libmpeg.so (Greg Ward's) now also looked up as "libwardsmpeg.so" - * added objects: rtmetro, pingpong - * Moved CVS repository from Hostname.2y.net to Artengine.ca - * updated samples - -version 0.4.1 (2002.01.02): - - * cvs repository now has public access - * now can run configure without jmax/fts being present - * standalone version now works on Silicon Graphics and Corel Netwinder. - * MPEG format readonly (single file at a time; mpeg video layer only) - * grid TCP: non-blocking read - * fixed all known memory leaks - * X11 Shared Memory now disables itself properly on remote display - * updated help files - * updated help screenshots in the manual - * fixed profiler bugs - * fts emulation moved to c/src/ and tests moved to tests/ - -version 0.4.0 (2001.11.28): - - * package name changed from "video4jmax" to "gridflow" - * documentation *rewritten*, more precise, more structured - * documentation format is now XML (includes HTMLized version) - * can now compile without jmax/fts (if you need quicker testing...) - * added format "grid" for storing any kind of grid to disk. - * added TCP client/server socket support (with format "grid" only) - * added (timewise) profiler - * @convolve now takes up to three arguments - * Format API changes again - * "connect" merged into "open" - * "size" merged into "option" - * @video_out merged into @out - * format videodev can now do full framerate (instead of just half) - * added X11 Shared Memory support (faster image transfer locally) - * added @scale_by for quick scaling by integer factors. - * @identity_transform, @scale_to are much faster. - * many other accelerations - -version 0.3.0 (2001.11.04): - - * reworked File Format API - * grid objects now all accept lists of integers (auto-convert to 1D grid) - * many accelerations (incl large speedup on chains of binary operations) - * transformed @video_out (X11) into a "File Format" (really) and: - * allows multiple displays - * auto-resizing window - * can set output as wallpaper - * can read from the screen (screenshot) - * @video_out now a backward-compatibility wrapper - * format videodev now uses double buffer mmap (somewhat faster) - * @video_in_file, @video_out_file renamed to @in, @out (with aliases) - * new objects: - @convolve, @inner, @for - * more samples: Fire, Ripple, Game of Life, Chroma Key, Convolve, Saturation - * much improved samples: Color Correction, Linear Transform. - * use [@store uint8] for low-ram storage of values 0-255. - * videodev: added option norm 0=pal 1=ntsc 2=secam 3=auto - -version 0.2.2 (2001.08.15): - - * @video_out auto-updates on X11 ExposeEvent - * updated documentation and help - * fixed installation/config of help and summary - * split BitPacking module from @video_out - * added support for BTTV input (that is, using mmap() command) - * new videodev options: channel,tuner,contrast,hue,etc. - * now with 30 binary operators, and 3 unary operators - * added many new samples - * new objects: - @!, @fold, @outer, @dim, @redim, - @posterize, @contrast, @two, @three, - @identity_transform, @scale_to, @spread - -version 0.2.1 (2001.08.01): - - * added private CVS repository on hostname.2y.net - * added configuration script (detects video4linux 1.x) - * added documentation in HTML format - * added File Format API - * format "ppm": PPM P6 RGB24 support read-write - * format "targa": Targa RGB24 support read-only - * format "videodev": Video4linux read (using read() command only) - * @store no longer slowing down its downstream - * many other accelerations - * Tuple changed to Dim; Index removed - * Grid element type is typedef Number - * @ supports grids in right inlet - * now there are 20 binary operators - -version 0.2.0 (2001.05.05): - - * package name changed from "video" to "video4jmax" - * new kind of post() cancels repetitive log entries - * major modifications to existing objects - * new "grid transmission system" - (Tuple,Index,GridInlet,GridOutlet,GridObject) - * vout -> @video_out - * vin_file -> @video_in_file - * vout_file -> @video_out_file - * added @import, @export - * added @, @store - -version 0.1.1 (2001.04.03): - - * removed vout's grab - * vout width and height parameters swapped - * vout_file class is mostly like vout but writes to a file in PPM format. - -version 0.1.0 (2001.03.14): - - * fixed the bits_per_pixel bug - * merged in some other variations on the main sample - * included Christian's makefiles for jmax 2.5 - -version 0.0.7 (2001.03.08): - - * vout should support most types of RGB visuals now - * autodraw now works: 0=none; 1=page; 2=line; 3=pixel - * less global variables - * putting all of this under the GPL - -version 0.0.5 (2001.03.05): - - * vout class, two params: width, height; 24-bit BGR only; refresh by -finishing scanline or sending bang; "grab" (hack); "reset" for resetting -the pixel pointer. - - - -a very short history of GridFlow: - -video4jmax 0.1 (mar 2001): sending int messages to a window in jMax -video4jmax 0.2 (may 2001): grids -GridFlow 0.4 (nov 2001): xml manual; can compile without jMax -GridFlow 0.5 (jun 2002): mpeg; cvs goes to artengine.ca -GridFlow 0.6 (aug 2002): ruby; c++; literals -GridFlow 0.6.2 - 0.6.5 : pd; jpeg; big speedups; 1 grid = 1 message -GridFlow 0.7.0 (feb 2003): number types; mmx; other big speedups -GridFlow 0.7.2 - 0.7.5 : pd support gets stable; float grids; @draw_image; source_filter.rb -GridFlow 0.7.6 to 7 (2004): permanently switching from jmax to pd; #pack, #color, #camera -GridFlow 0.8 (2005): attributes; # prefix -GridFlow 0.8.1 to 4 (2006): LTI; FFT; complex numbers; GEM pix compatibility -GridFlow 0.9.0 (2008): removing Ruby, removing LTI, adding OpenCV -GridFlow 2.0 : ... diff --git a/externals/gridflow/LICENSE b/externals/gridflow/LICENSE deleted file mode 100644 index a52b16e4..00000000 --- a/externals/gridflow/LICENSE +++ /dev/null @@ -1,341 +0,0 @@ - - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 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. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, 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 or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -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 give any other recipients of the Program a copy of this License -along with the Program. - -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 Program or any portion -of it, thus forming a work based on the Program, 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) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -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 Program, 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 Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) 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; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, 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 executable. However, as a -special exception, the source code 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. - -If distribution of executable or 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 counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program 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. - - 5. 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 Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program 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 to -this License. - - 7. 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 Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program 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 Program. - -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. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program 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. - - 9. The Free Software Foundation may publish revised and/or new versions -of the 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 Program -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 Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, 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 - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "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 PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. 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 PROGRAM 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 PROGRAM (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 PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) 19yy <name of author> - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) 19yy name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/externals/gridflow/Makefile b/externals/gridflow/Makefile deleted file mode 100644 index 979358ca..00000000 --- a/externals/gridflow/Makefile +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/make -# $Id: Makefile 3748 2008-06-02 17:45:25Z matju $ - -include config.make -COMMON_DEPS = config.make Makefile base/source_filter.rb -RUBY = ruby - -#--------# - -SHELL = /bin/sh -LDSHARED = $(CXX) $(PDBUNDLEFLAGS) -RM = rm -f -CFLAGS += -Wall -Wno-unused -Wunused-variable -g -fPIC -I. - -# LDFLAGS += ../gem-cvs/Gem/Gem.pd_linux - -LDSOFLAGS += -lm $(LIBS) -OBJS2 = base/grid.o base/flow_objects.o base/number.1.o base/number.2.o base/number.3.o base/number.4.o format/main.o -SYSTEM = $(shell uname -s | sed -e 's/^MINGW.*/NT/') -FILT = $(RUBY) -w base/source_filter.rb -ifeq ($(OS),darwin) - PDSUF = .pd_darwin - PDBUNDLEFLAGS = -bundle -flat_namespace -undefined suppress -else - ifeq ($(OS),nt) - PDSUF = .dll - PDBUNDLEFLAGS = -shared - else - PDSUF = .pd_linux - PDBUNDLEFLAGS = -shared -rdynamic - endif -endif -PD_LIB = gridflow$(PDSUF) - -all:: $(PD_LIB) deprecated - -.SUFFIXES: - -H = gridflow.h.fcs - -%.h.fcs: %.h $(COMMON_DEPS) - $(FILT) $< $@ -%.c.fcs: %.c $(COMMON_DEPS) $(H) - $(FILT) $< $@ -%.m.fcs: %.m $(COMMON_DEPS) $(H) - $(FILT) $< $@ -%.o: %.c.fcs $(COMMON_DEPS) $(H) - $(CXX) $(CFLAGS) -c $< -o $@ -%.1.o: %.c.fcs $(COMMON_DEPS) $(H) - $(CXX) $(CFLAGS) -DPASS1 -c $< -o $@ -%.2.o: %.c.fcs $(COMMON_DEPS) $(H) - $(CXX) $(CFLAGS) -DPASS2 -c $< -o $@ -%.3.o: %.c.fcs $(COMMON_DEPS) $(H) - $(CXX) $(CFLAGS) -DPASS3 -c $< -o $@ -%.4.o: %.c.fcs $(COMMON_DEPS) $(H) - $(CXX) $(CFLAGS) -DPASS4 -c $< -o $@ -%.o: %.m.fcs $(COMMON_DEPS) $(H) - $(CXX) $(CFLAGS) -xobjective-c++ -c $< -o $@ - -%.s: %.c.fcs $(COMMON_DEPS) $(H) - $(CXX) $(CFLAGS) -S $< -o $@ -%.e: %.c.fcs $(COMMON_DEPS) $(H) - $(CXX) $(CFLAGS) -E $< -o $@ - -.PRECIOUS: %.h.fcs %.c.fcs %.m.fcs - -base/mmx.asm base/mmx_loader.c: base/mmx.rb - $(RUBY) base/mmx.rb base/mmx.asm base/mmx_loader.c -base/mmx.o: base/mmx.asm - nasm -f elf base/mmx.asm -o base/mmx.o - -unskew:: - find . -mtime -0 -ls -exec touch '{}' ';' - -$(PD_LIB): gridflow.c.fcs $(OBJS2) $(OBJS) $(H) $(COMMON_DEPS) - $(CXX) -DPDSUF=\"$(PDSUF)\" -Ibundled/pd $(LDSOFLAGS) $(CFLAGS) $(PDBUNDLEFLAGS) $(LIBPATH) \ - gridflow.c.fcs -xnone $(OBJS2) $(OBJS) -o $@ - -beep:: - @for z in 1 2 3 4 5; do echo -ne '\a'; sleep 1; done - -install:: - @echo -e "\033[0;1;33;41m" - @echo -e "1. move this folder to lib/pd/extra or add the folder to -path" - @echo -e "2. delete the old gridflow.pd_linux" - @echo -e "3. and don't do \"make install\" anymore\033[0m\n" - -DEPRECATED = camera_control motion_detection color mouse fade scale_to \ - apply_colormap_channelwise checkers contrast posterize ravel remap_image solarize spread \ - rgb_to_greyscale greyscale_to_rgb rgb_to_yuv yuv_to_rgb rotate in out - -deprecated:: deprecated/@fade.pd deprecated/@!.pd doc/flow_classes/@complex_sq-help.pd - -deprecated/@fade.pd: abstractions/\#fade.pd - for z in $(DEPRECATED); do cp abstractions/\#$$z.pd deprecated/\@$$z.pd; done - -deprecated/@!.pd: deprecated/0x40!.pd - for z in complex_sq convolve fold inner \! scan; do cp deprecated/0x40$$z.pd deprecated/@$$z.pd; done - -doc/flow_classes/@complex_sq-help.pd: doc/flow_classes/0x40complex_sq-help.pd - for z in complex_sq join; do cp doc/flow_classes/0x40$$z-help.pd doc/flow_classes/@$$z-help.pd; done - -clean:: - @-$(RM) gridflow.pd_linux *.o */*.o *.so - rm -f $(OBJS2) $(OBJS) base/*.fcs format/*.fcs optional/*.fcs \ - $(patsubst %,deprecated/@%.pd,$(DEPRECATED)) - -#--------#--------#--------#--------#--------#--------#--------#-------- - -help:: - @echo "do one of the following:";\ - echo "make all compiles gridflow";\ - echo "make beep beeps";\ - echo "make unskew removes timestamps in the future (if you have clock issues)" - -#--------#--------#--------#--------#--------#--------#--------#-------- - -kloc:: - wc configure base/*.rb diff --git a/externals/gridflow/README b/externals/gridflow/README deleted file mode 100644 index 970631f6..00000000 --- a/externals/gridflow/README +++ /dev/null @@ -1,48 +0,0 @@ -,-o----o----o----o-. -| GridFlow 0.9.0 | -`-o--------------o-' - | -.-o-------------------------------------------------------------- -| Directory layout - - ./base ............. object classes written in C++ and Ruby - ./bin .............. programs startable as applications - ./bridge ........... connectors between Ruby and PureData/etc - ./bundled .......... files from other packages, bundled here for convenience - ./cpu .............. cpu-specific code - ./CVSROOT .......... project information for version control - (not in official releases) - ./format ........... format handlers written in C++ and Ruby (optional) - ./devices4ruby ..... misc Ruby plugins for hardware interfaces - ./doc .............. complete documentation in HTML, with XML source - ./doc/flow_classes . help files (.pd) - ./doc/images ....... images that go with the HTML doc - ./doc/tutorials .... tutorials - ./examples ......... more complex Pd programs showing off more practical uses. - (this will replace ./pd_examples in the future). - ./extra ............ useful small programs (mostly in Ruby) - ./images ........... sample images shared by ./samples, ./help, ./doc - ./optional ......... optional classes but not format handlers - ./pd_abstractions .. Pd object classes written in Pd - ./pd_examples ...... more complex Pd programs showing off more practical uses. - ./tests ............ will contain Pd programs that test GridFlow itself. - (see also: the PureUnity project) -Legalese - - 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. - - 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. - - - -CVS - - $Id: README 3056 2007-10-24 15:08:56Z ac $ diff --git a/externals/gridflow/TODO b/externals/gridflow/TODO deleted file mode 100644 index c6a1818a..00000000 --- a/externals/gridflow/TODO +++ /dev/null @@ -1,431 +0,0 @@ -/* $Id: TODO 3975 2008-07-04 19:57:32Z matju $ */ - -0.9.5 -[ ] get rid of architecture.html -[ ] support "get" in abstractions -[ ] fix [nbx]<->[hsl] relationship in [#camera] -[ ] bugs roman -[ ] add claude's fixes -[ ] other gf mails in inbox -[ ] #line_to_polygon is buggy -[ ] #draw_polygon init_lines() not sufficiently called -[ ] regular dc1394 options -[ ] irregular dc1394 options: white_shading, white_balance - trigger_mode? trigger, trigger_delay -[ ] Accumulation of Background Statistics -[x] correction/détection de translations dans l'image (avec fft et #remap_image). -[ ] cvEstimateRigidTransform -[ ] compenser pour les ajustements progressifs ou soudains de luminosite -[x] ajouter detection et correction d'interference par fft -[ ] cvEllipse -[ ] cvApproxPoly pour un seul poly `a la fois -[ ] cvMeanShift (?) -[ ] cvCamShift (?) - Ça s'utilise presque comme MeanShift, sauf que ça requiert un autre type non-grid. - Celui-ci peut être représenté comme une grid de 5 éléments pour faire plus facile - (contrairement à cvHistogram, qui contient une grid ND mais a besoin de quelques fields de plus que ça). -[ ] cvCalcBackProject (?) -[ ] cvCalcHist, cvCreateHist. -[ ] on doit aussi commencer à rajouter des types non-grid. Le premier sera CvHistogram et est requis pour tous les objets dont le nom contient "Hist". -[ ] SnakeImage (what is the concept of 'energy', squared luminosity?) - J'aurais supposé que oui, mais c'est juste trois mesures reliées à trois forces qui "shapent" la courbe: - espacement égal des points, réduction des angles, et correspondance avec l'image même (qui doit normalement - être un edge-detect d'une image plus vieille). -[ ] cvOpticalFlow - -whatever version -[ ] [cv.split] -[ ] reestablish 'gzfile' feature in a better way. (gzfile is disabled for now) -[ ] ... -[ ] [fps]: translate into pd: "publish if fps>0.001" (to remove outliers) -[ ] conversion from float to int is inconsistent: when to round and when to trunc? -[ ] reimplement negative indices in [listelement] and [listsublist] -[ ] with pwc, 720x480 crashes -[ ] fix SDL modifiers -[ ] fix quoting in [display] - -soon: - * remove reference.*ml - * videodev.c should be upgraded to V4L2 asap. - -+-------+-------+-------+-------+-------+-------+-------+------- -Common Video Framework : - -[ ] a common library for all video IO (cameras, files, web), which is the - project of Thomas H and Johannes. - -[ ] a six-way converter for GEM/PDP/GridFlow. There are already - converters between GEM and PDP and between GEM and GridFlow but - there is none between PDP and GridFlow and then some things could - be easier to install and run in a cross-platform way. - -[ ] a way to make GEM/PDP/GF conversions *implicitly* instead of - having objects for that. - -[ ] threads for video? -[ ] GEM geos vs 3DP: how do they compare? -[ ] is there anything else deserving to be unified between the video plugins? -[ ] videojack -[ ] http://gstreamer.freedesktop.org/ -[ ] distinguish between C++ types Grid* and GridFlow* -[ ] make [#draw_points] [#draw_rect] [#edit_polygon] -[ ] Salsaman recommends supporting Videojack because of unicap support which means getting DV support for free. -[ ] look at camorama -[ ] OpenCV -[ ] Generic Image Library: http://opensource.adobe.com/gil/html/giltutorial.html -[ ] [for] has a bug in "from". -[ ] #out x11 doesn't accept 0-sized grids -[ ] #print doesn't accept 0-sized grids -[ ] #inner doesnt support seeds of size>1, and isn't vecop-compatible, and ... -[ ] #inner could optimise permutation matrices? -ClaudiusMaximus matju: [#draw_image] inlet 0 method "op <opname>" is undocumented, but very useful :) -ClaudiusMaximus matju: [unix_time] is maldocumented, outlet 0 is a grid Dim[28](uint8), not a symbol - -[ ] update doc -[ ] claude wants http://en.wikipedia.org/wiki/Graham_scan - -malloc alignment = 4 mod 8 (en utilisant valgrind) - -ClaudiusMaximus matju: feature request: [#store4], behaves like store but accepts grids -of floats as coordinates and interpolate using 4-point interpolation, eg, right inlet -> -(3 3 f # 0 0 0 1 1 1 2 4 8), left inlet -> (1 # 0.5) outputs (0.5 0.5 0.5) -(or whatever the interpolation would really be), left inlet (2 # 1.5 1.5) outputs (3) - -http://oprofile.sourceforge.net/about/ -also: qprofile, amd profiler, opreport -cl --demangle=smart - -[ ] -ftree-vectorizer-verbose -[ ] try removing or modifying -falign on PPC/OSX -[ ] encoding of quicktime RGBA only works with [#cast b] (is that still true?) -[ ] reading tux.tga is completely broken -[ ] install of libquicktime is very wrong on my system (is it 0.9.8?) -[ ] make example on separable convkernels -[ ] add concepts of hot inlet and conf inlet at the code level -[ ] [display] should use clocks to update tk less often -[ ] [display] leaks in server ? -[ ] deprecation warnings -[ ] Add a video latency patch (in examples) -[ ] Numop: warn on misalignment -[ ] remove GridInlet* ? -[ ] configure chokes if GCC3 doesn't have the C++ plugin -[ ] [#import~] -[ ] [#export~] -[ ] [#expr] -[ ] [#line]? [#pipe]? [#delay]? -[ ] #: option swap -[ ] consider including [mysql] [renamefile] [ls] [shell] -[ ] re-enable int64,float64 -[ ] added #matrix_solve, #slice -[ ] Copy-on-Write (COW) -[ ] internals documentation -[ ] internal grid protocol redesigned -[ ] raise limit of in/outlets from 10 to 100 or unlimited. -[ ] look into -ftree-vectorize -[ ] look at Tetra Piccolo capture cards, as well as ImpactVCB (Hauppauge) - -[145] "list -1"->[@import] only tells error message once every other time -[144] small leak remaining in x11. may have to do with non-use of XDestroyImage. -[140] is [@convolve] actually cross-convolution? - that is, convolves with a mirror image of the convolution matrix. -[139] [peephole] - <mis> matju: if you try to move the GOPed abstraction the peepholes don't move along - <mis> he :) better yet, the abstraction's bounding box's lower right corner will not - move up or to the left of the low right corner of the peephole it contains. - Instead it will resize itself as you move it around. -[134] #import with zero size crashes? -[133] numop ** can freeze GF -[117] osx: [#store] crash instead of raising -[107] MMX computations may be done misaligned, which may be bad. -[105] when file not found, mpeg error messages are wrong, they say the filename is "". -[102] osx: error: shmget failed (cannot allocate memory) in X11, for regular pictures -[078] "unsupported codec" bogus errors. -[025] format_grid: write test for other bpv's -[030] FormatGrid: not properly tested (crashes sometimes) -[031] stdout should be redirected if bridge is present -[034] format/mpeg3.c,quicktime.c might cause lockup on exit -[038] some seeds aren't typechecked -[039] jpeg file cat crashes on second file (jpeglib buffering?) -[040] GRID_FINISH triggered while backstore ??? -[079] can trap segfaults in codecs of libquicktime. -[090] http://poynton.com/notes/colour_and_gamma/ColorFAQ.html#RTFToC30 -[041] what would be a way to make GF work well with Pd's idea of a list? -[045] write unit tests about required functionality -[046] write unit tests about error checking -[047] make system to ensure everything is working before a release. -[048] potential issues between fork() and X11 ? -[054] it's possible to crash by sending data in two inlets of a same object at once - ---- make the development process more test-driven: - * file every feature request and bug report into base/test.rb so - that gridflow fails those tests THEN make gridflow pass those tests. - -=================== - -Installation -[ ] less compile-time checks and more run-time checks -[ ] should GridFlow be bundled with some of its own dependencies? -[ ] find a good profiler (not gridflow's internal...) -[ ] cross-compile: - http://www.libsdl.org/extras/win32/cross/ - http://rooster.stanford.edu/~ben/linux/cross.php - -Documentation -[ ] make a short feature list as a promo -[ ] add credits -[ ] document how to report bugs, basic troubleshooting -[ ] document our distribution of the archives -[ ] ascii conventions: [foo] vs "foo", etc. -[ ] document internals -[ ] describe indexmap in doc -[ ] document backward compatibility issues -[ ] architecture: class->type/shape->use->role -[ ] heavily hyperlink documentation -[ ] automate more parts of the documentation -[ ] benchmarks (especially: simple video i/o) -[ ] mimic [pdp_help_input] [pdp_help_output]: they are convenient ---- remember to keep doc/help/screenshots/examples up to date - -Architecture -[0.9] reentrancy of objects (to allow true recursion) -[0.9] inlet-attrs (attrs associated to inlets) -[ ] eliminate the Dim class, replacing by Grid itself (?). -[ ] pull mode (functional-style) -[ ] bidirectional messages (constraint/relational-style) -[ ] send-reply messages (imperative-style) -[ ] add reflection (#global:classes, #global:methods, ...) -[ ] transmitting grids by diffs? -[ ] dispatch on _#{i}_-named methods (any selector one inlet) -[0.9] generalize the backstore -[ ] Outlet#buffer should harmonise with the lcm of its corresponding Inlet#factor's. -[ ] lazy grids: Grid#operator T* makes sure all the grid is received - and Grid#range(int start, int n, T bogus) makes sure the - specified part of the grid is received. -[0.9] accounting: grids messages packets numbers bytes copybytes -[0.9] memory profiling -[ ] add a "query" class for debugging other objects? - (would be able to extract extra info from each object/class) -[ ] add a GridFlow::LaterException or something - (which tells to retry later with the same packet because another - grid reception is not completed yet.) -[ ] interpret nested lists as n-dimensional. -[0.9] MMX memcpy() ? -[0.9] MMX _runtime_ autodetection - -Computation Objects -[ ] #counter (similar to #for) -[ ] #for "step" argument should have default {1...} -[ ] zero option in #convolve (?) -[ ] #conv (simpler #convolve) should allow n-D convolution -[ ] #convolve rewritten as combination of #conv+#border ? -[ ] #store: option zero (?) -[ ] #import~, #export~ -[ ] #fold, #scan: option reverse (right-to-left) -[ ] #join: option swap -[ ] #matrix_inverse, #matrix_solve -[ ] #timeline (or rtmetro): sequencing of events from grid -[ ] #replace_if, #random_select, #markov_chain, #sort, #slice, #splice -[ ] #polygon_perimeter, #polygon_area, #draw_polygon smoothly -[ ] fuzzy #store (interpolate) -[ ] write a complete benchmark script -[ ] spatial biquads (ask Tom) -[ ] string operations to compensate for the feebleness of PD in that area. - this includes [#sprintf]. ---- see also APL/J/NArray/PDL/Aplus/Yorick/IPOW reference - -Effects -[ ] #mosaic -[ ] #gaussian_blur, #sobel, #pixelize, #despeckle (median) -[ ] #dither, #draw_lines, #draw_points, #fire, #queue -[ ] #chroma_key: i0=RGBpicture i1=RGBcolor i2=tolerance o0=RGBApicture - with fuzzy flag; (don't call it #chroma_key though) - maybe #mask... -[ ] turtle (logo style) -[ ] effectv -[ ] create abstractions for usage patterns (eg: like #remap_image) -[ ] see gimp for ideas -[ ] kaleidoscopes -[ ] bilinear interpolation a+(b-a)*x+(c-a)*y+(a-b-c+d)*x*y (#scale_by smoothly?) -[ ] #scale_by/#downscale_by fractional values -[ ] bicubic interpolation -[ ] multilinear interpolation (n-dimensional?) -[ ] #daltonism -[ ] #perlin ? -[ ] #moment could support more than 2 dimensions - -#<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"] - -Input/Output -[ ] a #store that is persistent (saved in .pd) ? -[ ] Grid: support storage in all six types -[ ] Grid: bpv 1,2,4 uint -[ ] Grid: text version of the format -[ ] Gimp, GStreamer, ffmpeg, xine, mplayer, PDP, OSC -[ ] get subtitling of tv channels -[ ] add messages "load", "save" as open,bang,close combos. (?) -[ ] x11,sdl,aalib: use buffering to synchronise frames at a constant rate. -[ ] x11: sync with the actual vsync of the monitor -[ ] x11: double buffering using a Pixmap remote-object -[ ] [serial_port] -[ ] support for audio in the mpeg streams -[ ] synchronized audio with the video when using mpeg1 & 2 -[ ] full screen mode (without the menu bars or frames) -[ ] support for audio in cameras / videodev ... see field vcaps.audios - -Format -[ ] remaining number type support in formats -[ ] fork: pseudoformat for launching format handler as separate process -[ ] put_at/reassign in x11/sdl/quartz -[ ] Generic SHM/MMAP Drivers -[ ] "open grid pipe" and such. -[ ] multi: multi-file (by glob pattern, e.g.: foo*.ppm) -[ ] AVI -[ ] format grid: "headerless until 10" (text files) - -User Interface -[ ] color picker -[ ] #edit, grid edition dialog, etc. -[ ] vector slider (n parallel sliders in one, Dim(n)) -[ ] 2d slider -[ ] radial slider (angle chooser) -[ ] drag-and-drop palette of object construction -[ ] object construction menu specialized for each class (generated from class reflection/metadata) - -Extra/Examples/Etc -[ ] .pd: read; write better -[ ] examples/generique.pd -[ ] add examples from the workshop, etc - -<matju> alx: -le tab completion ne donnerait pas seulement les noms possibles pour le -prochain argument dans le objectbox; il donnerait aussi une description de -l'argument (surtout dans le cas où l'argument a beaucoup de valeurs -possibles). je pense que le help de Pd est une bonne idée (le concept hands-on) -mais ça pourrait aller plus loin. j'ai pensé intégrer le manuel de référence de -gridflow directement dans le programme, disponible au runtime, dans l'éventualité -d'un GUI qui saurait en tirer avantage. - -<alx1> matju: détecter les formes; détecter les couleurs; support mpeg4; hotspots - -ClaudiusMaximus reports that allocating a 197M grid causes a crash (turns out C++ -throws exception, can't allocate, signal ABRT) - -ClaudiusMaximus says: I want to be able to send output from Pd+Gridflow to a video4linux -loopback device so that other v4l programs can access the stream. -I found the video loopback device here: http://motion.sourceforge.net/vloopback/ - -<alx2> -iSight on linux : http://episteme.arstechnica.com/6/ubb.x?a=tpc&s=50009562&f=8300945231&m=40110681 -needs something called 'coriander'. the person who got it working mentions libdc1394. -http://www.tele.ucl.ac.be/PEOPLE/DOUXCHAMPS/ieee1394/cameras/index.html: -I learn that the iSight is compliant with version 1.30 of IIDC. -the docs for coriander mention that the author needed to create a major and minor device for the camera. -retyping (damn pdf's) -> there are two devices to create: raw1394 and video1394 -raw1394 has major 171 and minor 0 while video1394 had major 171 and minor 16 -any useful info? -having a camera like the iSight supported could be fantastic for video capture/detection on a laptop. Not to mention that the bttv cards are getting harder to locate - --mfpmath=sse2 - -remember to check for volatile VALUEs if GC problems ever occur - -Tom Schouten wrote: " -added demo/rawvideo.pf and some support scripts in bin/pf-rawvideo.* -this is an example on how to use external programs for raw video input. -rationale: -mplayer is a very nice piece of software supporting virtually any input -format/codec. since i'm not planning to waste time on integrating more -input codecs in pf, the best alternative is to have mplayer (actually -mencoder) or ffmpeg as a subprocess. -the same will be done for recording later. -" - -very old bookmarks: - http://pdl.perl.org/ - http://www.opendragon.com/Pages/MaxObjects.shtml (not responding) - gstreamer - Arts Builder - http://homepages.inf.ed.ac.uk/rbf/HIPR2/wksheets.htm - http://freej.dyne.org/ - -FObject.subclass("rubyarray",2,2) { - def initialize() @a=[]; @i=0; end - def _0_get(s=nil) - case s - when :size; send_out 1,:size,@a.size - when nil; _0_get :size - end - end - def _0_clear; @a.clear end - def _0_float i; @i=i; send_out 0, *@a[@i] if @a[@i]!=nil; 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 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("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 -} - -there are bugs with abstractions that use [route]->[list] instead of [route2] because they fail when $1="list". - -svn propset svn:mime-type text/pure-data *.pd - -Benchmarks on a Pentium M 1733 (with #out x11): -(fps) 0.9.0 0.9.3 0.9.4 -waves.pd rain 41.1 49.5 50.5 -game_of_life.pd 162 183 188 -sand.pd 18.7 20.5 20.1 -cellular_1d.pd 115 130.1 130 -wave_1d.pd 63.0 81.7 81.7 - -Benchmarks on a Pentium M 1733 (without window): -(fps) 0.9.0 0.9.3 0.9.4 -waves.pd rain 50.1 63.0 -game_of_life.pd 397 507 -sand.pd 27 30 -cellular_1d.pd 475 730 -wave_1d.pd 107 173 - - - diff --git a/externals/gridflow/abstractions/#apply_colormap_channelwise.pd b/externals/gridflow/abstractions/#apply_colormap_channelwise.pd deleted file mode 100644 index c63a7651..00000000 --- a/externals/gridflow/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 77 #store; -#X obj 17 97 outlet; -#X obj 67 17 inlet; -#X obj 17 57 # + (3 2 # 0 0 0 1 0 2); -#X obj 17 37 #outer & (-1 0); -#X connect 0 0 5 0; -#X connect 1 0 2 0; -#X connect 3 0 1 1; -#X connect 4 0 1 0; -#X connect 5 0 4 0; diff --git a/externals/gridflow/abstractions/#background_model.pd b/externals/gridflow/abstractions/#background_model.pd deleted file mode 100644 index 07db6465..00000000 --- a/externals/gridflow/abstractions/#background_model.pd +++ /dev/null @@ -1,93 +0,0 @@ -#N canvas 563 12 770 687 10; -#X text 415 -1 sliding buffer; -#X obj 104 302 # sq-; -#X obj 104 370 # /; -#X text 57 293 input; -#X obj 104 393 #fold +; -#X text 171 302 <-- (input-mean)exp2; -#X text 170 287 mean; -#X text 369 -28 takes a grid as input; -#X text 569 557 getModel; -#X text 569 577 clearModel; -#X obj 183 544 tgl 15 0 empty empty binaryFlag 0 -6 0 8 -24198 -1 -1 -1 1; -#X text 568 534 adaptBackground (const image src \, const channel8 -mask); -#X obj 104 578 shunt; -#X text 195 194 <-- output is an average; -#X text 201 215 <-- recentre les coordonnees selon la moyenne; -#X obj 103 -136 inlet; -#X obj 104 659 outlet; -#X obj 190 512 inlet binary_flag; -#X obj 282 -22 t a b; -#X floatatom 312 20 5 0 0 0 - - -; -#X msg 312 37 put_at ( \$1 0 0 0 ); -#X text 314 66 <-- this \$1 corresponds to the first argument given -to the abstraction. The \$1 in the "put_at" message box is simply the -indice from the counter.; -#X text 282 145 <-- the number of frames that will establish the backgroundModel -; -#X obj 103 -95 t a b a; -#X obj 126 121 #t; -#X text 260 262 variance = standard deviation \, squared; -#X text 523 210 (X - EX)squared; -#X text 146 344 <-- variance; -#X text 145 368 <-- squeeze; -#X text 173 390 <-- applies the pythagore theorem; -#X text 158 316 <-- fudge factor because we are not in float \, could -try as float throughout instead; -#X obj 250 566 inlet output_threshold; -#X text 254 608 <-- checks to see if the value is within 0-255; -#X text 158 660 <-- output is greyscale (channel8 in lti parlance) -; -#X text 124 468 <-- "malanowis distance" of each pixel to the background -; -#X text 297 -50 ------------ addBackground ----------; -#X obj 104 416 #redim ( \$2 \$3 1); -#X obj 126 69 #store ( \$1 \$2 \$3 \$4 #); -#X obj 147 -56 spigot; -#X obj 190 -83 inlet addBackground; -#X text 242 416 <-- adds a channel; -#X obj 217 283 outlet variance; -#X obj 265 177 outlet Mean; -#X obj 312 0 count 0 \$1; -#X obj 126 200 # sq-; -#X obj 176 119 #fold + \, seed ( \$2 \$3 \$4 #); -#X obj 176 147 # / \$1; -#X obj 127 235 #fold + \, seed ( \$2 \$3 \$4 #); -#X obj 165 260 # / \$1; -#X obj 135 607 # > 128; -#X obj 134 628 # * 255; -#X connect 1 0 2 0; -#X connect 2 0 4 0; -#X connect 4 0 36 0; -#X connect 10 0 12 1; -#X connect 12 0 16 0; -#X connect 12 1 49 0; -#X connect 15 0 23 0; -#X connect 17 0 10 0; -#X connect 18 0 37 1; -#X connect 18 1 43 0; -#X connect 19 0 20 0; -#X connect 20 0 37 1; -#X connect 23 0 1 0; -#X connect 23 1 37 0; -#X connect 23 2 38 0; -#X connect 24 0 44 0; -#X connect 24 1 45 0; -#X connect 31 0 49 1; -#X connect 36 0 12 0; -#X connect 37 0 24 0; -#X connect 38 0 18 0; -#X connect 39 0 38 1; -#X connect 43 0 19 0; -#X connect 44 0 47 0; -#X connect 45 0 46 0; -#X connect 46 0 1 1; -#X connect 46 0 42 0; -#X connect 46 0 44 1; -#X connect 47 0 48 0; -#X connect 48 0 2 1; -#X connect 48 0 41 0; -#X connect 49 0 50 0; -#X connect 50 0 16 0; diff --git a/externals/gridflow/abstractions/#camera.pd b/externals/gridflow/abstractions/#camera.pd deleted file mode 100644 index e175eb89..00000000 --- a/externals/gridflow/abstractions/#camera.pd +++ /dev/null @@ -1,354 +0,0 @@ -#N canvas 599 0 421 345 10; -#X obj 81 31 cnv 15 184 68 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 143 34 hradio 12 1 0 4 \$0-s_channel \$0-channel _0_1_2_3 -2 -7 1 10 -233017 -195568 -195568 0; -#N canvas 275 0 906 659 camera 0; -#X obj 310 510 outlet; -#X obj 51 9 inlet; -#X obj 63 198 t a; -#X msg 700 458 open videodev \$1 \, get; -#X msg 673 309 size \$1 \$2; -#X obj 598 8 r \$0-size0; -#X msg 673 8 120 160; -#X msg 673 27 120 180; -#X obj 598 27 r \$0-size1; -#X msg 673 46 240 320; -#X msg 673 65 240 360; -#X obj 598 46 r \$0-size2; -#X obj 598 65 r \$0-size3; -#X obj 598 84 r \$0-size4; -#X obj 598 103 r \$0-size5; -#X msg 673 84 480 640; -#X msg 673 103 480 720; -#X obj 598 122 r \$0-size6; -#X obj 598 141 r \$0-size7; -#X msg 673 122 576 720; -#X msg 673 141 288 352; -#X obj 673 204 unpack 0 0; -#X obj 768 223 s \$0-width; -#X obj 673 223 s \$0-height; -#X obj 673 271 #pack; -#X obj 673 290 #export_list; -#X obj 700 439 makefilename /dev/video%d; -#X obj 85 419 spigot; -#X obj 308 579 args (device a -1); -#X obj 308 560 loadbang; -#X obj 308 617 s \$0-device; -#X obj 85 441 route pwc; -#X msg 85 460 pwc \$1 \, get; -#X obj 51 28 list split 1; -#X obj 51 47 makefilename \$0-%s; -#X obj 51 104 s; -#X obj 51 85 list; -#X obj 51 66 t b s; -#X msg 684 482 open dc1394 \, get; -#X obj 391 287 listfind y yuv rgb magic; -#X obj 391 344 listread y yuv rgb magic; -#X msg 391 363 colorspace \$1; -#X obj 181 66 list prepend; -#X obj 181 85 list trim; -#X obj 174 174 foreach; -#X obj 174 193 makefilename \$0-%s; -#X msg 174 212 \; \$1 color 10 20 20; -#X msg 179 559 \; \$1 color 18 17 22; -#X obj 122 381 t b a b b; -#X obj 391 306 s \$0-colorspace_e; -#X obj 391 325 r \$0-s_colorspace_e; -#X obj 673 243 r \$0-s_height; -#X obj 768 243 r \$0-s_width; -#X obj 656 368 r \$0-s_device; -#X obj 580 186 r \$0-size; -#X msg 180 400 0; -#X msg 122 400 1; -#X obj 580 205 route2 color; -#X obj 580 224 s \$0-sizec; -#X obj 571 243 s \$0-width; -#X obj 561 263 s \$0-height; -#X obj 371 265 route2 color; -#X obj 371 246 r \$0-colorspace; -#X obj 635 538 s \$0-title; -#X msg 635 519 label \$1; -#X obj 563 481 r \$0-name; -#X obj 563 500 route color; -#X msg 490 591 close; -#X msg 490 612 label No_camera_selected; -#X msg 339 181 label Unknown_camera; -#X obj 339 200 s \$0-title; -#X obj 731 8 r \$0-minsize; -#X obj 731 46 unpack 0 0; -#X obj 796 65 s \$0-minwidth; -#X obj 731 84 s \$0-minheight; -#X obj 731 141 unpack 0 0; -#X obj 731 103 r \$0-maxsize; -#X obj 731 179 s \$0-maxheight; -#X obj 796 160 s \$0-maxwidth; -#X obj 731 27 route list; -#X obj 731 122 route list; -#X obj 393 522 s \$0-minsize; -#X msg 393 501 0 0; -#X obj 403 542 s \$0-maxsize; -#X obj 656 387 t a b; -#X obj 67 482 r \$0-palette; -#X obj 139 539 s \$0-palette2; -#X msg 139 520 label \$1; -#X obj 25 563 route minsize maxsize; -#X obj 67 501 route color; -#X obj 181 8 receives \$0-s_ channel tuner frequency brightness contrast -colour hue whiteness white_mode white_red white_blue white_speed white_delay -auto_gain framerate noise_reduction compression pwc size colorspace -norm transfer; -#X msg 174 116 list channel tuner frequency brightness contrast colour -hue whiteness white_mode white_red white_blue white_speed white_delay -auto_gain framerate noise_reduction compression pwc size colorspace -norm transfer; -#X obj 714 505 r \$0-transfer; -#X obj 754 544 listfind read mmap; -#X obj 744 563 s \$0-transfer_e; -#X obj 744 582 r \$0-s_transfer_e; -#X obj 744 601 listread read mmap; -#X msg 744 620 transfer \$1; -#X obj 714 524 route2 color; -#X obj 308 598 mod 11; -#X obj 656 417 range 8 9 10; -#X msg 434 399 open quicktimecamera \, get; -#X connect 1 0 33 0; -#X connect 2 0 27 0; -#X connect 3 0 48 0; -#X connect 4 0 0 0; -#X connect 5 0 6 0; -#X connect 6 0 21 0; -#X connect 7 0 21 0; -#X connect 8 0 7 0; -#X connect 9 0 21 0; -#X connect 10 0 21 0; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 13 0 15 0; -#X connect 14 0 16 0; -#X connect 15 0 21 0; -#X connect 16 0 21 0; -#X connect 17 0 19 0; -#X connect 18 0 20 0; -#X connect 19 0 21 0; -#X connect 20 0 21 0; -#X connect 21 0 23 0; -#X connect 21 1 22 0; -#X connect 24 0 25 0; -#X connect 25 0 4 0; -#X connect 26 0 3 0; -#X connect 27 0 31 0; -#X connect 28 0 99 0; -#X connect 28 1 0 0; -#X connect 29 0 28 0; -#X connect 31 0 32 0; -#X connect 31 1 0 0; -#X connect 32 0 48 0; -#X connect 33 0 34 0; -#X connect 33 1 36 1; -#X connect 34 0 37 0; -#X connect 34 0 88 0; -#X connect 36 0 35 0; -#X connect 37 0 36 0; -#X connect 37 1 35 1; -#X connect 38 0 48 0; -#X connect 39 0 49 0; -#X connect 40 0 41 0; -#X connect 41 0 2 0; -#X connect 42 0 43 0; -#X connect 43 0 2 0; -#X connect 44 0 45 0; -#X connect 45 0 46 0; -#X connect 48 0 56 0; -#X connect 48 1 0 0; -#X connect 48 2 69 0; -#X connect 48 2 91 0; -#X connect 48 3 55 0; -#X connect 50 0 40 0; -#X connect 51 0 24 0; -#X connect 52 0 24 1; -#X connect 53 0 84 0; -#X connect 54 0 57 0; -#X connect 55 0 27 1; -#X connect 56 0 27 1; -#X connect 57 0 58 0; -#X connect 57 0 59 0; -#X connect 57 0 60 0; -#X connect 57 1 21 0; -#X connect 61 0 49 0; -#X connect 61 1 39 0; -#X connect 62 0 61 0; -#X connect 64 0 63 0; -#X connect 65 0 66 0; -#X connect 66 1 64 0; -#X connect 67 0 48 0; -#X connect 67 0 68 0; -#X connect 67 0 82 0; -#X connect 68 0 63 0; -#X connect 69 0 70 0; -#X connect 71 0 79 0; -#X connect 72 0 74 0; -#X connect 72 1 73 0; -#X connect 75 0 77 0; -#X connect 75 1 78 0; -#X connect 76 0 80 0; -#X connect 79 0 72 0; -#X connect 80 0 75 0; -#X connect 82 0 81 0; -#X connect 82 0 83 0; -#X connect 84 0 100 0; -#X connect 84 1 82 0; -#X connect 85 0 89 0; -#X connect 87 0 86 0; -#X connect 88 2 47 0; -#X connect 89 1 87 0; -#X connect 90 0 42 0; -#X connect 90 1 42 1; -#X connect 91 0 44 0; -#X connect 92 0 98 0; -#X connect 93 0 94 0; -#X connect 95 0 96 0; -#X connect 96 0 97 0; -#X connect 97 0 2 0; -#X connect 98 0 94 0; -#X connect 98 1 93 0; -#X connect 99 0 30 0; -#X connect 100 0 26 0; -#X connect 100 1 38 0; -#X connect 100 2 101 0; -#X connect 100 3 67 0; -#X connect 101 0 48 0; -#X restore 34 390 pd camera; -#X obj 7 409 outlet image; -#X obj 7 352 inlet; -#X obj 143 46 hradio 12 1 0 4 \$0-s_tuner \$0-tuner _0_1_2_3 -2 7 1 -10 -233017 -195568 -195568 0; -#X obj 46 352 r \$0-o; -#X text 84 35 channel:; -#X text 98 47 tuner:; -#X obj 6 31 cnv 15 70 216 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X text 9 32 device:; -#X obj 11 50 vradio 15 1 0 11 \$0-s_device \$0-device empty 0 -6 0 -8 -241291 -1 -1 0; -#X obj 81 105 cnv 15 184 172 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 270 214 cnv 15 144 124 empty \$0-palette2 YUV420P 86 8 0 12 --233017 -1 0; -#X obj 270 31 cnv 15 144 178 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 312 66 nbx 5 14 -1e+37 1e+37 0 0 \$0-s_height \$0-height empty -0 -6 1 10 -62784 -44926 -1 480 256; -#X obj 360 66 nbx 5 14 -1e+37 1e+37 0 0 \$0-s_width \$0-width empty -0 -6 1 10 -62784 -44926 -1 640 256; -#X text 275 65 size:; -#X text 315 35 height; -#X text 365 35 width; -#X msg 291 315 transfer mmap 4; -#X obj 291 352 s \$0-o; -#X obj 329 124 bng 12 250 50 0 \$0-size0 \$0-sizec 120x160 -46 6 1 -10 -62784 -44926 -1; -#X obj 344 124 bng 12 250 50 0 \$0-size1 \$0-sizec 120x180 16 6 1 10 --62784 -44926 -1; -#X obj 329 136 bng 12 250 50 0 \$0-size2 \$0-sizec 240x320 -46 6 1 -10 -62784 -44926 -1; -#X obj 344 136 bng 12 250 50 0 \$0-size3 \$0-sizec 240x360 16 6 1 10 --62784 -44926 -1; -#X obj 329 148 bng 12 250 50 0 \$0-size4 \$0-sizec 480x640 -46 6 1 -10 -62784 -44926 -1; -#X obj 344 148 bng 12 250 50 0 \$0-size5 \$0-sizec 480x720 16 6 1 10 --62784 -44926 -1; -#X obj 344 160 bng 12 250 50 0 \$0-size6 \$0-sizec 576x720 16 6 1 10 --62784 -44926 -1; -#X obj 344 172 bng 12 250 50 0 \$0-size7 \$0-sizec 288x352 16 6 1 10 --62784 -44926 -1; -#X obj 360 191 nbx 5 14 -1e+37 1e+37 0 0 \$0-s_framerate \$0-framerate -empty 0 -6 1 10 -233017 -195568 -195568 10 256; -#X obj 83 179 tgl 12 0 \$0-s_white_mode \$0-white_mode manual_white_balance -20 7 1 10 -233017 -195568 -195568 1 1; -#X text 27 50 #0; -#X text 27 65 #1; -#X text 27 80 #2; -#X text 27 95 #3; -#X text 27 110 #4; -#X text 27 125 #5; -#X text 27 140 #6; -#X text 27 155 #7; -#X text 317 106 presets:; -#X text 90 167 ------- PWC ONLY: -------; -#X obj 83 251 hradio 12 1 0 4 \$0-s_noise_reduction \$0-noise_reduction -_0_1_2_3_noise_reduction -2 7 1 10 -233017 -195568 -195568 0; -#X obj 83 263 hradio 12 1 0 4 \$0-s_compression \$0-compression _0_1_2_3_compression --2 7 1 10 -233017 -195568 -195568 3; -#X obj 11 226 tgl 12 0 \$0-s_pwc \$0-pwc empty 20 7 1 10 -62784 -44926 --1 0 1; -#X text 26 224 use PWC; -#X text 28 170 DC1394; -#X obj 356 232 vradio 12 1 0 4 \$0-s_colorspace_e \$0-colorspace_e -empty 0 -8 0 10 -62784 -44926 -1 2; -#X text 370 229 y; -#X text 370 241 yuv; -#X text 370 254 rgb; -#X text 370 266 magic; -#X text 269 249 Colorspaces:; -#N canvas 0 0 450 300 command_filtre 0; -#X obj 22 24 inlet; -#X obj 22 92 outlet; -#X obj 22 43 route bang device; -#X obj 79 122 s \$0-device; -#X connect 0 0 2 0; -#X connect 2 0 1 0; -#X connect 2 1 3 0; -#X connect 2 2 1 0; -#X restore 7 371 pd command_filtre; -#X obj 7 390 #in; -#X text 287 191 framerate:; -#X obj 201 34 vradio 12 1 0 4 \$0-s_norm \$0-norm empty 0 -8 0 10 -233017 --195568 -195568 0; -#X text 214 33 PAL; -#X text 214 45 NTSC; -#X text 213 57 SECAM; -#X text 213 68 auto; -#X obj 6 6 cnv 15 408 20 empty \$0-title Logitech_QuickCam_Pro_4000 -4 10 1 12 -1 -262144 0; -#X obj 356 285 vradio 12 1 0 2 \$0-s_transfer_e \$0-transfer_e empty -0 -8 0 10 -62784 -44926 -1 1; -#X text 291 289 Transfer:; -#X text 370 283 read; -#X text 371 295 mmap; -#X obj 312 52 nbx 5 14 -1e+37 1e+37 0 0 empty \$0-minheight empty 0 --6 1 10 -233017 -1 -195568 120 256; -#X obj 360 52 nbx 5 14 -1e+37 1e+37 0 0 empty \$0-minwidth empty 0 --6 1 10 -233017 -1 -195568 160 256; -#X obj 312 80 nbx 5 14 -1e+37 1e+37 0 0 empty \$0-maxheight empty 0 --6 1 10 -233017 -1 -195568 480 256; -#X obj 360 80 nbx 5 14 -1e+37 1e+37 0 0 empty \$0-maxwidth empty 0 --6 1 10 -233017 -1 -195568 640 256; -#X text 275 79 max:; -#X text 275 51 min:; -#X text 297 214 Palette:; -#X obj 45 53 cnv 1 3 1 empty empty empty 20 12 0 14 -1 -66577 0; -#X obj 45 165 cnv 1 3 1 empty empty empty 20 12 0 14 -1 -66577 0; -#X obj 48 55 cnv 1 1 53 empty empty empty 20 12 0 14 -1 -66577 0; -#X obj 49 109 cnv 1 3 1 empty empty V4L1 6 0 0 10 -1 -66577 0; -#X obj 48 111 cnv 1 1 53 empty empty empty 20 12 0 14 -1 -66577 0; -#X text 27 200 OFF; -#X text 27 185 MacOSX; -#X obj 83 107 gf.nbxhsl \$0 contrast; -#X obj 83 119 gf.nbxhsl \$0 brightness; -#X obj 83 131 gf.nbxhsl \$0 colour; -#X obj 83 143 gf.nbxhsl \$0 hue; -#X obj 83 155 gf.nbxhsl \$0 whiteness; -#X obj 82 191 gf.nbxhsl \$0 white_red; -#X obj 82 203 gf.nbxhsl \$0 white_blue; -#X obj 82 215 gf.nbxhsl \$0 white_speed; -#X obj 82 227 gf.nbxhsl \$0 white_delay; -#X obj 82 239 gf.nbxhsl \$0 auto_gain; -#X obj 83 85 gf.nbxhsl \$0 frequency; -#X connect 2 0 54 0; -#X connect 4 0 53 0; -#X connect 6 0 54 0; -#X connect 20 0 21 0; -#X connect 53 0 54 0; -#X connect 54 0 3 0; -#X connect 54 1 2 0; diff --git a/externals/gridflow/abstractions/#camera_control.pd b/externals/gridflow/abstractions/#camera_control.pd deleted file mode 100644 index c759fd23..00000000 --- a/externals/gridflow/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/abstractions/#camera_old.pd b/externals/gridflow/abstractions/#camera_old.pd deleted file mode 100644 index b1a87da9..00000000 --- a/externals/gridflow/abstractions/#camera_old.pd +++ /dev/null @@ -1,161 +0,0 @@ -#N canvas 90 150 679 206 10; -#X obj 114 6 cnv 15 480 200 empty empty empty 20 12 0 14 -195568 -66577 -0; -#X obj 135 86 hradio 18 1 0 4 \$0-channel \$0-channel _0__1__2__3_ -0 14 0 8 -241291 -258699 -1 0; -#X obj 418 47 hsl 128 15 0 65535 0 0 \$0-brightness \$0-brightness -brightness 8 8 0 8 -260818 -1 -1 0 1; -#X obj 418 87 hsl 128 15 0 65535 0 0 \$0-hue \$0-hue hue 8 8 0 8 -260818 --1 -1 0 1; -#X obj 418 27 hsl 128 15 0 65535 0 0 \$0-contrast \$0-contrast contrast -8 8 0 8 -260818 -1 -1 0 1; -#X obj 418 107 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 117 249 pd camera; -#X msg 428 318 colorspace YUV420P; -#X obj 134 311 #yuv_to_rgb; -#X obj 418 67 hsl 128 15 0 65535 0 0 \$0-colour \$0-colour colour 8 -8 0 8 -260818 -1 -1 0 1; -#X obj 252 37 vradio 15 1 0 3 \$0-size \$0-size empty 0 -6 0 8 -241291 --258699 -1 0; -#X text 270 37 120 \, 160; -#X text 270 53 240 \, 320; -#X text 270 68 480 \, 640; -#X text 250 22 select size; -#X text 135 72 select channel; -#X obj 359 28 nbx 5 14 0 65535 0 0 \$0-contrast \$0-contrast empty -0 -6 0 10 -260818 -1 -1 0 256; -#X obj 359 48 nbx 5 14 0 65535 0 0 \$0-brightness \$0-brightness empty -0 -6 0 10 -260818 -1 -1 0 256; -#X obj 359 68 nbx 5 14 0 65535 0 0 \$0-colour \$0-colour empty 0 -6 -0 10 -260818 -1 -1 0 256; -#X obj 359 88 nbx 5 14 0 65535 0 0 \$0-hue \$0-hue empty 0 -6 0 10 --260818 -1 -1 0 256; -#X obj 359 108 nbx 5 14 0 65535 0 0 \$0-whiteness \$0-whiteness empty -0 -6 0 10 -260818 -1 -1 0 256; -#X msg 428 238 transfer mmap; -#X msg 428 278 transfer read; -#X msg 428 298 colorspace RGB24; -#X text 427 222 Special options:; -#X obj 90 249 #in; -#X obj 100 379 outlet image; -#X obj 136 49 hradio 18 1 0 4 \$0-device \$0-device _0__1__2__3_ 0 --4 0 8 -241291 -258699 -1 0; -#X obj 90 282 shunt 2; -#X obj 134 166 vradio 15 1 0 2 empty empty empty 0 -6 0 8 -241291 -258699 --1 0; -#X text 164 181 YUV->RGB; -#X text 164 165 no conversion; -#X obj 91 230 inlet; -#X obj 134 332 # min 255; -#X obj 134 351 # max 0; -#X msg 428 258 transfer mmap 4; -#X obj 134 131 hradio 18 1 0 4 \$0-tuner \$0-tuner _0__1__2__3_ 0 14 -0 8 -241291 -258699 -1 0; -#X text 134 116 select tuner; -#X obj 418 137 hsl 128 15 0 65635 0 0 \$0-frequency \$0-frequency frequency -8 8 0 8 -62784 -44926 -44926 0 1; -#X obj 359 138 nbx 5 14 0 65535 0 0 \$0-frequency \$0-frequency empty -0 -6 0 10 -62784 -44926 -44926 0 256; -#X obj 416 339 s \$0-o; -#X obj 130 229 r \$0-o; -#X obj -89 7 cnv 15 200 60 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj -86 238 \$0; -#X obj -86 27 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X msg -86 257 \; \$1-device 0 \; \$1-size 1 \; \$1-channel 1; -#X text -62 28 <-- initialise camera; -#X text 132 22 select a camera; -#X text -77 85 These options provide -->; -#X text -76 100 more controls. Scroll down; -#X text -78 115 for webcams options.; -#X obj 155 276 print; -#X msg 183 226 help; -#X connect 6 0 25 0; -#X connect 7 0 40 0; -#X connect 8 0 33 0; -#X connect 21 0 40 0; -#X connect 22 0 40 0; -#X connect 23 0 40 0; -#X connect 25 0 28 0; -#X connect 25 1 6 0; -#X connect 25 1 51 0; -#X connect 28 0 26 0; -#X connect 28 1 8 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 40 0; -#X connect 41 0 25 0; -#X connect 43 0 45 0; -#X connect 44 0 43 0; -#X connect 52 0 25 0; diff --git a/externals/gridflow/abstractions/#centroid_in_pd.pd b/externals/gridflow/abstractions/#centroid_in_pd.pd deleted file mode 100644 index 38745844..00000000 --- a/externals/gridflow/abstractions/#centroid_in_pd.pd +++ /dev/null @@ -1,84 +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 obj 90 173 outlet x; -#X obj 12 174 outlet y; -#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 3 0 15 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 8 0 14 0; -#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/abstractions/#change.pd b/externals/gridflow/abstractions/#change.pd deleted file mode 100644 index 73a5b6ed..00000000 --- a/externals/gridflow/abstractions/#change.pd +++ /dev/null @@ -1,20 +0,0 @@ -#N canvas 273 276 381 232 10; -#X obj 64 38 inlet; -#X obj 64 96 # !=; -#X obj 64 134 #fold |; -#X obj 123 126 #store; -#X obj 64 115 #ravel; -#X obj 64 153 #export; -#X obj 123 145 outlet; -#X obj 64 57 t a a a; -#X obj 64 172 sel 1; -#X connect 0 0 7 0; -#X connect 1 0 4 0; -#X connect 2 0 5 0; -#X connect 3 0 6 0; -#X connect 4 0 2 0; -#X connect 5 0 8 0; -#X connect 7 0 1 1; -#X connect 7 1 1 0; -#X connect 7 2 3 1; -#X connect 8 0 3 0; diff --git a/externals/gridflow/abstractions/#checkers.pd b/externals/gridflow/abstractions/#checkers.pd deleted file mode 100644 index 5b0b8711..00000000 --- a/externals/gridflow/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 174 outlet; -#X obj 18 154 #outer ignore (3 #); -#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 8 0; -#X connect 8 0 7 0; diff --git a/externals/gridflow/abstractions/#clip.pd b/externals/gridflow/abstractions/#clip.pd deleted file mode 100644 index 14158279..00000000 --- a/externals/gridflow/abstractions/#clip.pd +++ /dev/null @@ -1,18 +0,0 @@ -#N canvas 531 259 649 265 10; -#X obj 87 4 inlet; -#X obj 87 230 outlet; -#X obj 117 133 inlet; -#X obj 117 58 inlet; -#X obj 87 156 # min; -#X obj 87 82 # max; -#X obj 243 14 loadbang; -#X obj 243 40 args (max a 0) (min a 255); -#X text 439 40 <-- sets the initial values; -#X connect 0 0 5 0; -#X connect 2 0 4 1; -#X connect 3 0 5 1; -#X connect 4 0 1 0; -#X connect 5 0 4 0; -#X connect 6 0 7 0; -#X connect 7 0 5 1; -#X connect 7 1 4 1; diff --git a/externals/gridflow/abstractions/#color.pd b/externals/gridflow/abstractions/#color.pd deleted file mode 100644 index 0fe73d1f..00000000 --- a/externals/gridflow/abstractions/#color.pd +++ /dev/null @@ -1,71 +0,0 @@ -#N canvas 184 193 450 373 10; -#X obj 76 87 hsl 128 14 0 255 0 0 empty empty empty -2 -6 0 8 -225271 --24198 -1 0 1; -#X obj 76 101 hsl 128 14 0 255 0 0 empty empty empty -2 -6 0 8 -228992 --62784 -1 0 1; -#X obj 76 73 hsl 128 14 0 255 0 0 empty empty empty -2 -6 0 8 -261689 --258699 -1 0 1; -#X obj 10 166 #pack 3; -#X obj 79 14 inlet rgb_color; -#X obj 15 188 outlet rgb_color; -#X obj 122 62 cnv 10 60 10 empty \$0-cnv empty 20 12 0 14 -262144 -262144 -0; -#X obj 10 343 s \$0-cnv; -#X msg 10 324 color \$1; -#X obj 10 267 #export; -#X obj 10 248 # ^ -1; -#X obj 10 229 #fold |; -#X obj 216 123 loadbang; -#X msg 216 199 range \$1 \$2; -#X obj 216 180 #export_list; -#X obj 64 267 loadbang; -#X obj 64 305 - \$3; -#X msg 64 286 1; -#X obj 10 305 spigot; -#X obj 79 33 route delegate; -#X obj 181 33 #unpack 3; -#X obj 216 161 # || (0 255); -#X obj 10 210 # << (16 8 0); -#X obj 216 142 #store ( \$1 \$2 ); -#X floatatom 50 73 3 0 255 0 - - -; -#X floatatom 50 87 3 0 255 0 - - -; -#X floatatom 50 101 3 0 255 0 - - -; -#X obj 82 122 int; -#X obj 82 141 int; -#X obj 82 160 int; -#X connect 0 0 28 0; -#X connect 1 0 29 0; -#X connect 2 0 27 0; -#X connect 3 0 5 0; -#X connect 3 0 22 0; -#X connect 4 0 19 0; -#X connect 8 0 7 0; -#X connect 9 0 18 0; -#X connect 10 0 9 0; -#X connect 11 0 10 0; -#X connect 12 0 23 0; -#X connect 13 0 1 0; -#X connect 13 0 0 0; -#X connect 13 0 2 0; -#X connect 14 0 13 0; -#X connect 15 0 17 0; -#X connect 16 0 18 1; -#X connect 17 0 16 0; -#X connect 18 0 8 0; -#X connect 19 0 2 0; -#X connect 19 0 0 0; -#X connect 19 0 1 0; -#X connect 19 1 20 0; -#X connect 20 0 2 0; -#X connect 20 1 0 0; -#X connect 20 2 1 0; -#X connect 21 0 14 0; -#X connect 22 0 11 0; -#X connect 23 0 21 0; -#X connect 24 0 3 0; -#X connect 25 0 3 1; -#X connect 26 0 3 2; -#X connect 27 0 24 0; -#X connect 28 0 25 0; -#X connect 29 0 26 0; -#X coords 0 -1 1 1 156 55 1 50 60; diff --git a/externals/gridflow/abstractions/#contrast.pd b/externals/gridflow/abstractions/#contrast.pd deleted file mode 100644 index 13549341..00000000 --- a/externals/gridflow/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/abstractions/#draw_hpgl.pd b/externals/gridflow/abstractions/#draw_hpgl.pd deleted file mode 100644 index 61265424..00000000 --- a/externals/gridflow/abstractions/#draw_hpgl.pd +++ /dev/null @@ -1,77 +0,0 @@ -#N canvas 640 155 580 497 10; -#X obj 227 23 inlet command; -#X obj 28 27 inlet image; -#X obj 28 254 outlet image; -#X obj 109 27 inlet colour; -#X obj 152 46 loadbang; -#X obj 227 42 route PU PD PA; -#X obj 164 148 spigot 1; -#X text 224 149 pen; -#X msg 241 119 0; -#X msg 280 119 1; -#X obj 211 90 t a b; -#X obj 250 90 t a b; -#X obj 309 85 route bang; -#X obj 383 85 t a a; -#X msg 35 69 draw line; -#X msg 152 65 2 2 # -1; -#X obj 383 121 unpack; -#X obj 429 121 unpack; -#X obj 383 144 pack 0 0 0 0; -#X obj 383 163 #import (2 2); -#X obj 117 254 outlet time_to_draw; -#X obj 315 285 t a a; -#X obj 315 304 #finished; -#X obj 383 264 # +; -#X obj 408 264 #pack; -#X obj 384 349 display; -#X obj 383 182 #inner (2 2 # 0 1 -1 0); -#X obj 400 236 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10 --262144 -1 -1 640 256; -#X obj 460 236 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10 --262144 -1 -1 70 256; -#X obj 383 329 spigot; -#X obj 430 330 tgl 15 0 empty empty empty 17 7 0 10 -241291 -1 -1 0 -1; -#X obj 383 201 # / 10; -#X obj 28 90 #draw_polygon; -#X obj 35 50 loadbang; -#X connect 0 0 5 0; -#X connect 1 0 32 0; -#X connect 3 0 32 1; -#X connect 4 0 15 0; -#X connect 5 0 10 0; -#X connect 5 1 11 0; -#X connect 5 2 13 0; -#X connect 6 0 20 0; -#X connect 8 0 6 1; -#X connect 9 0 6 1; -#X connect 10 0 12 0; -#X connect 10 1 8 0; -#X connect 11 0 12 0; -#X connect 11 1 9 0; -#X connect 12 1 13 0; -#X connect 13 0 17 0; -#X connect 13 1 16 0; -#X connect 14 0 32 0; -#X connect 15 0 32 2; -#X connect 16 0 18 0; -#X connect 16 1 18 1; -#X connect 17 0 18 2; -#X connect 17 1 18 3; -#X connect 18 0 19 0; -#X connect 19 0 26 0; -#X connect 21 0 22 0; -#X connect 21 1 32 2; -#X connect 22 0 6 0; -#X connect 23 0 21 0; -#X connect 23 0 29 0; -#X connect 24 0 23 1; -#X connect 26 0 31 0; -#X connect 27 0 24 0; -#X connect 28 0 24 1; -#X connect 29 0 25 0; -#X connect 30 0 29 1; -#X connect 31 0 23 0; -#X connect 32 0 2 0; -#X connect 33 0 14 0; diff --git a/externals/gridflow/abstractions/#draw_rect.pd b/externals/gridflow/abstractions/#draw_rect.pd deleted file mode 100644 index 9842f5fc..00000000 --- a/externals/gridflow/abstractions/#draw_rect.pd +++ /dev/null @@ -1,44 +0,0 @@ -#N canvas 371 309 450 300 10; -#X obj 12 28 inlet; -#X obj 98 264 outlet; -#X obj 234 1 inlet; -#X obj 221 157 #export_list; -#X msg 221 176 4 2 # \$1 \$2 \$1 \$4 \$3 \$4 \$3 \$2; -#X obj 72 28 inlet; -#X obj 121 13 loadbang; -#X msg 107 207 op \$1; -#X obj 221 195 shunt 2; -#X obj 12 110 route outline; -#X obj 245 135 #store; -#X obj 245 116 t b f; -#X obj 225 240 @join 0; -#X obj 228 220 t a a; -#X obj 267 220 # + (1 1 1 1 -1 -1 -1 -1); -#X obj 98 231 #draw_polygon put; -#X obj 120 32 args op color (polygon a (2 2 #)); -#X obj 291 88 print COLOR; -#X connect 0 0 9 0; -#X connect 2 0 10 1; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 4 0 8 0; -#X connect 5 0 15 1; -#X connect 6 0 16 0; -#X connect 7 0 15 0; -#X connect 8 0 15 2; -#X connect 8 1 13 0; -#X connect 9 0 11 0; -#X connect 9 1 15 0; -#X connect 10 0 3 0; -#X connect 11 0 10 0; -#X connect 11 1 8 1; -#X connect 12 0 15 2; -#X connect 13 0 12 0; -#X connect 13 1 14 0; -#X connect 14 0 12 1; -#X connect 15 0 1 0; -#X connect 16 0 7 0; -#X connect 16 1 15 1; -#X connect 16 1 17 0; -#X connect 16 2 3 0; -#X connect 16 3 9 0; diff --git a/externals/gridflow/abstractions/#draw_slider.pd b/externals/gridflow/abstractions/#draw_slider.pd deleted file mode 100644 index 5dd4d694..00000000 --- a/externals/gridflow/abstractions/#draw_slider.pd +++ /dev/null @@ -1,60 +0,0 @@ -#N canvas 941 0 950 464 10; -#X obj 277 189 loadbang; -#X msg 253 146 2 2 # 40 40 80 \$1; -#X msg 277 286 40 40 80 300; -#X obj 44 15 inlet; -#X obj 44 384 outlet; -#X obj 87 91 inlet; -#X msg 119 152 255 200 150; -#X text 132 90 <-- colour; -#X obj 253 -2 inlet; -#X text 296 -3 <-- incoming values; -#X obj 281 350 # + (10 2 # -1 -1 -1 1 1 1 1 -1 -1 -1 0 0 0 0 0 0 0 -0 0 0); -#X msg 281 331 10 2 # \$1 \$2 \$1 \$4 \$3 \$4 \$3 \$2 \$1 \$2; -#X obj 281 308 #export_list; -#X obj 44 188 #draw_rect \$1; -#X obj 44 349 #draw_polygon \$1 (255 255 255); -#X obj 470 9 loadbang; -#X obj 446 2 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; -#X obj 470 28 args op insidecolour outsidecolour rect min max; -#X obj 707 100 inv+; -#X obj 253 45 -; -#X obj 253 64 *; -#X obj 387 283 -; -#X obj 253 83 /; -#X msg 387 264 \$4 \$2; -#X obj 254 107 +; -#X msg 442 265 \$2; -#X connect 0 0 6 0; -#X connect 0 0 2 0; -#X connect 1 0 13 2; -#X connect 2 0 12 0; -#X connect 3 0 13 0; -#X connect 5 0 13 1; -#X connect 6 0 13 1; -#X connect 8 0 19 0; -#X connect 10 0 14 2; -#X connect 11 0 10 0; -#X connect 12 0 11 0; -#X connect 12 0 23 0; -#X connect 12 0 25 0; -#X connect 13 0 14 0; -#X connect 14 0 4 0; -#X connect 15 0 17 0; -#X connect 16 0 17 0; -#X connect 17 1 13 1; -#X connect 17 2 14 1; -#X connect 17 3 12 0; -#X connect 17 4 18 0; -#X connect 17 4 19 1; -#X connect 17 5 18 1; -#X connect 18 0 22 1; -#X connect 19 0 20 0; -#X connect 20 0 22 0; -#X connect 21 0 20 1; -#X connect 22 0 24 0; -#X connect 23 0 21 0; -#X connect 24 0 1 0; -#X connect 25 0 24 1; diff --git a/externals/gridflow/abstractions/#edit_polygon.pd b/externals/gridflow/abstractions/#edit_polygon.pd deleted file mode 100644 index 812a3952..00000000 --- a/externals/gridflow/abstractions/#edit_polygon.pd +++ /dev/null @@ -1,66 +0,0 @@ -#N canvas 210 217 686 442 10; -#X obj 33 38 inlet; -#X obj 33 398 outlet; -#X obj 33 255 #draw_polygon \$1; -#X obj 597 412 outlet attr; -#X msg 41 208 op \$1; -#X obj 41 170 loadbang; -#X obj 95 232 inlet; -#X obj 165 189 inlet; -#X obj 41 189 args op color pos; -#X obj 33 57 route2 grid position; -#X obj 100 76 #mouse \, \, \, \,; -#X obj 396 372 #transpose; -#X obj 153 244 #store; -#X obj 140 211 t a a; -#X obj 123 106 t a; -#X obj 206 105 print; -#X obj 396 353 #outer + (-12 12); -#X obj 284 97 # sqrt; -#X obj 376 210 #fold |; -#X obj 283 157 #grade; -#X obj 284 178 #print GR; -#X obj 361 153 #print DIST; -#X obj 376 229 #export; -#X obj 376 191 # < 16; -#X obj 63 372 #draw_rect put (3 # 255 0 0) (2 2 #) \, outline 1; -#X obj 33 279 shunt 2; -#X obj 284 78 #inner \, op sq-; -#X obj 386 78 #transpose; -#X connect 0 0 9 0; -#X connect 2 0 25 0; -#X connect 4 0 2 0; -#X connect 5 0 8 0; -#X connect 6 0 2 1; -#X connect 7 0 13 0; -#X connect 8 0 4 0; -#X connect 8 1 2 1; -#X connect 8 2 13 0; -#X connect 9 0 2 0; -#X connect 9 1 10 0; -#X connect 9 2 1 0; -#X connect 10 0 14 0; -#X connect 10 1 14 0; -#X connect 10 2 14 0; -#X connect 10 3 14 0; -#X connect 11 0 24 2; -#X connect 12 0 2 2; -#X connect 13 0 2 2; -#X connect 13 1 12 1; -#X connect 13 1 27 0; -#X connect 14 0 15 0; -#X connect 14 0 16 0; -#X connect 14 0 26 0; -#X connect 16 0 11 0; -#X connect 17 0 19 0; -#X connect 17 0 21 0; -#X connect 17 0 23 0; -#X connect 18 0 22 0; -#X connect 19 0 20 0; -#X connect 22 0 25 1; -#X connect 23 0 18 0; -#X connect 24 0 1 0; -#X connect 25 0 1 0; -#X connect 25 1 24 0; -#X connect 26 0 17 0; -#X connect 27 0 26 1; diff --git a/externals/gridflow/abstractions/#fade.pd b/externals/gridflow/abstractions/#fade.pd deleted file mode 100644 index 2ed4ba01..00000000 --- a/externals/gridflow/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 147 # +; -#X obj 37 128 # *; -#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 53 109 # - 1; -#X text 198 65 select fade rate; -#X text 61 65 input; -#X text 70 236 output; -#X obj 21 166 # +; -#X obj 46 166 # / 2; -#X obj 156 86 t a; -#X text 19 21 now rounds to closest; -#X obj 21 187 # *>>8; -#X obj 70 188 # inv* 256; -#X obj 21 213 t a a; -#X text 19 34 also faster (uses *>>8 instead of /); -#X obj 190 107 args (slope a 1); -#X connect 0 0 2 0; -#X connect 2 0 11 0; -#X connect 3 0 2 1; -#X connect 4 0 19 0; -#X connect 5 0 13 0; -#X connect 7 0 3 1; -#X connect 11 0 15 0; -#X connect 12 0 11 1; -#X connect 13 0 12 0; -#X connect 13 0 7 0; -#X connect 13 0 16 0; -#X connect 15 0 17 0; -#X connect 16 0 15 1; -#X connect 17 0 1 0; -#X connect 17 1 3 0; -#X connect 19 0 13 0; diff --git a/externals/gridflow/abstractions/#fade_lin.pd b/externals/gridflow/abstractions/#fade_lin.pd deleted file mode 100644 index 22054260..00000000 --- a/externals/gridflow/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/abstractions/#fastblur.pd b/externals/gridflow/abstractions/#fastblur.pd deleted file mode 100644 index 44edd238..00000000 --- a/externals/gridflow/abstractions/#fastblur.pd +++ /dev/null @@ -1,91 +0,0 @@ -#N canvas 330 194 632 389 10; -#X obj 18 129 #border (0 0 0) (0 0 0); -#X obj 48 226 #convolve (1 1 # 1) \, wrap 0; -#X obj 96 110 # / 2; -#X obj 18 55 inlet image; -#X obj 18 349 outlet image; -#X obj 196 50 inlet kernelSize; -#X obj 334 171 # == 0; -#X obj 65 311 # inv* 65536; -#X obj 178 31 args kernelSize; -#X obj 178 12 loadbang; -#X obj 18 311 # *>>8; -#X obj 18 330 # >> 8; -#X obj 177 88 @join 0 (1); -#X obj 153 311 #fold *; -#X obj 334 94 #unpack 3; -#X obj 48 284 #convolve (1 1 # 1) \, wrap 0; -#X obj 334 133 t b l; -#X obj 334 152 #for (0) (0) (1); -#X obj 334 190 # inv+; -#X obj 457 171 # == 0; -#X obj 457 133 t b l; -#X obj 457 152 #for (0) (0) (1); -#X obj 457 190 # inv+; -#X obj 18 148 shunt; -#X obj 18 245 shunt; -#X obj 457 228 #transpose; -#X obj 183 129 # / 2; -#X obj 334 209 @join 0 (1 1 # 1); -#X obj 457 209 @join 0 (1 1 # 1); -#X msg 146 44 3 3; -#X obj 57 245 != 1; -#X obj 57 148 != 1; -#X obj 48 265 #scan + \, seed (3 #); -#X obj 48 207 #scan + \, seed (0 3 #); -#X msg 199 207 seed ( \$2 3 #); -#X obj 87 167 #dim; -#X obj 119 167 #export_list; -#X obj 48 167 t a a; -#X obj 182 69 # max (1 1); -#X obj 96 91 # - 1; -#X connect 0 0 23 0; -#X connect 1 0 24 0; -#X connect 2 0 0 1; -#X connect 3 0 0 0; -#X connect 5 0 38 0; -#X connect 6 0 18 0; -#X connect 7 0 10 1; -#X connect 8 0 38 0; -#X connect 9 0 8 0; -#X connect 10 0 11 0; -#X connect 11 0 4 0; -#X connect 12 0 13 0; -#X connect 12 0 14 0; -#X connect 12 0 26 0; -#X connect 12 0 39 0; -#X connect 13 0 7 0; -#X connect 14 0 16 0; -#X connect 14 0 31 0; -#X connect 14 1 20 0; -#X connect 14 1 30 0; -#X connect 15 0 10 0; -#X connect 16 0 17 0; -#X connect 16 1 17 1; -#X connect 17 0 6 0; -#X connect 18 0 27 0; -#X connect 19 0 22 0; -#X connect 20 0 21 0; -#X connect 20 1 21 1; -#X connect 21 0 19 0; -#X connect 22 0 28 0; -#X connect 23 0 24 0; -#X connect 23 1 37 0; -#X connect 24 0 10 0; -#X connect 24 1 32 0; -#X connect 25 0 15 1; -#X connect 26 0 0 2; -#X connect 27 0 1 1; -#X connect 28 0 25 0; -#X connect 29 0 12 0; -#X connect 30 0 24 1; -#X connect 31 0 23 1; -#X connect 32 0 15 0; -#X connect 33 0 1 0; -#X connect 34 0 33 0; -#X connect 35 0 36 0; -#X connect 36 0 34 0; -#X connect 37 0 33 0; -#X connect 37 1 35 0; -#X connect 38 0 12 0; -#X connect 39 0 2 0; diff --git a/externals/gridflow/abstractions/#gamma.pd b/externals/gridflow/abstractions/#gamma.pd deleted file mode 100644 index 8963260c..00000000 --- a/externals/gridflow/abstractions/#gamma.pd +++ /dev/null @@ -1,21 +0,0 @@ -#N canvas 0 0 450 300 10; -#X obj 27 202 outlet image; -#X obj 27 22 inlet image; -#X obj 235 73 loadbang; -#X obj 235 97 \$1; -#X obj 263 97 inlet gamma; -#X obj 235 136 #for 0 256 1; -#X obj 235 162 # gamma; -#X obj 27 115 #store; -#X obj 27 82 #outer ignore (0); -#X obj 235 117 t b f; -#X connect 1 0 8 0; -#X connect 2 0 3 0; -#X connect 3 0 9 0; -#X connect 4 0 3 0; -#X connect 5 0 6 0; -#X connect 6 0 7 1; -#X connect 7 0 0 0; -#X connect 8 0 7 0; -#X connect 9 0 5 0; -#X connect 9 1 6 1; diff --git a/externals/gridflow/abstractions/#greyscale_to_rgb.pd b/externals/gridflow/abstractions/#greyscale_to_rgb.pd deleted file mode 100644 index 47dfdd6e..00000000 --- a/externals/gridflow/abstractions/#greyscale_to_rgb.pd +++ /dev/null @@ -1,6 +0,0 @@ -#N canvas 550 233 335 174 10; -#X obj 10 10 inlet; -#X obj 10 48 outlet; -#X obj 10 29 #inner (1 3 # 1 1 1); -#X connect 0 0 2 0; -#X connect 2 0 1 0; diff --git a/externals/gridflow/abstractions/#hello.pd b/externals/gridflow/abstractions/#hello.pd deleted file mode 100644 index b094c9ff..00000000 --- a/externals/gridflow/abstractions/#hello.pd +++ /dev/null @@ -1,28 +0,0 @@ -#N canvas 165 50 305 255 10; -#X obj -6 38 # / 320; -#X obj -6 114 # * 255; -#X obj -6 95 # != 0; -#X obj -6 57 # inv+ 7; -#X obj -6 19 # * 7; -#X obj -6 76 #outer & (2 4 1); -#X obj -6 -76 inlet; -#X obj -6 -19 #for (0 0) (0 0) (1 1); -#X obj -6 -57 t a a; -#X obj -6 -38 #finished; -#X obj -6 0 #inner (0 1); -#X obj 184 -40 #inner (0 1); -#X obj -6 133 outlet; -#X connect 0 0 3 0; -#X connect 1 0 12 0; -#X connect 2 0 1 0; -#X connect 3 0 5 0; -#X connect 4 0 0 0; -#X connect 5 0 2 0; -#X connect 6 0 8 0; -#X connect 7 0 10 0; -#X connect 8 0 9 0; -#X connect 8 1 7 1; -#X connect 8 1 11 0; -#X connect 9 0 7 0; -#X connect 10 0 4 0; -#X connect 11 0 0 1; diff --git a/externals/gridflow/abstractions/#hueshift.pd b/externals/gridflow/abstractions/#hueshift.pd deleted file mode 100644 index 028801ea..00000000 --- a/externals/gridflow/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/abstractions/#in.pd b/externals/gridflow/abstractions/#in.pd deleted file mode 100644 index d02cf403..00000000 --- a/externals/gridflow/abstractions/#in.pd +++ /dev/null @@ -1,59 +0,0 @@ -#N canvas 457 271 567 388 10; -#X obj 19 20 inlet; -#X obj 19 336 outlet; -#X obj 91 336 outlet; -#X obj 333 82 loadbang; -#X obj 333 101 args *; -#N canvas 116 23 450 300 \$0-placeholder 0; -#X obj 0 0 r 1011-in; -#X obj 0 20 bang; -#X obj 0 20 gf.error not open; -#X connect 0 0 1 0; -#X connect 1 0 2 0; -#X restore 19 279 pd \$0-placeholder; -#X obj 19 260 s \$0-in; -#X obj 19 298 r \$0-out; -#X obj 19 317 route2 grid; -#X obj 19 210 route bang; -#X msg 19 230 bang; -#X text 53 231 hack.; -#X obj 333 156 gf.io_generate \$0 in; -#X msg 342 131 bang; -#X msg 135 15 open \$1 \, bang \, close; -#X obj 19 58 list; -#X obj 113 58 list; -#X obj 333 175 send39 \$0-placeholder; -#X obj 152 297 spigot 1; -#X obj 152 278 route bang; -#X msg 152 316 rewind \, bang; -#X obj 19 39 route open close load loop set float; -#X msg 223 170 seek \$1; -#X msg 255 194 seek \$1 \, bang; -#X connect 0 0 21 0; -#X connect 3 0 4 0; -#X connect 4 0 12 0; -#X connect 4 1 21 0; -#X connect 7 0 8 0; -#X connect 7 0 19 0; -#X connect 8 0 1 0; -#X connect 8 1 2 0; -#X connect 9 0 10 0; -#X connect 9 1 6 0; -#X connect 10 0 6 0; -#X connect 12 0 17 0; -#X connect 13 0 12 0; -#X connect 14 0 21 0; -#X connect 15 0 12 0; -#X connect 16 0 14 0; -#X connect 18 0 20 0; -#X connect 19 0 18 0; -#X connect 20 0 21 0; -#X connect 21 0 15 0; -#X connect 21 1 13 0; -#X connect 21 2 16 0; -#X connect 21 3 18 1; -#X connect 21 4 22 0; -#X connect 21 5 23 0; -#X connect 21 6 9 0; -#X connect 22 0 6 0; -#X connect 23 0 6 0; diff --git a/externals/gridflow/abstractions/#line_to_polygon.pd b/externals/gridflow/abstractions/#line_to_polygon.pd deleted file mode 100644 index e0c9cbd8..00000000 --- a/externals/gridflow/abstractions/#line_to_polygon.pd +++ /dev/null @@ -1,46 +0,0 @@ -#N canvas 667 260 450 300 10; -#X obj 45 57 inlet; -#X obj 45 235 outlet; -#X obj 170 75 #redim (2); -#X obj 45 216 # +; -#X obj 170 94 #rotate 9000; -#X obj 170 176 # *; -#X obj 170 199 # /; -#X obj 170 113 #t; -#X obj 205 114 # sq-; -#X obj 205 133 #fold +; -#X obj 205 152 # sqrt; -#X obj 297 176 inlet; -#X obj 265 176 f \$1; -#X obj 265 157 loadbang; -#X obj 61 95 #reverse; -#X obj 45 76 #t; -#X obj 45 126 @join 0; -#X obj 172 222 display; -#X obj 75 216 #outer *; -#X msg 75 197 -1 -1 1 1; -#X obj 45 145 t a b; -#X connect 0 0 15 0; -#X connect 2 0 4 0; -#X connect 3 0 1 0; -#X connect 4 0 7 0; -#X connect 5 0 6 0; -#X connect 6 0 17 0; -#X connect 6 0 18 1; -#X connect 7 0 5 0; -#X connect 7 1 8 0; -#X connect 8 0 9 0; -#X connect 9 0 10 0; -#X connect 10 0 6 1; -#X connect 11 0 12 0; -#X connect 12 0 5 1; -#X connect 13 0 12 0; -#X connect 14 0 16 1; -#X connect 15 0 16 0; -#X connect 15 1 2 0; -#X connect 15 1 14 0; -#X connect 16 0 20 0; -#X connect 18 0 3 1; -#X connect 19 0 18 0; -#X connect 20 0 3 0; -#X connect 20 1 19 0; diff --git a/externals/gridflow/abstractions/#make_cross.pd b/externals/gridflow/abstractions/#make_cross.pd deleted file mode 100644 index 43025c53..00000000 --- a/externals/gridflow/abstractions/#make_cross.pd +++ /dev/null @@ -1,34 +0,0 @@ -#N canvas 374 339 450 300 10; -#X obj 27 247 outlet; -#X obj 27 25 inlet point; -#X obj 116 22 inlet size; -#X obj 27 63 #finished; -#X obj 27 180 #outer *; -#X msg 27 161 1 -1; -#X obj 27 199 #redim (12 2); -#X obj 27 228 # +; -#X obj 62 121 # + 1; -#X obj 27 44 t a a b; -#X obj 62 102 # * 16; -#X obj 62 140 # * (6 2 # 1 1 1 1 1 1 -1 1 -1 1 -1 1); -#X msg 62 83 6 2 # 1 0 0 0 0 1 0 1 0 0 1 0; -#X obj 116 62 f \$1; -#X obj 127 41 loadbang; -#X obj 116 102 # || 16; -#X connect 1 0 9 0; -#X connect 2 0 13 0; -#X connect 3 0 5 0; -#X connect 4 0 6 0; -#X connect 5 0 4 0; -#X connect 6 0 7 0; -#X connect 7 0 0 0; -#X connect 8 0 11 0; -#X connect 9 0 3 0; -#X connect 9 1 7 1; -#X connect 9 2 12 0; -#X connect 10 0 8 0; -#X connect 11 0 4 1; -#X connect 12 0 10 0; -#X connect 13 0 15 0; -#X connect 14 0 13 0; -#X connect 15 0 10 1; diff --git a/externals/gridflow/abstractions/#meuh.pd b/externals/gridflow/abstractions/#meuh.pd deleted file mode 100644 index e69de29b..00000000 --- a/externals/gridflow/abstractions/#meuh.pd +++ /dev/null diff --git a/externals/gridflow/abstractions/#moment_polar.pd b/externals/gridflow/abstractions/#moment_polar.pd deleted file mode 100644 index f15f4671..00000000 --- a/externals/gridflow/abstractions/#moment_polar.pd +++ /dev/null @@ -1,52 +0,0 @@ -#N canvas 247 235 583 454 10; -#X obj 21 20 inlet 2nd_moment_matrix; -#X obj 21 419 outlet angle; -#X obj 21 208 #grade; -#X obj 53 88 #transpose; -#X obj 21 285 #store; -#X obj 21 189 # inv+ (f #); -#X text 76 211 sort eigenvectors; -#X text 76 223 by eigenvalues downwards; -#X obj 21 266 #redim (1); -#X obj 21 342 # atan; -#X obj 21 304 #unpack; -#X obj 74 304 #pack 1 f; -#X obj 21 323 #pack 1 f; -#X text 29 358 angle of (one of the two) longest radius; -#X text 113 247 but pick only biggest; -#X text 96 70 eigenvectors (axes of the ellipse); -#X text 28 370 centidegrees 0..35999; -#X text 27 148 squareroots of eigenvalues (radiuses of the ellipse) -; -#X obj 21 165 #t; -#X obj 147 296 #store; -#X text 185 21 (float); -#X obj 21 132 # sqrt (f #); -#X obj 21 45 #cast f; -#X obj 21 396 #export; -#X obj 21 238 #t; -#X obj 147 277 #outer + (0); -#X obj 134 420 outlet radiuses_sorted; -#X obj 21 69 cv.SVD; -#X connect 0 0 22 0; -#X connect 2 0 24 0; -#X connect 3 0 4 1; -#X connect 4 0 10 0; -#X connect 5 0 2 0; -#X connect 8 0 4 0; -#X connect 9 0 23 0; -#X connect 10 0 12 0; -#X connect 10 1 11 0; -#X connect 11 0 9 1; -#X connect 12 0 9 0; -#X connect 18 0 5 0; -#X connect 18 1 19 1; -#X connect 19 0 26 0; -#X connect 21 0 18 0; -#X connect 22 0 27 0; -#X connect 23 0 1 0; -#X connect 24 0 8 0; -#X connect 24 1 25 0; -#X connect 25 0 19 0; -#X connect 27 0 21 0; -#X connect 27 1 3 0; diff --git a/externals/gridflow/abstractions/#motion_detection.pd b/externals/gridflow/abstractions/#motion_detection.pd deleted file mode 100644 index 69daf87a..00000000 --- a/externals/gridflow/abstractions/#motion_detection.pd +++ /dev/null @@ -1,142 +0,0 @@ -#N canvas 932 467 705 527 10; -#X obj 53 -47 inlet camera_input; -#X obj 183 -1 inlet motion_or_presence; -#X obj 53 420 outlet to_window; -#X obj 53 130 # max 0; -#X obj 71 88 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -260818 --1 -1 0 1; -#X obj 53 110 # -; -#X text 107 130 noise reduction (on find-edges only); -#X obj 108 11 vradio 15 1 0 2 empty empty empty 0 -6 0 8 -241291 -1 --1 0; -#X text 128 25 emboss; -#X text 127 11 hilite; -#N canvas 372 198 399 273 image 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 53 52 pd image difference; -#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 t a a; -#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 175 85 # * (31 15 3); -#X obj 60 114 # >> (5 4 2); -#X connect 0 0 1 0; -#X connect 1 0 9 0; -#X connect 3 0 1 1; -#X connect 4 0 2 0; -#X connect 4 1 8 0; -#X connect 8 0 1 1; -#X connect 9 0 4 0; -#X restore 80 206 pd motion fade; -#X obj 398 91 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 1 -; -#X obj 53 275 shunt 2; -#X obj 173 298 #centroid; -#X obj 168 342 #export_list; -#X obj 163 370 unpack 0 0; -#N canvas 547 147 477 267 crosshair 0; -#X obj 12 224 outlet; -#X obj 12 9 inlet; -#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 obj 175 37 #fade 8; -#X obj 175 18 inlet; -#X obj 170 60 #finished; -#X msg 54 95 -8 -1 1 8; -#X obj 95 169 # + (120 160); -#X obj 12 205 #draw_polygon + (0 170 0); -#X connect 1 0 8 0; -#X connect 2 0 7 0; -#X connect 3 0 5 0; -#X connect 3 0 7 1; -#X connect 4 0 3 0; -#X connect 5 0 6 0; -#X connect 6 0 2 0; -#X connect 7 0 8 2; -#X connect 8 0 0 0; -#X restore 92 320 pd crosshair; -#X obj 53 373 t a; -#X text 422 91 designed to work with "hilite" above; -#X obj 170 274 #rgb_to_greyscale; -#X obj 333 278 #fold +; -#X obj 333 300 #fold +; -#X obj 333 320 #fold +; -#X obj 333 340 #export; -#X obj 333 360 / 100; -#X obj 398 66 inlet crosshair; -#X obj 333 418 outlet displaced_pixels; -#X obj 163 419 outlet; -#X obj 220 419 outlet; -#X obj 68 -25 inlet noise_reduction; -#X obj 53 185 shunt; -#X obj 111 152 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 -1; -#X obj 301 36 inlet fade; -#X obj 53 150 t a a; -#X connect 0 0 10 0; -#X connect 1 0 10 2; -#X connect 3 0 34 0; -#X connect 4 0 5 1; -#X connect 5 0 3 0; -#X connect 7 0 10 1; -#X connect 10 0 5 0; -#X connect 11 0 13 0; -#X connect 12 0 13 1; -#X connect 13 0 18 0; -#X connect 13 1 17 0; -#X connect 13 1 20 0; -#X connect 14 0 15 0; -#X connect 14 0 17 1; -#X connect 15 0 16 0; -#X connect 16 0 28 0; -#X connect 16 1 29 0; -#X connect 17 0 18 0; -#X connect 18 0 2 0; -#X connect 20 0 14 0; -#X connect 21 0 22 0; -#X connect 22 0 23 0; -#X connect 23 0 24 0; -#X connect 24 0 25 0; -#X connect 25 0 27 0; -#X connect 26 0 12 0; -#X connect 30 0 4 0; -#X connect 31 0 13 0; -#X connect 31 1 11 0; -#X connect 32 0 31 1; -#X connect 33 0 32 0; -#X connect 34 0 31 0; -#X connect 34 1 21 0; diff --git a/externals/gridflow/abstractions/#mouse.pd b/externals/gridflow/abstractions/#mouse.pd deleted file mode 100644 index d94f4971..00000000 --- a/externals/gridflow/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 t a a; -#X obj 126 181 t a a; -#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 t a a; -#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 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 obj 347 81 # << (8 9 10); -#X obj 468 86 #outer >> (8 9 10 11 12); -#X connect 0 0 47 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 37 0; -#X connect 4 0 13 0; -#X connect 5 0 2 0; -#X connect 6 0 43 0; -#X connect 10 0 11 0; -#X connect 11 0 26 0; -#X connect 13 0 47 1; -#X connect 20 0 50 0; -#X connect 25 0 21 0; -#X connect 26 0 1 0; -#X connect 26 1 20 0; -#X connect 27 0 33 0; -#X connect 28 0 25 0; -#X connect 28 1 30 0; -#X connect 28 2 31 0; -#X connect 28 3 29 0; -#X connect 28 4 29 1; -#X connect 29 0 32 0; -#X connect 30 0 22 0; -#X connect 31 0 23 0; -#X connect 32 0 24 0; -#X connect 33 0 28 0; -#X connect 37 0 48 1; -#X connect 38 0 49 0; -#X connect 41 0 42 0; -#X connect 42 0 43 1; -#X connect 43 0 5 0; -#X connect 45 0 46 0; -#X connect 46 0 49 0; -#X connect 47 0 14 0; -#X connect 47 1 48 0; -#X connect 47 2 15 0; -#X connect 48 0 7 0; -#X connect 48 1 34 0; -#X connect 49 0 41 0; -#X connect 50 0 27 0; diff --git a/externals/gridflow/abstractions/#out.pd b/externals/gridflow/abstractions/#out.pd deleted file mode 100644 index c1ae8b2f..00000000 --- a/externals/gridflow/abstractions/#out.pd +++ /dev/null @@ -1,56 +0,0 @@ -#N canvas 453 347 571 342 10; -#X obj 19 70 inlet; -#X obj 235 227 outlet; -#X obj 350 9 loadbang; -#X obj 350 28 args *; -#N canvas 116 23 450 300 \$0-placeholder 0; -#X obj 0 0 r 1196-in; -#X obj 0 20 bang; -#X obj 0 40 gf.error not open; -#X connect 0 0 1 0; -#X connect 1 0 2 0; -#X restore 235 189 pd \$0-placeholder; -#X obj 235 170 s \$0-in; -#X obj 235 208 r \$0-out; -#X obj 235 132 route bang; -#X msg 235 151 bang; -#X text 272 153 hack.; -#X obj 19 89 route open close autoclose; -#X obj 205 89 t a a; -#X obj 19 273 spigot; -#X obj 58 246 route bang; -#X msg 65 273 1; -#X obj 48 219 #finished; -#X obj 48 194 route2 grid list float; -#X msg 19 292 close; -#X obj 350 70 gf.io_generate \$0 out; -#X msg 308 26 bang; -#X obj 350 89 send39 \$0-placeholder; -#X msg 110 23 close; -#X connect 0 0 10 0; -#X connect 2 0 3 0; -#X connect 3 0 18 0; -#X connect 3 1 10 0; -#X connect 6 0 1 0; -#X connect 7 0 8 0; -#X connect 7 1 5 0; -#X connect 8 0 5 0; -#X connect 10 0 18 0; -#X connect 10 1 19 0; -#X connect 10 2 13 0; -#X connect 10 3 11 0; -#X connect 11 0 16 0; -#X connect 11 1 7 0; -#X connect 12 0 17 0; -#X connect 13 0 14 0; -#X connect 13 1 12 1; -#X connect 14 0 12 1; -#X connect 15 0 12 0; -#X connect 15 0 1 0; -#X connect 16 0 15 0; -#X connect 16 1 15 0; -#X connect 16 2 15 0; -#X connect 17 0 10 0; -#X connect 18 0 20 0; -#X connect 19 0 18 0; -#X connect 21 0 10 0; diff --git a/externals/gridflow/abstractions/#polygon_area.pd b/externals/gridflow/abstractions/#polygon_area.pd deleted file mode 100644 index 55daf54f..00000000 --- a/externals/gridflow/abstractions/#polygon_area.pd +++ /dev/null @@ -1,19 +0,0 @@ -#N canvas 44 398 450 214 10; -#X obj 24 25 inlet; -#X obj 24 63 #convolve (2 1 # 0 1); -#X obj 24 82 #convolve (1 2 # 0 1); -#X obj 24 101 # *; -#X obj 24 44 #t; -#X obj 24 120 #fold inv+; -#X obj 24 139 #fold +; -#X obj 24 177 outlet; -#X obj 24 158 # / 2; -#X connect 0 0 4 0; -#X connect 1 0 2 0; -#X connect 2 0 3 0; -#X connect 3 0 5 0; -#X connect 4 0 1 0; -#X connect 4 1 3 1; -#X connect 5 0 6 0; -#X connect 6 0 8 0; -#X connect 8 0 7 0; diff --git a/externals/gridflow/abstractions/#polygon_comparator.pd b/externals/gridflow/abstractions/#polygon_comparator.pd deleted file mode 100644 index 32da8e59..00000000 --- a/externals/gridflow/abstractions/#polygon_comparator.pd +++ /dev/null @@ -1,99 +0,0 @@ -#N canvas 415 302 865 491 10; -#X obj 13 13 inlet left; -#X obj 183 22 inlet right; -#X obj 13 32 route2 precision; -#X obj 33 383 outlet result; -#X obj 183 109 #polygon_radial_map; -#X obj 183 225 #fft; -#X obj 33 225 #fft; -#X obj 33 263 #fft \, sign -1; -#N canvas 0 0 450 300 (subpatch) 0; -#X array \$0-table 256 float 2; -#X coords 0 1 256 0 200 140 1; -#X restore 405 42 graph; -#X obj 33 109 #polygon_radial_map; -#X obj 33 168 #redim (1 256 1); -#X obj 183 168 #redim (1 256 1); -#X obj 33 206 #cast f; -#X obj 33 187 #outer * (1 0); -#X obj 183 187 #outer * (1 0); -#X obj 183 206 #cast f; -#X obj 33 329 #inner (2 f # 1 0) \, seed (f # 0); -#X obj 33 348 #redim (256); -#X obj 33 244 # C.*conj (2 f # 1 0); -#X obj 33 128 #t; -#X obj 183 128 #t; -#X obj 208 129 # sq-; -#X obj 247 129 #fold +; -#X obj 58 129 # sq-; -#X obj 97 129 #fold +; -#X obj 224 237 # *; -#X obj 247 148 #cast f; -#X obj 97 148 #cast f; -#X obj 224 256 # sqrt (f #); -#X obj 33 301 # / (f # 1); -#X obj 33 282 # / (f # 256); -#X obj 183 59 #t; -#X obj 208 59 #polygon_moment; -#X obj 183 80 # -; -#X obj 33 58 #t; -#X obj 58 58 #polygon_moment; -#X obj 33 79 # -; -#X obj 330 437 f; -#X obj 216 456 tabwrite \$0-table; -#X obj 216 420 t f b; -#X msg 346 418 0; -#X obj 355 437 + 1; -#X obj 216 373 t a b; -#X obj 216 401 #to_float; -#X connect 0 0 2 0; -#X connect 1 0 31 0; -#X connect 2 0 4 0; -#X connect 2 0 9 0; -#X connect 2 1 34 0; -#X connect 4 0 20 0; -#X connect 5 0 18 1; -#X connect 6 0 18 0; -#X connect 7 0 30 0; -#X connect 9 0 19 0; -#X connect 10 0 13 0; -#X connect 11 0 14 0; -#X connect 12 0 6 0; -#X connect 13 0 12 0; -#X connect 14 0 15 0; -#X connect 15 0 5 0; -#X connect 16 0 17 0; -#X connect 17 0 3 0; -#X connect 17 0 42 0; -#X connect 18 0 7 0; -#X connect 19 0 10 0; -#X connect 19 1 23 0; -#X connect 20 0 11 0; -#X connect 20 1 21 0; -#X connect 21 0 22 0; -#X connect 22 0 26 0; -#X connect 23 0 24 0; -#X connect 24 0 27 0; -#X connect 25 0 28 0; -#X connect 26 0 25 1; -#X connect 27 0 25 0; -#X connect 28 0 29 1; -#X connect 29 0 16 0; -#X connect 30 0 29 0; -#X connect 31 0 33 0; -#X connect 31 1 32 0; -#X connect 32 0 33 1; -#X connect 33 0 4 0; -#X connect 34 0 36 0; -#X connect 34 1 35 0; -#X connect 35 0 36 1; -#X connect 36 0 9 0; -#X connect 37 0 41 0; -#X connect 37 0 38 1; -#X connect 39 0 38 0; -#X connect 39 1 37 0; -#X connect 40 0 37 1; -#X connect 41 0 37 1; -#X connect 42 0 43 0; -#X connect 42 1 40 0; -#X connect 43 0 39 0; diff --git a/externals/gridflow/abstractions/#polygon_each_edge.pd b/externals/gridflow/abstractions/#polygon_each_edge.pd deleted file mode 100644 index c89adb23..00000000 --- a/externals/gridflow/abstractions/#polygon_each_edge.pd +++ /dev/null @@ -1,24 +0,0 @@ -#N canvas 574 358 450 300 10; -#X obj 20 21 inlet; -#X obj 19 214 outlet; -#X obj 19 195 #store; -#X obj 20 40 t a a; -#X obj 20 59 #finished; -#X obj 102 22 #dim; -#X obj 102 41 #export_list; -#X msg 102 60 \$1; -#X obj 19 156 #outer + (2 1 # 0 1); -#X obj 20 97 #for 0 0 1; -#X obj 19 120 #export; -#X connect 0 0 3 0; -#X connect 2 0 1 0; -#X connect 3 0 4 0; -#X connect 3 1 2 1; -#X connect 3 1 5 0; -#X connect 4 0 9 0; -#X connect 5 0 6 0; -#X connect 6 0 7 0; -#X connect 7 0 9 1; -#X connect 8 0 2 0; -#X connect 9 0 10 0; -#X connect 10 0 8 0; diff --git a/externals/gridflow/abstractions/#polygon_moment.pd b/externals/gridflow/abstractions/#polygon_moment.pd deleted file mode 100644 index 7b3ad84b..00000000 --- a/externals/gridflow/abstractions/#polygon_moment.pd +++ /dev/null @@ -1,65 +0,0 @@ -#N canvas 127 192 736 402 10; -#X obj 24 25 inlet; -#X obj 24 182 # *; -#X obj 24 144 #t; -#X obj 24 201 #fold inv+; -#X obj 24 349 outlet; -#X obj 24 163 #convolve (2 2 # 0 0 0 1); -#X obj 126 221 #convolve (2 1 # 1 1); -#X obj 24 249 # *; -#X obj 24 220 #outer + (2 #); -#X obj 24 268 #fold + \, seed (2 #); -#X obj 24 291 # /; -#X obj 93 249 #polygon_area; -#X obj 24 310 # / 6; -#X obj 270 32 inlet; -#X obj 24 49 # -; -#X obj 24 68 shunt 3 \$1; -#X obj 294 182 # *; -#X obj 294 144 #t; -#X obj 294 201 #fold inv+; -#X obj 294 163 #convolve (2 2 # 0 0 0 1); -#X obj 410 221 #convolve (2 1 # 1 1); -#X obj 294 249 # *; -#X obj 294 291 # /; -#X obj 363 249 #polygon_area; -#X obj 294 310 # / 6; -#X obj 294 220 #outer + (2 2 #); -#X text 416 208 what should the change to this box be?; -#X text 368 117 Second order (covariance matrix); -#X text 65 122 First order (centroid); -#X obj 294 268 #fold + \, seed (2 2 #); -#X text 411 134 NOT WORKING ?; -#X connect 0 0 14 0; -#X connect 1 0 3 0; -#X connect 2 0 5 0; -#X connect 2 1 1 1; -#X connect 2 1 6 0; -#X connect 2 1 11 0; -#X connect 3 0 8 0; -#X connect 5 0 1 0; -#X connect 6 0 7 1; -#X connect 7 0 9 0; -#X connect 8 0 7 0; -#X connect 9 0 10 0; -#X connect 10 0 12 0; -#X connect 11 0 10 1; -#X connect 12 0 4 0; -#X connect 13 0 14 1; -#X connect 14 0 15 0; -#X connect 15 1 2 0; -#X connect 15 2 17 0; -#X connect 16 0 18 0; -#X connect 17 0 19 0; -#X connect 17 1 16 1; -#X connect 17 1 20 0; -#X connect 17 1 23 0; -#X connect 18 0 25 0; -#X connect 19 0 16 0; -#X connect 20 0 21 1; -#X connect 21 0 29 0; -#X connect 22 0 24 0; -#X connect 23 0 22 1; -#X connect 24 0 4 0; -#X connect 25 0 21 0; -#X connect 29 0 22 0; diff --git a/externals/gridflow/abstractions/#polygon_perimetre.pd b/externals/gridflow/abstractions/#polygon_perimetre.pd deleted file mode 100644 index f23ef312..00000000 --- a/externals/gridflow/abstractions/#polygon_perimetre.pd +++ /dev/null @@ -1,18 +0,0 @@ -#N canvas 0 0 450 300 10; -#X obj 37 39 inlet; -#X obj 37 191 outlet; -#X obj 37 58 #outer ignore (0); -#X obj 37 96 #fold put; -#X obj 37 115 # sq-; -#X obj 37 134 #fold +; -#X obj 37 153 # sqrt; -#X obj 37 172 #fold +; -#X obj 37 77 #convolve (2 1 # -1 1); -#X connect 0 0 2 0; -#X connect 2 0 8 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 1 0; -#X connect 8 0 3 0; diff --git a/externals/gridflow/abstractions/#polygon_radial_map.pd b/externals/gridflow/abstractions/#polygon_radial_map.pd deleted file mode 100644 index ded6c88d..00000000 --- a/externals/gridflow/abstractions/#polygon_radial_map.pd +++ /dev/null @@ -1,184 +0,0 @@ -#N canvas 257 49 711 558 10; -#X obj 10 15 inlet polygon; -#X obj 22 92 f; -#X obj 22 54 loadbang; -#X obj 229 200 #polygon_each_edge; -#X obj 229 219 #t; -#X obj 47 92 s \$0-precision; -#X obj 281 242 #unpack; -#X obj 281 261 t f f; -#X obj 281 366 f; -#X obj 281 347 until; -#X obj 205 325 sel; -#X obj 205 344 s \$0-stop; -#X obj 311 328 r \$0-stop; -#X obj 331 366 mod; -#X obj 356 366 r \$0-precision; -#X obj 306 366 +; -#X msg 281 328 666; -#X obj 2 331 outlet radial_map; -#X obj 260 437 tabread \$0-table; -#X obj 221 493 pack; -#X obj 221 512 s \$0-table; -#X obj 253 493 +; -#N canvas 0 0 450 238 directions-of-points 0; -#X obj 20 25 inlet; -#X obj 20 96 # atan; -#X obj 20 115 # *; -#X obj 45 115 r \$0-precision; -#X obj 20 134 # / 36000; -#X obj 45 153 r \$0-precision; -#X obj 20 153 # %; -#N canvas 480 317 313 169 #split 0; -#X obj 34 28 inlet; -#X obj 34 123 outlet; -#X obj 50 85 outlet; -#X obj 34 47 #t; -#X text 58 48 split; -#X obj 50 66 #inner (0 1); -#X obj 34 104 #inner (1 0); -#X connect 0 0 3 0; -#X connect 3 0 6 0; -#X connect 3 1 5 0; -#X connect 5 0 2 0; -#X connect 6 0 1 0; -#X restore 20 44 pd #split 2; -#X obj 20 172 outlet; -#X connect 0 0 7 0; -#X connect 1 0 2 0; -#X connect 2 0 4 0; -#X connect 3 0 2 1; -#X connect 4 0 6 0; -#X connect 5 0 6 1; -#X connect 6 0 8 0; -#X connect 7 0 1 0; -#X connect 7 1 1 1; -#X restore 281 223 pd directions-of-points; -#N canvas 642 350 344 210 closest-turn 0; -#X obj 27 23 inlet; -#X obj 52 68 r \$0-precision; -#X obj 27 144 outlet; -#X obj 27 49 -; -#X obj 27 68 mod; -#X obj 52 87 / 2; -#X obj 77 23 inlet; -#X obj 27 106 * 2; -#X obj 27 125 - 1; -#X obj 27 87 >; -#X text 25 3 figure out clockwise vs counterclockwise; -#X connect 0 0 3 0; -#X connect 1 0 4 1; -#X connect 1 0 5 0; -#X connect 3 0 4 0; -#X connect 4 0 9 0; -#X connect 5 0 9 1; -#X connect 6 0 3 1; -#X connect 7 0 8 0; -#X connect 8 0 2 0; -#X connect 9 0 7 0; -#X restore 326 268 pd closest-turn; -#X obj 260 414 /; -#X obj 285 414 r \$0-precision; -#N canvas 637 343 450 300 find-intersection 0; -#X obj 21 20 inlet edge; -#X obj 110 21 inlet direction; -#X obj 21 259 outlet; -#X text 109 4 float; -#X text 20 4 2x2 matrix; -#X obj 21 63 #rotate; -#X obj 21 128 #ravel; -#X obj 21 147 #unpack 4; -#X obj 110 40 * -1; -#X obj 21 240 expr $f2 - $f1*($f4-$f2)/($f3-$f1); -#X connect 0 0 5 0; -#X connect 1 0 8 0; -#X connect 5 0 6 0; -#X connect 6 0 7 0; -#X connect 7 0 9 0; -#X connect 7 1 9 1; -#X connect 7 2 9 2; -#X connect 7 3 9 3; -#X connect 8 0 5 1; -#X connect 9 0 2 0; -#X restore 77 457 pd find-intersection; -#X obj 77 438 #store; -#X obj 260 395 * 36000; -#X obj 22 130 s \$0-table; -#X msg 22 111 resize \$1; -#X obj 77 409 t b f; -#X obj 221 395 t f f; -#X obj 221 437 t f f; -#X obj 2 255 for 0 0 1; -#X obj 31 236 r \$0-precision; -#X obj 83 293 r \$0-precision; -#X obj 2 312 #import (1); -#X msg 83 312 list \$1; -#X obj 260 160 s \$0-table; -#X msg 260 141 const 0; -#X obj 2 274 tabread \$0-table; -#X obj 207 141 t a a b; -#X obj 13 181 #finished; -#X msg 22 73 256; -#N canvas 0 0 450 300 graph4 0; -#X array \$0-table 256 float 2; -#X coords 0 100 256 0 200 140 1; -#X restore 475 29 graph; -#X obj 75 509 *; -#X obj 10 34 route precision; -#X connect 0 0 47 0; -#X connect 1 0 30 0; -#X connect 1 0 5 0; -#X connect 2 0 44 0; -#X connect 3 0 4 0; -#X connect 4 0 22 0; -#X connect 4 1 27 1; -#X connect 6 0 7 0; -#X connect 6 1 10 1; -#X connect 6 1 23 1; -#X connect 7 0 16 0; -#X connect 7 1 8 1; -#X connect 7 1 23 0; -#X connect 8 0 10 0; -#X connect 8 0 15 0; -#X connect 9 0 8 0; -#X connect 10 0 11 0; -#X connect 10 1 32 0; -#X connect 12 0 9 1; -#X connect 13 0 8 1; -#X connect 14 0 13 1; -#X connect 15 0 13 0; -#X connect 16 0 9 0; -#X connect 18 0 21 0; -#X connect 19 0 20 0; -#X connect 21 0 19 1; -#X connect 22 0 6 0; -#X connect 23 0 15 1; -#X connect 23 0 46 1; -#X connect 24 0 31 0; -#X connect 25 0 24 1; -#X connect 26 0 46 0; -#X connect 27 0 26 0; -#X connect 28 0 24 0; -#X connect 30 0 29 0; -#X connect 31 0 27 0; -#X connect 31 1 26 1; -#X connect 32 0 33 0; -#X connect 32 1 28 0; -#X connect 33 0 19 0; -#X connect 33 1 18 0; -#X connect 34 0 41 0; -#X connect 35 0 34 1; -#X connect 36 0 38 0; -#X connect 37 0 17 0; -#X connect 38 0 37 1; -#X connect 40 0 39 0; -#X connect 41 0 37 0; -#X connect 42 0 43 0; -#X connect 42 1 3 0; -#X connect 42 2 40 0; -#X connect 43 0 34 0; -#X connect 44 0 1 0; -#X connect 46 0 21 1; -#X connect 47 0 1 0; -#X connect 47 1 42 0; -#X coords 0 0 1 1 85 60 0; diff --git a/externals/gridflow/abstractions/#posterize.pd b/externals/gridflow/abstractions/#posterize.pd deleted file mode 100644 index ead8fef2..00000000 --- a/externals/gridflow/abstractions/#posterize.pd +++ /dev/null @@ -1,21 +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 49 # - 1; -#X obj 13 91 outlet; -#X obj 92 11 inlet; -#X obj 150 23 loadbang; -#X obj 150 42 args n; -#X obj 92 30 t a; -#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 9 0; -#X connect 7 0 8 0; -#X connect 8 0 9 0; -#X connect 9 0 1 1; -#X connect 9 0 4 0; diff --git a/externals/gridflow/abstractions/#ravel.pd b/externals/gridflow/abstractions/#ravel.pd deleted file mode 100644 index 35e7b775..00000000 --- a/externals/gridflow/abstractions/#ravel.pd +++ /dev/null @@ -1,15 +0,0 @@ -#N canvas 0 0 450 195 10; -#X obj 14 15 inlet; -#X obj 44 53 #dim; -#X obj 14 34 t a a; -#X obj 14 143 outlet; -#X obj 44 91 #redim (1); -#X obj 44 72 #fold *; -#X obj 14 124 #redim (0); -#X connect 0 0 2 0; -#X connect 1 0 5 0; -#X connect 2 0 6 0; -#X connect 2 1 1 0; -#X connect 4 0 6 1; -#X connect 5 0 4 0; -#X connect 6 0 3 0; diff --git a/externals/gridflow/abstractions/#record.pd b/externals/gridflow/abstractions/#record.pd deleted file mode 100644 index 101ae103..00000000 --- a/externals/gridflow/abstractions/#record.pd +++ /dev/null @@ -1,72 +0,0 @@ -#N canvas 1036 267 571 412 10; -#X obj 235 302 #out; -#X msg 235 190 close; -#X obj 75 41 inlet filename; -#X obj 205 44 inlet close; -#X obj -32 41 inlet videoin; -#X msg 75 100 open \$1; -#X obj 75 77 savepanel; -#X obj 75 124 print; -#X obj 61 231 spigot; -#X obj 123 194 inlet start; -#X msg 123 218 1; -#X msg 124 240 0; -#X obj 205 106 t b b; -#X obj 324 101 vradio 15 1 0 4 \$0-framerate \$0-framerate select_framerate -0 -6 0 12 -241291 -258699 -1 2; -#X text 350 99 10 fps; -#X text 350 116 24 fps; -#X text 350 132 25 fps; -#X text 350 149 30 fps; -#N canvas 691 426 273 271 framerate 0; -#X obj 95 37 r \$0-framerate; -#X floatatom 103 67 5 0 0 0 - - -; -#X obj 107 225 outlet; -#X msg 54 153 10; -#X msg 85 153 24; -#X msg 120 152 25; -#X msg 153 152 30; -#X msg 107 198 framerate \$1; -#X obj 54 114 sel 0; -#X obj 89 114 sel 1; -#X obj 124 115 sel 2; -#X obj 159 114 sel 3; -#X connect 0 0 1 0; -#X connect 1 0 8 0; -#X connect 1 0 9 0; -#X connect 1 0 10 0; -#X connect 1 0 11 0; -#X connect 3 0 7 0; -#X connect 4 0 7 0; -#X connect 5 0 7 0; -#X connect 6 0 7 0; -#X connect 7 0 2 0; -#X connect 8 0 3 0; -#X connect 9 0 4 0; -#X connect 10 0 5 0; -#X connect 11 0 6 0; -#X restore 283 278 pd framerate; -#X obj 75 149 s openfilename; -#X msg 283 247 framerate 10; -#X obj 284 305 r openfilename; -#X text 108 335 I'd like to use [#peephole] to monitor what is being -recorded but it's too buggy at the moment.; -#X msg 283 221 codec jpeg; -#X text 343 178 the framerate option; -#X connect 1 0 0 0; -#X connect 2 0 6 0; -#X connect 3 0 12 0; -#X connect 4 0 8 0; -#X connect 5 0 7 0; -#X connect 5 0 19 0; -#X connect 6 0 5 0; -#X connect 8 0 0 0; -#X connect 9 0 10 0; -#X connect 10 0 8 1; -#X connect 11 0 8 1; -#X connect 12 0 11 0; -#X connect 12 1 1 0; -#X connect 18 0 0 0; -#X connect 20 0 0 0; -#X connect 21 0 0 0; -#X connect 23 0 0 0; diff --git a/externals/gridflow/abstractions/#remap_image.pd b/externals/gridflow/abstractions/#remap_image.pd deleted file mode 100644 index fb560777..00000000 --- a/externals/gridflow/abstractions/#remap_image.pd +++ /dev/null @@ -1,23 +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 92 73 #dim; -#X obj 18 33 t a a; -#X obj 18 110 #finished; -#X obj 18 191 outlet; -#X obj 68 191 outlet; -#X obj 18 130 #for (0 0) (0 0) (1 1); -#X obj 92 92 #export_list; -#X msg 92 111 \$1 \$2; -#X connect 0 0 4 0; -#X connect 1 0 2 0; -#X connect 2 0 6 0; -#X connect 3 0 9 0; -#X connect 4 0 5 0; -#X connect 4 1 3 0; -#X connect 4 1 2 1; -#X connect 5 0 8 0; -#X connect 8 0 7 0; -#X connect 9 0 10 0; -#X connect 10 0 8 1; diff --git a/externals/gridflow/abstractions/#rgb_to_greyscale.pd b/externals/gridflow/abstractions/#rgb_to_greyscale.pd deleted file mode 100644 index 79842613..00000000 --- a/externals/gridflow/abstractions/#rgb_to_greyscale.pd +++ /dev/null @@ -1,8 +0,0 @@ -#N canvas 550 233 335 174 10; -#X obj 10 10 inlet; -#X obj 9 67 outlet; -#X obj 9 29 #inner (3 1 # 77 151 28); -#X obj 9 48 # >> 8; -#X connect 0 0 2 0; -#X connect 2 0 3 0; -#X connect 3 0 1 0; diff --git a/externals/gridflow/abstractions/#rgb_to_rgba.pd b/externals/gridflow/abstractions/#rgb_to_rgba.pd deleted file mode 100644 index 850b2723..00000000 --- a/externals/gridflow/abstractions/#rgb_to_rgba.pd +++ /dev/null @@ -1,6 +0,0 @@ -#N canvas 209 229 409 113 10; -#X obj 22 26 inlet rgb; -#X obj 22 64 outlet rgba; -#X obj 22 45 #inner (3 4 # 1 0 0 0 0 1 0 0 0 0 1 0); -#X connect 0 0 2 0; -#X connect 2 0 1 0; diff --git a/externals/gridflow/abstractions/#rgb_to_yuv.pd b/externals/gridflow/abstractions/#rgb_to_yuv.pd deleted file mode 100644 index 7e341ea0..00000000 --- a/externals/gridflow/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 50 # >> 8; -#X obj 10 30 #inner (3 3 # 76 -44 128 150 -85 -108 29 128 -21); -#X obj 10 70 # + (0 128 128); -#X connect 0 0 3 0; -#X connect 2 0 4 0; -#X connect 3 0 2 0; -#X connect 4 0 1 0; diff --git a/externals/gridflow/abstractions/#rgba_to_rgb.pd b/externals/gridflow/abstractions/#rgba_to_rgb.pd deleted file mode 100644 index 46d5ad0e..00000000 --- a/externals/gridflow/abstractions/#rgba_to_rgb.pd +++ /dev/null @@ -1,6 +0,0 @@ -#N canvas 0 0 450 300 10; -#X obj 26 23 inlet rgba; -#X obj 26 61 outlet rgb; -#X obj 26 42 #inner (4 3 # 1 0 0 0 1 0 0 0 1 0 0 0); -#X connect 0 0 2 0; -#X connect 2 0 1 0; diff --git a/externals/gridflow/abstractions/#rotate.pd b/externals/gridflow/abstractions/#rotate.pd deleted file mode 100644 index f54b1cc3..00000000 --- a/externals/gridflow/abstractions/#rotate.pd +++ /dev/null @@ -1,30 +0,0 @@ -#N canvas 448 101 416 220 10; -#X obj 11 12 inlet; -#X obj 43 190 outlet; -#X obj 171 9 loadbang; -#X obj 171 57 t f; -#X obj 171 28 args (angle f 0); -#X obj 196 57 inlet angle; -#X obj 223 8 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; -#X obj 99 121 #rotatificator; -#X obj 11 61 route2 axis; -#X obj 43 133 t a b; -#X msg 99 100 256; -#X obj 43 152 #inner; -#X obj 43 171 # >> 8; -#X connect 0 0 8 0; -#X connect 2 0 4 0; -#X connect 3 0 7 1; -#X connect 4 0 3 0; -#X connect 4 1 8 0; -#X connect 5 0 3 0; -#X connect 6 0 4 0; -#X connect 7 0 11 1; -#X connect 8 0 7 0; -#X connect 8 1 9 0; -#X connect 9 0 11 0; -#X connect 9 1 10 0; -#X connect 10 0 7 0; -#X connect 11 0 12 0; -#X connect 12 0 1 0; diff --git a/externals/gridflow/abstractions/#saturation.pd b/externals/gridflow/abstractions/#saturation.pd deleted file mode 100644 index 289c2336..00000000 --- a/externals/gridflow/abstractions/#saturation.pd +++ /dev/null @@ -1,35 +0,0 @@ -#N canvas 0 0 450 300 10; -#X obj 59 119 # inv+ 255; -#X obj 8 169 # +; -#X obj 33 28 #rgb_to_greyscale; -#X obj 8 189 # >> 8; -#X obj 106 91 loadbang; -#X text 62 216 keep values inside visible range; -#X obj 8 149 # *; -#X obj 33 119 # *; -#X obj 8 9 inlet image; -#X obj 8 243 outlet image; -#X obj 47 71 inlet saturation; -#X text 170 75 0 = grey \; 256 = identity; -#X text 34 172 mix the original picture with its greyed version; -#X obj 33 48 #greyscale_to_rgb; -#X obj 47 91 t a; -#X obj 8 215 #clip; -#X obj 8 28 #t; -#X obj 74 91 f \$1; -#X connect 0 0 7 1; -#X connect 1 0 3 0; -#X connect 2 0 13 0; -#X connect 3 0 15 0; -#X connect 4 0 17 0; -#X connect 6 0 1 0; -#X connect 7 0 1 1; -#X connect 8 0 16 0; -#X connect 10 0 14 0; -#X connect 13 0 7 0; -#X connect 14 0 6 1; -#X connect 14 0 0 0; -#X connect 15 0 9 0; -#X connect 16 0 6 0; -#X connect 16 1 2 0; -#X connect 17 0 14 0; diff --git a/externals/gridflow/abstractions/#scale_to.pd b/externals/gridflow/abstractions/#scale_to.pd deleted file mode 100644 index b183833b..00000000 --- a/externals/gridflow/abstractions/#scale_to.pd +++ /dev/null @@ -1,31 +0,0 @@ -#N canvas 0 0 450 300 10; -#X obj 28 20 inlet; -#X obj 28 201 outlet; -#X obj 28 110 #for (0 0) (0 0) (1 1); -#X obj 28 144 # *; -#X obj 28 163 # /; -#X obj 28 182 #store; -#X obj 162 145 #dim; -#X obj 162 164 #redim (2); -#X obj 28 64 #finished; -#X obj 28 39 t a a; -#X obj 140 20 inlet; -#X obj 185 32 loadbang; -#X obj 185 51 args size; -#X obj 113 68 t a; -#X connect 0 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 1 0; -#X connect 6 0 7 0; -#X connect 7 0 3 1; -#X connect 8 0 2 0; -#X connect 9 0 8 0; -#X connect 9 1 6 0; -#X connect 9 1 5 1; -#X connect 10 0 13 0; -#X connect 11 0 12 0; -#X connect 12 0 13 0; -#X connect 13 0 2 1; -#X connect 13 0 4 1; diff --git a/externals/gridflow/abstractions/#seq_fold.pd b/externals/gridflow/abstractions/#seq_fold.pd deleted file mode 100644 index cb2c8dc5..00000000 --- a/externals/gridflow/abstractions/#seq_fold.pd +++ /dev/null @@ -1,31 +0,0 @@ -#N canvas 728 111 450 473 10; -#X obj 26 40 inlet end; -#X obj 94 40 inlet elements; -#X obj 26 294 outlet final; -#X obj 115 294 outlet op_left; -#X obj 217 294 outlet op_right; -#X obj 112 75 t b b b; -#X obj 180 218 shunt; -#X msg 270 170 1; -#X msg 241 170 0; -#X obj 270 40 inlet op_result; -#X obj 196 40 inlet seed; -#X obj 196 170 var.#; -#X obj 180 199 var.#; -#X obj 94 199 t b a; -#X connect 0 0 5 0; -#X connect 1 0 13 0; -#X connect 5 0 8 0; -#X connect 5 0 11 0; -#X connect 5 1 12 0; -#X connect 5 2 7 0; -#X connect 6 0 3 0; -#X connect 6 1 2 0; -#X connect 7 0 6 1; -#X connect 8 0 6 1; -#X connect 9 0 12 1; -#X connect 10 0 11 0; -#X connect 11 0 12 1; -#X connect 12 0 6 0; -#X connect 13 0 12 0; -#X connect 13 1 4 0; diff --git a/externals/gridflow/abstractions/#slice.pd b/externals/gridflow/abstractions/#slice.pd deleted file mode 100644 index 46d00f80..00000000 --- a/externals/gridflow/abstractions/#slice.pd +++ /dev/null @@ -1,41 +0,0 @@ -#N canvas 133 255 450 300 10; -#X obj 13 24 inlet; -#X obj 53 259 outlet; -#X obj 53 240 #store; -#X obj 93 24 inlet; -#X obj 153 24 inlet; -#X obj 181 98 # put 1; -#X obj 64 217 #for 0 0 1; -#X obj 93 98 #export_list; -#X obj 13 56 t a a; -#X obj 13 75 #finished; -#X obj 129 198 #ravel; -#X obj 99 178 #ravel; -#X obj 198 26 args start end; -#X obj 153 66 t a; -#X obj 93 68 t a; -#X obj 199 6 loadbang; -#X obj 83 156 list trim; -#X obj 83 137 list prepend set (; -#X obj 83 118 list append ); -#X connect 0 0 8 0; -#X connect 2 0 1 0; -#X connect 3 0 14 0; -#X connect 4 0 13 0; -#X connect 5 0 10 0; -#X connect 6 0 2 0; -#X connect 7 0 18 0; -#X connect 8 0 9 0; -#X connect 8 1 2 1; -#X connect 9 0 6 0; -#X connect 10 0 6 2; -#X connect 11 0 6 1; -#X connect 12 0 14 0; -#X connect 12 1 13 0; -#X connect 13 0 5 0; -#X connect 13 0 11 0; -#X connect 14 0 7 0; -#X connect 15 0 12 0; -#X connect 16 0 6 0; -#X connect 17 0 16 0; -#X connect 18 0 17 0; diff --git a/externals/gridflow/abstractions/#solarize.pd b/externals/gridflow/abstractions/#solarize.pd deleted file mode 100644 index bcf7ecb4..00000000 --- a/externals/gridflow/abstractions/#solarize.pd +++ /dev/null @@ -1,12 +0,0 @@ -#N canvas 0 0 450 300 10; -#X obj 15 14 inlet; -#X obj 15 34 # & 255; -#X obj 15 53 # << 1; -#X obj 15 92 # inv+ 255; -#X obj 15 112 outlet; -#X obj 15 72 # abs- 255; -#X connect 0 0 1 0; -#X connect 1 0 2 0; -#X connect 2 0 5 0; -#X connect 3 0 4 0; -#X connect 5 0 3 0; diff --git a/externals/gridflow/abstractions/#sort.pd b/externals/gridflow/abstractions/#sort.pd deleted file mode 100644 index 174e7a06..00000000 --- a/externals/gridflow/abstractions/#sort.pd +++ /dev/null @@ -1,13 +0,0 @@ -#N canvas 374 137 450 165 10; -#X obj 28 30 inlet; -#X obj 28 136 outlet; -#X obj 28 73 #grade; -#X obj 28 92 #outer + (0); -#X obj 28 117 #store; -#X obj 28 49 #t; -#X connect 0 0 5 0; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 4 0 1 0; -#X connect 5 0 2 0; -#X connect 5 1 4 1; diff --git a/externals/gridflow/abstractions/#spread.pd b/externals/gridflow/abstractions/#spread.pd deleted file mode 100644 index 41a6a8da..00000000 --- a/externals/gridflow/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/abstractions/#swap.pd b/externals/gridflow/abstractions/#swap.pd deleted file mode 100644 index d7914489..00000000 --- a/externals/gridflow/abstractions/#swap.pd +++ /dev/null @@ -1,14 +0,0 @@ -#N canvas 83 326 450 195 10; -#X obj 24 35 inlet A; -#X obj 89 102 inlet B; -#X obj 24 136 outlet A; -#X obj 84 136 outlet B; -#X obj 24 102 #store; -#X obj 24 54 t a a; -#X obj 24 73 #finished; -#X connect 0 0 5 0; -#X connect 1 0 4 1; -#X connect 4 0 2 0; -#X connect 5 0 6 0; -#X connect 5 1 3 0; -#X connect 6 0 4 0; diff --git a/externals/gridflow/abstractions/#t.pd b/externals/gridflow/abstractions/#t.pd deleted file mode 100644 index 5b8fce67..00000000 --- a/externals/gridflow/abstractions/#t.pd +++ /dev/null @@ -1,16 +0,0 @@ -#N canvas 454 233 450 176 10; -#X obj 26 29 inlet; -#X obj 26 116 outlet; -#X obj 72 116 outlet; -#X obj 26 48 t a a; -#X obj 26 67 #finished; -#X obj 26 86 #store; -#X text 120 22 This is for when [t a a] is not sufficient; -#X text 121 36 Because GF doesn't fully follow ordering of; -#X text 121 49 messages.; -#X connect 0 0 3 0; -#X connect 3 0 4 0; -#X connect 3 1 5 1; -#X connect 3 1 2 0; -#X connect 4 0 5 0; -#X connect 5 0 1 0; diff --git a/externals/gridflow/abstractions/#text_to_image.pd b/externals/gridflow/abstractions/#text_to_image.pd deleted file mode 100644 index f9d57480..00000000 --- a/externals/gridflow/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/abstractions/#to_literal.pd b/externals/gridflow/abstractions/#to_literal.pd deleted file mode 100644 index dd2b5563..00000000 --- a/externals/gridflow/abstractions/#to_literal.pd +++ /dev/null @@ -1,18 +0,0 @@ -#N canvas 0 0 322 300 10;
-#X obj 44 149 #export_list;
-#X obj 136 124 #dim;
-#X obj 136 149 #export_list;
-#X obj 44 203 list prepend;
-#X obj 44 97 t a a;
-#X obj 136 173 list append #;
-#X obj 44 55 inlet;
-#X obj 44 238 outlet;
-#X text 44 30 convert a GRID into its literal;
-#X connect 0 0 3 0;
-#X connect 1 0 2 0;
-#X connect 2 0 5 0;
-#X connect 3 0 7 0;
-#X connect 4 0 0 0;
-#X connect 4 1 1 0;
-#X connect 5 0 3 1;
-#X connect 6 0 4 0;
diff --git a/externals/gridflow/abstractions/#window.pd b/externals/gridflow/abstractions/#window.pd deleted file mode 100755 index 48283111..00000000 --- a/externals/gridflow/abstractions/#window.pd +++ /dev/null @@ -1,29 +0,0 @@ -#N canvas 354 116 450 300 10; -#X obj 90 210 #out; -#X msg 65 140 close; -#X obj 16 79 spigot; -#X obj -48 9 inlet; -#X msg 87 106 open window \, title \$1; -#X obj 65 9 inlet; -#X obj 87 83 symbol \$1; -#X obj 65 61 sel 0 1; -#X obj -95 141 loadbang; -#X obj -95 162 args (title s untitled); -#X obj -48 37 route state; -#X obj 65 29 t a; -#X connect 1 0 0 0; -#X connect 2 0 0 0; -#X connect 3 0 10 0; -#X connect 4 0 0 0; -#X connect 5 0 11 0; -#X connect 6 0 4 0; -#X connect 7 0 1 0; -#X connect 7 1 6 0; -#X connect 8 0 9 0; -#X connect 9 0 6 1; -#X connect 9 1 10 0; -#X connect 10 0 11 0; -#X connect 10 1 2 0; -#X connect 11 0 7 0; -#X connect 11 0 2 1; -#X coords 0 0 1 1 24 24 0; diff --git a/externals/gridflow/abstractions/#yuv_to_rgb.pd b/externals/gridflow/abstractions/#yuv_to_rgb.pd deleted file mode 100644 index df2f242f..00000000 --- a/externals/gridflow/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 70 # >> 8; -#X obj 10 30 # - (0 128 128); -#X obj 10 50 #inner (3 3 # 256 256 256 0 -88 454 358 -183 0); -#X connect 0 0 3 0; -#X connect 2 0 1 0; -#X connect 3 0 4 0; -#X connect 4 0 2 0; diff --git a/externals/gridflow/abstractions/ascii.pd b/externals/gridflow/abstractions/ascii.pd deleted file mode 100644 index 1daaa93d..00000000 --- a/externals/gridflow/abstractions/ascii.pd +++ /dev/null @@ -1,12 +0,0 @@ -#N canvas 310 286 450 300 10; -#X obj 22 23 inlet; -#X msg 22 61 to_ascii \$1; -#X obj 22 118 outlet; -#X obj 22 99 #to_float; -#X obj 22 42 int; -#X obj 22 80 #import; -#X connect 0 0 4 0; -#X connect 1 0 5 0; -#X connect 3 0 2 0; -#X connect 4 0 1 0; -#X connect 5 0 3 0; diff --git a/externals/gridflow/abstractions/ascii_to_f.pd b/externals/gridflow/abstractions/ascii_to_f.pd deleted file mode 100644 index 02043a4c..00000000 --- a/externals/gridflow/abstractions/ascii_to_f.pd +++ /dev/null @@ -1,71 +0,0 @@ -#N canvas 230 221 450 387 10; -#X obj 71 6 inlet; -#X obj 71 44 range 48 58; -#X obj 258 143 outlet other; -#X obj 50 128 +; -#X obj 34 147 f; -#X obj 91 296 outlet parsed; -#X obj 91 227 * 1; -#X msg 156 183 -1; -#X msg 130 183 1; -#X obj 258 74 t f b b; -#X msg 280 183 0; -#X obj 50 109 - 48; -#X obj 75 128 * 10; -#X obj 170 74 sel 43 45 46; -#X obj 91 277 / 1; -#X obj 71 25 #to_float; -#X obj 201 260 * 10; -#X obj 176 260 f 1; -#X msg 176 218 1; -#X obj 206 237 spigot 0; -#X msg 257 218 0; -#X obj 279 14 t b; -#X msg 206 218 bang; -#X msg 266 237 1; -#X obj 34 90 r \$0-fini; -#X obj 302 112 s \$0-fini; -#X text 96 261 denominator; -#X text 87 207 sign; -#X obj 302 93 gf.oneshot 0; -#X connect 0 0 15 0; -#X connect 1 0 13 0; -#X connect 1 1 11 0; -#X connect 1 1 21 0; -#X connect 1 1 22 0; -#X connect 1 2 13 0; -#X connect 3 0 4 1; -#X connect 3 0 12 0; -#X connect 4 0 6 0; -#X connect 6 0 14 0; -#X connect 7 0 6 1; -#X connect 8 0 6 1; -#X connect 9 0 2 0; -#X connect 9 1 8 0; -#X connect 9 1 10 0; -#X connect 9 1 20 0; -#X connect 9 1 18 0; -#X connect 9 2 28 0; -#X connect 10 0 3 1; -#X connect 11 0 3 0; -#X connect 12 0 3 1; -#X connect 13 0 8 0; -#X connect 13 0 21 0; -#X connect 13 1 7 0; -#X connect 13 1 21 0; -#X connect 13 2 21 0; -#X connect 13 2 23 0; -#X connect 13 3 9 0; -#X connect 14 0 5 0; -#X connect 15 0 1 0; -#X connect 16 0 17 1; -#X connect 17 0 16 0; -#X connect 17 0 14 1; -#X connect 18 0 17 0; -#X connect 19 0 17 0; -#X connect 20 0 19 1; -#X connect 21 0 28 1; -#X connect 22 0 19 0; -#X connect 23 0 19 1; -#X connect 24 0 4 0; -#X connect 28 0 25 0; diff --git a/externals/gridflow/abstractions/condition.pd b/externals/gridflow/abstractions/condition.pd deleted file mode 100644 index 65daf35b..00000000 --- a/externals/gridflow/abstractions/condition.pd +++ /dev/null @@ -1,40 +0,0 @@ -#N canvas 204 111 450 300 10; -#X obj 115 22 nbx 5 14 -1e+37 1e+37 0 0 empty empty y -10 4 0 10 -24198 --1 -1 99 256; -#X obj 44 21 nbx 5 14 -1e+37 1e+37 0 0 empty empty x -10 4 0 10 -24198 --1 -1 91 256; -#X obj 131 102 &&; -#X floatatom 138 127 5 0 0 0 - - -; -#X obj 237 100 &&; -#X floatatom 244 125 5 0 0 0 - - -; -#X obj 192 151 &&; -#X floatatom 193 173 5 0 0 0 - - -; -#X obj 5 4 inlet; -#X obj 95 1 inlet; -#X obj 152 66 > \$2; -#X obj 194 65 < \$3; -#X obj 258 66 < \$4; -#X obj 105 63 > \$1; -#X obj 191 262 outlet; -#X obj 256 264 outlet; -#X obj 190 230 select 1; -#X obj 191 209 change; -#X connect 0 0 10 0; -#X connect 0 0 12 0; -#X connect 1 0 11 0; -#X connect 1 0 13 0; -#X connect 2 0 3 0; -#X connect 3 0 6 0; -#X connect 4 0 5 0; -#X connect 5 0 6 1; -#X connect 6 0 7 0; -#X connect 7 0 17 0; -#X connect 8 0 1 0; -#X connect 9 0 0 0; -#X connect 10 0 2 1; -#X connect 11 0 4 0; -#X connect 12 0 4 1; -#X connect 13 0 2 0; -#X connect 16 0 14 0; -#X connect 16 1 15 0; -#X connect 17 0 16 0; diff --git a/externals/gridflow/abstractions/count.pd b/externals/gridflow/abstractions/count.pd deleted file mode 100644 index 087bd40d..00000000 --- a/externals/gridflow/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/abstractions/expect.pd b/externals/gridflow/abstractions/expect.pd deleted file mode 100644 index c956ddc2..00000000 --- a/externals/gridflow/abstractions/expect.pd +++ /dev/null @@ -1,13 +0,0 @@ -#N canvas 531 173 450 300 10; -#X obj 11 11 inlet; -#X obj 150 30 args *; -#X obj 150 11 loadbang; -#X obj 11 150 outlet; -#X obj 150 49 t a; -#X obj 11 90 list.==; -#X text 8 229 TODO: should do [gf.error expected %s but got %s]; -#X connect 0 0 5 0; -#X connect 1 0 4 0; -#X connect 2 0 1 0; -#X connect 4 0 5 1; -#X connect 5 0 3 0; diff --git a/externals/gridflow/abstractions/for.pd b/externals/gridflow/abstractions/for.pd deleted file mode 100644 index 068d2462..00000000 --- a/externals/gridflow/abstractions/for.pd +++ /dev/null @@ -1,39 +0,0 @@ -#N canvas 767 232 450 301 10; -#X obj 30 56 inlet from; -#X obj 190 56 inlet to; -#X obj 250 56 inlet step; -#X obj 55 239 outlet; -#X obj 250 82 t f; -#X obj 190 82 t f; -#X obj 55 34 args from to step; -#X obj 30 81 route set float bang; -#X obj 55 170 until; -#X obj 55 189 f; -#X obj 80 189 +; -#X obj 55 220 moses; -#X obj 163 165 bang; -#X obj 55 15 loadbang; -#X obj 55 128 f; -#X obj 55 150 t b f; -#X connect 0 0 7 0; -#X connect 1 0 5 0; -#X connect 2 0 4 0; -#X connect 4 0 10 1; -#X connect 5 0 11 1; -#X connect 6 0 14 1; -#X connect 6 1 5 0; -#X connect 6 2 4 0; -#X connect 7 0 14 1; -#X connect 7 1 14 0; -#X connect 7 2 14 0; -#X connect 8 0 9 0; -#X connect 9 0 10 0; -#X connect 9 0 11 0; -#X connect 10 0 9 1; -#X connect 11 0 3 0; -#X connect 11 1 12 0; -#X connect 12 0 8 1; -#X connect 13 0 6 0; -#X connect 14 0 15 0; -#X connect 15 0 8 0; -#X connect 15 1 9 1; diff --git a/externals/gridflow/abstractions/fps.pd b/externals/gridflow/abstractions/fps.pd deleted file mode 100644 index 015934b6..00000000 --- a/externals/gridflow/abstractions/fps.pd +++ /dev/null @@ -1,215 +0,0 @@ -#N canvas 342 57 660 613 10; -#X obj 18 11 inlet; -#X obj 113 543 outlet; -#X obj 18 261 +; -#X obj 43 261 t a; -#X obj 18 280 moses 1000; -#X obj 18 85 t a a b; -#X msg 71 86 1; -#X obj 71 105 +; -#X obj 96 105 t a; -#X obj 113 337 inv*; -#X obj 113 318 / 1000; -#X obj 83 299 t b a; -#X msg 83 318 0; -#X obj 126 49 symbol; -#N canvas 173 324 450 300 timer 0; -#X obj 18 32 inlet bang; -#X obj 92 32 inlet mode; -#X obj 92 51 listfind real user system cpu logical process; -#X obj 18 175 realtime; -#X obj 18 148 t b b; -#X obj 304 156 t b b; -#X obj 304 175 cputime; -#X obj 265 175 timer; -#X obj 265 156 t b b; -#X obj 18 51 shunt 6; -#X obj 78 148 t b b; -#X obj 78 175 usertime; -#X obj 138 152 t b b; -#X obj 212 153 t b b; -#X obj 212 175 tsctime; -#X obj 138 175 systemtime; -#X obj 18 236 outlet; -#X obj 221 90 print mode; -#X connect 0 0 9 0; -#X connect 1 0 2 0; -#X connect 2 0 9 1; -#X connect 2 0 17 0; -#X connect 3 0 16 0; -#X connect 4 0 3 0; -#X connect 4 1 3 1; -#X connect 5 0 6 0; -#X connect 5 1 6 1; -#X connect 6 0 16 0; -#X connect 7 0 16 0; -#X connect 8 0 7 0; -#X connect 8 1 7 1; -#X connect 9 0 4 0; -#X connect 9 1 10 0; -#X connect 9 2 12 0; -#X connect 9 4 8 0; -#X connect 9 5 5 0; -#X connect 10 0 11 0; -#X connect 10 1 11 1; -#X connect 12 0 15 0; -#X connect 12 1 15 1; -#X connect 13 0 14 0; -#X connect 13 1 14 1; -#X restore 18 66 pd timer; -#X obj 256 40 args (detailed s terse); -#X obj 256 59 listfind terse detailed; -#X obj 256 21 loadbang; -#X obj 280 251 shunt; -#X msg 381 183 1; -#X msg 342 183 0; -#X obj 323 164 t b b b b; -#X obj 113 367 shunt; -#X obj 143 428 list append; -#X obj 280 232 list prepend; -#N canvas 225 135 585 366 min.med.max 0; -#X obj 39 51 #sort; -#X obj 39 32 #import per_message f; -#X obj 39 70 t a a; -#X obj 39 89 #finished; -#X obj 106 56 #dim; -#X obj 39 158 pack 0 0 0 0; -#X obj 106 94 # / 2; -#X obj 220 73 #to_float; -#X obj 39 196 #store; -#X obj 220 92 - 1; -#X obj 39 215 #unpack 4; -#X obj 60 235 +; -#X obj 60 254 / 2; -#X obj 35 275 pack 0 0 0; -#X obj 106 113 #unpack; -#X obj 39 13 inlet; -#X obj 35 294 outlet; -#X obj 133 225 display; -#X obj 133 327 display; -#X obj 39 177 #redim (4 1); -#X obj 106 75 #outer - (1 0); -#X connect 0 0 2 0; -#X connect 1 0 0 0; -#X connect 2 0 3 0; -#X connect 2 1 4 0; -#X connect 2 1 8 1; -#X connect 3 0 5 0; -#X connect 4 0 7 0; -#X connect 4 0 20 0; -#X connect 5 0 19 0; -#X connect 6 0 14 0; -#X connect 7 0 9 0; -#X connect 8 0 10 0; -#X connect 8 0 17 0; -#X connect 9 0 5 3; -#X connect 10 0 13 0; -#X connect 10 1 11 0; -#X connect 10 2 11 1; -#X connect 10 3 13 2; -#X connect 11 0 12 0; -#X connect 12 0 13 1; -#X connect 13 0 16 0; -#X connect 13 0 18 0; -#X connect 14 0 5 1; -#X connect 14 1 5 2; -#X connect 15 0 1 0; -#X connect 19 0 8 0; -#X connect 20 0 6 0; -#X restore 310 310 pd min.med.max; -#X text 169 371 weird; -#X obj 143 390 f; -#X obj 168 390 t b a; -#X obj 143 479 list append; -#X obj 215 460 inv* 1000; -#N canvas 0 0 450 300 stdev 0; -#X obj 16 -43 inlet values; -#X obj 15 194 outlet stdev; -#X obj 96 14 #fold +; -#X obj 96 52 # /; -#X obj 121 33 #dim; -#X obj 96 -5 t a a; -#X obj 16 -24 #import per_message f; -#X obj 121 52 #cast f; -#X obj 16 -5 #t; -#X obj 16 95 # sq-; -#X obj 15 171 #to_float; -#X obj 16 114 #fold + \, seed (f #); -#X obj 16 152 # sqrt (f #); -#X obj 16 133 # /; -#X connect 0 0 6 0; -#X connect 2 0 3 0; -#X connect 3 0 9 1; -#X connect 4 0 7 0; -#X connect 5 0 2 0; -#X connect 5 1 4 0; -#X connect 6 0 8 0; -#X connect 7 0 3 1; -#X connect 7 0 13 1; -#X connect 8 0 9 0; -#X connect 8 1 5 0; -#X connect 9 0 11 0; -#X connect 10 0 1 0; -#X connect 11 0 13 0; -#X connect 12 0 10 0; -#X connect 13 0 12 0; -#X restore 342 351 pd stdev; -#X obj 143 509 list append; -#X obj 310 281 t a a; -#X obj 167 409 spigot; -#X obj 18 30 route bang detailed mode period; -#X obj 177 49 * 1000; -#X connect 0 0 35 0; -#X connect 2 0 3 0; -#X connect 2 0 4 0; -#X connect 3 0 2 1; -#X connect 4 1 11 0; -#X connect 5 0 2 0; -#X connect 5 1 24 0; -#X connect 5 2 6 0; -#X connect 6 0 7 0; -#X connect 7 0 8 0; -#X connect 8 0 7 1; -#X connect 8 0 9 1; -#X connect 9 0 22 0; -#X connect 9 0 30 0; -#X connect 10 0 9 0; -#X connect 11 0 12 0; -#X connect 11 0 21 0; -#X connect 11 1 10 0; -#X connect 12 0 7 1; -#X connect 12 0 2 1; -#X connect 13 0 14 1; -#X connect 14 0 5 0; -#X connect 15 0 16 0; -#X connect 15 1 35 0; -#X connect 16 0 22 1; -#X connect 16 0 34 1; -#X connect 17 0 15 0; -#X connect 18 0 24 1; -#X connect 18 1 33 0; -#X connect 19 0 18 1; -#X connect 20 0 18 1; -#X connect 21 0 24 1; -#X connect 21 1 20 0; -#X connect 21 2 24 0; -#X connect 21 3 19 0; -#X connect 22 0 1 0; -#X connect 22 1 27 1; -#X connect 23 0 29 0; -#X connect 24 0 18 0; -#X connect 25 0 28 0; -#X connect 27 0 23 0; -#X connect 28 0 34 0; -#X connect 28 1 23 1; -#X connect 29 0 32 0; -#X connect 30 0 29 1; -#X connect 31 0 32 1; -#X connect 32 0 1 0; -#X connect 33 0 25 0; -#X connect 33 1 31 0; -#X connect 34 0 27 0; -#X connect 35 0 14 0; -#X connect 35 2 13 0; -#X connect 35 3 36 0; -#X connect 36 0 4 1; diff --git a/externals/gridflow/abstractions/gf.io_generate.pd b/externals/gridflow/abstractions/gf.io_generate.pd deleted file mode 100644 index 21f836ed..00000000 --- a/externals/gridflow/abstractions/gf.io_generate.pd +++ /dev/null @@ -1,68 +0,0 @@ -#N canvas 626 139 789 550 10; -#X msg 74 372 connect 0 0 2 0 \, connect 2 0 1 0; -#X obj 96 353 list trim; -#X obj 96 75 list split 1; -#X obj 96 114 gf.suffix_lookup; -#X obj 143 276 list append; -#X obj 96 315 list prepend; -#X obj 96 213 t b s; -#X obj 96 94 t s s; -#X obj 9 10 inlet; -#X obj 322 65 \$1; -#X obj 184 315 pack s s s; -#X obj 251 292 symbol \$2; -#X obj 251 273 loadbang; -#X obj 74 398 outlet; -#X obj 74 48 t b a b; -#X obj 212 114 sel window; -#X obj 143 257 list append \$2; -#X obj 9 29 route bang; -#X msg 322 313 clear \, obj 0 0 r \$1-in \, obj 0 40 s \$1-out; -#X obj 96 334 list prepend obj 0 20; -#X obj 9 323 \$1; -#X obj 143 238 makefilename #io.%s; -#X obj 213 157 class_exists; -#X obj 213 176 sel 0 1; -#X msg 213 138 symbol #io.quartz; -#X msg 213 214 symbol x11; -#X msg 231 195 symbol quartz; -#X msg 9 417 clear \, obj 0 0 r \$1-in \, obj 0 20 bang \, obj 0 40 -gf.error not open \, connect 0 0 1 0 \, connect 1 0 2 0; -#X obj 117 168 display; -#X connect 0 0 13 0; -#X connect 1 0 13 0; -#X connect 2 0 7 0; -#X connect 2 1 4 1; -#X connect 3 0 6 0; -#X connect 3 2 15 0; -#X connect 3 2 28 0; -#X connect 4 0 19 0; -#X connect 5 0 19 0; -#X connect 6 0 5 0; -#X connect 6 1 10 0; -#X connect 7 0 3 0; -#X connect 7 1 10 2; -#X connect 8 0 17 0; -#X connect 9 0 18 0; -#X connect 10 0 5 1; -#X connect 11 0 10 1; -#X connect 12 0 11 0; -#X connect 14 0 0 0; -#X connect 14 1 2 0; -#X connect 14 2 9 0; -#X connect 15 0 24 0; -#X connect 15 1 21 0; -#X connect 16 0 4 0; -#X connect 17 0 20 0; -#X connect 17 1 14 0; -#X connect 18 0 13 0; -#X connect 19 0 1 0; -#X connect 20 0 27 0; -#X connect 21 0 16 0; -#X connect 22 0 23 0; -#X connect 23 0 25 0; -#X connect 23 1 26 0; -#X connect 24 0 22 0; -#X connect 25 0 21 0; -#X connect 26 0 21 0; -#X connect 27 0 13 0; diff --git a/externals/gridflow/abstractions/gf.nbxhsl.pd b/externals/gridflow/abstractions/gf.nbxhsl.pd deleted file mode 100644 index 7a1ca05e..00000000 --- a/externals/gridflow/abstractions/gf.nbxhsl.pd +++ /dev/null @@ -1,33 +0,0 @@ -#N canvas 770 0 450 300 10; -#X obj 173 41 loadbang; -#X msg 300 79 label \$1; -#X obj 247 79 t s s s; -#X obj 247 174 t a; -#X msg 247 155 receive \$1; -#X msg 269 117 send \$1; -#X obj 50 0 hsl 129 12 0 65535 0 0 1005-s_contrast 1005-contrast contrast -4 7 1 10 -233017 -195568 -195568 0 0; -#X obj 0 0 nbx 5 12 0 65535 0 0 1005-s_contrast 1005-contrast empty -4 7 1 10 -233017 -195568 -195568 0 256; -#X msg 47 75 set \$1; -#X msg 0 75 set \$1; -#X obj 173 60 args (self f) (name s); -#X obj 247 136 makefilename \$1-%s; -#X obj 269 98 makefilename \$1-s_%s; -#X connect 0 0 10 0; -#X connect 1 0 6 0; -#X connect 2 0 11 0; -#X connect 2 1 12 0; -#X connect 2 2 1 0; -#X connect 3 0 7 0; -#X connect 3 0 6 0; -#X connect 4 0 3 0; -#X connect 5 0 3 0; -#X connect 6 0 9 0; -#X connect 7 0 8 0; -#X connect 8 0 6 0; -#X connect 9 0 7 0; -#X connect 10 1 2 0; -#X connect 11 0 4 0; -#X connect 12 0 5 0; -#X coords 0 -1 1 1 181 12 2 0 0; diff --git a/externals/gridflow/abstractions/gf.oneshot.pd b/externals/gridflow/abstractions/gf.oneshot.pd deleted file mode 100644 index 1c02239d..00000000 --- a/externals/gridflow/abstractions/gf.oneshot.pd +++ /dev/null @@ -1,22 +0,0 @@ -#N canvas 520 225 450 300 10; -#X obj 33 82 inlet; -#X obj 33 139 outlet; -#X obj 33 120 t a b; -#X msg 84 82 0; -#X obj 123 20 inlet; -#X obj 123 39 route bang; -#X msg 123 58 1; -#X obj 199 89 args (x f 1); -#X obj 199 70 loadbang; -#X obj 33 101 spigot; -#X connect 0 0 9 0; -#X connect 2 0 1 0; -#X connect 2 1 3 0; -#X connect 3 0 9 1; -#X connect 4 0 5 0; -#X connect 5 0 6 0; -#X connect 5 1 9 1; -#X connect 6 0 9 1; -#X connect 7 0 9 1; -#X connect 8 0 7 0; -#X connect 9 0 2 0; diff --git a/externals/gridflow/abstractions/inv+.pd b/externals/gridflow/abstractions/inv+.pd deleted file mode 100644 index 1aab4c34..00000000 --- a/externals/gridflow/abstractions/inv+.pd +++ /dev/null @@ -1,11 +0,0 @@ -#N canvas 0 0 450 300 10; -#X obj 20 -35 inlet; -#X obj 60 -35 inlet; -#X obj 20 39 outlet; -#X obj 20 20 -; -#X obj 20 -1 swap \$1; -#X connect 0 0 4 0; -#X connect 1 0 4 1; -#X connect 3 0 2 0; -#X connect 4 0 3 0; -#X connect 4 1 3 1; diff --git a/externals/gridflow/abstractions/inv_multiply.pd b/externals/gridflow/abstractions/inv_multiply.pd deleted file mode 100644 index fb3b9189..00000000 --- a/externals/gridflow/abstractions/inv_multiply.pd +++ /dev/null @@ -1,11 +0,0 @@ -#N canvas 0 0 450 300 10; -#X obj 20 -35 inlet; -#X obj 60 -35 inlet; -#X obj 20 39 outlet; -#X obj 20 20 /; -#X obj 20 -1 swap \$1; -#X connect 0 0 4 0; -#X connect 1 0 4 1; -#X connect 3 0 2 0; -#X connect 4 0 3 0; -#X connect 4 1 3 1; diff --git a/externals/gridflow/abstractions/pingpong.pd b/externals/gridflow/abstractions/pingpong.pd deleted file mode 100644 index 406c9d16..00000000 --- a/externals/gridflow/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/abstractions/plotter_control.pd b/externals/gridflow/abstractions/plotter_control.pd deleted file mode 100644 index 091efcef..00000000 --- a/externals/gridflow/abstractions/plotter_control.pd +++ /dev/null @@ -1,119 +0,0 @@ -#N canvas 474 0 746 530 10; -#X obj 8 4 inlet; -#X obj 8 503 outlet; -#X msg 8 463 59 10; -#X text 52 463 comma+newline; -#X obj 201 443 #import; -#X msg 201 424 to_ascii \$1; -#X obj 201 462 #to_float; -#X msg 54 443 44; -#X msg 373 102 list IP; -#X obj 320 102 t b a b; -#X obj 316 362 foreach; -#X obj 316 338 t a b; -#X msg 355 338 0; -#X msg 320 121 end; -#X obj 368 381 spigot; -#X msg 435 412 1; -#X obj 315 381 t b a b; -#X obj 337 465 t a; -#X obj 8 172 list split 1; -#X obj 30 210 list; -#X obj 297 208 #import; -#X obj 297 227 # & -33; -#X text 352 226 turns to uppercase if content is only letters; -#X obj 297 246 #export_symbol; -#X msg 100 443 32; -#X obj 17 49 list; -#X msg 70 68 list LB; -#X obj 17 68 t b l b; -#X msg 146 443 3; -#X msg 17 87 break \, end; -#X obj 126 49 t b l b; -#X msg 179 49 list LB; -#X obj 148 68 #export_symbol; -#X msg 126 87 break \, end; -#X obj 8 23 route other print print_from_ascii; -#X obj 8 191 t b b s; -#X obj 104 369 t a b; -#X obj 316 305 t a b; -#X obj 343 425 symbol; -#X msg 381 305 symbol space; -#X msg 143 369 symbol comma; -#X obj 8 424 route end comma space break; -#X obj 343 444 list trim; -#X obj 17 106 s \$0-e; -#X obj 8 405 r \$0-e; -#X obj 320 148 s \$0-e; -#X obj 337 484 s \$0-e; -#X obj 126 106 s \$0-e; -#X obj 297 265 s \$0-e; -#X obj 320 40 route ip IP; -#X obj 8 272 s \$0-e; -#X msg 8 253 end; -#X connect 0 0 34 0; -#X connect 2 0 1 0; -#X connect 4 0 6 0; -#X connect 5 0 4 0; -#X connect 6 0 1 0; -#X connect 7 0 1 0; -#X connect 8 0 45 0; -#X connect 9 0 13 0; -#X connect 9 1 36 0; -#X connect 9 2 8 0; -#X connect 10 0 16 0; -#X connect 11 0 10 0; -#X connect 11 1 12 0; -#X connect 12 0 14 1; -#X connect 13 0 45 0; -#X connect 14 0 38 0; -#X connect 15 0 14 1; -#X connect 16 0 15 0; -#X connect 16 1 17 0; -#X connect 16 2 14 0; -#X connect 17 0 46 0; -#X connect 18 0 35 0; -#X connect 18 1 19 1; -#X connect 19 0 36 0; -#X connect 20 0 21 0; -#X connect 21 0 23 0; -#X connect 23 0 48 0; -#X connect 24 0 1 0; -#X connect 25 0 27 0; -#X connect 26 0 43 0; -#X connect 27 0 29 0; -#X connect 27 1 37 0; -#X connect 27 2 26 0; -#X connect 28 0 1 0; -#X connect 29 0 43 0; -#X connect 30 0 33 0; -#X connect 30 1 32 0; -#X connect 30 2 31 0; -#X connect 31 0 47 0; -#X connect 32 0 47 0; -#X connect 33 0 47 0; -#X connect 34 0 18 0; -#X connect 34 1 25 0; -#X connect 34 2 30 0; -#X connect 34 3 49 0; -#X connect 35 0 51 0; -#X connect 35 1 19 0; -#X connect 35 2 20 0; -#X connect 36 0 11 0; -#X connect 36 1 40 0; -#X connect 37 0 11 0; -#X connect 37 1 39 0; -#X connect 38 0 42 0; -#X connect 39 0 38 1; -#X connect 40 0 38 1; -#X connect 41 0 2 0; -#X connect 41 1 7 0; -#X connect 41 2 24 0; -#X connect 41 3 28 0; -#X connect 41 4 5 0; -#X connect 42 0 17 0; -#X connect 44 0 41 0; -#X connect 49 0 9 0; -#X connect 49 1 9 0; -#X connect 49 2 18 0; -#X connect 51 0 50 0; diff --git a/externals/gridflow/abstractions/plotter_parser.pd b/externals/gridflow/abstractions/plotter_parser.pd deleted file mode 100644 index 46c9a6b5..00000000 --- a/externals/gridflow/abstractions/plotter_parser.pd +++ /dev/null @@ -1,77 +0,0 @@ -#N canvas 738 220 450 377 10; -#X obj 156 11 inlet; -#X obj 320 117 - 32; -#X obj 290 184 #to_symbol; -#X obj 156 30 #to_float; -#X obj 156 49 shunt; -#X obj 186 68 sel 3; -#X msg 205 49 0; -#X obj 112 140 sel 10 44 59; -#X obj 230 88 range 65 91 97 123; -#X obj 149 268 t l l; -#X obj 149 249 list prepend; -#X obj 126 287 list; -#X obj 127 220 t b b; -#X obj 290 165 #import (2); -#X obj 126 306 list prepend; -#X obj 126 325 list trim; -#X obj 126 344 outlet hpgl; -#X obj 200 140 outlet other; -#X text 103 49 strings; -#X text 110 88 floats; -#X text 31 140 punctuation; -#X text 360 89 letters; -#X msg 201 201 1; -#X msg 248 165 reset; -#X obj 290 245 sel LB; -#X msg 235 49 1; -#X obj 302 33 list prepend; -#X obj 390 33 t a; -#X obj 279 66 list; -#X obj 253 283 #to_symbol; -#X obj 127 201 gf.oneshot; -#X obj 156 88 ascii_to_f; -#X connect 0 0 3 0; -#X connect 1 0 13 0; -#X connect 2 0 14 1; -#X connect 2 0 22 0; -#X connect 2 0 24 0; -#X connect 3 0 4 0; -#X connect 4 0 31 0; -#X connect 4 1 5 0; -#X connect 5 0 6 0; -#X connect 5 0 28 0; -#X connect 5 0 26 1; -#X connect 5 1 26 0; -#X connect 6 0 4 1; -#X connect 7 0 30 0; -#X connect 7 2 30 0; -#X connect 7 3 17 0; -#X connect 8 0 7 0; -#X connect 8 1 13 0; -#X connect 8 2 7 0; -#X connect 8 3 1 0; -#X connect 8 4 7 0; -#X connect 9 0 11 1; -#X connect 9 1 10 1; -#X connect 10 0 9 0; -#X connect 11 0 14 0; -#X connect 12 0 11 1; -#X connect 12 0 10 1; -#X connect 12 1 11 0; -#X connect 12 1 23 0; -#X connect 13 0 2 0; -#X connect 14 0 15 0; -#X connect 15 0 16 0; -#X connect 22 0 30 1; -#X connect 23 0 13 0; -#X connect 24 0 25 0; -#X connect 25 0 4 1; -#X connect 26 0 27 0; -#X connect 26 0 28 1; -#X connect 27 0 26 1; -#X connect 28 0 29 0; -#X connect 29 0 10 0; -#X connect 30 0 12 0; -#X connect 31 0 10 0; -#X connect 31 1 8 0; diff --git a/externals/gridflow/abstractions/seq_fold.pd b/externals/gridflow/abstractions/seq_fold.pd deleted file mode 100644 index 5be24887..00000000 --- a/externals/gridflow/abstractions/seq_fold.pd +++ /dev/null @@ -1,31 +0,0 @@ -#N canvas 512 144 450 473 10; -#X obj 26 40 inlet end; -#X obj 94 40 inlet elements; -#X obj 180 199 f; -#X obj 26 294 outlet final; -#X obj 115 294 outlet op_left; -#X obj 217 294 outlet op_right; -#X obj 94 199 t b f; -#X obj 112 75 t b b b; -#X obj 180 218 shunt; -#X msg 270 170 1; -#X msg 241 170 0; -#X obj 270 40 inlet op_result; -#X obj 196 40 inlet seed; -#X obj 196 180 f; -#X connect 0 0 7 0; -#X connect 1 0 6 0; -#X connect 2 0 8 0; -#X connect 6 0 2 0; -#X connect 6 1 5 0; -#X connect 7 0 10 0; -#X connect 7 0 13 0; -#X connect 7 1 2 0; -#X connect 7 2 9 0; -#X connect 8 0 4 0; -#X connect 8 1 3 0; -#X connect 9 0 8 1; -#X connect 10 0 8 1; -#X connect 11 0 2 1; -#X connect 12 0 13 0; -#X connect 13 0 2 1; diff --git a/externals/gridflow/abstractions/var.#.pd b/externals/gridflow/abstractions/var.#.pd deleted file mode 100644 index 85402ebf..00000000 --- a/externals/gridflow/abstractions/var.#.pd +++ /dev/null @@ -1,16 +0,0 @@ -#N canvas 373 266 450 300 10; -#X obj 15 120 #store; -#X obj 15 21 inlet; -#X obj 214 22 inlet; -#X obj 15 139 outlet; -#X obj 15 46 route bang; -#X obj 89 46 t a a; -#X obj 89 65 #finished; -#X connect 0 0 3 0; -#X connect 1 0 4 0; -#X connect 2 0 0 1; -#X connect 4 0 0 0; -#X connect 4 1 5 0; -#X connect 5 0 6 0; -#X connect 5 1 0 1; -#X connect 6 0 0 0; diff --git a/externals/gridflow/base/flow_objects.c b/externals/gridflow/base/flow_objects.c deleted file mode 100644 index 89120e62..00000000 --- a/externals/gridflow/base/flow_objects.c +++ /dev/null @@ -1,3080 +0,0 @@ -/* - $Id: flow_objects.c 3969 2008-07-04 19:22:23Z matju $ - - GridFlow - Copyright (c) 2001-2008 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 <string> -#include <sstream> -#include <errno.h> -#include "../gridflow.h.fcs" -#ifndef DESIREDATA -extern "C" { -#include "bundled/g_canvas.h" -}; -#endif - -extern "C" t_canvas *canvas_getrootfor(t_canvas *x); - -/* both oprintf are copied from desiredata */ - -//using namespace std; // can't - -static void voprintf(std::ostream &buf, const char *s, va_list args) { - char *b; - vasprintf(&b,s,args); - buf << b; - free(b); -} -static void oprintf(std::ostream &buf, const char *s, ...) { - va_list args; - va_start(args,s); - voprintf(buf,s,args); - va_end(args); -} - -/* ---------------------------------------------------------------- */ - -// BAD HACK: GCC complains: unimplemented (--debug mode only) (i don't remember which GCC this was) -#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 <long n> class SCopy { -public: template <class T> static inline void __attribute__((always_inline)) f(T *a, 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(T *a, T *b) {}}; - -/*template <> class SCopy<4> { -public: template <class T> - static inline void __attribute__((always_inline)) f(T *a, T *b) { - *a=*b; SCopy<3>::f(a+1,b+1);} - static inline void __attribute__((always_inline)) f(uint8 *a, 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 : FObject { - \attr NumberTypeE nt; - \constructor (NumberTypeE nt) {this->nt = nt;} - \grin 0 -}; -GRID_INLET(GridCast,0) { - out = new GridOutlet(this,0,in->dim,nt); -} GRID_FLOW { - out->send(n,data); -} GRID_END -\end class {install("#cast",1,1); add_creator("@cast");} - -//**************************************************************** - -GridHandler *stromgol; // remove this asap - -//{ ?,Dim[B] -> Dim[*Cs] } -// out0 nt to be specified explicitly -\class GridImport : FObject { - \attr NumberTypeE cast; - \attr P<Dim> dim; // size of grids to send - PtrGrid dim_grid; - \constructor (...) { - dim_grid.constrain(expect_dim_dim_list); - this->cast = argc>=2 ? NumberTypeE_find(argv[1]) : int32_e; - if (argc>2) RAISE("too many arguments"); - if (argc>0 && argv[0]!=gensym("per_message")) { - dim_grid=new Grid(argv[0]); - dim = dim_grid->to_dim(); - if (!dim->prod()) RAISE("target grid size must not be zero"); - } - } - ~GridImport() {} - \decl 0 reset(); - \decl 0 symbol(t_symbol *x); - \decl 0 to_ascii(...); - //\decl 0 list(...); - \decl 1 per_message(); - \grin 0 - \grin 1 int32 - template <class T> void process (long n, T *data) { - if (in.size()<=0) in.resize(1); - if (!in[0]) in[0]=new GridInlet((FObject *)this,stromgol); - while (n) { - if (!out || !out->dim) out = new GridOutlet(this,0,dim?dim:in[0]->dim,cast); - long n2 = min((long)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) { - P<Dim> d = dim_grid->to_dim(); - if (!d->prod()) RAISE("target grid size must not be zero"); - dim = d; -} GRID_END - -\def 0 symbol(t_symbol *x) { - const char *name = x->s_name; - long n = strlen(name); - if (!dim) out=new GridOutlet(this,0,new Dim(n)); - process(n,(uint8 *)name); -} -\def 0 to_ascii(...) { - std::ostringstream os; - pd_oprint(os,argc,argv); - string s = os.str(); - long n = s.length(); - if (!dim) out=new GridOutlet(this,0,new Dim(n),cast); - process(n,(uint8 *)s.data()); -} - -\def 0 list(...) {//first two lines are there until grins become strictly initialized. - if (in.size()<=0) in.resize(1); - if (!in[0]) in[0]=new GridInlet((FObject *)this,stromgol); - in[0]->from_list(argc,argv,cast);} -\def 1 per_message() {dim=0; dim_grid=0;} - -\def 0 reset() {int32 foo[1]={0}; while (out->dim) out->send(1,foo);} -\end class {install("#import",2,1); add_creator("@import"); stromgol = &GridImport_grid_0_hand;} - -//**************************************************************** -/*{ Dim[*As] -> ? }*/ -/* in0: integer nt */ -\class GridToFloat : FObject { - \constructor () {} - \grin 0 -}; -GRID_INLET(GridToFloat,0) { -} GRID_FLOW { - for (int i=0; i<n; i++) outlet_float(bself->outlets[0],data[i]); -} GRID_END -\end class {install("#to_float",1,1); add_creator("#export"); add_creator("@export");} - -\class GridToSymbol : FObject { - \constructor () {} - \grin 0 -}; -GRID_INLET(GridToSymbol,0) { - in->set_chunk(0); -} GRID_FLOW { - char c[n+1]; - for (int i=0; i<n; i++) c[i]=(char)data[i]; - c[n]=0; - outlet_symbol(bself->outlets[0],gensym(c)); -} GRID_END -\end class {install("#to_symbol",1,1); add_creator("#export_symbol"); add_creator("@export_symbol");} - -/*{ Dim[*As] -> ? }*/ -/* in0: integer nt */ -\class GridExportList : FObject { - \constructor () {} - int n; - \grin 0 -}; - -GRID_INLET(GridExportList,0) { - long n = in->dim->prod(); - if (n>1000000) RAISE("list too big (%ld elements, max 1000000)", n); - this->n = n; - in->set_chunk(0); -} GRID_FLOW { - send_out(0,n,data); -} GRID_FINISH { - if (in->dim->prod()==0) send_out(0,0,data); -} GRID_END - -\end class {install("#to_list",1,1); add_creator("#export_list"); add_creator("@export_list");} - -/* **************************************************************** */ -\class GridPrint : FObject { - \constructor (t_symbol *name=0) { - this->dest = 0; - this->name = name; - base=10; trunc=70; maxrows=50; - } - \attr t_symbol *name; - \grin 0 - int base; - uint32 trunc; - int maxrows; - int columns; - t_pd *dest; - \decl 0 dest (void *p); - \decl void end_hook (); - \decl 0 base (int x); - \decl 0 trunc (int x); - \decl 0 maxrows (int y); - void puts (const char *s) { - if (!dest) post("%s",s); - else { - int n = strlen(s); - t_atom a[n]; - for (int i=0; i<n; i++) SETFLOAT(a+i,s[i]); - //fprintf(stderr,"dest=%p\n",dest); - //fprintf(stderr,"*dest={%08x,%08x,%08x,%08x,...}\n",dest[0],dest[1],dest[2],dest[3]); - pd_typedmess(dest,gensym("very_long_name_that_nobody_uses"),n,a); - } - } - void puts (std::string s) {puts(s.data());} - void puts (std::ostringstream &s) {puts(s.str());} - template <class T> void make_columns (int n, T *data); - template <class T> void dump(std::ostream &s, int n, T *data, char sep=' ', int trunc=-1) { - if (trunc<0) trunc=this->trunc; - std::string f = format(NumberTypeE_type_of(data)); - for (int i=0; i<n; i++) { - if (base!=2) oprintf(s,f.data(),data[i]); - else { - T x = gf_abs(data[i]); - int ndigits = 1+highest_bit(uint64(x)); - for (int j=columns-ndigits-(data[i]!=x); j>=0; j--) s<<' '; - if (data[i]!=x) s<<'-'; - for (int j=ndigits-1; j>=0; j--) { - s<<char('0'+(((long)x>>j)&1)); - } - } - if (i<n-1) s << sep; - } - } - void dump_dims(std::ostream &s, GridInlet *in) { - if (name && name!=&s_) s << name->s_name << ": "; - s << "Dim["; - for (int i=0; i<in->dim->n; i++) { - s << in->dim->v[i]; - if (i<in->dim->n-1) s << ','; - } - s << "]"; - if (in->nt!=int32_e) s << "(" << number_type_table[in->nt].name << ")"; - s << ": "; - } - std::string format (NumberTypeE nt) { - if (nt==float32_e) return "%6.6f"; - if (nt==float64_e) return "%14.14f"; - std::ostringstream r; - r << "%"; - r << columns; - //if (nt==int64_e) r << "l"; - if (base==2) r << "b"; else - if (base==8) r << "o"; else - if (base==10) r << "d"; else - if (base==16) r << "x"; - return r.str(); - } -}; -\def 0 dest (void *p) {dest = (t_pd *)p;} -\def void end_hook () {} -\def 0 base (int x) { if (x==2 || x==8 || x==10 || x==16) base=x; else RAISE("base %d not supported",x); } -\def 0 trunc (int x) { - if (x<0 || x>240) RAISE("out of range (not in 0..240 range)"); - trunc = x; -} -\def 0 maxrows (int y) {maxrows = y;} -template <class T> void GridPrint::make_columns (int n, T *data) { - long maxv=0; - long minv=0; - for (int i=0; i<n; i++) { - if (maxv<data[i]) maxv=long(data[i]); - if (minv>data[i]) minv=long(data[i]); - } - int maxd = 1 + (maxv<0) + int(log(max(1.,fabs(maxv)))/log(base)); - int mind = 1 + (minv<0) + int(log(max(1.,fabs(minv)))/log(base)); - //fprintf(stderr,"v=(%d,%d) d=(%d,%d)\n",minv,maxv,mind,maxd); - columns = max(maxd,mind); -} -GRID_INLET(GridPrint,0) { - in->set_chunk(0); -} GRID_FLOW { - std::ostringstream head; - dump_dims(head,in); - int ndim = in->dim->n; - if (ndim > 3) { - head << " (not printed)"; - puts(head); - } else if (ndim < 2) { - make_columns(n,data); - dump(head,n,data,' ',trunc); - puts(head); - } else if (ndim == 2) { - puts(head); - make_columns(n,data); - long sy = in->dim->v[0]; - long sx = n/sy; - for (int row=0; row<in->dim->v[0]; row++) { - std::ostringstream body; - dump(body,sx,&data[sx*row],' ',trunc); - puts(body); - if (row>maxrows) {puts("..."); break;} - } - } else if (ndim == 3) { - puts(head); - make_columns(n,data); - int sy = in->dim->v[0]; - int sx = in->dim->v[1]; - int sz = n/sy; - int sz2 = sz/in->dim->v[1]; - for (int row=0; row<sy; row++) { - std::ostringstream str; - for (int col=0; col<sx; col++) { - str << "("; - dump(str,sz2,&data[sz*row+sz2*col],' ',trunc); - str << ")"; - if (str.str().size()>trunc) break; - } - puts(str); - if (row>maxrows) {puts("..."); break;} - } - } - end_hook(0,0); -} GRID_FINISH { - std::ostringstream head; - dump_dims(head,in); - if (in->dim->prod()==0) puts(head); -} GRID_END -\end class {install("#print",1,1); add_creator("@print");} - -/* **************************************************************** */ -// [#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 : FObject { - - PtrGrid r; // can't be \attr - PtrGrid put_at; // can't be //\attr - \attr Numop *op; - int32 *wdex ; // temporary buffer, copy of put_at - int32 *fromb; - int32 *to2 ; - int lsd; // lsd = Last Same Dimension (for put_at) - int d; // goes with wdex - \constructor (Grid *r=0) { - put_at.constrain(expect_max_one_dim); - this->r = r?r:new Grid(new Dim(),int32_e,true); - op = op_put; - wdex = NEWBUF(int32,Dim::MAX_DIM); // temporary buffer, copy of put_at - fromb = NEWBUF(int32,Dim::MAX_DIM); - to2 = NEWBUF(int32,Dim::MAX_DIM); - } - ~GridStore () { - DELBUF(wdex); - DELBUF(fromb); - DELBUF(to2); - } - \decl 0 bang (); - \decl 1 reassign (); - \decl 1 put_at (Grid *index); - \grin 0 int - \grin 1 - template <class T> void compute_indices(T *v, long nc, long 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(T *v, long nc, long 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; - int32 v[Dim::MAX_DIM]; - if (na<1) RAISE("must have at least 1 dimension.",na,1,1+nb); - long nc = in->dim->get(na-1); - if (nc>nb) RAISE("got %d elements in last dimension, expecting <= %d", nc, nb); - long nnc = r->dim->prod(nc); - int lastindexable = nnc ? r->dim->prod()/nnc-1 : 0; // SIGFPE happened when r was especially empty (nnc==0) - int ngreatest = nt_greatest((T *)0); - if (lastindexable > ngreatest) RAISE("lastindexable=%d > ngreatest=%d (ask matju)",lastindexable,ngreatest); - 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_chunk(na-1); -} GRID_FLOW { - int na = in->dim->n; - int nc = in->dim->get(na-1); - long size = r->dim->prod(nc); - long nd = n/nc; - T w[n]; - 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 (long k=0,i=0; i<nc; i++) for (long j=0; j<n; j+=nc) v[k++] = data[i+j]; - compute_indices(v,nc,nd); - } -#define FOO(type) { \ - type *p = (type *)*r; \ - if (size<=16) { \ - type *foo = NEWBUF(type,nd*size); \ - long 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) { - long n = in->dim->prod(0,-2); - long size = r->dim->prod(); -#define FOO(T) while (n--) out->send(size,(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; - } - SAME_TYPE(in,r); - // put_at ( ... ) - //!@#$ should check types. if (r->nt!=in->nt) RAISE("shoo"); - long nn=r->dim->n, na=put_at->dim->v[0], nb=in->dim->n; - int32 sizeb[nn]; - for (int i=0; i<nn; i++) { fromb[i]=0; sizeb[i]=1; } - COPY(wdex ,(int32 *)*put_at ,put_at->dim->prod()); - COPY(fromb+nn-na,(int32 *)*put_at ,na); - COPY(sizeb+nn-nb,(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*(number_type_table[in->nt].size/8)>GridOutlet::MAX_PACKET_SIZE ||*/ - fromb[lsd]!=0 || sizeb[lsd]!=r->dim->v[lsd]) break; - } - lsd++; - in->set_chunk(lsd-nn+in->dim->n); -} GRID_FLOW { - //fprintf(stderr,"d=%d\n",d); - if (!put_at) { // reassign - COPY(((T *)*(r.next ? r.next.p : &*r.p))+in->dex, data, n); - return; - } - // put_at (...) - long cs = in->factor(); // chunksize - int32 v[lsd]; - int32 *x = wdex; - 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,(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) return; x[d]++; if (x[d]<to2[d]) break;} - d++; - } -} GRID_END -\def 0 bang () { - t_atom a[2]; - SETFLOAT(a+0,0); - SETSYMBOL(a+1,gensym("#")); - pd_list((t_pd *)bself,&s_list,2,a); -} -\def 1 reassign () { put_at=0; } -\def 1 put_at (Grid *index) { put_at=index; } -\end class {install("#store",2,1); add_creator("@store");} - -//**************************************************************** -//{ Dim[*As]<T> -> Dim[*As]<T> } or -//{ Dim[*As]<T>,Dim[*Bs]<T> -> Dim[*As]<T> } -\class GridOp : FObject { - \attr Numop *op; - PtrGrid r; - \constructor (Numop *op, Grid *r=0) { - this->op=op; - this->r=r?r:new Grid(new Dim(),int32_e,true); - } - \grin 0 - \grin 1 -}; - -GRID_INLET(GridOp,0) { - snap_backstore(r); - SAME_TYPE(in,r); - out=new GridOutlet(this,0,in->dim,in->nt); - in->set_mode(6); - if (op->size>1 && (in->dim->get(in->dim->n-1)!=op->size || r->dim->get(r->dim->n-1)!=op->size)) - RAISE("using %s requires Dim(...,%d) in both inlets but got: left=%s right=%s", - op->name,op->size,in->dim->to_s(),r->dim->to_s()); -} GRID_ALLOC { - //out->ask(in->allocn,(T * &)in->alloc,in->allocfactor,in->allocmin,in->allocmax); -} GRID_FLOW { - T *rdata = (T *)*r; - long loop = r->dim->prod(); - if (sizeof(T)==8) { - fprintf(stderr,"1: data=%p rdata=%p\n",data,rdata); - WATCH(n,data); - } - //fprintf(stderr,"[#] op=%s loop=%ld\n",op->name,loop); - if (loop>1) { - if (in->dex+n <= loop) { - op->zip(n/op->size,data,rdata+in->dex); - } else { - // !@#$ should prebuild and reuse this array when "loop" is small - T data2[n]; - long ii = mod(in->dex,loop); - long m = min(loop-ii,n); - COPY(data2,rdata+ii,m); - long nn = m+((n-m)/loop)*loop; - for (long 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,data2); - WATCH(n,data); WATCH(n,data2); - } - op->zip(n/op->size,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 -\end class {install("#",2,1); add_creator("@");} - -//**************************************************************** -\class GridFold : FObject { - \attr Numop *op; - \attr PtrGrid seed; - \constructor (Numop *op) {this->op=op;} - \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); - 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); - in->set_chunk(yi); - if (in->dim->prod(yi)==0) { - long n = out->dim->prod(); - T x=0; op->on(x)->neutral(&x,at_left); - for(long i=0; i<n; i++) out->send(1,&x); - } -} GRID_FLOW { - int an = in->dim->n; - int bn = seed?seed->dim->n:0; - long yn = in->dim->v[an-bn-1]; - long zn = in->dim->prod(an-bn); - T buf[n/yn]; - long nn=n; - long yzn=yn*zn; - for (long i=0; n; i+=zn, data+=yzn, n-=yzn) { - if (seed) COPY(buf+i,((T *)*seed),zn); - else {T neu; op->on(*buf)->neutral(&neu,at_left); op_put->map(zn,buf+i,neu);} - op->fold(zn,yn,buf+i,data); - } - out->send(nn/yn,buf); -} GRID_FINISH { -} GRID_END - -\end class {install("#fold",1,1);} - -\class GridScan : FObject { - \attr Numop *op; - \attr PtrGrid seed; - \constructor (Numop *op) {this->op = op;} - \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_chunk(an-bn-1); -} GRID_FLOW { - int an = in->dim->n; - int bn = seed?seed->dim->n:0; - long yn = in->dim->v[an-bn-1]; - long zn = in->dim->prod(an-bn); - long factor = in->factor(); - T buf[n]; - COPY(buf,data,n); - if (seed) { - for (long i=0; i<n; i+=factor) op->scan(zn,yn,(T *)*seed,buf+i); - } else { - T neu; op->on(*buf)->neutral(&neu,at_left); - T seed[zn]; op_put->map(zn,seed,neu); - for (long i=0; i<n; i+=factor) op->scan(zn,yn, seed,buf+i); - } - out->send(n,buf); -} GRID_END - -\end class {install("#scan",1,1);} - -//**************************************************************** -// L is a Dim[*si,sj, *ss]<T> -// R is a Dim[ sj,*sk,*ss]<T> -// Seed is a Dim[ *ss]<T> -// result is a Dim[*si, *sk,*ss]<T> -// Currently *ss can only be = Dim[] -\class GridInner : FObject { - \attr Numop *op; - \attr Numop *fold; - \attr PtrGrid seed; - PtrGrid r; - PtrGrid r2; // temporary - bool use_dot; - \constructor (Grid *r=0) { - this->op = op_mul; - this->fold = op_add; - this->seed = new Grid(new Dim(),int32_e,true); - this->r = r ? r : new Grid(new Dim(),int32_e,true); - } - \grin 0 - \grin 1 -}; - -// let's see this as a matrix product like L[i,j]*R[j,k] in Einstein notation -// L: matrix of size si by sj -// R: matrix of size sj by sk -// LR: matrix of size si by sk -template <class T> void inner_child_a (T *as, T *bs, int sj, int sk, int chunk) { - for (int j=0; j<chunk; j++, as+=sk, bs+=sj) op_put->map(sk,as,*bs);} -template <class T, int sk> void inner_child_b (T *as, T *bs, int sj, int chunk) { - for (int j=0; j<chunk; j++, as+=sk, bs+=sj) op_put->map(sk,as,*bs);} - -// Inner product in a Module on the (+,*) Ring -// | BBBBB -// j BBBBB -// | BBBBB -// --j--*---k--- -// AAAAA CCCCC -template <class T> void dot_add_mul (long sk, long sj, T *cs, T *as, T *bs) { - for (long k=0; k<sk; k++) { - T c = 0; for (long j=0; j<sj; j++) c+=as[j]*bs[j*sk+k]; - *cs++=c; - } -} -template <class T, long sj> void dot_add_mul (long sk, T *cs, T *as, T *bs) { - for (long k=0; k<sk; k++) { - T c = 0; for (long j=0; j<sj; j++) c+=as[j]*bs[j*sk+k]; - *cs++=c; - } -} -template <class T, long sj, long sk> void dot_add_mul (T *cs, T *as, T *bs) { - for (long k=0; k<sk; k++) { - T c = 0; for (long j=0; j<sj; j++) c+=as[j]*bs[j*sk+k]; - *cs++=c; - } -} - -GRID_INLET(GridInner,0) { - SAME_TYPE(in,r); - SAME_TYPE(in,seed); - P<Dim> a=in->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 n = a->n+b->n-2; - SAME_DIM(1,a,a->n-1,b,0); - 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_chunk(a->n-1); - long sjk=r->dim->prod(), sj=in->factor(), sk=sjk/sj; - long chunk = GridOutlet::MAX_PACKET_SIZE/sjk; - T *rdata = (T *)*r; - r2=new Grid(new Dim(chunk*sjk),r->nt); - T *buf3 = (T *)*r2; - for (long i=0; i<sj; i++) - for (long j=0; j<chunk; j++) - COPY(buf3+(j+i*chunk)*sk,rdata+i*sk,sk); - use_dot = op==op_mul && fold==op_add && seed->dim->n==0 && *(T *)*seed==0; -} GRID_FLOW { - long sjk=r->dim->prod(), sj=in->factor(), sk=sjk/sj; - long chunk = GridOutlet::MAX_PACKET_SIZE/sjk; - T buf [chunk*sk]; - T buf2[chunk*sk]; - long off = chunk; - if (use_dot) { - while (n) { - if (chunk*sj>n) chunk=n/sj; - if (sj<=4 && sk<=4) switch ((sj-1)*4+(sk-1)) { -#define DOT_ADD_MUL_3(sj,sk) for (int i=0; i<chunk; i++) dot_add_mul<T,sj,sk>( buf2+sk*i,data+sj*i,(T *)*r); - case 0: DOT_ADD_MUL_3(1,1); break; - case 1: DOT_ADD_MUL_3(1,2); break; - case 2: DOT_ADD_MUL_3(1,3); break; - case 3: DOT_ADD_MUL_3(1,4); break; - case 4: DOT_ADD_MUL_3(2,1); break; - case 5: DOT_ADD_MUL_3(2,2); break; - case 6: DOT_ADD_MUL_3(2,3); break; - case 7: DOT_ADD_MUL_3(2,4); break; - case 8: DOT_ADD_MUL_3(3,1); break; - case 9: DOT_ADD_MUL_3(3,2); break; - case 10: DOT_ADD_MUL_3(3,3); break; - case 11: DOT_ADD_MUL_3(3,4); break; - case 12: DOT_ADD_MUL_3(4,1); break; - case 13: DOT_ADD_MUL_3(4,2); break; - case 14: DOT_ADD_MUL_3(4,3); break; - case 15: DOT_ADD_MUL_3(4,4); break; - } else switch (sj) { -#define DOT_ADD_MUL_2(sj) for (int i=0; i<chunk; i++) dot_add_mul<T,sj>(sk,buf2+sk*i,data+sj*i,(T *)*r); - case 1: DOT_ADD_MUL_2(1); break; - case 2: DOT_ADD_MUL_2(2); break; - case 3: DOT_ADD_MUL_2(3); break; - case 4: DOT_ADD_MUL_2(4); break; - default:for (int i=0; i<chunk; i++) dot_add_mul(sk,sj,buf2+sk*i,data+sj*i,(T *)*r); - } - out->send(chunk*sk,buf2); - n-=chunk*sj; - data+=chunk*sj; - } - } else { - while (n) { - if (chunk*sj>n) chunk=n/sj; - op_put->map(chunk*sk,buf2,*(T *)*seed); - for (long i=0; i<sj; i++) { - switch (sk) { - case 1: inner_child_b<T,1>(buf,data+i,sj,chunk); break; - case 2: inner_child_b<T,2>(buf,data+i,sj,chunk); break; - case 3: inner_child_b<T,3>(buf,data+i,sj,chunk); break; - case 4: inner_child_b<T,4>(buf,data+i,sj,chunk); break; - default: inner_child_a(buf,data+i,sj,sk,chunk); - } - op->zip(chunk*sk,buf,(T *)*r2+i*off*sk); - fold->zip(chunk*sk,buf2,buf); - } - out->send(chunk*sk,buf2); - n-=chunk*sj; - data+=chunk*sj; - } - } -} GRID_FINISH { - r2=0; -} GRID_END - -GRID_INPUT(GridInner,1,r) {} GRID_END - -\end class {install("#inner",2,1);} - -/* **************************************************************** */ -/*{ Dim[*As]<T>,Dim[*Bs]<T> -> Dim[*As,*Bs]<T> }*/ -\class GridOuter : FObject { - \attr Numop *op; - PtrGrid r; - \constructor (Numop *op, Grid *r=0) { - this->op = op; - this->r = r ? r : new Grid(new Dim(),int32_e,true); - } - \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; - 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 { - long b_prod = r->dim->prod(); - if (b_prod > 4) { - T buf[b_prod]; - while (n) { - for (long j=0; j<b_prod; j++) buf[j] = *data; - op->zip(b_prod,buf,(T *)*r); - out->send(b_prod,buf); - data++; n--; - } - return; - } - n*=b_prod; - T *buf = NEWBUF(T,n); - T buf2[b_prod*64]; - for (int i=0; i<64; i++) COPY(buf2+i*b_prod,(T *)*r,b_prod); - switch (b_prod) { - #define Z buf[k++]=data[i] - case 1: for (long i=0,k=0; k<n; i++) {Z;} break; - case 2: for (long i=0,k=0; k<n; i++) {Z;Z;} break; - case 3: for (long i=0,k=0; k<n; i++) {Z;Z;Z;} break; - case 4: for (long i=0,k=0; k<n; i++) {Z;Z;Z;Z;} break; - default:for (long 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 - -\end class {install("#outer",2,1); add_creator("@outer");} - -//**************************************************************** -//{ 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 : FObject { - \attr PtrGrid from; - \attr PtrGrid to; - \attr PtrGrid step; - \constructor (Grid *from, Grid *to, Grid *step) { - this->from.constrain(expect_max_one_dim); - this->to .constrain(expect_max_one_dim); - this->step.constrain(expect_max_one_dim); - this->from=from; - this->to =to; - this->step=step; - } - \decl 0 set (Grid *r=0); - \decl 0 bang (); - \grin 0 int - \grin 1 int - \grin 2 int - template <class T> void trigger (T bogus); -}; - -template <class T> -void GridFor::trigger (T bogus) { - int n = from->dim->prod(); - int32 nn[n+1]; - T x[64*n]; - T *fromb = (T *)*from; - T * tob = (T *)*to ; - T *stepb = (T *)*step; - 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 0 bang () { - SAME_TYPE(from,to); - SAME_TYPE(from,step); - if (!from->dim->equal(to->dim) || !to->dim->equal(step->dim)) - RAISE("dimension mismatch: from:%s to:%s step:%s", - from->dim->to_s(),to->dim->to_s(),step->dim->to_s()); -#define FOO(T) trigger((T)0); - TYPESWITCH_JUSTINT(from->nt,FOO,); -#undef FOO -} - -\def 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 -\end class {install("#for",3,1); add_creator("@for");} - -//**************************************************************** -\class GridFinished : FObject { - \constructor () {} - \grin 0 -}; -GRID_INLET(GridFinished,0) { - in->set_mode(0); -} GRID_FINISH { - outlet_bang(bself->outlets[0]); -} GRID_END -\end class {install("#finished",1,1); add_creator("@finished");} - -\class GridDim : FObject { - \constructor () {} - \grin 0 -}; -GRID_INLET(GridDim,0) { - GridOutlet out(this,0,new Dim(in->dim->n)); - out.send(in->dim->n,in->dim->v); - in->set_mode(0); -} GRID_END -\end class {install("#dim",1,1); add_creator("@dim");} - -\class GridType : FObject { - \constructor () {} - \grin 0 -}; -GRID_INLET(GridType,0) { - outlet_symbol(bself->outlets[0],gensym(const_cast<char *>(number_type_table[in->nt].name))); - in->set_mode(0); -} GRID_END -\end class {install("#type",1,1); add_creator("@type");} - -//**************************************************************** -//{ Dim[*As]<T>,Dim[B] -> Dim[*Cs]<T> } -\class GridRedim : FObject { - \attr P<Dim> dim; - PtrGrid dim_grid; - PtrGrid temp; // temp->dim is not of the same shape as dim - ~GridRedim() {} - \constructor (Grid *d) { - dim_grid.constrain(expect_dim_dim_list); - dim_grid=d; - dim = dim_grid->to_dim(); - // if (!dim->prod()) RAISE("target grid size must not be zero"); - } - \grin 0 - \grin 1 int32 -}; - -GRID_INLET(GridRedim,0) { - long 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 { - long i = in->dex; - if (!temp) { - long n2 = min(n,dim->prod()-i); - if (n2>0) out->send(n2,data); - // discard other values if any - } else { - long n2 = min(n,in->dim->prod()-i); - COPY((T *)*temp+i,data,n2); - if (n2>0) out->send(n2,data); - } -} GRID_FINISH { - if (!!temp) { - long a = in->dim->prod(), b = dim->prod(); - if (a) { - for (long i=a; i<b; i+=a) out->send(min(a,b-i),(T *)*temp); - } else { - T foo[1]={0}; for (long i=0; i<b; i++) out->send(1,foo); - } - } - temp=0; -} GRID_END - -GRID_INPUT(GridRedim,1,dim_grid) { - P<Dim> d = dim_grid->to_dim(); -// if (!d->prod()) RAISE("target grid size must not be zero"); else post("d->prod=%d",d->prod()); - dim = d; -} GRID_END - -\end class {install("#redim",2,1); add_creator("@redim");} - -//**************************************************************** -\class GridJoin : FObject { - \attr int which_dim; - PtrGrid r; - \grin 0 - \grin 1 - \constructor (int which_dim=-1, Grid *r=0) { - this->which_dim = which_dim; - this->r=r; - } -}; - -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); - 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); - in->set_chunk(w); -} GRID_FLOW { - int w = which_dim; - if (w<0) w+=in->dim->n; - long a = in->factor(); - long b = r->dim->prod(w); - T *data2 = (T *)*r + in->dex*b/a; - if (a==3 && b==1) { - int m = n+n*b/a; - T data3[m]; - 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; - 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(),(T *)*r); -} GRID_END - -GRID_INPUT(GridJoin,1,r) {} GRID_END - -\end class {install("@join",2,1);} - -//**************************************************************** -\class GridGrade : FObject { - \constructor () {} - \grin 0 -}; - -typedef int (*comparator_t)(const void *, const void *); - -template <class T> struct GradeFunction { - static int comparator (T **a, T **b) {return **a-**b;}}; -#define FOO(T) \ -template <> struct GradeFunction<T> { \ - static int comparator (T **a, T **b) {T x = **a-**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->set_chunk(in->dim->n-1); -} GRID_FLOW { - long m = in->factor(); - T *foo[m]; - 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),(comparator_t)GradeFunction<T>::comparator); - for (int i=0; i<m; i++) bar[i] = foo[i]-(T *)data; - out->send(m,bar); - } -} GRID_END - -\end class {install("#grade",1,1); add_creator("@grade");} - -//**************************************************************** -//\class GridMedian : FObject -//**************************************************************** - -\class GridTranspose : FObject { - \attr int dim1; - \attr int dim2; - int d1,d2,na,nb,nc,nd; // temporaries - \constructor (int dim1=0, int dim2=1) { - this->dim1 = dim1; - this->dim2 = dim2; - } - \decl 1 float (int dim1); - \decl 2 float (int dim2); - \grin 0 -}; - -\def 1 float (int dim1) { this->dim1=dim1; } -\def 2 float (int dim2) { this->dim2=dim2; } - -GRID_INLET(GridTranspose,0) { - 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_chunk(min(d1,d2)); - } - // Turns a Grid[*,na,*nb,nc,*nd] into a Grid[*,nc,*nb,na,*nd]. -} GRID_FLOW { - //T res[na*nb*nc*nd]; - T *res = NEWBUF(T,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 (long a=0; a<na; a++) - for (long b=0; b<nb; b++) - for (long 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); - } - DELBUF(res); //!@#$ if an exception was thrown by out->send, this never gets done -} GRID_END - -\end class {install("#transpose",3,1); add_creator("@transpose");} - -//**************************************************************** -\class GridReverse : FObject { - \attr int dim1; // dimension to act upon - int d; // temporaries - \constructor (int dim1=0) {this->dim1 = dim1;} - \decl 1 float (int dim1); - \grin 0 -}; - -\def 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_chunk(d); -} GRID_FLOW { - long f1=in->factor(), f2=in->dim->prod(d+1); - while (n) { - long hf1=f1/2; - T *data2 = data+f1-f2; - for (long i=0; i<hf1; i+=f2) memswap(data+i,data2-i,f2); - out->send(f1,data); - data+=f1; n-=f1; - } -} GRID_END - -\end class {install("#reverse",2,1);} - -//**************************************************************** -\class GridCentroid : FObject { - \constructor () {} - \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_chunk(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 { - int32 blah[2]; - blah[0] = sum ? sumy/sum : 0; - blah[1] = sum ? sumx/sum : 0; - out->send(2,blah); - outlet_float(bself->outlets[1],blah[0]); - outlet_float(bself->outlets[2],blah[1]); -} GRID_END - -\end class {install("#centroid",1,3);} - -//**************************************************************** -static void expect_pair (P<Dim> dim) {if (dim->prod()!=2) RAISE("expecting only two numbers. Dim(2)");} - -\class GridMoment : FObject { - \constructor (int order=1) { - offset.constrain(expect_pair); - //t_atom2 a[2] = {t_atom2(0),t_atom2(0)}; - t_atom a[2]; SETFLOAT(a,0); SETFLOAT(a+1,0); - offset=new Grid(2,a,int32_e); - if (order!=1 && order!=2) RAISE("supports only orders 1 and 2 for now"); - this->order=order; - } - \grin 0 int - \grin 1 int - \attr int order; // order - \attr PtrGrid offset; - int64 sumy,sumxy,sumx,sum,y; // temporaries -}; - -GRID_INLET(GridMoment,0) { - if (in->dim->n != 3) RAISE("expecting 3 dims"); - if (in->dim->v[2] != 1) RAISE("expecting 1 channel"); - in->set_chunk(1); - switch (order) { - case 1: out=new GridOutlet(this,0,new Dim(2 ), in->nt); break; - case 2: out=new GridOutlet(this,0,new Dim(2,2), in->nt); break; - default: RAISE("supports only orders 1 and 2 for now"); - } - sumx=0; sumy=0; sumxy=0; sum=0; y=0; -} GRID_FLOW { - int sx = in->dim->v[1]; - int oy = ((int*)*offset)[0]; - int ox = ((int*)*offset)[1]; - while (n) { - switch (order) { - case 1: - for (int x=0; x<sx; x++) { - sumy+=y*data[x]; - sumx+=x*data[x]; - sum += data[x]; - } - break; - case 2: - for (int x=0; x<sx; x++) { - int ty=y-oy; - int tx=x-ox; - sumy +=ty*ty*data[x]; - sumxy+=tx*ty*data[x]; - sumx +=tx*tx*data[x]; - sum += data[x]; - } - } - n-=sx; - data+=sx; - y++; - } -} GRID_FINISH { - int32 blah[4]; - switch (order) { - case 1: /* centroid vector */ - blah[0] = sum ? sumy/sum : 0; - blah[1] = sum ? sumx/sum : 0; - out->send(2,blah); - break; - case 2: /* covariance matrix */ - blah[0] = sum ? sumy/sum : 0; - blah[1] = sum ? sumxy/sum : 0; - blah[2] = sum ? sumxy/sum : 0; - blah[3] = sum ? sumx/sum : 0; - out->send(4,blah); - break; - } -} GRID_END - -GRID_INPUT(GridMoment,1,offset) {} GRID_END - -\end class {install("#moment",2,1);} - -//**************************************************************** -\class GridLabeling : FObject { - \grin 0 - \attr int form(); - \attr int form_val; - \constructor (int form=0) {form_val=form; initialize3();} - void initialize3(); -}; - -struct Stats { - int64 yy,yx,xx,y,x,area; - int64 x1,x2; - Stats() {yy=yx=xx=y=x=area=0;} -}; - -#define AT(y,x) dat[(y)*sx+(x)] -template <class T> void flood_fill(T *dat, int sy, int sx, int y, int x, Stats *stat, int label, int form) { - /* find x1,x2 such that all the x of that horizontal segment are x1<=x<x2 */ - int x2; for (x2=x; x2<sx; x2++) if (AT(y,x2)!=1) break; - int x1; for (x1=x; x1>=0; x1--) if (AT(y,x1)!=1) break; - x1++; - if (form==0) { - for (x=x1; x<x2; x++) { - AT(y,x)=label; - stat->yy += y*y; stat->y += y; - stat->yx += y*x; stat->area++; - stat->xx += x*x; stat->x += x; - } - for (x=x1; x<x2; x++) { - if (y>0 && AT(y-1,x)==1) flood_fill(dat,sy,sx,y-1,x,stat,label,form); - if (y<sy-1 && AT(y+1,x)==1) flood_fill(dat,sy,sx,y+1,x,stat,label,form); - } - } else { - for (x=x1; x<x2; x++) { - AT(y,x)=label; - } - stat->y=y; - stat->x1=x1; - stat->x2=x2; - } -} - -GRID_INLET(GridLabeling,0) { - if (in->dim->n<2 || in->dim->prod(2)!=1) RAISE("requires dim (y,x) or (y,x,1)"); - in->set_chunk(0); -} GRID_FLOW { - int sy=in->dim->v[0], sx=in->dim->v[1]; - T *dat = NEWBUF(T,n); - for (int i=0; i<n; i++) dat[i]=data[i]; - int y,x=0,label=2; - for (y=0; y<sy; y++) for (x=0; x<sx; x++) { - if (dat[y*sx+x]!=1) continue; - Stats s; - flood_fill(dat,sy,sx,y,x,&s,label,form_val); - if (form_val==0) { - float32 cooked[6] = { - (s.yy-s.y*s.y/s.area)/s.area, - (s.yx-s.y*s.x/s.area)/s.area, - (s.yx-s.y*s.x/s.area)/s.area, - (s.xx-s.x*s.x/s.area)/s.area, - s.y/s.area, - s.x/s.area}; - float a[] = {s.area}; - send_out(3,1,a); - GridOutlet o2(this,2,new Dim(2)); o2.send(2,cooked+4); - GridOutlet o1(this,1,new Dim(2,2)); o1.send(4,cooked); - } else { - float32 cooked[4] = {s.y,s.x1,s.y,s.x2}; - GridOutlet o1(this,1,new Dim(2,2)); o1.send(4,cooked); - } - label++; - } - out = new GridOutlet(this,0,new Dim(sy,sx,1),in->nt); - out->send(n,dat); - DELBUF(dat); -} GRID_END - -\def int form() {return form_val;} -\def 0 form(int form) { - if (form<0 || form>1) RAISE("form must be 0 or 1, not %d",form); - form_val=form; - initialize3(); -} -void GridLabeling::initialize3() { - bself->noutlets_set(form_val ? 2 : 4); -} - -\end class {install("#labeling",1,0);} - -//**************************************************************** -\class GridPerspective : FObject { - \attr int32 z; - \grin 0 - \constructor (int32 z=256) {this->z=z;} -}; -GRID_INLET(GridPerspective,0) { - int n = in->dim->n; - int32 v[n]; - COPY(v,in->dim->v,n); - v[n-1]--; - in->set_chunk(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 -\end class {install("#perspective",1,1); add_creator("@perspective");} - -//**************************************************************** -\class GridBorder : FObject { - \attr P<Dim> diml; - \attr P<Dim> dimr; - PtrGrid diml_grid; - PtrGrid dimr_grid; - \grin 0 - \grin 1 int - \grin 2 int - \constructor (Grid *dl=0, Grid *dr=0) { - t_atom a[2]; SETFLOAT(a+0,1); SETFLOAT(a+1,1); SETFLOAT(a+2,0); - diml_grid=dl?dl:new Grid(3,a,int32_e); - dimr_grid=dr?dr:new Grid(3,a,int32_e); - diml = diml_grid->to_dim(); - dimr = dimr_grid->to_dim(); - } -}; - -GRID_INLET(GridBorder,0) { - int n = in->dim->n; - if (n!=3) RAISE("only 3 dims supported for now"); - if (diml->n != n) RAISE("diml mismatch"); - if (dimr->n != n) RAISE("dimr mismatch"); - if (diml->v[2] || dimr->v[2]) RAISE("can't augment channels (todo)"); - int32 v[n]; - for (int i=0; i<n; i++) v[i]=in->dim->v[i]+diml->v[i]+dimr->v[i]; - in->set_chunk(0); - out=new GridOutlet(this,0,new Dim(n,v),in->nt); -} GRID_FLOW { - int sy = in->dim->v[0]; - int sx = in->dim->v[1]; int zx = sx+diml->v[1]+dimr->v[1]; - int sc = in->dim->v[2]; int zc = sc+diml->v[2]+dimr->v[2]; - int sxc = sx*sc; int zxc = zx*zc; - int32 duh[zxc]; - for (int x=0; x<zxc; x++) duh[x]=0; - for (int y=0; y<diml->v[0]; y++) out->send(zxc,duh); - for (int y=0; y<sy; y++) { - out->send(diml->v[1]*sc,duh); - out->send(sxc,data+y*sxc); - out->send(dimr->v[1]*sc,duh); - } - for (int i=0; i<dimr->v[0]; i++) out->send(zxc,duh); -} GRID_END - -GRID_INPUT(GridBorder,1,diml_grid) {diml = diml_grid->to_dim();} GRID_END -GRID_INPUT(GridBorder,2,dimr_grid) {dimr = dimr_grid->to_dim();} GRID_END - -\end class {install("#border",3,1);} - -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");} - -//**************************************************************** -//{ 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 { long y,x; bool neutral; }; - -\class GridConvolve : FObject { - \attr Numop *op; - \attr Numop *fold; - \attr PtrGrid seed; - \attr PtrGrid b; - \attr bool wrap; - \attr bool anti; - PtrGrid a; - int plann; - PlanEntry *plan; - int margx,margy; // margins - \constructor (Grid *r=0) { - plan=0; - b.constrain(expect_convolution_matrix); plan=0; - this->op = op_mul; - this->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); - this->wrap = true; - this->anti = true; - } - \grin 0 - \grin 1 - template <class T> void copy_row (T *buf, long sx, long y, long x); - template <class T> void make_plan (T bogus); - ~GridConvolve () {if (plan) delete[] plan;} -}; - -template <class T> void GridConvolve::copy_row (T *buf, long sx, long y, long x) { - long day = a->dim->get(0), dax = a->dim->get(1), dac = a->dim->prod(2); - y=mod(y,day); x=mod(x,dax); - T *ap = (T *)*a + y*dax*dac; - while (sx) { - long sx1 = min(sx,dax-x); - COPY(buf,ap+x*dac,sx1*dac); - x=0; - buf += sx1*dac; - sx -= sx1; - } -} - -template <class T> void GridConvolve::make_plan (T bogus) { - P<Dim> da = a->dim, db = b->dim; - long dby = db->get(0); - long dbx = db->get(1); - if (plan) delete[] plan; - plan = new PlanEntry[dbx*dby]; - long i=0; - for (long y=0; y<dby; y++) { - for (long x=0; x<dbx; x++) { - long k = anti ? y*dbx+x : (dby-1-y)*dbx+(dbx-1-x); - T rh = ((T *)*b)[k]; - bool neutral = op->on(rh)->is_neutral( rh,at_right); - bool absorbent = op->on(rh)->is_absorbent(rh,at_right); - T foo[1]={0}; - if (absorbent) { - op->map(1,foo,rh); - absorbent = 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; - //if (a) post("for %p, a->dim=%s da=%s",this,a->dim->to_s(),da->to_s()); - if (!a || !a->dim->equal(da)) a=new Grid(da,in->nt); // with this condition it's 2% faster on Linux but takes more RAM. - //a=new Grid(da,in->nt); // with this condition it's 2% faster but takes more RAM. - int v[da->n]; COPY(v,da->v,da->n); - if (!wrap) {v[0]-=db->v[0]-1; v[1]-=db->v[1]-1;} - out=new GridOutlet(this,0,new Dim(da->n,v),in->nt); -} GRID_FLOW { - COPY((T *)*a+in->dex, data, n); -} GRID_FINISH { - make_plan((T)0); - long dbx = b->dim->get(1); - long dby = b->dim->get(0); - long day = out->dim->get(0); - long n = out->dim->prod(1); - long sx = out->dim->get(1)+dbx-1; - long sxc = out->dim->prod(2)*sx; - T buf[n]; - T buf2[sxc]; - T orh=0; - for (long ay=0; ay<day; ay++) { - op_put->map(n,buf,*(T *)*seed); - for (long i=0; i<plann; i++) { - long by = plan[i].y; - long bx = plan[i].x; - long k = anti ? by*dbx+bx : (dby-1-by)*dbx+(dbx-1-bx); - T rh = ((T *)*b)[k]; - if (i==0 || by!=plan[i-1].y || orh!=rh) { - if (wrap) copy_row(buf2,sx,ay+by-margy,-margx); - else copy_row(buf2,sx,ay+by,0); - if (!plan[i].neutral) op->map(sxc,buf2,rh); - } - fold->zip(n,buf,buf2+bx*out->dim->prod(2)); - orh=rh; - } - out->send(n,buf); - } - //a=0; // comment this out when trying to recycle a (use the dim->equal above) -} GRID_END - -GRID_INPUT(GridConvolve,1,b) {} GRID_END - -\end class {install("#convolve",2,1);} - -/* ---------------------------------------------------------------- */ -/* "#scale_by" does quick scaling of pictures by integer factors */ -/*{ Dim[A,B,3]<T> -> Dim[C,D,3]<T> }*/ - -static void expect_scale_factor (P<Dim> dim) { - if (dim->prod()!=1 && dim->prod()!=2) - RAISE("expecting only one or two numbers"); -} - -\class GridScaleBy : FObject { - \attr PtrGrid scale; // integer scale factor - int scaley; - int scalex; - \constructor (Grid *factor=0) { - scale.constrain(expect_scale_factor); - t_atom a[1]; SETFLOAT(a,2); - scale = factor?factor:new Grid(1,a,int32_e); - prepare_scale_factor(); - } - \grin 0 - \grin 1 - void prepare_scale_factor () { - scaley = ((int32 *)*scale)[0]; - scalex = ((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_chunk(1); -} GRID_FLOW { - int rowsize = in->dim->prod(1); - 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 - -GRID_INPUT(GridScaleBy,1,scale) { prepare_scale_factor(); } GRID_END - -\end class {install("#scale_by",2,1); add_creator("@scale_by");} - -// ---------------------------------------------------------------- -//{ Dim[A,B,3]<T> -> Dim[C,D,3]<T> } -\class GridDownscaleBy : FObject { - \attr PtrGrid scale; - \attr bool smoothly; - int scaley; - int scalex; - PtrGrid temp; - \constructor (Grid *factor=0, t_symbol *option=0) { - scale.constrain(expect_scale_factor); - t_atom a[1]; SETFLOAT(a,2); - scale = factor?factor:new Grid(1,a,int32_e); - prepare_scale_factor(); - smoothly = option==gensym("smoothly"); - } - \grin 0 - \grin 1 - void prepare_scale_factor () { - scaley = ((int32 *)*scale)[0]; - scalex = ((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_chunk(1); - // 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); - T *buf = (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 - -\end class {install("#downscale_by",2,1); add_creator("@downscale_by");} - -//**************************************************************** -\class GridLayer : FObject { - PtrGrid r; - \constructor () {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_chunk(2); - out=new GridOutlet(this,0,r->dim); -} GRID_FLOW { - T *rr = ((T *)*r) + in->dex*3/4; - 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 - -\end class {install("#layer",2,1); add_creator("@layer");} - -// **************************************************************** -// pad1,pad2 only are there for 32-byte alignment -struct Line {int32 y1,x1,y2,x2,x,m,ox,pad2;}; - -static void expect_polygon (P<Dim> d) { - if (d->n!=2 || d->get(1)!=2) RAISE("expecting Dim[n,2] polygon"); -} - -enum DrawMode {DRAW_FILL,DRAW_LINE,DRAW_POINT}; -enum OmitMode {OMIT_NONE,OMIT_LAST,OMIT_ODD}; -DrawMode convert(const t_atom &x, DrawMode *foo) { - t_symbol *s = convert(x,(t_symbol **)0); - if (s==gensym("fill")) return DRAW_FILL; - if (s==gensym("line")) return DRAW_LINE; - if (s==gensym("point")) return DRAW_POINT; - RAISE("unknown DrawMode '%s' (want fill or line)",s->s_name); -} -OmitMode convert(const t_atom &x, OmitMode *foo) { - t_symbol *s = convert(x,(t_symbol **)0); - if (s==gensym("none")) return OMIT_NONE; - if (s==gensym("last")) return OMIT_LAST; - if (s==gensym("odd")) return OMIT_ODD; - RAISE("unknown OmitMode '%s' (want none or last or odd)",s->s_name); -} -\class DrawPolygon : FObject { - \attr Numop *op; - \attr PtrGrid color; - \attr PtrGrid polygon; - \attr DrawMode draw; - \attr OmitMode omit; - PtrGrid color2; - PtrGrid lines; - int lines_start; - int lines_stop; - \constructor (Numop *op=op_put, Grid *color=0, Grid *polygon=0) { - draw=DRAW_FILL; - omit=OMIT_NONE; - this->color.constrain(expect_max_one_dim); - this->polygon.constrain(expect_polygon); - this->op = op; - if (color) this->color=color; - if (polygon) {this->polygon=polygon; init_lines();} - } - \grin 0 - \grin 1 - \grin 2 int32 - void init_lines(); - void changed(t_symbol *s) {init_lines();} -}; -void DrawPolygon::init_lines () { - if (!polygon) return; - int tnl = polygon->dim->get(0); - int nl = omit==OMIT_LAST ? tnl-1 : omit==OMIT_ODD ? (tnl+1)/2 : tnl; - lines=new Grid(new Dim(nl,8), int32_e); - Line *ld = (Line *)(int32 *)*lines; - 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*tnl); - ld[i].y2 = pd[j+0]; - ld[i].x2 = pd[j+1]; - if (omit==OMIT_ODD) j=(j+2)%(2*tnl); - if (draw!=DRAW_POINT) if (ld[i].y1>ld[i].y2) memswap((int32 *)(ld+i)+0,(int32 *)(ld+i)+2,2); - long dy = ld[i].y2-ld[i].y1; - long dx = ld[i].x2-ld[i].x1; - ld[i].m = dy ? (dx<<16)/dy : 0; - } -} - -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_chunk(1); - int nl = lines->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((T *)*color2+cn*i,(T *)*color,cn); -} GRID_FLOW { - int nl = lines->dim->get(0); - Line *ld = (Line *)(int32 *)*lines; - int f = in->factor(); - int y = in->dex/f; - int cn = color->dim->prod(); - T *cd = (T *)*color2; - while (n) { - while (lines_stop != nl && ld[lines_stop].y1<=y) { - Line &l = ld[lines_stop]; - l.x = l.x1 + (((y-l.y1)*l.m)>>16); - lines_stop++; - } - if (draw!=DRAW_POINT) { - int fudge = draw==DRAW_FILL?0:1; - for (int i=lines_start; i<lines_stop; i++) { - if (ld[i].y2<=y-fudge) {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); - T *data2 = NEWBUF(T,f); - COPY(data2,data,f); - for (int i=lines_start; i<lines_stop; i++) { - Line &l = ld[i]; - l.ox = l.x; - l.x = l.x1 + (((y-l.y1)*l.m)>>16); - } - if (draw!=DRAW_POINT) qsort(ld+lines_start,lines_stop-lines_start,sizeof(Line),order_by_column); - if (draw==DRAW_FILL) { - for (int i=lines_start; i<lines_stop-1; i+=2) { - int xs = max(ld[i].x,(int32)0); - int 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); - } - } else if (draw==DRAW_LINE) { - for (int i=lines_start; i<lines_stop; i++) { - if (ld[i].y1==ld[i].y2) ld[i].ox=ld[i].x2; - int xs = min(ld[i].x,ld[i].ox); - int xe = max(ld[i].x,ld[i].ox); - if (xs==xe) xe++; - if ((xs<0 && xe<0) || (xs>=xl && xe>=xl)) continue; - xs = max(0,xs); - xe = min(xl,xe); - while (xe-xs>=16) {op->zip(16*cn,data2+cn*xs,cd); xs+=16;} - op->zip((xe-xs)*cn,data2+cn*xs,cd); - } - } else { - for (int i=lines_start; i<lines_stop; i++) { - if (y!=ld[i].y1) continue; - int xs=ld[i].x1; - int xe=xs+1; - if (xs<0 || xs>=xl) continue; - op->zip((xe-xs)*cn,data2+cn*xs,cd); - } - lines_start=lines_stop; - } - 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 - -\end class {install("#draw_polygon",3,1); add_creator("@draw_polygon");} - -//**************************************************************** -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 : FObject { - \attr Numop *op; - \attr PtrGrid image; - \attr PtrGrid position; - \attr bool alpha; - \attr bool tile; - \constructor (Numop *op=op_put, Grid *image=0, Grid *position=0) { - alpha=false; tile=false; - this->op = op; - this->position.constrain(expect_position); - this->image.constrain(expect_picture); - if (image) this->image=image; - if (position) this->position=position; - else this->position=new Grid(new Dim(2),int32_e,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(T *obuf, 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(T *obuf, 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); - T *rbuf = (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"); - if (image->dim->n!=3) RAISE("expecting 3 dimensions in right_hand"); - 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_chunk(1); -} 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]; - 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) { - T *data2 = NEWBUF(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 - -\end class {install("#draw_image",3,1); add_creator("@draw_image");} - -//**************************************************************** -// Dim[*A],Dim[*B],Dim[C,size(A)-size(B)] -> Dim[*A] - -/* NOT FINISHED */ -\class GridDrawPoints : FObject { - \attr Numop *op; - \attr PtrGrid color; - \attr PtrGrid points; - \grin 0 - \grin 1 int32 - \grin 2 int32 - \constructor (Numop *op=op_put, Grid *color=0, Grid *points=0) { - this->op = op; - if (color) this->color=color; - if (points) this->points=points; - } -}; - -GRID_INPUT(GridDrawPoints,1,color) {} GRID_END -GRID_INPUT(GridDrawPoints,2,points) {} GRID_END - -GRID_INLET(GridDrawPoints,0) { - NOTEMPTY(color); - NOTEMPTY(points); - SAME_TYPE(in,color); - out=new GridOutlet(this,0,in->dim,in->nt); - if (points->dim->n!=2) RAISE("points should be a 2-D grid"); - if (points->dim->v[1] != in->dim->n - color->dim->n) - RAISE("wrong number of dimensions"); - in->set_chunk(0); -} GRID_FLOW { - long m = points->dim->v[1]; - long cn = in->dim->prod(-color->dim->n); /* size of color (RGB=3, greyscale=1, ...) */ - int32 *pdata = (int32 *)points->data; - T *cdata = (T *)color->data; - for (long i=0; i<n; i++) { - long off = 0; - for (long k=0; k>m; k++) off = off*in->dim->v[k] + pdata[i*points->dim->v[1]+k]; - off *= cn; - for (long j=0; j<cn; j++) data[off+j] = cdata[j]; - } -// out->send(data); -} GRID_END -\end class {install("#draw_points",3,1);} - -//**************************************************************** -\class GridPolygonize : FObject { - \constructor () {} - \grin 0 -}; - -GRID_INLET(GridPolygonize,0) { - if (in->dim->n<2 || in->dim->prod(2)!=1) RAISE("requires dim (y,x) or (y,x,1)"); - in->set_chunk(0); -} GRID_FLOW { - /* WRITE ME */ -} GRID_END - -\end class {install("#polygonize",1,1);} - -//**************************************************************** -\class GridNoiseGateYuvs : FObject { - \grin 0 - int thresh; - \decl 1 float(int v); - \constructor (int v=0) {thresh=v;} -}; - -GRID_INLET(GridNoiseGateYuvs,0) { - if (in->dim->n!=3) RAISE("requires 3 dimensions: dim(y,x,3)"); - if (in->dim->v[2]!=3) RAISE("requires 3 channels"); - out=new GridOutlet(this,0,in->dim,in->nt); - in->set_chunk(2); -} GRID_FLOW { - T tada[n]; - for (long i=0; i<n; i+=3) { - if (data[i+0]<=thresh) { - tada[i+0]=0; tada[i+1]=0; tada[i+2]=0; - } else { - tada[i+0]=data[i+0]; tada[i+1]=data[i+1]; tada[i+2]=data[i+2]; - } - } - out->send(n,tada); -} GRID_END - -\def 1 float(int v) {thresh=v;} -\end class {install("#noise_gate_yuvs",2,1);} - -//**************************************************************** - -\class GridPack : FObject { - int n; - PtrGrid a; - \constructor (int n=2, NumberTypeE nt=int32_e) { - if (n<1) RAISE("n=%d must be at least 1",n); - if (n>32) RAISE("n=%d is too many?",n); - a = new Grid(new Dim(n),nt,true); - this->n=n; - bself->ninlets_set(this->n); - } - \decl void _n_float (int inlet, float f); - \decl void _n_list (int inlet, float f); - \decl 0 bang (); - //\grin 0 -}; -\def void _n_float (int inlet, float f) { -#define FOO(T) ((T *)*a)[inlet] = (T)f; -TYPESWITCH(a->nt,FOO,); -#undef FOO - _0_bang(argc,argv); -} -\def void _n_list (int inlet, float f) {_n_float(argc,argv,inlet,f);} -\def 0 bang () { - out=new GridOutlet(this,0,a->dim,a->nt); -#define FOO(T) out->send(n,(T *)*a); -TYPESWITCH(a->nt,FOO,); -#undef FOO -} -\end class {install("#pack",1,1); add_creator("@pack");} - -\class GridUnpack : FObject { - int n; - \constructor (int n=2) { - if (n<1) RAISE("n=%d must be at least 1",n); - if (n>32) RAISE("n=%d is too many?",n); - this->n=n; - bself->noutlets_set(this->n); - } - \grin 0 -}; -GRID_INLET(GridUnpack,0) { - in->set_chunk(0); -} GRID_FLOW { - for (int i=n-1; i>=0; i--) outlet_float(bself->outlets[i],(t_float)data[i]); -} GRID_END -\end class {install("#unpack",1,0);} - -//**************************************************************** -\class ForEach : FObject { - \constructor () {} - \decl 0 list (...); -}; -\def 0 list (...) { - t_outlet *o = bself->outlets[0]; - for (int i=0; i<argc; i++) { - if (argv[i].a_type==A_FLOAT) outlet_float( o,argv[i]); - else if (argv[i].a_type==A_SYMBOL) outlet_symbol(o,argv[i]); - else RAISE("oops. unsupported."); - } -} -\end class {install("foreach",1,1);} - -//**************************************************************** - -\class GFError : FObject { - string format; - \constructor (...) { - std::ostringstream o; - char buf[MAXPDSTRING]; - for (int i=0; i<argc; i++) { - atom_string(&argv[i],buf,MAXPDSTRING); - o << buf; - if (i!=argc-1) o << ' '; - } - format = o.str(); - } - \decl 0 bang (); - \decl 0 float (float f); - \decl 0 symbol (t_symbol *s); - \decl 0 list (...); -}; -\def 0 bang () {_0_list(0,0);} -\def 0 float (float f) {_0_list(argc,argv);} -\def 0 symbol (t_symbol *s) {_0_list(argc,argv);} - -\def 0 list (...) { - std::ostringstream o; - pd_oprintf(o,format.data(),argc,argv); - t_canvas *canvas = canvas_getrootfor(bself->mom); - string s = o.str(); - pd_error(canvas,"%s",s.data()); -} -\end class {install("gf.error",1,0);} - -//**************************************************************** - -\class GridRotatificator : FObject { - int angle; - int from, to, n; - \decl 0 float (int scale); - \decl 0 axis (int from, int to, int n); - \constructor (int from=0, int to=1, int n=2) { - angle=0; - _0_axis(0,0,from,to,n); - } - \decl 1 float(int angle); -}; -\def 0 float (int scale) { - int32 rotator[n*n]; - for (int i=0; i<n; i++) for (int j=0; j<n; j++) rotator[i*n+j] = scale * (i==j); - float th = angle * M_PI / 18000; - for (int i=0; i<2; i++) for (int j=0; j<2; j++) - rotator[(i?to:from)*n+(j?to:from)] = (int32)round(scale*cos(th+(j-i)*M_PI/2)); - GridOutlet out(this,0,new Dim(n,n),int32_e); - out.send(n*n,rotator); -} -\def 0 axis(int from, int to, int n) { - if (n<0) RAISE("n-axis number incorrect"); - if (from<0 || from>=n) RAISE("from-axis number incorrect"); - if (to <0 || to >=n) RAISE( "to-axis number incorrect"); - this->from = from; - this-> to = to; - this-> n = n; -} -\def 1 float(int angle) {this->angle = angle;} -\end class {install("#rotatificator",2,1);} - -//**************************************************************** - -template <class T> void swap (T &a, T &b) {T c; c=a; a=b; b=c;} - -\class ListReverse : FObject { - \constructor () {} - \decl 0 list(...); -}; -\def 0 list (...) { - for (int i=(argc-1)/2; i>=0; i--) swap(argv[i],argv[argc-i-1]); - outlet_list(bself->te_outlet,&s_list,argc,argv); -} -\end class {install("listreverse",1,1);} - -\class ListFlatten : FObject { - std::vector<t_atom2> contents; - \constructor () {} - \decl 0 list(...); - void traverse (int argc, t_atom2 *argv) { - for (int i=0; i<argc; i++) { - if (argv[i].a_type==A_LIST) traverse(binbuf_getnatom(argv[i]),(t_atom2 *)binbuf_getvec(argv[i])); - else contents.push_back(argv[i]); - } - } -}; -\def 0 list (...) { - traverse(argc,argv); - outlet_list(bself->te_outlet,&s_list,contents.size(),&contents[0]); - contents.clear(); - -} -\end class {install("listflatten",1,1);} - -// does not do recursive comparison of lists. -static bool atom_eq (t_atom &a, t_atom &b) { - if (a.a_type!=b.a_type) return false; - if (a.a_type==A_FLOAT) return a.a_float ==b.a_float; - if (a.a_type==A_SYMBOL) return a.a_symbol ==b.a_symbol; - if (a.a_type==A_POINTER) return a.a_gpointer==b.a_gpointer; - if (a.a_type==A_LIST) return a.a_gpointer==b.a_gpointer; - RAISE("don't know how to compare elements of type %d",a.a_type); -} - -\class ListFind : FObject { - int ac; - t_atom *at; - ~ListFind() {if (at) delete[] at;} - \constructor (...) {ac=0; at=0; _1_list(argc,argv);} - \decl 0 list(...); - \decl 1 list(...); - \decl 0 float(float f); - \decl 0 symbol(t_symbol *s); -}; -\def 1 list (...) { - if (at) delete[] at; - ac = argc; - at = new t_atom[argc]; - for (int i=0; i<argc; i++) at[i] = argv[i]; -} -\def 0 list (...) { - if (argc<1) RAISE("empty input"); - int i=0; for (; i<ac; i++) if (atom_eq(at[i],argv[0])) break; - outlet_float(bself->outlets[0],i==ac?-1:i); -} -\def 0 float (float f) { - int i=0; for (; i<ac; i++) if (atom_eq(at[i],argv[0])) break; - outlet_float(bself->outlets[0],i==ac?-1:i); -} -\def 0 symbol (t_symbol *s) { - int i=0; for (; i<ac; i++) if (atom_eq(at[i],argv[0])) break; - outlet_float(bself->outlets[0],i==ac?-1:i); -} -//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" -\end class {install("listfind",2,1);} - -void outlet_atom (t_outlet *self, t_atom *av) { - if (av->a_type==A_FLOAT) outlet_float( self,av->a_float); else - if (av->a_type==A_SYMBOL) outlet_symbol( self,av->a_symbol); else - if (av->a_type==A_POINTER) outlet_pointer(self,av->a_gpointer); else - outlet_list(self,gensym("list"),1,av); -} - -\class ListRead : FObject { /* sounds like tabread */ - int ac; - t_atom *at; - ~ListRead() {if (at) delete[] at;} - \constructor (...) {ac=0; at=0; _1_list(argc,argv);} - \decl 0 float(float f); - \decl 1 list(...); -}; -\def 0 float(float f) { - int i = int(f); - if (i<0) i+=ac; - if (i<0 || i>=ac) {outlet_bang(bself->outlets[0]); return;} /* out-of-range */ - outlet_atom(bself->outlets[0],&at[i]); -} -\def 1 list (...) { - if (at) delete[] at; - ac = argc; - at = new t_atom[argc]; - for (int i=0; i<argc; i++) at[i] = argv[i]; -} -\end class {install("listread",2,1);} - -\class Range : FObject { - t_float *mosusses; - int nmosusses; - \constructor (...) { - nmosusses = argc; - for (int i=0; i<argc; i++) if (argv[i].a_type!=A_FLOAT) RAISE("$%d: expected float",i+1); - mosusses = new t_float[argc]; - for (int i=0; i<argc; i++) mosusses[i]=argv[i].a_float; - bself-> ninlets_set(1+nmosusses); - bself->noutlets_set(1+nmosusses); - } - ~Range () {delete[] mosusses;} - \decl 0 float(float f); - \decl 0 list(float f); - \decl void _n_float(int i, float f); -}; -\def 0 list(float f) {_0_float(argc,argv,f);} -\def 0 float(float f) { - int i; - for (i=0; i<nmosusses; i++) if (f<mosusses[i]) break; - outlet_float(bself->outlets[i],f); -} -\def void _n_float(int i, float f) { - if (!i) _0_float(argc,argv,f); // precedence problem in rubyext... - else mosusses[i-1] = f; -} -\end class {install("range",1,1);} - -//**************************************************************** - -static void display_update(void *x); - -string ssprintf(const char *fmt, ...) { - std::ostringstream os; - va_list va; - va_start(va,fmt); - voprintf(os,fmt,va); - va_end(va); - return os.str(); -} - -#ifndef HAVE_DESIREDATA -\class Display : FObject { - bool selected; - t_glist *canvas; - t_symbol *rsym; - int y,x,sy,sx; - bool vis; - std::ostringstream text; - t_clock *clock; - t_pd *gp; - \constructor () { - selected=false; canvas=0; y=0; x=0; sy=16; sx=80; vis=false; clock=0; - std::ostringstream os; - rsym = gensym(const_cast<char *>(ssprintf("display:%08x",this).data())); - pd_typedmess(&pd_objectmaker,gensym("#print"),0,0); - gp = pd_newest(); - t_atom a[1]; - SETFLOAT(a,20); - pd_typedmess(gp,gensym("maxrows"),1,a); - text << "..."; - pd_bind((t_pd *)bself,rsym); - SETPOINTER(a,(t_gpointer *)bself); - pd_typedmess(gp,gensym("dest"),1,a); - clock = clock_new((void *)this,(void(*)())display_update); - } - ~Display () { - pd_unbind((t_pd *)bself,rsym); - pd_free(gp); - if (clock) clock_free(clock); - } - \decl void anything (...); - \decl 0 set_size(int sy, int sx); - \decl 0 grid(...); - \decl 0 very_long_name_that_nobody_uses(...); - void show() { - std::ostringstream quoted; - // def quote(text) "\"" + text.gsub(/["\[\]\n\$]/m) {|x| if x=="\n" then "\\n" else "\\"+x end } + "\"" end - std::string ss = text.str(); - const char *s = ss.data(); - int n = ss.length(); - for (int i=0;i<n;i++) { - if (s[i]=='\n') quoted << "\\n"; - else if (strchr("\"[]$",s[i])) quoted << "\\" << (char)s[i]; - else quoted << (char)s[i]; - } - //return if not canvas or not @vis # can't show for now... - /* we're not using quoting for now because there's a bug in it. */ - /* btw, this quoting is using "", but we're gonna use {} instead for now, because of newlines */ - sys_vgui("display_update %s %d %d #000000 #cccccc %s {Courier 12} .x%x.c {%s}\n", - rsym->s_name,bself->te_xpix,bself->te_ypix,selected?"#0000ff":"#000000",canvas,ss.data()); - } -}; -static void display_getrectfn(t_gobj *x, t_glist *glist, int *x1, int *y1, int *x2, int *y2) { - BFObject *bself = (BFObject*)x; Display *self = (Display *)bself->self; self->canvas = glist; - *x1 = bself->te_xpix-1; - *y1 = bself->te_ypix-1; - *x2 = bself->te_xpix+1+self->sx; - *y2 = bself->te_ypix+1+self->sy; -} -static void display_displacefn(t_gobj *x, t_glist *glist, int dx, int dy) { - BFObject *bself = (BFObject*)x; Display *self = (Display *)bself->self; self->canvas = glist; - bself->te_xpix+=dx; - bself->te_ypix+=dy; - self->canvas = glist_getcanvas(glist); - self->show(); - canvas_fixlinesfor(glist, (t_text *)x); -} -static void display_selectfn(t_gobj *x, t_glist *glist, int state) { - BFObject *bself = (BFObject*)x; Display *self = (Display *)bself->self; self->canvas = glist; - self->selected=!!state; - sys_vgui(".x%x.c itemconfigure %s -outline %s\n",glist_getcanvas(glist),self->rsym->s_name,self->selected?"#0000ff":"#000000"); -} -static void display_deletefn(t_gobj *x, t_glist *glist) { - BFObject *bself = (BFObject*)x; Display *self = (Display *)bself->self; self->canvas = glist; - if (self->vis) sys_vgui(".x%x.c delete %s %sTEXT\n",glist_getcanvas(glist),self->rsym->s_name,self->rsym->s_name); - canvas_deletelinesfor(glist, (t_text *)x); -} -static void display_visfn(t_gobj *x, t_glist *glist, int flag) { - BFObject *bself = (BFObject*)x; Display *self = (Display *)bself->self; self->canvas = glist; - self->vis = !!flag; - display_update(self); -} -static void display_update(void *x) { - Display *self = (Display *)x; - if (self->vis) self->show(); -} -\def 0 set_size(int sy, int sx) {this->sy=sy; this->sx=sx;} -\def void anything (...) { - string sel = string(argv[0]).data()+3; - text.str(""); - if (sel != "float") {text << sel; if (argc>1) text << " ";} - long col = text.str().length(); - char buf[MAXPDSTRING]; - for (int i=1; i<argc; i++) { - atom_string(&argv[i],buf,MAXPDSTRING); - text << buf; - col += strlen(buf); - if (i!=argc-1) { - text << " "; - col++; - if (col>56) {text << "\\\\\n"; col=0;} - } - } - clock_delay(clock,0); -} -\def 0 grid(...) { - text.str(""); - pd_typedmess(gp,gensym("grid"),argc,argv); - clock_delay(clock,0); -} -\def 0 very_long_name_that_nobody_uses(...) { - if (text.str().length()) text << "\n"; - for (int i=0; i<argc; i++) text << (char)INT(argv[i]); -} -\end class { - install("display",1,0); - t_class *qlass = fclass->bfclass; - t_widgetbehavior *wb = new t_widgetbehavior; - wb->w_getrectfn = display_getrectfn; - wb->w_displacefn = display_displacefn; - wb->w_selectfn = display_selectfn; - wb->w_activatefn = 0; - wb->w_deletefn = display_deletefn; - wb->w_visfn = display_visfn; - wb->w_clickfn = 0; - class_setwidget(qlass,wb); - sys_gui("proc display_update {self x y fg bg outline font canvas text} { \n\ - $canvas delete ${self}TEXT \n\ - $canvas create text [expr $x+2] [expr $y+2] -fill $fg -font $font -text $text -anchor nw -tag ${self}TEXT \n\ - foreach {x1 y1 x2 y2} [$canvas bbox ${self}TEXT] {} \n\ - incr x -1 \n\ - incr y -1 \n\ - set sx [expr $x2-$x1+2] \n\ - set sy [expr $y2-$y1+4] \n\ - $canvas delete ${self} \n\ - $canvas create rectangle $x $y [expr $x+$sx] [expr $y+$sy] -fill $bg -tags $self -outline $outline \n\ - $canvas create rectangle $x $y [expr $x+7] $y -fill red -tags $self -outline $outline \n\ - $canvas lower $self ${self}TEXT \n\ - pd \"$self set_size $sy $sx;\" \n\ - }\n"); -} -#endif // ndef HAVE_DESIREDATA - -//**************************************************************** - -// from pd/src/g_canvas.c -struct _canvasenvironment { - t_symbol *ce_dir; /* directory patch lives in */ - int ce_argc; /* number of "$" arguments */ - t_atom *ce_argv; /* array of "$" arguments */ - int ce_dollarzero; /* value of "$0" */ -}; - -struct ArgSpec { - t_symbol *name; - t_symbol *type; - t_atom defaultv; -}; - -\class Args : FObject { - ArgSpec *sargv; - int sargc; - \constructor (...) { - sargc = argc; - sargv = new ArgSpec[argc]; - for (int i=0; i<argc; i++) { - if (argv[i].a_type==A_LIST) { - t_binbuf *b = (t_binbuf *)argv[i].a_gpointer; - int bac = binbuf_getnatom(b); - t_atom *bat = binbuf_getvec(b); - sargv[i].name = atom_getsymbolarg(0,bac,bat); - sargv[i].type = atom_getsymbolarg(1,bac,bat); - if (bac<3) SETNULL(&sargv[i].defaultv); else sargv[i].defaultv = bat[2]; - } else if (argv[i].a_type==A_SYMBOL) { - sargv[i].name = argv[i].a_symbol; - sargv[i].type = gensym("a"); - SETNULL(&sargv[i].defaultv); - } else RAISE("expected symbol or nested list"); - } - bself->noutlets_set(sargc+1); - } - ~Args () {delete[] sargv;} - \decl 0 bang (); - void process_args (int argc, t_atom *argv); -}; -void outlet_anything2 (t_outlet *o, int argc, t_atom *argv) { - if (!argc) outlet_bang(o); - else if (argv[0].a_type==A_SYMBOL) outlet_anything(o,argv[0].a_symbol,argc-1,argv+1); - else if (argv[0].a_type==A_FLOAT && argc==1) outlet_float(o,argv[0].a_float); - else outlet_anything(o,&s_list,argc,argv); -} -\def 0 bang () { - _canvasenvironment *env = canvas_getenv(bself->mom); - int ac = env->ce_argc; - t_atom av[ac]; - for (int i=0; i<ac; i++) av[i] = env->ce_argv[i]; - //ac = handle_braces(ac,av); - - int j; - t_symbol *comma = gensym(","); - for (j=0; j<ac; j++) if (av[j].a_type==A_SYMBOL && av[j].a_symbol==comma) break; - int jj = handle_braces(j,av); - process_args(jj,av); - while (j<ac) { - j++; - int k=j; - for (; j<ac; j++) if (av[j].a_type==A_SYMBOL && av[j].a_symbol==comma) break; - outlet_anything2(bself->outlets[sargc],j-k,av+k); - } -} -void Args::process_args (int argc, t_atom *argv) { - t_canvas *canvas = canvas_getrootfor(bself->mom); - t_symbol *wildcard = gensym("*"); - for (int i=sargc-1; i>=0; i--) { - t_atom *v; - if (i>=argc) { - if (sargv[i].defaultv.a_type != A_NULL) { - v = &sargv[i].defaultv; - } else if (sargv[i].name!=wildcard) { - pd_error(canvas,"missing argument $%d named \"%s\"", i+1,sargv[i].name->s_name); - continue; - } - } else v = &argv[i]; - if (sargv[i].name==wildcard) { - if (argc-i>0) outlet_list(bself->outlets[i],&s_list,argc-i,argv+i); - else outlet_bang(bself->outlets[i]); - } else { - if (v->a_type==A_LIST) { - t_binbuf *b = (t_binbuf *)v->a_gpointer; - outlet_list(bself->outlets[i],&s_list,binbuf_getnatom(b),binbuf_getvec(b)); - } else if (v->a_type==A_SYMBOL) outlet_symbol(bself->outlets[i],v->a_symbol); - else outlet_anything2(bself->outlets[i],1,v); - } - } - if (argc>sargc && sargv[sargc-1].name!=wildcard) pd_error(canvas,"warning: too many args (got %d, want %d)", argc, sargc); -} -\end class {install("args",1,1);} - -//**************************************************************** - -\class UnixTime : FObject { - \constructor () {} - \decl 0 bang (); -}; -\def 0 bang () { - timeval tv; - gettimeofday(&tv,0); - time_t t = time(0); - struct tm *tmp = localtime(&t); - if (!tmp) RAISE("localtime: %s",strerror(errno)); - char tt[MAXPDSTRING]; - strftime(tt,MAXPDSTRING,"%a %b %d %H:%M:%S %Z %Y",tmp); - t_atom a[6]; - SETFLOAT(a+0,tmp->tm_year+1900); - SETFLOAT(a+1,tmp->tm_mon-1); - SETFLOAT(a+2,tmp->tm_mday); - SETFLOAT(a+3,tmp->tm_hour); - SETFLOAT(a+4,tmp->tm_min); - SETFLOAT(a+5,tmp->tm_sec); - t_atom b[3]; - SETFLOAT(b+0,tv.tv_sec/86400); - SETFLOAT(b+1,mod(tv.tv_sec,86400)); - SETFLOAT(b+2,tv.tv_usec); - outlet_anything(bself->outlets[2],&s_list,6,a); - outlet_anything(bself->outlets[1],&s_list,3,b); - send_out(0,strlen(tt),tt); -} - -\end class UnixTime {install("unix_time",1,3);} - - -//**************************************************************** - -/* 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 -*/ - -//#include <linux/parport.h> -#define LPCHAR 0x0601 -#define LPCAREFUL 0x0609 /* obsoleted??? wtf? */ -#define LPGETSTATUS 0x060b /* return LP_S(minor) */ -#define LPGETFLAGS 0x060e /* get status flags */ - -#include <sys/ioctl.h> - -struct ParallelPort; -void ParallelPort_call(ParallelPort *self); -\class ParallelPort : FObject { - FILE *f; - int fd; - int status; - int flags; - bool manually; - t_clock *clock; - ~ParallelPort () {if (clock) clock_free(clock); if (f) fclose(f);} - \constructor (string port, bool manually=0) { - f = fopen(port.data(),"r+"); - if (!f) RAISE("open %s: %s",port.data(),strerror(errno)); - fd = fileno(f); - status = 0xdeadbeef; - flags = 0xdeadbeef; - this->manually = manually; - clock = manually ? 0 : clock_new(this,(void(*)())ParallelPort_call); - clock_delay(clock,0); - } - void call (); - \decl 0 float (float x); - \decl 0 bang (); -}; -\def 0 float (float x) { - uint8 foo = (uint8) x; - fwrite(&foo,1,1,f); - fflush(f); -} -void ParallelPort_call(ParallelPort *self) {self->call();} -void ParallelPort::call() { - int flags; - if (ioctl(fd,LPGETFLAGS,&flags)<0) post("ioctl: %s",strerror(errno)); - if (this->flags!=flags) outlet_float(bself->outlets[2],flags); - this->flags = flags; - int status; - if (ioctl(fd,LPGETSTATUS,&status)<0) post("ioctl: %s",strerror(errno)); - if (this->status!=status) outlet_float(bself->outlets[1],status); - this->status = status; - if (clock) clock_delay(clock,2000); -} -\def 0 bang () {status = flags = 0xdeadbeef; call();} -//outlet 0 reserved (future use) -\end class {install("parallel_port",1,3);} - -//**************************************************************** - -\class Route2 : FObject { - int nsels; - t_symbol **sels; - ~Route2() {if (sels) delete[] sels;} - \constructor (...) {nsels=0; sels=0; _1_list(argc,argv); bself->noutlets_set(1+nsels);} - \decl void anything(...); - \decl 1 list(...); -}; -\def void anything(...) { - t_symbol *sel = gensym(argv[0].a_symbol->s_name+3); - int i=0; - for (i=0; i<nsels; i++) if (sel==sels[i]) break; - outlet_anything(bself->outlets[i],sel,argc-1,argv+1); -} -\def 1 list(...) { - for (int i=0; i<argc; i++) if (argv[i].a_type!=A_SYMBOL) {delete[] sels; RAISE("$%d: expected symbol",i+1);} - if (sels) delete[] sels; - nsels = argc; - sels = new t_symbol*[argc]; - for (int i=0; i<argc; i++) sels[i] = argv[i].a_symbol; -} -\end class {install("route2",1,1);} - -template <class T> int sgn(T a, T b=0) {return a<b?-1:a>b;} - -\class Shunt : FObject { - int n; - \attr int index; - \attr int mode; - \attr int hi; - \attr int lo; - \constructor (int n=2, int i=0) { - this->n=n; - this->hi=n-1; - this->lo=0; - this->mode=0; - this->index=i; - bself->noutlets_set(n); - } - \decl void anything(...); - \decl 1 float(int i); -}; -\def void anything(...) { - t_symbol *sel = gensym(argv[0].a_symbol->s_name+3); - outlet_anything(bself->outlets[index],sel,argc-1,argv+1); - if (mode) { - index += sgn(mode); - if (index<lo || index>hi) { - int k = max(hi-lo+1,0); - int m = gf_abs(mode); - if (m==1) index = mod(index-lo,k)+lo; else {mode=-mode; index+=mode;} - } - } -} -\def 1 float(int i) {index = mod(i,n);} -\end class {install("shunt",2,0); add_creator("demux");} - -\class Send39 : FObject { - \attr t_symbol *dest; - \constructor (t_symbol *dest) { - char buf[MAXPDSTRING]; - sprintf(buf,"pd-%s",dest->s_name); - this->dest = gensym(buf); - } - \decl void anything (...); -}; -\def void anything(...) { - t_symbol *sel = gensym(argv[0].a_symbol->s_name+3); - pd_typedmess(this->dest->s_thing,sel,argc-1,argv+1); -} -\end class {install("send39",1,0);} - -struct Receives; -struct ReceivesProxy { - t_pd x_pd; - Receives *parent; - t_symbol *suffix; -}; -t_class *ReceivesProxy_class; - -\class Receives : FObject { - int ac; - ReceivesProxy **av; - t_symbol *prefix; - t_symbol *local (t_symbol *suffix) {return gensym((string(prefix->s_name) + string(suffix->s_name)).data());} - \constructor (t_symbol *prefix, ...) { - this->prefix = prefix; - ac = argc-1; - av = new ReceivesProxy *[argc-1]; - for (int i=0; i<ac; i++) { - av[i] = (ReceivesProxy *)pd_new(ReceivesProxy_class); - av[i]->parent = this; - av[i]->suffix = argv[i+1]; - pd_bind( (t_pd *)av[i],local(av[i]->suffix)); - } - } - ~Receives () { - for (int i=0; i<ac; i++) { - pd_unbind((t_pd *)av[i],local(av[i]->suffix)); - pd_free((t_pd *)av[i]); - } - delete[] av; - } -}; -void ReceivesProxy_anything (ReceivesProxy *self, t_symbol *s, int argc, t_atom *argv) { - outlet_symbol( self->parent->bself->outlets[1],self->suffix); - outlet_anything(self->parent->bself->outlets[0],s,argc,argv); -} -\end class { - install("receives",1,2); - ReceivesProxy_class = class_new(gensym("receives.proxy"),0,0,sizeof(ReceivesProxy),CLASS_PD|CLASS_NOINLET, A_NULL); - class_addanything(ReceivesProxy_class,(t_method)ReceivesProxy_anything); -} - -/* this can't report on bang,float,symbol,pointer,list because zgetfn can't either */ -\class ClassExists : FObject { - \constructor () {} - \decl void _0_symbol(t_symbol *s); -}; -\def void _0_symbol(t_symbol *s) { - outlet_float(bself->outlets[0],!!zgetfn(&pd_objectmaker,s)); -} -\end class {install("class_exists",1,1);} - -typedef t_binbuf t_list; - -static t_list *list_new (int argc, t_atom *argv) { - t_list *b = binbuf_new(); - binbuf_add(b,argc,argv); - return b; -} -static void list_free (t_list *self) {binbuf_free(self);} - -\class ListEqual : FObject { - t_list *list; - \constructor (...) {list=0; _1_list(argc,argv);} - \decl 0 list (...); - \decl 1 list (...); -}; -\def 1 list (...) { - if (list) list_free(list); - list = list_new(argc,argv); -} -\def 0 list (...) { - if (binbuf_getnatom(list) != argc) {outlet_float(bself->outlets[0],0); return;} - t_atom2 *at = (t_atom2 *)binbuf_getvec(list); - for (int i=0; i<argc; i++) if (!atom_eq(at[i],argv[i])) {outlet_float(bself->outlets[0],0); return;} - outlet_float(bself->outlets[0],1); -} -\end class {install("list.==",2,1);} - -//**************************************************************** -//#ifdef UNISTD -#include <sys/types.h> -#include <sys/time.h> -#include <sys/times.h> -#include <sys/param.h> -#include <unistd.h> -//#endif -#if defined (__APPLE__) || defined (__FreeBSD__) -#define HZ CLK_TCK -#endif - -uint64 cpu_hertz; -int uint64_compare(uint64 &a, uint64 &b) {return a<b?-1:a>b;} - -\class UserTime : FObject { - clock_t time; - \constructor () {_0_bang(argc,argv);} - \decl 0 bang (); - \decl 1 bang (); -}; -\def 0 bang () {struct tms t; times(&t); time = t.tms_utime;} -\def 1 bang () {struct tms t; times(&t); outlet_float(bself->outlets[0],(t.tms_utime-time)*1000/HZ);} -\end class {install("usertime",2,1);} -\class SystemTime : FObject { - clock_t time; - \constructor () {_0_bang(argc,argv);} - \decl 0 bang (); - \decl 1 bang (); -}; -\def 0 bang () {struct tms t; times(&t); time = t.tms_stime;} -\def 1 bang () {struct tms t; times(&t); outlet_float(bself->outlets[0],(t.tms_stime-time)*1000/HZ);} -\end class {install("systemtime",2,1);} -\class TSCTime : FObject { - uint64 time; - \constructor () {_0_bang(argc,argv);} - \decl 0 bang (); - \decl 1 bang (); -}; -\def 0 bang () {time=rdtsc();} -\def 1 bang () {outlet_float(bself->outlets[0],(rdtsc()-time)*1000.0/cpu_hertz);} -\end class {install("tsctime",2,1); - struct timeval t0,t1; - uint64 u0,u1; - uint64 estimates[3]; - for (int i=0; i<3; i++) { - u0=rdtsc(); gettimeofday(&t0,0); usleep(10000); - u1=rdtsc(); gettimeofday(&t1,0); - uint64 t = (t1.tv_sec-t0.tv_sec)*1000000+(t1.tv_usec-t0.tv_usec); - estimates[i] = (u1-u0)*1000000/t; - } - qsort(estimates,3,sizeof(uint64),(comparator_t)uint64_compare); - cpu_hertz = estimates[1]; -} - -//**************************************************************** - -#define OP(x) op_dict[string(#x)] -void startup_flow_objects () { - op_add = OP(+); - op_sub = OP(-); - op_mul = OP(*); - op_shl = OP(<<); - op_mod = OP(%); - op_and = OP(&); - op_div = OP(/); - op_put = OP(put); - \startall -} - diff --git a/externals/gridflow/base/grid.c b/externals/gridflow/base/grid.c deleted file mode 100644 index da8d5532..00000000 --- a/externals/gridflow/base/grid.c +++ /dev/null @@ -1,402 +0,0 @@ -/* - $Id: grid.c 3941 2008-06-25 18:56:09Z matju $ - - GridFlow - Copyright (c) 2001-2008 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 "../gridflow.h.fcs" -#include <ctype.h> - -//#define TRACE fprintf(stderr,"%s %s [%s:%d]\n",ARGS(parent),__PRETTY_FUNCTION__,__FILE__,__LINE__); -#define TRACE - -#define CHECK_TYPE(d) \ - if (NumberTypeE_type_of(&d)!=this->nt) RAISE("%s(%s): " \ - "type mismatch during transmission (got %s expecting %s)", \ - ARGS(parent), __PRETTY_FUNCTION__, \ - number_type_table[NumberTypeE_type_of(&d)].name, \ - number_type_table[this->nt].name); - -#define CHECK_BUSY1(s) \ - if (!dim) RAISE("%s: " #s " not busy",ARGS(parent)); - -#define CHECK_BUSY(s) \ - if (!dim) RAISE("%s: " #s " not busy (wanting to write %ld values)",ARGS(parent),(long)n); - -#define CHECK_ALIGN(d) \ - {int bytes = number_type_table[nt].size/8; \ - int align = ((long)(void*)d)%bytes; \ - if (align) {_L_;post("%s(%s): Alignment Warning: %p is not %d-aligned: %d", \ - ARGS(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_;post("Alignment Warning: %p is not %d-aligned: %d", \ - (void*)d,bytes,align);}} - -// **************** Grid ****************************************** - -void Grid::init_from_list(int n, t_atom *aa, NumberTypeE nt) { - t_atom2 *a = (t_atom2 *)aa; - t_symbol *delim = gensym("#"); - for (int i=0; i<n; i++) { - if (a[i] == delim) { - int32 v[i]; - if (i!=0 && a[i-1].a_type==A_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 && a[0].a_type==A_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(T) { \ - T *p = (T *)*this; \ - if (n==0) CLEAR(p,nn); \ - else { \ - for (int i=0; i<n; i++) p[i] = a[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_atom(const t_atom &x) { - if (x.a_type==A_LIST) { - t_binbuf *b = (t_binbuf *)x.a_gpointer; - init_from_list(binbuf_getnatom(b),binbuf_getvec(b)); - } else if (x.a_type==A_FLOAT) { - init(new Dim(),int32_e); - CHECK_ALIGN2(this->data,nt); - ((int32 *)*this)[0] = (int32)x.a_float; - } else RAISE("can't convert to grid"); -} - -// **************** 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(long factor) { - if(!dim) RAISE("huh?"); - if(factor<=0) RAISE("%s: factor=%d should be >= 1",ARGS(parent),factor); - int i; - for (i=0; i<=dim->n; i++) if (dim->prod(i)==factor) break; - if (i>dim->n) RAISE("%s: set_factor: expecting dim->prod(i) for some i, " - "but factor=%ld and dim=%s",ARGS(parent),factor,dim->to_s()); - if (factor > 1) { - buf=new Grid(new Dim(factor), nt); - bufi=0; - } else { - buf=0; - } -} - -void GridInlet::set_chunk(long whichdim) { - long n = dim->prod(whichdim); - if (n) set_factor(n); -} - -bool GridInlet::supports_type(NumberTypeE nt) { -#define FOO(T) return !! gh->flow_##T; - TYPESWITCH(nt,FOO,return false) -#undef FOO -} - -void GridInlet::begin(int argc, t_atom2 *argv) {TRACE; - GridOutlet *back_out = (GridOutlet *) (void *)argv[0]; - nt = back_out->nt; - if (dim) RAISE("%s: grid inlet conflict; aborting %s in favour of %s, index %ld of %ld", - ARGS(parent), ARGS(sender), ARGS(back_out->parent), (long)dex, (long)dim->prod()); - sender = back_out->parent; - if ((int)nt<0 || (int)nt>=(int)number_type_table_end) RAISE("%s: inlet: unknown number type",ARGS(parent)); - if (!supports_type(nt)) RAISE("%s: number type %s not supported here", ARGS(parent), number_type_table[nt].name); - P<Dim> dim = this->dim = back_out->dim; - dex=0; - buf=0; - try { -#define FOO(T) gh->flow(this,-1,(T *)0); break; - TYPESWITCH(this->nt,FOO,) -#undef FOO - } catch (Barf &barf) { - this->dim = 0; // hack - throw; - } - this->dim = dim; - back_out->callback(this); -} - -#define CATCH_IT catch (Barf &slimy) {post("error during flow: %s",slimy.text);} - -template <class T> void GridInlet::flow(int mode, long n, T *data) {TRACE; - CHECK_BUSY(inlet); - CHECK_TYPE(*data); - CHECK_ALIGN(data); - if (this->mode==0) {dex += n; return;} // ignore data - if (n==0) return; // no data - switch(mode) { - case 4:{ - long d = dex + bufi; - if (d+n > dim->prod()) { - post("grid input overflow: %d of %d from [%s] to [%s]", d+n, dim->prod(), ARGS(sender), 0); - n = dim->prod() - d; - if (n<=0) return; - } - int bufn = factor(); - if (buf && bufi) { - T *bufd = *buf; - long k = min((long)n,bufn-bufi); - COPY(bufd+bufi,data,k); - bufi+=k; data+=k; n-=k; - if (bufi==bufn) { - long newdex = dex+bufn; - if (this->mode==6) { - T *data2 = NEWBUF(T,bufn); - COPY(data2,bufd,bufn); - CHECK_ALIGN(data2); - try {gh->flow(this,bufn,data2);} CATCH_IT; - } else { - CHECK_ALIGN(bufd); - try {gh->flow(this,bufn,bufd);} CATCH_IT; - } - dex = newdex; - bufi = 0; - } - } - int m = (n/bufn)*bufn; - if (m) { - int newdex = dex + m; - if (this->mode==6) { - T *data2 = NEWBUF(T,m); - COPY(data2,data,m); - CHECK_ALIGN(data2); - try {gh->flow(this,m,data2);} CATCH_IT; - } else { - try {gh->flow(this,m,data);} CATCH_IT; - } - dex = newdex; - } - data += m; - n -= m; - if (buf && n>0) COPY((T *)*buf+bufi,data,n), bufi+=n; - }break; - case 6:{ - int newdex = dex + n; - try {gh->flow(this,n,data);} CATCH_IT; - if (this->mode==4) DELBUF(data); - dex = newdex; - }break; - case 0: break; // ignore data - default: RAISE("%s: unknown inlet mode",ARGS(parent)); - } -} - -void GridInlet::finish() {TRACE; - if (!dim) RAISE("%s: inlet not busy",ARGS(parent)); - if (dim->prod() != dex) { - post("incomplete grid: %d of %d from [%s] to [%s]", - dex, dim->prod(), ARGS(sender), ARGS(parent)); - } -#define FOO(T) try {gh->flow(this,-2,(T *)0);} CATCH_IT; - TYPESWITCH(nt,FOO,) -#undef FOO - 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,(T *)0); - if (n>0 && this->mode!=0) { - T *data = (T *)*g; - CHECK_ALIGN(data); - int size = g->dim->prod(); - if (this->mode==6) { - T *d = data; - data = NEWBUF(T,size); - COPY(data,d,size); - CHECK_ALIGN(data); - try {gh->flow(this,n,data);} CATCH_IT; - } 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); - try {gh->flow(this,m,data);} CATCH_IT; - data+=m; n-=m; dex+=m; - } - } - } - try {gh->flow(this,-2,(T *)0);} CATCH_IT; - //!@#$ add error handling. - dim = 0; - dex = 0; -} - -void GridInlet::from_grid(Grid *g) {TRACE; - if (!supports_type(g->nt)) - RAISE("%s: number type %s not supported here", ARGS(parent), number_type_table[g->nt].name); -#define FOO(T) from_grid2(g,(T)0); - TYPESWITCH(g->nt,FOO,) -#undef FOO -} - -/* **************** GridOutlet ************************************ */ - -GridOutlet::GridOutlet(FObject *parent_, int woutlet, P<Dim> dim_, NumberTypeE nt_) { - parent=parent_; dim=dim_; nt=nt_; dex=0; frozen=false; bufi=0; buf=0; - begin(woutlet,dim,nt); -} - -//void GridOutlet::alloc_buf() { -//} - -void GridOutlet::begin(int woutlet, P<Dim> dim, NumberTypeE nt) {TRACE; - this->nt = nt; - this->dim = dim; - t_atom a[3]; - SETPOINTER(a,(t_gpointer *)this); // hack - outlet_anything(parent->bself->outlets[woutlet],bsym._grid,1,a); - frozen=true; - if (!dim->prod()) {finish(); return;} - int32 lcm_factor = 1; - for (uint32 i=0; i<inlets.size(); i++) lcm_factor = lcm(lcm_factor,inlets[i]->factor()); - //size_t ntsz = number_type_table[nt].size; - // 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(long n, T *data) {TRACE; - CHECK_BUSY(outlet); CHECK_TYPE(*data); CHECK_ALIGN(data); - for (; n>0; ) { - long pn = n;//min((long)n,MAX_PACKET_SIZE); - for (uint32 i=0; i<inlets.size(); i++) try {inlets[i]->flow(4,pn,data);} CATCH_IT; - data+=pn, n-=pn; - } -} - -void GridOutlet::flush() {TRACE; - if (!bufi) return; -#define FOO(T) send_direct(bufi,(T *)*buf); - TYPESWITCH(buf->nt,FOO,) -#undef FOO - bufi = 0; -} - -template <class T, class S> -static void convert_number_type(int n, T *out, 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(long n, T *data) {TRACE; - if (!n) return; - CHECK_BUSY(outlet); CHECK_ALIGN(data); - if (NumberTypeE_type_of(data)!=nt) { - int bs = MAX_PACKET_SIZE; -#define FOO(T) { \ - 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; - if (n > MIN_PACKET_SIZE || bufi + n > MAX_PACKET_SIZE) flush(); - if (n > MIN_PACKET_SIZE) { - send_direct(n,data); - } else { - COPY((T *)*buf+bufi,data,n); - bufi += n; - } - if (dex==dim->prod()) finish(); - } -} - -template <class T> -void GridOutlet::give(long n, T *data) {TRACE; - CHECK_BUSY(outlet); - CHECK_ALIGN(data); - if (NumberTypeE_type_of(data)!=nt) { - send(n,data); - DELBUF(data); - return; - } - if (inlets.size()==1 && inlets[0]->mode == 6) { - // this is the copyless buffer passing - flush(); - try {inlets[0]->flow(6,n,data);} CATCH_IT; - dex += n; - } else { - flush(); - send_direct(n,data); - dex += n; - DELBUF(data); - } - if (dex==dim->prod()) finish(); -} - -void GridOutlet::callback(GridInlet *in) {TRACE; - CHECK_BUSY1(outlet); - if (!(in->mode==6 || in->mode==4 || in->mode==0)) RAISE("mode error"); - inlets.push_back(in); -} - -// 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,(S *)0); -EACH_NUMBER_TYPE(FOO) -#undef FOO - //foo.send(0,(float64 *)0); // this doesn't work, when trying to fix the new link problem in --lite mode. -} - diff --git a/externals/gridflow/base/mmx.rb b/externals/gridflow/base/mmx.rb deleted file mode 100644 index ac1d0882..00000000 --- a/externals/gridflow/base/mmx.rb +++ /dev/null @@ -1,219 +0,0 @@ -=begin - $Id: mmx.rb 3638 2008-04-21 04:31:20Z matju $ - - GridFlow - Copyright (c) 2001-2008 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.9.2" -$loader.puts "#include \"../gridflow.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[ ¬ _ 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}(long,#{type}*,#{type});\n" - $install << "op_dict[string(\"#{sym}\")]->on_#{type}.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}(long,#{type}*,#{type}*,#{type}*);\n" - $decls << "void #{s}(long,#{type}*,#{type}*);\n" - $install << "op_dict[string(\"#{sym}\")]->on_#{type}.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; - post(\"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/base/new.h b/externals/gridflow/base/new.h deleted file mode 100644 index 8cea2548..00000000 --- a/externals/gridflow/base/new.h +++ /dev/null @@ -1,108 +0,0 @@ -// The -*- C++ -*- dynamic memory management header. - -// Copyright (C) 1994, 1996, 1997, 1998, 2000, 2001, 2002 -// Free Software Foundation - -// This file is part of GCC. -// -// GCC 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, or (at your option) -// any later version. -// -// GCC 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 GCC; see the file COPYING. If not, write to -// the Free Software Foundation, 59 Temple Place - Suite 330, -// Boston, MA 02111-1307, USA. - -// As a special exception, you may use this file as part of a free software -// library without restriction. Specifically, if other files instantiate -// templates or use macros or inline functions from this file, or you compile -// this file and link it with other files to produce an executable, this -// file does not by itself cause the resulting executable to be covered by -// the GNU General Public License. This exception does not however -// invalidate any other reasons why the executable file might be covered by -// the GNU General Public License. - -/** @file new - * The header @c new defines several functions to manage dynamic memory and - * handling memory allocation errors; see - * http://gcc.gnu.org/onlinedocs/libstdc++/18_support/howto.html#4 for more. - */ - -#ifndef _NEW -#define _NEW -// because of gcc 3.3 -#define __NEW__ - -#include <cstddef> -#include <exception> - -//#pragma GCC visibility push(default) - -extern "C++" { - -namespace std -{ - /** - * @brief Exception possibly thrown by @c new. - * - * @c bad_alloc (or classes derived from it) is used to report allocation - * errors from the throwing forms of @c new. */ - class bad_alloc : public exception - { - public: - bad_alloc() throw() { } - // This declaration is not useless: - // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118 - virtual ~bad_alloc() throw(); - }; - - struct nothrow_t { }; - extern const nothrow_t nothrow; - /** If you write your own error handler to be called by @c new, it must - * be of this type. */ - typedef void (*new_handler)(); - /// Takes a replacement handler as the argument, returns the previous handler. - new_handler set_new_handler(new_handler) throw(); -} // namespace std - -//@{ -/** These are replaceable signatures: - * - normal single new and delete (no arguments, throw @c bad_alloc on error) - * - normal array new and delete (same) - * - @c nothrow single new and delete (take a @c nothrow argument, return - * @c NULL on error) - * - @c nothrow array new and delete (same) - * - * Placement new and delete signatures (take a memory address argument, - * does nothing) may not be replaced by a user's program. -*/ - -ALLOCPREFIX void* operator new(std::size_t) throw (std::bad_alloc); -ALLOCPREFIX void* operator new[](std::size_t) throw (std::bad_alloc); -ALLOCPREFIX void operator delete(void*) throw(); -ALLOCPREFIX void operator delete[](void*) throw(); -ALLOCPREFIX void* operator new(std::size_t, const std::nothrow_t&) throw(); -ALLOCPREFIX void* operator new[](std::size_t, const std::nothrow_t&) throw(); -ALLOCPREFIX void operator delete(void*, const std::nothrow_t&) throw(); -ALLOCPREFIX void operator delete[](void*, const std::nothrow_t&) throw(); - -// Default placement versions of operator new. -inline void* operator new(std::size_t, void* __p) throw() { return __p; } -inline void* operator new[](std::size_t, void* __p) throw() { return __p; } - -// Default placement versions of operator delete. -inline void operator delete (void*, void*) throw() { } -inline void operator delete[](void*, void*) throw() { } -//@} -} // extern "C++" - -//#pragma GCC visibility pop - -#endif diff --git a/externals/gridflow/base/number.c b/externals/gridflow/base/number.c deleted file mode 100644 index 9ef47f23..00000000 --- a/externals/gridflow/base/number.c +++ /dev/null @@ -1,440 +0,0 @@ -/* - $Id: number.c 3979 2008-07-04 20:19:22Z matju $ - - GridFlow - Copyright (c) 2001-2008 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 "../gridflow.h.fcs" -#include <math.h> -#include <stdlib.h> -#include <stdio.h> -#include <limits.h> -#include <complex> -#include <assert.h> -//using namespace std; - -static inline uint64 weight(uint64 x) {uint64 k; - k=0x5555555555555555ULL; x = (x&k) + ((x>> 1)&k); //(2**64-1)/(2**2**0-1) - k=0x3333333333333333ULL; x = (x&k) + ((x>> 2)&k); //(2**64-1)/(2**2**1-1) - k=0x0f0f0f0f0f0f0f0fULL; x = (x&k) + ((x>> 4)&k); //(2**64-1)/(2**2**2-1) - k=0x00ff00ff00ff00ffULL; x = (x&k) + ((x>> 8)&k); //(2**64-1)/(2**2**3-1) - k=0x0000ffff0000ffffULL; x = (x&k) + ((x>>16)&k); //(2**64-1)/(2**2**4-1) - k=0x00000000ffffffffULL; x = (x&k) + ((x>>32)&k); //(2**64-1)/(2**2**5-1) - return x; -} - -#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 T> class OpLoops: public NumopOn<T> { -public: - static inline T f(T a, T b) {return O::f(a,b);} - #define FOO(I) as[I]=f(as[I],b); - static void _map (long n, T *as, T b) {if (!n) return; UNROLL_8(FOO,n,as)} - #undef FOO - #define FOO(I) as[I]=f(as[I],as[ba+I]); - static void _zip (long n, T *as, T *bs) {if (!n) return; ptrdiff_t ba=bs-as; UNROLL_8(FOO,n,as)} - #undef FOO - #define W(i) as[i]=f(as[i],bs[i]); - #define Z(i,j) as[i]=f(f(f(f(as[i],bs[i]),bs[i+j]),bs[i+j+j]),bs[i+j+j+j]); - static void _fold (long an, long n, T *as, T *bs) { - switch (an) { - case 1:for(;(n&3)!=0;bs+=1,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:while (n--) {int i=0; - for (; i<(an&-4); i+=4, bs+=4) { - as[i+0]=f(as[i+0],bs[0]); - as[i+1]=f(as[i+1],bs[1]); - as[i+2]=f(as[i+2],bs[2]); - as[i+3]=f(as[i+3],bs[3]);} - for (; i<an; i++, bs++) as[i] = f(as[i],*bs);}}} - #undef W - #undef Z - static void _scan (long an, long n, T *as, T *bs) { - for (; n--; as=bs-an) { - for (int i=0; i<an; i++, as++, bs++) *bs=f(*as,*bs); - } - } -}; - -template <class T> -static void quick_mod_map (long 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 (long n, T *as, T b) {} -template <class T> static void quick_ign_zip (long n, T *as, T *bs) {} -template <class T> static void quick_put_map (long n, T *as, T b) { -#define FOO(I) as[I]=b; - UNROLL_8(FOO,n,as) -#undef FOO -} - -#ifdef PASS1 -void quick_put_map (long 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 (long 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 (long n, T *as, T *bs) { - gfmemcopy((uint8 *)as, (uint8 *)bs, n*sizeof(T)); -} - -#define Plex std::complex - -// classic two-input operator - -#define DEF_OP_COMMON(op,expr,neu,isneu,isorb,T) \ - inline static T f(T a, T b) { return (T)(expr); } \ - inline static void neutral (T *a, LeftRight side) {*a = 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_OP(op,expr,neu,isneu,isorb) template <class T> class Y##op : Op<T> { public: \ - DEF_OP_COMMON(op,expr,neu,isneu,isorb,T);}; -#define DEF_OPFT(op,expr,neu,isneu,isorb,T) template <> class Y##op<T> : Op<T> { public: \ - DEF_OP_COMMON(op,expr,neu,isneu,isorb,T);}; -// 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 OL(O,T) OpLoops<Y##O<T>,T> -#define VOL(O,T) OpLoops<Y##O<Plex<T> >,Plex<T> > -#define DECL_OPON(L,O,T) NumopOn<T>( \ - (NumopOn<T>::Map) L(O,T)::_map, (NumopOn<T>::Zip) L(O,T)::_zip, \ - (NumopOn<T>::Fold)L(O,T)::_fold, (NumopOn<T>::Scan)L(O,T)::_scan, \ - &Y##O<T>::neutral, &Y##O<T>::is_neutral, &Y##O<T>::is_absorbent) -#define DECL_OPON_NOFOLD(L,O,T) NumopOn<T>( \ - (NumopOn<T>::Map)L(O,T)::_map, (NumopOn<T>::Zip)L(O,T)::_zip, 0,0, \ - &Y##O<T>::neutral, &Y##O<T>::is_neutral, &Y##O<T>::is_absorbent) -#define DECLOP( L,M,O,sym,flags,dim) Numop(sym,M(L,O,uint8),M(L,O,int16),M(L,O,int32) \ - NONLITE(,M(L,O,int64)), M(L,O,float32) NONLITE(,M(L,O,float64)),flags,dim) -#define DECLOP_NOFLOAT(L,M,O,sym,flags,dim) Numop(sym,M(L,O,uint8),M(L,O,int16),M(L,O,int32) \ - NONLITE(,M(L,O,int64)),NumopOn<float32>() NONLITE(,NumopOn<float64>()), flags,dim) -// NONLITE(,M(L,O,int64),NumopOn<float32>(),NumopOn<float64>()), flags,dim) -#define DECLOP_FLOAT( L,M,O,sym,flags,dim) Numop(sym,NumopOn<uint8>(),NumopOn<int16>(),NumopOn<int32>() \ - NONLITE(,NumopOn<int64>()),M(L,O,float32) NONLITE(,M(L,O,float64)),flags,dim) - -#define DECL_OP( O,sym,flags) DECLOP( OL,DECL_OPON ,O,sym,flags,1) -#define DECL_OP_NOFLOAT( O,sym,flags) DECLOP_NOFLOAT( OL,DECL_OPON ,O,sym,flags,1) -#define DECL_OP_NOFOLD( O,sym,flags) DECLOP( OL,DECL_OPON_NOFOLD,O,sym,flags,1) -#define DECL_OP_NOFOLD_NOFLOAT( O,sym,flags) DECLOP_NOFLOAT( OL,DECL_OPON_NOFOLD,O,sym,flags,1) -#define DECL_OP_NOFOLD_FLOAT( O,sym,flags) DECLOP_FLOAT( OL,DECL_OPON_NOFOLD,O,sym,flags,1) - -#define DECL_VOP( O,sym,flags,dim) DECLOP( VOL,DECL_OPON ,O,sym,flags,dim) -#define DECL_VOP_NOFLOAT( O,sym,flags,dim) DECLOP_NOFLOAT(VOL,DECL_OPON ,O,sym,flags,dim) -#define DECL_VOP_NOFOLD( O,sym,flags,dim) DECLOP( VOL,DECL_OPON_NOFOLD,O,sym,flags,dim) -#define DECL_VOP_NOFOLD_NOFLOAT(O,sym,flags,dim) DECLOP_NOFLOAT(VOL,DECL_OPON_NOFOLD,O,sym,flags,dim) -#define DECL_VOP_NOFOLD_FLOAT( O,sym,flags,dim) DECLOP_FLOAT( VOL,DECL_OPON_NOFOLD,O,sym,flags,dim) - -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); } - -namespace { -// trying to avoid GCC warning about uint8 too small for ==256 -template <class T> static bool equal256 (T x) {return x==256;} -template <> 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(sinmul, (float64)b * sin((float64)a * (M_PI / 18000)), 0, false, false) // "LN=9000+36000n RA=0 LA=..." -DEF_OP(cosmul, (float64)b * cos((float64)a * (M_PI / 18000)), 0, false, false) // "LN=36000n RA=0 LA=..." -DEF_OP(atan, atan2(a,b) * (18000 / M_PI), 0, false, false) // "LA=0" -DEF_OP(tanhmul, (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_OPF(pow, ipow(a,b), pow(a,b), 0, false, false) // "RN=1" -DEF_OP(logmul, 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_OPF(hypot, floor(sqrt(a*a+b*b)), sqrt(a*a+b*b), 0, false, false) -DEF_OPF(sqrt, floor(sqrt(a)), sqrt(a), 0, false, false) -DEF_OP(rand, a==0 ? (T)0 : (T)(random()%(int32)a), 0, false, false) -//DEF_OP(erf,"erf*", 0) -DEF_OP(weight,weight((uint64)(a^b) & (0xFFFFFFFFFFFFFFFFULL>>(64-sizeof(T)*8))),0,false,false) -#define BITS(T) (sizeof(T)*8) -DEF_OP(rol,((uint64)a<<b)|((uint64)a>>(T)((-b)&(BITS(T)-1))),0,false,false) -DEF_OP(ror,((uint64)a>>b)|((uint64)a<<(T)((-b)&(BITS(T)-1))),0,false,false) - -DEF_OP(sin, sin(a-b), 0, false, false) -DEF_OP(cos, cos(a-b), 0, false, false) -DEF_OP(atan2,atan2(a,b), 0, false, false) -DEF_OP(tanh, tanh(a-b), 0, false, false) -DEF_OP(exp, exp(a-b), 0, false, false) -DEF_OP(log, log(a-b), 0, false, false) - -#endif -#ifdef PASS4 - -template <class T> inline T gf_sqrt(T a) {return (T)floor(sqrt( a));} -inline float32 gf_sqrt(float32 a) {return sqrtf(a) ;} -inline float64 gf_sqrt(float64 a) {return sqrt( a) ;} - -template <class T> inline Plex<T> cx_sqsub(Plex<T>& a, Plex<T>& b) { Plex<T> v=a-b; return v*v; } -template <class T> inline Plex<T> cx_abssub(Plex<T>& a, Plex<T>& b) { Plex<T> v=a-b; return norm(v); } -/* -template <class T> inline Plex<T> cx_atan2 (Plex<T>& a, Plex<T>& b) { - if (b==0) return 0; - Plex<T> v=a/b; - return (log(1+iz)-log(log(1-iz))/2i; - // but this is not taking care of sign stuff... - // and then what's the use of atan2 on complexes? (use C.log ...) -} -*/ - -//!@#$ neutral,is_neutral,is_absorbent are WRONG here -DEF_OP(cx_mul, a*b, 1, x==1, x==0) -DEF_OP(cx_mulconj, a*conj(b), 1, x==1, x==0) -DEF_OP(cx_div, a/b, 1, x==1, x==0) -DEF_OP(cx_divconj, a/conj(b), 1, x==1, x==0) -DEF_OP(cx_sqsub, cx_sqsub(a,b), 0, false, false) -DEF_OP(cx_abssub, cx_abssub(a,b), 0, false, false) -DEF_OP(cx_sin, sin(a-b), 0, false, false) -DEF_OP(cx_cos, cos(a-b), 0, false, false) -//DEF_OP(cx_atan2,atan2(a,b), 0, false, false) -DEF_OP(cx_tanh, tanh(a-b), 0, false, false) -DEF_OP(cx_exp, exp(a-b), 0, false, false) -DEF_OP(cx_log, log(a-b), 0, false, false) -#endif - -extern Numop op_table1[], op_table2[], op_table3[], op_table4[]; -extern const long op_table1_n, op_table2_n, op_table3_n, op_table4_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; } - -Numop op_table3[] = { - DECL_OP_NOFOLD(sinmul, "sin*", 0), - DECL_OP_NOFOLD(cosmul, "cos*", 0), - DECL_OP_NOFOLD(atan, "atan", 0), - DECL_OP_NOFOLD(tanhmul,"tanh*", 0), - DECL_OP_NOFOLD(gamma, "gamma", 0), - DECL_OP_NOFOLD(pow, "**", 0), - DECL_OP_NOFOLD(logmul, "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), // huh, almost OP_ASSOC - DECL_OP_NOFOLD(sqrt, "sqrt", 0), - DECL_OP_NOFOLD(rand, "rand", 0), - //DECL_OP_NOFOLD(erf,"erf*", 0), - DECL_OP_NOFOLD_NOFLOAT(weight,"weight",OP_COMM), - DECL_OP_NOFOLD_NOFLOAT(rol,"rol",0), - DECL_OP_NOFOLD_NOFLOAT(ror,"ror",0), - - DECL_OP_NOFOLD_FLOAT(sin, "sin", 0), - DECL_OP_NOFOLD_FLOAT(cos, "cos", 0), - DECL_OP_NOFOLD_FLOAT(atan2,"atan2", 0), - DECL_OP_NOFOLD_FLOAT(tanh, "tanh", 0), - DECL_OP_NOFOLD_FLOAT(exp, "exp", 0), - DECL_OP_NOFOLD_FLOAT(log, "log", 0), - -}; -const long op_table3_n = COUNT(op_table3); -#endif -#ifdef PASS4 -Numop op_table4[] = { - DECL_VOP(cx_mul, "C.*", OP_ASSOC|OP_COMM,2), - DECL_VOP(cx_mulconj, "C.*conj", OP_ASSOC|OP_COMM,2), - DECL_VOP(cx_div, "C./", 0,2), - DECL_VOP(cx_divconj, "C./conj", 0,2), - DECL_VOP(cx_sqsub, "C.sq-", OP_COMM,2), - DECL_VOP(cx_abssub, "C.abs-", OP_COMM,2), - DECL_VOP_NOFOLD_FLOAT(cx_sin, "C.sin", 0,2), - DECL_VOP_NOFOLD_FLOAT(cx_cos, "C.cos", 0,2), -// DECL_VOP_NOFOLD_FLOAT(cx_atan2,"C.atan2",0,2), - DECL_VOP_NOFOLD_FLOAT(cx_tanh, "C.tanh", 0,2), - DECL_VOP_NOFOLD_FLOAT(cx_exp, "C.exp", 0,2), - DECL_VOP_NOFOLD_FLOAT(cx_log, "C.log", 0,2), -}; -const long op_table4_n = COUNT(op_table4); -#endif - -// D=dictionary, A=table, A##_n=table count. -#define INIT_TABLE(D,A) for(int i=0; i<A##_n; i++) D[string(A[i].name)]=&A[i]; - -#ifdef PASS1 -std::map<string,NumberType *> number_type_dict; -std::map<string,Numop *> op_dict; -std::map<string,Numop *> vop_dict; -void startup_number () { - INIT_TABLE( op_dict,op_table1) - INIT_TABLE( op_dict,op_table2) - INIT_TABLE( op_dict,op_table3) - INIT_TABLE(vop_dict,op_table4) - 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; - number_type_dict[string(b+1)]=&number_type_table[i]; - } - number_type_dict[string(a)]=&number_type_table[i]; - } -// S:name; M:mode; F:replacement function; -#define OVERRIDE_INT(S,M,F) { \ - Numop *foo = op_dict[string(#S)]; \ - foo->on_uint8.M=F; \ - foo->on_int16.M=F; \ - foo->on_int32.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 38468045..00000000 --- a/externals/gridflow/base/source_filter.rb +++ /dev/null @@ -1,311 +0,0 @@ -#!/usr/bin/env ruby -=begin - $Id: source_filter.rb 3944 2008-06-25 19:46:14Z matju $ - - GridFlow - Copyright (c) 2001-2008 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 - -$stack = [] -$classes = [] -$exit = 0 - -ClassDecl = Struct.new(:name,:supername,:methods,:grins,:attrs,:info) -MethodDecl = Struct.new(:rettype,:selector,:arglist,:minargs,:maxargs,:where) -Arg = Struct.new(:type,:name,:default) -Attr = Struct.new(:type,:name,:default,:virtual) - -class MethodDecl - def ==(o) - return false unless rettype==o.rettype && maxargs==o.maxargs - arglist.each_index{|i| arglist[i] == o.arglist[i] or return false } - return true - end - def ===(o) - return false unless rettype==o.rettype && maxargs==o.maxargs - arglist.each_index{|i| arglist[i].type == o.arglist[i].type and arglist[i].default == o.arglist[i].default or return false } - return true - end - attr_accessor :done -end - -class Arg - def canon(type) - type="Grid *" if type=="PtrGrid" - type - end - def ==(o) canon(type)==canon(o.type) && name==o.name 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] - /^(\w+)(?:\s*[:<]\s*(\w+))?\s*(\{.*)?/.match line or raise "syntax error #{where}" - classname = $1 - superclassname = $2 - rest = $3 - q=ClassDecl.new(classname,superclassname,{},{},{},false) - $stack << q - $classes << q - Out.print "/* begin class */" - if rest and /^\{/ =~ rest then - Out.print "struct #{classname} " - Out.print ": #{superclassname}" if superclassname - Out.print rest - end -end - -def parse_methoddecl(line,term) - /^(\w+(?:\s*\*)?)\s+(\w+)\s*\(([^\)]*)\)\s*#{term}/.match line or - raise "syntax error #{where} #{line}" - rettype,selector,arglist = $1,$2,$3,$4 - if /^\d+$/ =~ rettype then - selector = "_"+rettype+"_"+selector - rettype = "void" - end - arglist,minargs,maxargs = parse_arglist arglist - MethodDecl.new(rettype,selector,arglist,minargs,maxargs,where) -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) - line.gsub!(/\/\/.*$/,"") # remove comment - frame = $stack[-1] - type = line.gsub(%r"//.*$","").gsub(%r"/\*.*\*/","").gsub(%r";?\s*$","") - virtual = !!type.slice!(/\(\)$/) - name = type.slice!(/\w+$/) - raise "missing \\class #{where}" if not $stack[-1] or not ClassDecl===frame - handle_decl "void ___get(t_symbol *s);" if frame.attrs.size==0 - frame.attrs[name]=Attr.new(type,name,nil,virtual) - if virtual then - handle_decl "#{type} #{name}();" - else - Out.print line - end - type.gsub!(/\s+$/,"") - type.gsub!(/^\s+/,"") - if type=="bool" then - handle_decl "0 #{name} (#{type} #{name}=true);" - else - handle_decl "0 #{name} (#{type} #{name});" - end -end - -def handle_decl(line) - frame = $stack[-1] - raise "missing \\class #{where}" if not frame or not ClassDecl===frame - classname = frame.name - m = parse_methoddecl(line,";\s*$") - frame.methods[m.selector] = m - Out.print "#{m.rettype} #{m.selector}(VA" - Out.print ", #{unparse_arglist m.arglist}" if m.arglist.length>0 - Out.print "); static void #{m.selector}_wrap(#{classname} *self, VA); " -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 - n = m - if qlass.methods[m.selector] - m = qlass.methods[m.selector] - if !m===n then - STDERR.puts "ERROR: def does not match decl:" - STDERR.puts "#{m.where}: \\decl #{m.inspect}" - STDERR.puts "#{n.where}: \\def #{n.inspect}" - $exit = 1 - end - else - qlass.methods[m.selector] = m - end - Out.print "void #{classname}::#{m.selector}_wrap(#{classname} *self, VA) {" - Out.print "static const char *methodspec = \"#{qlass.name}::#{m.selector}(#{unparse_arglist m.arglist,false})\";" - Out.print "#{m.rettype} foo;" if m.rettype!="void" - 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);" - Out.print "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 ");} #{m.rettype} #{classname}::#{m.selector}(VA" - #puts "m=#{m} n=#{n}" - Out.print ","+unparse_arglist(n.arglist,false) if m.arglist.length>0 - Out.print ")#{term} " - qlass.methods[m.selector].done=true -end - -def handle_constructor(line) - frame = $stack[-1] - raise "missing \\class #{where}" if not frame or not ClassDecl===frame - m = parse_methoddecl("void constructor"+line,"(.*)$") - Out.print "#{frame.name}(BFObject *bself, MESSAGE) : #{frame.supername}(bself,MESSAGE2) {" - Out.print "static const char *methodspec = \"#{frame.name}::#{m.selector}(#{unparse_arglist m.arglist,false})\";" - - 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);" - Out.print "#{m.selector}(sel,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 "#{m.rettype} #{m.selector}(MESSAGE" - Out.print ", #{unparse_arglist m.arglist}" if m.arglist.length>0 - Out.print ") "+line[/\{.*/] -end - -def handle_classinfo(line) - frame = $stack[-1] - cl = frame.name - line="{}" if /^\s*$/ =~ line - Out.print "static void #{cl}_startup (FClass *fclass);" - Out.print "static FObject *#{cl}_allocator (BFObject *bself, MESSAGE) {return new #{cl}(bself,sel,argc,argv);}" - Out.print "static MethodDecl #{cl}_methods[] = {" - Out.print frame.methods.map {|foo,method| "{ \"#{method.selector}\",(FMethod)#{frame.name}::#{method.selector}_wrap }" }.join(",") - Out.print "}; FClass ci#{cl} = {#{cl}_allocator,#{cl}_startup,#{cl.inspect},COUNT(#{cl}_methods),#{cl}_methods};" - get="void ___get(t_symbol *s=0) {t_atom a[1];" - frame.attrs.each {|name,attr| - virtual = if attr.virtual then "(0,0)" else "" end - get << "if (s==gensym(\"#{name}\")) set_atom(a,#{name}#{virtual}); else " - if frame.methods["_0_"+name].done then - #STDERR.puts "skipping already defined \\attr #{name}" - next - end - type,name,default = attr.to_a - handle_def "0 #{name} (#{type} #{name}) {this->#{name}=#{name}; changed(gensym(\"#{name}\"));}" - } - line.gsub!(/^\s*(\w+\s*)?\{/,"") - get << "RAISE(\"unknown attr %s\",s->s_name); outlet_anything(bself->outlets[bself->noutlets-1],s,1,a);}" - handle_def get if frame.attrs.size>0 - Out.print "void #{frame.name}_startup (FClass *fclass) {" - frame.attrs.each {|name,attr| Out.print "fclass->attrs[\"#{name}\"] = new AttrDecl(\"#{name}\",\"#{attr.type}\");" } - Out.print line.chomp -end - -def handle_grin(line) - fields = line.split(/\s+/) - i = fields[0].to_i - c = $stack[-1].name - frame = $stack[-1] - Out.print "template <class T> void grin_#{i}(GridInlet *in, long n, T *data);" - Out.print "template <class T> static void grinw_#{i} (GridInlet *in, long n, T *data);" - Out.print "static GridHandler grid_#{i}_hand;" - handle_decl "#{i} grid(void *foo);" - handle_decl "#{i} list(...);" - handle_decl "#{i} float(float f);" - $stack[-1].grins[i] = fields.dup -end - -def handle_end(line) - frame = $stack.pop - fields = line.split(/\s+/) - n = fields.length - if not ClassDecl===frame then raise "\\end: frame is not a \\class" end - cl = frame.name - if fields[0]!="class" or (n>1 and not /^\{/ =~ fields[1] and fields[1]!=cl) then raise "end not matching #{where}" end - $stack.push frame - frame.grins.each {|i,v| - cli = "#{cl}::grinw_#{i}" - k = case v[1] - when nil ; [1,1,1,1,1,1] - when 'int32'; [0,0,1,0,0,0] - when 'int' ; [1,1,1,1,0,0] - when 'float' ; [0,0,0,0,1,1] - when 'float32'; [0,0,0,0,1,0] - when 'float64'; [0,0,0,0,0,1] - else raise 'BORK BORK BORK' end - ks = k.map{|ke| if ke==0 then 0 else cli end}.join(",") - Out.print "static GridHandler #{cl}_grid_#{i}_hand = GRIN(#{ks});" - handle_def "#{i} grid(void *foo) {CHECK_GRIN(#{cl},#{i});"+ - "in[#{i}]->begin(argc,argv);}" - handle_def "#{i} list(...) {CHECK_GRIN(#{cl},#{i});"+ - "in[#{i}]->from_list(argc,argv,int32_e);}" if not frame.methods["_#{i}_list"].done - handle_def "#{i} float(float f) {CHECK_GRIN(#{cl},#{i});"+ - "t_atom2 a[1]; SETFLOAT(a,f);"+ - "in[#{i}]->from_atom(1,a);}" if not frame.methods["_#{i}_float"].done - } - if /^class\s*(\w+\s+)?\{(.*)/ =~ line then handle_classinfo("{"+$2) end - $stack.pop - Out.print " /*end class*/ " -end - -def handle_startall(line) - $classes.each {|q| - Out.print "fclass_install(&ci#{q.name}," - if q.supername then Out.print "&ci#{q.supername}" else Out.print "0" end - Out.print ",sizeof(#{q.name}));" - } -end - -$linenumber=1 -loop{ - x = In.gets - break if not x - if /^\s*\\(\w+)\s*(.*)$/.match x then - begin - send("handle_#{$1}",$2) - Out.puts "//FCS" - rescue StandardError => e - STDERR.puts e.inspect, "at line #{$linenumber}", e.backtrace - File.unlink ARGV[1] - exit 1 - end - else Out.puts x end - $linenumber+=1 -} - -exit $exit 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/check-help-version b/externals/gridflow/bin/check-help-version deleted file mode 100755 index cb067154..00000000 --- a/externals/gridflow/bin/check-help-version +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/tclsh - -set argh0 [file normalize [file join [pwd] $argv0]] -source [file dirname $argh0]/pd-tools.tcl - -set report {} - -proc find_version_strings {lines i} { - global filename report - lappend toplefts [list patate poil] ;# temporary dummy value so that subpatches are represented in the correct order - set j $i - set versions {} - while {$i < [llength $lines]} { - set list [split [lindex $lines $i] " "] - switch -- [lindex $list 1] { - text { - set comment [join [lrange $list 4 end] " "] - if {[regexp {^GridFlow (\d\.\d\.\d)} $comment v0 v1]} { - lappend versions $v1 - } - } - connect {incr i; continue} - restore {break} - } - # recurse into subpatches (disabled because not necessary; can treat the file as one flat patch anyway) - ### if {[string compare [lindex $list 0] "#N"]==0} {set i [find_version_strings $lines [expr $i+1]]} - incr i - } - lappend report [list $filename [lsort $versions]] - return $i -} - -foreach filename $argv { - set lines [pd_read_file $filename] - find_version_strings $lines 1 -} - -set env(PRINT_CLASS_LIST) yes -set f [open "| pd -nogui -send {pd quit} 2&>1" r+] -while {![eof $f]} { - if {[regexp {^class_new (.*)} [gets $f] m0 m1]} { - puts $m1 - } -} - -foreach line [lsort -decreasing -index 1 $report] { - foreach {filename versions} $line {} - puts [format "%40s: %s" $filename $versions] -} diff --git a/externals/gridflow/bin/cvs-switch-user b/externals/gridflow/bin/cvs-switch-user deleted file mode 100755 index 9f4ab9ed..00000000 --- a/externals/gridflow/bin/cvs-switch-user +++ /dev/null @@ -1,6 +0,0 @@ -GFSOURCE=$(dirname $(dirname $(which "$0"))) -echo $1@cvs.gridflow.ca:/home/cvs/gridflow > CVS/Root -for file in $(find $GFSOURCE -name Root) -do - cp CVS/Root $file -done 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/pd-tools.tcl b/externals/gridflow/bin/pd-tools.tcl deleted file mode 100644 index 2951b260..00000000 --- a/externals/gridflow/bin/pd-tools.tcl +++ /dev/null @@ -1,37 +0,0 @@ -# (this proc is taken from desiredata) -# split at message boundaries. -# \n is wiped, then that character is reused temporarily to mean a quoted semicolon. -proc pd_mess_split {e} { - set r {} - regsub -all "\n" $e " " y - regsub -all {\\;} $y "\n" z - foreach mess [split $z ";"] { - regsub -all "\n" $mess "\\;" mess - set mess [string trimleft $mess] - if {$mess != ""} {lappend r $mess} - } - return $r -} - -proc pd_read_file {filename} { - set f [open $filename] - set r [pd_mess_split [read $f]] - close $f - return $r -} - -proc pd_pickle {l} { - set i 0 - set t "" - set n [llength $l] - foreach e $l { - incr n -1 - #regsub -all "," $e "\\," e - append t $e - incr i [string length $e] - if {$i>65} {set i 0; append t "\n"} elseif {$n>0} {incr i; append t " "} - } - append t ";" - return $t -} - diff --git a/externals/gridflow/bin/pdnonegative b/externals/gridflow/bin/pdnonegative deleted file mode 100755 index d707f568..00000000 --- a/externals/gridflow/bin/pdnonegative +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/tclsh - -set argh0 [file normalize [file join [pwd] $argv0]] -source [file dirname $argh0]/pd-tools.tcl - -set toplefts {} - -# for the recursion to work properly, restore should be checked before #N, and the check -# for #N shouldn't do "continue", as well as other tricky index stuff. -proc find_top_left {lines i} { - global filename toplefts - set toplefts_i [llength $toplefts] - lappend toplefts [list patate poil] ;# temporary dummy value so that subpatches are represented in the correct order - set j $i - set xmin +9999; set ymin +9999 - set xmax -9999; set ymax -9999 - while {$i < [llength $lines]} { - set list [split [lindex $lines $i] " "] - if {[string compare [lindex $list 1] "connect"]==0} {incr i; continue} - if {[string compare [lindex $list 1] "restore"]==0} {break} - if {[string compare [lindex $list 0] "#N"]==0} {set i [find_top_left $lines [expr $i+1]]} - set x [lindex $list 2]; if {$xmin > $x} {set xmin $x}; if {$xmax < $x} {set xmax $x} - set y [lindex $list 3]; if {$ymin > $y} {set ymin $y}; if {$ymax < $y} {set ymax $y} - incr i - } - puts [format "filename=%-32s patch at lines %4d thru %4d has xmin=%d ymin=%d xmax=%d ymax=%d" $filename $j $i $xmin $ymin $xmax $ymax] - lset toplefts $toplefts_i [list $xmin $ymin] - return $i -} - -# somewhat copy-pasted from the above, sorry. -proc move_objects {lines i} { - global toplefts fout - set xymin [lindex $toplefts 0] - set xmin [lindex $xymin 0]; if {$xmin > 0} {set xmin 0} - set ymin [lindex $xymin 1]; if {$ymin > 0} {set ymin 0} - set toplefts [lrange $toplefts 1 end] - while {$i < [llength $lines]} { - set list [split [lindex $lines $i] " "] - if {[string compare [lindex $list 1] "connect"]==0} {puts $fout [pd_pickle $list]; incr i; continue} - if {[string compare [lindex $list 1] "restore"]==0} {break} - if {[string compare [lindex $list 0] "#N"]==0} { - puts $fout [pd_pickle $list] - set i [move_objects $lines [expr $i+1]] - set list [split [lindex $lines $i] " "] - } - set x [expr [lindex $list 2]-$xmin] - set y [expr [lindex $list 3]-$ymin] - set list [lreplace $list 2 3 $x $y] - puts $fout [pd_pickle $list] - incr i - } - return $i -} - -foreach filename $argv { - set lines [pd_read_file $filename] - find_top_left $lines 1 - #continue - set fout [open $filename.new w] - puts $fout [pd_pickle [lindex $lines 0]] - move_objects $lines 1 - close $fout - exec mv $filename $filename.old - exec mv $filename.new $filename -} 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/bin/valg b/externals/gridflow/bin/valg deleted file mode 100755 index de0f040a..00000000 --- a/externals/gridflow/bin/valg +++ /dev/null @@ -1,5 +0,0 @@ -GFSOURCE=$HOME/src/gridflow -SUPPFILE=$GFSOURCE/tests/suppressions.valg3 - -valgrind --suppressions=$SUPPFILE --gen-suppressions=yes "$@" - diff --git a/externals/gridflow/bundled/Base/CPPExtern.h b/externals/gridflow/bundled/Base/CPPExtern.h deleted file mode 100644 index 7f0630dd..00000000 --- a/externals/gridflow/bundled/Base/CPPExtern.h +++ /dev/null @@ -1,521 +0,0 @@ -/*----------------------------------------------------------------- -LOG - GEM - Graphics Environment for Multimedia - - The base class for all externs written in C++ - - Copyright (c) 1997-1999 Mark Danks. mark@danks.org - For information on usage and redistribution, and for a DISCLAIMER OF ALL - WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. - ------------------------------------------------------------------*/ - -#ifndef INCLUDE_CPPEXTERN_H_ -#define INCLUDE_CPPEXTERN_H_ - -//#include "Base/config.h" -#include "Base/GemExportDef.h" - -#include "m_pd.h" -//#include "Base/GemVersion.h" - -#include <new> - - -/*----------------------------------------------------------------- -------------------------------------------------------------------- -CLASS - GemException - - an exception class... - -DESCRIPTION - - this is a class, we can throw on creation, - to make sure that the pd-object can not be created - - - ------------------------------------------------------------------*/ -class GEM_EXTERN GemException -{ - public: - GemException() throw(); - GemException(const char*error) throw(); - virtual ~GemException() throw(); - - virtual const char *what() const throw(); - virtual void report() const throw(); - private: - const char*ErrorString; -}; - -class CPPExtern; - -/*----------------------------------------------------------------- -------------------------------------------------------------------- -CLASS - Obj_header - - The obligatory object header - -DESCRIPTION - - This is in a separate struct to assure that when PD uses the - class, the t_object is the very first thing. If it were the - first thing in CPPExtern, then there could be problems with - the vtable. - ------------------------------------------------------------------*/ -struct GEM_EXTERN Obj_header -{ - ////////// - // The obligatory object header - t_object pd_obj; - - ////////// - // Our data structure - CPPExtern *data; -}; - -/*----------------------------------------------------------------- -------------------------------------------------------------------- -CLASS - CPPExtern - - The base class for all externs written in C++ - -DESCRIPTION - - Each extern which is written in C++ needs to use the #defines at the - end of this header file. Currently, the operator new(size_t) and - operator delete(void *) are not overridden. This will be a problem - when PD expects everything to fit in its memory space and control - all memory allocation. - - The define - - CPPEXTERN_HEADER(NEW_CLASS, PARENT_CLASS) - - should be somewhere in your header file. - One of the defines like - - CPPEXTERN_NEW(NEW_CLASS) - CPPEXTERN_NEW_WITH_TWO_ARGS(NEW_CLASS, t_floatarg, A_FLOAT, t_floatarg, A_FLOAT) - - should be the first thing in your implementation file. - NEW_CLASS is the name of your class and PARENT_CLASS is the - parent of your class. - ------------------------------------------------------------------*/ -class GEM_EXTERN CPPExtern -{ - public: - - ////////// - // Constructor - CPPExtern(); - - ////////// - // The Pd header - t_object *x_obj; - - ////////// - // Destructor - virtual ~CPPExtern() = 0; - - ////////// - // Get the object's canvas - t_canvas *getCanvas() { return(m_canvas); } - - ////////// - // This is a holder - don't touch it - static t_object *m_holder; - - ////////// - // my name - static char *m_holdname; - t_symbol *m_objectname; - - protected: - - ////////// - // Creation callback - static void real_obj_setupCallback(t_class *) {} - - private: - - ////////// - // The canvas that the object is in - t_canvas *m_canvas; - - public: - // these call pd's print-functions, and eventually prepend the object's name - void post(const char*format, ...); - void verbose(const int level, const char*format, ...); - void error(const char*format, ...); /* internally uses pd_error() */ - - private: - static bool checkGemVersion(int major, int minor); -}; - -// This has a dummy arg so that NT won't complain -GEM_EXTERN void *operator new(size_t, void *location, void *dummy); - -//////////////////////////////////////// -// This should be used in the header -//////////////////////////////////////// - -#define CPPEXTERN_HEADER(NEW_CLASS, PARENT_CLASS) \ -public: \ -static void obj_freeCallback(void *data) \ -{ CPPExtern *mydata = ((Obj_header *)data)->data; delete mydata; \ - ((Obj_header *)data)->Obj_header::~Obj_header(); } \ -static void real_obj_setupCallback(t_class *classPtr) \ -{ PARENT_CLASS::real_obj_setupCallback(classPtr); \ - NEW_CLASS::obj_setupCallback(classPtr); } \ -private: \ -static inline NEW_CLASS *GetMyClass(void *data) {return((NEW_CLASS *)((Obj_header *)data)->data);} \ -static void obj_setupCallback(t_class *classPtr); - - -//////////////////////////////////////// -// This should be the first thing in the implementation file -//////////////////////////////////////// - -// -// NO ARGUMENTS -///////////////////////////////////////////////// -#define CPPEXTERN_NEW(NEW_CLASS) \ - REAL_NEW(NEW_CLASS) -// -// ONE ARGUMENT -///////////////////////////////////////////////// -#define CPPEXTERN_NEW_WITH_ONE_ARG(NEW_CLASS, TYPE, PD_TYPE) \ - REAL_NEW_WITH_ARG(NEW_CLASS, TYPE, PD_TYPE) -// -// GIMME ARGUMENT -///////////////////////////////////////////////// -#define CPPEXTERN_NEW_WITH_GIMME(NEW_CLASS) \ - REAL_NEW_WITH_GIMME(NEW_CLASS) -// -// TWO ARGUMENTS -///////////////////////////////////////////////// -#define CPPEXTERN_NEW_WITH_TWO_ARGS(NEW_CLASS, TYPE, PD_TYPE, TTWO, PD_TWO) \ - REAL_NEW_WITH_ARG_ARG(NEW_CLASS, TYPE, PD_TYPE, TTWO, PD_TWO) -// -// THREE ARGUMENTS -///////////////////////////////////////////////// -#define CPPEXTERN_NEW_WITH_THREE_ARGS(NEW_CLASS, TYPE, PD_TYPE, TTWO, PD_TWO, TTHREE, PD_THREE) \ - REAL_NEW_WITH_ARG_ARG_ARG(NEW_CLASS, TYPE, PD_TYPE, TTWO, PD_TWO, TTHREE, PD_THREE) -// -// FOUR ARGUMENTS -///////////////////////////////////////////////// -#define CPPEXTERN_NEW_WITH_FOUR_ARGS(NEW_CLASS, TYPE, PD_TYPE, TTWO, PD_TWO, TTHREE, PD_THREE, TFOUR, PD_FOUR) \ - REAL_NEW_WITH_ARG_ARG_ARG_ARG(NEW_CLASS, TYPE, PD_TYPE, TTWO, PD_TWO, TTHREE, PD_THREE, TFOUR, PD_FOUR) -// -// FIVE ARGUMENTS -///////////////////////////////////////////////// -#define CPPEXTERN_NEW_WITH_FIVE_ARGS(NEW_CLASS, TYPE, PD_TYPE, TTWO, PD_TWO, TTHREE, PD_THREE, TFOUR, PD_FOUR, TFIVE, PD_FIVE) \ - REAL_NEW_WITH_ARG_ARG_ARG_ARG_ARG(NEW_CLASS, TYPE, PD_TYPE, TTWO, PD_TWO, TTHREE, PD_THREE, TFOUR, PD_FOUR, TFIVE, PD_FIVE) - - - -////////////////////////////////////////////////////////////////////////////// -// These should never be called or used directly!!! -// -// -/////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -// static class: -// by default classes are declared static -// however, sometimes we need classes not-static, so we can refer to them -// from other classes -/////////////////////////////////////////////////////////////////////////////// -#ifdef NO_STATIC_CLASS -# define STATIC_CLASS -#else -# define STATIC_CLASS static -#endif - -/////////////////////////////////////////////////////////////////////////////// -// auto registering a class -// this creates a dummy class, whose constructor calls the setup-function -// (registering the class with pd) -// a static copy of this class is created at runtime, to actually do the setup-call -/////////////////////////////////////////////////////////////////////////////// -#ifdef NO_AUTO_REGISTER_CLASS -// if NO_AUTO_REGISTER_CLASS is defined, we will not register the class -# define AUTO_REGISTER_CLASS(NEW_CLASS) -#else -// for debugging we can show the which classes are auto-registering -# if 0 -# define POST_AUTOREGISTER(NEW_CLASS) post("auto-registering: "#NEW_CLASS) -# else -# define POST_AUTOREGISTER(NEW_CLASS) -# endif -# define AUTO_REGISTER_CLASS(NEW_CLASS) \ - class NEW_CLASS ## _cppclass { \ - public: \ - NEW_CLASS ## _cppclass() {POST_AUTOREGISTER(NEW_CLASS); NEW_CLASS ## _setup(); } \ -}; \ - static NEW_CLASS ## _cppclass NEW_CLASS ## _instance; -#endif - -/////////////////////////////////////////////////////////////////////////////// -// setting the help-symbol -/////////////////////////////////////////////////////////////////////////////// -#ifndef HELPSYMBOL_BASE -# define HELPSYMBOL_BASE "" -#endif - -#ifdef HELPSYMBOL -# define SET_HELPSYMBOL(NEW_CLASS) \ - class_sethelpsymbol(NEW_CLASS ## _class, gensym(HELPSYMBOL_BASE HELPSYMBOL)) -#else -# define SET_HELPSYMBOL(NEW_CLASS) -#endif /* HELPSYMBOL */ - - -/////////////////////////////////////////////////////////////////////////////// -// setting the class-flags -/////////////////////////////////////////////////////////////////////////////// -#ifndef GEM_CLASSFLAGS -# define GEM_CLASSFLAGS 0 -#endif -/////////////////////////////////////////////////////////////////////////////// -// no args -/////////////////////////////////////////////////////////////////////////////// -#define REAL_NEW(NEW_CLASS) \ -STATIC_CLASS t_class * NEW_CLASS ## _class; \ -static void* create_ ## NEW_CLASS () \ -{ \ - try{ \ - Obj_header *obj = new (pd_new(NEW_CLASS ## _class),(void *)NULL) Obj_header; \ - CPPExtern::m_holder = &obj->pd_obj; \ - CPPExtern::m_holdname=(char*)#NEW_CLASS; \ - obj->data = new NEW_CLASS; \ - CPPExtern::m_holder = NULL; \ - CPPExtern::m_holdname=NULL; \ - return(obj); \ - } catch (GemException e) {e.report(); return NULL;} \ -} \ - extern "C" { \ - void NEW_CLASS ## _setup() \ - { \ - NEW_CLASS ## _class = class_new( \ - gensym(#NEW_CLASS), \ - (t_newmethod)create_ ## NEW_CLASS, \ - (t_method)&NEW_CLASS::obj_freeCallback, \ - sizeof(Obj_header), GEM_CLASSFLAGS, \ - A_NULL); \ - SET_HELPSYMBOL(NEW_CLASS); \ - NEW_CLASS::real_obj_setupCallback(NEW_CLASS ## _class); \ - } \ - } \ - AUTO_REGISTER_CLASS(NEW_CLASS); - - -/////////////////////////////////////////////////////////////////////////////// -// one arg -/////////////////////////////////////////////////////////////////////////////// -#define REAL_NEW_WITH_ARG(NEW_CLASS, VAR_TYPE, PD_TYPE) \ -STATIC_CLASS t_class * NEW_CLASS ## _class; \ -static void* create_ ## NEW_CLASS (VAR_TYPE arg) \ -{ \ - try{ \ - Obj_header *obj = new (pd_new(NEW_CLASS ## _class),(void *)NULL) Obj_header; \ - CPPExtern::m_holder = &obj->pd_obj; \ - CPPExtern::m_holdname=(char*)#NEW_CLASS; \ - obj->data = new NEW_CLASS(arg); \ - CPPExtern::m_holder = NULL; \ - CPPExtern::m_holdname=NULL; \ - return(obj); \ - } catch (GemException e) {e.report(); return NULL;} \ -} \ -extern "C" { \ -void NEW_CLASS ## _setup() \ -{ \ - NEW_CLASS ## _class = class_new( \ - gensym(#NEW_CLASS), \ - (t_newmethod)create_ ## NEW_CLASS, \ - (t_method)&NEW_CLASS::obj_freeCallback, \ - sizeof(Obj_header), GEM_CLASSFLAGS, \ - PD_TYPE, \ - A_NULL); \ - SET_HELPSYMBOL(NEW_CLASS); \ - NEW_CLASS::real_obj_setupCallback(NEW_CLASS ## _class); \ - } \ -} \ - AUTO_REGISTER_CLASS(NEW_CLASS); - -/////////////////////////////////////////////////////////////////////////////// -// gimme arg -/////////////////////////////////////////////////////////////////////////////// -#define REAL_NEW_WITH_GIMME(NEW_CLASS) \ -STATIC_CLASS t_class * NEW_CLASS ## _class; \ -static void* create_ ## NEW_CLASS (t_symbol *s, int argc, t_atom *argv) \ -{ \ - try{ \ - Obj_header *obj = new (pd_new(NEW_CLASS ## _class),(void *)NULL) Obj_header; \ - CPPExtern::m_holder = &obj->pd_obj; \ - CPPExtern::m_holdname=(char*)s->s_name; \ - obj->data = new NEW_CLASS(argc, argv); \ - CPPExtern::m_holder=NULL; \ - CPPExtern::m_holdname=NULL; \ - return(obj); \ - } catch (GemException e) {e.report(); return NULL;} \ -} \ -extern "C" { \ -void NEW_CLASS ## _setup() \ -{ \ - NEW_CLASS ## _class = class_new( \ - gensym(#NEW_CLASS), \ - (t_newmethod)create_ ## NEW_CLASS, \ - (t_method)&NEW_CLASS::obj_freeCallback, \ - sizeof(Obj_header), GEM_CLASSFLAGS, \ - A_GIMME, \ - A_NULL); \ - SET_HELPSYMBOL(NEW_CLASS); \ - NEW_CLASS::real_obj_setupCallback(NEW_CLASS ## _class); \ - } \ -} \ - AUTO_REGISTER_CLASS(NEW_CLASS); - -/////////////////////////////////////////////////////////////////////////////// -// two args -/////////////////////////////////////////////////////////////////////////////// -#define REAL_NEW_WITH_ARG_ARG(NEW_CLASS, ONE_VAR_TYPE, ONE_PD_TYPE, TWO_VAR_TYPE, TWO_PD_TYPE) \ -STATIC_CLASS t_class * NEW_CLASS ## _class; \ -static void* create_ ## NEW_CLASS (ONE_VAR_TYPE arg, TWO_VAR_TYPE argtwo) \ -{ \ - try{ \ - Obj_header *obj = new (pd_new(NEW_CLASS ## _class),(void *)NULL) Obj_header; \ - CPPExtern::m_holder = &obj->pd_obj; \ - CPPExtern::m_holdname=(char*)#NEW_CLASS; \ - obj->data = new NEW_CLASS(arg, argtwo); \ - CPPExtern::m_holder = NULL; \ - CPPExtern::m_holdname=NULL; \ - return(obj); \ - } catch (GemException e) {e.report(); return NULL;} \ -} \ -extern "C" { \ -void NEW_CLASS ## _setup() \ -{ \ - NEW_CLASS ## _class = class_new( \ - gensym(#NEW_CLASS), \ - (t_newmethod)create_ ## NEW_CLASS, \ - (t_method)&NEW_CLASS::obj_freeCallback, \ - sizeof(Obj_header), GEM_CLASSFLAGS, \ - ONE_PD_TYPE, TWO_PD_TYPE, \ - A_NULL); \ - SET_HELPSYMBOL(NEW_CLASS); \ - NEW_CLASS::real_obj_setupCallback(NEW_CLASS ## _class); \ - } \ -} \ - AUTO_REGISTER_CLASS(NEW_CLASS); - -/////////////////////////////////////////////////////////////////////////////// -// three args -/////////////////////////////////////////////////////////////////////////////// -#define REAL_NEW_WITH_ARG_ARG_ARG(NEW_CLASS, ONE_VAR_TYPE, ONE_PD_TYPE, TWO_VAR_TYPE, TWO_PD_TYPE, THREE_VAR_TYPE, THREE_PD_TYPE) \ -STATIC_CLASS t_class * NEW_CLASS ## _class; \ -static void* create_ ## NEW_CLASS (ONE_VAR_TYPE arg, TWO_VAR_TYPE argtwo, THREE_VAR_TYPE argthree) \ -{ \ - try{ \ - Obj_header *obj = new (pd_new(NEW_CLASS ## _class),(void *)NULL) Obj_header; \ - CPPExtern::m_holder = &obj->pd_obj; \ - CPPExtern::m_holdname=(char*)#NEW_CLASS; \ - obj->data = new NEW_CLASS(arg, argtwo, argthree); \ - CPPExtern::m_holder = NULL; \ - CPPExtern::m_holdname=NULL; \ - return(obj); \ - } catch (GemException e) {e.report(); return NULL;} \ -} \ -extern "C" { \ -void NEW_CLASS ## _setup() \ -{ \ - NEW_CLASS ## _class = class_new( \ - gensym(#NEW_CLASS), \ - (t_newmethod)create_ ## NEW_CLASS, \ - (t_method)&NEW_CLASS::obj_freeCallback, \ - sizeof(Obj_header), GEM_CLASSFLAGS, \ - ONE_PD_TYPE, TWO_PD_TYPE, THREE_PD_TYPE, \ - A_NULL); \ - SET_HELPSYMBOL(NEW_CLASS); \ - NEW_CLASS::real_obj_setupCallback(NEW_CLASS ## _class); \ - } \ -} \ - AUTO_REGISTER_CLASS(NEW_CLASS); - -/////////////////////////////////////////////////////////////////////////////// -// four args -/////////////////////////////////////////////////////////////////////////////// -#define REAL_NEW_WITH_ARG_ARG_ARG_ARG(NEW_CLASS, ONE_VAR_TYPE, ONE_PD_TYPE, TWO_VAR_TYPE, TWO_PD_TYPE, THREE_VAR_TYPE, THREE_PD_TYPE, FOUR_VAR_TYPE, FOUR_PD_TYPE) \ -STATIC_CLASS t_class * NEW_CLASS ## _class; \ -static void* create_ ## NEW_CLASS (ONE_VAR_TYPE arg, TWO_VAR_TYPE argtwo, THREE_VAR_TYPE argthree, FOUR_VAR_TYPE argfour) \ -{ \ - try{ \ - Obj_header *obj = new (pd_new(NEW_CLASS ## _class),(void *)NULL) Obj_header; \ - CPPExtern::m_holder = &obj->pd_obj; \ - CPPExtern::m_holdname=(char*)#NEW_CLASS; \ - obj->data = new NEW_CLASS(arg, argtwo, argthree, argfour); \ - CPPExtern::m_holder = NULL; \ - CPPExtern::m_holdname=NULL; \ - return(obj); \ - } catch (GemException e) {e.report(); return NULL;} \ -} \ -extern "C" { \ -void NEW_CLASS ## _setup() \ -{ \ - NEW_CLASS ## _class = class_new( \ - gensym(#NEW_CLASS), \ - (t_newmethod)create_ ## NEW_CLASS, \ - (t_method)&NEW_CLASS::obj_freeCallback, \ - sizeof(Obj_header), GEM_CLASSFLAGS, \ - ONE_PD_TYPE, TWO_PD_TYPE, THREE_PD_TYPE, FOUR_PD_TYPE, \ - A_NULL); \ - SET_HELPSYMBOL(NEW_CLASS); \ - NEW_CLASS::real_obj_setupCallback(NEW_CLASS ## _class); \ - } \ -} \ - AUTO_REGISTER_CLASS(NEW_CLASS); - -/////////////////////////////////////////////////////////////////////////////// -// five args -/////////////////////////////////////////////////////////////////////////////// -#define REAL_NEW_WITH_ARG_ARG_ARG_ARG_ARG(NEW_CLASS, ONE_VAR_TYPE, ONE_PD_TYPE, TWO_VAR_TYPE, TWO_PD_TYPE, THREE_VAR_TYPE, THREE_PD_TYPE, FOUR_VAR_TYPE, FOUR_PD_TYPE, FIVE_VAR_TYPE, FIVE_PD_TYPE) \ -STATIC_CLASS t_class * NEW_CLASS ## _class; \ -static void* create_ ## NEW_CLASS (ONE_VAR_TYPE arg, TWO_VAR_TYPE argtwo, THREE_VAR_TYPE argthree, FOUR_VAR_TYPE argfour, FIVE_VAR_TYPE argfive) \ -{ \ - try{ \ - Obj_header *obj = new (pd_new(NEW_CLASS ## _class),(void *)NULL) Obj_header; \ - CPPExtern::m_holder = &obj->pd_obj; \ - CPPExtern::m_holdname=(char*)#NEW_CLASS; \ - obj->data = new NEW_CLASS(arg, argtwo, argthree, argfour, argfive); \ - CPPExtern::m_holder = NULL; \ - CPPExtern::m_holdname=NULL; \ - return(obj); \ - } catch (GemException e) {e.report(); return NULL;} \ -} \ -extern "C" { \ -void NEW_CLASS ## _setup() \ -{ \ - if(!checkGemVersion(GEM_VERSION_MAJOR, GEM_VERSION_MINOR)) { \ - ::error("[%s] will not be available", #NEW_CLASS); \ - return;} \ - NEW_CLASS ## _class = class_new( \ - gensym(#NEW_CLASS), \ - (t_newmethod)create_ ## NEW_CLASS, \ - (t_method)&NEW_CLASS::obj_freeCallback, \ - sizeof(Obj_header), GEM_CLASSFLAGS, \ - ONE_PD_TYPE, TWO_PD_TYPE, THREE_PD_TYPE, FOUR_PD_TYPE, FIVE_PD_TYPE, \ - A_NULL); \ - SET_HELPSYMBOL(NEW_CLASS); \ - NEW_CLASS::real_obj_setupCallback(NEW_CLASS ## _class); \ - } \ -} \ - AUTO_REGISTER_CLASS(NEW_CLASS); - -#endif // for header file diff --git a/externals/gridflow/bundled/Base/GemBase.h b/externals/gridflow/bundled/Base/GemBase.h deleted file mode 100644 index a5ae3d1e..00000000 --- a/externals/gridflow/bundled/Base/GemBase.h +++ /dev/null @@ -1,133 +0,0 @@ -/*----------------------------------------------------------------- - LOG - GEM - Graphics Environment for Multimedia - - The base class for all of the gem objects - - Copyright (c) 1997-1999 Mark Danks. mark@danks.org - Copyright (c) Günther Geiger. - Copyright (c) 2001-2002 IOhannes m zmoelnig. forum::für::umläute. IEM - For information on usage and redistribution, and for a DISCLAIMER OF ALL - WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. - - -----------------------------------------------------------------*/ - -#ifndef INCLUDE_GEMBASE_H_ -#define INCLUDE_GEMBASE_H_ - -#include "Base/GemGL.h" - -#include "Base/CPPExtern.h" -#include "Base/GemState.h" - -class GemCache; - -/*----------------------------------------------------------------- - ------------------------------------------------------------------- - CLASS - GemBase - - Base class for gem objects - - DESCRIPTION - - -----------------------------------------------------------------*/ -class GEM_EXTERN GemBase : public CPPExtern -{ - protected: - - ////////// - // Constructor - GemBase(); - - ////////// - // Destructor - virtual ~GemBase(); - - ////////// - virtual void render(GemState *state) = 0; - - ////////// - void continueRender(GemState *state); - - ////////// - // After objects below you in the chain have finished. - // You should reset all GEM/OpenGL states here. - virtual void postrender(GemState *) { ; } - - ////////// - // Called when rendering stops - -#if 1/*(jmz) this seems to be for gem2pdp*/ - virtual void stoprender() { realStopRendering(); } -#endif - - ////////// - // If you care about the start of rendering - virtual void startRendering() { ; } - - ////////// - // If you care about the stop of rendering - virtual void stopRendering() { ; } - - - ////////// - // has rendering started ? - bool gem_amRendering; - - ////////// - // If anything in the object has changed - virtual void setModified(); - - ////////// - // Don't mess with this unless you know what you are doing. - GemCache *m_cache; - ////////// - // check whether this object has changed - bool m_modified; - - ////////// - // The outlet - t_outlet *m_out1; - - - ////////// - // this gets called in the before the startRendering() routine - // if it returns TRUE, the object's startRendering(), render() and stopRendering() functions will be called - // it it returns FALSE, the object will be disabled - // when rendering is restarted, this function get's called again - // the default is to enable rendering - // this function is important if you want to disable an object because it cannot be used (e.g. missing driver support) - virtual bool isRunnable(void); - - ////////// - // creation callback - static void real_obj_setupCallback(t_class *classPtr) - { CPPExtern::real_obj_setupCallback(classPtr); GemBase::obj_setupCallback(classPtr); } - - - private: - - void realStopRendering(); - void gem_startstopMess(int state); - void gem_renderMess(GemCache* state, GemState* state2); - - static inline GemBase *GetMyClass(void *data) {return((GemBase *)((Obj_header *)data)->data);} - - friend class gemhead; - static void obj_setupCallback(t_class *classPtr); - static void gem_MessCallback(void *, t_symbol *,int, t_atom*); - static void renderCallback(GemBase *data, GemState *state); - static void postrenderCallback(GemBase *data, GemState *state); -#if 1 /*jmz this seems to be for gem2pdp*/ - static void stoprenderCallback(GemBase *data); //DH -#endif - - /* whether the object is internally disabled or not - * objects are to be disabled, if the system cannot make use of them, e.g. because of unsupported openGL features - */ - bool m_enabled; - -}; - -#endif // for header file diff --git a/externals/gridflow/bundled/Base/GemCache.h b/externals/gridflow/bundled/Base/GemCache.h deleted file mode 100644 index bf6c1e0f..00000000 --- a/externals/gridflow/bundled/Base/GemCache.h +++ /dev/null @@ -1,69 +0,0 @@ -/*----------------------------------------------------------------- -LOG - GEM - Graphics Environment for Multimedia - - The state to pass among GEM objects - - Copyright (c) 1997-1999 Mark Danks. mark@danks.org - Copyright (c) Günther Geiger. geiger@epy.co.at - Copyright (c) 2001-2002 IOhannes m zmoelnig. forum::für::umläute. IEM. zmoelnig@iem.kug.ac.at - For information on usage and redistribution, and for a DISCLAIMER OF ALL - WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. - ------------------------------------------------------------------*/ - -#ifndef INCLUDE_GEMCACHE_H_ -#define INCLUDE_GEMCACHE_H_ - -#include "Base/GemExportDef.h" - -class gemhead; - -/*----------------------------------------------------------------- -------------------------------------------------------------------- -CLASS - GemCache - - The cache to pass among GEM objects - -DESCRIPTION - ------------------------------------------------------------------*/ -#define GEMCACHE_MAGIC 0x1234567 -class GEM_EXTERN GemCache -{ - public: - - ////////// - // Constructor - GemCache(gemhead *parent); - - ////////// - // Destructor - ~GemCache(); - - ////////// - // Was a modification made which will void a display list? - int dirty; - - ////////// - // Should the image be resent? - int resendImage; - - ////////// - // has the Vertex-Array changed? - int vertexDirty; - - ////////// - // re-set (like creation, but without instantiating - void reset(gemhead*parent); - - ////////// - gemhead *m_parent; - - ////////// - // indicates a valid cache - int m_magic; -}; - -#endif // for header file diff --git a/externals/gridflow/bundled/Base/GemEvent.h b/externals/gridflow/bundled/Base/GemEvent.h deleted file mode 100644 index a7ce1f48..00000000 --- a/externals/gridflow/bundled/Base/GemEvent.h +++ /dev/null @@ -1,156 +0,0 @@ -/*----------------------------------------------------------------- -LOG - GEM - Graphics Environment for Multimedia - - get keyboard/mouse/tablet callbacks - - Copyright (c) 1997-1999 Mark Danks. mark@danks.org - Copyright (c) Günther Geiger. geiger@epy.co.at - Copyright (c) 2001-2002 IOhannes m zmoelnig. forum::für::umläute. IEM. zmoelnig@iem.kug.ac.at - For information on usage and redistribution, and for a DISCLAIMER OF ALL - WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. - ------------------------------------------------------------------*/ - -#ifndef INCLUDE_GEMEVENT_H_ -#define INCLUDE_GEMEVENT_H_ - -#include "Base/GemExportDef.h" -//#include "Base/CPPExtern.h" - -////////////////////////////////////////////////////////////////// -// -// Mouse motion callback -// -////////////////////////////////////////////////////////////////// -typedef void (*MOTION_CB)(int, int, void *); -////////// -// Set a mouse motion callback -GEM_EXTERN extern void setMotionCallback(MOTION_CB callback, void *data); - -////////// -// Remove a mouse motion callback -GEM_EXTERN extern void removeMotionCallback(MOTION_CB callback, void *data); - - -////////////////////////////////////////////////////////////////// -// -// Mouse button callback -// -////////////////////////////////////////////////////////////////// -typedef void (*BUTTON_CB)(int, int, int, int, void *); -////////// -// Set a button callback -// which == 0 == left -// which == 1 == middle -// which == 2 == right -GEM_EXTERN extern void setButtonCallback(BUTTON_CB callback, void *data); - -////////// -// Remove a button callback -GEM_EXTERN extern void removeButtonCallback(BUTTON_CB callback, void *data); - - -////////////////////////////////////////////////////////////////// -// -// Mouse wheel callback -// -////////////////////////////////////////////////////////////////// -typedef void (*WHEEL_CB)(int, int, void *); -////////// -// Set a wheel callback -GEM_EXTERN extern void setWheelCallback(WHEEL_CB callback, void *data); - -////////// -// Remove a wheel callback -GEM_EXTERN extern void removeWheelCallback(WHEEL_CB callback, void *data); - - -////////////////////////////////////////////////////////////////// -// -// Tablet motion callback -// -////////////////////////////////////////////////////////////////// -typedef void (*TABMOTION_CB)(int, int, float, void *); -////////// -// Set a tablet motion callback -GEM_EXTERN extern void setTabletMotionCallback(TABMOTION_CB callback, void *data); - -////////// -// Remove a tablet motion callback -GEM_EXTERN extern void removeTabletMotionCallback(TABMOTION_CB callback, void *data); - - -////////////////////////////////////////////////////////////////// -// -// Tablet rotation callback -// -////////////////////////////////////////////////////////////////// -typedef void (*TABROTATION_CB)(int, int, int, void *); -////////// -// Set a tablet rotation callback -GEM_EXTERN extern void setTabletRotationCallback(TABROTATION_CB callback, void *data); - -////////// -// Remove a tablet rotation callback -GEM_EXTERN extern void removeTabletRotationCallback(TABROTATION_CB callback, void *data); - - -////////////////////////////////////////////////////////////////// -// -// Tablet button callback -// -////////////////////////////////////////////////////////////////// -typedef void (*TABBUTTON_CB)(int, int, int, int, void *); -////////// -// Set a tablet button callback -// which == 0 == left -// which == 1 == middle -// which == 2 == right -GEM_EXTERN extern void setTabletButtonCallback(TABBUTTON_CB callback, void *data); - -////////// -// Remove a tablet button callback -GEM_EXTERN extern void removeTabletButtonCallback(TABBUTTON_CB callback, void *data); - -////////////////////////////////////////////////////////////////// -// -// Keyboard callback -// -////////////////////////////////////////////////////////////////// -typedef void (*KEYBOARD_CB)(char *,int, int, void *); -////////// -// Set a keyboard callback -GEM_EXTERN extern void setKeyboardCallback(KEYBOARD_CB callback, void *data); - -////////// -// Remove a keyboard callback -GEM_EXTERN extern void removeKeyboardCallback(KEYBOARD_CB callback, void *data); - -////////////////////////////////////////////////////////////////// -// -// Resize callback -// -////////////////////////////////////////////////////////////////// -typedef void (*RESIZE_CB)(int, int, void *); -////////// -// Set a resize callback -GEM_EXTERN extern void setResizeCallback(RESIZE_CB callback, void *data); - -////////// -// Remove a resize callback -GEM_EXTERN extern void removeResizeCallback(RESIZE_CB callback, void *data); - -////////// -// Trigger an event -GEM_EXTERN extern void triggerMotionEvent(int x, int y); -GEM_EXTERN extern void triggerButtonEvent(int which, int state, int x, int y); -GEM_EXTERN extern void triggerWheelEvent(int axis, int value); -GEM_EXTERN extern void triggerTabletMotionEvent(int x, int y, float pressure); -GEM_EXTERN extern void triggerTabletRotationEvent(int az, int alt, int twist); -GEM_EXTERN extern void triggerTabletButtonEvent(int which, int state, int x, int y); -GEM_EXTERN extern void triggerKeyboardEvent(char *string, int value, int state); -GEM_EXTERN extern void triggerResizeEvent(int xSize, int ySize); - -#endif // for header file - diff --git a/externals/gridflow/bundled/Base/GemExportDef.h b/externals/gridflow/bundled/Base/GemExportDef.h deleted file mode 100644 index 26b07655..00000000 --- a/externals/gridflow/bundled/Base/GemExportDef.h +++ /dev/null @@ -1,40 +0,0 @@ -/*----------------------------------------------------------------- -LOG - GEM - Graphics Environment for Multimedia - - Export crap - - Copyright (c) 1997-1999 Mark Danks. mark@danks.org - Copyright (c) Günther Geiger. geiger@epy.co.at - Copyright (c) 2001-2002 IOhannes m zmoelnig. forum::für::umläute. IEM. zmoelnig@iem.kug.ac.at - For information on usage and redistribution, and for a DISCLAIMER OF ALL - WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. - ------------------------------------------------------------------*/ - -#ifndef INCLUDE_GEMEXPORTDEF_H_ -#define INCLUDE_GEMEXPORTDEF_H_ - -#ifdef _MSC_VER - -/* turn of some warnings on vc-compilers */ -# pragma warning( disable : 4244 ) -# pragma warning( disable : 4305 ) -# pragma warning( disable : 4091 ) -// "switch" without "case" (just "default") -# pragma warning( disable : 4065 ) - -// Windows requires explicit import and exporting of functions and classes. -// While this is a pain to do sometimes, in large software development -// projects, it is very usefull. -#ifdef GEM_INTERNAL // GEM exporting things -#define GEM_EXTERN __declspec(dllexport) -#else // other's importing -#define GEM_EXTERN __declspec(dllimport) -#endif // for GEM_INTERNAL - -#else // other OS's -#define GEM_EXTERN -#endif - -#endif // for header file diff --git a/externals/gridflow/bundled/Base/GemFuncUtil.h b/externals/gridflow/bundled/Base/GemFuncUtil.h deleted file mode 100644 index 70a28f51..00000000 --- a/externals/gridflow/bundled/Base/GemFuncUtil.h +++ /dev/null @@ -1,362 +0,0 @@ -/*----------------------------------------------------------------- -LOG - GEM - Graphics Environment for Multimedia - - GemFuncUtil.h - - contains functions for graphics - - part of GEM - - Copyright (c) 1997-2000 Mark Danks. mark@danks.org - Copyright (c) Günther Geiger. geiger@epy.co.at - Copyright (c) 2001-2002 IOhannes m zmoelnig. forum::für::umläute. IEM. zmoelnig@iem.kug.ac.at - For information on usage and redistribution, and for a DISCLAIMER OF ALL - WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. - ------------------------------------------------------------------*/ - -#ifndef INCLUDE_GEMFUNCUTIL_H_ -#define INCLUDE_GEMFUNCUTIL_H_ - -#ifdef __APPLE__ -#include <Carbon/Carbon.h> -#endif - -#include "Base/GemExportDef.h" - -/* this should be included for ALL platforms: - * should we define __MMX__ for windows in there ? - */ -#include "config.h" -#include "GemSIMD.h" -#include "GemMath.h" - - -// for rand() -#include <stdlib.h> - -/////////////////////////////////////////////////////////////////////////////// -// powerOfTwo -// get the next higher 2^n-number (if value is'nt 2^n by itself) -/////////////////////////////////////////////////////////////////////////////// -inline int powerOfTwo(int value) -{ -/* - int x = 1; - // while(x <= value) x <<= 1; - while(x < value) x <<= 1; - return(x); -*/ -// optimization from "Hacker's Delight" -// - above loop executes in 4n+3 instructions, where n is the power of 2 of returned int -// - below code is branch-free and only 12 instructions! - value = value - 1; - value = value | (value >> 1); - value = value | (value >> 2); - value = value | (value >> 4); - value = value | (value >> 8); - value = value | (value >> 16); - return (value + 1); -} - -/////////////////////////////////////////////////////////////////////////////// -// min/max functions -// -/////////////////////////////////////////////////////////////////////////////// -#ifndef MIN -inline int MIN(int x, int y) { return (x<y)?x:y; } -inline float MIN(float x, float y) { return (x<y)?x:y; } -#endif -#ifndef MAX -inline int MAX(int x, int y) { return (x>y)?x:y; } -inline float MAX(float x, float y) { return (x>y)?x:y; } -#endif - -inline unsigned char TRI_MAX(unsigned char v1, unsigned char v2, unsigned char v3){ - if (v1 > v2 && v1 > v3) return(v1); - if (v2 > v3) return(v2); - return(v3); -} -inline unsigned char TRI_MIN(unsigned char v1, unsigned char v2, unsigned char v3){ - if (v1 < v2 && v1 < v3) return(v1); - if (v2 < v3) return(v2); - return(v3); -} - -/////////////////////////////////////////////////////////////////////////////// -// Clamp functions -// -/////////////////////////////////////////////////////////////////////////////// -////////// -// Clamp a value high -inline unsigned char CLAMP_HIGH(int x) - { return((unsigned char )((x > 255) ? 255 : x)); } - -////////// -// Clamp a value low -inline unsigned char CLAMP_LOW(int x) - { return((unsigned char )((x < 0) ? 0 : x)); } - -////////// -// Clamp an int to the range of an unsigned char -inline unsigned char CLAMP(int x) - { return((unsigned char)((x > 255) ? 255 : ( (x < 0) ? 0 : x))); } - -////////// -// Clamp a float to the range of an unsigned char -inline unsigned char CLAMP(float x) - { return((unsigned char)((x > 255.f) ? 255.f : ( (x < 0.f) ? 0.f : x))); } - -////////// -// Clamp a float to 0. <= x <= 1.0 -inline float FLOAT_CLAMP(float x) - { return((x > 1.f) ? 1.f : ( (x < 0.f) ? 0.f : x)); } - -///////// -// Clamp the Y channel of YUV (16%235) -inline unsigned char CLAMP_Y(int x) - { return((unsigned char)((x > 235) ? 235 : ( (x < 16) ? 16 : x))); } - -/////////////////////////////////////////////////////////////////////////////// -// Multiply and interpolation -// -/////////////////////////////////////////////////////////////////////////////// -////////// -// Exactly multiply two unsigned chars -// This avoids a float value (important on Intel...) -// From Alvy Ray Smith paper -inline unsigned char INT_MULT(unsigned int a, unsigned int b) - { int t = (unsigned int)a * (unsigned int)b + 0x80; - return((unsigned char)(((t >> 8) + t) >> 8)); } - -////////// -// Exactly LERPs two values -// This avoids a float value (important on Intel...) -// From Alvy Ray Smith paper -inline unsigned char INT_LERP(unsigned int p, unsigned int q, unsigned int a) - { return((unsigned char)(p + INT_MULT(a, q - p))); } - -////////// -// Floating point LERP -inline float FLOAT_LERP(float p, float q, float a) - { return( a * (q - p) + p); } - - -/////////////////////////////////////////////////////////////////////////////// -// Step function -// -/////////////////////////////////////////////////////////////////////////////// -inline int stepFunc(float x, float a) - { return(x >= a); } -inline int stepFunc(int x, int a) - { return(x >= a); } -inline int stepFunc(unsigned char x, unsigned char a) - { return(x >= a); } - -/////////////////////////////////////////////////////////////////////////////// -// Pulse function -// -/////////////////////////////////////////////////////////////////////////////// -inline int pulseFunc(float x, float a, float b) - { return(stepFunc(a, x) - stepFunc(b, x)); } -inline int pulseFunc(int x, int a, int b) - { return(stepFunc(a, x) - stepFunc(b, x)); } -inline int pulseFunc(unsigned char x, unsigned char a, unsigned char b) - { return(stepFunc(a, x) - stepFunc(b, x)); } - - -/////////////////////////////////////////////////////////////////////////////// -// Clamp function -// -/////////////////////////////////////////////////////////////////////////////// -inline float clampFunc(float x, float a, float b) - { return(x < a ? a : (x > b ? b : x)); } -inline int clampFunc(int x, int a, int b) - { return(x < a ? a : (x > b ? b : x)); } -inline unsigned char clampFunc(unsigned char x, unsigned char a, unsigned char b) - { return(x < a ? a : (x > b ? b : x)); } -inline void* clampFunc(void* x, void* a, void* b) - { return(x < a ? a : (x > b ? b : x)); } -/* - inline int GateInt(int nValue,int nMin,int nMax) - inline float GateFlt(float nValue,float nMin,float nMax) - inline void* GatePtr(void* pValue,void* pMin,void* pMax) -*/ - - -/////////////////////////////////////////////////////////////////////////////// -// absolute integer -// -/////////////////////////////////////////////////////////////////////////////// -inline int AbsInt(int inValue) { return (inValue>0)?inValue:-inValue; } -static inline int GetSign(int inValue) { return (inValue<0)?-1:1; } - -/////////////////////////////////////////////////////////////////////////////// -// wrapping functions for integers -// -/////////////////////////////////////////////////////////////////////////////// - -inline int GetTiled(int inValue,const int nMax) { - int nOutValue=(inValue%nMax); - if (nOutValue<0)nOutValue=((nMax-1)+nOutValue); - return nOutValue; -} - -inline int GetMirrored(int inValue,const int nMax) { - const int nTwoMax=(nMax*2); - int nOutValue=GetTiled(inValue,nTwoMax); - if (nOutValue>=nMax)nOutValue=((nTwoMax-1)-nOutValue); - return nOutValue; -} - - -/////////////////////////////////////////////////////////////////////////////// -// 2D-algebra -// -/////////////////////////////////////////////////////////////////////////////// -static inline void Get2dTangent(float inX,float inY,float* poutX,float* poutY) { - *poutX=inY; - *poutY=-inX; -} -/////////////////////////////////////////////////////////////////////////////// -// 2D-dot product -/////////////////////////////////////////////////////////////////////////////// -static inline float Dot2d(float Ax,float Ay,float Bx,float By) { - return ((Ax*Bx)+(Ay*By)); -} -/////////////////////////////////////////////////////////////////////////////// -// 2D-vector normalization -/////////////////////////////////////////////////////////////////////////////// -static inline void Normalise2d(float* pX,float* pY) { - const float MagSqr=Dot2d(*pX,*pY,*pX,*pY); - float Magnitude=(float)sqrt(MagSqr); - if (Magnitude<=0.0f) { - Magnitude=0.001f; - } - const float RecipMag=1.0f/Magnitude; - - *pX*=RecipMag; - *pY*=RecipMag; -} - -/////////////////////////////////////////////////////////////////////////////// -// higher algebra -// -/////////////////////////////////////////////////////////////////////////////// -inline float GetRandomFloat(void) { - return rand()/static_cast<float>(RAND_MAX); -} - - -/////////////////////////////////////////////////////////////////////////////// -// Smooth step function (3x^2 - 2x^3) -// -/////////////////////////////////////////////////////////////////////////////// -GEM_EXTERN extern float smoothStep(float x, float a, float b); -GEM_EXTERN extern int smoothStep(int x, int a, int b); -GEM_EXTERN extern unsigned char smoothStep(unsigned char x, unsigned char a, unsigned char b); - -/////////////////////////////////////////////////////////////////////////////// -// Bias function -// -// Remap unit interval (curve) -// If a == 0.5, then is linear mapping. -/////////////////////////////////////////////////////////////////////////////// -GEM_EXTERN extern float biasFunc(float x, float a); - -/////////////////////////////////////////////////////////////////////////////// -// Gain function -// -// Remap unit interval (S-curve) -// Will always return 0.5 when x is 0.5 -// If a == 0.5, then is linear mapping. -/////////////////////////////////////////////////////////////////////////////// -GEM_EXTERN extern float gainFunc(float x, float a); - -/////////////////////////////////////////////////////////////////////////////// -// Linear function -// -// val should be 0 <= val <= 1. -// ret should point at a float of enough dimensions to hold the returned value -// For instance, numDimen == 2, should have a ret[2] -// numDimen is the number of dimensions to compute -// npnts is the number of points per dimension. -// -/////////////////////////////////////////////////////////////////////////////// -GEM_EXTERN extern void linearFunc(float val, float *ret, int numDimen, int npnts, float *pnts); - -/////////////////////////////////////////////////////////////////////////////// -// Spline function -// -// val should be 0 <= val <= 1. -// ret should point at a float of enough dimensions to hold the returned value -// For instance, numDimen == 2, should have a ret[2] -// numDimen is the number of dimensions to compute -// nknots is the number of knots per dimension. -// There must be at least four knots! -// -// Thanks to -// _Texturing and Modeling: A Procedural Approach_ -// David S. Ebert, Ed. -/////////////////////////////////////////////////////////////////////////////// -GEM_EXTERN extern void splineFunc(float val, float *ret, int numDimen, int nknots, float *knot); - - -/////////////////////////////////////////////////////////////////////////////// -// Pixel access functions -// -/////////////////////////////////////////////////////////////////////////////// -// -// Accelerated Pixel Manipulations -// This is sort on a vector operation on 8 chars at the same time .... could be -// implemented in MMX -// Alpha channel is not added !! (would be nr 3 and 7) - -#define ADD8_NOALPHA(a,b) \ - ((unsigned char*)(a))[0] = CLAMP_HIGH((int)((unsigned char*)(a))[0] + ((unsigned char*)(b))[0]);\ - ((unsigned char*)(a))[1] = CLAMP_HIGH((int)((unsigned char*)(a))[1] + ((unsigned char*)(b))[1]);\ - ((unsigned char*)(a))[2] = CLAMP_HIGH((int)((unsigned char*)(a))[2] + ((unsigned char*)(b))[2]);\ - ((unsigned char*)(a))[4] = CLAMP_HIGH((int)((unsigned char*)(a))[4] + ((unsigned char*)(b))[4]);\ - ((unsigned char*)(a))[5] = CLAMP_HIGH((int)((unsigned char*)(a))[5] + ((unsigned char*)(b))[5]);\ - ((unsigned char*)(a))[6] = CLAMP_HIGH((int)((unsigned char*)(a))[6] + ((unsigned char*)(b))[6]);\ - -#define SUB8_NOALPHA(a,b) \ - ((unsigned char*)(a))[0] = CLAMP_LOW((int)((unsigned char*)(a))[0] - ((unsigned char*)(b))[0]);\ - ((unsigned char*)(a))[1] = CLAMP_LOW((int)((unsigned char*)(a))[1] - ((unsigned char*)(b))[1]);\ - ((unsigned char*)(a))[2] = CLAMP_LOW((int)((unsigned char*)(a))[2] - ((unsigned char*)(b))[2]);\ - ((unsigned char*)(a))[4] = CLAMP_LOW((int)((unsigned char*)(a))[4] - ((unsigned char*)(b))[4]);\ - ((unsigned char*)(a))[5] = CLAMP_LOW((int)((unsigned char*)(a))[5] - ((unsigned char*)(b))[5]);\ - ((unsigned char*)(a))[6] = CLAMP_LOW((int)((unsigned char*)(a))[6] - ((unsigned char*)(b))[6]);\ - -#define ADD8(a,b) \ - ((unsigned char*)(a))[0] = CLAMP_HIGH((int)((unsigned char*)(a))[0] + ((unsigned char*)(b))[0]);\ - ((unsigned char*)(a))[1] = CLAMP_HIGH((int)((unsigned char*)(a))[1] + ((unsigned char*)(b))[1]);\ - ((unsigned char*)(a))[2] = CLAMP_HIGH((int)((unsigned char*)(a))[2] + ((unsigned char*)(b))[2]);\ - ((unsigned char*)(a))[3] = CLAMP_HIGH((int)((unsigned char*)(a))[3] + ((unsigned char*)(b))[3]);\ - ((unsigned char*)(a))[4] = CLAMP_HIGH((int)((unsigned char*)(a))[4] + ((unsigned char*)(b))[4]);\ - ((unsigned char*)(a))[5] = CLAMP_HIGH((int)((unsigned char*)(a))[5] + ((unsigned char*)(b))[5]);\ - ((unsigned char*)(a))[6] = CLAMP_HIGH((int)((unsigned char*)(a))[6] + ((unsigned char*)(b))[6]);\ - ((unsigned char*)(a))[7] = CLAMP_HIGH((int)((unsigned char*)(a))[7] + ((unsigned char*)(b))[7]);\ - -#define SUB8(a,b) \ - ((unsigned char*)(a))[0] = CLAMP_LOW((int)((unsigned char*)(a))[0] - ((unsigned char*)(b))[0]);\ - ((unsigned char*)(a))[1] = CLAMP_LOW((int)((unsigned char*)(a))[1] - ((unsigned char*)(b))[1]);\ - ((unsigned char*)(a))[2] = CLAMP_LOW((int)((unsigned char*)(a))[2] - ((unsigned char*)(b))[2]);\ - ((unsigned char*)(a))[3] = CLAMP_LOW((int)((unsigned char*)(a))[3] - ((unsigned char*)(b))[3]);\ - ((unsigned char*)(a))[4] = CLAMP_LOW((int)((unsigned char*)(a))[4] - ((unsigned char*)(b))[4]);\ - ((unsigned char*)(a))[5] = CLAMP_LOW((int)((unsigned char*)(a))[5] - ((unsigned char*)(b))[5]);\ - ((unsigned char*)(a))[6] = CLAMP_LOW((int)((unsigned char*)(a))[6] - ((unsigned char*)(b))[6]);\ - ((unsigned char*)(a))[7] = CLAMP_LOW((int)((unsigned char*)(a))[7] - ((unsigned char*)(b))[7]);\ - - - -#ifdef __APPLE__ -//Ian Ollman's function to determine the cache prefetch for altivec vec_dst() -inline UInt32 GetPrefetchConstant( int blockSizeInVectors, int blockCount, int blockStride ) -{ - return ((blockSizeInVectors << 24) & 0x1F000000) | ((blockCount << 16) & 0x00FF0000) | (blockStride & 0xFFFF); -} -#endif - - -#endif // for header file - diff --git a/externals/gridflow/bundled/Base/GemGL.h b/externals/gridflow/bundled/Base/GemGL.h deleted file mode 100644 index 24d6fe99..00000000 --- a/externals/gridflow/bundled/Base/GemGL.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * GemGL: openGL includes for GEM - * - * include this file if you want to include the - * openGL-headers installed on your system - * - * tasks: - * - * + this file hides the peculiarities of the various platforms - * (like "OpenGL/gl.h" vs "GL/gl.h") - * - * + define some pre-processor defines that are missing in the GL-headers - * - * + try to exclude parts of the GL-headers based on config.h - * - */ - - -#ifndef INCLUDE_GEMGL_H_ -#define INCLUDE_GEMGL_H_ - -#include "config.h" - -// I hate Microsoft...I shouldn't have to do this! -#ifdef __WIN32__ -# include <windows.h> -#endif - -#define GLEW_STATIC -//#include "Base/glew.h" -#ifdef __APPLE__ -typedef signed long GLint; -typedef unsigned long GLenum; -#else -typedef signed int GLint; -typedef unsigned int GLenum; -#endif -typedef float GLfloat; -typedef unsigned char GLboolean; -#define GL_RGBA_MODE 0x0C31 -#define GL_UNSIGNED_BYTE 0x1401 -#define GL_RGBA 0x1908 - - -#ifdef __APPLE__ -# include <OpenGL/OpenGL.h> -#elif defined __WIN32__ -# include "Base/wglew.h" -#elif defined __linux__ - -#endif /* OS */ - -#ifndef GL_YUV422_GEM -# define GL_YCBCR_422_GEM GL_YCBCR_422_APPLE -# define GL_YUV422_GEM GL_YCBCR_422_GEM -#endif /* GL_YUV422_GEM */ - - -#ifndef GL_RGBA_GEM -# ifdef __APPLE__ -# define GL_RGBA_GEM GL_BGRA_EXT -# else -# define GL_RGBA_GEM GL_RGBA -# endif -#endif /* GL_RGBA_GEM */ - -/* default draw-style */ -#ifndef GL_DEFAULT_GEM -# define GL_DEFAULT_GEM 0xFFFF -#endif - -#endif /* INCLUDE_GEMGL_H_ */ diff --git a/externals/gridflow/bundled/Base/GemGLUtil.h b/externals/gridflow/bundled/Base/GemGLUtil.h deleted file mode 100644 index 9c5402f9..00000000 --- a/externals/gridflow/bundled/Base/GemGLUtil.h +++ /dev/null @@ -1,29 +0,0 @@ -/*----------------------------------------------------------------- -LOG - GEM - Graphics Environment for Multimedia - - GemGLUtil.h - - contains functions for graphics - - part of GEM - - Copyright (c) 1997-2000 Mark Danks. mark@danks.org - Copyright (c) Günther Geiger. geiger@epy.co.at - Copyright (c) 2001-2002 IOhannes m zmoelnig. forum::für::umläute. IEM. zmoelnig@iem.kug.ac.at - For information on usage and redistribution, and for a DISCLAIMER OF ALL - WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. - ------------------------------------------------------------------*/ - -#ifndef INCLUDE_GEMGLUTIL_H_ -#define INCLUDE_GEMGLUTIL_H_ - -#include "Base/GemBase.h" -#include "Base/GemExportDef.h" - -GEM_EXTERN extern GLenum glReportError (void); -GEM_EXTERN extern int getGLdefine(char *name); -GEM_EXTERN extern int getGLdefine(t_symbol *name); -GEM_EXTERN extern int getGLdefine(t_atom *name); -GEM_EXTERN extern int getGLbitfield(int argc, t_atom *argv); -#endif // for header file - diff --git a/externals/gridflow/bundled/Base/GemGluObj.h b/externals/gridflow/bundled/Base/GemGluObj.h deleted file mode 100644 index 524ba4b4..00000000 --- a/externals/gridflow/bundled/Base/GemGluObj.h +++ /dev/null @@ -1,96 +0,0 @@ -/*----------------------------------------------------------------- -LOG - GEM - Graphics Environment for Multimedia - - A Glu object - - Copyright (c) 1997-2000 Mark Danks. mark@danks.org - Copyright (c) Günther Geiger. geiger@epy.co.at - Copyright (c) 2001-2002 IOhannes m zmoelnig. forum::für::umläute. IEM. zmoelnig@iem.kug.ac.at - For information on usage and redistribution, and for a DISCLAIMER OF ALL - WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. - ------------------------------------------------------------------*/ - -#ifndef INCLUDE_GEMGLUOBJ_H_ -#define INCLUDE_GEMGLUOBJ_H_ - -// I hate Microsoft...I shouldn't have to do this! -#ifdef __WIN32__ -#include <windows.h> -#endif - -#include <string.h> - - -#include <math.h> -#ifndef M_PI -# define M_PI (3.1415926) -#endif - -#include "Base/GemShape.h" - -#ifndef GLU_SILHOUETTE -# define GLU_SILHOUETTE 0 -#endif - -/*----------------------------------------------------------------- -------------------------------------------------------------------- -CLASS - GemGluObj - - A Glu object - -DESCRIPTION - - Inlet for an int - "in2" - - "in2" - the number of slices in the object - ------------------------------------------------------------------*/ -class GEM_EXTERN GemGluObj : public GemShape -{ - public: - - ////////// - // Constructor - GemGluObj(t_floatarg size, t_floatarg slices=10.f, t_floatarg stacks=0.f); - - protected: - - ////////// - // Destructor - virtual ~GemGluObj(); - - ////////// - // How the object should be drawn - virtual void typeMess(t_symbol *type); - - ////////// - // The number of slices in the quadric - void numSlicesMess(int numSlices); - void numSlicesMess(int numSlices, int numStacks); - - ////////// - // The number of slices - int m_numSlices, m_numStacks; - - ////////// - t_inlet *m_sliceInlet; - - ////////// - // creation callback - static void real_obj_setupCallback(t_class *classPtr) - { GemShape::real_obj_setupCallback(classPtr); GemGluObj::obj_setupCallback(classPtr); } - - private: - - static inline GemGluObj *GetMyClass(void *data) {return((GemGluObj *)((Obj_header *)data)->data);} - - ////////// - // Static member functions - static void obj_setupCallback(t_class *classPtr); - static void numSlicesMessCallback(void *data, t_symbol*, int, t_atom*); -}; - -#endif // for header file diff --git a/externals/gridflow/bundled/Base/GemLoadObj.h b/externals/gridflow/bundled/Base/GemLoadObj.h deleted file mode 100644 index 9e4c9625..00000000 --- a/externals/gridflow/bundled/Base/GemLoadObj.h +++ /dev/null @@ -1,28 +0,0 @@ -/*----------------------------------------------------------------- -LOG - GEM - Graphics Environment for Multimedia - - - loads in an alias|wavefront model file - - Copyright (c) 1997-1999 Mark Danks. mark@danks.org - Copyright (c) Günther Geiger. geiger@epy.co.at - Copyright (c) 2001-2002 IOhannes m zmoelnig. forum::für::umläute. IEM. zmoelnig@iem.kug.ac.at - For information on usage and redistribution, and for a DISCLAIMER OF ALL - WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. - ------------------------------------------------------------------*/ - -#ifndef INCLUDE_GEMLOADOBJ_H_ -#define INCLUDE_GEMLOADOBJ_H_ - -#include "Base/GemExportDef.h" - -class GemModelData; - -////////// -// Load in an alias|wavefront model -// [out] GemModel * - equals NULL if failure -GEM_EXTERN extern GemModelData *loadWaveFrontModel(const char *filename); - - -#endif diff --git a/externals/gridflow/bundled/Base/GemMan.h b/externals/gridflow/bundled/Base/GemMan.h deleted file mode 100644 index 351429be..00000000 --- a/externals/gridflow/bundled/Base/GemMan.h +++ /dev/null @@ -1,257 +0,0 @@ -/*----------------------------------------------------------------- - LOG - GEM - Graphics Environment for Multimedia - - The base functions and structures - Also includes gemwin header file - - Copyright (c) 1997-2000 Mark Danks.mark@danks.org - Copyright (c) Günther Geiger. geiger@epy.co.at - Copyright (c) 2001-2002 IOhannes m zmoelnig. forum::für::umläute. IEM. zmoelnig@iem.kug.ac.at - For information on usage and redistribution, and for a DISCLAIMER OF ALL - WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. - - -----------------------------------------------------------------*/ - -#ifndef INCLUDE_GEMMAN_H_ -#define INCLUDE_GEMMAN_H_ - -#include "Base/GemGL.h" -#include "Base/GemGLUtil.h" - -#ifdef __APPLE__ -# include <Carbon/Carbon.h> -# include <AGL/agl.h> -#endif // __APPLE__ - -#ifdef __WIN32__ -# include <QTML.h> -# include <Movies.h> -#endif - -#include "Base/GemExportDef.h" - -class gemhead; -class gemheadLink; -class GemState; -class WindowInfo; - -/*----------------------------------------------------------------- - ------------------------------------------------------------------- - CLASS - GemMan - - A static class to create windows, etc. - - DESCRIPTION - - -----------------------------------------------------------------*/ -class GEM_EXTERN GemMan -{ - public: - - ////////// - // Should only be called once (usually by GemSetup) - static void initGem(void); - - ////////// - static void addObj(gemhead *obj, int priority); - - ////////// - static void removeObj(gemhead *obj, int priority); - - ////////// - // Is there a window. - static int windowExists(void); - - ////////// - // Are we rendering. - static int getRenderState(void); - - ////////// - // is there a context (has its meaning under X) - static void createContext(char* disp); - static int contextExists(void); - - ////////// - // If an object needs to know if the window changed. - // This is important for display lists. - static int windowNumber(void); - - ////////// - // reset to the initial state - static void resetState(void); - - ////////// - // Just send out one frame (if double buffered, will swap buffers) - static void render(void *); - static void renderChain(gemheadLink *head, GemState *state); - - - ////////// - // Start a clock to do rendering. - static void startRendering(void); - - ////////// - // Stop the clock to do rendering. - static void stopRendering(void); - - ////////// - // Create the window with the current parameters - static int createWindow(char* disp = 0); - - ////////// - // Destroy the window - static void destroyWindow(void); - // Destroy the window after a minimal delay - static void destroyWindowSoon(void); - - ////////// - // Swap the buffers. - // If single buffered, just clears the window - static void swapBuffers(void); - - ////////// - // Set the frame rate - static void frameRate(float framespersecond); - ////////// - // Get the frame rate - static float getFramerate(void); - - static int getProfileLevel(void); - - static void getDimen(int*width, int*height); - static void getRealDimen(int*width, int*height); - static void getOffset(int*x, int*y); - - ////////// - // Turn on/off lighting - static void lightingOnOff(int state); - - ////////// - // Turn on/off cursor - static void cursorOnOff(int state); - - ////////// - // Turn on/off topmost position - static void topmostOnOff(int state); - - - ////////// - // Request a lighting value - it is yours until you free it. - // The return can be 0, in which there are too many lights - // [in] specific - If you want a specific light. == 0 means that you don't care. - static GLenum requestLight(int specific = 0); - - ////////// - // Free a lighting value - static void freeLight(GLenum lightNum); - - ////////// - // Print out information - static void printInfo(void); - - ////////// - static void fillGemState(GemState &); - - static int texture_rectangle_supported; - static int client_storage_supported; - static int texture_range_supported; - static int texture_yuv_supported; - static int multisample_filter_hint; - static GLint maxStackDepth[4]; // for push/pop of matrix-stacks - - - static float m_perspect[6]; // values for the perspective matrix - static float m_lookat[9]; // values for the lookat matrix - - // LATER make this private (right now it is needed in gem2pdp) - static int m_buffer; // single(1) or double(2) - - private: - - ////////// - // computer and window information - static char *m_title; // title to be displayed - static int m_fullscreen; // fullscreen (1) or not (0!) - static int m_menuBar; // hide (0), show(1), hide but autoshow(-1) - static int m_secondscreen; // set the second screen - static int m_height; // window height - static int m_width; // window width - static int m_w; // the real window width (reported by gemCreateWindow()) - static int m_h; // the real window height - static int m_xoffset; // window offset (x) - static int m_yoffset; // window offset (y) - - static int m_border; // window border - static int m_stereo; // stereoscopic - - static int m_profile; // off(0), on(1), w/o image caching(2) - static int m_rendering; - - static float m_fog; // fog density - enum FOG_TYPE - { FOG_OFF = 0, FOG_LINEAR, FOG_EXP, FOG_EXP2 }; - static FOG_TYPE m_fogMode; // what kind of fog we have - static GLfloat m_fogColor[4]; // colour of the fog - static float m_fogStart; // start of the linear fog - static float m_fogEnd; // start of the linear fog - - static float m_motionBlur; // motion-blur factor in double-buffer mode - - static float fps; - static int fsaa; - static bool pleaseDestroy; -#ifdef __APPLE__ - static AGLContext masterContext; -#endif - - ////////// - // Changing these variables is likely to crash GEM - // This is current rendering window information - // The window is created and destroyed by the user, so - // if there is no window, this will contain NULL pointers. - static WindowInfo &getWindowInfo(void); - - ////////// - // Changing these variables is likely to crash GEM - // This is constant rendering window information - // This window is always avaliable (although not visible) - static WindowInfo &getConstWindowInfo(void); - static int createConstWindow(char* disp = 0); - - // gemwin is allowed to modifying "global" window attributes - friend class gemwin; - - static GLfloat m_clear_color[4]; // the frame buffer clear - static GLbitfield m_clear_mask; // the clear bitmask - static GLfloat m_mat_ambient[4]; // default ambient material - static GLfloat m_mat_specular[4]; // default specular material - static GLfloat m_mat_shininess; // default shininess material - - static GLfloat m_stereoSep; // stereo seperation - static GLfloat m_stereoFocal; // distance to focal point - static bool m_stereoLine; // draw a line between 2 stereo-screens - - static double m_lastRenderTime; // the time of the last rendered frame - - // gemwin should not touch the following member variables and member functions - static int m_windowState; - static int m_windowNumber; - static int m_windowContext; - static int m_cursor; - static int m_topmost; - - static void windowInit(void); - static void windowCleanup(void); - static void resetValues(void); - - static void resizeCallback(int xsize, int ysize, void*); - static void dispatchWinmessCallback(void); - - ////////// - // check for supported openGL extensions we might need - static void checkOpenGLExtensions(void); -}; - -#endif diff --git a/externals/gridflow/bundled/Base/GemMath.h b/externals/gridflow/bundled/Base/GemMath.h deleted file mode 100644 index 96177a05..00000000 --- a/externals/gridflow/bundled/Base/GemMath.h +++ /dev/null @@ -1,89 +0,0 @@ -/*----------------------------------------------------------------- -LOG - GEM - Graphics Environment for Multimedia - - Matrix class - - Copyright (c) 1997-1999 Mark Danks. mark@danks.org - Copyright (c) Günther Geiger. geiger@epy.co.at - Copyright (c) 2001-2002 IOhannes m zmoelnig. forum::für::umläute. IEM. zmoelnig@iem.kug.ac.at - For information on usage and redistribution, and for a DISCLAIMER OF ALL - WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. - ------------------------------------------------------------------*/ - -#ifndef INCLUDE_GEMMATH_H_ -#define INCLUDE_GEMMATH_H_ - -#include "Base/config.h" - -#include <math.h> - - -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif - -#ifdef __APPLE__ -# include <AvailabilityMacros.h> -# if defined (MAC_OS_X_VERSION_10_3) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3 -# else - -#define sqrtf(v) (float)sqrt((double)(v)) -#define cosf(v) (float)cos((double)(v)) -#define sinf(v) (float)sin((double)(v)) -#define tanf(v) (float)tan((double)(v)) -#define logf(v) (float)log((double)(v)) -#define expf(v) (float)exp((double)(v)) - -#define atan2f(v,p) (float)atan2((double)(v), (double)(p)) -#define powf(v,p) (float)pow((double)(v), (double)(p)) - -# endif /* OSX_10_3 */ -#endif /* __APPLE__ */ - - -/////////////////////////////////////////////////////////////////////////////// -// Speedup found via Shark: ppc only -// -// If you do not require full precision, you can use the PowerPC floating-point -// reciprocal square-root estimate instruction (frsqrte) instead of calling sqrt(). -// -// If needed, you can increase the precision of the estimate returned by -// frsqrte (5-bits of precision) by using the Newton-Raphson method for improving -// the estimate (x0) for 1/sqrt(a) (x1 = 0.5 * x0 * [3.0 - a * x0 * x0]). -/////////////////////////////////////////////////////////////////////////////// -#ifdef __ppc__ -# include <ppc_intrinsics.h> -# ifdef sqrt -# undef sqrt -# endif -# ifdef sqrtf -# undef sqrtf -# endif - -# define sqrt fast_sqrtf -# define sqrtf fast_sqrtf - -inline double fast_sqrt(double x) -{ - register double est = __frsqrte(x); - return x * 0.5 * est * __fnmsub(est * est, x, 3.0); -} - -inline float fast_sqrtf(float x) -{ - register float est = (float)__frsqrte(x); - return x * 0.5f * est * __fnmsubs(est * est, x, 3.0f); -} -#endif /* __ppc__ */ - -#ifdef __WIN32__ -/* seems like there is no drand48() on w32 */ -/* JMZ: this should really return "double" instead of "float", - * but we need only float... */ -# define drand48() ((float)rand())/((float)RAND_MAX) -#endif /* _WIN32 */ - - -#endif // for header file diff --git a/externals/gridflow/bundled/Base/GemModelData.h b/externals/gridflow/bundled/Base/GemModelData.h deleted file mode 100644 index 4545bf98..00000000 --- a/externals/gridflow/bundled/Base/GemModelData.h +++ /dev/null @@ -1,42 +0,0 @@ -/*----------------------------------------------------------------- -LOG - GEM - Graphics Environment for Multimedia - - Structure for specifying a model for rendering - - Copyright (c) 1997-1999 Mark Danks. mark@danks.org - Copyright (c) Günther Geiger. geiger@epy.co.at - Copyright (c) 2001-2002 IOhannes m zmoelnig. forum::für::umläute. IEM. zmoelnig@iem.kug.ac.at - For information on usage and redistribution, and for a DISCLAIMER OF ALL - WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. - ------------------------------------------------------------------*/ - -#ifndef INCLUDE_GEMMODELDATA_H_ -#define INCLUDE_GEMMODELDATA_H_ - -#include "Base/GemExportDef.h" - -/*----------------------------------------------------------------- -------------------------------------------------------------------- -CLASS - imageStruct - - The basic image structure - ------------------------------------------------------------------*/ -class GEM_EXTERN GemModelData -{ - public: - - ////////// - // Constructor - GemModelData() { } - - ////////// - // Destructor - ~GemModelData() { } -}; - - -#endif diff --git a/externals/gridflow/bundled/Base/GemPBuffer.h b/externals/gridflow/bundled/Base/GemPBuffer.h deleted file mode 100644 index f11f5ee4..00000000 --- a/externals/gridflow/bundled/Base/GemPBuffer.h +++ /dev/null @@ -1,51 +0,0 @@ -/* OpenGL pixel buffer - * - * Copyright (C) 2003-2004, Alexander Zaprjagaev <frustum@frustum.org> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef __PBUFFER_H__ -#define __PBUFFER_H__ - -struct PBuffer_data; - -class PBuffer { -public: - - enum { - GEM_PBUFLAG_RGB = 1 << 0, - GEM_PBUFLAG_RGBA = 1 << 1, - GEM_PBUFLAG_DEPTH = 1 << 2, - GEM_PBUFLAG_STENCIL = 1 << 3, - GEM_PBUFLAG_FLOAT = 1 << 4, - GEM_PBUFLAG_MULTISAMPLE_2 = 1 << 5, - GEM_PBUFLAG_MULTISAMPLE_4 = 1 << 6 - }; - - PBuffer(int width,int height,int flags = GEM_PBUFLAG_RGBA | GEM_PBUFLAG_DEPTH | GEM_PBUFLAG_STENCIL); - ~PBuffer(); - - void enable(); - void disable(); - - int width; - int height; - -protected: - struct PBuffer_data *data; -}; - -#endif /* __PBUFFER_H__ */ diff --git a/externals/gridflow/bundled/Base/GemPathBase.h b/externals/gridflow/bundled/Base/GemPathBase.h deleted file mode 100644 index 7bd23aa4..00000000 --- a/externals/gridflow/bundled/Base/GemPathBase.h +++ /dev/null @@ -1,74 +0,0 @@ -/*----------------------------------------------------------------- -LOG - GEM - Graphics Environment for Multimedia - - Base class for paths - - Copyright (c) 1997-1999 Mark Danks. mark@danks.org - Copyright (c) Günther Geiger. geiger@epy.co.at - Copyright (c) 2001-2002 IOhannes m zmoelnig. forum::für::umläute. IEM. zmoelnig@iem.kug.ac.at - For information on usage and redistribution, and for a DISCLAIMER OF ALL - WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. - ------------------------------------------------------------------*/ - -#ifndef INCLUDE_GEMPATHBASE_H_ -#define INCLUDE_GEMPATHBASE_H_ - -#include "Base/CPPExtern.h" - -/*----------------------------------------------------------------- -------------------------------------------------------------------- -CLASS - GemPathBase - - -DESCRIPTION - - ------------------------------------------------------------------*/ -class GEM_EXTERN GemPathBase : public CPPExtern -{ - CPPEXTERN_HEADER(GemPathBase, CPPExtern) - - public: - - ////////// - // Constructor - GemPathBase(int argc, t_atom *argv); - - protected: - - ////////// - // Destructor - virtual ~GemPathBase(); - - ////////// - // When an open is received - virtual void openMess(t_symbol *arrayname); - - ////////// - // When a float val is received - virtual void floatMess(float val) = 0; - - ////////// - // The number of dimensions - int m_numDimens; - - ////////// - // The array - t_garray *m_array; - - ////////// - // The outlet - t_outlet *m_out1; - - private: - - ////////// - // static member functions - static void openMessCallback(void *data, t_symbol *arrayname); - static void floatMessCallback(void *data, float n); -}; - -#endif // for header file diff --git a/externals/gridflow/bundled/Base/GemPixConvert.h b/externals/gridflow/bundled/Base/GemPixConvert.h deleted file mode 100644 index e1cd5a3d..00000000 --- a/externals/gridflow/bundled/Base/GemPixConvert.h +++ /dev/null @@ -1,160 +0,0 @@ -/*----------------------------------------------------------------- -LOG - GEM - Graphics Environment for Multimedia - - GemPixConvertSIMD.h - - header-file for color conversion - - this is mainly for (SIMD-)optimized routines - - part of GEM - - Copyright (c) 2006 IOhannes m zmoelnig. forum::für::umläute. IEM. zmoelnig@iem.kug.ac.at - For information on usage and redistribution, and for a DISCLAIMER OF ALL - WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. - ------------------------------------------------------------------*/ - - -#ifndef INCLUDE_GEMPIXCONVERT_SIMD_H_ -#define INCLUDE_GEMPIXCONVERT_SIMD_H_ - -#include "GemPixUtil.h" -#include "GemSIMD.h" - -// use formulae from http://www.poynton.com/notes/colour_and_gamma/ColorFAQ.html#RTFToC30 -/* - * [Y] 1 [ 65.738 129.075 25.064 ] [R] [ 16] - * [U] = --- * [ -37.945 -74.494 112.439 ] * [G]+[128] - * [V] = 256 [ 112.439 -94.154 -18.285 ] [B] [128] - * - * [R] 1 [ 298.082 0.0 408.583 ] [Y] [ 16] - * [G] = --- * [ 298.082 -100.291 -208.120 ] * ([U]-[128]) - * [B] = 256 [ 298.082 516.411 0.0 ] [V] [128] - */ - -#define YUV_POYNTON -// here comes something to be afraid of: -// (probably it would be better to define the matrices as real constant-value matrices) -// (instead of element-wise) - -#ifdef YUV_POYNTON -# define Y_OFFSET 16 -# define UV_OFFSET 128 - -// RGB2YUV -// poynton-values rounded -# define RGB2YUV_11 66 -# define RGB2YUV_12 129 -# define RGB2YUV_13 25 -# define RGB2YUV_21 -38 -# define RGB2YUV_22 -74 -# define RGB2YUV_23 112 -# define RGB2YUV_31 112 -# define RGB2YUV_32 -94 -# define RGB2YUV_33 -18 - -// YUV2RGB -// (we skip _21 and _31 as they are equal to _11) -#if 0 -// poynton-values rounded -# define YUV2RGB_11 298 -# define YUV2RGB_12 0 -# define YUV2RGB_13 409 -# define YUV2RGB_22 -100 -# define YUV2RGB_23 -208 -# define YUV2RGB_32 516 -# define YUV2RGB_33 0 -#else - -// this is round(256*inv(rgb2yuv/256)) -// so the general error should be smaller -# define YUV2RGB_11 298 -# define YUV2RGB_12 -1 -# define YUV2RGB_13 409 -# define YUV2RGB_22 -100 -# define YUV2RGB_23 -210 -# define YUV2RGB_32 519 -# define YUV2RGB_33 0 -#endif - -#else -/* the old ones: */ -# define Y_OFFSET 0 -# define UV_OFFSET 128 -// RGB2YUV -# define RGB2YUV_11 77 -# define RGB2YUV_12 150 -# define RGB2YUV_13 29 -# define RGB2YUV_21 -43 -# define RGB2YUV_22 -85 -# define RGB2YUV_23 128 -# define RGB2YUV_31 128 -# define RGB2YUV_32 -107 -# define RGB2YUV_33 -21 -// YUV2RGB -# define YUV2RGB_11 256 -# define YUV2RGB_12 0 -# define YUV2RGB_13 359 -# define YUV2RGB_22 -88 -# define YUV2RGB_23 -183 -# define YUV2RGB_32 454 -# define YUV2RGB_33 0 - -#endif /* POYNTON */ - -/* AltiVec */ -#ifdef __VEC__ - -/* there are problems on OSX10.3 with older versions of gcc, since the intrinsic code - * below freely changes between signed and unsigned short vectors - * newer versions of gcc accept this... - * LATER: fix the code (GemPixConvertAltivec:750..800) - */ -# ifdef __GNUC__ -/* according to hcs it does NOT work with gcc-3.3 - * for simplicity, i disable everything below gcc4 - * JMZ: 20061114 - */ -# if __GNUC__ < 4 -# warning disabling AltiVec for older gcc: please fix me -# define NO_VECTORINT_TO_VECTORUNSIGNEDINT -# endif -# endif /* GNUC */ - - - void RGB_to_YCbCr_altivec(unsigned char *rgbdata, size_t RGB_size, - unsigned char *pixels); - void RGBA_to_YCbCr_altivec(unsigned char *rgbadata, size_t RGBA_size, - unsigned char *pixels); - void BGR_to_YCbCr_altivec(unsigned char *bgrdata, size_t BGR_size, - unsigned char *pixels); - void BGRA_to_YCbCr_altivec(unsigned char *bgradata, size_t BGRA_size, - unsigned char *pixels); - void YUV422_to_BGRA_altivec(unsigned char *yuvdata, size_t pixelnum, - unsigned char *pixels); - void YV12_to_YUV422_altivec(short*Y, short*U, short*V, - unsigned char *data, int xsize, int ysize); -# ifndef NO_VECTORINT_TO_VECTORUNSIGNEDINT - void YUV422_to_YV12_altivec(short*pY, short*pY2, short*pU, short*pV, - unsigned char *gem_image, int xsize, int ysize); -# endif -#endif /* AltiVec */ - -/* SSE2 */ -#ifdef __SSE2__ -void RGBA_to_UYVY_SSE2(unsigned char *rgbadata, - size_t size, - unsigned char *yuvdata); -void UYVY_to_RGBA_SSE2(unsigned char *yuvdata, - size_t size, - unsigned char *rgbadata); -void UYVY_to_RGB_SSE2(unsigned char *yuvdata, - size_t size, - unsigned char *rgbadata); -#endif /* SSE2 */ - -/* in case somebody has an old machine... */ -#ifdef __MMX__ - -#endif /* MMX */ - -#endif /* INCLUDE_GEMPIXCONVERT_SIMD_H_ */ diff --git a/externals/gridflow/bundled/Base/GemPixDualObj.h b/externals/gridflow/bundled/Base/GemPixDualObj.h deleted file mode 100644 index ba039e2c..00000000 --- a/externals/gridflow/bundled/Base/GemPixDualObj.h +++ /dev/null @@ -1,190 +0,0 @@ -/*----------------------------------------------------------------- -LOG - GEM - Graphics Environment for Multimedia - - An object which accepts two pixes. - - Copyright (c) 1997-1999 Mark Danks. mark@danks.org - Copyright (c) Günther Geiger. geiger@epy.co.at - Copyright (c) 2001-2002 IOhannes m zmoelnig. forum::für::umläute. IEM. zmoelnig@iem.kug.ac.at - Copyright (c) 2002 James Tittle & Chris Clepper - For information on usage and redistribution, and for a DISCLAIMER OF ALL - WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. - ------------------------------------------------------------------*/ - -#ifndef INCLUDE_GEMPIXDUALOBJ_H_ -#define INCLUDE_GEMPIXDUALOBJ_H_ - -#define NEW_DUAL_PIX - -#include "Base/GemPixObj.h" - -/*----------------------------------------------------------------- -------------------------------------------------------------------- -CLASS - GemPixDualObj - - An object which accepts two pixes. - -DESCRIPTION - - Inlet for a gem - "gem_right" - - "gem_right" - The second gem list - ------------------------------------------------------------------*/ -class GEM_EXTERN GemPixDualObj : public GemPixObj -{ - public: - - ////////// - // Constructor - GemPixDualObj(); - - protected: - - ////////// - // Destructor - virtual ~GemPixDualObj(); - - void render(GemState *state); - - ////////// - // Derived classes should NOT override this! - // This makes sure that the images are the same size. - // This calls the other process functions based on the input images. - virtual void processImage(imageStruct &image); - -#ifndef NEW_DUAL_PIX - ////////// - // The derived class HAS override this. - // This is called whenever a new image comes through and - // both of the image structs are RGBA - virtual void processDualImage(imageStruct &image, imageStruct &right) = 0; - - ////////// - // The derived class CAN override this. - // This is called whenever a new image comes through and both - // of the image structs are gray8. - // The default behavior is to output an error. - virtual void processDualGray(imageStruct &image, imageStruct &right); - - ////////// - // The derived class CAN override this. - // This is called whenever a new image comes through and - // the left image is an RGBA while the right is a gray8. - // The default behavior is to output an error. - virtual void processRightGray(imageStruct &image, imageStruct &right); - - ////////// - // The derived class CAN override this. - // This is called whenever a new image comes through and - // the left image is a gray8, the right is an RGBA - // The default behavior is to output an error. - virtual void processLeftGray(imageStruct &image, imageStruct &right); - - ////////// - // The derived class CAN override this. - // This is called whenever a new image comes through and both - // of the image structs are YUV. - // The default behavior is to output an error. - virtual void processDualYUV(imageStruct &image, imageStruct &right); - - ////////// - // The derived class CAN override this. - // This is called whenever a new image comes through and - // the left image is an RGBA while the right is a YUV. - // The default behavior is to output an error. - virtual void processRightYUV(imageStruct &image, imageStruct &right); - - ////////// - // The derived class CAN override this. - // This is called whenever a new image comes through and - // the left image is a YUV, the right is an RGBA - // The default behavior is to output an error. - virtual void processLeftYUV(imageStruct &image, imageStruct &right); -#else - ////////// - // The derived class SHOULD override this, if it provides a method for "all" formats - virtual void processDualImage(imageStruct &left, imageStruct &right); - // Here come the more specific dual-processors - // The derived class SHOULD override these as needed - - /* for simplicity this is done via preprocessor defines: - * the functions defined are like : - ** processRGBA_RGBA(left, right); - */ - -#define PROCESS_DUALIMAGE(CS1, CS2) \ - virtual void process##CS1 ##_##CS2 (imageStruct &left, imageStruct &right){processDualImage(left, right);} - PROCESS_DUALIMAGE(RGBA, RGBA); - PROCESS_DUALIMAGE(RGBA, Gray); - PROCESS_DUALIMAGE(RGBA, YUV ); - - PROCESS_DUALIMAGE(Gray, RGBA); - PROCESS_DUALIMAGE(Gray, Gray); - PROCESS_DUALIMAGE(Gray, YUV ); - - PROCESS_DUALIMAGE(YUV, RGBA); - PROCESS_DUALIMAGE(YUV, Gray); - PROCESS_DUALIMAGE(YUV, YUV ); -#undef PROCESS_DUALIMAGE - - /* for simplicity this is done via preprocessor defines: - * the functions defined are like : - ** processRGBA_Altivec(left, right); - */ -#define PROCESS_DUALIMAGE_SIMD(CS1, CS2,_SIMD_EXT) \ - virtual void process##CS1 ##_##_SIMD_EXT (imageStruct &left, imageStruct &right){ \ - process##CS1 ##_##CS2 (left, right);} - - PROCESS_DUALIMAGE_SIMD(RGBA, RGBA, MMX); - PROCESS_DUALIMAGE_SIMD(RGBA, MMX , SSE2); - PROCESS_DUALIMAGE_SIMD(RGBA, RGBA, Altivec); - - PROCESS_DUALIMAGE_SIMD(YUV , YUV , MMX); - PROCESS_DUALIMAGE_SIMD(YUV , MMX , SSE2); - PROCESS_DUALIMAGE_SIMD(YUV , YUV , Altivec); - - PROCESS_DUALIMAGE_SIMD(Gray, Gray, MMX); - PROCESS_DUALIMAGE_SIMD(Gray, MMX , SSE2); - PROCESS_DUALIMAGE_SIMD(Gray, Gray, Altivec); -#undef PROCESS_DUALIMAGE_SIMD - -#endif - ////////// - virtual void postrender(GemState *); - virtual void stopRendering(); - virtual void rightstopRendering() { ; } - virtual void rightRender(GemState *state); - virtual void rightPostrender(GemState *) { ; } - virtual void rightStoprender() { ; } - - ////////// - GemCache *m_cacheRight; - - ////////// - pixBlock *m_pixRight; - - int m_pixRightValid; - int org_pixRightValid; - - ////////// - t_inlet *m_inlet; - - ////////// - // creation callback - static void real_obj_setupCallback(t_class *classPtr) - { GemPixObj::real_obj_setupCallback(classPtr); GemPixDualObj::obj_setupCallback(classPtr); } - - private: - - static inline GemPixDualObj *GetMyClass(void *data) {return((GemPixDualObj *)((Obj_header *)data)->data);} - - ////////// - // Static member functions - static void obj_setupCallback(t_class *classPtr); - static void gem_rightMessCallback(void *x, t_symbol *s, int argc, t_atom *argv); -}; -#endif // for header file diff --git a/externals/gridflow/bundled/Base/GemPixImageLoad.h b/externals/gridflow/bundled/Base/GemPixImageLoad.h deleted file mode 100644 index 5274e692..00000000 --- a/externals/gridflow/bundled/Base/GemPixImageLoad.h +++ /dev/null @@ -1,37 +0,0 @@ -/*----------------------------------------------------------------- -LOG - GEM - Graphics Environment for Multimedia - - GemPixImageLoad.h - - code to load in and resize an image - - part of GEM - - Copyright (c) 1997-1999 Mark Danks. mark@danks.org - Copyright (c) Günther Geiger. geiger@epy.co.at - Copyright (c) 2001-2002 IOhannes m zmoelnig. forum::für::umläute. IEM. zmoelnig@iem.kug.ac.at - For information on usage and redistribution, and for a DISCLAIMER OF ALL - WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. - ------------------------------------------------------------------*/ - -#ifndef INCLUDE_GEMPIXIMAGELOAD_H_ -#define INCLUDE_GEMPIXIMAGELOAD_H_ - -#include "Base/GemExportDef.h" - -struct imageStruct; - -// image2mem() reads an image file into memory -// and a pointer to an imageStruct -// NULL = failure -// -// format: -// returns either GL_LUMINANCE or GL_RGBA -// -// automatically allocates the memory for the user -// -// This can read TIFF, SGI, and JPG images -// -GEM_EXTERN extern imageStruct *image2mem(const char *filename); - -#endif diff --git a/externals/gridflow/bundled/Base/GemPixImageSave.h b/externals/gridflow/bundled/Base/GemPixImageSave.h deleted file mode 100644 index ccbe91ae..00000000 --- a/externals/gridflow/bundled/Base/GemPixImageSave.h +++ /dev/null @@ -1,38 +0,0 @@ -/*----------------------------------------------------------------- -LOG - GEM - Graphics Environment for Multimedia - - Gempiximagesave.h - - code to save an image - - part of GEM - - Copyright (c) 1997-1999 Mark Danks. mark@danks.org - Copyright (c) Günther Geiger. geiger@epy.co.at - Copyright (c) 2001-2002 IOhannes m zmoelnig. forum::für::umläute. IEM. zmoelnig@iem.kug.ac.at - For information on usage and redistribution, and for a DISCLAIMER OF ALL - WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. - ------------------------------------------------------------------*/ - -#ifndef INCLUDE_GEMPIXIMAGESAVE_H_ -#define INCLUDE_GEMPIXIMAGESAVE_H_ - -#include "Base/GemExportDef.h" - -struct imageStruct; - -// image2mem() reads an image file into memory -// and a pointer to an imageStruct -// NULL = failure -// -// format: -// returns either GL_LUMINANCE or GL_RGBA -// -// automatically allocates the memory for the user -// -// This can read TIFF, SGI, and JPG images -// -GEM_EXTERN extern int mem2image(imageStruct *image, const char *filename, const int type); - - -#endif diff --git a/externals/gridflow/bundled/Base/GemPixObj.h b/externals/gridflow/bundled/Base/GemPixObj.h deleted file mode 100644 index 5d9073c7..00000000 --- a/externals/gridflow/bundled/Base/GemPixObj.h +++ /dev/null @@ -1,142 +0,0 @@ -/*----------------------------------------------------------------- -LOG - GEM - Graphics Environment for Multimedia - - Base class for pix class gem objects - - Copyright (c) 1997-1999 Mark Danks. mark@danks.org - Copyright (c) Günther Geiger. geiger@epy.co.at - Copyright (c) 2001-2002 IOhannes m zmoelnig. forum::für::umläute. IEM. zmoelnig@iem.kug.ac.at - For information on usage and redistribution, and for a DISCLAIMER OF ALL - WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. - ------------------------------------------------------------------*/ - -#ifndef INCLUDE_GEMPIXOBJ_H_ -#define INCLUDE_GEMPIXOBJ_H_ - -#include "Base/GemBase.h" -#include "Base/GemPixUtil.h" -#include "stdlib.h" -#include "string.h" -#include "math.h" - -/*----------------------------------------------------------------- -------------------------------------------------------------------- -CLASS - GemPixObj - - Base class for pix class gem objects - -DESCRIPTION - ------------------------------------------------------------------*/ -class GEM_EXTERN GemPixObj : public GemBase -{ - public: - - ////////// - // Constructor - GemPixObj(); - - protected: - - ////////// - // Destructor - virtual ~GemPixObj() { } - - ////////// - // The derived class should override this if it provides - // processing independent of the image.format - // This is called whenever a new image comes through. - // The default is to output an error - virtual void processImage(imageStruct &image); - - ////////// - // The derived class should override this. - // This is called whenever a new RGB image comes through. - // The default is to call processImage(). - virtual void processRGBImage(imageStruct &image); - - ////////// - // The derived class should override this. - // This is called whenever a new RGBA image comes through. - // The default is to call processImage(). - virtual void processRGBAImage(imageStruct &image); - // SIMD-optimized functions: by default the non-optimized function is called - virtual void processRGBAMMX(imageStruct &image); - virtual void processRGBASSE2(imageStruct &image); - virtual void processRGBAAltivec(imageStruct &image); - - ////////// - // The derived class should override this. - // This is called whenever a new gray8 image comes through. - // The default is to call processImage(). - virtual void processGrayImage(imageStruct &image); - // SIMD-optimized functions: by default the non-optimized function is called - virtual void processGrayMMX(imageStruct &image); - virtual void processGraySSE2(imageStruct &image); - virtual void processGrayAltivec(imageStruct &image); - - ////////// - // The derived class should override this. - // This is called whenever a new YUV422 image comes through. - // The default is to call processImage(). - virtual void processYUVImage(imageStruct &image); - // SIMD-optimized functions: by default the non-optimized function is called - virtual void processYUVMMX(imageStruct &image); - virtual void processYUVSSE2(imageStruct &image); - virtual void processYUVAltivec(imageStruct &image); - - ////////// - // If the derived class needs the image resent. - // This sets the dirty bit on the pixBlock. - void setPixModified(); - - ////////// - // Turn on/off processing - void processOnOff(int on); - - ////////// - // the pixBlock-cache - pixBlock cachedPixBlock; - pixBlock *orgPixBlock; - - ////////// - int m_processOnOff; - int m_simd; - - ////////// - // creation callback - static void real_obj_setupCallback(t_class *classPtr) { - GemBase::real_obj_setupCallback(classPtr); - GemPixObj::obj_setupCallback(classPtr); - } - - ////////// - // The derived class should NOT override this unless they have some - // very special behavior. - // Do the rendering, which calls processImage or processGrayImage, etc... - // save the image-information - virtual void render(GemState *state); - // turn the pointer back to the old data after rendering - virtual void postrender(GemState *state); - - void startRendering(void) { - //post("start rendering"); - setPixModified(); - } - - private: - - static inline GemPixObj *GetMyClass(void *data) {return((GemPixObj *)((Obj_header *)data)->data);} - - ////////// - // static member functions - static void obj_setupCallback(t_class *classPtr); - static void floatMessCallback(void *data, float n); - static void simdMessCallback(void *data, float n); -}; - - -#endif // for header file diff --git a/externals/gridflow/bundled/Base/GemPixPete.h b/externals/gridflow/bundled/Base/GemPixPete.h deleted file mode 100644 index be3c2e19..00000000 --- a/externals/gridflow/bundled/Base/GemPixPete.h +++ /dev/null @@ -1,219 +0,0 @@ -/*----------------------------------------------------------------- -LOG - GEM - Graphics Environment for Multimedia - - helper stuff for ports of Pete's Plugins - - http://www.petewarden.com - - Copyright (c) 2004 IOhannes m zmoelnig. forum::für::umläute. IEM. zmoelnig@iem.kug.ac.at - For information on usage and redistribution, and for a DISCLAIMER OF ALL - WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. - ------------------------------------------------------------------*/ -#ifndef INCLUDE_GEMPIXPETE_H_ -#define INCLUDE_GEMPIXPETE_H_ - - -// utility functions from PeteHelpers.h -typedef unsigned long U32; -typedef unsigned short U16; -typedef unsigned char U8; - - -/* is this only on my system ? - i thought Gem's YUV is UYVY and not YVYU - seems weird... (jmz) -*/ -#ifdef __APPLE__ - -# define SHIFT_ALPHA (24) -# define SHIFT_RED (16) -# define SHIFT_GREEN (8) -# define SHIFT_BLUE (0) - -# define SHIFT_U (24) -# define SHIFT_Y1 (16) -# define SHIFT_V (8) -# define SHIFT_Y2 (0) - -#else - -# define SHIFT_ALPHA (24) -# define SHIFT_RED (16) -# define SHIFT_GREEN (8) -# define SHIFT_BLUE (0) - -# define SHIFT_U (0) -# define SHIFT_Y1 (8) -# define SHIFT_V (16) -# define SHIFT_Y2 (24) -#endif - -const float Pete_Pi=3.141582f; -const float Pete_TwoPi=(2.0f*Pete_Pi); -const float Pete_HalfPi=(0.5f*Pete_Pi); - -static inline void Pete_ZeroMemory(void* pMemory,int nCount) { - char* pCurrent=(char*)pMemory; - char* pEnd=(pCurrent+nCount); - // while (pCurrent<pEnd) *pCurrent=0; - // pCurrent+=1; - // } - while(pCurrent<pEnd)*pCurrent++=0; -// memset(pMemory,0,nCount); -} - -typedef U32 PETE_PIXELDATA32; -#define SIZEOF_PETE_PIXELDATA32 (4) - -typedef U32 PETE_PIXELDATA24; -#define SIZEOF_PETE_PIXELDATA24 (3) - -typedef U16 PETE_PIXELDATA16; -#define SIZEOF_PETE_PIXELDATA16 (2) - -static inline void Pete_CopyAndConvert24BitTo32Bit(PETE_PIXELDATA24* pSource,PETE_PIXELDATA32* pOutput,int nPixelCount) { - - char* pSourceEnd=((char*)pSource)+(nPixelCount*SIZEOF_PETE_PIXELDATA24); - char* pCurrentSource=((char*)pSource); - char* pCurrentOutput=((char*)pOutput); - - while (pCurrentSource<pSourceEnd) { - *((PETE_PIXELDATA32*)pCurrentOutput)= - *((PETE_PIXELDATA24*)pCurrentSource); - - pCurrentSource+=SIZEOF_PETE_PIXELDATA24; - pCurrentOutput+=SIZEOF_PETE_PIXELDATA32; - } -} - -static inline void Pete_CopyAndConvert32BitTo24Bit(PETE_PIXELDATA32* pSource,PETE_PIXELDATA24* pOutput,int nPixelCount) { - - char* pSourceEnd=((char*)pSource)+(nPixelCount*SIZEOF_PETE_PIXELDATA32); - char* pCurrentSource=((char*)pSource); - char* pCurrentOutput=((char*)pOutput); - - while (pCurrentSource<pSourceEnd) { - *((PETE_PIXELDATA24*)pCurrentOutput)= - *((PETE_PIXELDATA32*)pCurrentSource); - - pCurrentSource+=SIZEOF_PETE_PIXELDATA32; - pCurrentOutput+=SIZEOF_PETE_PIXELDATA24; - } -} - -static inline void Pete_InPlaceConvert24BitTo32Bit(PETE_PIXELDATA24* pBuffer,int nPixelCount) { - char* pBufferStart=(char*)pBuffer; - - char* pBuffer32Current=(pBufferStart+((nPixelCount-1)*SIZEOF_PETE_PIXELDATA32)); - char* pBuffer24Current=(pBufferStart+((nPixelCount-1)*SIZEOF_PETE_PIXELDATA24)); - - while (pBuffer32Current>=pBufferStart) { - - *((PETE_PIXELDATA32*)pBuffer32Current)= - *((PETE_PIXELDATA24*)pBuffer24Current); - - pBuffer32Current-=SIZEOF_PETE_PIXELDATA32; - pBuffer24Current-=SIZEOF_PETE_PIXELDATA24; - } -} - -static inline void Pete_CopyAndConvert16Bit565To32Bit(PETE_PIXELDATA16* pSource,PETE_PIXELDATA32* pOutput,int nPixelCount) { - - char* pSourceEnd=((char*)pSource)+(nPixelCount*SIZEOF_PETE_PIXELDATA16); - char* pCurrentSource=((char*)pSource); - char* pCurrentOutput=((char*)pOutput); - - while (pCurrentSource<pSourceEnd) { - - PETE_PIXELDATA16 SourceColour= - *((PETE_PIXELDATA16*)pCurrentSource); - - const int nMaskedRed=(SourceColour>>11)&31; - const int nMaskedGreen=(SourceColour>>5)&63; - const int nMaskedBlue=(SourceColour>>0)&31; - - const int nNormalizedRed=(nMaskedRed<<3)|(nMaskedRed>>2); - const int nNormalizedGreen=(nMaskedGreen<<2)|(nMaskedGreen>>4); - const int nNormalizedBlue=(nMaskedBlue<<3)|(nMaskedBlue>>2); - - const PETE_PIXELDATA32 OutputColour= - (nNormalizedRed<<16)| - (nNormalizedGreen<<8)| - (nNormalizedBlue<<0); - - *((PETE_PIXELDATA32*)pCurrentOutput)=OutputColour; - - pCurrentSource+=SIZEOF_PETE_PIXELDATA16; - pCurrentOutput+=SIZEOF_PETE_PIXELDATA32; - - } - -} - -static inline void Pete_CopyAndConvert32BitTo16Bit565(PETE_PIXELDATA32* pSource,PETE_PIXELDATA16* pOutput,int nPixelCount) { - - char* pSourceEnd=((char*)pSource)+(nPixelCount*SIZEOF_PETE_PIXELDATA32); - char* pCurrentSource=((char*)pSource); - char* pCurrentOutput=((char*)pOutput); - - while (pCurrentSource<pSourceEnd) { - - PETE_PIXELDATA32 SourceColour= - *((PETE_PIXELDATA32*)pCurrentSource); - - const int nSourceRed=(SourceColour>>16)&0xff; - const int nSourceGreen=(SourceColour>>8)&0xff; - const int nSourceBlue=(SourceColour>>0)&0xff; - - const int nMaskedRed=(nSourceRed>>3); - const int nMaskedGreen=(nSourceGreen>>2); - const int nMaskedBlue=(nSourceBlue>>3); - - PETE_PIXELDATA16 OutputColour= - (nMaskedRed<<11)| - (nMaskedGreen<<5)| - (nMaskedBlue<<0); - - *((PETE_PIXELDATA16*)pCurrentOutput)=OutputColour; - - pCurrentSource+=SIZEOF_PETE_PIXELDATA32; - pCurrentOutput+=SIZEOF_PETE_PIXELDATA16; - } -} -typedef void* SPete_MemHandle; - -inline SPete_MemHandle Pete_NewHandle(int nBytesToAlloc) { - return malloc(nBytesToAlloc); -} - -inline void Pete_FreeHandle(SPete_MemHandle InHandle) { - free(InHandle); -} - -inline void* Pete_LockHandle(SPete_MemHandle InHandle) { - return InHandle; -} - -inline void Pete_UnLockHandle(SPete_MemHandle InHandle) { - // do nothing -} - -const int cnBiggestSignedInt=0x7fffffff; - -inline int GetLuminance(const U32 inColour) { - const int nRed=(inColour&(0xff<<SHIFT_RED))>>16; - const int nGreen=(inColour&(0xff<<SHIFT_GREEN))>>8; - const int nBlue=(inColour&(0xff<<SHIFT_BLUE))>>0; - - const int nLuminance = - ((77 * nRed)+ - (150* nGreen)+ // used to be 50 which is plain wron - (29 * nBlue)); - - return nLuminance; -} - -#endif /* INCLUDE_GEMPIXPETE_H_ */ -// end of PeteHelpers.h stuff diff --git a/externals/gridflow/bundled/Base/GemPixUtil.h b/externals/gridflow/bundled/Base/GemPixUtil.h deleted file mode 100644 index 88ef0afc..00000000 --- a/externals/gridflow/bundled/Base/GemPixUtil.h +++ /dev/null @@ -1,284 +0,0 @@ -/*----------------------------------------------------------------- -LOG - GEM - Graphics Environment for Multimedia - - GemPixUtil.h - - contains image functions for pix objects - - part of GEM - - Copyright (c) 1997-1999 Mark Danks. mark@danks.org - Copyright (c) Günther Geiger. geiger@epy.co.at - Copyright (c) 2001-2002 IOhannes m zmoelnig. forum::für::umläute. IEM. zmoelnig@iem.kug.ac.at - For information on usage and redistribution, and for a DISCLAIMER OF ALL - WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. - ------------------------------------------------------------------*/ - -#ifndef INCLUDE_GEMPIXUTIL_H_ -#define INCLUDE_GEMPIXUTIL_H_ - -#include "Base/GemGL.h" - -#ifdef __APPLE__ -# include <QuickTime/QuickTime.h> -#endif // __APPLE__ - -#include <string.h> -#include <stdlib.h> - - - -/////////////////////////////////////////////////////////////////////////////// -// Color component defines -// -// These should be used to reference the various color channels -/////////////////////////////////////////////////////////////////////////////// - -/* RGBA */ - -#if GL_RGBA_GEM == GL_RGBA -const int chRed = 0; -const int chGreen = 1; -const int chBlue = 2; -const int chAlpha = 3; -#else -const int chAlpha = 0; -const int chRed = 1; -const int chGreen = 2; -const int chBlue = 3; -#endif - - -/* Gray */ -const int chGray = 0; - -/* YUV422 */ -const int chU = 0; -const int chY0 = 1; -const int chV = 2; -const int chY1 = 3; - -// basic helper functions, like CLAMP and powerOfTwo -#include "Base/GemFuncUtil.h" - -// utility functions from PeteHelpers.h -#include "Base/GemPixPete.h" - -/*----------------------------------------------------------------- -------------------------------------------------------------------- -CLASS - imageStruct - - The basic image structure - ------------------------------------------------------------------*/ -// we now have a class "imageStruct"; -// since i need to compile some of the sources with an older version of Gem -// there is a new define here: -#define IMAGE_CLASS - -struct GEM_EXTERN imageStruct -{ - imageStruct(); - ~imageStruct(); - - void info(); - ////////// - // columns - unsigned char* allocate(size_t size); - unsigned char* allocate(); - - // if we have allocated some space already, only re-allocate when needed. - unsigned char* reallocate(size_t size); - unsigned char* reallocate(); - - // delete the buffer (if it is ours) - void clear(); - - - ////////// - // dimensions of the image - GLint xsize; - GLint ysize; - - ////////// - // (average) width of 1 pixel (LUMINANCE = 1, RGBA = 4, YUV = 2) - GLint csize; - - ////////// - // data type - always GL_UNSIGNED_BYTE (except for OS X) - GLenum type; - - ////////// - // the format - either GL_RGBA, GL_LUMINANCE - // or GL_YCBCR_422_GEM (which is on mac-computers GL_YCBCR_422_APPLE) - GLenum format; - - ////////// - // is this owned by us (? what about underscores ?) - int notowned; - - ////////// - // gets a pixel - /* X,Y are the coordinates - * C is the offset in the interleaved data (like chRed==0 for red) - * you should use chRed instead of 0 (because it might not be 0) - */ - // heck, why are X&Y swapped ?? (JMZ) - inline unsigned char GetPixel(int Y, int X, int C) - { return(data[Y * xsize * csize + X * csize + C]); } - - ////////// - // sets a pixel - /* while X and Y should be clear (coordinates), - * C is the offset (like chRed==0 for red). - * VAL is the value to set. - */ - inline void SetPixel(int Y, int X, int C, unsigned char VAL) - { data[Y * xsize * csize + X * csize + C] = VAL; } - - - ///////// - // gets the color of a pixel - void getRGB(int X, int Y, unsigned char*r, unsigned char*g, unsigned char*b); - void getGrey(int X, int Y, unsigned char*g); - void getYUV(int X, int Y, unsigned char*y, unsigned char*u, unsigned char*v); - - /* following will set the whole image-data to either black or white - * the size of the image-data is NOT xsize*ysize*csize but datasize - * this is mostly slower - * i have put the datasize into private (like pdata) (bad idea?) - */ - void setBlack(); - void setWhite(); - - /* certain formats are bound to certain csizes, - * it's quite annoying to have to think again and again (ok, not much thinking) - * so we just give the format (like GL_LUMINANCE) - * and it will set the image format to this format - * and set and return the correct csize (like 1) - * if no format is given the current format is used - */ - int setCsizeByFormat(int format); - int setCsizeByFormat(); - - - /* various copy functions - * sometimes we want to copy the whole image (including pixel-data), - * but often it is enough to just copy the meta-data (without pixel-data) - * into a new imageStruct - */ - void copy2Image(imageStruct *to); - void copy2ImageStruct(imageStruct *to); // copy the imageStruct (but not the actual data) - /* this is a sort of better copy2Image, - * which only copies the imageStruct-data if it is needed - */ - void refreshImage(imageStruct *to); - - /* inplace swapping Red and Blue channel */ - void swapRedBlue (); - - - /////////////////////////////////////////////////////////////////////////////// - // acquiring data including colour-transformations - // should be accelerated if possible - /* i wonder whether this is the right place to put these routines - * they should be stored somewhere centrally - * (because maybe a lot of objects would like them) (like [pix_rgba]...) - * but it might be better to put them (the actual conversion routines) into - * separate files (a separate library?) - * orgdata points to the actual data in the given format - * the datasize will be read from image.xsize, image.ysize - * the dest-format will be given by image.format - * this is maybe not really clean (the meta-data is stored in the destination, - * while the source has no meta-data of its own) - */ - void convertTo (imageStruct*to, GLenum dest_format=0); - void convertFrom(imageStruct*from, GLenum dest_format=0); - - void fromRGB (unsigned char* orgdata); - void fromRGBA (unsigned char* orgdata); - void fromBGR (unsigned char* orgdata); - void fromBGRA (unsigned char* orgdata); - void fromRGB16 (unsigned char* orgdata); - void fromGray (unsigned char* orgdata); - void fromGray (short* orgdata); - void fromUYVY (unsigned char* orgdata); - void fromYUY2 (unsigned char* orgdata); // YUYV - void fromYVYU (unsigned char* orgdata); - /* planar YUV420: this is rather generic and not really YV12 only */ - void fromYV12 (unsigned char* Y, unsigned char*U, unsigned char*V); - /* assume that the planes are near each other: YVU */ - void fromYV12 (unsigned char* orgdata); - /* assume that the planes are near each other: YVU */ - void fromYU12 (unsigned char* orgdata); - /* overloading the above two in order to accept pdp YV12 packets */ - void fromYV12 (short* Y, short*U, short*V); - void fromYV12 (short* orgdata); - - /* aliases */ - void fromYUV422 (unsigned char* orgdata){fromUYVY(orgdata);} - void fromYUV420P(unsigned char* orgdata){fromYV12(orgdata);} - void fromYUV420P(unsigned char*Y,unsigned char*U,unsigned char*V){fromYV12(Y,U,V);} - - // "data" points to the image. - // the memory could(!) be reserved by this class or someone else - // "notowned" should be set to "1", if "data" points to foreign memory - // "data" is not freed directly, when the destructor is called - unsigned char *data; // the pointer to the data - private: - // "pdata" is the private data, and is the memory reserved by this class - // this data is freed when the destructor is called - unsigned char *pdata; - // "datasize" is the size of data reserved at "pdata" - size_t datasize; - - public: - ////////// - // true if the image is flipped horizontally (origin is upper-left) - // false if the image is openGL-conformant (origin is lower-left) - GLboolean upsidedown; - -}; - -/*----------------------------------------------------------------- -------------------------------------------------------------------- -CLASS - pixBlock - - The pix block structure - ------------------------------------------------------------------*/ -struct GEM_EXTERN pixBlock -{ - pixBlock(); - - ////////// - // the block's image - imageStruct image; - - ////////// - // is this a newimage since last time? - // ie, has it been refreshed - int newimage; - - ////////// - // keeps track of when new films are loaded - // useful for rectangle_textures on OSX - int newfilm; -}; - -/////////////////////////////////////////////////////////////////////////////// -// imageStruct utility functions -// -/////////////////////////////////////////////////////////////////////////////// -////////// -// copies all of the data over and mallocs memory -GEM_EXTERN extern void copy2Image(imageStruct *to, imageStruct *from); - -////////// -// assumes that it only has to refresh the data -GEM_EXTERN extern void refreshImage(imageStruct *to, imageStruct *from); - -GEM_EXTERN extern int getPixFormat(char*); -#endif // GEMPIXUTIL_H_ diff --git a/externals/gridflow/bundled/Base/GemSIMD.h b/externals/gridflow/bundled/Base/GemSIMD.h deleted file mode 100644 index 32cdb32a..00000000 --- a/externals/gridflow/bundled/Base/GemSIMD.h +++ /dev/null @@ -1,111 +0,0 @@ - -/*----------------------------------------------------------------- -LOG - GEM - Graphics Environment for Multimedia - - include file for SIMD - - Copyright (c) 1997-1999 Mark Danks. mark@danks.org - Copyright (c) Günther Geiger. geiger@epy.co.at - Copyright (c) 2001-2002 IOhannes m zmoelnig. forum::für::umläute. IEM. zmoelnig@iem.kug.ac.at - For information on usage and redistribution, and for a DISCLAIMER OF ALL - WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. - ------------------------------------------------------------------*/ - -/* - * compiler-issues: - * - * gcc: when gcc is invoked with "-mmmx" (or "-msse2" or "-maltivec") - * the defines __MMX__ (or corresponding) will be defined automatically - * - * vc6: you will have to install the microsoft processor-pack to use MMX/SSE2 - * you have to have the sp5 for vc6 installed (note: do not install sp6!!) - * vc6/vc7: (i think) you need to define __MMX__ (and friends) by hand - */ - -#ifndef INCLUDE_GEMSIMD_H_ -#define INCLUDE_GEMSIMD_H_ - -#define GEM_VECTORALIGNMENT 128 - -const int GEM_SIMD_NONE=0; -const int GEM_SIMD_MMX=1; -const int GEM_SIMD_SSE2=2; -const int GEM_SIMD_ALTIVEC=3; - - -/* include for SIMD on PC's */ -#ifdef __SSE2__ -#include <emmintrin.h> -// for icc this should be <dvec.h> -typedef union{ - unsigned char c[16]; - __m128i v; -} vector_128; -#elif defined __VEC__ -/* for AltiVec (PowerPC) */ -typedef union{ - unsigned char c[16]; - vector unsigned char v; -} vector_128; -#endif - -#if defined __MMX__ -# include <mmintrin.h> -// for icc this should be <ivec.h> -typedef union{ - __m64 v; unsigned char c[8]; -} vector64i; - -#endif - - -#ifdef __SSE__ -#include <xmmintrin.h> - -typedef union{ - __m128 m; float f[4]; -} vector128f; -#endif - -#include "GemExportDef.h" - - -/* this is a help-class to query the capabilities of the cpu - * whenever you want to use SIMD-optimized code, you should - * make sure you chose the code-block based on the "cpuid" value - * of this class and NOT simply on preprocessor defines. - * - * this class needs only be instantiated once (and it is done in GemMan) - * this sets the cpuid - */ -class GEM_EXTERN GemSIMD -{ - public: - GemSIMD(); - ~GemSIMD(); - - /* this gets the "cpuid" (something like GEM_SIMD_NONE) */ - static int getCPU(); - - /* change the cpuid returned by getCPU() - * you can only set the cpuid to something that is actually supported - * by your processor - */ - static int requestCPU(int cpuid); - - /* performs a runtime-check (if possible) to determine the capabilities - * of the CPU - * sets realcpuid appropriately and returns this value - */ - static int simd_runtime_check(void); - - private: - /* this is the maximum capability of the CPU */ - static int realcpuid; - /* this is the current choosen capability (normally this equals realcpuid) */ - static int cpuid; -}; - -#endif /* INCLUDE_GEMSIMD_H_ */ diff --git a/externals/gridflow/bundled/Base/GemShape.h b/externals/gridflow/bundled/Base/GemShape.h deleted file mode 100644 index 101c975d..00000000 --- a/externals/gridflow/bundled/Base/GemShape.h +++ /dev/null @@ -1,115 +0,0 @@ -/*----------------------------------------------------------------- -LOG - GEM - Graphics Environment for Multimedia - - Base class for shapes - - Copyright (c) 1997-1999 Mark Danks. mark@danks.org - Copyright (c) Günther Geiger. geiger@epy.co.at - Copyright (c) 2001-2002 IOhannes m zmoelnig. forum::für::umläute. IEM. zmoelnig@iem.kug.ac.at - For information on usage and redistribution, and for a DISCLAIMER OF ALL - WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. - ------------------------------------------------------------------*/ - -#ifndef INCLUDE_GEMSHAPE_H_ -#define INCLUDE_GEMSHAPE_H_ - -#include "Base/GemBase.h" - -/*----------------------------------------------------------------- -------------------------------------------------------------------- -CLASS - GemShape - - Base class for shapes - -DESCRIPTION - - Inlet for a float - "ft1" - - "ft1" - the size of the shape - "draw" - the drawing style - "width" - the line width when drawing with lines - ------------------------------------------------------------------*/ -class GEM_EXTERN GemShape : public GemBase -{ - public: - - ////////// - // Constructor - // [in] size - A size of 0. means to just use the default (ie, 1.) - GemShape(t_floatarg size); - GemShape(); - - protected: - - ////////// - // Destructor - virtual ~GemShape(); - - //----------------------------------- - // GROUP: Access functions - //----------------------------------- - - ////////// - // The width of the lines in line draw mode - void linewidthMess(float linewidth); - - ////////// - // The size of the object - void sizeMess(float size); - - ////////// - // How the object should be drawn - virtual void typeMess(t_symbol *type); - - //----------------------------------- - // GROUP: Utility functions - //----------------------------------- - - void SetVertex(GemState* state,float x, float y, float z, float tx, float ty,int curCoord); - - //----------------------------------- - // GROUP: Member variables - //----------------------------------- - - ////////// - // The line width for GL_LINE mode - GLfloat m_linewidth; - - ////////// - // The size of the object - GLfloat m_size; - - ////////// - // The drawing style (GL_LINE, GL_POLYGON, etc) - GLenum m_drawType; - - ////////// - // The size inlet - t_inlet *m_inlet; - - //----------------------------------- - // GROUP: Setup functions - //----------------------------------- - - ////////// - // creation callback - static void real_obj_setupCallback(t_class *classPtr) - { GemBase::real_obj_setupCallback(classPtr); GemShape::obj_setupCallback(classPtr); } - - private: - - static inline GemShape *GetMyClass(void *data) {return((GemShape *)((Obj_header *)data)->data);} - - ////////// - // static member functions - static void obj_setupCallback(t_class *classPtr); - static void linewidthMessCallback(void *data, t_floatarg linewidth); - static void typeMessCallback(void *data, t_symbol *type); - static void sizeMessCallback(void *data, t_floatarg size); -}; - -#endif // for header file diff --git a/externals/gridflow/bundled/Base/GemState.h b/externals/gridflow/bundled/Base/GemState.h deleted file mode 100644 index b41d2ee3..00000000 --- a/externals/gridflow/bundled/Base/GemState.h +++ /dev/null @@ -1,150 +0,0 @@ -/*----------------------------------------------------------------- - LOG - GEM - Graphics Environment for Multimedia - - The state to pass among GEM objects - - Copyright (c) 1997-2000 Mark Danks. mark@danks.org - Copyright (c) Günther Geiger. geiger@epy.co.at - Copyright (c) 2001-2002 IOhannes m zmoelnig. forum::für::umläute. IEM. zmoelnig@iem.kug.ac.at - For information on usage and redistribution, and for a DISCLAIMER OF ALL - WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. - - -----------------------------------------------------------------*/ - -#ifndef INCLUDE_GEMSTATE_H_ -#define INCLUDE_GEMSTATE_H_ - -#include "Base/GemExportDef.h" -#include "Base/GemGL.h" - -struct pixBlock; -class TexCoord; - -/*----------------------------------------------------------------- - ------------------------------------------------------------------- - CLASS - TexCoord - - - DESCRIPTION - - -----------------------------------------------------------------*/ -class GEM_EXTERN TexCoord -{ - public: - TexCoord() : s(0.f), t(0.f) { } - TexCoord(float s_, float t_) : s(s_), t(t_) { } - float s; - float t; -}; - - -/*----------------------------------------------------------------- - ------------------------------------------------------------------- - CLASS - GemState - - The state to pass among GEM objects - - DESCRIPTION - - -----------------------------------------------------------------*/ -class GEM_EXTERN GemState -{ - public: - - ////////// - // Has something changed since the last time? - int dirty; - - ////////// - // Are we in a display list creation? - int inDisplayList; - - ////////// - // Lighting on? - int lighting; - - ////////// - // Smooth shading (flat is other type) - int smooth; - - ////////// - // Texture mapping on? - // 0..off - // 1..normalized texture - // 2..rectangle texture - int texture; - - ////////// - // The image to texture map - pixBlock *image; - - ////////// - // Texture coordinates. - // This can be NULL if there aren't any coordinates - TexCoord *texCoords; - - ////////// - // The number of TexCoords - int numTexCoords; - - ////////// - // The number of multiTexUnits - // default = 0, max = 7 - int multiTexUnits; - - ////////// - // Milliseconds since last frame - // If in Stereoscopic mode, then it is the same number for both left - // and right renderings - float tickTime; - - ////////////////// - // the default draw-type (might be overriden within a Geo) - GLenum drawType; - - ////////// - // how deep is the current stack /* 4 fields for the 4 stacks */ - int stackDepth[4]; - - //////////// - //vertex-array data - int VertexDirty; // the vertex-arrays has changed - - GLfloat *VertexArray; - int VertexArraySize; - int VertexArrayStride; - - GLfloat *ColorArray; - int HaveColorArray; - - GLfloat *NormalArray; - int HaveNormalArray; - - GLfloat *TexCoordArray; - int HaveTexCoordArray; - - ////////// - // Constructor - GemState(); - - float texCoordX(int num) { - if (texture && numTexCoords > num) - return texCoords[num].s; - else return 0.; - } - - float texCoordY(int num) { - if (texture && numTexCoords > num) - return texCoords[num].t; - else return 0.; - } - - /* reset (parts of?) the GemState: to be called from [gemhead] */ - void reset(); - -}; - -#endif // for header file diff --git a/externals/gridflow/bundled/Base/GemVector.h b/externals/gridflow/bundled/Base/GemVector.h deleted file mode 100644 index ce000833..00000000 --- a/externals/gridflow/bundled/Base/GemVector.h +++ /dev/null @@ -1,77 +0,0 @@ -/*----------------------------------------------------------------- -LOG - GEM - Graphics Environment for Multimedia - - vector-classes - - zmoelnig@iem.at, tigital@mac.com - - For information on usage and redistribution, and for a DISCLAIMER OF ALL - WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. - ------------------------------------------------------------------*/ - -#ifndef INCLUDE_GEMVECTOR_H_ -#define INCLUDE_GEMVECTOR_H_ - -#include "Base/GemExportDef.h" - - - -// This is our 2D point class. This will be used to store the UV coordinates. -class GEM_EXTERN CVector2 { -public: - float x, y; -}; - - -// This is our basic 3D point/vector class -class GEM_EXTERN CVector3 { -public: - // the elements of a vector: - float x, y, z; - - // A default constructor - CVector3(); - - // This is our constructor that allows us to initialize our data upon creating an instance - CVector3(float X, float Y, float Z); - - // Here we overload the + operator so we can add vectors together - CVector3 operator+(CVector3 vVector); - - // Here we overload the - operator so we can subtract vectors - CVector3 operator-(CVector3 vVector); - - // Here we overload the - operator so we can negate the vector - CVector3 operator-(); - - // Here we overload the * operator so we can multiply by scalars - CVector3 operator*(float num); - - // Here we overload the * operator so we can dot-multiply - float operator*(CVector3 vVector); - - // cross-multiplication - CVector3 cross(CVector3 vVector); - - // Here we overload the / operator so we can divide by a scalar - CVector3 operator/(float num); - - - // here we calculate the absolute-value of the vector - float abs(); - - // here we calculate the square of the absolute-value of the vector - float abs2(); - - // here we normalize the vector - CVector3 normalize(); - - // here we compare 2 vectors on approx. equality - bool equals(CVector3 vVector, float epsilon); - - -}; - -#endif /* INCLUDE_GEMVECTOR_H_ */ diff --git a/externals/gridflow/bundled/Base/GemVersion.h b/externals/gridflow/bundled/Base/GemVersion.h deleted file mode 100644 index 926407f0..00000000 --- a/externals/gridflow/bundled/Base/GemVersion.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef GEM_VERSION_H -#define GEM_VERSION_H - -#define GEM_VERSION_MAJOR 0 -#define GEM_VERSION_MINOR 91 -#define GEM_VERSION_BUGFIX 0 -#define GEM_VERSION_CODENAME "'tigital'" - - -#define STRINGIFY2(x) #x -#define STRINGIFY(x) STRINGIFY2(x) - -static const char *GEM_VERSION = \ - "" STRINGIFY(GEM_VERSION_MAJOR) \ - "." STRINGIFY(GEM_VERSION_MINOR) \ - "." STRINGIFY(GEM_VERSION_BUGFIX) \ - " " GEM_VERSION_CODENAME; - - -static const char *GEM_MAINTAINER = "IOhannes m zmoelnig"; - -static const char *GEM_AUTHORS[] = { - "Chris Clepper", - "James Tittle", - "IOhannes m zmoelnig"}; - -static const char* GEM_OTHERAUTHORS = - "Guenter Geiger, Daniel Heckenberg, Cyrille Henry, et al."; -#endif - diff --git a/externals/gridflow/bundled/Base/GemVertex.h b/externals/gridflow/bundled/Base/GemVertex.h deleted file mode 100644 index c390de98..00000000 --- a/externals/gridflow/bundled/Base/GemVertex.h +++ /dev/null @@ -1,37 +0,0 @@ - -/*----------------------------------------------------------------- -LOG - GEM - Graphics Environment for Multimedia - - include file for VertexArrays - - Copyright (c) 2004 IOhannes m zmoelnig. forum::für::umläute. IEM. zmoelnig@iem.kug.ac.at - For information on usage and redistribution, and for a DISCLAIMER OF ALL - WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. - ------------------------------------------------------------------*/ - - -#ifndef INCLUDE_GEMVERTEX_H_ -#define INCLUDE_GEMVERTEX_H_ - -#include "Base/GemBase.h" - -class GEM_EXTERN GemVertex : public GemBase { - protected: - - - ////////// - // Constructor - GemVertex(); - - ~GemVertex(); - - ////////// - // If anything in the object has changed - // especially, if the vertex-array has changed - virtual void setModified(); -}; - - -#endif /* INCLUDE_GEMVERTEX_H_ */ diff --git a/externals/gridflow/bundled/Base/GemWinCreate.h b/externals/gridflow/bundled/Base/GemWinCreate.h deleted file mode 100644 index 79104cde..00000000 --- a/externals/gridflow/bundled/Base/GemWinCreate.h +++ /dev/null @@ -1,224 +0,0 @@ -/*----------------------------------------------------------------- - -GEM - Graphics Environment for Multimedia - -create a window - -Copyright (c) 1997-1999 Mark Danks. mark@danks.org -Copyright (c) Günther Geiger. geiger@epy.co.at -Copyright (c) 2001-2002 IOhannes m zmoelnig. forum::für::umläute. IEM. zmoelnig@iem.kug.ac.at -For information on usage and redistribution, and for a DISCLAIMER OF ALL -WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. - ------------------------------------------------------------------*/ - -#ifndef INCLUDE_GEMWINCREATE_H_ -#define INCLUDE_GEMWINCREATE_H_ -#include "Base/config.h" - -#ifdef __unix__ -# include <GL/glx.h> -# ifdef HAVE_LIBXXF86VM -# include <X11/extensions/xf86vmode.h> -# endif -#elif defined __WIN32__ -# include <windows.h> -#elif defined __APPLE__ -# import <AGL/agl.h> -#else -# error Define OS specific window creation -#endif - -#include "Base/GemExportDef.h" - -// I hate Microsoft...I shouldn't have to do this! -#ifdef __WIN32__ -# pragma warning( disable : 4244 ) -# pragma warning( disable : 4305 ) -# pragma warning( disable : 4091 ) -#endif - -#include "m_pd.h" - -#include <string.h> - -/*----------------------------------------------------------------- - ------------------------------------------------------------------- - CLASS - WindowInfo - - All of the relavent information about an OpenGL window - - DESCRIPTION - - -----------------------------------------------------------------*/ -class GEM_EXTERN WindowInfo -{ - public: - - // Constructor - WindowInfo() : - fs(0), -#ifdef __unix__ - dpy(NULL), win(0), cmap(0), context(NULL), delete_atom(0) -#elif defined __WIN32__ - win(NULL), dc(NULL), context(NULL) -#elif defined __APPLE__ - pWind(NULL), context(NULL), offscreen(NULL), pixelSize(32), - pixMap(NULL), rowBytes(0), baseAddr(NULL) -#endif - {} - int fs; // FullScreen - int have_constContext; // 1 if we have a constant context - -#ifdef __unix__ - Display *dpy; // X Display - Window win; // X Window - int screen; // X Screen - Colormap cmap; // X color map - GLXContext context; // OpenGL context - Atom delete_atom; - -#ifdef HAVE_LIBXXF86VM - XF86VidModeModeInfo deskMode; // originale ModeLine of the Desktop -#endif - -#elif defined __WIN32__ - - HWND win; // Window handle - HDC dc; // Device context handle - HGLRC context; // OpenGL context - -#elif defined __APPLE__ - - WindowPtr pWind; // GEM window reference for gemwin - AGLContext context; // OpenGL context - GWorldPtr offscreen; // Macintosh offscreen buffer - long pixelSize; // - Rect r; // - PixMapHandle pixMap; // PixMap Handle - long rowBytes; // - void *baseAddr; // - short fontList; // Font - -#else -#error Define OS specific window data -#endif -}; - -/*----------------------------------------------------------------- - ------------------------------------------------------------------- - CLASS - WindowHints - - Hints for window creation - - DESCRIPTION - - -----------------------------------------------------------------*/ -class GEM_EXTERN WindowHints -{ - public: - - ////////// - // Should the window be realized - int actuallyDisplay; - - ////////// - // Single or double buffered - int buffer; - - ////////// - // The width/x of the window - int width; - ////////// - // The height/y of the window - int height; - - ////////// - // the real width/height of the window (set by createGemWindow()) - int real_w, real_h; - - ////////// - // The offset/x of the window (likely tobe overridden by the window-manager) - int x_offset; - ////////// - // The offset/y of the window (likely tobe overridden by the window-manager) - int y_offset; - - ////////// - // Should we do fullscreen ? - int fullscreen; - - ////////// - // Is there a second screen ? - int secondscreen; - - ////////// - // Should there be a window border? - int border; - - ////////// - // mode for full-screen antialiasing - int fsaa; - - ///// if we can use a different display , this has its meaning under X - char* display; - - ////////////// - // display some title.... - char* title; - - ////////// - // The GLXcontext to share rendering with -#ifdef __unix__ - GLXContext shared; -#elif defined __WIN32__ - HGLRC shared; -#elif defined __APPLE__ - AGLContext shared; -#else -#error Define OS specific OpenGL context -#endif -}; - -////////// -// Create a new window -GEM_EXTERN extern int createGemWindow(WindowInfo &info, WindowHints &hints); - -////////// -// Destroy a window -GEM_EXTERN extern void destroyGemWindow(WindowInfo &info); - -////////// -// Set the cursor -GEM_EXTERN extern int cursorGemWindow(WindowInfo &info, int state); - -////////// -// Set the topmost position -GEM_EXTERN extern int topmostGemWindow(WindowInfo &info, int state); - -////////// -// swap the buffers (get's called in double-buffered mode) -GEM_EXTERN extern void gemWinSwapBuffers(WindowInfo &nfo); -///////// -// reestablish a context -GEM_EXTERN extern void gemWinMakeCurrent(WindowInfo &nfo); - -///////// -// init OS-specific stuff -GEM_EXTERN extern bool initGemWin(void); - -///////// -// prepare a WindowInfo for context-sharing -GEM_EXTERN void initWin_sharedContext(WindowInfo &info, WindowHints &hints); - - - -///////// -// -GEM_EXTERN extern void dispatchGemWindowMessages(WindowInfo &nfo); - - - -#endif // for header file diff --git a/externals/gridflow/bundled/Base/config.h b/externals/gridflow/bundled/Base/config.h deleted file mode 100644 index bd2a823c..00000000 --- a/externals/gridflow/bundled/Base/config.h +++ /dev/null @@ -1,65 +0,0 @@ -/* configuration-file */ -#ifndef HAVE_BASE_CONFIG_H_ -#define HAVE_BASE_CONFIG_H_ - -#ifdef _MSC_VER -# ifndef __WIN32__ -# define __WIN32__ -# endif -#endif - -#ifdef __WIN32__ -# ifndef NT -# define NT -# endif -# ifndef MSW -# define MSW -# endif -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -# endif -#endif - - - -#ifdef HAVE_CONFIG_GENERIC_H - -# include "Base/configGeneric.h" - -#else /* includes system-specific files */ - -# ifdef __linux__ -# include "Base/configLinux.h" -# endif - -# ifdef __APPLE__ -//# include "Base/configDarwin.h" -# define HAVE_QUICKTIME -# endif - -# ifdef __WIN32__ -# include "Base/configNT.h" -# endif -#endif - -#ifdef NEW_VIDEOFILM -# ifndef FILM_NEW -# define FILM_NEW -# endif -# ifndef VIDEO_NEW -# define VIDEO_NEW -# endif -#endif - -#ifdef HAVE_LIBFTGL -# define FTGL -#endif - -#ifdef HAVE_FFMPEG -# define HAVE_LIBAVCODEC -# define HAVE_LIBAVFORMAT -#elif defined (HAVE_LIBAVCODEC) && defined (HAVE_LIBAVFORMAT) -# define HAVE_FFMPEG -#endif - -#endif /* HAVE_BASE_CONFIG_H_ */ diff --git a/externals/gridflow/bundled/Base/configLinux.h b/externals/gridflow/bundled/Base/configLinux.h deleted file mode 100644 index ca0a20b8..00000000 --- a/externals/gridflow/bundled/Base/configLinux.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Base/configLinux.h. Generated from configLinux.h.in by configure. */ - -/* fullscreen: querying via libXxf86vm */ -/* #undef HAVE_LIBXXF86VM */ - -/* font rendering */ -/* #undef HAVE_LIBFTGL */ - -/* image loading / saving */ -#define HAVE_LIBTIFF 1 -#define HAVE_LIBJPEG 1 -/* #undef HAVE_LIBMAGICKPLUSPLUS */ - -/* movie decoding */ -#define HAVE_LIBMPEG 1 -#define HAVE_LIBMPEG3 1 -#define HAVE_LIBQUICKTIME 1 -#define HAVE_LQT_OPEN_WRITE 1 -/* #undef HAVE_LIBAVIPLAY */ -#define HAVE_FFMPEG 1 -#define GEM_AVSTREAM_CODECPOINTER 1 - -/* video grabbing */ -#define HAVE_VIDEO4LINUX 1 -/* #undef HAVE_VIDEO4LINUX2 */ -#define HAVE_LIBDV 1 - -/* image analysis */ -/* #undef HAVE_ARTOOLKIT */ - -/* posix threads */ -#define HAVE_PTHREADS 1 - -/* enable the use of the all-in-one video/movie objects */ -#define NEW_VIDEOFILM 1 - -/* types, structures, compiler characteristics, ... */ -#define SIZEOF_VOID_P 4 -#define SIZEOF_UNSIGNED_INT 4 - diff --git a/externals/gridflow/bundled/g_canvas.h b/externals/gridflow/bundled/g_canvas.h deleted file mode 100644 index 07fa75b5..00000000 --- a/externals/gridflow/bundled/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/configure b/externals/gridflow/configure deleted file mode 100755 index cdf3896e..00000000 --- a/externals/gridflow/configure +++ /dev/null @@ -1,854 +0,0 @@ -#!/usr/bin/env ruby -# $Id: configure 3946 2008-06-26 15:36:22Z matju $ -=begin - GridFlow - Copyright (c) 2001-2007 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 "rbconfig" -require "ftools" -$CFLAGS = "" -include Config -OSX = !!( CONFIG["arch"] =~ /darwin/ ) - -require "win32/process" if CONFIG["arch"] =~ /mingw/ -LOG = File.open "./config.log", "w" - -Red = "\e[0;1;31m" -Green = "\e[0;1;32m" -Light = "\e[0m" -Dark = "\e[0;1;30m" -Yellow = "\e[0;1;33;44m" - -$verbose=false -LOG.puts "-"*64 -LOG.puts "Environment Variables: " -ENV.each {|k,v| LOG.puts "#{k}=#{v}" } -LOG.puts "-"*64 - -puts -if not File.exist?("./configure") - puts "Run me from the right directory please." - exit 1 -end - -begin Dir.mkdir "tmp"; rescue Errno::EEXIST; end - -#----------------------------------------------------------------# - -class Or - attr_reader :a - class<< self; alias [] new end - def initialize(*a) @a=a end - def to_s; @a.join " or "; end -end - -def launch2(log,*command) - log << command.join(" ") << "\n" - r,w = IO.pipe - child = launch(nil,w,w,*command) - w.close - log << r.readlines.join << "\n" - ret = join_pid(child) - ret = ret.to_int if RUBY_VERSION > "1.7" - log << "error \##{ret}\n" if ret>0 - return ret<=0 -end - -$conf={ - :LDSOFLAGS => [], - :FEATURES => {}, - :OPTIONS => [], - :DEFINES => { - :CPU => nil, - :GEM_INCLUDE => "../Gem/src", - }, - :CC => "g++", - :OBJS => [], -} - -def launch stdin,stdout,stderr,*command # -> returncode - child = fork - if not child then - STDIN .reopen stdin if stdin - STDOUT.reopen stdout if stdout - STDERR.reopen stderr if stderr - exec *command - #!@#$ what happens with exception upon exec ? - end - child -end - -def join_pid pid - Process.waitpid2(pid)[1] -end - -module Future; end - -class Feature - $features = [] - def self.add(*a,&b) $features << Feature.new(*a,&b) end - def initialize(&b) instance_eval(&b) end - def self.attr2(sym,&b) - eval "def #{sym}(*args,&b) - raise args.inspect if args.length>1 - if b then @#{sym}=b.extend Future - elsif args.length>0 then @#{sym}=args[0] - else if Future===@#{sym} then @#{sym}.call else @#{sym} end end end" - end - attr2 :tag - attr2 :name - attr2 :status - attr2 :uses_so - attr2 :uses_o - attr2 :uses_h - attr2 :uses_feature - attr2 :test - attr2 :options - attr2 :unless_feature - attr2 :action - attr2 :defines - def find_h name - if name[0..0]=="/" then - File.exist?(name) - else - $C_INCLUDE_PATH.find {|x| File.exist?(x+"/"+name)} - end - end - def c_test code, link=nil, options=[], feature=nil - link = (uses_so||[]).dup if not link - link=link.flatten - ldlpath = ENV["LD_LIBRARY_PATH"] - uses_h.each {|h| - find_h h or - /framework/ =~ (uses_so||[]).join(" ") or - raise "where is #{h} ?" - } if uses_h - ENV["LD_LIBRARY_PATH"] = ldlpath ? "./tmp:#{ldlpath}" : "./tmp" - link[0,0]=$conf[:LDSOFLAGS].find_all {|x| String===x and /^-L/ =~ x }.flatten - code=code.gsub(/#include#/) { - uses_h.map {|inc| "#include <#{inc}>\n" }.join"" - } - log = "" - log << code << "\n" - binname = "tmp/#{$$}" - sourcename = binname+".cpp" - File.open(sourcename,"w") {|f| f.puts code } - command = ["/usr/bin/env", $conf[:CC]] + - $CFLAGS.split(/ /).reject{|x| x.length==0 } - if not launch2 log,*(command+options+[sourcename, - "-o", binname, *link]) - pat = Regexp.new("^"+Regexp.quote(sourcename)+":\\d+: ") - errs = log.split("\n").find_all {|l| pat =~ l } - raise "gcc compilation error" if not errs or - errs.length==0 - errs = errs[0].gsub(pat,"") - raise "gcc: #{errs}" - end - if not launch2 log,"tmp/#{$$}" - raise "runtime error" - end - return true - ensure - LOG.puts log - ENV["LD_LIBRARY_PATH"] = ldlpath if ldlpath - end - def asm_test code, *link - log = "" - log << code << "\n" - File.open("tmp/#{$$}.asm","w") {|f| f.puts code } - command = ["/usr/bin/env", "nasm", - "tmp/#{$$}.asm", "-f", "elf", "-o", "tmp/#{$$}.o"] - launch2 log,*command or return false - command = ["#{$conf[:CC]}","-o","tmp/#{$$}","tmp/#{$$}.o",*link] - launch2 log,*command or return false - command = ["tmp/#{$$}"] - launch2 log,*command or return false - true - ensure - LOG.puts log - end -end - -#----------------------------------------------------------------# - -def read_ld_so_conf - return [] unless File.exist?("/etc/ld.so.conf") - x = File.open("/etc/ld.so.conf"){|f| f.read }.split("\s") - x.delete_if { x.length==0 } - x -end - -def epath x; (ENV[x]||"").split(":") end - -$C_INCLUDE_PATH = ( - epath("CPLUS_INCLUDE_PATH") + - epath("C_INCLUDE_PATH") + - ["/usr/include"]).uniq -$LIBRARY_PATH = ( - epath("LIBRARY_PATH") + - ["/usr/lib","/lib"]).uniq -$LD_LIBRARY_PATH = ( - epath("LD_LIBRARY_PATH") + - read_ld_so_conf + - ["/usr/lib","/lib"]).uniq -$LIBX11DIR = [ - "-L/usr/X11R6/lib", "-L/opt/gnome/lib", - "-L/usr/X11R6/lib64","-L/opt/gnome/lib64"] -$LIBX11 = $LIBX11DIR + ["-lX11"] - -# making it easier for everybody I hope: -def prepend_path base - bl = base+"/lib" - bi = base+"/include" - if not $LD_LIBRARY_PATH.include? bl and - not $LIBRARY_PATH.include? bl then - $conf[:LDSOFLAGS].unshift "-L"+bl - $LD_LIBRARY_PATH.unshift bl - $LIBRARY_PATH.unshift bl - end - #and not $CPLUS_INCLUDE_PATH.include? bi - if not $C_INCLUDE_PATH.include? bi then - $CFLAGS += " -I"+bi - $C_INCLUDE_PATH.unshift bi - end -end -prepend_path "/sw" if OSX -prepend_path "/usr/local" -prepend_path ENV["HOME"] -$CFLAGS += " -I." -$C_INCLUDE_PATH.unshift "." - -for var in [:$C_INCLUDE_PATH, :$LIBRARY_PATH, :$LD_LIBRARY_PATH] do - LOG.puts "#{var}: #{eval(var.to_s).inspect}" -end - -LOG.puts "-"*64 - -$CFLAGS += " -xc++ -fno-operator-names" -$CFLAGS += " -I/usr/X11R6/include" -$C_INCLUDE_PATH.unshift "/usr/X11R6/include" - -#----------------------------------------------------------------# -Feature.add { - tag :gcc3 - name "GNU C++ Compiler 3 (or 4)" - options ["HAVE_GCC3"] - defines :GCC_VERSION => proc { - m = /GCC_VERSION\s+(.*)/.match(File.popen("tmp/#{$$}","r"){|f| f.read }) - m[1] - } - # how does this handle two test procs again? - test proc { - pi=File.popen "#{$conf[:CC]} -v 2>&1", "r" - vline = pi.readlines.find {|l| /gcc version ([\d\.]+)/.match l } - version = $1 - pi.close - if version < "3" then raise "version #{version} < 3" end - true - } - test proc { - c_test %{ - #include <stdio.h> - int main () { - printf("GCC_VERSION %d.%d.%d\\n", __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__); - return !(__GNUC__>=3); - }}}} -Feature.add { - tag :stl - name "C++ Standard Template Library" - test proc { - c_test %{ - #include <vector> - int main () {std::vector<int> foo;}}}} -Feature.add { - tag :gcc64 - name "GNU C++ in 64-bit mode" - options ["GCC64"] - test proc { - c_test %{ - #include <stdio.h> - #include <stdlib.h> - #include <cstddef> - #include <sys/types.h> - #define T(a) printf("%s:%ld; ",#a,(long)sizeof(a)); - int main () { - T(void *)T(ptrdiff_t)T(off_t)T(size_t)puts(""); - T(char)T(short)T(int)T(long)T(long long)puts(""); - T(float)T(double)puts(""); - return !( sizeof(void*)==8 ); - }}}} -Feature.add { - tag :pentium - name "Pentium-compatible CPU" - action proc { $conf[:DEFINES][:CPU] ||= "pentium" } - options ["HAVE_PENTIUM"] - test proc { - (CONFIG["arch"] =~ /(i\d86|x86_64)/) or raise "#{CONFIG["arch"]} instead" - c_test ' - #include <stdio.h> - char get_cpuid[]={ - 96,49,192,15,162,139,124,36,36,137,31, - 137,87,4,137,79,8,137,71,12,97,195}; - main() { - char result[16]; - int code; - ((void(*)(char*))get_cpuid)(result); - code = ((int*)result)[3]; - result[12]=0; - fprintf(stderr,"cpuid: name=\"%12s\", flags=0x%08x\n", - result,code); - return 0;}'}} -Feature.add { - tag :mmx - uses_feature [:pentium] - uses_o ["base/mmx.o","base/mmx_loader.o"] - name "MMX-compatible CPU (using NASM)" - options ["HAVE_MMX"] - test proc { #!@#$ isn't 64-bit-compatible - asm_test ' - global main - extern exit - align 16 - SECTION .data - foo: dd 42,0 - SECTION .text - main: - lea esi,[foo] - movq mm0,qword[esi] - paddd mm0,qword[esi] - movq qword [esi],mm0 - emms - cmp dword [foo], 84 - je yes - push long 1 - call exit - yes: - push long 0 - call exit - ', '-lc'}} -Feature.add { - tag :x11 - name "X11 Display Protocol" - uses_so $LIBX11 - uses_h ["X11/Xlib.h"] - uses_o ["format/x11.o"] - test proc { - c_test " - #include# - int main () {return XSetErrorHandler==0;}"}} -Feature.add { - tag :x11_shm - name "X11 acceleration by shared memory (XSHM plugin)" - uses_feature [:x11] - uses_so $LIBX11+["-lXext"] - uses_h ["X11/Xlib.h","sys/shm.h","X11/extensions/XShm.h"] - options ["HAVE_X11_SHARED_MEMORY"] - test proc { - c_test " - #include# - #include <X11/Xutil.h> - #include <X11/StringDefs.h> - #include <sys/ipc.h> - int main () {return XShmPutImage==0;}"}} -Feature.add { - tag :sdl - name "Simple Directmedia Layer (experimental support)" - uses_so { - a=["-lSDL","-lpthread"] - a << "-lobjc" if OSX - a - } - uses_h ["SDL/SDL.h"] - uses_o ["format/sdl.o"] - test proc { - c_test " - #include# - #undef main - int main () {return SDL_MapRGB==0;}"}} -Feature.add { - tag :objcpp - name "GNU/Apple ObjectiveC++ Compiler" - uses_h ["objc/Object.h"] - uses_so ["-lobjc"] - test proc { - c_test " - #include# - int main () { [[Object alloc] init]; } - ", nil, ["-xobjective-c++"]}} -Feature.add { - tag :quartz - name "Apple Quartz/Cocoa Display" - uses_so ["-lobjc",["-framework","Cocoa"]] - uses_feature [:objcpp] - uses_h ["objc/Object.h","Cocoa/Cocoa.h"] - uses_o ["format/quartz.o"] - test proc { - c_test " - #include# - int main () {return CGImageRelease==0;} - ", nil, ["-xobjective-c++"]}} -Feature.add { - tag :aalib - name "Ascii Art Library" - uses_so ["-laa"] - uses_h ["aalib.h"] - uses_o ["format/aalib.o"] - test proc { - c_test " - #define aa_hardwareparams aa_hardware_params - extern \"C\" { - #include# - }; - int main () {return aa_init==0;}"}} -Feature.add { - tag :netpbm - name "NetPBM 10 Library" - uses_so ["-lnetpbm"] - uses_h ["pam.h"] - uses_o ["format/netpbm.o"] - test proc { - c_test " - #include# - int main () {return pm_init==0;}"}} -Feature.add { - tag :jpeg - name "JPEG Library" - uses_so ["-ljpeg"] - uses_h ["jpeglib.h"] - uses_o ["format/jpeg.o"] - test proc { - c_test " - extern \"C\" { - #include <stdio.h> - #include# - }; - int main () { - return jpeg_write_scanlines==0;}"}} -Feature.add { - tag :png - name "PNG Library" - uses_so ["-lpng","-lz"] - uses_h Or[["libpng12/png.h"],["png.h"]] - uses_o ["format/png.o"] - test proc {|f| - f.c_test %` - extern "C" { - #include <stdio.h> - #include# - }; - int main () { - #define T(a) printf("%s:%d; ",#a,sizeof(a)); - T(png_uint_32)T(long)puts(""); - if (!png_check_sig) return 1; - return 0;}`}} -Feature.add { - tag :videodev - name "Video4linux Digitizer Driver Interface" - uses_h ["linux/videodev.h"] - uses_o ["format/videodev.o"] - #uses_o ["format/videodev-old.o"] - test proc { - c_test " - #include <stdlib.h> - #include# - int main () { struct video_window foo; return 0; }"}} -Feature.add { - tag :dc1394 - name "DC1394 for Linux" - uses_so ["-ldc1394_control"] - uses_h ["libdc1394/dc1394_control.h"] - uses_o ["format/dc1394.o"] - options ["HAVE_DC1394"] - test proc { - c_test " - #include# - int main () {return dc1394_get_camera_port==0;}"}} -Feature.add { - tag :mpeg3 - name "HeroineWarrior LibMPEG3" - uses_so $LIBX11DIR+["-lmpeg3","-lpthread","-lm"] - uses_h Or["libmpeg3/libmpeg3.h","libmpeg3.h"] - uses_o ["format/mpeg3.o"] - test proc {|f| - f.c_test " - #include# - int main () { return mpeg3_open==0; }"}} -Feature.add { - tag :quicktimeapple - name "Apple's QuickTime" - uses_so [["-framework","Quicktime"]] - uses_h ["QuickTime/QuickTime.h","QuickTime/Movies.h"] - uses_o ["format/quicktimeapple.o"] - test proc { - c_test " - #include# - int main () { return EnterMovies==0; } - "}} -Feature.add { - tag :quicktimehw - unless_feature :quicktimeapple - name "Plaum's LibQuickTime" - uses_so Or[ - $LIBX11DIR+["-lquicktime","-lpthread","-lpng","-ldl","-lglib","-lz"], - $LIBX11DIR+["-lquicktime","-lpthread","-lpng","-ldl","-lglib-1.2","-lz"]] - f = ["quicktime.h","colormodels.h","lqt.h","lqt_version.h","lqt_codecinfo.h"] - uses_h Or[ - f.map{|x| "lqt/"+x }, - f.map{|x| "quicktime/"+x }] - uses_o ["format/quicktimehw.o"] - test proc {|f| - f.c_test %` - #include <stdio.h> - #include# - int main () { - fprintf(stderr,"LQT_VERSION = %s\\n", - #ifdef LQT_VERSION - LQT_VERSION - #else - "(undefined)" - #endif - ); return quicktime_open==0; } - `}} -Feature.add { - tag :puredata - name "PureData (or DesireData)" - options ["HAVE_PUREDATA"] - defines { - path = $C_INCLUDE_PATH.find {|x| File.exist?(x+"/m_pd.h")} - m = /PD_VERSION_INT\s+(.*)/.match(File.popen("tmp/#{$$}","r"){|f| f.read }) - {:PD_VERSION_INT => m[1].to_i} - } - uses_h ["m_pd.h"] - test proc { - c_test %` - #include# - #include <stdio.h> - int main () { - printf("#define PD_VERSION_INT %d\\n", - #ifdef PD_MAJOR_VERSION - (int)(PD_MAJOR_VERSION*100+PD_MINOR_VERSION)); - #else - (int)(PD_VERSION*100)); - #endif - return 0;}`}} -Feature.add { - tag :desiredata - name "DesireData" - uses_h ["m_pd.h"] - defines ["HAVE_DESIREDATA"] - test proc { - c_test %` - #include# - int main () {return !gobj_subscribe;}`}} -Feature.add { - tag :gem09 - name "PureData GEM (source code) with m_holdname" - uses_feature [:puredata] - uses_o ["optional/gem.o"] - options ["HAVE_GEM","HAVE_HOLDNAME"] - test proc { - # hack - $C_INCLUDE_PATH.unshift $conf[:DEFINES][ :GEM_INCLUDE] - $CFLAGS += " -I"+$conf[:DEFINES][ :GEM_INCLUDE] - c_test %` - #include "Base/GemBase.h" - int main () {CPPExtern::m_holdname; return 0;}`}} -Feature.add { - tag :gem08 - unless_feature:gem09 - name "PureData GEM (source code) without m_holdname" - uses_feature [:puredata] - uses_o ["optional/gem.o"] - options ["HAVE_GEM"] - test proc { - # hack - $C_INCLUDE_PATH.unshift $conf[:DEFINES][ :GEM_INCLUDE] - $CFLAGS += " -I"+$conf[:DEFINES][ :GEM_INCLUDE] - c_test %` - #include "Base/GemBase.h" - int main () {return 0;}`}} -Feature.add { - tag :opencv - name "Intel OpenCV" - uses_o ["optional/opencv.o"] - uses_so ["-lcv"] - options ["HAVE_OPENCV"] - defines {{:OPENCV_SHARE_PATH => File.dirname($C_INCLUDE_PATH.find {|x| File.exist?(x+"/opencv/cv.h")}) + "/share/opencv"}} - test proc { - c_test %` - #include <opencv/cv.h> - int main () {return 0;}`}} -Feature.add { - tag :fftw - name "FFTW (Fastest Fourier Transform in the West)" - uses_o ["optional/fftw.o"] - uses_so ["-lfftw3f","-lfftw3"] - options ["HAVE_FFTW"] - test proc { - c_test %` - #include <fftw3.h> - int main () {return 0;}`}} -#--------------------------------# - -$features_h = {} -$features.each {|f| $features_h[f.tag]=f } - -def usage - log = "" - log << "usage: ./configure " - log << "[--use-compiler compiler] [--use-compiler-option option]* " - log << "[--use-cpu cpu] [--lite] [--debug]" - log << "[--gem-include directory]" - $features_h.keys.map {|k| k.to_s }.sort.each {|k| log << "[--no-#{k}] " } - $features_h.keys.map {|k| k.to_s }.sort.each {|k| log << "[--force-#{k}] " } - puts - while log.length>0 do puts log.slice!(/^.{1,70} /) end -end - -$debug=false -while ARGV.length>0 do - arg=ARGV.shift - case arg - when /=/ - i=arg.index '=' - ARGV.unshift arg[0..i-1], arg[i+1..-1] - when /^--no-/ - name = arg[5..-1].untaint.intern - puts "there is no feature called #{name}" if not $features_h[name] - puts "--no: won't check for feature #{name}" - $features_h.delete name - when /^--force-/ - name = arg[8..-1].untaint.intern - puts "there is no feature called #{name}" if not $features_h[name] - puts "--force: assuming #{name} is there" - $features_h[name].test nil - when "--static" # experimental - $conf[:STATIC]=true - $conf[:LDSOFLAGS] << "-static" - when "--debug" - puts "Debug Mode (more error checking; less speed)" - $debug=true - $conf[:OPTIONS].push :HAVE_DEBUG - when "--lite" - puts "Lite Mode (no float64, no int64)" - $conf[:OPTIONS].push :HAVE_LITE - when "--help" - usage; exit 0 - when "--gem-include" - $conf[:DEFINES][ :GEM_INCLUDE]=ARGV.shift - when "--use-compiler" - $conf[:CC] = ARGV.shift - when "--use-compiler-option" - $CFLAGS += " "+ARGV.shift - when "--use-cpu" - $conf[:DEFINES][:CPU] = ARGV.shift - when "--verbose" - $verbose=true - else puts "unknown option \"#{arg}\""; usage; exit 1 - end -end - -if $debug - $CFLAGS += " -O0 -fno-inline" -else - $CFLAGS += " -O3" -end - -#--------------------------------# - -DUAL = Object.new -DUAL.instance_eval { - def self.print x - LOG .puts x; LOG .flush - STDERR.print x; STDERR.flush - end - def self.puts(x) self.print x+"\n" end -} - -def try feature - if Proc===feature.uses_so then feature.uses_so(feature.uses_so[]) end - if Or===feature.uses_so - k=1; feature.uses_so.a.each {|i| - e=feature.dup; e.uses_so i; e.name(e.name+" (try \##{k})") - r=try e; k+=1; return r if r } - return false - end - if Proc===feature.uses_h then feature.uses_h(feature.uses_h[]) end - if Or===feature.uses_h - k=1; feature.uses_h.a.each {|i| - i=[i] if String===i - e=feature.dup; e.uses_h i; e.name(e.name+" <#{i[0]}>") - r=try e; k+=1; return r if r } - return false - end - LOG.puts "", "-"*64 - line = "[#{feature.tag}] #{feature.name}: " - DUAL.print Light + "[#{Yellow}#{feature.tag}#{Light}] #{feature.name}: " - arrow = "-"*([78-line.length,0].max)+ "> " - #DUAL.print Dark + arrow +Red - (feature.uses_feature||[]).find {|f| - if not ( - if Or===f then f.a.find {|x| $conf[:FEATURES][x] } else $conf[:FEATURES][f] end - ) then - DUAL.puts Red+arrow+"disabled (would need #{f})" - return - end - } - if feature.status==:disabled then DUAL.puts Dark+arrow+"disabled (by author)"; return end - if not $features_h[feature.tag] then DUAL.puts Dark+arrow+"disabled (by user)"; return end - fu = feature.unless_feature || [] - fu = [fu] if not Array===fu - for f in fu || [] do - if $conf[:FEATURES][f] then DUAL.puts Dark+arrow+"disabled (using #{f} instead)"; return end - end - if feature.test - begin tresult = feature.test.call(feature); rescue StandardError => e; end - if tresult - DUAL.puts Green+arrow+"found "+(if tresult!=true then " (#{tresult})" else "" end) - if tresult == "static" - feature.uses_so.map! {|x| - "-Wl,--whole-archive #{x} -Wl,--no-whole-archive" - } if feature.uses_so - end - else - DUAL.puts Red+arrow+"missing "+(if e - then (if $verbose - then "(#{e} @ #{e.backtrace.join', '})" - else "(#{e})" end) - else "(return false)" end) - if e - LOG.puts e.inspect - LOG.puts e.backtrace - end - return false - end - else - puts Green+arrow+"enabled" - $conf[:FEATURES][feature.tag] = feature - feature.action.call if feature.action - end - feature.action.call if feature.action - $conf[:FEATURES][feature.tag] = feature - $conf[:LDSOFLAGS].concat(feature.uses_so||[]) - $conf[:OBJS].concat(feature.uses_o||[]) - $conf[:OPTIONS].concat(feature.options||[]) - for k,v in feature.defines||{} do - $conf[:DEFINES][k]=(if Proc===v then v[] else v end) - end - true -end - -DUAL.puts "This is the GridFlow 0.9.4 configurator" - -begin - $features.each {|feature| try feature } -ensure - #!@#$ note: see END{} (duplication) - system "/bin/rm -f tmp/#{$$} tmp/#{$$}.c tmp/#{$$}.o tmp/#{$$}.asm" -end - -puts Light - -$conf[:LDSOFLAGS].uniq! - -if not $conf[:FEATURES][:gcc3] - puts "You should install gcc 3.x; gcc 2.9.x is no longer supported" - puts "(you might use --force-gcc3 to pretend at your own risk)" - exit 1 -end - -if not $conf[:FEATURES][:puredata] - puts "PureData support is required (since GridFlow 0.9.0)" -end - -#--------------------------------# - -LOG.puts "-"*64 -for z in [:LDSOFLAGS, :OPTIONS, :DEFINES, :OBJS] do - LOG.puts "#{z}: #{$conf[z].inspect}" -end -LOG.puts "-"*64 -RUBY = "$(RUBY_INSTALL_NAME)" - -puts "generating ./config.make" -File.open("./config.make","w") {|f| - $CFLAGS += " -mcpu=$(CPU)" if $conf[:DEFINES][:CPU] and $conf[:DEFINES][:GCC_VERSION] < "4" - $CFLAGS += " -mtune=$(CPU)" if $conf[:DEFINES][:CPU] and $conf[:DEFINES][:GCC_VERSION] >= "4" - $CFLAGS += " -march=$(CPU)" if $conf[:DEFINES][:CPU] - $CFLAGS += " -DMACOSX" if OSX - f.puts "CFLAGS += " + $CFLAGS - f.puts "LDSOFLAGS += " + $conf[:LDSOFLAGS].flatten.join(" ") - for k in $conf[:OPTIONS] do f.puts "#{k}=yes" end - for k,v in $conf[:DEFINES] do f.puts "#{k}=#{v}" end - f.puts "CXX = #{$conf[:CC]}" - f.puts "OBJS = #{$conf[:OBJS].join(" ")}" - f.puts "DLEXT = #{CONFIG['DLEXT']}" - f.puts "" - if OSX then - f.puts "OS = darwin" - else - f.puts "OS = linux" - end -} # end open config.make - -#--------------------------------# -puts "generating config.h" -File.open("config.h","w") {|f| -f.puts " -\#ifndef __CONFIG_H -\#define __CONFIG_H -/* this file was auto-generated by gridflow/configure */" -f.puts "#define STARTUP_LIST(PRE) \\" -f.puts $conf[:OBJS].map {|o| - oo = File.basename(o,'.o').split(/-/)[0] - "PRE startup_#{oo}();" -}.join("\\\n") -for k in $conf[:OPTIONS] do f.puts "\#define #{k}" end -for k,v in $conf[:DEFINES] do f.puts "\#define #{k} "+v.inspect end - -def include_here(f,a,b) - return unless $conf[:FEATURES][b] - f.puts "\#ifdef #{a}_INCLUDE_HERE" - for inc in $conf[:FEATURES][b].uses_h.to_a do - f.puts "\#include <#{inc}>" - end - f.puts "\#endif" -end -include_here f,"LIBMPEG", :mpeg3 -include_here f,"QUICKTIMEHW",:quicktimehw - -f.puts " -\#endif /* __CONFIG_H */" -} # end open config.h - -#--------------------------------# -for s in [ -"See ./config.log if you want the details of the configuration tests.", -"If you are satisfied with that configuration, you may go on,", -"and do \"make\". \"make install\" is not needed anymore,", -"just move your gridflow directory to \"lib/pd/extra\".", -"If you get stuck, you could contact the author about it,", -"but first make sure you read \"doc/install.html\". ", -""] do puts "\e[1m#{s}\e[0m" end - -#--------------------------------# -END { - system "/bin/rm -f tmp/#{$$} tmp/#{$$}.c tmp/#{$$}.o tmp/#{$$}.asm" -} diff --git a/externals/gridflow/deprecated/0x40!.pd b/externals/gridflow/deprecated/0x40!.pd deleted file mode 100644 index d460562f..00000000 --- a/externals/gridflow/deprecated/0x40!.pd +++ /dev/null @@ -1,30 +0,0 @@ -#N canvas 589 39 450 300 10; -#X obj 37 38 inlet; -#X obj 37 204 outlet; -#X obj 37 57 t a a; -#X obj 66 57 #type; -#X obj 37 156 # +; -#X msg 56 156 list \$1 #; -#X obj 147 44 loadbang; -#X obj 147 63 args op; -#X obj 147 82 sel rand abs sq sqrt; -#X msg 117 116 op rand; -#X msg 160 116 op abs-; -#X msg 246 116 op sqrt; -#X msg 203 116 op sq-; -#X connect 0 0 2 0; -#X connect 2 0 4 0; -#X connect 2 1 3 0; -#X connect 3 0 5 0; -#X connect 4 0 1 0; -#X connect 5 0 4 1; -#X connect 6 0 7 0; -#X connect 7 0 8 0; -#X connect 8 0 9 0; -#X connect 8 1 10 0; -#X connect 8 2 12 0; -#X connect 8 3 11 0; -#X connect 9 0 4 0; -#X connect 10 0 4 0; -#X connect 11 0 4 0; -#X connect 12 0 4 0; diff --git a/externals/gridflow/deprecated/0x40complex_sq.pd b/externals/gridflow/deprecated/0x40complex_sq.pd deleted file mode 100644 index 9933d443..00000000 --- a/externals/gridflow/deprecated/0x40complex_sq.pd +++ /dev/null @@ -1,11 +0,0 @@ -#N canvas 0 0 303 155 10; -#X obj 17 15 inlet; -#X obj 17 91 outlet; -#X obj 17 53 # C.*; -#X obj 17 34 t a a; -#X obj 17 72 # C.* (0 -1); -#X connect 0 0 3 0; -#X connect 2 0 4 0; -#X connect 3 0 2 0; -#X connect 3 1 2 1; -#X connect 4 0 1 0; diff --git a/externals/gridflow/deprecated/0x40convolve.pd b/externals/gridflow/deprecated/0x40convolve.pd deleted file mode 100644 index abe3a757..00000000 --- a/externals/gridflow/deprecated/0x40convolve.pd +++ /dev/null @@ -1,25 +0,0 @@ -#N canvas 404 162 450 184 10; -#X obj 14 15 inlet; -#X obj 150 54 inlet; -#X obj 14 159 outlet; -#X obj 124 3 loadbang; -#X msg 51 83 op \$1; -#X obj 124 22 args op fold seed right; -#X msg 84 83 fold \$1; -#X msg 129 83 seed \$1; -#X obj 177 83 t a; -#X obj 205 53 inlet; -#X obj 14 140 #convolve; -#X connect 0 0 10 0; -#X connect 1 0 7 0; -#X connect 3 0 5 0; -#X connect 4 0 10 0; -#X connect 5 0 4 0; -#X connect 5 1 6 0; -#X connect 5 2 7 0; -#X connect 5 3 8 0; -#X connect 6 0 10 0; -#X connect 7 0 10 0; -#X connect 8 0 10 1; -#X connect 9 0 8 0; -#X connect 10 0 2 0; diff --git a/externals/gridflow/deprecated/0x40fold.pd b/externals/gridflow/deprecated/0x40fold.pd deleted file mode 100644 index 45918ab5..00000000 --- a/externals/gridflow/deprecated/0x40fold.pd +++ /dev/null @@ -1,17 +0,0 @@ -#N canvas 404 162 450 184 10; -#X obj 14 15 inlet; -#X obj 193 23 inlet; -#X obj 14 129 outlet; -#X obj 124 22 args op seed; -#X obj 124 3 loadbang; -#X msg 121 63 op \$1; -#X msg 154 63 seed \$1; -#X obj 14 110 #fold +; -#X connect 0 0 7 0; -#X connect 1 0 6 0; -#X connect 3 0 5 0; -#X connect 3 1 6 0; -#X connect 4 0 3 0; -#X connect 5 0 7 0; -#X connect 6 0 7 0; -#X connect 7 0 2 0; diff --git a/externals/gridflow/deprecated/0x40inner.pd b/externals/gridflow/deprecated/0x40inner.pd deleted file mode 100644 index 5be32c41..00000000 --- a/externals/gridflow/deprecated/0x40inner.pd +++ /dev/null @@ -1,25 +0,0 @@ -#N canvas 404 162 450 184 10; -#X obj 14 15 inlet; -#X obj 150 54 inlet; -#X obj 14 159 outlet; -#X obj 124 3 loadbang; -#X msg 51 83 op \$1; -#X obj 124 22 args op fold seed right; -#X msg 84 83 fold \$1; -#X msg 129 83 seed \$1; -#X obj 14 140 #inner; -#X obj 177 83 t a; -#X obj 205 53 inlet; -#X connect 0 0 8 0; -#X connect 1 0 7 0; -#X connect 3 0 5 0; -#X connect 4 0 8 0; -#X connect 5 0 4 0; -#X connect 5 1 6 0; -#X connect 5 2 7 0; -#X connect 5 3 9 0; -#X connect 6 0 8 0; -#X connect 7 0 8 0; -#X connect 8 0 2 0; -#X connect 9 0 8 1; -#X connect 10 0 9 0; diff --git a/externals/gridflow/deprecated/0x40scan.pd b/externals/gridflow/deprecated/0x40scan.pd deleted file mode 100644 index ec33f986..00000000 --- a/externals/gridflow/deprecated/0x40scan.pd +++ /dev/null @@ -1,17 +0,0 @@ -#N canvas 404 162 450 184 10; -#X obj 14 15 inlet; -#X obj 193 23 inlet; -#X obj 14 129 outlet; -#X obj 124 22 args op seed; -#X obj 124 3 loadbang; -#X msg 121 63 op \$1; -#X msg 154 63 seed \$1; -#X obj 14 110 #scan +; -#X connect 0 0 7 0; -#X connect 1 0 6 0; -#X connect 3 0 5 0; -#X connect 3 1 6 0; -#X connect 4 0 3 0; -#X connect 5 0 7 0; -#X connect 6 0 7 0; -#X connect 7 0 2 0; diff --git a/externals/gridflow/deprecated/fork.pd b/externals/gridflow/deprecated/fork.pd deleted file mode 100644 index e4dbe1cb..00000000 --- a/externals/gridflow/deprecated/fork.pd +++ /dev/null @@ -1,8 +0,0 @@ -#N canvas 591 196 450 300 10; -#X obj 19 14 inlet; -#X obj 19 71 outlet; -#X obj 49 52 outlet; -#X obj 19 33 t a a; -#X connect 0 0 3 0; -#X connect 3 0 1 0; -#X connect 3 1 2 0; diff --git a/externals/gridflow/deprecated/listappend.pd b/externals/gridflow/deprecated/listappend.pd deleted file mode 100644 index faff1aba..00000000 --- a/externals/gridflow/deprecated/listappend.pd +++ /dev/null @@ -1,12 +0,0 @@ -#N canvas 0 0 450 300 10; -#X obj 23 16 inlet; -#X obj 23 54 outlet; -#X obj 95 16 inlet; -#X obj 23 35 list append; -#X obj 134 16 loadbang; -#X obj 134 35 args *; -#X connect 0 0 3 0; -#X connect 2 0 3 1; -#X connect 3 0 1 0; -#X connect 4 0 5 0; -#X connect 5 0 3 1; diff --git a/externals/gridflow/deprecated/listelement.pd b/externals/gridflow/deprecated/listelement.pd deleted file mode 100644 index 46bbd4e0..00000000 --- a/externals/gridflow/deprecated/listelement.pd +++ /dev/null @@ -1,15 +0,0 @@ -#N canvas 174 196 450 300 10; -#X obj 26 19 inlet; -#X obj 133 18 inlet; -#X obj 129 120 outlet; -#X obj 26 44 list split \$1; -#X obj 69 63 list split 1; -#X obj 69 82 route float symbol; -#X text 199 82 (canonicalise selector); -#X connect 0 0 3 0; -#X connect 1 0 3 1; -#X connect 3 1 4 0; -#X connect 4 0 5 0; -#X connect 5 0 2 0; -#X connect 5 1 2 0; -#X connect 5 2 2 0; diff --git a/externals/gridflow/deprecated/listlength.pd b/externals/gridflow/deprecated/listlength.pd deleted file mode 100644 index 68e56c33..00000000 --- a/externals/gridflow/deprecated/listlength.pd +++ /dev/null @@ -1,6 +0,0 @@ -#N canvas 720 260 450 300 10; -#X obj 23 16 inlet; -#X obj 23 35 list length; -#X obj 23 54 outlet; -#X connect 0 0 1 0; -#X connect 1 0 2 0; diff --git a/externals/gridflow/deprecated/listprepend.pd b/externals/gridflow/deprecated/listprepend.pd deleted file mode 100644 index 83b7b2ee..00000000 --- a/externals/gridflow/deprecated/listprepend.pd +++ /dev/null @@ -1,12 +0,0 @@ -#N canvas 720 260 450 300 10; -#X obj 23 16 inlet; -#X obj 23 54 outlet; -#X obj 23 35 list prepend; -#X obj 102 16 inlet; -#X obj 141 16 loadbang; -#X obj 141 35 args *; -#X connect 0 0 2 0; -#X connect 2 0 1 0; -#X connect 3 0 2 1; -#X connect 4 0 5 0; -#X connect 5 0 2 1; diff --git a/externals/gridflow/deprecated/listsublist.pd b/externals/gridflow/deprecated/listsublist.pd deleted file mode 100644 index 0e35b631..00000000 --- a/externals/gridflow/deprecated/listsublist.pd +++ /dev/null @@ -1,12 +0,0 @@ -#N canvas 280 216 450 300 10; -#X obj 26 19 inlet; -#X obj 112 19 inlet; -#X obj 69 82 outlet; -#X obj 26 44 list split \$1; -#X obj 69 63 list split \$2; -#X obj 155 19 inlet; -#X connect 0 0 3 0; -#X connect 1 0 3 1; -#X connect 3 1 4 0; -#X connect 4 0 2 0; -#X connect 5 0 4 1; diff --git a/externals/gridflow/deprecated/messageappend.pd b/externals/gridflow/deprecated/messageappend.pd deleted file mode 100644 index 569895a2..00000000 --- a/externals/gridflow/deprecated/messageappend.pd +++ /dev/null @@ -1,14 +0,0 @@ -#N canvas 720 260 450 300 10; -#X obj 23 16 inlet; -#X obj 23 73 outlet; -#X obj 95 16 inlet; -#X obj 23 35 list append; -#X obj 23 54 list trim; -#X obj 134 16 loadbang; -#X obj 134 35 args *; -#X connect 0 0 3 0; -#X connect 2 0 3 1; -#X connect 3 0 4 0; -#X connect 4 0 1 0; -#X connect 5 0 6 0; -#X connect 6 0 3 1; diff --git a/externals/gridflow/deprecated/messageprepend.pd b/externals/gridflow/deprecated/messageprepend.pd deleted file mode 100644 index 84863fbd..00000000 --- a/externals/gridflow/deprecated/messageprepend.pd +++ /dev/null @@ -1,14 +0,0 @@ -#N canvas 770 352 450 300 10; -#X obj 23 16 inlet; -#X obj 23 73 outlet; -#X obj 23 35 list prepend; -#X obj 102 16 inlet; -#X obj 23 54 list trim; -#X obj 141 16 loadbang; -#X obj 141 35 args *; -#X connect 0 0 2 0; -#X connect 2 0 4 0; -#X connect 3 0 2 1; -#X connect 4 0 1 0; -#X connect 5 0 6 0; -#X connect 6 0 2 1; diff --git a/externals/gridflow/doc/Makefile b/externals/gridflow/doc/Makefile deleted file mode 100644 index 865d34e7..00000000 --- a/externals/gridflow/doc/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -all:: index.pd numop.pd numtype.pd - -index.pd: make_index.tcl locale/english.tcl - tclsh make_index.tcl > index.pd - -numop.pd numtype.pd: moulinette.tcl - tclsh moulinette.tcl diff --git a/externals/gridflow/doc/architecture.html b/externals/gridflow/doc/architecture.html deleted file mode 100644 index daa8b3ea..00000000 --- a/externals/gridflow/doc/architecture.html +++ /dev/null @@ -1,65 +0,0 @@ -Grid Literals - 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 [#redim] object and the one to the - right of it are fed through that [#redim]. - In every grid-accepting inlet, an integer or float may also be sent; - it will be converted to a zero-dimensional grid (a scalar). - -Grid Protocol - 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 int32. - 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). - 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. - 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, [#import], [#export] and [#redim] care about it. - 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. - 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. - Zero-dimensional grids exist. They are called dim(). They can only contain - a single number. -Picture Protocol - This section is useful if you want to know what a picture is in terms of a grid. - A picture is a three-dimensional Grid: 0:rows 1:columns 2:channels - -Channels for the RGB color model are: 0:red 1:green 2:blue - 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. - In the final conversion, high bits are just ignored. This means: black is - 0, maximum is 255, and values wrap like with % 256. If you want to - clip them, you may use [# max 0] and [# min 255] objects. - -The following are called VecOps because each operation happens between more than just two numbers. -A first kind of VecOp are those that arise when a pair of numbers (A0,A1) is considered as a single number A0+A1*sqrt(-1). -If you need complex numbers but don't know yet how they work, learn them using a math tutorial and then those VecOps will begin to seem familiar. -All the complex number operators are only for floats. -TODO: fill the last two columns of this table. - -Synchronisation - -In GridFlow you cannot send two grids in different inlets at the -same time. You have to use [#finished] together with (possibly) [fork] and [#store], -which can be cumbersome. If you don't do this, the result is undefined -behaviour (or crash!). -There are two exceptions: [#store] and # allow right-inlet grids to be buffered if an operation is occuring on left inlet. This -should make many programs simpler. diff --git a/externals/gridflow/doc/flow_classes/#+-help.pd b/externals/gridflow/doc/flow_classes/#+-help.pd deleted file mode 100644 index 97f33474..00000000 --- a/externals/gridflow/doc/flow_classes/#+-help.pd +++ /dev/null @@ -1,363 +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 1; -#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 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 185 0; -#X connect 7 0 187 0; -#X connect 7 0 191 0; -#X connect 8 0 185 1; -#X connect 9 0 11 0; -#X connect 10 0 13 0; -#X connect 12 0 185 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 91 0 89 0; -#X connect 94 0 93 0; -#X connect 98 0 97 0; -#X connect 102 0 101 0; -#X connect 107 0 106 0; -#X connect 111 0 110 0; -#X connect 114 0 113 0; -#X connect 117 0 116 0; -#X connect 120 0 119 0; -#X connect 123 0 122 0; -#X connect 126 0 125 0; -#X connect 129 0 128 0; -#X connect 132 0 131 0; -#X connect 135 0 134 0; -#X connect 138 0 137 0; -#X connect 142 0 141 0; -#X connect 145 0 144 0; -#X connect 149 0 148 0; -#X connect 152 0 151 0; -#X connect 156 0 155 0; -#X connect 160 0 159 0; -#X connect 164 0 162 0; -#X connect 168 0 166 0; -#X connect 173 0 170 0; -#X connect 174 0 171 0; -#X connect 178 0 176 0; -#X connect 187 0 186 0; -#X connect 187 0 188 0; -#X connect 189 0 190 0; -#X connect 191 0 192 0; -#X connect 191 1 189 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 bf6366cb..00000000 --- a/externals/gridflow/doc/flow_classes/#-help.pd +++ /dev/null @@ -1,26 +0,0 @@ -#N canvas 0 26 645 571 10; -#X obj 139 174 #color; -#X obj 314 174 #color; -#X text 245 135 select values below; -#X text 138 155 A; -#X text 313 155 B; -#X obj 139 240 # +; -#X obj 178 274 #color; -#X obj 140 380 display; -#X obj 139 274 t a a; -#X text 152 342 warning: #color clips value to the 0..255 range; -#X text 152 357 so use this [display] to view the true numbers; -#X text 14 31 click on this object to select a numop to try out:; -#X text 15 14 # applies a simple Numeric Operator (numop).; -#X text 83 445 note: a centidegree is 0.01 degree. There are 36000 -degrees in a circle. Some angle operators use centidegrees \, while -some others use radians. To convert degrees into centidegrees \, multiply -by 100 To convert degrees into radians \, divide by 57.2957 .; -#X text 531 23 GridFlow 0.9.4; -#X obj 74 50 doc/numop; -#X connect 0 0 5 0; -#X connect 1 0 5 1; -#X connect 5 0 8 0; -#X connect 8 0 7 0; -#X connect 8 1 6 0; -#X connect 15 0 5 0; diff --git a/externals/gridflow/doc/flow_classes/#apply_colormap_channelwise-help.pd b/externals/gridflow/doc/flow_classes/#apply_colormap_channelwise-help.pd deleted file mode 100644 index 20149dbf..00000000 --- a/externals/gridflow/doc/flow_classes/#apply_colormap_channelwise-help.pd +++ /dev/null @@ -1,61 +0,0 @@ -#N canvas 92 0 503 594 10; -#X obj 25 173 #in; -#X obj 25 272 #out window; -#X obj 24 251 cnv 15 190 16 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 0 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 11 1 #apply_colormap_channelwise; -#X obj 0 467 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 0 301 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 0 324 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 5 325 Inlet_0; -#X text 202 303 Inlets (2); -#X text 211 469 Outlets (1); -#X obj 0 547 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 0 394 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 0 488 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 4 489 Inlet_0; -#X text 5 395 Inlet_1; -#X text 3 350 GRID; -#X text 2 422 GRID; -#X text 5 512 GRID; -#X text 68 513 Outputs the modified data as a grid.; -#X text 12 27 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 text 7 574 None; -#X text 65 422 Colormap is a grid dim (2) (intensity channels); -#X text 66 351 Accepts a grid that will be modified by the colormap -; -#X text 205 548 Arguments (0); -#X obj 213 115 #for 0 256 1; -#X obj 213 185 #outer gamma; -#X msg 25 147 load bluemarble.jpg; -#X obj 25 128 t b b; -#X obj 289 141 #color 0 1024 1; -#X msg 354 89 1024 512 256; -#X obj 354 70 loadbang; -#X obj 25 250 #apply_colormap_channelwise; -#X obj 25 99 metro 100; -#X obj 25 82 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1; -#X text 357 124 vary this:; -#X text 390 1 GridFlow 0.9.0; -#X connect 0 0 32 0; -#X connect 25 0 26 0; -#X connect 26 0 32 1; -#X connect 27 0 0 0; -#X connect 28 0 27 0; -#X connect 28 1 25 0; -#X connect 29 0 26 1; -#X connect 30 0 29 0; -#X connect 31 0 30 0; -#X connect 32 0 1 0; -#X connect 33 0 28 0; -#X connect 34 0 33 0; diff --git a/externals/gridflow/doc/flow_classes/#background_model-help.pd b/externals/gridflow/doc/flow_classes/#background_model-help.pd deleted file mode 100644 index 4ad9296b..00000000 --- a/externals/gridflow/doc/flow_classes/#background_model-help.pd +++ /dev/null @@ -1,43 +0,0 @@ -#N canvas 328 52 499 470 10; -#X obj 58 54 #camera; -#X obj 58 0 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 1 1 ; -#X obj 194 112 tgl 15 0 empty empty binaryFlag 0 -6 0 8 -24198 -1 -1 -1 1; -#X obj 126 93 tgl 15 0 empty empty addBackground 0 -6 0 8 -24198 -1 --1 0 1; -#X obj 266 102 hsl 128 15 0 700 0 0 empty empty outputThreshold -2 --6 0 8 -260818 -1 -1 7100 1; -#X obj 31 28 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1 -; -#X obj 58 333 #greyscale_to_rgb; -#X text 72 265 Arguments : size of buffer \, columns \, rows \, channel -; -#X text 70 283 <-- output is a greyscale image; -#X obj 58 358 #out window \, title backgroundModel; -#X obj 58 384 fps detailed; -#X obj 58 405 print; -#X obj 160 230 #out window \, title variance; -#X obj 263 184 #out window \, title Mean; -#X obj 160 186 # << 2; -#X obj 160 208 #clip; -#X floatatom 280 125 5 0 0 0 - - -; -#X obj 58 308 #clip; -#X obj 58 24 metro 33.33; -#X obj 58 158 #background_model 20 120 160 3; -#X connect 0 0 19 0; -#X connect 1 0 18 0; -#X connect 2 0 19 2; -#X connect 3 0 19 1; -#X connect 4 0 16 0; -#X connect 4 0 19 3; -#X connect 5 0 0 0; -#X connect 6 0 9 0; -#X connect 9 0 10 0; -#X connect 10 0 11 0; -#X connect 14 0 15 0; -#X connect 15 0 12 0; -#X connect 17 0 6 0; -#X connect 18 0 0 0; -#X connect 19 0 17 0; -#X connect 19 1 14 0; -#X connect 19 2 13 0; diff --git a/externals/gridflow/doc/flow_classes/#border-help.pd b/externals/gridflow/doc/flow_classes/#border-help.pd deleted file mode 100644 index 3733b67e..00000000 --- a/externals/gridflow/doc/flow_classes/#border-help.pd +++ /dev/null @@ -1,57 +0,0 @@ -#N canvas 597 51 505 631 10; -#X obj 20 104 #in; -#X obj 20 167 #out window; -#X obj 2 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 2 389 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 2 203 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 2 226 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 216 391 Outlets (1); -#X obj 2 486 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 211 485 Arguments (1); -#X obj 2 279 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 2 410 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 3 227 Inlet 0; -#X text 3 280 Inlet 1; -#X text 3 411 Outlet 0; -#X obj 19 137 cnv 15 185 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 16 0 #border; -#X text 18 251 GRID; -#X text 222 204 Inlets (3); -#X obj 2 331 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 3 332 Inlet 2; -#X text 15 28 Creates a black border around an image.; -#X text 19 307 LIST; -#X text 21 363 LIST; -#X text 65 306 A list of three values in parentheses overides the argument. -; -#X text 65 362 A list of three values in parentheses overides the argument. -; -#X text 65 254 Receives an image.; -#X msg 20 62 load working.jpg; -#X text 16 513 GRID(3); -#X text 16 533 GRID(3); -#X text 77 513 top padding and left padding. defaults to (1 1 0).; -#X text 77 533 bottom and right padding. defaults to (1 1 0).; -#X obj 20 137 #border (5 10 0) (15 20 0); -#X text 209 118 5 at the top; -#X text 208 132 10 at the left; -#X text 208 146 15 at the bottom; -#X text 208 159 20 at the right; -#X text 75 554 both arguments must have 3 elements. The third element -is reserved for future use.; -#X text 16 438 GRID; -#X text 67 438 The original image surrounded by zero padding \, which -usually means black pixels.; -#X text 399 1 GridFlow 0.9.4; -#X connect 0 0 31 0; -#X connect 26 0 0 0; -#X connect 31 0 1 0; diff --git a/externals/gridflow/doc/flow_classes/#camera-help.pd b/externals/gridflow/doc/flow_classes/#camera-help.pd deleted file mode 100644 index 3981fea9..00000000 --- a/externals/gridflow/doc/flow_classes/#camera-help.pd +++ /dev/null @@ -1,53 +0,0 @@ -#N canvas 824 67 506 613 10; -#X obj 50 216 #out window; -#X obj 24 79 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1 -; -#X obj 50 79 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1 -; -#X obj 50 242 fps detailed; -#X obj 50 272 print; -#X obj 50 105 metro 20; -#X obj 1 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 14 27 Is an abstraction that provides a preset for bttv cards -as well as discrete controls of other cameras.; -#X obj 1 446 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 363 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 386 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 6 387 Inlet_0; -#X text 203 447 Outlets (1); -#X obj 1 532 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 467 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 203 365 Inlets (1); -#X text 0 468 Outlet_0; -#X text 13 414 BANG; -#X text 205 531 Arguments (0); -#X text 73 493 Returns a grid from the video capture device for every -bang.; -#X text 13 493 GRID; -#X obj 50 189 #scale_by; -#X text 395 1 GridFlow 0.9.0; -#X text 20 300 * for webcams \, please note that you need to have the -pwc module loaded. The driver from http://www.saillard.org worked for -the quickcam pro 4000; -#X text 115 145 <-- open the abstraction and configure for your camera -before sending it a bang.; -#X obj 51 147 cnv 15 50 15 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 50 146 #camera; -#X obj 11 0 #camera; -#X text 13 563 INT; -#X text 73 562 Corresponds to the video for linux device on you system -(0-8); -#X connect 0 0 3 0; -#X connect 1 0 26 0; -#X connect 2 0 5 0; -#X connect 3 0 4 0; -#X connect 5 0 26 0; -#X connect 21 0 0 0; -#X connect 26 0 21 0; 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 069e0dd1..00000000 --- a/externals/gridflow/doc/flow_classes/#cast-help.pd +++ /dev/null @@ -1,74 +0,0 @@ -#N canvas 30 36 505 533 10; -#X obj 1 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 339 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 241 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 264 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 6 265 Inlet_0; -#X text 203 340 Outlets (1); -#X obj 1 443 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 205 442 Arguments (1); -#X obj 1 360 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 14 219 #print; -#X obj 14 199 cnv 15 93 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 14 199 #cast float64; -#X obj 269 218 #print; -#X obj 126 218 #print; -#X obj 269 198 cnv 15 79 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 269 198 #cast uint8; -#X obj 126 198 cnv 15 79 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 126 198 #cast int32; -#X text 203 243 Inlets (1); -#X text 16 295 GRID; -#X floatatom 14 181 5 0 0 0 - - -; -#X msg 126 177 9.8764 9 -32 0.3; -#X obj 269 158 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X obj 306 79 nbx 8 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10 --262144 -1 -1 2.1416 256; -#X obj 356 96 nbx 8 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10 --262144 -1 -1 45 256; -#X obj 306 154 #redim ( 2 2 ); -#X obj 269 177 #store; -#X obj 306 133 #pack 3 float32; -#X obj 14 161 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X text 73 472 Number types are: uint8 \, int16 \, int32 \, int64 \, -float32 \, float64. see doc/architecture.html for more info.; -#X obj 126 157 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X text 12 26 Changes an entity of one data type into another. Returns -a grid of the same dimensions containing all the same values after -type conversion. While casting to a smaller type \, overflowing values -will be truncated.; -#X text 75 388 Returns a grid of the same dimensions containing all -the same values after type conversion.; -#X obj 406 113 nbx 8 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10 --262144 -1 -1 45 256; -#X text 0 361 Outlet_0; -#X obj 11 0 #cast i; -#X text 395 1 GridFlow 0.9.0; -#X text 74 295 Any grid; -#X text 16 389 GRID; -#X connect 11 0 9 0; -#X connect 15 0 12 0; -#X connect 17 0 13 0; -#X connect 20 0 11 0; -#X connect 21 0 17 0; -#X connect 22 0 26 0; -#X connect 23 0 27 0; -#X connect 24 0 27 1; -#X connect 25 0 26 1; -#X connect 26 0 15 0; -#X connect 27 0 25 0; -#X connect 28 0 20 0; -#X connect 30 0 21 0; -#X connect 33 0 27 2; diff --git a/externals/gridflow/doc/flow_classes/#checkers-help.pd b/externals/gridflow/doc/flow_classes/#checkers-help.pd deleted file mode 100644 index 3a32fc50..00000000 --- a/externals/gridflow/doc/flow_classes/#checkers-help.pd +++ /dev/null @@ -1,38 +0,0 @@ -#N canvas 40 127 504 404 10; -#X obj 1 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 259 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 168 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 191 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 215 261 Outlets (1); -#X obj 1 349 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 280 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 398 1 GridFlow 0.8.4; -#X text 2 192 Inlet 0; -#X text 2 281 Outlet 0; -#X obj 10 0 #checkers; -#X obj 156 63 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X obj 156 85 #for (0 0) (128 128) (1 1); -#X obj 156 132 #out window \, title checkers; -#X text 221 169 Inlets (1); -#X text 11 222 GRID; -#X text 69 224 Receives a grid: [#for (0 0) (height width) (1 1)]; -#X obj 155 108 cnv 15 66 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 156 108 #checkers; -#X text 9 310 GRID; -#X text 74 308 Results in a checkered pattern of 50% / 75% greys in -8 X 8 squares.; -#X text 225 351 Arguments; -#X text 10 375 NONE; -#X text 12 22 Displays a grid with a pattern of checkered squares. -; -#X connect 11 0 12 0; -#X connect 12 0 18 0; -#X connect 18 0 13 0; 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 32c16d10..00000000 --- a/externals/gridflow/doc/flow_classes/#clip-help.pd +++ /dev/null @@ -1,78 +0,0 @@ -#N canvas 673 158 506 685 10; -#X obj 51 163 #in; -#X obj 51 189 # + 42; -#X floatatom 88 166 5 0 0 0 - - -; -#X obj 51 270 #out window; -#X obj 51 114 t b b; -#X obj 51 90 metro 100; -#X obj 51 68 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 1 1; -#X floatatom 127 211 5 0 0 0 - - -; -#X floatatom 87 211 5 0 0 0 - - -; -#X text 6 25 The [#clip] object is used with numops in order to set -a lower and upper range to pixel values. This allows you to avoid over -saturating the colours of your grid.; -#X obj 3 1 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 133 165 <-- vary this number; -#X msg 81 138 open working.jpg; -#X obj 2 300 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 3 326 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 3 382 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 50 235 cnv 15 78 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X text 64 349 Grid values are clipped to the high and low values stored -in the object; -#X text 2 409 INTEGER; -#X text 5 328 Inlet 0; -#X text 5 384 Inlet 1; -#X text 204 302 Inlets (3); -#X obj 3 439 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 6 441 Inlet 2; -#X text 3 469 INTEGER; -#X obj 1 570 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 203 572 Arguments (2); -#X text 1 599 [#clip] accepts two integers as creation arguments that -initialize the first values to be stored in the object. The first integer -corresponds to the inlet 1 \, the second to inlet 2; -#X obj 1 497 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 203 499 Outlets (1); -#X obj 2 520 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 4 522 Outlet 0; -#X text 3 350 GRID; -#X text 4 543 GRID; -#X text 63 543 Outputs the modified grid; -#X obj 0 657 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 1 658 SEE ALSO:; -#X obj 85 657 # min; -#X obj 132 657 # max; -#X obj 180 657 clip; -#X text 227 656 #numop-help.pd; -#X text 344 656 gf_tutorial_image_6.pd; -#X text 402 2 GridFlow 0.9.0; -#X obj 51 236 #clip 0 255; -#X obj 3 0 #clip; -#X text 139 231 <--if no creation argument is given the default range -is 0-255.; -#X text 69 408 An integer can be used to vary the minimum value of -the range.; -#X text 67 466 An integer can be used to vary the maximum value of -the range.; -#X connect 0 0 1 0; -#X connect 1 0 43 0; -#X connect 2 0 1 1; -#X connect 4 0 0 0; -#X connect 4 1 12 0; -#X connect 5 0 4 0; -#X connect 6 0 5 0; -#X connect 7 0 43 2; -#X connect 8 0 43 1; -#X connect 12 0 0 0; -#X connect 43 0 3 0; diff --git a/externals/gridflow/doc/flow_classes/#color-help.pd b/externals/gridflow/doc/flow_classes/#color-help.pd deleted file mode 100644 index 71fb0404..00000000 --- a/externals/gridflow/doc/flow_classes/#color-help.pd +++ /dev/null @@ -1,84 +0,0 @@ -#N canvas 526 103 502 591 10; -#X obj 4 1 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 126 114 #color; -#X text 5 0 [#color]; -#X obj 3 187 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 5 215 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 6 216 Inlet 0; -#X obj 3 398 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 3 426 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 4 427 Outlet 0; -#X obj 3 398 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 3 426 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 4 427 Outlet 0; -#X obj 3 398 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 3 426 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 4 427 Outlet 0; -#X obj 3 398 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 214 400 Outlets (1); -#X obj 3 426 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 4 427 Outlet 0; -#X text 308 126 <-- vary these; -#X text 223 188 Inlets (1); -#X text 3 243 GRID; -#X text 3 285 MESSAGE; -#X text 3 457 GRID; -#X text 63 457 [#color] produces a three dimensional grid of RBG values -; -#X text 10 27 The [#color] object contains a triple slider for RGB -value selection on each channel.; -#X text 67 283 a message containing a list of three values between -0 and 255 will asign each value to the corresponding position on each -channel.; -#X obj 2 487 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 2 487 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 2 487 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 2 487 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 3 398 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 3 398 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 3 398 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 214 400 Outlets (1); -#X text 198 68 <-- click here; -#X msg 126 68 255 0 204; -#X text 69 243 [#color] accepts three dimensional grids and allows -for colour value (RGB) changes on each channel; -#X text 401 2 GridFlow 0.9.0; -#X text 216 489 Arguments (3); -#X text 5 510 LIST; -#X text 62 510 lower bound \, upper bound \, 0 = (default) color preview -\, 1 = absence of preview.; -#X msg 317 79 delegate steady 0; -#X text 67 325 "delegate" sends to the sliders that are part of [#color]. -ie. followed by a value between 0 and 255 will cause all the colour -values on each channel to go to the value corresponding to that position. -; -#X obj 2 567 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 2 567 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 2 567 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 2 567 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 8 568 see also :; -#X text 91 568 [hsl]; -#X connect 36 0 1 0; -#X connect 42 0 1 0; 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 6787cf74..00000000 --- a/externals/gridflow/doc/flow_classes/#contrast-help.pd +++ /dev/null @@ -1,76 +0,0 @@ -#N canvas 0 29 503 602 10; -#X obj 2 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 11 0 #contrast; -#X obj 58 90 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1 -; -#X obj 78 138 metro 100; -#X obj 78 117 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 -; -#X obj 203 136 hsl 128 15 0 256 0 0 empty empty empty -2 -6 0 8 -262144 --1 -1 0 1; -#X obj 352 137 hsl 128 15 0 256 0 0 empty empty empty -2 -6 0 8 -262144 --1 -1 0 1; -#X floatatom 200 156 5 0 0 0 - - -; -#X floatatom 349 159 5 0 0 0 - - -; -#X msg 40 67 open bluemarble.jpg; -#X obj 171 216 #out window; -#X obj 40 164 #in; -#X text 14 24 Adjusts the intensity of an image.; -#X obj 1 566 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 260 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 283 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 215 568 Outlets (1); -#X obj 1 665 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 353 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 587 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 2 284 Inlet 0; -#X text 2 354 Inlet 1; -#X text 2 588 Outlet 0; -#X text 221 261 Inlets (3); -#X obj 171 191 cnv 15 65 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 171 191 #contrast; -#X obj 0 464 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 1 465 Inlet 2; -#X text 26 316 GRID; -#X text 79 317 Receives a grid.; -#X text 4 388 INTEGER; -#X text 5 494 INTEGER; -#X text 72 495 This value corresponds to the master contrast \, it -varies the amount of incoming white. The default value is 256 and it -has no effect.; -#X text 75 389 This value corresponds to the secondary contrast (inverse -whiteness) \, it varies the amount of incoming black into the image. -The default value is 256 and it has no effect.; -#X text 24 616 GRID; -#X text 75 617 The resulting grid is output.; -#X text 210 664 Arguments; -#X obj 2 723 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 95 721 #convolve; -#X obj 165 721 #posterize; -#X obj 242 721 #solarize; -#X obj 312 721 #layer; -#X text 14 721 see also:; -#X text 24 693 NONE; -#X text 399 1 GridFlow 0.9.4; -#X text 347 120 contrast about black; -#X text 197 120 contrast about white; -#X connect 2 0 11 0; -#X connect 3 0 11 0; -#X connect 4 0 3 0; -#X connect 5 0 7 0; -#X connect 6 0 8 0; -#X connect 7 0 25 1; -#X connect 8 0 25 2; -#X connect 9 0 11 0; -#X connect 11 0 25 0; -#X connect 25 0 10 0; diff --git a/externals/gridflow/doc/flow_classes/#convolve-help.pd b/externals/gridflow/doc/flow_classes/#convolve-help.pd deleted file mode 100644 index 31cec7f1..00000000 --- a/externals/gridflow/doc/flow_classes/#convolve-help.pd +++ /dev/null @@ -1,73 +0,0 @@ -#N canvas 412 35 508 791 10; -#X obj 1 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 607 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 296 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 319 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 215 609 Outlets (1); -#X obj 1 688 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 210 687 Arguments (1); -#X obj 0 484 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 628 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 2 320 Inlet 0; -#X text 1 485 Inlet 1; -#X text 221 297 Inlets (2); -#X text 2 629 Outlet 0; -#X obj 10 0 #convolve; -#X obj 16 87 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1 -; -#X msg 228 135 1 1 1 1 1 1 1 1 1; -#X obj 228 113 loadbang; -#X text 27 718 here ^ is the parallel operator \, fold is indicated -by + and 0 is its base.; -#X obj 16 112 fork; -#X obj 228 157 #redim (3 3); -#X obj 16 158 #in; -#X obj 16 241 #out window; -#X obj 0 757 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 55 756 see also:; -#X obj 126 760 #contrast; -#X obj 195 760 #posterize; -#X obj 271 760 #solarize; -#X obj 340 760 #layer; -#X obj 16 183 cnv 15 219 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 16 183 #convolve \, op ^ \, fold + \, seed 0; -#X text 14 27 [#convolve] is used to perform various transformations -on images such as blurring \, sharpening \, finding edges \, embossing -\, cellular automata and many others.; -#X text 29 346 GRID; -#X text 28 660 GRID; -#X text 23 512 GRID; -#X text 70 514 This is the convolution grid and it gets stored in the -other object. If rows2 and/or columns 2 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 -celle of the grid.; -#X text 73 347 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.; -#X msg 39 135 open scissors.jpg; -#X text 398 1 GridFlow 0.9.0; -#X connect 14 0 18 0; -#X connect 15 0 19 0; -#X connect 16 0 15 0; -#X connect 18 0 20 0; -#X connect 18 1 36 0; -#X connect 19 0 29 1; -#X connect 20 0 29 0; -#X connect 29 0 21 0; -#X connect 36 0 20 0; 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 e79ef2b7..00000000 --- a/externals/gridflow/doc/flow_classes/#dim-help.pd +++ /dev/null @@ -1,52 +0,0 @@ -#N canvas 224 30 508 484 10; -#X obj 4 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 6 291 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 5 214 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 5 237 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 10 238 Inlet_0; -#X text 215 293 Outlets (1); -#X obj 4 412 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 6 312 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 10 313 Inlet_0; -#X obj 16 0 #dim; -#X obj 29 87 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1 -; -#X obj 22 178 print number_of_dimensions; -#X obj 22 106 #in; -#X obj 22 130 cnv 15 30 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 22 130 #dim; -#X obj 22 154 #export; -#X msg 22 66 open working.jpg; -#X text 207 216 Inlets (1); -#X text 8 270 GRID; -#X text 397 3 GridFlow 0.8.4; -#X text 8 349 INTEGER; -#X text 208 411 Arguments (none); -#X text 15 37 Outputs grid dimensions (columns \, row \, channels). -; -#X obj 3 458 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 166 459 rubyprint; -#X obj 236 459 printargs; -#X obj 117 459 #print; -#X obj 306 459 #export; -#X obj 362 459 #export_list; -#X text 25 460 see also:; -#X text 70 270 Receives a grid \, ignores its content.; -#X text 70 347 The received grid is output as a one dimensional grid -representing grid dimensions. For example \, a grid sized like dim(240 -\, 320 \, 4) [#dim] will return a grid like dim(3) whose values are -240 \, 320 \, 4; -#X connect 10 0 12 0; -#X connect 12 0 14 0; -#X connect 14 0 15 0; -#X connect 15 0 11 0; -#X connect 16 0 12 0; -#X connect 16 0 10 0; diff --git a/externals/gridflow/doc/flow_classes/#downscale_by-help.pd b/externals/gridflow/doc/flow_classes/#downscale_by-help.pd deleted file mode 100644 index 13252374..00000000 --- a/externals/gridflow/doc/flow_classes/#downscale_by-help.pd +++ /dev/null @@ -1,61 +0,0 @@ -#N canvas 0 0 501 613 10; -#X obj 181 115 metro 10; -#X obj 181 96 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 -; -#X floatatom 251 130 5 0 0 0 - - -; -#X obj 165 144 #in; -#X msg 165 70 open bluemarble.jpg \, bang; -#X floatatom 295 143 5 0 0 0 - - -; -#X obj 1 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 461 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 258 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 281 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 215 463 Outlets (1); -#X obj 1 539 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 210 538 Arguments (1); -#X obj 1 342 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 482 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 398 1 GridFlow 0.8.4; -#X text 2 282 Inlet 0; -#X text 2 343 Inlet 1; -#X text 221 259 Inlets (2); -#X text 2 483 Outlet 0; -#X obj 10 0 #dowscale_by; -#X obj 251 162 #pack 2; -#X obj 165 186 cnv 15 93 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 165 186 #downscale_by; -#X obj 165 212 #out window; -#X text 29 309 GRID; -#X text 9 372 INTEGER; -#X text 9 24 Scales down a picture by a specified amount.; -#X text 79 311 Receives a grid.; -#X obj 1 614 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 104 616 see also:; -#X obj 180 615 #scale_to; -#X obj 251 615 #scale_by; -#X text 81 371 The value defines the scale factor. A pack object allows -you to vary the horizontal and vertical values idenpendently. Inlet -0 of [#pack] varies the image on a vertical axis \, inlet 1 of [#pack] -varies the image on a horizontal axis.; -#X text 26 512 GRID; -#X text 82 512 Outputs the resulting grid.; -#X text 10 571 INTEGER; -#X text 78 572 The value downscales the image according to the specified -value.; -#X connect 0 0 3 0; -#X connect 1 0 0 0; -#X connect 2 0 21 0; -#X connect 3 0 23 0; -#X connect 4 0 3 0; -#X connect 5 0 21 1; -#X connect 21 0 23 1; -#X connect 23 0 24 0; diff --git a/externals/gridflow/doc/flow_classes/#draw_image-help.pd b/externals/gridflow/doc/flow_classes/#draw_image-help.pd deleted file mode 100644 index 962e5e78..00000000 --- a/externals/gridflow/doc/flow_classes/#draw_image-help.pd +++ /dev/null @@ -1,55 +0,0 @@ -#N canvas 397 178 451 368 10; -#X text 362 6 gridflow; -#X obj 60 127 #in; -#X obj 23 161 #store; -#X obj 23 26 tgl 15 0 empty empty empty 0 -6 0 8 -233017 -1 -1 1 1 -; -#X obj 23 54 metro 40; -#X obj 23 237 #draw_image *>>8; -#X obj 23 263 #out window \, title #draw_image-help; -#X obj 60 79 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1 --1; -#X text 16 7 #draw_image; -#X obj 76 189 #in; -#X obj 76 149 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1 --1; -#X text 82 81 2 <-- open background image; -#X text 99 151 1 <-- open foreground image; -#X obj 275 218 #dim; -#X obj 275 237 #export_list; -#X obj 275 256 unpack f f; -#X obj 281 275 pack f f; -#X obj 281 294 # / 2; -#X obj 256 294 # -; -#X obj 23 287 #mouse; -#X text 47 28 3 <-- activate rendering; -#X msg 76 170 load g001.jpg; -#X msg 60 100 load r001.jpg; -#X msg 163 237 0 0; -#X obj 163 218 loadbang; -#X text 23 331 Move mouse cursor to change layer position; -#X connect 1 0 2 1; -#X connect 2 0 5 0; -#X connect 3 0 4 0; -#X connect 4 0 2 0; -#X connect 5 0 6 0; -#X connect 6 0 19 0; -#X connect 7 0 22 0; -#X connect 9 0 5 1; -#X connect 9 0 13 0; -#X connect 10 0 21 0; -#X connect 13 0 14 0; -#X connect 14 0 15 0; -#X connect 15 0 16 0; -#X connect 15 1 16 1; -#X connect 16 0 17 0; -#X connect 17 0 18 1; -#X connect 18 0 5 2; -#X connect 19 0 18 0; -#X connect 19 1 18 0; -#X connect 19 2 18 0; -#X connect 19 3 18 0; -#X connect 21 0 9 0; -#X connect 22 0 1 0; -#X connect 23 0 5 2; -#X connect 24 0 23 0; diff --git a/externals/gridflow/doc/flow_classes/#draw_points-help.pd b/externals/gridflow/doc/flow_classes/#draw_points-help.pd deleted file mode 100644 index 279fdf14..00000000 --- a/externals/gridflow/doc/flow_classes/#draw_points-help.pd +++ /dev/null @@ -1,22 +0,0 @@ -#N canvas 678 62 450 574 10; -#X msg 21 103 240 320 3 #; -#X obj 236 95 #outer + (0 9000); -#X obj 236 114 # cos* 100; -#X obj 236 133 # + 120; -#X obj 236 57 #for 0 12 1; -#X obj 236 40 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 236 76 # * 3000; -#X obj 237 223 display; -#X obj 21 123 #draw_points put (255 255 0); -#X obj 21 143 #out window; -#X text 26 17 [#draw_points] is not yet ready for use.; -#X connect 0 0 8 0; -#X connect 1 0 2 0; -#X connect 2 0 3 0; -#X connect 3 0 7 0; -#X connect 3 0 8 2; -#X connect 4 0 6 0; -#X connect 5 0 4 0; -#X connect 6 0 1 0; -#X connect 8 0 9 0; diff --git a/externals/gridflow/doc/flow_classes/#draw_polygon-help.pd b/externals/gridflow/doc/flow_classes/#draw_polygon-help.pd deleted file mode 100644 index 3cdf6a5f..00000000 --- a/externals/gridflow/doc/flow_classes/#draw_polygon-help.pd +++ /dev/null @@ -1,83 +0,0 @@ -#N canvas 586 235 634 404 10; -#X text 16 7 #draw_polygon; -#X obj 20 349 #out window; -#X obj 383 128 #color; -#X obj 383 72 loadbang; -#X obj 272 107 # rand; -#X obj 20 256 #clip; -#X obj 385 199 vradio 15 1 0 3 empty empty empty 0 -8 0 10 -241291 --1 -1 0; -#X text 402 200 fill; -#X msg 385 265 draw \$1; -#X obj 385 291 vradio 15 1 0 3 empty empty empty 0 -8 0 10 -241291 --1 -1 0; -#X text 403 291 none; -#X msg 385 357 omit \$1; -#X text 403 306 last; -#X text 403 320 odd; -#X obj 385 338 listread none last odd; -#X obj 20 237 #draw_polygon + 1; -#X obj 20 37 tgl 15 0 empty empty empty 17 7 0 10 -24198 -1 -1 0 1 -; -#X obj 43 169 #checkers; -#X obj 43 150 #for (0 0) (240 320) (1 1); -#X obj 272 50 f; -#X obj 297 50 + 1; -#X obj 272 69 sel 0; -#X obj 235 126 #store; -#X obj 20 75 t b b b; -#X msg 383 109 40 80 100; -#X text 483 13 gridflow 0.9.4; -#X obj 50 104 loadbang; -#X obj 322 50 % 30; -#X obj 235 164 #fade_lin 4 4; -#X obj 20 56 metro 33.3667; -#X obj 385 246 listread fill line point; -#X text 402 214 line; -#X text 402 228 point; -#X msg 272 88 8 2 # 240 320; -#X msg 459 110 3 # 255; -#X msg 115 169 240 320 3 #; -#X obj 6 188 #store; -#X obj 27 151 bng 15 250 50 0 empty empty empty 17 7 0 10 -241291 -1 --1; -#X obj 20 287 shunt; -#X obj 57 288 tgl 15 0 empty empty empty 17 7 0 10 -241291 -1 -1 0 -1; -#X obj 50 306 #fade (16 4 1); -#X connect 2 0 15 1; -#X connect 3 0 34 0; -#X connect 4 0 22 1; -#X connect 5 0 38 0; -#X connect 6 0 30 0; -#X connect 8 0 15 0; -#X connect 9 0 14 0; -#X connect 11 0 15 0; -#X connect 14 0 11 0; -#X connect 15 0 5 0; -#X connect 16 0 29 0; -#X connect 17 0 36 1; -#X connect 18 0 17 0; -#X connect 19 0 20 0; -#X connect 19 0 21 0; -#X connect 20 0 27 0; -#X connect 21 0 33 0; -#X connect 22 0 28 0; -#X connect 23 0 36 0; -#X connect 23 1 22 0; -#X connect 23 2 19 0; -#X connect 24 0 2 0; -#X connect 26 0 35 0; -#X connect 27 0 19 1; -#X connect 28 0 15 2; -#X connect 29 0 23 0; -#X connect 30 0 8 0; -#X connect 33 0 4 0; -#X connect 34 0 2 0; -#X connect 35 0 36 1; -#X connect 36 0 15 0; -#X connect 37 0 18 0; -#X connect 38 0 1 0; -#X connect 38 1 40 0; -#X connect 39 0 38 1; -#X connect 40 0 1 0; diff --git a/externals/gridflow/doc/flow_classes/#draw_slider-help.pd b/externals/gridflow/doc/flow_classes/#draw_slider-help.pd deleted file mode 100644 index 998110c6..00000000 --- a/externals/gridflow/doc/flow_classes/#draw_slider-help.pd +++ /dev/null @@ -1,53 +0,0 @@ -#N canvas 516 122 624 690 10; -#X obj 108 87 metro 100; -#X obj 108 55 tgl 15 0 empty empty empty 17 7 0 10 -24198 -1 -1 1 1 -; -#X obj 108 262 #out window; -#X obj 3 1 cnv 15 620 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 402 2 GridFlow 0.9.0; -#X obj 2 300 cnv 15 620 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 3 326 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 3 382 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 64 349 Grid values are clipped to the high and low values stored -in the object; -#X text 2 409 INTEGER; -#X text 5 328 Inlet 0; -#X text 5 384 Inlet 1; -#X text 204 302 Inlets (3); -#X obj 3 439 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 6 441 Inlet 2; -#X text 3 469 INTEGER; -#X obj 1 497 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 203 499 Outlets (1); -#X obj 2 520 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 4 522 Outlet 0; -#X text 3 350 GRID; -#X text 4 543 GRID; -#X text 63 543 Outputs the modified grid; -#X text 69 408 An integer can be used to vary the minimum value of -the range.; -#X text 67 466 An integer can be used to vary the maximum value of -the range.; -#X obj 108 116 #in scissors.jpg; -#X obj 298 149 hsl 128 15 0 127 0 0 empty empty empty -2 -8 0 10 -241291 --1 -1 12700 1; -#X text 6 25 Draws a vu metre-like rectangle on an image.; -#X text 438 148 <-- value to be displayed; -#X msg 206 195 255 200 150; -#X text 289 195 <-- colour; -#X obj 3 0 #draw_vumetre; -#X obj 108 224 #draw_slider put (0 255 0) (255 0 255) (40 40 80 200) -0 127; -#X connect 0 0 25 0; -#X connect 1 0 0 0; -#X connect 25 0 32 0; -#X connect 26 0 32 2; -#X connect 29 0 32 1; -#X connect 32 0 2 0; 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 8aefa013..00000000 --- a/externals/gridflow/doc/flow_classes/#fade-help.pd +++ /dev/null @@ -1,71 +0,0 @@ -#N canvas 68 0 507 631 10; -#X obj 4 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 6 526 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 4 327 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 4 350 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 9 351 Inlet_0; -#X text 206 329 Inlets (2); -#X text 215 528 Outlets (1); -#X obj 3 425 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 5 549 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 9 550 Inlet_0; -#X text 8 426 Inlet_1; -#X obj 14 0 #fade; -#X obj 253 276 #out window; -#X msg 140 155 open b001.jpg; -#X obj 131 111 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X obj 131 183 #in; -#X obj 131 130 t b b; -#X obj 227 205 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X floatatom 296 231 5 0 0 0 - - -; -#X obj 131 89 metro 500; -#X obj 131 70 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 -; -#X obj 253 113 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X obj 253 185 #in; -#X obj 253 132 t b b; -#X msg 262 157 open r001.jpg; -#X obj 253 91 metro 500; -#X obj 253 72 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 -; -#X text 9 25 Crossfade between two images.; -#X obj 253 250 cnv 15 37 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 253 250 #fade; -#X text 11 385 GRID; -#X text 69 383 Accepts two grids that are blended into each other over -time.; -#X text 8 457 INTEGER; -#X text 73 456 An integer in the rightmost inlet will indicate the -amount of one image being blended with the other. (ex: Integer 5 will -take 20% (one fifth) of the first image and blend it with 80% of the -next image.; -#X text 76 587 Outputs the fading images.; -#X text 13 584 GRID; -#X text 399 1 GridFlow 0.8.4; -#X connect 13 0 15 0; -#X connect 14 0 16 0; -#X connect 15 0 29 0; -#X connect 16 0 15 0; -#X connect 16 1 13 0; -#X connect 17 0 29 0; -#X connect 18 0 29 1; -#X connect 19 0 14 0; -#X connect 20 0 19 0; -#X connect 21 0 23 0; -#X connect 22 0 29 0; -#X connect 23 0 22 0; -#X connect 23 1 24 0; -#X connect 24 0 22 0; -#X connect 25 0 21 0; -#X connect 26 0 25 0; -#X connect 29 0 12 0; diff --git a/externals/gridflow/doc/flow_classes/#fastblur-help.pd b/externals/gridflow/doc/flow_classes/#fastblur-help.pd deleted file mode 100644 index 458d82ed..00000000 --- a/externals/gridflow/doc/flow_classes/#fastblur-help.pd +++ /dev/null @@ -1,69 +0,0 @@ -#N canvas 310 131 669 377 10; -#N canvas 0 0 450 300 test 0; -#X obj 264 137 # +; -#X obj 23 58 #for (0 0) (5 5) (1 1); -#X obj 23 96 #fold & \, seed 1; -#X obj 23 41 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 23 115 #convolve (3 3 # 1 2 3 4 5 6 7 8 9) \, wrap 0 \, anti -0; -#X obj 22 77 # == 2; -#X obj 23 134 #print; -#X obj 264 156 #print; -#X connect 0 0 7 0; -#X connect 1 0 5 0; -#X connect 2 0 0 0; -#X connect 2 0 4 0; -#X connect 3 0 1 0; -#X connect 4 0 6 0; -#X connect 5 0 2 0; -#X restore 453 27 pd test convolve attr; -#X obj 20 53 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 1 1; -#X obj 38 54 metro 33.3667; -#X obj 100 92 loadbang; -#X obj 84 93 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 38 109 #store; -#X obj 38 289 #out window; -#X obj 39 329 display; -#X obj 38 308 fps detailed; -#X obj 84 109 #in teapot.png; -#X obj 298 55 f; -#X obj 324 55 + 1; -#X obj 149 300 #pack; -#X obj 38 84 t b b; -#X obj 38 130 #fastblur; -#X obj 305 95 expr 1+100*pow(sin($f1/25) \, 4); -#X obj 294 75 expr 1+100*pow(sin($f1/20) \, 4); -#X obj 150 166 vsl 15 128 1 128 0 0 empty empty empty 0 -8 0 8 -262144 --1 -1 0 1; -#X obj 170 166 vsl 15 128 1 128 0 0 empty empty empty 0 -8 0 8 -262144 --1 -1 0 1; -#X obj 298 36 spigot; -#X obj 344 37 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 1 -; -#X obj 38 269 #gamma 700; -#X text 363 37 AUTO; -#X connect 1 0 2 0; -#X connect 2 0 13 0; -#X connect 3 0 9 0; -#X connect 4 0 9 0; -#X connect 5 0 14 0; -#X connect 6 0 8 0; -#X connect 8 0 7 0; -#X connect 9 0 5 1; -#X connect 10 0 11 0; -#X connect 10 0 15 0; -#X connect 10 0 16 0; -#X connect 11 0 10 1; -#X connect 12 0 14 1; -#X connect 13 0 5 0; -#X connect 13 1 19 0; -#X connect 14 0 21 0; -#X connect 15 0 18 0; -#X connect 16 0 17 0; -#X connect 17 0 12 0; -#X connect 18 0 12 1; -#X connect 19 0 10 0; -#X connect 20 0 19 1; -#X connect 21 0 6 0; diff --git a/externals/gridflow/doc/flow_classes/#fft-help.pd b/externals/gridflow/doc/flow_classes/#fft-help.pd deleted file mode 100644 index 10a7f1d5..00000000 --- a/externals/gridflow/doc/flow_classes/#fft-help.pd +++ /dev/null @@ -1,43 +0,0 @@ -#N canvas 653 283 450 341 10; -#X obj 13 94 #cast f; -#X obj 13 186 #cast i; -#X obj 13 36 #in teapot.png; -#X obj 32 14 loadbang; -#X obj 13 15 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1 -; -#X obj 13 56 t a a; -#X obj 13 262 @join 1; -#X obj 13 148 #fft; -#X msg 23 126 help; -#X msg 63 126 skip \$1; -#X obj 64 113 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 1 -; -#X obj 52 56 s orig; -#X obj 66 262 r orig; -#X obj 13 281 #out window; -#X obj 13 224 # + 128; -#X obj 13 243 #clip; -#X obj 13 75 #outer * (1 0); -#X obj 13 205 #inner (1 0); -#X text 89 205 convert complex to real (kicking dummy imaginary); -#X text 100 75 convert real to complex (introducing dummy imaginary=0) -; -#X obj 13 167 # / (f # 16); -#X connect 0 0 7 0; -#X connect 1 0 17 0; -#X connect 2 0 5 0; -#X connect 3 0 2 0; -#X connect 4 0 2 0; -#X connect 5 0 16 0; -#X connect 5 1 11 0; -#X connect 6 0 13 0; -#X connect 7 0 20 0; -#X connect 8 0 7 0; -#X connect 9 0 7 0; -#X connect 10 0 9 0; -#X connect 12 0 6 1; -#X connect 14 0 15 0; -#X connect 15 0 6 0; -#X connect 16 0 0 0; -#X connect 17 0 14 0; -#X connect 20 0 1 0; diff --git a/externals/gridflow/doc/flow_classes/#finished-help.pd b/externals/gridflow/doc/flow_classes/#finished-help.pd deleted file mode 100644 index f28771ac..00000000 --- a/externals/gridflow/doc/flow_classes/#finished-help.pd +++ /dev/null @@ -1,15 +0,0 @@ -#N canvas 551 311 442 238 10; -#X text 22 53 a bang is emitted every time a grid transmission ends -; -#X obj 24 175 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1 --1; -#X floatatom 24 80 5 0 0 0 - - -; -#X floatatom 47 98 5 0 0 0 - - -; -#X text 371 15 gridflow; -#X obj 24 146 #finished; -#X obj 24 117 #pack; -#X text 21 22 #finished; -#X connect 2 0 6 0; -#X connect 3 0 6 1; -#X connect 5 0 1 0; -#X connect 6 0 5 0; diff --git a/externals/gridflow/doc/flow_classes/#fold-help.pd b/externals/gridflow/doc/flow_classes/#fold-help.pd deleted file mode 100644 index f11f9d82..00000000 --- a/externals/gridflow/doc/flow_classes/#fold-help.pd +++ /dev/null @@ -1,78 +0,0 @@ -#N canvas 310 0 507 682 10; -#X obj 1 1 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 5 419 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 3 328 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 3 351 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 204 421 Outlets (1); -#X obj 4 503 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 5 440 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 6 464 GRID; -#X text 393 2 GridFlow 0.8.4; -#X text 8 352 Inlet 0; -#X obj 4 532 cnv 15 80 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 8 533 Argument 0; -#X obj 27 219 cnv 15 52 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X text 9 441 Outlet 0; -#X obj 11 2 #fold +; -#X obj 98 184 display; -#X obj 29 252 display; -#X text 26 38 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 205 330 Inlets (1); -#X obj 143 249 #export; -#X obj 143 274 print values; -#X text 4 378 GRID; -#X text 6 651 some other forms:; -#X obj 140 652 #fold *; -#X text 200 504 Arguments (); -#X obj 17 625 #fold + \, seed 0; -#X obj 4 583 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 200 584 Attribute (); -#X obj 211 652 #fold ^; -#X obj 284 652 #fold &; -#X obj 355 652 #fold |; -#N canvas 0 0 450 300 more 0; -#X obj 29 137 cnv 15 148 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 98 82 display; -#X obj 28 48 #import (2 2 2); -#X obj 29 170 display; -#X msg 28 27 1 3 1 3 1 3 1 5; -#X text 154 24 <-- clicking here creates a grid through [#import]; -#X obj 122 170 #export; -#X obj 122 195 print values; -#X obj 28 137 #fold + \, seed ( 0 0 ); -#X connect 2 0 1 0; -#X connect 2 0 8 0; -#X connect 4 0 2 0; -#X connect 6 0 7 0; -#X connect 8 0 3 0; -#X connect 8 0 6 0; -#X restore 160 624 pd more info; -#X text 71 464 Outputs a grid of one less dimension.; -#X text 69 377 Accepts a grid of a minimum of one dimension.; -#X msg 28 129 1 3 1 3 1 3 1 3 1 3 1 5; -#X obj 28 153 #import (2 3 2); -#X obj 28 219 #fold +; -#X text 203 129 <-- clicking here creates a grid through [#import] -; -#X text 6 556 Numeric Operator; -#X text 131 555 guiding the application of the fold.; -#X connect 19 0 20 0; -#X connect 34 0 35 0; -#X connect 35 0 15 0; -#X connect 35 0 36 0; -#X connect 36 0 16 0; -#X connect 36 0 19 0; diff --git a/externals/gridflow/doc/flow_classes/#for-help.pd b/externals/gridflow/doc/flow_classes/#for-help.pd deleted file mode 100644 index 72513fbb..00000000 --- a/externals/gridflow/doc/flow_classes/#for-help.pd +++ /dev/null @@ -1,96 +0,0 @@ -#N canvas 694 0 506 928 10; -#X floatatom 13 227 5 0 0 0 - - -; -#X floatatom 45 249 5 0 0 0 - - -; -#X floatatom 78 270 5 0 0 0 - - -; -#X obj 13 365 #print; -#X obj 0 2 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 10 659 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 8 415 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 8 438 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 219 661 Outlets (1); -#X obj 9 757 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 8 512 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 10 680 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 15 704 GRID; -#X obj 7 3 #for 0 320 1; -#X obj 33 332 display; -#X text 210 417 Inlets (3); -#X text 213 758 Arguments (3); -#X obj 9 586 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 14 587 Inlet 2; -#X text 13 514 Inlet 1; -#X text 13 439 Inlet 0; -#X obj 9 786 cnv 15 80 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 13 787 Argument 0; -#X obj 8 852 cnv 15 80 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 8 908 cnv 15 80 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 12 853 Argument 1; -#X text 12 909 Argument 2; -#X obj 15 297 cnv 15 70 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X text 119 270 <-- step value; -#X text 90 247 <-- upper bound; -#X text 60 224 <-- lower bound; -#X obj 13 297 #for 0 8 1; -#X obj 264 364 #print; -#X obj 284 334 display; -#X obj 266 303 cnv 15 70 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X msg 264 228 0 0; -#X msg 329 276 1 1; -#X obj 264 303 #for 0 8 1; -#X msg 296 253 4 4; -#X text 11 814 INTEGER; -#X text 11 875 INTEGER; -#X text 11 935 INTEGER; -#X text 14 681 Outlet 0; -#X text 105 875 Upper bound; -#X text 106 935 Step value; -#X text 106 815 Lower bound. As with the other arguments \, they are -overwritten when another value is given.; -#X text 11 488 LIST; -#X text 374 276 <-- step value (1); -#X text 343 252 <-- upper bound (2); -#X text 309 227 <-- lower bound (3); -#X text 26 38 When given scalar bounds \, works like a regular [for] -object plugged to a [#import] tuned for a Dim(size) where size is the -number of values produced by a bang to that [for].; -#X text 26 84 When given vector bounds \, will work like any number -of [for] objects producing all possible combinations of their values -in the proper order.; -#X text 35 193 scalar bounds; -#X text 303 196 vector bounds; -#X text 9 465 INTEGER; -#X text 74 466 Sets the lower bound; -#X text 11 558 LIST; -#X text 9 535 INTEGER; -#X text 74 536 Sets the upper bound; -#X text 11 634 LIST; -#X text 9 611 INTEGER; -#X text 74 612 Sets the step value; -#X text 76 707 The result of the operation is a single dimension grid -in the case of scalar values and variable dimensions for vectors.; -#X text 27 137 Syntax: #for <from> <to> <step> outlet: grid dim(size) -where size = floor(to-from+1)/step.; -#X text 391 3 GridFlow 0.9.0; -#X connect 0 0 31 0; -#X connect 1 0 31 1; -#X connect 2 0 31 2; -#X connect 31 0 14 0; -#X connect 31 0 3 0; -#X connect 35 0 37 0; -#X connect 36 0 37 2; -#X connect 37 0 33 0; -#X connect 37 0 32 0; -#X connect 38 0 37 1; diff --git a/externals/gridflow/doc/flow_classes/#grade-help.pd b/externals/gridflow/doc/flow_classes/#grade-help.pd deleted file mode 100644 index b5972f3b..00000000 --- a/externals/gridflow/doc/flow_classes/#grade-help.pd +++ /dev/null @@ -1,20 +0,0 @@ -#N canvas 375 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 floatatom 19 74 5 0 0 0 - - -; -#X floatatom 60 74 5 0 0 0 - - -; -#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 obj 19 106 #pack 4; -#X obj 19 139 #grade; -#X obj 19 168 #print; -#X text 14 15 #grade; -#X connect 1 0 7 0; -#X connect 2 0 7 1; -#X connect 3 0 7 2; -#X connect 4 0 7 3; -#X connect 7 0 8 0; -#X connect 8 0 9 0; diff --git a/externals/gridflow/doc/flow_classes/#greyscale_to_rgb-help.pd b/externals/gridflow/doc/flow_classes/#greyscale_to_rgb-help.pd deleted file mode 100644 index 7f60c43d..00000000 --- a/externals/gridflow/doc/flow_classes/#greyscale_to_rgb-help.pd +++ /dev/null @@ -1,15 +0,0 @@ -#N canvas 119 122 433 374 10; -#X obj 19 161 s xx; -#X obj 19 185 r xx; -#X text 353 13 gridflow; -#X obj 19 105 #in; -#X obj 19 141 #rgb_to_greyscale; -#X obj 19 205 #greyscale_to_rgb; -#X obj 19 263 #out window; -#X msg 19 74 load bluemarble.jpg; -#X text 24 5 #greyscale_to_rgb; -#X connect 1 0 5 0; -#X connect 3 0 4 0; -#X connect 4 0 0 0; -#X connect 5 0 6 0; -#X connect 7 0 3 0; diff --git a/externals/gridflow/doc/flow_classes/#import-help.pd b/externals/gridflow/doc/flow_classes/#import-help.pd deleted file mode 100644 index 9eaba934..00000000 --- a/externals/gridflow/doc/flow_classes/#import-help.pd +++ /dev/null @@ -1,87 +0,0 @@ -#N canvas 997 26 505 766 10; -#X obj 1 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 602 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 222 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 245 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 215 604 Outlets (1); -#X obj 1 700 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 210 699 Arguments (1); -#X obj 1 623 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 2 246 Inlet 0; -#X text 2 624 Outlet 0; -#X msg 55 123 reset; -#X obj 13 59 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1 -; -#X msg 13 123 200; -#X obj 13 100 until; -#X msg 13 79 230400; -#X obj 13 177 #out window; -#X obj 13 149 cnv 15 129 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X text 7 728 GRID; -#X text 74 727 The argument establishes grid dimensions in parentheses -in the order of columns \, rows and grid dimensions.; -#X obj 13 149 #import ( 240 320 3 ); -#X text 4 274 INTEGER; -#X text 5 338 SYMBOL; -#X text 76 337 Symbols are considered as a list of ascii characters. -; -#X text 7 364 LIST; -#X text 76 363 Like a sequence of ints sent one after another \, except -in a single message.; -#X text 7 399 MESSAGE; -#X text 76 396 "reset" aborts the current grid if there is one.; -#X text 6 451 GRID; -#X obj 1 508 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 2 509 Inlet 1; -#X text 8 651 GRID; -#X text 80 651 The grid resulting from the incoming integers and/or -grids is output from the outlet.; -#X text 99 24 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. -; -#X text 77 451 This equivalent to filtering the grid through an [#export] -object. It is over ten times faster.; -#X msg 157 125 per_message; -#X msg 158 147 240 320 3; -#X text 75 274 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.; -#X text 7 540 MESSAGE; -#X text 81 539 "per message" : the grid will shape itself according -to the incoming data. Almost obsolete as sending a list to any grid -inlet will result in the same except the latter can not be cast to -other than int32.; -#X text 7 423 MESSAGE; -#X text 74 422 "to_ascii \$1" converts ints as decimal in ascii codes -; -#X text 215 222 Inlets (2); -#X obj 294 166 #import; -#X msg 294 144 to_ascii \$1; -#X floatatom 294 124 5 0 0 0 - - -; -#X obj 294 188 #print; -#X text 398 1 GridFlow 0.9.3; -#X obj 12 0 #import; -#X connect 10 0 19 0; -#X connect 11 0 14 0; -#X connect 12 0 19 0; -#X connect 13 0 12 0; -#X connect 14 0 13 0; -#X connect 19 0 15 0; -#X connect 34 0 19 1; -#X connect 35 0 19 1; -#X connect 42 0 45 0; -#X connect 43 0 42 0; -#X connect 44 0 43 0; diff --git a/externals/gridflow/doc/flow_classes/#import_pix-help.pd b/externals/gridflow/doc/flow_classes/#import_pix-help.pd deleted file mode 100644 index 1d817b7a..00000000 --- a/externals/gridflow/doc/flow_classes/#import_pix-help.pd +++ /dev/null @@ -1,116 +0,0 @@ -#N canvas 751 44 507 754 10; -#X obj -40 -45 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 357 -44 GridFlow 0.9.3; -#X obj -41 683 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj -41 683 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj -41 683 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj -41 683 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text -35 682 see also :; -#X obj -41 357 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj -41 385 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text -40 386 Inlet 0; -#X obj -41 485 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj -41 513 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text -40 512 Outlet 0; -#X obj -41 485 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj -41 513 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text -40 512 Outlet 0; -#X obj -41 485 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj -41 513 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text -40 512 Outlet 0; -#X obj -41 485 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 170 485 Outlets (1); -#X obj -41 513 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text -40 512 Outlet 0; -#X obj -41 485 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj -41 485 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj -41 485 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 170 485 Outlets (1); -#X obj -42 632 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj -42 632 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj -42 632 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj -42 632 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj -41 571 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 102 681 \, game_of_life_gem.pd in the examples folder; -#X text -33 534 GRID; -#X text -36 593 gemlist; -#X text 47 534 Grid with 4 channels; -#X text 172 631 Arguments (0); -#X text -37 434 yflip; -#X text 41 435 With one boolean argument that selects the order in -which the y dimension of the Grid will be read \, defaults to '1'; -#X text -39 -46 [#import_pix]; -#X text 48 681 [#to_pix]; -#X obj -28 251 #import_pix; -#X obj -13 176 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 -1; -#X msg -13 195 yflip \$1; -#X msg -6 217 help; -#X obj -28 -11 gemhead; -#X obj -28 147 pix_image; -#N canvas 0 0 450 300 openpanel 0; -#X obj 114 62 inlet; -#X obj 121 254 outlet; -#X obj 114 125 openpanel; -#X msg 114 162 set open \$1; -#X obj 114 199 t b a; -#X connect 0 0 2 0; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 4 0 1 0; -#X connect 4 1 1 0; -#X restore -10 64 pd openpanel; -#X msg -10 85 open /home/alx/Documents/src/pd-0.40-2/extra/svn_GridFlow/trunk/images/babbage.jpg -; -#X obj -10 42 bng 15 250 50 0 empty empty empty 17 7 0 10 -4034 -1 --1; -#X msg 341 5 create \, 1; -#X obj 341 -14 loadbang; -#X msg 405 6 destroy; -#X text 12 40 <-- load image; -#X obj -28 293 #out window \, title imported_pix; -#X text -13 328 Note : The fps is dependent on the gemwin framerate -; -#X obj 341 34 gemwin 30; -#X text -38 404 gemlist; -#X text 50 251 <-- imports gemlist into Grids; -#X text 40 404 Has to be a 'pix' gemlist; -#X text 175 357 Inlet (1); -#X text 36 537; -#X text -38 572 Outlet 1; -#X text 43 593 Passthrough outlet for gem chain; -#X connect 41 0 54 0; -#X connect 42 0 43 0; -#X connect 43 0 41 0; -#X connect 44 0 41 0; -#X connect 45 0 46 0; -#X connect 46 0 41 0; -#X connect 47 0 48 0; -#X connect 48 0 46 0; -#X connect 49 0 47 0; -#X connect 50 0 56 0; -#X connect 51 0 50 0; -#X connect 52 0 56 0; 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 f2f9a610..00000000 --- a/externals/gridflow/doc/flow_classes/#in-help.pd +++ /dev/null @@ -1,226 +0,0 @@ -#N canvas 172 0 512 689 10; -#X obj 354 172 #out window; -#X obj 7 9 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 17 10 #in; -#X text 13 34 This object imports a grid \, usually an image \, video -or live stream.; -#X msg 362 126 open working.jpg; -#X obj 354 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X text 55 181 <--click here; -#X obj 8 352 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 13 353 Inlet_0; -#X text 79 379 A bang sends a grid to [#out]. Since frames from videos -and live streams are read as a series of individual grids \, successive -bangs advance through the frames.; -#X text 77 466 "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 text 77 512 "close" - Closes the video input device. Only necessary -when you are using a live capture device.; -#X text 76 546 "rewind" - Will rewind video to the beginning.; -#X text 76 600 "loop 0" - turns off the loop option. The video stops -once it reaches the end.; -#X text 81 862 Signals the end of a file and when a file is unreadable. -; -#X obj 8 789 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 9 790 Outlet_0; -#X text 82 814 Displays the resulting grid when connected to [#out -window]; -#X obj 10 839 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 10 840 Outlet_1; -#X text 81 892 Displays the frame number of the frame currently being -viewed. Applies to formats that have frame numbers \, i.e. video.; -#X obj 7 328 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 201 329 Inlets (1); -#N canvas 82 93 663 454 quicktime 0; -#X text 9 9 The following messages can be used to set parameters for -video (.mov) files.; -#X text 128 283 different versions of LibQuickTime may include support -for different codecs \, and some may also support entirely different -wrapper formats such as AVI.; -#X text 129 367 Codecs must be set before first frame is written.; -#X text 128 330 QuickTime library for Macintosh: Apple QuickTime (some -codecs/features may not be available).; -#X obj 9 272 cnv 15 24 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X msg 38 230 codec jpg; -#X msg 23 116 framerate 33; -#X msg 33 203 colorspace rgb; -#X msg 18 78 size 400 600; -#X obj 10 272 #in; -#X text 145 117 Number of frames per second.; -#X msg 32 171 parameter jpeg_quality 85; -#X text 187 147 Determines window size when reading a video file.; -#X text 129 230 quicktime library for linux accepts LibQuickTime (libquicktime.so). -codecs currently available are: Raw \, jpeg \, png \, mipa \, yuv2 -\, yuv4.; -#X text 134 84 Sets height and width. Must be set before setting the -codec parameters and after setting framerate and codec.; -#X text 107 230 <--; -#X text 108 80 <--; -#X text 119 118 <--; -#X text 108 80 <--; -#X text 108 80 <--; -#X text 162 147 <--; -#X text 212 173 <--; -#X text 139 206 <--; -#X text 237 174 Sets compression quality (100 being the highest quality -\, but a large file. 75-85 is the standard setting).; -#X text 163 209 Other colorspaces include rgba \, bgr \, bgra \, yuv -\, yuva.; -#X msg 10 54 open example.mov; -#X msg 28 145 force_size 480 640; -#X obj 103 427 #record; -#X text 15 427 see also :; -#X connect 5 0 9 0; -#X connect 6 0 9 0; -#X connect 7 0 9 0; -#X connect 8 0 9 0; -#X connect 11 0 9 0; -#X connect 25 0 9 0; -#X connect 26 0 9 0; -#X restore 145 688 pd quicktime file messages; -#X obj 353 151 cnv 15 25 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 354 151 #in; -#X obj 15 228 cnv 15 25 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X floatatom 202 195 5 0 0 0 - - -; -#X msg 202 151 set 2; -#X msg 202 107 loop 0; -#X msg 202 129 loop 1; -#X floatatom 32 285 5 0 0 0 - - -; -#X msg 202 173 rewind; -#X obj 41 267 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 16 228 #in; -#X text 39 98 <--click here; -#X obj 17 96 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1; -#X obj 17 120 metro 33.3; -#X obj 355 255 cnv 15 101 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 356 234 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X obj 356 280 #out window; -#X obj 356 255 #in sewing.jpg; -#X text 378 234 <--click here; -#X text 77 671 For info about messages specifically for quickTime files -\, click on:; -#N canvas 150 0 874 560 more 0; -#X msg 191 388 open videodev \$1 \, get; -#X msg 52 147 brightness 1000; -#X msg 41 124 hue 1000; -#X msg 26 101 color 1000; -#X msg 65 171 contrast 1000; -#X msg 14 78 whiteness 1000; -#X msg 80 264 channel 2; -#X msg 80 294 tuner 2; -#X msg 81 324 norm 2; -#X msg 81 352 frequency 2; -#X msg 190 456 transfer mmap 4; -#X msg 191 356 transfer read; -#X msg 190 434 colorspace RGB24; -#X msg 191 411 size 400 600; -#X obj 14 441 #in; -#X obj 192 172 #contrast; -#X text 166 172 or; -#X text 306 411 Sets height and width of the input.; -#X text 322 488 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 16 12 Grid Settings; -#X text 322 457 This is the standard and fastest way to receive pictures -from the camera.; -#X text 121 99 Message "get brightness" or "get" followed by any of -the other colour attributes will display its values in the console. -; -#X text 375 390 Opens video device.; -#X text 331 435 Supported values are RGB24 or YUV420P.; -#X text 14 48 Color Adjustments; -#X text 144 75 Values from 0 to 65535; -#X text 283 412 <--; -#X text 309 435 <--; -#X text 345 390 <--; -#X text 300 456 <--; -#X text 287 357 <--; -#X text 310 357 Some cameras/drivers only support "transfer read" and -not mmap.; -#X text 6 520 see also :; -#X obj 92 520 #camera; -#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 145 649 pd more info about video devices; -#X text 77 632 For info about messages specifically for video devices -\, click on:; -#X text 8 813 GRID; -#X text 10 863 BANG; -#X text 9 890 INTEGER; -#X text 7 962 FILE NAME; -#X text 9 381 GRID; -#X text 9 433 MESSAGE; -#X text 8 727 INTEGER; -#X text 169 213 (and turn off the metro); -#X text 244 195 <-- vary this; -#X obj 7 765 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 197 766 Outlets (2); -#X text 197 766 Outlets (2); -#X obj 8 943 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 195 944 Arguments; -#X text 352 74 IMAGE FILES:; -#X text 12 72 VIDEO FILES:; -#X obj 28 183 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X text 380 106 <-- click here; -#X text 68 265 <-- sends a bang upon reaching; -#X text 97 278 the end of the file; -#X obj 16 305 #out window \, title video; -#X text 90 962 Including the file name of a grid into the [#in] object -eliminates the need for an "open" message but limits the action to -one specified grid.; -#X text 77 432 "open" - followed by the filename \, sends it as a resource -to [#out]. For example: "open sewing.jpg".; -#X text 77 727 Outputs the frame that corresponds to the value. Applies -to formats that have frame numbers \, i.e. video.; -#X text 76 566 "loop 1" - Restarts a video each time it reaches the -end (default setting).; -#X obj 41 248 route bang; -#X msg 24 147 open violoncelle.mov; -#X text 402 10 GridFlow 0.9.1; -#X connect 4 0 25 0; -#X connect 5 0 25 0; -#X connect 25 0 0 0; -#X connect 27 0 34 0; -#X connect 28 0 34 0; -#X connect 29 0 34 0; -#X connect 30 0 34 0; -#X connect 32 0 34 0; -#X connect 34 0 66 0; -#X connect 34 1 31 0; -#X connect 34 1 71 0; -#X connect 36 0 37 0; -#X connect 37 0 34 0; -#X connect 39 0 41 0; -#X connect 41 0 40 0; -#X connect 62 0 34 0; -#X connect 71 0 33 0; -#X connect 72 0 34 0; diff --git a/externals/gridflow/doc/flow_classes/#layer-help.pd b/externals/gridflow/doc/flow_classes/#layer-help.pd deleted file mode 100644 index 1ba4a977..00000000 --- a/externals/gridflow/doc/flow_classes/#layer-help.pd +++ /dev/null @@ -1,28 +0,0 @@ -#N canvas 297 445 656 323 10; -#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 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 234 69 load b001.jpg; -#X obj 211 96 #in; -#X obj 237 96 #rgb_to_greyscale; -#X obj 406 96 #in; -#X msg 429 71 load g001.jpg; -#X msg 41 71 load r001.jpg; -#X obj 18 96 #in; -#X obj 18 208 #layer; -#X obj 18 161 @join -1; -#X obj 18 269 #out window; -#X text 14 5 #layer; -#X connect 5 0 6 0; -#X connect 6 0 7 0; -#X connect 7 0 13 1; -#X connect 8 0 12 1; -#X connect 9 0 8 0; -#X connect 10 0 11 0; -#X connect 11 0 13 0; -#X connect 12 0 14 0; -#X connect 13 0 12 0; diff --git a/externals/gridflow/doc/flow_classes/#line_to_polygon-help.pd b/externals/gridflow/doc/flow_classes/#line_to_polygon-help.pd deleted file mode 100644 index 8eb85df3..00000000 --- a/externals/gridflow/doc/flow_classes/#line_to_polygon-help.pd +++ /dev/null @@ -1,12 +0,0 @@ -#N canvas 184 260 450 300 10; -#X obj 51 156 #draw_polygon put (255 255 255); -#X obj 51 175 #out window; -#X msg 51 137 240 320 3 #; -#X obj 279 165 display; -#X msg 263 118 2 2 # 10 10 229 309; -#X obj 263 137 #line_to_polygon 4; -#X connect 0 0 1 0; -#X connect 2 0 0 0; -#X connect 4 0 5 0; -#X connect 5 0 0 2; -#X connect 5 0 3 0; diff --git a/externals/gridflow/doc/flow_classes/#moment-help.pd b/externals/gridflow/doc/flow_classes/#moment-help.pd deleted file mode 100644 index 0fbe0306..00000000 --- a/externals/gridflow/doc/flow_classes/#moment-help.pd +++ /dev/null @@ -1,131 +0,0 @@ -#N canvas 576 46 644 643 10; -#X obj 19 24 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 1 1; -#X msg 234 28 4 2 # 1 1 1 -1 -1 -1 -1 1; -#X obj 111 208 display; -#X obj 43 238 display; -#X obj 234 66 #rotate; -#X obj 288 56 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10 --241291 -1 -1 -1831 256; -#X obj 288 72 * 100; -#X obj 18 587 #out window; -#X obj 67 161 #t; -#X obj 110 187 #moment; -#X msg 41 85 240 320 1 #; -#X obj 41 104 #draw_polygon put (1 # 255); -#X obj 426 103 #pack; -#X obj 234 85 # +; -#X obj 456 87 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10 --241291 -1 -1 -45 256; -#X obj 426 71 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10 --241291 -1 -1 12 256; -#X obj 426 52 #pack; -#X obj 456 36 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10 --241291 -1 -1 32 256; -#X obj 426 20 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10 --241291 -1 -1 49 256; -#X obj 234 47 # *; -#X obj 245 123 # inv+; -#X obj 245 104 # +; -#X obj 426 154 #pack; -#X obj 456 138 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10 --241291 -1 -1 149 256; -#X obj 426 122 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10 --241291 -1 -1 128 256; -#X obj 41 123 #draw_polygon put (1 # 255); -#X text 162 550 red filter; -#X text 121 85 draw rectangles; -#X text 238 11 rectangle polygon; -#X obj 42 186 #moment 2; -#X obj 269 172 #moment_polar; -#X obj 356 192 display; -#X obj 270 212 display; -#X obj 5 61 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1 -; -#X text 141 309 this is a fudge factor.; -#X obj 18 606 fps; -#X floatatom 18 625 5 0 0 0 - - -; -#X text 143 321 depending on what you want to do \,; -#X text 140 333 you set it to 2 \, 3 \, 4 \, whatever.; -#X obj 402 364 #outer + (9000 0); -#X obj 523 429 #transpose; -#X obj 20 60 t b b b; -#X obj 402 540 # + (120 160); -#X obj 63 340 cv.SVD; -#X obj 63 302 #cast f; -#X obj 63 399 #inner \, seed (f #); -#X obj 402 402 #cast f; -#X obj 402 459 #inner \, seed (f #); -#X obj 402 507 #cast i; -#X obj 63 378 #swap; -#X obj 402 326 #for 0 160 1; -#X obj 63 359 # sqrt (f #); -#X obj 63 321 # * (f # 3); -#X obj 402 479 # / (f # 1000); -#X obj 402 383 # cos* 1000; -#X obj 402 345 # * 225; -#X obj 18 549 #inner (1 3 # 1 0 0); -#X obj 18 568 #draw_polygon + (0 255 255) (2 2 #); -#X obj 19 41 metro 20; -#X obj 18 144 #t; -#X connect 0 0 58 0; -#X connect 1 0 19 0; -#X connect 4 0 13 0; -#X connect 5 0 6 0; -#X connect 6 0 4 1; -#X connect 7 0 35 0; -#X connect 8 0 29 0; -#X connect 8 1 9 0; -#X connect 9 0 2 0; -#X connect 9 0 29 1; -#X connect 9 0 42 1; -#X connect 10 0 11 0; -#X connect 11 0 25 0; -#X connect 12 0 13 1; -#X connect 13 0 21 0; -#X connect 13 0 20 0; -#X connect 14 0 12 1; -#X connect 15 0 12 0; -#X connect 16 0 19 1; -#X connect 17 0 16 1; -#X connect 18 0 16 0; -#X connect 19 0 4 0; -#X connect 20 0 25 2; -#X connect 21 0 11 2; -#X connect 22 0 21 1; -#X connect 22 0 20 1; -#X connect 23 0 22 1; -#X connect 24 0 22 0; -#X connect 25 0 59 0; -#X connect 29 0 3 0; -#X connect 29 0 30 0; -#X connect 29 0 44 0; -#X connect 30 0 32 0; -#X connect 30 1 31 0; -#X connect 33 0 41 0; -#X connect 35 0 36 0; -#X connect 39 0 54 0; -#X connect 40 0 47 1; -#X connect 41 0 50 0; -#X connect 41 1 10 0; -#X connect 41 2 1 0; -#X connect 42 0 57 2; -#X connect 43 0 51 0; -#X connect 43 1 49 1; -#X connect 44 0 52 0; -#X connect 45 0 40 0; -#X connect 46 0 47 0; -#X connect 47 0 53 0; -#X connect 48 0 42 0; -#X connect 49 0 45 0; -#X connect 49 1 45 1; -#X connect 50 0 55 0; -#X connect 51 0 49 0; -#X connect 52 0 43 0; -#X connect 53 0 48 0; -#X connect 54 0 46 0; -#X connect 55 0 39 0; -#X connect 56 0 57 0; -#X connect 57 0 7 0; -#X connect 58 0 41 0; -#X connect 59 0 56 0; -#X connect 59 1 8 0; diff --git a/externals/gridflow/doc/flow_classes/#moment_polar-help.pd b/externals/gridflow/doc/flow_classes/#moment_polar-help.pd deleted file mode 100644 index ea9ba995..00000000 --- a/externals/gridflow/doc/flow_classes/#moment_polar-help.pd +++ /dev/null @@ -1,11 +0,0 @@ -#N canvas 387 219 527 300 10; -#X obj 37 167 #moment-help; -#X obj 40 30 #moment_polar; -#X text 48 50 inlet 0: covariance matrix \, from [#moment 2] or compatible. -; -#X text 112 65 must be a 2x2 symmetric matrix.; -#X text 48 92 outlet 0: angle (only makes sense with a 2x2 matrix) -as int; -#X text 48 112 outlet 1: radiuses (from biggest to smallest) as float -grid; -#X text 30 151 please open this other help patch for a demo:; diff --git a/externals/gridflow/doc/flow_classes/#motion_detection-help.pd b/externals/gridflow/doc/flow_classes/#motion_detection-help.pd deleted file mode 100644 index 15658a8b..00000000 --- a/externals/gridflow/doc/flow_classes/#motion_detection-help.pd +++ /dev/null @@ -1,44 +0,0 @@ -#N canvas 1267 0 485 405 10; -#X obj 47 40 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 1 1; -#X obj 47 342 print; -#X obj 47 319 fps detailed; -#X obj 47 68 metro 33.3667; -#X obj 47 92 #camera; -#X obj 96 159 vradio 15 1 0 2 empty empty empty 0 -6 0 8 -241291 -1 --1 0; -#X text 115 159 motion; -#X text 116 173 presence; -#X obj 0 1 cnv 15 620 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X text 13 14 Copyright 2002 Mathieu Bouchard; -#X floatatom 223 264 7 0 0 0 - - -; -#X obj 47 295 #out window; -#X obj 209 195 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 -1; -#X obj 74 130 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -260818 --1 -1 0 1; -#X text 208 129 reduce the noise in the image; -#X obj 156 264 nbx 5 14 -1e+37 1e+37 0 0 empty empty y -10 4 0 10 -24198 --1 -1 138 256; -#X obj 85 264 nbx 5 14 -1e+37 1e+37 0 0 empty empty x -10 4 0 10 -24198 --1 -1 116 256; -#X text 13 0 help_motion_detection.pd; -#X obj 47 210 #motion_detection; -#X text 279 263 total amount of change; -#X text 227 195 scary militaristic crosshair; -#X obj 177 169 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 -1; -#X text 195 169 fade; -#X connect 0 0 3 0; -#X connect 2 0 1 0; -#X connect 3 0 4 0; -#X connect 4 0 18 0; -#X connect 5 0 18 2; -#X connect 11 0 2 0; -#X connect 12 0 18 4; -#X connect 13 0 18 1; -#X connect 18 0 11 0; -#X connect 18 1 16 0; -#X connect 18 2 15 0; -#X connect 18 3 10 0; -#X connect 21 0 18 3; diff --git a/externals/gridflow/doc/flow_classes/#mouse-help.pd b/externals/gridflow/doc/flow_classes/#mouse-help.pd deleted file mode 100644 index a0a57bad..00000000 --- a/externals/gridflow/doc/flow_classes/#mouse-help.pd +++ /dev/null @@ -1,55 +0,0 @@ -#N canvas 215 0 776 547 10; -#X msg 147 123 setcursor 32; -#X text 49 22 How to get the mouse coordinates and hide / change the -cursor?; -#X msg 128 100 hidecursor; -#X text 273 98 <-- removes the cursor; -#X text 307 120 <-- accepts 0 - 63; -#X obj 206 168 print xy_clicked; -#X obj 207 214 print xy_unclicked; -#X obj 107 341 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 -1; -#X obj 127 341 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 -1; -#X obj 147 341 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 -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 380 376 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 -1; -#X obj 400 376 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 -1; -#X obj 420 376 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 -1; -#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 obj 110 165 #out window; -#X obj 110 267 #mouse \, ...; -#X obj 380 402 #pack 3; -#X connect 0 0 21 0; -#X connect 2 0 21 0; -#X connect 11 0 12 0; -#X connect 11 0 10 0; -#X connect 12 0 11 1; -#X connect 15 0 23 0; -#X connect 16 0 23 1; -#X connect 17 0 23 2; -#X connect 18 0 22 1; -#X connect 19 0 15 0; -#X connect 19 0 16 0; -#X connect 19 0 17 0; -#X connect 21 0 22 0; -#X connect 22 0 5 0; -#X connect 22 1 14 0; -#X connect 22 2 6 0; -#X connect 22 3 13 0; -#X connect 22 4 7 0; -#X connect 22 5 8 0; -#X connect 22 6 9 0; -#X connect 22 7 11 0; -#X connect 23 0 18 0; 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 6c5caec0..00000000 --- a/externals/gridflow/doc/flow_classes/#numop-help.pd +++ /dev/null @@ -1,365 +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 1; -#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 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 185 0; -#X connect 7 0 187 0; -#X connect 7 0 191 0; -#X connect 8 0 185 1; -#X connect 9 0 11 0; -#X connect 10 0 13 0; -#X connect 12 0 185 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 91 0 89 0; -#X connect 94 0 93 0; -#X connect 98 0 97 0; -#X connect 102 0 101 0; -#X connect 107 0 106 0; -#X connect 111 0 110 0; -#X connect 114 0 113 0; -#X connect 117 0 116 0; -#X connect 120 0 119 0; -#X connect 123 0 122 0; -#X connect 126 0 125 0; -#X connect 129 0 128 0; -#X connect 132 0 131 0; -#X connect 135 0 134 0; -#X connect 138 0 137 0; -#X connect 142 0 141 0; -#X connect 145 0 144 0; -#X connect 149 0 148 0; -#X connect 152 0 151 0; -#X connect 156 0 155 0; -#X connect 160 0 159 0; -#X connect 164 0 162 0; -#X connect 168 0 166 0; -#X connect 173 0 170 0; -#X connect 174 0 171 0; -#X connect 178 0 176 0; -#X connect 187 0 186 0; -#X connect 187 0 188 0; -#X connect 189 0 190 0; -#X connect 191 0 192 0; -#X connect 191 1 189 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/#out-help.pd b/externals/gridflow/doc/flow_classes/#out-help.pd deleted file mode 100644 index 13fb52d4..00000000 --- a/externals/gridflow/doc/flow_classes/#out-help.pd +++ /dev/null @@ -1,159 +0,0 @@ -#N canvas 512 0 624 877 10; -#X obj 4 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 13 296 cnv 15 185 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 6 677 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 4 372 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 4 395 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 215 678 Outlets (1); -#X obj 6 766 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 210 765 Arguments (1); -#X obj 6 698 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 13 1 #out; -#X obj 15 326 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X text 10 71 Displaying a grid:; -#X text 342 73 Saving a grid:; -#X text 6 456 MESSAGE; -#X text 8 424 GRID; -#X text 7 493 MESSAGE; -#X text 8 569 MESSAGE; -#X text 75 569 "rewind" rewinds to the beginning of a video file. Will -overwrite previous data.; -#X text 79 606 "timelog 1" will display (in the console) the current -time and the time since the last frame. Message "timelog 0" will hide -this information. The default is "timelog 0".; -#X text 8 603 MESSAGE; -#X text 206 374 Inlets (1); -#X text 31 794 window [#out window] opens a window in which the grid -will be displayed.; -#X text 7 732 BANG; -#X msg 45 150 open working.jpg; -#X obj 15 100 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X obj 15 221 #in; -#X msg 66 229 open window; -#X msg 65 252 close; -#X text 75 493 "close" closes the file and hides the display \, must -be accompanied by message "open window" to reopen the display.; -#X text 9 396 Inlet 0; -#X text 7 700 Outlet 0; -#X text 75 732 A bang notifies when a complete grid has been received. -; -#N canvas 140 137 570 631 More 0; -#X obj 35 266 tgl 15 0 empty empty empty 0 -6 0 8 -233017 -1 -1 0 1 -; -#X text 203 143 open default display for screenshot; -#X msg 82 197 open videodev /dev/video0; -#X text 277 196 open a video device; -#X msg 187 388 open x11 here; -#X msg 158 337 open x11 local 10; -#X text 116 287 show/hide timing statistics; -#X text 298 390 connect to default display; -#X text 297 338 connect to display #10 on this machine; -#X msg 65 313 open x11 remote.host.bla.net 0; -#X text 297 315 connect to remote machine on display #0; -#X text 202 114 open an image file; -#X msg 242 437 close; -#X msg 83 142 open x11 here; -#X msg 200 413 open window; -#X text 299 413 opens a window x11 \, quartz or sdl; -#X msg 35 288 timelog \$1; -#X text 37 502 An incoming file is sent through the opened device/socket/file. -In single file format \, a subsequent picture 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 obj 23 223 cnv 15 23 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 23 223 #in; -#X obj 23 480 cnv 15 30 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 5 13 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 14 14 #out; -#X obj 23 480 #out; -#X msg 53 114 open sewing.jpg; -#X obj 23 72 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1 -; -#X obj 23 93 t b b; -#X msg 83 170 open lsd.mov; -#X text 203 169 open a quicktime video; -#X obj 97 74 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X msg 165 363 open save_here.jpg; -#X text 298 362 select file to write to in jpg format; -#X text 39 579 Message "open" followed by the format of the specific -grid opens a grid (usually an image) to then be displayed or saved -by [#out].; -#X text 14 36 #out communicating grids (images) to/from devices \, -sockets \, files; -#X connect 0 0 16 0; -#X connect 2 0 19 0; -#X connect 4 0 23 0; -#X connect 5 0 23 0; -#X connect 9 0 23 0; -#X connect 12 0 23 0; -#X connect 13 0 19 0; -#X connect 14 0 23 0; -#X connect 16 0 23 0; -#X connect 19 0 23 0; -#X connect 24 0 19 0; -#X connect 25 0 26 0; -#X connect 26 0 19 0; -#X connect 26 1 24 0; -#X connect 27 0 19 0; -#X connect 29 0 19 0; -#X connect 30 0 23 0; -#X restore 140 334 pd More info about this object; -#X text 77 426 Receives a grid.; -#X text 398 0 GridFlow 0.9.0; -#X text 12 32 Displays or saves an incoming grid (usually an image -or a video).; -#X obj 15 296 #out window \, title example; -#X msg 207 145 open sewing.jpg; -#X obj 15 126 t b b; -#X obj 177 121 t b b; -#X obj 177 97 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X obj 96 846 #record; -#X msg 366 228 open somefile.jpg; -#X text 9 845 see also :; -#X text 73 451 "open filename.format" (ex: "open somefile.jpg") sets -the filename to write to.; -#X msg 381 144 open sewing.jpg; -#X obj 351 120 t b b; -#X obj 351 96 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X obj 351 190 #in; -#X obj 351 267 cnv 15 30 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 351 266 #out; -#X msg 127 262 hidecursor; -#X text 205 261 <-- linux only; -#X text 7 533 MESSAGE; -#X text 75 533 "hidecursor" (linux only) hides the mouse cursor.; -#X connect 23 0 25 0; -#X connect 24 0 38 0; -#X connect 25 0 36 0; -#X connect 26 0 36 0; -#X connect 27 0 36 0; -#X connect 36 0 10 0; -#X connect 37 0 25 0; -#X connect 38 0 25 0; -#X connect 38 1 23 0; -#X connect 39 0 25 0; -#X connect 39 1 37 0; -#X connect 40 0 39 0; -#X connect 42 0 50 0; -#X connect 45 0 48 0; -#X connect 46 0 48 0; -#X connect 46 1 45 0; -#X connect 47 0 46 0; -#X connect 48 0 50 0; -#X connect 51 0 36 0; diff --git a/externals/gridflow/doc/flow_classes/#outer-help.pd b/externals/gridflow/doc/flow_classes/#outer-help.pd deleted file mode 100644 index 72361cdd..00000000 --- a/externals/gridflow/doc/flow_classes/#outer-help.pd +++ /dev/null @@ -1,70 +0,0 @@ -#N canvas 23 44 613 383 10; -#X obj 19 39 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1 --1; -#X obj 19 130 spigot; -#X obj 100 130 spigot; -#X obj 67 130 == 0; -#X obj 67 39 tgl 15 0 empty empty empty 0 -6 0 8 -233017 -1 -1 0 1 -; -#X text 171 178 @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 40 select pattern; -#X text 17 296 combine channelless picture with gamma factors (r \, -g \, b); -#X obj 19 89 until; -#X msg 19 68 128; -#X obj 60 89 float 1; -#X obj 115 89 + 1; -#X obj 171 90 until; -#X obj 212 90 float 1; -#X obj 267 90 + 1; -#X msg 171 69 4; -#X text 665 16 gridflow; -#X text 8 328 see also:; -#X obj 19 277 @out window; -#X text 18 10 #outer; -#X obj 129 333 @join; -#X obj 171 333 #finished; -#X obj 76 333 #scan +; -#X obj 241 333 #cast; -#X obj 283 333 #ravel; -#X obj 331 333 #grade; -#X obj 380 333 #perspective; -#X obj 171 111 #import (3); -#X obj 171 132 # * 128; -#X obj 19 109 #import (128); -#X obj 19 162 #outer +; -#X obj 100 161 #outer ^; -#X obj 100 181 # * 2; -#X obj 19 255 #outer gamma; -#X connect 0 0 9 0; -#X connect 0 0 15 0; -#X connect 1 0 30 0; -#X connect 1 0 30 1; -#X connect 2 0 31 0; -#X connect 2 0 31 1; -#X connect 3 0 2 1; -#X connect 4 0 1 1; -#X connect 4 0 3 0; -#X connect 8 0 10 0; -#X connect 9 0 8 0; -#X connect 10 0 11 0; -#X connect 10 0 29 0; -#X connect 11 0 10 1; -#X connect 12 0 13 0; -#X connect 13 0 14 0; -#X connect 13 0 27 0; -#X connect 14 0 13 1; -#X connect 15 0 12 0; -#X connect 27 0 28 0; -#X connect 28 0 33 1; -#X connect 29 0 1 0; -#X connect 29 0 2 0; -#X connect 30 0 33 0; -#X connect 31 0 32 0; -#X connect 32 0 33 0; -#X connect 33 0 18 0; 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 c11d22d0..00000000 --- a/externals/gridflow/doc/flow_classes/#pack-help.pd +++ /dev/null @@ -1,44 +0,0 @@ -#N canvas 379 12 503 503 10; -#X obj 2 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 2 340 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 2 260 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 2 283 cnv 15 73 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 203 342 Outlets (1); -#X obj 2 429 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 2 361 cnv 15 65 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 12 1 #pack; -#X obj 23 178 #color; -#X floatatom 85 77 5 0 0 0 - - -; -#X floatatom 107 96 5 0 0 0 - - -; -#X floatatom 129 115 5 0 0 0 - - -; -#X text 14 28 Creates a one dimentional grid (Dim(N) vector) from individual -integers.; -#X text 6 459 INTEGER; -#X text 73 459 An integer defines the number of inlets and the amount -of grid dimensions.; -#X text 204 262 Inlets (n); -#X text 4 316 INTEGER; -#X text 10 395 GRID; -#X obj 263 180 display; -#X text 162 90 <--click and drag to place numbers in the grid.; -#X obj 85 135 cnv 15 51 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 85 135 #pack 3; -#X text 76 315 Accepts integers.; -#X text 72 392 Outputs values from each individual inlet into a grid. -; -#X text 5 284 Inlet All; -#X text 6 362 Outlet 0; -#X text 204 430 Arguments; -#X text 395 1 GridFlow 0.9.0; -#X connect 9 0 21 0; -#X connect 10 0 21 1; -#X connect 11 0 21 2; -#X connect 21 0 8 0; -#X connect 21 0 18 0; 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-help.pd b/externals/gridflow/doc/flow_classes/#perspective-help.pd deleted file mode 100644 index eef22c09..00000000 --- a/externals/gridflow/doc/flow_classes/#perspective-help.pd +++ /dev/null @@ -1,26 +0,0 @@ -#N canvas 280 56 664 282 10; -#X text 413 215 see also:; -#X text 597 12 gridflow; -#X text 24 15 @perspective; -#X text 153 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 obj 30 147 #pack 3; -#X floatatom 75 102 5 0 0 0 - - -; -#X obj 77 120 max 1; -#X floatatom 12 115 5 0 0 0 - - -; -#X floatatom 52 77 5 0 0 0 - - -; -#X obj 30 210 #print; -#X obj 269 210 #print; -#X obj 269 173 #perspective; -#X obj 487 214 #redim; -#X obj 540 214 #ravel; -#X connect 4 0 9 0; -#X connect 4 0 11 0; -#X connect 5 0 6 0; -#X connect 6 0 4 2; -#X connect 7 0 4 0; -#X connect 8 0 4 1; -#X connect 11 0 10 0; diff --git a/externals/gridflow/doc/flow_classes/#polygon_comparator-help.pd b/externals/gridflow/doc/flow_classes/#polygon_comparator-help.pd deleted file mode 100644 index cdb35df8..00000000 --- a/externals/gridflow/doc/flow_classes/#polygon_comparator-help.pd +++ /dev/null @@ -1,69 +0,0 @@ -#N canvas 271 133 749 424 10; -#X obj 422 218 #outer + (0 9000); -#X text 430 162 make regular triangle; -#X obj 422 316 #rotate; -#X obj 374 142 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; -#X obj 475 316 * 100; -#X floatatom 475 300 5 0 0 0 - - -; -#X obj 392 161 t b b; -#X obj 422 335 #polygon_comparator; -#X obj 373 161 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 422 275 #t; -#X obj 393 142 metro 1000; -#X text 32 364 BUG: first try doesn't work; -#X text 69 375 please bang twice; -#X msg 556 206 4 2 # 1 1 1 -1 -1 -1 -1 1; -#X obj 597 252 display; -#X obj 422 199 # * 12000; -#X obj 422 180 #for 0 3 1; -#X obj 556 226 # * (100 100); -#X obj 422 256 # + (0 0); -#X obj 422 237 # cos* (100 100); -#X obj 382 367 #fold min; -#X obj 462 367 #fold max; -#X obj 382 386 #export; -#X obj 462 386 #export; -#X obj 557 185 loadbang; -#X obj 382 405 nbx 8 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 9 --262144 -1 -1 0 256; -#X obj 462 405 nbx 8 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 9 --262144 -1 -1 0 256; -#X text 11 66 inlet 1: a 2-D polygon as N by 2 grid; -#X text 11 16 inlet 0: a 2-D polygon as N by 2 grid; -#X text 74 30 or method "precision" for setting the size of the output -grid.; -#X text 73 80 in which the peak represents the amount of similarity -between the two polygons \, and the position of the peak represents -the optimal rotation for maximum overlapping of the polygons. The rotation -origin is assumed to be the centroid (#moment 1); -#X text 25 348 NOTE: requires [#fft]; -#X text 8 179 Comparisons are supposed to be invariant to the following -transformation:; -#X text 33 213 translations \, e.g. [# +]; -#X text 33 231 rotations \, e.g. [#rotate]; -#X text 33 249 scalar scalings \, e.g. [# *] with only one value.; -#X connect 0 0 19 0; -#X connect 2 0 7 0; -#X connect 3 0 10 0; -#X connect 4 0 2 1; -#X connect 5 0 4 0; -#X connect 6 1 16 0; -#X connect 7 0 20 0; -#X connect 7 0 21 0; -#X connect 8 0 6 0; -#X connect 9 0 2 0; -#X connect 10 0 6 0; -#X connect 13 0 17 0; -#X connect 15 0 0 0; -#X connect 16 0 15 0; -#X connect 17 0 14 0; -#X connect 17 0 7 1; -#X connect 18 0 9 0; -#X connect 19 0 18 0; -#X connect 20 0 22 0; -#X connect 21 0 23 0; -#X connect 22 0 25 0; -#X connect 23 0 26 0; -#X connect 24 0 13 0; diff --git a/externals/gridflow/doc/flow_classes/#polygon_each_edge-help.pd b/externals/gridflow/doc/flow_classes/#polygon_each_edge-help.pd deleted file mode 100644 index 4765fe7f..00000000 --- a/externals/gridflow/doc/flow_classes/#polygon_each_edge-help.pd +++ /dev/null @@ -1,12 +0,0 @@ -#N canvas 502 236 450 158 10; -#X text 220 35 very small square; -#X text 174 68 enumerate edges; -#X obj 41 109 #print; -#X text 52 88 each edge is a vertex pair; -#X text 221 22 example polygon:; -#X obj 60 40 # +; -#X msg 44 10 4 2 # 0 0 1 1 1 1 1 0; -#X obj 41 66 #polygon_each_edge; -#X connect 5 0 7 0; -#X connect 6 0 5 0; -#X connect 7 0 2 0; diff --git a/externals/gridflow/doc/flow_classes/#polygon_radial_map-help.pd b/externals/gridflow/doc/flow_classes/#polygon_radial_map-help.pd deleted file mode 100644 index 03303fc2..00000000 --- a/externals/gridflow/doc/flow_classes/#polygon_radial_map-help.pd +++ /dev/null @@ -1,42 +0,0 @@ -#N canvas 412 64 630 462 10; -#X obj 274 276 #polygon_radial_map; -#X text 70 40 makes a 1-D panoramic (polar) rendering of a polygon. -; -#X text 69 57 if you want to make standardized (translation-independent) -renderings of polygons \, first substract [#polygon_moment] (or a variant -thereof) from the polygon.; -#X obj 274 371 #outer * (255 255 255); -#X obj 274 390 #out window; -#X obj 24 193 t b a; -#X obj 24 240 #draw_polygon put (255 224 200); -#X msg 24 221 240 320 3 # 0 60 90; -#X obj 274 333 #for 128 0 -1; -#X obj 24 259 #out window; -#X obj 274 140 #t; -#X obj 304 141 #polygon_moment; -#X obj 323 162 display; -#X obj 274 166 # -; -#X obj 288 188 display; -#X msg 24 116 4 2 # 30 30 30 250 120 200 170 90; -#X obj 274 295 t a a; -#X obj 274 314 #finished; -#X obj 274 352 #outer <; -#X connect 0 0 16 0; -#X connect 3 0 4 0; -#X connect 5 0 7 0; -#X connect 5 1 6 2; -#X connect 6 0 9 0; -#X connect 7 0 6 0; -#X connect 8 0 18 0; -#X connect 10 0 13 0; -#X connect 10 1 11 0; -#X connect 11 0 12 0; -#X connect 11 0 13 1; -#X connect 13 0 0 0; -#X connect 13 0 14 0; -#X connect 15 0 5 0; -#X connect 15 0 10 0; -#X connect 16 0 17 0; -#X connect 16 1 18 1; -#X connect 17 0 8 0; -#X connect 18 0 3 0; diff --git a/externals/gridflow/doc/flow_classes/#posterize-help.pd b/externals/gridflow/doc/flow_classes/#posterize-help.pd deleted file mode 100644 index 94f0f23c..00000000 --- a/externals/gridflow/doc/flow_classes/#posterize-help.pd +++ /dev/null @@ -1,36 +0,0 @@ -#N canvas 384 100 640 338 10; -#X obj 20 32 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1 --1; -#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 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 20 59 fork; -#X msg 43 79 open bluemarble.jpg; -#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 obj 20 100 #in; -#X obj 19 127 #store; -#X obj 19 175 #posterize; -#X obj 19 303 #out window; -#X obj 281 304 #convolve; -#X obj 350 304 #contrast; -#X obj 419 304 #solarize; -#X obj 488 304 #layer; -#X text 16 7 #posterize; -#X connect 0 0 7 0; -#X connect 1 0 2 0; -#X connect 1 0 12 1; -#X connect 2 0 11 0; -#X connect 7 0 10 0; -#X connect 7 1 8 0; -#X connect 8 0 10 0; -#X connect 10 0 11 1; -#X connect 11 0 12 0; -#X connect 12 0 13 0; 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 e7143e19..00000000 --- a/externals/gridflow/doc/flow_classes/#print-help.pd +++ /dev/null @@ -1,81 +0,0 @@ -#N canvas 408 30 536 638 10; -#X text 15 32 Displays the dimensions of a grid in the console. If -the grid has less than two dimensions it will display all grid data. -; -#X floatatom 213 105 5 0 0 0 - - -; -#X floatatom 235 126 5 0 0 0 - - -; -#X floatatom 257 146 5 0 0 0 - - -; -#X obj 71 116 #in; -#X obj 100 158 #import (3 3 3); -#X msg 100 110 3 3 3 # 27; -#X obj 100 134 # rand; -#X obj 0 3 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 70 267 cnv 15 100 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 2 431 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 302 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 325 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 6 326 Inlet_0; -#X text 203 433 Outlets (1); -#X obj 2 452 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 4 351 GRID; -#X msg 71 88 load sewing.jpg; -#X obj 17 4 #print; -#X text 8 483 GRID; -#X obj 71 267 #print paprika; -#X obj 4 640 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 4 520 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 206 521 Arguments (1); -#X text 70 555 Adds a number as a prefix before the element printed -in the console.; -#X text 11 598 SYMBOL; -#X text 68 597 Adds a symbol (text) as a prefix before the printed -element in the console.; -#X text 7 453 Outlet_0; -#X text 67 352 Incoming grid.; -#X text 203 304 Inlets (1); -#X text 63 483 Outputs the dimensions of a grid and the grid data to -the console.; -#X text 7 640 see also:; -#X obj 82 641 #dim; -#X obj 116 641 #export; -#X obj 171 641 #export_list; -#X obj 262 641 print; -#X text 11 556 FLOAT; -#X text 122 375 select between base 2 \, 8 \, 10 \, 16; -#X text 9 389 maxrows INTEGER; -#X text 8 375 base INTEGER; -#X text 122 389 stop printing after that number of rows; -#X text 9 402 trunc INTEGER; -#X text 123 403 stop printing after that number of characters on the -same line; -#X text 398 4 GridFlow 0.9.1; -#X obj 213 165 #pack 3; -#X msg 368 188 base 2; -#X msg 368 208 base 8; -#X msg 368 228 base 10; -#X msg 368 248 base 16; -#X msg 370 159 maxrows 10; -#X msg 370 136 trunc 20; -#X connect 1 0 44 0; -#X connect 2 0 44 1; -#X connect 3 0 44 2; -#X connect 4 0 20 0; -#X connect 5 0 20 0; -#X connect 6 0 7 0; -#X connect 7 0 5 0; -#X connect 17 0 4 0; -#X connect 44 0 20 0; -#X connect 45 0 20 0; -#X connect 46 0 20 0; -#X connect 47 0 20 0; -#X connect 48 0 20 0; -#X connect 49 0 20 0; -#X connect 50 0 20 0; diff --git a/externals/gridflow/doc/flow_classes/#ravel-help.pd b/externals/gridflow/doc/flow_classes/#ravel-help.pd deleted file mode 100644 index 3d222e3f..00000000 --- a/externals/gridflow/doc/flow_classes/#ravel-help.pd +++ /dev/null @@ -1,31 +0,0 @@ -#N canvas 364 101 660 279 10; -#X text 143 15 like @redim but always produces a 1-D grid with the -same total number of elements.; -#X obj 20 40 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1 --1; -#X obj 20 211 print before; -#X obj 259 213 print after; -#X text 403 215 see also:; -#X text 575 14 gridflow; -#X msg 43 81 open bluemarble.jpg; -#X obj 20 60 fork; -#X obj 20 102 #in; -#X obj 20 168 #dim; -#X obj 20 190 #export_list; -#X text 14 15 #ravel; -#X obj 477 214 #redim (1); -#X obj 567 214 #perspective; -#X obj 259 192 #export_list; -#X obj 259 170 #dim; -#X obj 140 129 #ravel; -#X connect 1 0 7 0; -#X connect 6 0 8 0; -#X connect 7 0 8 0; -#X connect 7 1 6 0; -#X connect 8 0 9 0; -#X connect 8 0 16 0; -#X connect 9 0 10 0; -#X connect 10 0 2 0; -#X connect 14 0 3 0; -#X connect 15 0 14 0; -#X connect 16 0 15 0; diff --git a/externals/gridflow/doc/flow_classes/#record-help.pd b/externals/gridflow/doc/flow_classes/#record-help.pd deleted file mode 100644 index 947adabb..00000000 --- a/externals/gridflow/doc/flow_classes/#record-help.pd +++ /dev/null @@ -1,68 +0,0 @@ -#N canvas 507 136 507 659 10; -#X obj 79 121 #camera; -#X obj 79 70 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1; -#X obj 105 153 #out window; -#X obj 154 70 hsl 128 15 20 300 0 0 empty empty empty -2 -6 0 8 -260818 --1 -1 0 1; -#X obj 105 178 fps detailed; -#X obj 105 202 print; -#X obj 79 98 metro 100; -#X obj 93 231 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X obj 123 280 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X obj 108 255 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X obj 3 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 4 603 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 2 348 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 2 371 cnv 15 73 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 4 636 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 204 350 Inlets (4); -#X text 4 397 GRID; -#X text 76 396 Accepts grids.; -#X obj 2 428 cnv 15 73 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 2 487 cnv 15 73 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 2 546 cnv 15 73 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 4 455 BANG; -#X text 4 519 BANG; -#X text 4 578 BANG; -#X text 5 373 Inlet 0; -#X text 5 430 Inlet 1; -#X text 5 494 Inlet 2; -#X text 5 553 Inlet 3; -#X obj 79 309 cnv 15 50 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 79 310 #record; -#X text 76 519 Starts recording to the file.; -#X text 76 578 Stops recording.; -#X text 205 605 Outlets (0); -#X text 206 637 Arguments (0); -#X text 76 454 Opens a dialog window in which to type the filename -to be recorded \, the defualt encoding is quicktime (raw).; -#X text 22 33 Record a quicktime file with [#out]; -#X text 113 229 <-- 1 select filename; -#X text 128 254 <-- 2 start recording; -#X text 143 280 <-- 3 stop recording; -#X text 142 309 <-- open for more options; -#X text 39 39 comment; -#X obj 13 0 #record; -#X text 394 1 GridFlow 0.9.0; -#X connect 0 0 2 0; -#X connect 0 0 29 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 29 1; -#X connect 8 0 29 3; -#X connect 9 0 29 2; diff --git a/externals/gridflow/doc/flow_classes/#redim-help.pd b/externals/gridflow/doc/flow_classes/#redim-help.pd deleted file mode 100644 index 2977b174..00000000 --- a/externals/gridflow/doc/flow_classes/#redim-help.pd +++ /dev/null @@ -1,65 +0,0 @@ -#N canvas 271 30 511 573 10; -#X obj 109 154 cnv 15 130 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 6 398 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 4 210 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 4 233 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 9 234 Inlet_0; -#X text 206 212 Inlets (2); -#X text 215 400 Outlets (1); -#X obj 5 480 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 221 481 Arguments (1); -#X obj 5 329 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 6 419 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 10 420 Inlet_0; -#X text 10 330 Inlet_1; -#X text 7 259 GRID; -#X text 7 357 GRID; -#X text 11 443 GRID; -#X obj 5 552 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 86 37 rearrange a grid's values according to new dimensions -; -#X obj 21 36 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1 -; -#X text 834 99 gridflow; -#X obj 21 59 fork; -#X obj 21 103 #in; -#X obj 111 183 #out window; -#X obj 7 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X msg 44 81 open working.jpg; -#X text 19 550 see also:; -#X obj 99 553 #ravel; -#X obj 149 553 #perspective; -#X obj 21 184 #out window; -#X obj 21 127 t a a; -#X obj 22 0 #redim ( 2 ); -#X obj 111 154 #redim (120 160 3); -#X text 72 444 Outputs the redimensioned data as a grid.; -#X text 24 511 Accepts a grid as a creation argument \, here (120 160 -3).; -#X msg 232 131 240 320 3; -#X text 65 257 Accepts a grid which elements are serialized. If the -resulting grid must be larger \, the sequence is repeated as much as -necessary. It is truncated if it must be smaller. The elements are -then deserialized to form the resulting grid.; -#X text 71 357 Accepts grids that is a dimension list.; -#X text 399 1 GridFlow 0.8.4; -#X msg 200 101 400 400 3; -#X connect 18 0 20 0; -#X connect 20 0 21 0; -#X connect 20 1 24 0; -#X connect 21 0 29 0; -#X connect 24 0 21 0; -#X connect 29 0 28 0; -#X connect 29 1 31 0; -#X connect 31 0 22 0; -#X connect 34 0 31 1; -#X connect 38 0 31 1; 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 22c2e453..00000000 --- a/externals/gridflow/doc/flow_classes/#remap_image-help.pd +++ /dev/null @@ -1,70 +0,0 @@ -#N canvas 300 38 508 671 10; -#X obj 3 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 46 229 cnv 15 86 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 4 477 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 3 327 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 3 350 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 8 351 Inlet_0; -#X text 205 329 Inlets (2); -#X obj 4 611 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 3 409 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 4 498 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 8 410 Inlet_1; -#X obj 10 0 #remap_image; -#X text 19 26 Transforms a grid by displacing pixels.; -#X obj 27 154 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X obj 46 179 #in; -#X floatatom 166 201 5 0 0 0 - - -; -#X text 7 378 GRID; -#X obj 150 229 # +; -#X msg 61 153 open sewing.jpg; -#X text 211 199 <-- Modify value to see transformation.; -#X text 54 377 Accepts a grid.; -#X text 178 152 <-- open image; -#X text 401 1 GridFlow 0.8.4; -#X obj 46 281 #out window \, title remapped; -#X obj 46 97 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1; -#X obj 46 120 metro 33.3667; -#X text 19 45 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; -#X text 8 524 GRID; -#X text 8 499 Outlet_0; -#X text 55 523 The deformed grid.; -#X obj 46 229 #remap_image; -#X text 204 610 Arguments (0); -#X text 206 479 Outlets (2); -#X obj 4 552 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 8 578 GRID; -#X text 8 553 Outlet_1; -#X text 197 229 <-- change the numop to change the transformation; -#X text 6 437 GRID; -#X text 55 577; -#X obj 4 646 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 12 645 See also :; -#X obj 92 645 #rotate; -#X text 53 436 Receives a grid that is to be used as the transformation -map; -#X text 55 578; -#X text 55 577 The deformed grid that has received the last transformation. -; -#X connect 13 0 14 0; -#X connect 14 0 30 0; -#X connect 15 0 17 1; -#X connect 17 0 30 1; -#X connect 18 0 14 0; -#X connect 24 0 25 0; -#X connect 25 0 14 0; -#X connect 30 0 23 0; -#X connect 30 1 17 0; 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-help.pd b/externals/gridflow/doc/flow_classes/#rgb_to_greyscale-help.pd deleted file mode 100644 index f512369a..00000000 --- a/externals/gridflow/doc/flow_classes/#rgb_to_greyscale-help.pd +++ /dev/null @@ -1,40 +0,0 @@ -#N canvas 113 134 502 431 10; -#X obj 1 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 299 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 210 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 233 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 215 301 Outlets (1); -#X obj 1 320 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 398 1 GridFlow 0.8.4; -#X text 2 234 Inlet 0; -#X text 2 321 Outlet 0; -#X obj 166 183 #out window; -#X obj 166 112 #in; -#X obj 14 0 #rgb_to_greyscale; -#X obj 166 137 cnv 15 121 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 166 137 #rgb_to_greyscale; -#X obj 174 91 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X msg 166 68 open working.jpg; -#X obj 166 160 #greyscale_to_rgb; -#X text 221 211 Inlets (1); -#X text 7 259 GRID; -#X text 8 346 GRID; -#X text 87 260 A color grid at the left inlet is accepted.; -#X text 15 27 Creates a greyscale image from a color image.; -#X obj 2 391 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 196 392 Arguments (none); -#X text 84 349 A grid equivalent to the original one is output in greyscale. -; -#X connect 10 0 13 0; -#X connect 13 0 16 0; -#X connect 14 0 10 0; -#X connect 15 0 10 0; -#X connect 16 0 9 0; 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 3caf9136..00000000 --- a/externals/gridflow/doc/flow_classes/#rgb_to_yuv-help.pd +++ /dev/null @@ -1,42 +0,0 @@ -#N canvas 205 69 509 416 10; -#X obj 4 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 6 314 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 4 225 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 4 248 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 9 249 Inlet_0; -#X text 208 316 Outlets (1); -#X obj 6 335 cnv 15 67 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 24 1 #rgb_to_yuv; -#X obj 324 188 #out window; -#X obj 273 87 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X obj 255 107 #in; -#X msg 255 61 open sewing.jpg; -#X obj 324 150 cnv 15 79 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 324 150 #rgb_to_yuv; -#X text 206 227 Inlets (1); -#X text 7 274 Grid; -#X text 5 152 This displays the image as RGB:; -#X text 99 190 This displays the image as YUV:; -#X text 23 26 Converts an RGB color model image to a YUV color model -image.; -#X text 8 365 Grid; -#X text 10 336 Outlet_0; -#X text 80 367 Displays an image in YUV format.; -#X text 79 276 Receives an image in RGB format.; -#X obj 226 152 #out window; -#X text 396 1 GridFlow 0.8.4; -#X obj 7 390 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 206 391 Arguments (none); -#X connect 9 0 10 0; -#X connect 10 0 13 0; -#X connect 10 0 23 0; -#X connect 11 0 10 0; -#X connect 13 0 8 0; 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-help.pd b/externals/gridflow/doc/flow_classes/#rotate-help.pd deleted file mode 100644 index de4f6c0b..00000000 --- a/externals/gridflow/doc/flow_classes/#rotate-help.pd +++ /dev/null @@ -1,64 +0,0 @@ -#N canvas 350 51 503 521 10; -#X obj 181 122 cnv 15 51 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 1 345 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 168 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 191 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 215 347 Outlets (1); -#X obj 1 426 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 210 425 Arguments (1); -#X obj 0 263 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 366 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 398 1 GridFlow 0.8.4; -#X text 2 192 Inlet 0; -#X text 1 264 Inlet 1; -#X text 221 169 Inlets (2); -#X text 2 367 Outlet 0; -#X obj 1 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 10 1 #rotate; -#X text 393 1 GridFlow 0.8.4; -#X obj 180 121 #rotate; -#X text 11 454 INT; -#X text 8 218 GRID; -#X text 11 290 INT; -#X text 4 26 The [#rotate] performs rotations on indexmaps and polygons -and such objects.; -#X obj 163 83 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X obj 80 98 #in; -#X obj 227 99 hsl 40 15 0 35999 0 0 empty empty empty -2 -6 0 8 -262144 --1 -1 2800 1; -#X text 11 390 GRID; -#X text 60 455 [#rotate] accepts an integer number (0 to 35999) as -a creation argument which initializes the first angle of rotation. -; -#X obj 80 121 #remap_image; -#X obj 80 142 #out window \, title #rotate; -#X obj 9 57 tgl 15 0 empty empty empty 0 -6 0 8 -233017 -1 -1 1 1; -#X obj 9 76 metro 100; -#X text 65 392 Outputs the result of the rotation and needs to be sent -to a [#remap_image] to be visualized.; -#X text 57 217 The Grid passed in inlet 0 will be the grid on which -the rotation will be performed.; -#X text 57 289 An integer from 0 to 35999 (36000 is the same as 0) -passed in inlet 1 will determine the angle of rotation for the object -to be rotated.; -#X floatatom 243 123 7 0 0 0 - - -; -#X msg 80 57 open b001.jpg; -#X connect 17 0 27 1; -#X connect 22 0 23 0; -#X connect 23 0 27 0; -#X connect 24 0 17 1; -#X connect 24 0 34 0; -#X connect 27 0 28 0; -#X connect 27 1 17 0; -#X connect 29 0 30 0; -#X connect 30 0 23 0; -#X connect 35 0 23 0; diff --git a/externals/gridflow/doc/flow_classes/#saturation-help.pd b/externals/gridflow/doc/flow_classes/#saturation-help.pd deleted file mode 100644 index 3d92609b..00000000 --- a/externals/gridflow/doc/flow_classes/#saturation-help.pd +++ /dev/null @@ -1,60 +0,0 @@ -#N canvas 115 0 502 637 10; -#X obj 27 157 print; -#X obj 27 117 #out window; -#X text 293 68 OR; -#X text 275 30 global saturation; -#X obj 27 138 fps detailed; -#X text 240 87 per-channel saturation; -#X msg 231 25 0; -#X obj 231 4 loadbang; -#X obj 234 46 hsl 137 15 -256 512 0 0 empty empty empty -2 -6 0 8 -260818 --128992 -1 5700 1; -#X floatatom 192 47 5 0 0 0 - - -; -#X obj 27 -45 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 1 1 -; -#X obj 27 -11 metro 33.3667; -#X msg 184 88 3 # \$1; -#X obj 27 24 #in babbage.jpg; -#X obj 184 114 #color -256 512 1; -#X obj 1 -99 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 395 -98 GridFlow 0.9.0; -#X obj 1 394 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 263 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 286 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 6 287 Inlet_0; -#X obj 1 474 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 415 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 0 416 Outlet_0; -#X text 13 441 GRID; -#X text 13 505 INT; -#X text 203 265 Inlets (2); -#X text 13 314 GRID; -#X text 13 364 GRID; -#X text 72 312 Accepts original image; -#X obj 11 -99 #saturation; -#X text 72 363 Modifying grid; -#X obj 1 340 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 6 341 Inlet_1; -#X text 203 395 Outlet (1); -#X obj 27 93 #saturation -128; -#X text 73 504 Saturation value \, can be negative.; -#X text 205 473 Arguments (1); -#X connect 1 0 4 0; -#X connect 4 0 0 0; -#X connect 6 0 8 0; -#X connect 7 0 6 0; -#X connect 8 0 9 0; -#X connect 8 0 12 0; -#X connect 10 0 11 0; -#X connect 11 0 13 0; -#X connect 12 0 14 0; -#X connect 13 0 35 0; -#X connect 14 0 35 1; -#X connect 35 0 1 0; diff --git a/externals/gridflow/doc/flow_classes/#scale_by-help.pd b/externals/gridflow/doc/flow_classes/#scale_by-help.pd deleted file mode 100644 index 3c44cdda..00000000 --- a/externals/gridflow/doc/flow_classes/#scale_by-help.pd +++ /dev/null @@ -1,59 +0,0 @@ -#N canvas 670 77 508 615 10; -#X obj 89 182 cnv 15 80 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 1 413 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 255 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 278 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 215 418 Outlets (1); -#X obj 1 493 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 210 496 Arguments (1); -#X obj 1 348 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 434 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 2 278 Inlet 0; -#X text 2 352 Inlet 1; -#X text 221 257 Inlets (2); -#X text 2 438 Outlet 0; -#X obj 1 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 11 82 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 1 1; -#X obj 11 102 metro 100; -#X obj 89 149 #in; -#X text 210 496 Arguments (1); -#X obj 2 562 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 217 565 See Also; -#X obj 10 589 #scale_to; -#X obj 80 589 #downscale_by; -#X text 7 302 GRID; -#X text 3 463 GRID; -#X text 64 463 Outputs the resulting scaled image.; -#X obj 89 227 #out window \, title #scale_by; -#X msg 89 85 open bluemarble.jpg \, bang; -#X obj 9 1 #scale_by; -#X text 396 1 GridFlow 0.9.0; -#X obj 89 183 #scale_by 2; -#X text 7 28 The [#scale_by] scales the image received by the row and -column factors passed. A single value applies the scaling uniformly -on the row and columns.; -#X msg 227 129 2 # 2 1; -#X msg 230 152 2 # 2 3; -#X floatatom 181 131 5 0 0 0 - - -; -#X text 3 525 INT; -#X text 4 376 INT; -#X text 61 375 Scaling factor.; -#X text 64 524 The scaling factor (defaults to 2).; -#X text 62 303 The Grid on which the scale_to will be performed.; -#X connect 14 0 15 0; -#X connect 15 0 16 0; -#X connect 16 0 29 0; -#X connect 26 0 16 0; -#X connect 29 0 25 0; -#X connect 31 0 29 1; -#X connect 32 0 29 1; -#X connect 33 0 29 1; diff --git a/externals/gridflow/doc/flow_classes/#scale_to-help.pd b/externals/gridflow/doc/flow_classes/#scale_to-help.pd deleted file mode 100644 index 34038065..00000000 --- a/externals/gridflow/doc/flow_classes/#scale_to-help.pd +++ /dev/null @@ -1,78 +0,0 @@ -#N canvas 122 0 504 602 10; -#X obj 90 170 cnv 15 135 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 1 394 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 236 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 259 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 215 399 Outlets (1); -#X obj 1 474 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 210 477 Arguments (1); -#X obj 1 329 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 415 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 2 259 Inlet 0; -#X text 2 333 Inlet 1; -#X text 221 238 Inlets (2); -#X text 2 419 Outlet 0; -#X obj 1 1 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 11 75 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1; -#X obj 11 94 metro 100; -#X obj 89 171 #scale_to (133 133); -#X obj 89 133 #in; -#X obj 284 159 #pack; -#X obj 325 138 hsl 128 8 0 640 0 0 empty empty empty 0 -8 0 8 -260818 --1 -1 0 1; -#X obj 325 148 hsl 128 8 0 640 0 0 empty empty empty 0 -8 0 8 -260818 --1 -1 0 1; -#X obj 9 1 #scale_to; -#X obj 89 208 #out window \, title #scale_to; -#X text 210 477 Arguments (1); -#X obj 2 543 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 217 546 See Also; -#X obj 80 570 #downscale_by; -#X msg 89 73 open scissors.jpg \, bang; -#X obj 300 183 #print; -#X msg 284 75 2 # 500 500; -#X obj 412 97 #print; -#X text 7 283 GRID; -#X msg 284 94 2 # 100 500; -#X msg 285 115 2 # 500 100; -#X text 460 133 height; -#X text 460 145 width; -#X text 62 357 A height width value pair in pixels.; -#X text 3 444 GRID; -#X text 64 444 Outputs the resulting scaled image.; -#X text 3 506 INT INT; -#X text 65 504 A (height width) pair of integers indicating the size -to scale to image to. This initial argument is required.; -#X text 62 284 The Grid passed at inlet 0 will be the image on which -the scale_to will be performed.; -#X text 284 58 2 grid size values y=500 x=500; -#X obj 7 570 #scale_by; -#X text 395 2 GridFlow 0.9.0; -#X text 9 22 The [#scale_to] scales the image received to the x and -y values passed. Initial creation arguments are mandatory (0 0) otherwise. -; -#X text 3 358 INT INT; -#X connect 14 0 15 0; -#X connect 15 0 17 0; -#X connect 16 0 22 0; -#X connect 17 0 16 0; -#X connect 18 0 16 1; -#X connect 18 0 28 0; -#X connect 19 0 18 0; -#X connect 20 0 18 1; -#X connect 27 0 17 0; -#X connect 29 0 16 1; -#X connect 29 0 30 0; -#X connect 32 0 16 1; -#X connect 32 0 30 0; -#X connect 33 0 16 1; -#X connect 33 0 30 0; diff --git a/externals/gridflow/doc/flow_classes/#scan-help.pd b/externals/gridflow/doc/flow_classes/#scan-help.pd deleted file mode 100644 index 08e9e468..00000000 --- a/externals/gridflow/doc/flow_classes/#scan-help.pd +++ /dev/null @@ -1,24 +0,0 @@ -#N canvas 140 0 421 309 10; -#X text 69 15 computes subtotals; -#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 floatatom 56 225 5 0 0 0 - - -; -#X floatatom 96 225 5 0 0 0 - - -; -#X text 73 129 second inlet seems to be dead; -#X text 340 14 gridflow; -#X text 14 266 see also:; -#X text 14 15 #scan; -#X obj 17 96 #pack 3; -#X obj 17 127 #scan +; -#X obj 17 186 #unpack 3; -#X obj 83 270 #fold +; -#X connect 1 0 11 0; -#X connect 2 0 11 1; -#X connect 3 0 11 2; -#X connect 11 0 12 0; -#X connect 12 0 13 0; -#X connect 13 0 4 0; -#X connect 13 1 5 0; -#X connect 13 2 6 0; diff --git a/externals/gridflow/doc/flow_classes/#slice-help.pd b/externals/gridflow/doc/flow_classes/#slice-help.pd deleted file mode 100644 index c7c76227..00000000 --- a/externals/gridflow/doc/flow_classes/#slice-help.pd +++ /dev/null @@ -1,18 +0,0 @@ -#N canvas 366 229 551 300 10; -#X obj 38 150 display; -#X text 36 173 should print subgrid: 3 5 8 13 21; -#X msg 37 105 0 1 1 2 3 5 8 13 21 34 55 89; -#X obj 37 130 #slice 4 9; -#X obj 256 69 #slice (1 1) (3 3); -#X obj 257 90 display; -#X obj 256 50 #redim (4 4); -#X obj 256 31 #for 0 16 1; -#X obj 256 14 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X text 259 137 should print subgrid: 2 2 # 5 6 9 10; -#X connect 2 0 3 0; -#X connect 3 0 0 0; -#X connect 4 0 5 0; -#X connect 6 0 4 0; -#X connect 7 0 6 0; -#X connect 8 0 7 0; diff --git a/externals/gridflow/doc/flow_classes/#solarize-help.pd b/externals/gridflow/doc/flow_classes/#solarize-help.pd deleted file mode 100644 index f35f8ad3..00000000 --- a/externals/gridflow/doc/flow_classes/#solarize-help.pd +++ /dev/null @@ -1,25 +0,0 @@ -#N canvas 411 100 613 339 10; -#X obj 20 59 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1 --1; -#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 msg 43 112 open bluemarble.jpg; -#X obj 20 83 fork; -#X obj 20 174 #solarize; -#X obj 20 222 #out window; -#X obj 20 138 #in; -#X obj 273 309 #convolve; -#X obj 342 309 #contrast; -#X obj 411 309 #posterize; -#X obj 487 309 #layer; -#X text 16 7 #solarize; -#X connect 0 0 5 0; -#X connect 4 0 8 0; -#X connect 5 0 8 0; -#X connect 5 1 4 0; -#X connect 6 0 7 0; -#X connect 8 0 6 0; diff --git a/externals/gridflow/doc/flow_classes/#sort-help.pd b/externals/gridflow/doc/flow_classes/#sort-help.pd deleted file mode 100644 index 0702cc07..00000000 --- a/externals/gridflow/doc/flow_classes/#sort-help.pd +++ /dev/null @@ -1,25 +0,0 @@ -#N canvas 484 136 450 300 10; -#X obj 28 210 #sort; -#X msg 28 5 0 1 1 2 3 5 8 13 21 34 55 89; -#X msg 28 62 12 # 666; -#X obj 28 81 # rand; -#X obj 28 138 #store; -#X obj 28 100 #grade; -#X obj 28 24 t a a; -#X obj 28 43 #finished; -#X obj 58 164 display; -#X obj 28 119 #outer + (0); -#X text 151 100 shuffle; -#X obj 58 234 display; -#X text 140 212 unshuffle; -#X connect 0 0 11 0; -#X connect 1 0 6 0; -#X connect 2 0 3 0; -#X connect 3 0 5 0; -#X connect 4 0 0 0; -#X connect 4 0 8 0; -#X connect 5 0 9 0; -#X connect 6 0 7 0; -#X connect 6 1 4 1; -#X connect 7 0 2 0; -#X connect 9 0 4 0; diff --git a/externals/gridflow/doc/flow_classes/#spread-help.pd b/externals/gridflow/doc/flow_classes/#spread-help.pd deleted file mode 100644 index d0fa1ac8..00000000 --- a/externals/gridflow/doc/flow_classes/#spread-help.pd +++ /dev/null @@ -1,57 +0,0 @@ -#N canvas 237 296 787 472 10; -#X text 129 15 makes noise; -#X obj 232 58 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1 --1; -#X obj 275 140 tgl 15 0 empty empty empty 0 -6 0 8 -233017 -1 -1 1 -1; -#X floatatom 368 241 5 0 0 0 - - -; -#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 text 368 314 we limit here \, because the values might go out of -range; -#X text 702 13 gridflow; -#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 1 1 -; -#X text 300 141 switch displays \, use this to get an image into the -@store; -#X obj 20 129 #import (256 256 2); -#X obj 20 197 #spread 1; -#X obj 195 269 #store; -#X obj 195 393 #out window; -#X obj 310 393 #out window; -#X obj 310 291 #clip; -#X obj 310 270 #spread 1; -#X obj 232 159 #in; -#X text 14 15 #spread; -#X obj 249 247 shunt; -#X connect 1 0 13 0; -#X connect 2 0 26 1; -#X connect 3 0 23 1; -#X connect 4 0 18 1; -#X connect 5 0 8 0; -#X connect 6 0 7 0; -#X connect 7 0 5 0; -#X connect 8 0 9 0; -#X connect 8 0 17 0; -#X connect 9 0 8 1; -#X connect 12 0 24 0; -#X connect 13 0 24 0; -#X connect 13 1 12 0; -#X connect 14 0 24 0; -#X connect 15 0 14 0; -#X connect 17 0 18 0; -#X connect 18 0 19 0; -#X connect 19 0 20 0; -#X connect 22 0 21 0; -#X connect 23 0 22 0; -#X connect 24 0 26 0; -#X connect 26 0 19 1; -#X connect 26 1 23 0; diff --git a/externals/gridflow/doc/flow_classes/#store-help.pd b/externals/gridflow/doc/flow_classes/#store-help.pd deleted file mode 100644 index e3b1bb66..00000000 --- a/externals/gridflow/doc/flow_classes/#store-help.pd +++ /dev/null @@ -1,87 +0,0 @@ -#N canvas 691 44 533 625 10; -#X obj 1 464 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 9 305 BANG; -#X obj 1 223 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 246 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 215 466 Outlets (1); -#X obj 1 545 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 346 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 485 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 398 1 GridFlow 0.8.4; -#X text 2 247 Inlet 0; -#X text 2 347 Inlet 1; -#X text 252 225 Inlets (2); -#X text 2 486 Outlet 0; -#X obj 1 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 9 1 #store; -#X floatatom 132 89 5 0 0 0 - - -; -#X floatatom 177 89 5 0 0 0 - - -; -#X floatatom 20 160 5 0 0 0 - - -; -#X floatatom 132 200 5 0 0 0 - - -; -#X text 115 201 R:; -#X floatatom 193 200 5 0 0 0 - - -; -#X floatatom 253 200 5 0 0 0 - - -; -#X text 176 201 G:; -#X text 237 201 B:; -#X floatatom 73 161 5 0 0 0 - - -; -#X text 1 161 X:; -#X text 58 162 Y:; -#X obj 132 107 #pack; -#X obj 296 134 #in; -#X msg 296 115 load r001.jpg; -#X obj 20 131 #unpack; -#X obj 132 175 #unpack 3; -#X text 393 1 GridFlow 0.8.4; -#X text 210 544 Arguments (0); -#X obj 132 153 cnv 15 43 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 132 153 #store; -#X text 60 304 A bang at the left inlet will force [#store] to send -its value to the outlet.; -#X text 7 272 GRID; -#X text 129 54 this example allows you to select a single pixel from -the loaded picture and view its rgb value.; -#X text 8 24 The [#store] stores exactly one grid \, using the right -inlet. You fetch it back \, or selected subparts using the left inlet. -; -#X text 10 571 GRID; -#X text 60 573 [#store] accepts a grid as a creation argument which -initializes the first value to be stored.; -#X obj 296 181 display; -#X obj 86 94 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 296 161 display; -#X text 59 271 Accepts a grid.; -#X text 7 371 GRID; -#X text 60 371 Accepts a grid or a subpart of it.; -#X text 62 401 Reassign; -#X text 63 423 put_at; -#X text 131 410 To be clarified; -#X text 12 509 GRID; -#X text 59 509 Outputs the grid as requested.; -#X obj 132 131 #redim 2; -#X obj 296 96 loadbang; -#X connect 15 0 27 0; -#X connect 16 0 27 1; -#X connect 27 0 30 0; -#X connect 27 0 53 0; -#X connect 28 0 35 1; -#X connect 29 0 28 0; -#X connect 30 0 17 0; -#X connect 30 1 24 0; -#X connect 31 0 18 0; -#X connect 31 1 20 0; -#X connect 31 2 21 0; -#X connect 35 0 31 0; -#X connect 35 0 42 0; -#X connect 43 0 35 0; -#X connect 53 0 35 0; -#X connect 53 0 44 0; -#X connect 54 0 29 0; diff --git a/externals/gridflow/doc/flow_classes/#t-help.pd b/externals/gridflow/doc/flow_classes/#t-help.pd deleted file mode 100644 index b8b7e471..00000000 --- a/externals/gridflow/doc/flow_classes/#t-help.pd +++ /dev/null @@ -1,75 +0,0 @@ -#N canvas 78 0 516 656 10; -#X obj 1 380 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 263 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 286 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 529 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 401 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 398 1 GridFlow 0.8.4; -#X text 2 287 Inlet 0; -#X obj 1 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 9 1 #t; -#X text 42 2 trigger; -#X text 7 313 GRID; -#X text 2 402 Outlet 0; -#X obj 10 134 #in teapot.png; -#X obj 10 161 t a a; -#X obj 40 181 #convolve (1 3 # -1 2 -1); -#X obj 267 181 #convolve (1 3 # -1 2 -1); -#X obj 10 112 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 237 161 #t; -#X obj 237 205 # *>>8; -#X obj 10 205 # *>>8; -#X text 257 112 Works; -#X text 8 64 In some situations \, a grid hasn't finished entering -the right-hand side \, when an object begins receiving on the left-hand -side. in those cases you should use #t.; -#X obj 237 113 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 10 234 #out window \, title doesnt_work; -#X obj 237 233 #out window \, title works; -#X text 8 25 The [#t] trigger object sequences grid operations in a -right-to-left order. It outputs its input from right to left.; -#X text 28 112 Doesn't work (all black); -#X text 393 1 GridFlow 0.8.4; -#X obj 237 134 #in teapot.png; -#X text 11 425 GRID; -#X text 13 517; -#X text 215 382 Outlets (2); -#X text 221 264 Inlets (1); -#X text 210 528 Arguments (0); -#X obj 2 576 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 14 564; -#X text 217 577 See also; -#X text 103 603; -#X obj 9 605 trigger; -#X text 59 426 The same grid received in inlet 0 is first sent to the -outlet 0; -#X obj 2 459 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 12 483 GRID; -#X text 3 460 Outlet 1; -#X text 60 484 The same grid received in inlet 0 is sent to the outlet -1 after it was sent to outlet 0; -#X text 59 313 The Grid passed in inlet 0 will be first sent to the -right most outlet and then to the second from the right (the left outlet -in this case).; -#X connect 12 0 13 0; -#X connect 13 0 19 0; -#X connect 13 1 14 0; -#X connect 14 0 19 1; -#X connect 15 0 18 1; -#X connect 16 0 12 0; -#X connect 17 0 18 0; -#X connect 17 1 15 0; -#X connect 18 0 24 0; -#X connect 19 0 23 0; -#X connect 22 0 28 0; -#X connect 28 0 17 0; diff --git a/externals/gridflow/doc/flow_classes/#to_float-help.pd b/externals/gridflow/doc/flow_classes/#to_float-help.pd deleted file mode 100644 index b82cc30f..00000000 --- a/externals/gridflow/doc/flow_classes/#to_float-help.pd +++ /dev/null @@ -1,39 +0,0 @@ -#N canvas 585 129 502 472 10; -#X obj 1 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 0 352 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 0 247 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 0 270 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 214 354 Outlets (1); -#X obj 0 450 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 0 373 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 1 271 Inlet 0; -#X text 1 374 Outlet 0; -#X text 214 247 Inlets (1); -#X obj 15 188 cnv 15 55 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X text 5 298 GRID; -#X obj 15 100 #import ( 2 2 2 ); -#X obj 51 133 display; -#X msg 15 73 1 2 3 4 5 6 7 8; -#X text 209 449 Arguments (0); -#X text 59 298 Accepts a grid that will be transformed into its elements. -; -#X text 138 73 <-- create the grid here; -#X obj 2 0 #to_float; -#X text 397 2 GridFlow 0.9.0; -#X text 4 401 FLOAT; -#X text 79 401 The grid is transformed into a sequence of floats.; -#X obj 15 188 #to_float; -#X text 12 27 Produces sequences of floats from grid data. Useful for -the integration into the rest of PureData.; -#X obj 15 216 print converted_grid; -#X connect 12 0 13 0; -#X connect 12 0 22 0; -#X connect 14 0 12 0; -#X connect 22 0 24 0; diff --git a/externals/gridflow/doc/flow_classes/#to_list-help.pd b/externals/gridflow/doc/flow_classes/#to_list-help.pd deleted file mode 100644 index 3ee2f872..00000000 --- a/externals/gridflow/doc/flow_classes/#to_list-help.pd +++ /dev/null @@ -1,42 +0,0 @@ -#N canvas 544 108 502 472 10; -#X obj 1 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 0 352 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 0 247 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 0 270 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 214 354 Outlets (1); -#X obj 0 450 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 0 373 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 1 271 Inlet 0; -#X text 1 374 Outlet 0; -#X text 214 247 Inlets (1); -#X obj 15 160 cnv 15 52 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X text 5 298 GRID; -#X obj 14 91 #import ( 2 2 2 ); -#X obj 50 115 display; -#X msg 14 64 1 2 3 4 5 6 7 8; -#X text 209 449 Arguments (0); -#X obj 161 217 display; -#X text 59 298 Accepts a grid that will be transformed into a list. -; -#X text 3 401 LIST; -#X text 57 401 The grid is transformed into a single message containing -a sequence of integers.; -#X text 12 27 Produces a list from grid data. Useful for the integration -into the rest of PureData.; -#X text 130 63 <-- create the grid here; -#X obj 2 0 #to_list; -#X text 397 1 GridFlow 0.9.0; -#X obj 14 161 #to_list; -#X obj 14 216 print converted_grid; -#X connect 12 0 13 0; -#X connect 12 0 24 0; -#X connect 14 0 12 0; -#X connect 24 0 16 0; -#X connect 24 0 25 0; diff --git a/externals/gridflow/doc/flow_classes/#to_pix-help.pd b/externals/gridflow/doc/flow_classes/#to_pix-help.pd deleted file mode 100644 index 00a1c979..00000000 --- a/externals/gridflow/doc/flow_classes/#to_pix-help.pd +++ /dev/null @@ -1,126 +0,0 @@ -#N canvas 921 79 511 752 10; -#X msg 325 61 create \, 1; -#X obj 325 42 loadbang; -#X obj -26 1 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text -25 0 [#to_pix]; -#X obj 90 162 #in; -#X msg 117 139 open violoncelle.mov; -#X obj 90 72 tgl 15 0 empty empty empty 17 7 0 10 -4034 -1 -1 1 1; -#X obj 5 52 gemhead; -#X obj 5 291 pix_texture; -#X text 371 2 GridFlow 0.9.3; -#X obj -27 720 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj -27 720 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj -27 720 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj -27 720 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text -21 721 see also :; -#X text 62 720 [#import_pix]; -#X obj -27 403 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj -25 431 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text -24 432 Inlet 0; -#X text 193 404 Inlets (1); -#X obj -27 578 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj -27 606 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text -26 607 Outlet 0; -#X obj -27 578 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj -27 606 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text -26 607 Outlet 0; -#X obj -27 578 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj -27 606 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text -26 607 Outlet 0; -#X obj -27 578 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 184 580 Outlets (1); -#X obj -27 606 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text -26 607 Outlet 0; -#X obj -27 578 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj -27 578 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj -27 578 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 184 580 Outlets (1); -#X obj -28 669 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj -28 669 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj -28 669 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj -28 669 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X msg 389 62 destroy; -#X obj 90 93 metro 30; -#X obj 325 93 gemwin 30; -#X obj 117 117 loadbang; -#X text 110 69 <-- start playing the video; -#X text 0 353 Note : you can get some timebased 'moiree' effects if -the arguments to the [gemwin] and the [metro] are not synched; -#X text 190 188 <-- only temporarily necessary; -#X obj -25 521 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text -24 522 Inlet 1; -#X text 77 253 <-- imports gridflow grids into GEM; -#X text 141 720 \, game_of_life_gem.pd in the examples folder; -#X text -25 541 GRID; -#X obj 5 253 #to_pix; -#X text -24 624 gemlist; -#X text -24 451 gem_state; -#X text 56 540 Grid with 4 channels; -#X text 51 625 Modified gemstate so that the pix is equal to the Grid -of inlet 1; -#X text 53 451 Something coming from [gemhead]; -#X msg 17 217 yflip \$1; -#X obj 17 197 tgl 15 0 empty empty empty 17 7 0 10 -257985 -1 -1 1 -1; -#X text 186 670 Arguments (0); -#X text -23 480 yflip; -#X text 55 481 With one boolean argument that selects the order in -which the y dimension of the Grid will be read \, defaults to '1'; -#N canvas 0 22 458 308 channel_test 0; -#X obj 130 221 #rgb_to_rgba; -#X obj 131 103 #dim; -#X obj 103 173 shunt; -#X obj 131 126 #unpack 3; -#X obj 104 29 inlet; -#X obj 104 56 t a a; -#X obj 103 265 outlet; -#X obj 131 150 == 3; -#X connect 0 0 6 0; -#X connect 1 0 3 0; -#X connect 2 0 6 0; -#X connect 2 1 0 0; -#X connect 3 2 7 0; -#X connect 4 0 5 0; -#X connect 5 0 2 0; -#X connect 5 1 1 0; -#X connect 7 0 2 1; -#X restore 90 190 pd channel_test; -#X obj 5 322 rectangle 4 3; -#X connect 0 0 43 0; -#X connect 1 0 0 0; -#X connect 4 0 64 0; -#X connect 5 0 4 0; -#X connect 6 0 42 0; -#X connect 7 0 53 0; -#X connect 8 0 65 0; -#X connect 41 0 43 0; -#X connect 42 0 4 0; -#X connect 44 0 5 0; -#X connect 53 0 8 0; -#X connect 59 0 53 0; -#X connect 60 0 59 0; -#X connect 64 0 53 1; diff --git a/externals/gridflow/doc/flow_classes/#to_symbol-help.pd b/externals/gridflow/doc/flow_classes/#to_symbol-help.pd deleted file mode 100644 index a03fbbf9..00000000 --- a/externals/gridflow/doc/flow_classes/#to_symbol-help.pd +++ /dev/null @@ -1,46 +0,0 @@ -#N canvas 721 295 503 549 10; -#X obj 1 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 0 428 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 0 323 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 0 346 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 214 430 Outlets (1); -#X obj 0 526 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 0 449 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 1 347 Inlet 0; -#X text 1 450 Outlet 0; -#X text 214 323 Inlets (1); -#X obj 11 233 cnv 15 63 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X text 5 374 GRID; -#X obj 46 164 display; -#X text 209 525 Arguments (0); -#X obj 174 292 display; -#X text 3 477 LIST; -#X symbolatom 353 294 12 0 0 0 - - -; -#X text 59 374 Accepts a grid that will be transformed into a symbol. -; -#X text 57 477 The grid is transformed into a single message containing -a symbol.; -#X text 11 32 Produces a symbol from grid data in 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.; -#X msg 11 111 72 101 108 108 111 32 87 111 114 108 100 33; -#X obj 11 138 #import (3 2 2); -#X text 324 111 <-- create the grid here; -#X text 397 0 GridFlow 0.9.0; -#X obj 2 0 #to_symbol; -#X obj 11 233 #to_symbol; -#X obj 11 292 print converted_grid; -#X connect 20 0 21 0; -#X connect 21 0 12 0; -#X connect 21 0 25 0; -#X connect 25 0 14 0; -#X connect 25 0 16 0; -#X connect 25 0 26 0; 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 26e31fee..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 534 23 GridFlow 0.8.0; -#X obj 572 257 #unpack 3; -#X floatatom 562 305 5 0 0 0 - - -; -#X obj 465 190 t a a; -#X obj 382 301 display; -#X floatatom 601 305 5 0 0 0 - - -; -#X floatatom 640 305 5 0 0 0 - - -; -#X text 1 51 [#unpack]; -#X obj 579 352 #pack 3; -#X text 0 122 It takes an integer as an argument to specify the number -of Dimensions the incoming grid has.; -#X obj 465 76 #color; -#X obj 565 411 #color; -#X text 1 84 Accepts grids in its inlet and produces integers via its -outlet.; -#X text 10 349 [#pack]; -#X text 10 382 Accepts integers in its inlets and produces a corresponding -grid via its outlet.; -#X text 9 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 532 332 - 127; -#X obj 18 190 trigger bang bang; -#X obj 215 178 metro 100; -#X obj 138 345 display; -#X obj 223 272 print blah; -#X obj 194 316 print blah2; -#X obj 171 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/#unpack-help.pd b/externals/gridflow/doc/flow_classes/#unpack-help.pd deleted file mode 100644 index 8d217fd6..00000000 --- a/externals/gridflow/doc/flow_classes/#unpack-help.pd +++ /dev/null @@ -1,40 +0,0 @@ -#N canvas 286 66 511 484 10; -#X obj 1 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 316 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 225 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 248 cnv 15 73 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 409 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 203 410 Arguments (1); -#X obj 1 337 cnv 15 79 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 15 446 INTEGER; -#X text 15 368 INTEGER; -#X text 17 282 GRID; -#X obj 11 1 #unpack; -#X obj 17 61 #color; -#X floatatom 17 195 5 0 0 0 - - -; -#X floatatom 46 174 5 0 0 0 - - -; -#X floatatom 75 152 5 0 0 0 - - -; -#X text 204 318 Outlets (n); -#X text 204 227 Inlets (1); -#X text 91 282 Accepts a grid.; -#X text 196 84 <--click and drag to view grid values.; -#X text 12 28 Outputs individual integer values from a grid.; -#X obj 17 128 cnv 15 65 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 17 128 #unpack 3; -#X text 87 369 Outputs grid dimensions as individual integers.; -#X text 397 1 GridFlow 0.8.4; -#X text 11 250 Inlet 0; -#X text 5 338 Outlet All; -#X text 84 445 Defines the number of outlets \, usually corresponds -to the number of grid dimensions.; -#X connect 11 0 21 0; -#X connect 21 0 12 0; -#X connect 21 1 13 0; -#X connect 21 2 14 0; diff --git a/externals/gridflow/doc/flow_classes/0x40complex_sq-help.pd b/externals/gridflow/doc/flow_classes/0x40complex_sq-help.pd deleted file mode 100644 index d5fac1a2..00000000 --- a/externals/gridflow/doc/flow_classes/0x40complex_sq-help.pd +++ /dev/null @@ -1,28 +0,0 @@ -#N canvas 301 131 637 303 10; -#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 floatatom 21 238 5 0 0 0 - - -; -#X floatatom 64 108 5 0 0 0 - - -; -#X floatatom 58 238 5 0 0 0 - - -; -#X text 572 13 gridflow; -#X text 21 275 see also:; -#X obj 21 128 #pack; -#X text 138 88 However \, this (old) object is backwards from the rest -of GridFlow because it puts Imaginary before Real. [#fft] puts the -Real part first.; -#X text 14 14 @complex_sq; -#X obj 114 235 #print; -#X obj 21 209 #unpack; -#X obj 94 279 # +; -#X obj 127 279 # abs-; -#X connect 0 0 11 0; -#X connect 0 0 12 0; -#X connect 2 0 8 0; -#X connect 4 0 8 1; -#X connect 8 0 0 0; -#X connect 12 0 3 0; -#X connect 12 1 5 0; diff --git a/externals/gridflow/doc/flow_classes/0x40join-help.pd b/externals/gridflow/doc/flow_classes/0x40join-help.pd deleted file mode 100644 index 6bf7630e..00000000 --- a/externals/gridflow/doc/flow_classes/0x40join-help.pd +++ /dev/null @@ -1,44 +0,0 @@ -#N canvas 677 232 659 362 10; -#X obj 18 32 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1 --1; -#X obj 211 30 bng 15 250 50 0 empty empty empty 0 -6 0 8 -233017 -1 --1; -#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 text 563 10 gridflow; -#X text 17 306 see also:; -#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 obj 18 242 #clip; -#X obj 86 310 #fold +; -#X obj 142 310 #scan +; -#X obj 18 269 #out window; -#X obj 18 96 #in; -#X obj 237 96 #rgb_to_greyscale; -#X obj 211 96 #in; -#X obj 18 188 #perspective 128; -#X text 205 170 creation argument is the index 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.; -#X connect 0 0 9 0; -#X connect 1 0 10 0; -#X connect 2 0 20 0; -#X connect 7 0 17 0; -#X connect 8 0 19 0; -#X connect 9 0 17 0; -#X connect 9 1 7 0; -#X connect 10 0 19 0; -#X connect 10 1 8 0; -#X connect 13 0 16 0; -#X connect 17 0 2 0; -#X connect 18 0 2 1; -#X connect 19 0 18 0; -#X connect 20 0 13 0; diff --git a/externals/gridflow/doc/flow_classes/ascii-help.pd b/externals/gridflow/doc/flow_classes/ascii-help.pd deleted file mode 100644 index 99ee3cac..00000000 --- a/externals/gridflow/doc/flow_classes/ascii-help.pd +++ /dev/null @@ -1,30 +0,0 @@ -#N canvas 442 305 506 373 10; -#X obj 39 93 ascii; -#X floatatom 39 61 5 0 0 0 - - -; -#X obj 39 124 print; -#X msg 86 60 42; -#X obj 1 -2 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 398 -2 GridFlow 0.9.3; -#X obj 11 -2 ascii; -#X obj 1 176 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 199 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 2 200 Inlet 0; -#X text 215 176 Inlets (1); -#X text 5 225 INT; -#X obj 1 282 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 215 284 Outlets (1); -#X obj 1 303 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 2 304 Outlet 0; -#X text 8 332 FLOAT; -#X text 135 94 write integer as decimal in ascii codes; -#X text 84 225 number to be converted into ascii codes; -#X text 82 332 a sequence of floats corresponding to the ascii codes -of the input integer; -#X connect 0 0 2 0; -#X connect 1 0 0 0; -#X connect 3 0 0 0; diff --git a/externals/gridflow/doc/flow_classes/condition-help.pd b/externals/gridflow/doc/flow_classes/condition-help.pd deleted file mode 100644 index a5b0385c..00000000 --- a/externals/gridflow/doc/flow_classes/condition-help.pd +++ /dev/null @@ -1,16 +0,0 @@ -#N canvas 78 0 388 273 10; -#X obj 33 112 condition 0 0 60 90; -#X floatatom 33 77 5 0 0 0 - - -; -#X floatatom 161 77 5 0 0 0 - - -; -#X obj 33 148 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X obj 161 148 bng 15 250 50 0 empty empty empty 0 -6 0 8 -258699 -1 --1; -#X text 31 16 accepts (X0 \, Y0) (X1 \, Y1); -#X text 30 194 returns a bang only when the condition changes; -#X text 30 236 use with; -#X obj 99 237 #motion_detection; -#X connect 0 0 3 0; -#X connect 0 1 4 0; -#X connect 1 0 0 0; -#X connect 2 0 0 1; diff --git a/externals/gridflow/doc/flow_classes/count-help.pd b/externals/gridflow/doc/flow_classes/count-help.pd deleted file mode 100644 index 9d812919..00000000 --- a/externals/gridflow/doc/flow_classes/count-help.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/doc/flow_classes/cv.Kalman-help.pd b/externals/gridflow/doc/flow_classes/cv.Kalman-help.pd deleted file mode 100644 index 354f4831..00000000 --- a/externals/gridflow/doc/flow_classes/cv.Kalman-help.pd +++ /dev/null @@ -1,25 +0,0 @@ -#N canvas 657 262 450 300 10; -#X obj 46 59 metro 100; -#X obj 46 42 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 -; -#X obj 144 92 hsl 128 15 0 127 0 0 empty empty empty -2 -8 0 10 -262144 --1 -1 0 1; -#X obj 116 91 f; -#X obj 141 136 -; -#X obj 116 158 #pack; -#X obj 116 110 t f f f; -#X obj 116 177 #redim (2 1); -#X obj 47 239 display; -#X obj 46 213 cv.Kalman 2 1 1; -#X text 132 21 This is a help file \, so \, HELP!; -#X connect 0 0 9 0; -#X connect 1 0 0 0; -#X connect 2 0 3 1; -#X connect 3 0 6 0; -#X connect 4 0 5 1; -#X connect 5 0 7 0; -#X connect 6 0 5 0; -#X connect 6 1 4 1; -#X connect 6 2 4 0; -#X connect 7 0 9 1; -#X connect 9 0 8 0; diff --git a/externals/gridflow/doc/flow_classes/cv.numop-help.pd b/externals/gridflow/doc/flow_classes/cv.numop-help.pd deleted file mode 100644 index 26f89c99..00000000 --- a/externals/gridflow/doc/flow_classes/cv.numop-help.pd +++ /dev/null @@ -1,45 +0,0 @@ -#N canvas 1083 158 509 668 10; -#X obj 4 1 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 401 2 GridFlow 0.9.0; -#X text 5 0 [opencv]; -#X obj 2 629 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 2 629 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 2 629 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 2 629 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 8 630 see also :; -#X text 91 629 #numop-help.pd; -#X obj 22 135 #print; -#X msg 22 69 2 2 # 0 1 2 3; -#X obj 22 100 cv.Add (2 2 # 0 1 2 3); -#X obj 22 260 #print; -#X msg 22 194 2 2 # 0 1 2 3; -#X obj 22 387 #print; -#X msg 22 321 2 2 # 0 1 2 3; -#X obj 22 514 #print; -#X msg 22 448 2 2 # 0 1 2 3; -#X obj 22 225 cv.Sub (2 2 # 0 1 2 3); -#X obj 22 352 cv.Mul (2 2 # 0 1 2 3); -#X obj 22 479 cv.Div (2 2 # 0 1 2 3); -#X msg 151 448 2 2 # 0 1 42 666; -#X msg 151 321 2 2 # 0 1 42 666; -#X msg 151 194 2 2 # 0 1 42 666; -#X msg 151 69 2 2 # 0 1 42 666; -#X text 274 479 rounds down; -#X text 87 0 numeric operators; -#X connect 10 0 11 0; -#X connect 11 0 9 0; -#X connect 13 0 18 0; -#X connect 15 0 19 0; -#X connect 17 0 20 0; -#X connect 18 0 12 0; -#X connect 19 0 14 0; -#X connect 20 0 16 0; -#X connect 21 0 20 1; -#X connect 22 0 19 1; -#X connect 23 0 18 1; -#X connect 24 0 11 1; diff --git a/externals/gridflow/doc/flow_classes/display-help.pd b/externals/gridflow/doc/flow_classes/display-help.pd deleted file mode 100644 index 3006888a..00000000 --- a/externals/gridflow/doc/flow_classes/display-help.pd +++ /dev/null @@ -1,30 +0,0 @@ -#N canvas 414 111 504 403 10; -#X obj 0 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 0 339 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 0 241 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 0 264 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 5 265 Inlet_0; -#X obj 0 370 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 202 243 Inlets (1); -#X text 16 312 GRID; -#X text 17 287 LIST; -#X text 15 300 INTEGER; -#X text 394 1 GridFlow 0.8.5; -#X text 88 278 GUI object equivalent to [print] and [#print]. method -(any) () Displays the received message in the box \, resizing the box -so that the message fits exactly.; -#X obj 90 185 display; -#X text 5 0 [display]; -#X text 202 340 Outlets (0); -#X text 204 369 Arguments (0); -#X msg 319 61 0 1 2 3 5 8 13; -#X floatatom 319 89 5 0 0 0 - - -; -#X obj 89 58 #color; -#X connect 16 0 12 0; -#X connect 17 0 12 0; -#X connect 18 0 12 0; 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 4d43e556..00000000 --- a/externals/gridflow/doc/flow_classes/exec-help.pd +++ /dev/null @@ -1,40 +0,0 @@ -#N canvas 628 0 501 450 10; -#X obj 10 105 cnv 15 30 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 1 273 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 146 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 169 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 324 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 2 170 Inlet 0; -#X obj 1 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 9 1 exec; -#X obj 10 105 exec; -#X obj 13 407 renamefile; -#X obj 128 407 unix_time; -#X obj 96 407 ls; -#X msg 10 77 shell xlogo &; -#X msg 119 77 shell ftp ac@artengine.ca &; -#X text 221 147 Inlets (1); -#X text 398 2 GridFlow 0.8.4; -#X obj 1 379 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 215 380 See also; -#X text 9 25 The [exec] launches a Unix shell program or script. It -does not return a result \, see the PureData shell after using the -ftp command.; -#X text 9 197 SYMBOL; -#X text 215 275 Outlets (0); -#X text 15 297 No outlet; -#X text 210 325 Arguments (0); -#X text 64 354; -#X text 14 352 No argument; -#X text 56 196 Inlet 0 accepts a symbol made of the word "shell" which -creates a Unix shell and the program or script to be executed in that -shell like "xlogo &" or "ftp ftpsitename &" \, etc.; -#X connect 12 0 8 0; -#X connect 13 0 8 0; diff --git a/externals/gridflow/doc/flow_classes/for-help.pd b/externals/gridflow/doc/flow_classes/for-help.pd deleted file mode 100644 index f73c4f00..00000000 --- a/externals/gridflow/doc/flow_classes/for-help.pd +++ /dev/null @@ -1,9 +0,0 @@ -#N canvas 472 284 450 300 10; -#X obj 41 95 print; -#X text 41 132 note that 104 should not be included!; -#X obj 41 53 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X text 40 115 should print 10 23 36 49 62 75 88 101; -#X obj 41 71 for 10 114 13; -#X connect 2 0 4 0; -#X connect 4 0 0 0; diff --git a/externals/gridflow/doc/flow_classes/gf.oneshot-help.pd b/externals/gridflow/doc/flow_classes/gf.oneshot-help.pd deleted file mode 100644 index 366cc68c..00000000 --- a/externals/gridflow/doc/flow_classes/gf.oneshot-help.pd +++ /dev/null @@ -1,51 +0,0 @@ -#N canvas 161 29 505 543 10; -#X obj 5 435 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 3 260 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 3 283 cnv 15 73 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 4 524 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 5 456 cnv 15 65 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 3 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 205 262 Inlets (2); -#X text 6 284 Inlet 0; -#X obj 3 352 cnv 15 73 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 6 353 Inlet 1; -#X text 5 316 ANY; -#X text 8 490 ANY; -#X obj 127 159 cnv 15 72 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X text 29 34 Like [spigot] \, but turns itself off after each message -\, so you have to turn it on again to making it pass another message. -; -#X text 206 437 Outlets (1); -#X text 9 457 Outlet; -#X msg 195 126 1; -#X obj 171 126 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X msg 127 88 test; -#X obj 127 219 print; -#X floatatom 168 90 5 0 0 0 - - -; -#X floatatom 171 220 5 0 0 0 - - -; -#X text 232 126 <-- both will reset the object; -#X text 5 385 BANG; -#X text 74 489 Outputs incoming message.; -#X text 194 525 Arguments (none); -#X text 77 315 Incoming message can be Grids \, Symbols \, Integers -\, Lists \, etc.; -#X text 76 385 Resets the object so that the next mesage will be passed -through.; -#X obj 127 159 gf.oneshot; -#X obj 12 1 gf.oneshot; -#X text 393 1 GridFlow 0.9.4; -#X connect 16 0 28 1; -#X connect 17 0 28 1; -#X connect 18 0 28 0; -#X connect 20 0 28 0; -#X connect 28 0 19 0; -#X connect 28 0 21 0; diff --git a/externals/gridflow/doc/flow_classes/gridflow-help.pd b/externals/gridflow/doc/flow_classes/gridflow-help.pd deleted file mode 100644 index dd0f8fae..00000000 --- a/externals/gridflow/doc/flow_classes/gridflow-help.pd +++ /dev/null @@ -1,11 +0,0 @@ -#N canvas 624 183 400 205 10; -#X text 22 53 dummy object for controlling the profiler; -#X msg 48 95 profiler_reset; -#X msg 59 115 profiler_dump; -#X text 321 18 gridflow; -#X obj 24 146 gridflow; -#X text 21 22 gridflow; -#X msg 168 95 \; gridflow profiler_reset; -#X msg 168 115 \; gridflow profiler_dump; -#X connect 1 0 4 0; -#X connect 2 0 4 0; diff --git a/externals/gridflow/doc/flow_classes/inv+-help.pd b/externals/gridflow/doc/flow_classes/inv+-help.pd deleted file mode 100644 index e0d6bcdc..00000000 --- a/externals/gridflow/doc/flow_classes/inv+-help.pd +++ /dev/null @@ -1,96 +0,0 @@ -#N canvas 698 0 510 655 10; -#X obj 1 438 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 7 329 FLOAT; -#X obj 1 280 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 303 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 215 440 Outlets (1); -#X obj 1 521 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 210 520 Arguments (1); -#X obj 1 371 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 459 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 6 394 FLOAT; -#X text 398 1 GridFlow 0.8.4; -#X text 2 304 Inlet 0; -#X text 2 373 Inlet 1; -#X text 221 281 Inlets (2); -#X text 2 460 Outlet 0; -#X obj 1 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 398 2 GridFlow 0.8.4; -#X obj 219 121 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X text 288 163 negative; -#X obj 219 163 #in; -#X obj 263 164 tgl 15 0 empty empty empty 0 -6 0 8 -260818 -1 -1 0 -1; -#X obj 219 82 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1 -; -#X obj 219 185 shunt 2; -#X text 369 140 image loader; -#X msg 219 139 open r001.jpg \, bang; -#X obj 219 101 metro 33.3667; -#X obj 219 238 #out window \, title inv+; -#X text 349 221 Outputs negated image; -#X text 68 221 Outputs initial image; -#X obj 331 192 hsl 128 8 0 255 0 0 empty empty empty -2 -6 0 8 -262144 --1 -1 6000 1; -#X text 10 548 FLOAT; -#X text 62 396 A float in inlet 1 is stored as the value "b" to perform -the "b-a" operation.; -#X text 62 330 A float in inlet 1 is stored as the value "a" to perform -the "b-a" operation.; -#X obj 1 590 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 216 592 See also; -#X obj 105 616 swap; -#X obj 105 616 swap; -#X obj 9 0 inv+; -#X text 62 548 [inv+] accepts a single float as a creation argument -which initializes the first value to perform the operation with.; -#X obj 12 616 inv*; -#X text 9 24 The [inv+] performs an inversion on the data passed to -it. If you consider inlet 0 as the variable "a" and inlet 1 as variable -"b" \, [inv+] performs the operation "b-a" on the values passed to -it.; -#X floatatom 34 102 5 0 0 0 - - -; -#X floatatom 57 119 5 0 0 0 - - -; -#X floatatom 34 176 5 0 0 0 - - -; -#X text 323 78 Another application inv+ as a numerical operator of -the Grid object; -#X obj 52 616 # inv+; -#X obj 264 211 cnv 15 72 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 33 144 cnv 15 30 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 34 144 inv+; -#X obj 263 211 # inv+ 255; -#X text 11 483 FLOAT; -#X text 64 485 Outputs the result of the operation "b-a".; -#X floatatom 105 104 5 0 0 0 - - -; -#X floatatom 149 121 5 0 0 0 - - -; -#X floatatom 105 178 5 0 0 0 - - -; -#X obj 105 145 cnv 15 50 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 105 145 inv+ 10; -#X connect 17 0 24 0; -#X connect 19 0 22 0; -#X connect 20 0 22 1; -#X connect 21 0 25 0; -#X connect 22 0 26 0; -#X connect 22 1 49 0; -#X connect 24 0 19 0; -#X connect 25 0 17 0; -#X connect 29 0 49 1; -#X connect 41 0 48 0; -#X connect 42 0 48 1; -#X connect 48 0 43 0; -#X connect 49 0 26 0; -#X connect 52 0 56 0; -#X connect 53 0 56 1; -#X connect 56 0 54 0; diff --git a/externals/gridflow/doc/flow_classes/inv_mul-help.pd b/externals/gridflow/doc/flow_classes/inv_mul-help.pd deleted file mode 100644 index 0b4af986..00000000 --- a/externals/gridflow/doc/flow_classes/inv_mul-help.pd +++ /dev/null @@ -1,96 +0,0 @@ -#N canvas 602 28 510 655 10; -#X obj 1 438 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 7 329 FLOAT; -#X obj 1 280 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 303 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 215 440 Outlets (1); -#X obj 1 521 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 210 520 Arguments (1); -#X obj 1 371 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 459 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 6 394 FLOAT; -#X text 398 1 GridFlow 0.8.4; -#X text 2 304 Inlet 0; -#X text 2 373 Inlet 1; -#X text 221 281 Inlets (2); -#X text 2 460 Outlet 0; -#X obj 1 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 398 2 GridFlow 0.8.4; -#X obj 219 121 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 219 163 #in; -#X obj 263 164 tgl 15 0 empty empty empty 0 -6 0 8 -260818 -1 -1 1 -1; -#X obj 219 82 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 1 1 -; -#X obj 219 185 shunt 2; -#X text 369 140 image loader; -#X msg 219 139 open r001.jpg \, bang; -#X obj 219 101 metro 33.3667; -#X obj 219 238 #out window \, title inv+; -#X text 349 221 Outputs negated image; -#X text 68 221 Outputs initial image; -#X obj 338 192 hsl 128 8 1000 65000 0 0 empty empty empty -2 -6 0 8 --262144 -1 -1 1600 1; -#X text 10 548 FLOAT; -#X obj 1 590 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 216 592 See also; -#X obj 105 616 swap; -#X obj 105 616 swap; -#X floatatom 34 102 5 0 0 0 - - -; -#X floatatom 57 120 5 0 0 0 - - -; -#X floatatom 34 176 5 0 0 0 - - -; -#X text 323 78 Another application inv+ as a numerical operator of -the Grid object; -#X obj 263 210 cnv 15 80 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 33 144 cnv 15 30 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X text 11 483 FLOAT; -#X floatatom 105 104 5 0 0 0 - - -; -#X floatatom 149 121 5 0 0 0 - - -; -#X floatatom 105 178 5 0 0 0 - - -; -#X obj 105 145 cnv 15 50 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 9 0 inv*; -#X obj 105 145 inv* 10; -#X obj 34 144 inv*; -#X text 62 548 [inv*] accepts a single float as a creation argument -which initializes the first value to perform the operation with.; -#X obj 12 616 inv+; -#X obj 52 616 # inv*; -#X text 8 24 The [inv*] performs an inversion on the data passed to -it. If you consider inlet 0 as the variable "a" and inlet 1 as variable -"b" \, [inv*] performs the operation "b/a" on the values passed to -it.; -#X text 62 330 A float in inlet 1 is stored as the value "a" to perform -the "b/a" operation.; -#X text 62 396 A float in inlet 1 is stored as the value "b" to perform -the "b/a" operation.; -#X text 64 485 Outputs the result of the operation "b/a".; -#X obj 263 209 # inv* 4000; -#X text 288 163 inversion; -#X connect 17 0 23 0; -#X connect 18 0 21 0; -#X connect 19 0 21 1; -#X connect 20 0 24 0; -#X connect 21 0 25 0; -#X connect 21 1 55 0; -#X connect 23 0 18 0; -#X connect 24 0 17 0; -#X connect 28 0 55 1; -#X connect 34 0 47 0; -#X connect 35 0 47 1; -#X connect 41 0 46 0; -#X connect 42 0 46 1; -#X connect 46 0 43 0; -#X connect 47 0 36 0; -#X connect 55 0 25 0; diff --git a/externals/gridflow/doc/flow_classes/listappend-help.pd b/externals/gridflow/doc/flow_classes/listappend-help.pd deleted file mode 100644 index cd77dff7..00000000 --- a/externals/gridflow/doc/flow_classes/listappend-help.pd +++ /dev/null @@ -1,58 +0,0 @@ -#N canvas 38 23 507 568 10; -#X obj 1 334 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 10 235 LIST; -#X obj 1 185 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 208 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 215 336 Outlets (1); -#X obj 2 414 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 355 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 2 209 Inlet 0; -#X text 2 356 Outlet 0; -#X obj -3 -1 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 3 472 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 219 473 See also; -#X obj 10 506 listappend; -#X obj 99 506 listelement; -#X obj 198 507 listfind; -#X obj 291 507 listflatten; -#X obj 11 533 listmake; -#X obj 99 532 listprepend; -#X obj 199 533 listreverse; -#X obj 292 533 listsublist; -#X msg 80 87 1 3 hello 8 13; -#X obj 80 131 cnv 15 170 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X msg 248 85 1 12 a b c d e f g h i j k l; -#X obj 81 155 display; -#X obj 2 271 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 3 273 Inlet 1; -#X text 8 380 LIST; -#X msg 257 106 200 201 202 203 204 205 206; -#X text 66 235 Accepts a list to be appended to initial list.; -#X text 9 297 LIST; -#X text 221 186 Inlets (2); -#X text 65 381 Outputs the resulting list.; -#X text 213 413 Arguments (n); -#X text 7 441 ANY; -#X text 62 442 This optional argument can contain the initial list -; -#X obj 10 0 listappend; -#X obj 80 132 listappend 1 2 3 4 5 6 7; -#X text 11 22 The [listappend] combines two lists together. It takes -the initial list (List1)(passed as an argument or to inlet 1) and appends -to it the list passed to inlet 0 (List0). [listappend] combines List0 -followed by List1 in a new list.; -#X text 65 297 Accepts initial list to appended.; -#X text 392 0 GridFlow 0.9.0; -#X connect 20 0 36 0; -#X connect 22 0 36 1; -#X connect 27 0 36 1; -#X connect 36 0 23 0; 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 e1aa3bf9..00000000 --- a/externals/gridflow/doc/flow_classes/listelement-help.pd +++ /dev/null @@ -1,52 +0,0 @@ -#N canvas 92 61 509 554 10; -#X obj 4 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 6 323 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 4 176 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 4 199 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 9 200 Inlet_0; -#X text 206 178 Inlets (2); -#X text 215 325 Outlets (1); -#X obj 6 429 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 212 428 Arguments (1); -#X obj 5 261 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 6 344 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 10 262 Inlet_1; -#X obj 11 1 listelement; -#X floatatom 262 142 5 0 0 0 - - -; -#X floatatom 281 88 5 0 0 0 - - -; -#X obj 195 140 print; -#X msg 195 63 1 3 hello 8 13; -#X obj 195 111 cnv 15 93 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X text 7 346 Outlet_0; -#X text 14 231 LIST; -#X text 10 460 INTEGER; -#X obj 195 111 listelement 0; -#X text 78 231 Accepts a list of numbers or symbols.; -#X text 10 25 Outputs one element from a list as selected by an integer. -; -#X text 10 373 INTEGER; -#X text 11 387 SYMBOL; -#X text 75 373 The element selected by the index 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.; -#X text 75 460 An integer acts as an index \, it selects the position -of an element in a list. The selected element is output \, 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 77 289 Changes the value of the argument i.e. changes the index -into the list to get a different element.; -#X text 11 290 INTEGER; -#X text 396 1 GridFlow 0.9.0; -#X connect 14 0 21 1; -#X connect 16 0 21 0; -#X connect 21 0 13 0; -#X connect 21 0 15 0; diff --git a/externals/gridflow/doc/flow_classes/listflatten-help.pd b/externals/gridflow/doc/flow_classes/listflatten-help.pd deleted file mode 100644 index 6db88217..00000000 --- a/externals/gridflow/doc/flow_classes/listflatten-help.pd +++ /dev/null @@ -1,46 +0,0 @@ -#N canvas 630 27 508 513 10; -#X obj 1 302 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 10 255 LIST; -#X obj 1 205 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 228 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 215 304 Outlets (1); -#X obj 0 382 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 323 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 2 229 Inlet 0; -#X text 2 324 Outlet 0; -#X obj 1 418 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 219 419 See also; -#X obj 10 452 listappend; -#X obj 99 452 listelement; -#X obj 198 453 listfind; -#X obj 291 453 listflatten; -#X obj 11 477 listmake; -#X obj 99 476 listprepend; -#X obj 199 477 listreverse; -#X obj 292 477 listsublist; -#X obj 103 104 cnv 15 79 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 104 137 display; -#X text 8 348 LIST; -#X obj -1 -3 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 6 -2 listflatten; -#X text 393 -2 GridFlow 0.9.0; -#X text 221 206 Inlets (1); -#X obj 103 104 listflatten; -#X text 212 382 Arguments (0); -#X text 64 348 Outputs the flattened list.; -#X msg 88 68 1 (2 (3 4 5) 6 7) 8; -#X text 25 22 Takes nested lists and places their contents into a single -list.; -#X obj 89 171 display; -#X text 65 255 Accepts a nested list.; -#X connect 26 0 20 0; -#X connect 29 0 26 0; -#X connect 29 0 31 0; diff --git a/externals/gridflow/doc/flow_classes/listlength-help.pd b/externals/gridflow/doc/flow_classes/listlength-help.pd deleted file mode 100644 index f5693914..00000000 --- a/externals/gridflow/doc/flow_classes/listlength-help.pd +++ /dev/null @@ -1,52 +0,0 @@ -#N canvas 687 0 504 509 10; -#X obj 1 273 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 10 218 LIST; -#X obj 1 168 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 191 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 215 275 Outlets (1); -#X obj 2 353 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 294 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 398 1 GridFlow 0.8.4; -#X text 2 192 Inlet 0; -#X text 2 295 Outlet 0; -#X obj 1 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 10 0 listlength; -#X text 398 2 GridFlow 0.8.4; -#X text 8 26 The [listlength] outputs the number of elements in the -incoming list.; -#X text 221 169 Inlets (1); -#X text 61 320 Outputs the number of elements in the list.; -#X text 9 380 No argument; -#X text 211 354 Arguments (0); -#X text 9 380 No argument; -#X obj 3 411 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 219 412 See also; -#X obj 10 445 listappend; -#X obj 99 445 listelement; -#X obj 198 446 listfind; -#X obj 291 446 listflatten; -#X obj 11 472 listmake; -#X obj 99 471 listprepend; -#X obj 199 472 listreverse; -#X obj 292 472 listsublist; -#X floatatom 206 142 5 0 0 0 - - -; -#X obj 139 140 print; -#X msg 139 63 1 3 hello 8 13; -#X obj 139 102 cnv 15 73 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 139 102 listlength; -#X msg 246 78 1 12 a b c d e f g h i j k l; -#X text 58 218 The length of the list passed to the left inlet will -be returned in the outlet.; -#X text 8 319 INT; -#X connect 31 0 33 0; -#X connect 33 0 29 0; -#X connect 33 0 30 0; -#X connect 34 0 33 0; diff --git a/externals/gridflow/doc/flow_classes/listprepend-help.pd b/externals/gridflow/doc/flow_classes/listprepend-help.pd deleted file mode 100644 index d02f9d69..00000000 --- a/externals/gridflow/doc/flow_classes/listprepend-help.pd +++ /dev/null @@ -1,59 +0,0 @@ -#N canvas 631 0 507 568 10; -#X obj 1 334 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 10 235 LIST; -#X obj 1 185 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 208 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 215 336 Outlets (1); -#X obj 2 414 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 355 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 398 1 GridFlow 0.8.4; -#X text 2 209 Inlet 0; -#X text 2 356 Outlet 0; -#X obj 1 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 3 472 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 219 473 See also; -#X obj 10 506 listappend; -#X obj 99 506 listelement; -#X obj 198 507 listfind; -#X obj 291 507 listflatten; -#X obj 11 533 listmake; -#X obj 99 532 listprepend; -#X obj 199 533 listreverse; -#X obj 292 533 listsublist; -#X msg 80 87 1 3 hello 8 13; -#X obj 78 131 cnv 15 178 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X msg 248 85 1 12 a b c d e f g h i j k l; -#X obj 81 155 display; -#X obj 2 271 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 3 273 Inlet 1; -#X text 8 380 LIST; -#X obj 10 0 listprepend; -#X msg 257 106 200 201 202 203 204 205 206; -#X obj 80 132 listprepend 1 2 3 4 5 6 7; -#X text 66 235 Accepts a list to be appended to initial list.; -#X text 9 297 LIST; -#X text 64 297 Accepts initial list to be appended to.; -#X text 221 186 Inlets (2); -#X text 65 381 Outputs the resulting list.; -#X text 213 413 Arguments (n); -#X text 7 441 ANY; -#X text 62 442 This optional argument can contain the initial list -; -#X text 8 25 The [listprepend] combines two lists together. It takes -the initial list (List1)(passed as an argument or to inlet 1) and appends -the list passed to inlet 0 (List0). [listprepend] combines List1 followed -by List0 in a new list.; -#X text 398 2 GridFlow 0.9.0; -#X connect 21 0 30 0; -#X connect 23 0 30 1; -#X connect 29 0 30 1; -#X connect 30 0 24 0; diff --git a/externals/gridflow/doc/flow_classes/listsublist-help.pd b/externals/gridflow/doc/flow_classes/listsublist-help.pd deleted file mode 100644 index 3ad88017..00000000 --- a/externals/gridflow/doc/flow_classes/listsublist-help.pd +++ /dev/null @@ -1,64 +0,0 @@ -#N canvas 630 27 508 642 10; -#X obj 1 433 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 10 255 LIST; -#X obj 1 205 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 228 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 215 435 Outlets (1); -#X obj 2 513 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 454 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 398 1 GridFlow 0.8.4; -#X text 2 229 Inlet 0; -#X text 2 455 Outlet 0; -#X obj 1 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 3 571 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 219 572 See also; -#X obj 10 605 listappend; -#X obj 99 605 listelement; -#X obj 198 606 listfind; -#X obj 291 606 listflatten; -#X obj 11 630 listmake; -#X obj 99 629 listprepend; -#X obj 199 630 listreverse; -#X obj 292 630 listsublist; -#X msg 153 89 1 3 hello 8 13; -#X obj 153 153 cnv 15 57 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X msg 162 113 1 12 a b c d e f g h i j k l; -#X obj 154 177 display; -#X obj 2 283 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 3 285 Inlet 1; -#X text 3 314 INTEGER; -#X text 65 255 Accepts a list.; -#X text 65 314 The index in the list to start the sublist at.; -#X obj 1 346 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 2 373 INTEGER; -#X text 2 348 Inlet 2; -#X text 66 373 The number of items wanted from the list starting at -the index specified.; -#X text 212 513 Arguments (2); -#X text 8 479 LIST; -#X text 64 480 Outputs the sublist as specified by the inlets or the -arguments.; -#X text 6 538 Integers specifying index and length of the sublist; -#X text 9 23 The [listsublist] outputs consecutive elements of the -list \, as selected by index (inlet 1 or arg 1) and length (inlet 2 -or arg 2). A negative index will start from the end of the list (like --1 means last element in the list).; -#X floatatom 204 135 5 0 0 0 - - -; -#X text 398 2 GridFlow 0.9.0; -#X text 221 206 Inlets (3); -#X obj 153 153 listmake; -#X obj 3 -1 listmake; -#X connect 21 0 42 0; -#X connect 23 0 42 0; -#X connect 39 0 42 1; -#X connect 42 0 24 0; 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/mysql-help.pd b/externals/gridflow/doc/flow_classes/mysql-help.pd deleted file mode 100644 index 0c46ef08..00000000 --- a/externals/gridflow/doc/flow_classes/mysql-help.pd +++ /dev/null @@ -1,22 +0,0 @@ -#N canvas 0 0 558 326 10; -#X obj 39 218 mysql; -#X obj 52 278 rubyprint; -#X msg 66 159 symbol test; -#X obj 70 252 print mysql; -#X msg 39 91 connect server_url mysql_user some_password database_name -; -#X msg 53 121 query select thing from some_table; -#X msg 162 143 query select * from some_table order by rand() limit -1; -#X msg 60 187 query insert into some_table (something) values (' \$1 -'); -#X text 39 26 http://tmtm.org/en/mysql; -#X text 37 9 [mysql] requires mysql-ruby from Tomita Masahiro; -#X text 39 43 no recompiling required \; -); -#X connect 0 0 1 0; -#X connect 0 0 3 0; -#X connect 2 0 7 0; -#X connect 4 0 0 0; -#X connect 5 0 0 0; -#X connect 6 0 0 0; -#X connect 7 0 0 0; diff --git a/externals/gridflow/doc/flow_classes/parallel_port-help.pd b/externals/gridflow/doc/flow_classes/parallel_port-help.pd deleted file mode 100644 index d871515d..00000000 --- a/externals/gridflow/doc/flow_classes/parallel_port-help.pd +++ /dev/null @@ -1,78 +0,0 @@ -#N canvas 0 27 742 490 10; -#X floatatom 47 380 5 0 0 0 - - -; -#X floatatom 121 348 5 0 0 0 - - -; -#X floatatom 196 323 5 0 0 0 - - -; -#X obj 47 34 tgl 15 0 empty empty empty 17 7 0 10 -24198 -1 -1 0 1 -; -#X text 420 278 * my system resets the owner of the printer port to -'root.lp' so I need to issue as root 'chown myuser.lp'; -#X text 421 37 * you will need : a paper clip (or a 'high tech' solid -core 22-18 awg wire) an led a button; -#X text 422 238 * consult http://en.wikipedia.org/wiki/Parallel_Port -for the pinouts + more; -#X text 425 357 7 6 5 4 3 2 1 0 bit number; -#X text 425 371 9 8 7 6 5 4 3 2 pin number; -#X text 424 331 layout of bit to pin numbers; -#X text 67 33 <-- This will send a 0 or a 1 to the first pin; -#X text 421 145 2 connect the led between pins 2 (Data0) and 23 (GND) -; -#X text 421 87 1 break the paper clip in two and connect pin 11 (Busy) -to pin 24 (GND) and pin 12 (Paper-Out) to 25 (GND). Those pins are -normally 1 and grounding them opens the port for messages.; -#X text 113 228 Will accept values from 0-255; -#X obj 1 -37 cnv 15 840 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 722 -36 GridFlow 0.9.0; -#X obj 47 132 tgl 15 0 empty empty empty 0 -6 0 8 -260818 -1 -1 0 1 -; -#X obj 69 132 tgl 15 0 empty empty empty 0 -6 0 8 -260818 -1 -1 0 1 -; -#X obj 91 132 tgl 15 0 empty empty empty 0 -6 0 8 -260818 -1 -1 0 1 -; -#X obj 113 132 tgl 15 0 empty empty empty 0 -6 0 8 -260818 -1 -1 0 -1; -#X obj 136 132 tgl 15 0 empty empty empty 0 -6 0 8 -260818 -1 -1 0 -1; -#X obj 158 132 tgl 15 0 empty empty empty 0 -6 0 8 -260818 -1 -1 0 -1; -#X obj 180 132 tgl 15 0 empty empty empty 0 -6 0 8 -260818 -1 -1 0 -1; -#X obj 203 132 tgl 15 0 empty empty empty 0 -6 0 8 -260818 -1 -1 0 -1; -#X obj 47 229 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 --241291 -1 -1 0 256; -#X obj 47 191 #fold +; -#X obj 47 210 #export; -#X obj 47 172 # << (0 1 2 3 4 5 6 7); -#X obj 47 153 #pack 8 \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, -\,; -#X text 206 293 takes the port as argument; -#X text 93 379 <-- reserved for future use; -#X text 44 -1 The cheapest digital i/o interface; -#X text 238 322 <-- parallel port flags; -#X text 419 188 3 connect a button between pin 10 and 22 (GND); -#X text 163 348 <-- status (pin 10); -#X obj 47 293 parallel_port /dev/lp0; -#X obj 47 63 metro 1; -#X text 425 402 Flags : PERRORP (active low) \, PSELECD (active high) -\, POUTPA (active high) \, PACK (active low) \, PBUSY (active high) -; -#X obj 11 -37 parallel_port /dev/someport; -#X connect 3 0 36 0; -#X connect 16 0 28 0; -#X connect 17 0 28 1; -#X connect 18 0 28 2; -#X connect 19 0 28 3; -#X connect 20 0 28 4; -#X connect 21 0 28 5; -#X connect 22 0 28 6; -#X connect 23 0 28 7; -#X connect 24 0 35 0; -#X connect 25 0 26 0; -#X connect 26 0 24 0; -#X connect 27 0 25 0; -#X connect 28 0 27 0; -#X connect 35 0 0 0; -#X connect 35 1 1 0; -#X connect 35 2 2 0; -#X connect 36 0 16 0; 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/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/route2-help.pd b/externals/gridflow/doc/flow_classes/route2-help.pd deleted file mode 100644 index 40f4debf..00000000 --- a/externals/gridflow/doc/flow_classes/route2-help.pd +++ /dev/null @@ -1,21 +0,0 @@ -#N canvas 0 0 450 300 10; -#X obj 21 140 route2 blah foo bar; -#X msg 39 39 blah blah blah; -#X msg 39 62 foo 42; -#X msg 39 86 bar 3.14159; -#X obj 150 160 display; -#X obj 107 180 display; -#X obj 64 200 display; -#X obj 22 220 display; -#X msg 39 114 pas rapport; -#X text 186 29 just like [route]; -#X text 187 46 but preserves message as-is; -#X text 325 7 GridFlow 0.8.4; -#X connect 0 0 7 0; -#X connect 0 1 6 0; -#X connect 0 2 5 0; -#X connect 0 3 4 0; -#X connect 1 0 0 0; -#X connect 2 0 0 0; -#X connect 3 0 0 0; -#X connect 8 0 0 0; diff --git a/externals/gridflow/doc/flow_classes/seq_fold-help.pd b/externals/gridflow/doc/flow_classes/seq_fold-help.pd deleted file mode 100644 index 6870ac56..00000000 --- a/externals/gridflow/doc/flow_classes/seq_fold-help.pd +++ /dev/null @@ -1,13 +0,0 @@ -#N canvas 679 317 400 300 10; -#X obj 125 166 seq_fold; -#X msg 125 65 2 \, 3 \, 5 \, 7 \, end; -#X obj 125 93 route end; -#X obj 150 190 +; -#X obj 126 239 display; -#X connect 0 0 4 0; -#X connect 0 1 3 0; -#X connect 0 2 3 1; -#X connect 1 0 2 0; -#X connect 2 0 0 0; -#X connect 2 1 0 1; -#X connect 3 0 0 3; diff --git a/externals/gridflow/doc/flow_classes/shunt-help.pd b/externals/gridflow/doc/flow_classes/shunt-help.pd deleted file mode 100644 index 7826ff2e..00000000 --- a/externals/gridflow/doc/flow_classes/shunt-help.pd +++ /dev/null @@ -1,58 +0,0 @@ -#N canvas 76 32 504 500 10; -#X obj 1 331 cnv 15 500 17 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 181 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 204 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 412 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 210 411 Arguments (1); -#X obj 1 271 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 1 352 cnv 15 60 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 2 205 Inlet 0; -#X text 2 272 Inlet 1; -#X text 221 182 Inlets (2); -#X obj -1 0 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 10 0 shunt; -#X obj 165 117 cnv 15 52 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 166 117 shunt 4; -#X floatatom 121 151 5 0 0 0 - - -; -#X floatatom 163 151 5 0 0 0 - - -; -#X floatatom 205 151 5 0 0 0 - - -; -#X floatatom 247 151 5 0 0 0 - - -; -#X floatatom 166 85 5 0 0 0 - - -; -#X obj 210 85 hradio 15 1 0 4 empty empty empty 0 -6 0 8 -260818 -1 --1 0; -#X text 272 84 <-- select output here; -#X text 65 84 vary this -->; -#X obj 346 119 shunt; -#X text 63 295 The integer passed to inlet 1 determines which outlet -is active.; -#X text 6 229 ANY; -#X text 61 229 Incoming message can be Grids \, Symbols \, Integers -\, Lists \, etc.; -#X text 65 439 [shunt] accepts an integer as a creation argument which -defines the number of outlets desired. If [shunt] is created without -an argument \, it will have 2 outlets.; -#X text 215 333 Outlets (n); -#X text 2 353 Outlets; -#X text 10 380 ANY; -#X text 64 380 Outputs incoming message value according to the selector -value.; -#X text 6 295 INTEGER; -#X text 10 438 INTEGER; -#X text 7 29 The [shunt] routes any type of data to its active outlet. -The number of outlets is defined by the argument at creation and the -active outlet is defined by its right most inlet.; -#X text 398 2 GridFlow 0.9.0; -#X connect 13 0 14 0; -#X connect 13 1 15 0; -#X connect 13 2 16 0; -#X connect 13 3 17 0; -#X connect 18 0 13 0; -#X connect 19 0 13 1; 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/format.html b/externals/gridflow/doc/format.html deleted file mode 100644 index 3dd3a830..00000000 --- a/externals/gridflow/doc/format.html +++ /dev/null @@ -1,511 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html><head><!-- $Id: format.html 3732 2008-06-02 14:30:54Z matju $ --> - - -<title>GridFlow 0.9.3 - 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 leftmargin="0" topmargin="0" style="background-color: rgb(255, 255, 255);" marginheight="0" marginwidth="0"> -<table width="100%" cellspacing="10"><tr><td> -<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr> - <td> <img src="images/header1.png" alt="GridFlow" width="384" height="64"></td> - <td width="100%"><img src="images/header2.png" alt="GridFlow" width="100%" height="64"></td> - <td> <img src="images/header3.png" alt="GridFlow" width="32" height="64"></td> -</table> -</td></tr></table> -<blockquote> - - -<table bgcolor="white" border="0" cellspacing="2" width="100%"> - -<tr><td colspan="4" bgcolor="black"> -<img src="images/black.png" height="2" width="1"></td></tr> -<tr><td colspan="4" height="16"> - - <h4>GridFlow 0.9.3 - Reference Manual: Format Classes</h4> -</td></tr> -<tr> - <td rowspan="2" width="5%"> </td> - <td height="23" width="15%"> </td> - <td height="23" width="80%"> </td> - <td height="23" width="5%"> </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">#in -</a></li> -<li><a href="##out">#out -</a></li> -<li><a href="##peephole">#peephole -</a></li> -<li><a href="##mouse">#mouse -</a></li> -<li><a href="##camera">#camera -</a></li> -</ul> -<h4><a href="#Picture/Movie_Formats">Picture/Movie Formats</a></h4><ul> -<li><a href="#format%20ppm%20#in/#out">format ppm #in/#out -</a></li> -<li><a href="#format%20targa%20#in/#out">format targa #in/#out -</a></li> -<li><a href="#format%20jpeg%20#in/#out">format jpeg #in/#out -</a></li> -<li><a href="#format%20png%20#in">format png #in -</a></li> -<li><a href="#format%20quicktime%20#in/#out">format quicktime #in/#out -</a></li> -<li><a href="#format%20mpeg%20#in">format mpeg #in -</a></li> -<li><a href="#format%20grid%20#in/#out">format grid #in/#out -</a></li> -</ul> -<h4><a href="#Acquisition_Devices">Acquisition Devices</a></h4><ul> -<li><a href="#format%20videodev%20#in">format videodev #in -</a></li> -</ul> -<h4><a href="#Window_Output">Window Output</a></h4><ul> -<li><a href="#format%20x11%20#in/#out">format x11 #in/#out -</a></li> -<li><a href="#format%20quartz%20#out">format quartz #out -</a></li> -<li><a href="#format%20sdl%20#out">format sdl #out -</a></li> -<li><a href="#format%20aalib%20#out">format aalib #out -</a></li> -<li><a href="#format%20window%20#out">format window #out -</a></li> -</ul> -<br><br> -</div></td></tr> <tr><td colspan="4" bgcolor="black"> -<img src="images/black.png" height="2" width="1"></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> class </b><a name="#in">#in</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> 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 0 </b><b>method</b> 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 0 </b><b>method</b> 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 0 </b><b>method</b> 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 0 </b><b>method</b> 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 0 </b><b>method</b> 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 0 </b><b>method</b> 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 0 </b><b>method</b> option <b>(</b><i>symbol</i> selector<b>, </b>stuff...<b>)</b> - Obsolete. the word "option" is optional now. <br> - <br><b>inlet 0 </b><b>method</b> rewind <b>(</b><b>)</b> - rewinds to beginning of file if applicable. <br> - <br><b>inlet 0 </b><b>method</b> loop <b>(</b><i>bool</i> flag<b>)</b> - controls the automatic looping of movies. <br> - <br><b>outlet 1 </b><b>method</b> int <b>(</b><b>)</b> - frame number of frame just sent, - for formats that have frame numbers. <br> - <br><b>outlet 1 </b><b>method</b> 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> class </b><a name="#out">#out</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> 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> 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 0 </b><b>method</b> 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 0 </b><b>method</b> 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 0 </b><b>method</b> 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 0 </b><b>method</b> 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 0 </b><b>method</b> close <b>(</b><b>)</b> - closes the file. usually not necessary. <br> - <br><b>inlet 0 </b><b>method</b> option <b>(</b><i>symbol</i> selector<b>, </b>stuff...<b>)</b> - Obsolete. Omit the word "option" now. <br> - <br><b>inlet 0 </b><b>method</b> 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 0 </b><b>method</b> rewind <b>(</b><b>)</b> - rewinds to beginning of file if applicable. - will overwrite the previous data. <br> - <br><b>outlet 0 </b><b>method</b> 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> class </b><a name="#peephole">#peephole</a></td></tr><tr><td></td><td valign="top"><br> -<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> 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> class </b><a name="#mouse">#mouse</a></td></tr><tr><td></td><td valign="top"><br> -<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 0 </b><b>method</b> list <b>(</b><b>)</b> - y,x coords of a click <br> - <br><b>outlet 1 </b><b>method</b> list <b>(</b><b>)</b> - y,x coords of a drag (any button is kept pressed) <br> - <br><b>outlet 2 </b><b>method</b> list <b>(</b><b>)</b> - y,x coords of an unclick <br> - <br><b>outlet 3 </b><b>method</b> list <b>(</b><b>)</b> - y,x coords of a move (no button is pressed) <br> - <br><b>outlet 4 </b><b>method</b> float <b>(</b><b>)</b> button 1 status<br> - <br><b>outlet 5 </b><b>method</b> float <b>(</b><b>)</b> button 2 status<br> - <br><b>outlet 6 </b><b>method</b> float <b>(</b><b>)</b> button 3 status<br> - <br><b>outlet 7 </b><b>method</b> 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> class </b><a name="#camera">#camera</a></td></tr><tr><td></td><td valign="top"><br> -<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> </td></tr> - <tr><td colspan="4" bgcolor="black"> -<img src="images/black.png" height="2" width="1"></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> class </b><a name="format ppm #in/#out">format ppm #in/#out</a></td></tr><tr><td></td><td valign="top"><br> -<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> 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> open ppm gzfile <b>(</b><i>symbol</i> filename<b>)</b> - same but for .ppm.gz files <br> - <br><b>method</b> 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> class </b><a name="format targa #in/#out">format targa #in/#out</a></td></tr><tr><td></td><td valign="top"><br> -<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> 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> open targa gzfile <b>(</b><i>symbol</i> filename<b>)</b> - same but for .tga.gz files <br> - <br><b>method</b> grid <b>(</b><i>grid(rows columns 3)</i> grid<b>)</b> RGB-24<br> - <br><b>method</b> 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> class </b><a name="format jpeg #in/#out">format jpeg #in/#out</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <p>Support for RGB non-progressive</p> <br><b>method</b> 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> 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> class </b><a name="format png #in">format png #in</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <p>Support for RGB non-progressive</p> <br><b>method</b> 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> grid <b>(</b><i>grid(rows columns 1)</i> grid<b>)</b> Y-8 (greyscale)<br> - <br><b>method</b> grid <b>(</b><i>grid(rows columns 2)</i> grid<b>)</b> YA-16 (greyscale and transparency)<br> - <br><b>method</b> grid <b>(</b><i>grid(rows columns 3)</i> grid<b>)</b> RGB-24 (colour)<br> - <br><b>method</b> 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> class </b><a name="format quicktime #in/#out">format quicktime #in/#out</a></td></tr><tr><td></td><td valign="top"><br> -<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> open quicktime file <b>(</b><i>symbol</i> filename<b>)</b> <br> - <br><b>method</b> 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> 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> 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> 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> 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> 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> class </b><a name="format mpeg #in">format mpeg #in</a></td></tr><tr><td></td><td valign="top"><br> -<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> 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> class </b><a name="format grid #in/#out">format grid #in/#out</a></td></tr><tr><td></td><td valign="top"><br> -<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> 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> open grid gzfile <b>(</b><i>symbol</i> filename<b>)</b> - same but for .grid.gz files <br> - <br><b>method</b> 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> 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> type int32 <b>(</b><b>)</b> - output will be as 32 bit signed integers. <br> - <br><b>method</b> type uint8 <b>(</b><b>)</b> - output will be as 8 bit unsigned integers. <br> - <br><b>method</b> headerful <b>(</b><b>)</b> - cancels "headerless" (and back to reading .grid) <br> - <br><b>method</b> 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> endian <b>(</b><b>)</b> </p><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></p> <br></td></tr><tr><td></td><td></td><td> </td></tr> -<tr><td> </td></tr> - <tr><td colspan="4" bgcolor="black"> -<img src="images/black.png" height="2" width="1"></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> class </b><a name="format videodev #in">format videodev #in</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> 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> brightness <b>(</b><i>0-65535</i> level<b>)</b> <br> - <br><b>method</b> hue <b>(</b><i>0-65535</i> level<b>)</b> <br> - <br><b>method</b> colour <b>(</b><i>0-65535</i> level<b>)</b> <br> - <br><b>method</b> contrast <b>(</b><i>0-65535</i> level<b>)</b> <br> - <br><b>method</b> whiteness <b>(</b><i>0-65535</i> level<b>)</b> <br> - </p> <br><b>method</b> 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> get <b>(</b><b>)</b> - gets all attributes. <br> - <p>other options: <br><b>method</b> channel <b>(</b><i>integer</i> <b>)</b> <br> - <br><b>method</b> tuner <b>(</b><i>integer</i> <b>)</b> <br> - <br><b>method</b> norm <b>(</b><i>integer</i> <b>)</b> <br> - <br><b>method</b> frequency <b>(</b><i>integer</i> <b>)</b> <br> - <br><b>method</b> transfer <b>(</b><i>symbol(read|mmap)</i> <b>, </b><i>integer</i> <b>)</b> </p><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> 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> size <b>(</b>height<b>, </b>width<b>)</b> - sets the input size, especially when using a video digitalizer - device. <br> - <p></p> <br></td></tr><tr><td></td><td></td><td> </td></tr> -<tr><td> </td></tr> - <tr><td colspan="4" bgcolor="black"> -<img src="images/black.png" height="2" width="1"></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> class </b><a name="format x11 #in/#out">format x11 #in/#out</a></td></tr><tr><td></td><td valign="top"><br> -<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> open x11 <b>(</b><b>)</b> - synonym of "open x11 here". <br> - <br><b>method</b> open x11 here <b>(</b><b>)</b> - connects to the default X11 server, - according to your environment variable "DISPLAY". <br> - <br><b>method</b> 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> 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> 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 > 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> 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> draw <b>(</b><b>)</b> - forces a redraw of the window's contents. <br> - <br><b>method</b> 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> 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> hidecursor <b>(</b><b>)</b> - This makes the cursor invisible. <br> - <br><b>outlet 0 </b><b>method</b> 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 [>> - buttonnumber] and then checking whether the result is odd. - Button numbers normally are: </p><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> <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 0 </b><b>method</b> 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 0 </b><b>method</b> 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> class </b><a name="format quartz #out">format quartz #out</a></td></tr><tr><td></td><td valign="top"><br> -<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> open <b>(</b><b>)</b> - opens a dim(240,320,3) rgb window (default). <br> - <br><b>method</b> 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> class </b><a name="format sdl #out">format sdl #out</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> open <b>(</b><b>)</b> - Opens a dim(240,320,3) rgb window (default). <br> - <br><b>method</b> 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> class </b><a name="format aalib #out">format aalib #out</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> open aalib <b>(</b>driver<b>, </b>args...<b>)</b> <br> - <br><b>method</b> 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> 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> 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> autodraw <b>(</b><b>)</b> - like X11's autodraw. <br> - <br><b>method</b> draw <b>(</b><b>)</b> - like X11's draw. <br> - <br><b>method</b> 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> class </b><a name="format window #out">format window #out</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> 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> </td></tr> - <tr><td colspan="4" bgcolor="black"> -<img src="images/black.png" height="2" width="1"></td></tr> -<tr><td colspan="4"> -<p><font size="-1"> -GridFlow 0.9.3 Documentation<br> -Copyright © 2001-2007 by Mathieu Bouchard -<a href="mailto:matju@artengine.ca">matju@artengine.ca</a> -</font></p> -</td></tr></tbody></table></body></html> diff --git a/externals/gridflow/doc/format.xml b/externals/gridflow/doc/format.xml deleted file mode 100644 index 78a398e1..00000000 --- a/externals/gridflow/doc/format.xml +++ /dev/null @@ -1,714 +0,0 @@ -<?xml version="1.0" standalone="no" ?> -<documentation title="Reference Manual: Format Classes"> -<!-- $Id: format.xml 3559 2008-04-16 20:29:00Z matju $ --> -<!-- - 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"> - <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"> - <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> - <method name="autoclose"> - ... - </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"> - <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 jpeg #in/#out"> - <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"> - <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"> - <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"> - <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="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"> - <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"> - <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 > 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="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 [>> - 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/gridflow.css b/externals/gridflow/doc/gridflow.css deleted file mode 100644 index 4109bedd..00000000 --- a/externals/gridflow/doc/gridflow.css +++ /dev/null @@ -1,18 +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;} -H4 {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:11px; background-color: #FFFFFF; line-spacing: 20} -. {font-family: Arial, Helvetica, sans-serif;} -dt {font-weight: bold; color: #006699} -kbd {color:#000000; font-weight:bold; background:#dddddd} -ol.foo {color:#ff0000} -ol.foo li {color:#ffff00} -.c1 {background:#f0f8ff} -.c2 {background:#e0f0ff} -.c3 {background:#cccccc; color:#ff0000}
\ No newline at end of file diff --git a/externals/gridflow/doc/images/black.png b/externals/gridflow/doc/images/black.png Binary files differdeleted file mode 100644 index 1597ca71..00000000 --- a/externals/gridflow/doc/images/black.png +++ /dev/null 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/header1.png b/externals/gridflow/doc/images/header1.png Binary files differdeleted file mode 100644 index ad7c13c5..00000000 --- a/externals/gridflow/doc/images/header1.png +++ /dev/null diff --git a/externals/gridflow/doc/images/header1.xcf b/externals/gridflow/doc/images/header1.xcf Binary files differdeleted file mode 100644 index d114ef28..00000000 --- a/externals/gridflow/doc/images/header1.xcf +++ /dev/null diff --git a/externals/gridflow/doc/images/header2.png b/externals/gridflow/doc/images/header2.png Binary files differdeleted file mode 100644 index cf303b35..00000000 --- a/externals/gridflow/doc/images/header2.png +++ /dev/null diff --git a/externals/gridflow/doc/images/header3.png b/externals/gridflow/doc/images/header3.png Binary files differdeleted file mode 100644 index 8cfcccca..00000000 --- a/externals/gridflow/doc/images/header3.png +++ /dev/null diff --git a/externals/gridflow/doc/images/pingpong.png b/externals/gridflow/doc/images/pingpong.png Binary files differdeleted file mode 100644 index 6fb6e58a..00000000 --- a/externals/gridflow/doc/images/pingpong.png +++ /dev/null diff --git a/externals/gridflow/doc/images/see_screenshot.png b/externals/gridflow/doc/images/see_screenshot.png Binary files differdeleted file mode 100644 index ec3297b9..00000000 --- a/externals/gridflow/doc/images/see_screenshot.png +++ /dev/null diff --git a/externals/gridflow/doc/images/titre_gridflow.png b/externals/gridflow/doc/images/titre_gridflow.png Binary files differdeleted file mode 100644 index 50e072d2..00000000 --- a/externals/gridflow/doc/images/titre_gridflow.png +++ /dev/null diff --git a/externals/gridflow/doc/index.html b/externals/gridflow/doc/index.html deleted file mode 100644 index a5b1c71c..00000000 --- a/externals/gridflow/doc/index.html +++ /dev/null @@ -1,73 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html><head><title>GridFlow 0.9.3</title> - -<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> -<link rel="stylesheet" href="gridflow.css" type="text/css"> -</head> -<body leftmargin="0" topmargin="0" style="background-color: rgb(255, 255, 255);" marginheight="0" marginwidth="0"> -<table width="100%" cellspacing="10"><tr><td> -<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr> - <td> <img src="images/header1.png" alt="GridFlow" width="384" height="64"></td> - <td width="100%"><img src="images/header2.png" alt="GridFlow" width="100%" height="64"></td> - <td> <img src="images/header3.png" alt="GridFlow" width="32" height="64"></td> -</table> -</td></tr></table> -<blockquote> -<p class="text"><b> a multi-dimensional dataflow processing library for PureData, specialized in image and video</b></p> - -<table border="0" cellspacing="5" width="100%"> -<tr><td colspan="4" bgcolor="black"><img src="images/black.png" height="2" width="1"></td></tr> -<tr><td colspan="3" height="16"><h4>GridFlow 0.9.3 - documentation index</h4></td></tr> -<tr><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> -</ul></td></tr> -<tr><td colspan="4" bgcolor="black"><img src="images/black.png" height="2" width="1"></td></tr> -<tr><td colspan="4"><h4>GridFlow On The Net</h4></td></tr> -<tr><td><ul> - <p><a href="http://gridflow.ca/gallery/">Screenshots!</a></p> - <p><a href="http://gridflow.ca/svn/trunk/doc/index.html">GridFlow Online Manual (from SVN)</a></p> - <p><a href="http://gridflow.ca/svn/trunk/">Browse GridFlow source code online (from SVN)</a></p> - <p><a href="http://gridflow.ca/download/">Download GridFlow and related files</a></p> - <p>Mailing Lists (Subscription and Archives): <ul> - <li><a href="http://lists.artengine.ca/mailman/listinfo/gridflow-dev"> - <kbd>gridflow-dev</kbd>: GridFlow Contributors</a></li> - <li><a href="http://lists.artengine.ca/mailman/listinfo/gridflow-cvs"> - <kbd>gridflow-cvs</kbd>: GridFlow CVS Reports</a></li> - <li><a href="http://lists.artengine.ca/mailman/listinfo/pdmtl"> - <kbd>pdmtl</kbd>: PureData Montréal Users Group</a></li> - </ul></p> - <p><a href="http://www.puredata.org">PureData Community Site</a></p> - <p>Join us in the <kbd>#dataflow</kbd> chatroom at <kbd>irc.freenode.net</kbd> port <kbd>6667</kbd></p> -</ul></td></tr> -<tr><td colspan="4" bgcolor="black"><img src="images/black.png" height="2" width="1"></td></tr> -<tr><td colspan="4"><h4>Credits</h4></td></tr> -<tr><td><blockquote> -C++ Programming : Mathieu Bouchard<br> -Pd Programming : Mathieu Bouchard<br> -Pd Examples : Mathieu Bouchard, Alexandre Castonguay<br> -MacOS 10 version : Mathieu Bouchard, James Tittle, Adam Lindsay<br> -</blockquote></td></tr> -<tr><td colspan="4" bgcolor="black"><img src="images/black.png" height="2" width="1"></td></tr> -<tr><td colspan="4"><h4>Sponsors</h4></td></tr> -<td><blockquote> -<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><br>Development of GridFlow 0.9.0 was made possible in part by Alexandre Castonguay's -cooking</p> -</blockquote></td></tr> -<tr><td colspan="4" bgcolor="black"><img src="images/black.png" height="2" width="1"></td></tr> -<tr><td colspan="4"><p><font size="-1">GridFlow 0.9.3 Documentation<br> -by Mathieu Bouchard <a href="mailto:matju@artengine.ca">matju@artengine.ca</a> -and<br> -Alexandre Castonguay <a href="mailto:acastonguay@artengine.ca">acastonguay@artengine.ca</a></font></p> -</td> -</tr> -</table> -</blockquote> -</body></html> diff --git a/externals/gridflow/doc/index.pd b/externals/gridflow/doc/index.pd deleted file mode 100644 index acd0b9fa..00000000 --- a/externals/gridflow/doc/index.pd +++ /dev/null @@ -1,303 +0,0 @@ -#N canvas 0 0 640 480 10 ; -#X obj 157 50 # +; -#X text 200 50 plain numeric operators on grids: + - * / etc; -#X obj -11 82 #apply_colormap_channelwise; -#X text 200 82 apply color correction tables separately on each channel; -#X obj 59 114 #background_model; -#X text 200 114 make mask from learning to distinguish background from foreground; -#X obj 129 146 #border; -#X text 200 146 add padding on sides of a grid; -#X obj 129 178 #camera; -#X text 200 178 control panel for opening cameras; -#X obj 129 210 #cast i; -#X text 200 210 convert grid from one number type to another; -#X obj 115 242 #centroid; -#X text 200 242 find centroid (weighted average) of the coordinates of a grid; -#X obj 129 274 #change; -#X text 200 274 send grid only if different from previous grid; -#X obj 115 306 #checkers; -#X text 200 306 make image of chequered background in two tones of grey; -#X obj 143 338 #clip; -#X text 200 338 min and max; -#X obj 24 370 #color; -#X text 200 370 GUI for selecting a colour; -#X obj 115 442 #contrast; -#X text 200 442 adjust contrast in two different ways; -#X obj 115 474 #convolve; -#X text 200 474 compute convolution product of a grid (blur and edge-detection); -#X obj 150 506 #dim; -#X text 200 506 get the size (dimensions) of a grid; -#X obj 87 538 #downscale_by; -#X text 200 538 reduce the size of an image by a whole factor; -#X obj 101 570 #draw_image; -#X text 200 570 picture-in-picture; -#X obj 94 602 #draw_points; -#X text 200 602 (future use); -#X obj 87 634 #draw_polygon; -#X text 200 634 draw polygon in an image; -#X obj 108 666 #draw_rect; -#X text 200 666 draw a rectangle in an image; -#X obj 94 698 #draw_slider; -#X text 200 698 draw a slider in an image; -#X obj 87 730 #edit_polygon; -#X text 200 730 draw a polygon in an image and react to mouse events; -#X obj 143 762 #fade; -#X text 200 762 fade in exponential-decay fashion (linear recurrence); -#X obj 115 794 #fade_lin; -#X text 200 794 fade in piecewise-linear fashion; -#X obj 115 826 #fastblur; -#X text 200 826 speedy shortcut for rectangular blur; -#X obj 150 858 #fft; -#X text 200 858 compute forward or inverse one-or-two-dimensional complex FFT of a grid; -#X obj 115 890 #finished; -#X text 200 890 bang when grid transmission has ended; -#X obj 129 922 #fold +; -#X text 200 922 compute the sum of each row \, product of each row, and other similar operations; -#X obj 108 954 #for 0 4 1; -#X text 200 954 make a grid from all numbers or coordinates in a certain range; -#X obj 115 986 #from_pix; -#X text 200 986 convert pix (GEM) to grid; -#X obj 136 1018 #gamma; -#X text 200 1018 apply gamma correction; -#X obj 136 1050 #grade; -#X text 200 1050 make an index of the sorting of a grid; -#X obj 59 1082 #greyscale_to_rgb; -#X text 200 1082 convert greyscale to RGB; -#X obj 136 1114 #hello; -#X text 200 1114 make 7 colour bars; -#X obj 115 1146 #hueshift; -#X text 200 1146 apply hue shift by rotating the color wheel; -#X obj 129 1178 #import; -#X text 200 1178 convert float \, list, or symbol ASCII codes, to a grid; -#X obj 101 1210 #import_pix; -#X text 200 1210 old name of #from_pix; -#X obj 157 1242 #in; -#X text 200 1242 open file or device for reading or download; -#X obj 136 1274 #inner; -#X text 200 1274 scalar ("dot") product \, matrix product, tensor contraction, image channel remapping, etc.; -#X obj 115 1306 #io.aalib; -#X text 200 1306 open an aalib window; -#X obj 108 1338 #io.dc1394; -#X text 200 1338 open a faiawaia "DC" camera (not DV) using a Linux-compatible OS; -#X obj 122 1370 #io.grid; -#X text 200 1370 read or write a .grid file (GridFlow storage format); -#X obj 122 1402 #io.jpeg; -#X text 200 1402 read or write a .jpeg file; -#X obj 122 1434 #io.mpeg; -#X text 200 1434 read a .mpeg video file; -#X obj 129 1466 #io.png; -#X text 200 1466 read a .png image file; -#X obj 129 1498 #io.ppm; -#X text 200 1498 read or write a .pbm or .pgm or .ppm image file; -#X obj 87 1530 #io.quicktime; -#X text 200 1530 read a .mov video file (or perhaps .avi); -#X obj 129 1562 #io.sdl; -#X text 200 1562 open a SDL window; -#X obj 94 1594 #io.videodev; -#X text 200 1594 open a V4L1 device (Linux interface for video cameras and video digitisers); -#X obj 129 1626 #io.x11; -#X text 200 1626 open a X11 window; -#X obj 115 1658 #labeling; -#X text 200 1658 tag connected pixels with region numbers in a two-tone single-channel image; -#X obj 136 1690 #layer; -#X text 200 1690 layer two same-sized images; -#X obj 66 1722 #line_to_polygon; -#X text 200 1722 convert line (as point pair) to polygon (rotated rectangle); -#X obj 101 1754 #make_cross; -#X text 200 1754 make cross-shaped polygon; -#X obj 129 1786 #moment; -#X text 200 1786 find 1st or 2nd order moment (weighted average or variance) of the coordinates of a grid; -#X obj 87 1818 #moment_polar; -#X text 200 1818 convert covariance matrix to the longest and shortest radius of an ellipse and a rotation angle; -#X obj 59 1850 #motion_detection; -#X text 200 1850 frame difference with some options; -#X obj 136 1882 #mouse; -#X text 200 1882 converts mouse events to reports of clicks \, drags, unclicks, motions, and separate buttons and wheel; -#X obj 66 1914 #noise_gate_yuvs; -#X text 200 1914 replaces dark pixels by black pixels in signed YUV images; -#X obj 150 1946 #out; -#X text 200 1946 open file or device for writing or upload; -#X obj 122 1978 #outer +; -#X text 200 1978 apply numeric operator on all possible combinations of elements of one grid with elements of another; -#X obj 143 2010 #pack; -#X text 200 2010 combine floats on separate inlets to make a grid; -#X obj 94 2042 #perspective; -#X text 200 2042 divide each point by its depth; -#X obj 87 2074 #polygon_area; -#X text 200 2074 find area of a polygon in square pixels; -#X obj 45 2106 #polygon_comparator; -#X text 200 2106 find similarity between two polygons independently of rotation \, by radial maps and FFT; -#X obj 52 2138 #polygon_each_edge; -#X text 200 2138 convert a polygon to a sequence of overlapping 2-sided polygons representing edges; -#X obj 73 2170 #polygon_moment; -#X text 200 2170 find average of all points inside of a polygon; -#X obj 52 2202 #polygon_perimetre; -#X text 200 2202 find perimetre of a polygon in pixels (euclidian); -#X obj 45 2234 #polygon_radial_map; -#X text 200 2234 find radius of a polygon from a given origin \, sampled at equally spaced angles; -#X obj 101 2266 #polygonize; -#X text 200 2266 (future use); -#X obj 108 2298 #posterize; -#X text 200 2298 quantise pixel values; -#X obj 136 2330 #print; -#X text 200 2330 print to console; -#X obj 136 2362 #ravel; -#X text 200 2362 do #redim so that a grid keeps same number of elements but just one dimension; -#X obj 129 2394 #record; -#X text 200 2394 wrapper around [#in quicktime]; -#X obj 115 2426 #redim (); -#X text 200 2426 change the size of a grid by restreaming contents into a new shape; -#X obj 94 2458 #remap_image; -#X text 200 2458 apply object chain on pixel positions to make new image from chosen pixels of the input image; -#X obj 122 2490 #reverse; -#X text 200 2490 mirror image of a grid along a dimension; -#X obj 59 2522 #rgb_to_greyscale; -#X text 200 2522 convert RGB to greyscale; -#X obj 94 2554 #rgb_to_rgba; -#X text 200 2554 convert RGB to RGBA (but setting alpha to 0); -#X obj 101 2586 #rgb_to_yuv; -#X text 200 2586 convert RGB to unsigned YUV; -#X obj 94 2618 #rgba_to_rgb; -#X text 200 2618 convert RGBA to RGB; -#X obj 129 2650 #rotate; -#X text 200 2650 rotate points through two axes (or rotate pixels as points in a colorspace); -#X obj 80 2682 #rotatificator; -#X text 200 2682 make rotation matrix for any two dimensions chosen from manyou; -#X obj 101 2714 #saturation; -#X text 200 2714 multiply chroma by some value; -#X obj 115 2746 #scale_by; -#X text 200 2746 reduce the size of an image by a whole factor; -#X obj 115 2778 #scale_to; -#X text 200 2778 scale an image from one size to any other size by deleting or duplicating rows and columns; -#X obj 129 2810 #scan +; -#X text 200 2810 compute the cumulative sums of each row \, and other similar operations; -#X obj 115 2842 #seq_fold; -#X text 200 2842 cascade the use of an object on all elements of an incoming grid message sequence; -#X obj 136 2874 #slice; -#X text 200 2874 crop an image using a start point (top left) and end point (bottom right); -#X obj 115 2906 #solarize; -#X text 200 2906 like pingpong but on all pixel values of a grid; -#X obj 143 2938 #sort; -#X text 200 2938 sort each row of a grid; -#X obj 129 2970 #spread; -#X text 200 2970 add noise to each vector (point or pixel); -#X obj 136 3002 #store; -#X text 200 3002 store image in RAM \, in-place picture-in-picture, and make lookups in various ways; -#X obj 143 3034 #swap; -#X text 200 3034 like [swap] for grids; -#X obj 157 3066 #t; -#X text 200 3066 like [t a a] for grids; -#X obj 80 3098 #text_to_image; -#X text 200 3098 use a fixed-width font grid to make a tiling of characters as specified by a text string; -#X obj 115 3130 #to_float; -#X text 200 3130 convert grid to sequence of floats; -#X obj 122 3162 #to_list; -#X text 200 3162 convert grid to list; -#X obj 101 3194 #to_literal; -#X text 200 3194 convert grid to grid-literal (list with a # sign); -#X obj 129 3226 #to_pix; -#X text 200 3226 convert grid to pix (GEM); -#X obj 108 3258 #to_symbol; -#X text 200 3258 convert grid of ASCII codes to symbol; -#X obj 108 3290 #transpose; -#X text 200 3290 swap two dimensions out of any \, in a grid; -#X obj 143 3322 #type; -#X text 200 3322 get a symbol representing the number type of a grid; -#X obj 129 3354 #unpack; -#X text 200 3354 split a grid into floats on separate outlets; -#X obj 129 3386 #window; -#X text 200 3386 a [#out window] that can be toggled to appear and disappear; -#X obj 101 3418 #yuv_to_rgb; -#X text 200 3418 convert unsigned YUV to RGB; -#X obj 143 3450 @join; -#X text 200 3450 join two grids together along any dimension; -#X obj 150 3482 args; -#X text 200 3482 pick up the arguments of an abstraction instance \, including nested lists and init-messages; -#X obj 143 3514 ascii; -#X text 200 3514 write integer as decimal in ascii codes; -#X obj 108 3546 ascii_to_f; -#X text 200 3546 converts a list of ascii codes to a float; -#X obj 94 3578 class_exists; -#X text 200 3578 figure out whether a class has been loaded by pd; -#X obj 115 3610 condition; -#X text 200 3610 Castonguay rectangle bounds-checking; -#X obj 143 3642 count; -#X text 200 3642 Castonguay counter; -#X obj 136 3674 cv.Add; -#X text 200 3674 OpenCV addition; -#X obj 136 3706 cv.Div; -#X text 200 3706 OpenCV division; -#X obj 38 3738 cv.HaarDetectObjects; -#X text 200 3738 OpenCV (future use); -#X obj 115 3770 cv.Invert; -#X text 200 3770 OpenCV invert matrix; -#X obj 115 3802 cv.Kalman; -#X text 200 3802 OpenCV (future use); -#X obj 136 3834 cv.Mul; -#X text 200 3834 OpenCV multiplication; -#X obj 136 3866 cv.SVD; -#X text 200 3866 OpenCV singular value decomposition (eigendecomposition); -#X obj 136 3898 cv.Sub; -#X text 200 3898 OpenCV subtraction; -#X obj 129 3930 display; -#X text 200 3930 print message or grid inside of the patch; -#X obj 136 3962 expect; -#X text 200 3962 currently does like list.== (will do more than that in the future); -#X obj 157 3994 for; -#X text 200 3994 make sequence of float messages for each number in a range with specified stepping; -#X obj 129 4026 foreach; -#X text 200 4026 convert a list to a sequence of atom messages; -#X obj 157 4058 fps; -#X text 200 4058 measure frames per second and make statistics; -#X obj 122 4090 gf.error; -#X text 200 4090 emit error message from the perspective of the current abstraction instance in its parent patch; -#X obj 80 4122 gf.io_generate; -#X text 200 4122 for internal use by #in and #out; -#X obj 108 4154 gf.oneshot; -#X text 200 4154 spigot that shuts itself down after each message; -#X obj 66 4186 gf.suffix_lookup; -#X text 200 4186 find the objectclass corresponding ; -#X obj 150 4218 inv*; -#X text 200 4218 swapped /; -#X obj 150 4250 inv+; -#X text 200 4250 swapped -; -#X obj 129 4282 list.==; -#X text 200 4282 test two lists of floats and/or symbols for equality; -#X obj 122 4314 listfind; -#X text 200 4314 find index of an element in a list; -#X obj 101 4346 listflatten; -#X text 200 4346 merge all nested lists together \, depth-first; -#X obj 122 4378 listread; -#X text 200 4378 find element at an index in a list; -#X obj 101 4410 listreverse; -#X text 200 4410 mirror image of a list; -#X obj 87 4442 parallel_port; -#X text 200 4442 send to and receive from a DB25 parallel port; -#X obj 122 4474 pingpong; -#X text 200 4474 turns value of a counter into a zigzag between 0 and a given value; -#X obj 73 4506 plotter_control; -#X text 200 4506 make HPGL commands; -#X obj 80 4538 plotter_parser; -#X text 200 4538 interprets ascii codes as HPGL commands and output them as messages; -#X obj 143 4570 range; -#X text 200 4570 multiple moses in cascade; -#X obj 94 4602 receives \$0-; -#X text 200 4602 multiple receives with common outlet and other outlet telling the name of intended destination; -#X obj 136 4634 route2; -#X text 200 4634 route messages but keep them intact (does not remove selector); -#X obj 45 4666 send39 \$0-patchname; -#X text 200 4666 backward-compatibility crutch for dynamic patching in pd 0.39; -#X obj 122 4698 seq_fold; -#X text 200 4698 cascade the use of an object on all elements of an incoming message sequence; -#X obj 143 4730 shunt; -#X text 200 4730 demultiplexer: send input to separately specified outlet; -#X obj 108 4762 systemtime; -#X text 200 4762 time spent by process in kernel mode \, as measured by the OS; -#X obj 129 4794 tsctime; -#X text 200 4794 high-resolution real time \, as measured by the CPU; -#X obj 115 4826 unix_time; -#X text 200 4826 real time as measured by the OS \, including date; -#X obj 122 4858 usertime; -#X text 200 4858 time spent by process in non-kernel mode \, as measured by the OS; -#X obj 143 4890 var.#; -#X text 200 4890 like [f] for grids; diff --git a/externals/gridflow/doc/install.html b/externals/gridflow/doc/install.html deleted file mode 100644 index 34e5be1e..00000000 --- a/externals/gridflow/doc/install.html +++ /dev/null @@ -1,129 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html><head><!-- $Id: install.html 3754 2008-06-02 19:24:20Z matju $ --> -<title>GridFlow 0.9.3 - 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 leftmargin="0" topmargin="0" bgcolor="#ffffff" marginheight="0" marginwidth="0"> - -<table width="100%" cellspacing="10"><tr><td> -<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr> - <td> <img src="images/header1.png" alt="GridFlow" width="384" height="64"></td> - <td width="100%"><img src="images/header2.png" alt="GridFlow" width="100%" height="64"></td> - <td> <img src="images/header3.png" alt="GridFlow" width="32" height="64"></td> -</table> -</td></tr></table> -<blockquote> - -<table bgcolor="white" border="0" cellspacing="2" width="100%"> -<tr><td bgcolor="black"><img src="images/black.png" height="2" width="1"></td></tr> -<tr><td><h4>GridFlow 0.9.3 - Installation</h4> -<ul> -<li><h5><a href="#Hardware_and_Software_you_Probably_Need">Hardware and Software you Probably Need</a></h4> -<li><h5><a href="#Downloading_from_SVN">Downloading from SVN</a></h4> -<li><h5><a href="#Installation_instructions_%28incl._compilation%29">Installation instructions (incl. compilation)</a></h4> -<li><h5><a href="#Other_Tips">Other Tips</a></h4> -</ul> -</td></tr> - -<tr><td bgcolor="black"><img src="images/black.png" height="2" width="1"></td></tr> -<tr><td><h4><a name="Hardware_and_Software_you_Probably_Need">Hardware and Software you Probably Need</a></h4> - -<p><b>Computer/Processor:</b> GridFlow is mainly made on PC. This includes AMD K6/K7/K8 (Athlon/Opteron/etc), Intel P2/P3/P4 and other Pentiums, Intel CoreDuo, etc.; the absolute minimum is 386. However, GridFlow has also been seen working on Macintosh (G3/G4/G5), Corel NetWinder, and SPARCstation.</p> - -<p><b>Operating System:</b> GridFlow is mainly made on Ubuntu. We have also used Debian, SuSE and Mandrake. We suppose that it would work on FreeBSD, NetBSD or OpenBSD if someone tried. MacOSX support is a bit trickier but it should work on 10.3 (haven't tried lately). It also worked on Solaris when I tried it. Microsoft Windows is not supported, but if you do want to try to add support for that, try CygWin and/or MinGW.</p> - -<p><b>Required Software:</b><ul> - <li>Ruby 1.8 or 1.9</li> - <li>PureData 0.39 or later, or DesireData</li> - <li>GNU C++ Compiler (g++) version 3.x or 4.x</li> - <li>GNU Make</li> - <li>SVN</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></ul> - -<p><b>Multimedia Components (optional):</b><ul> - <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> - <li>FFTW3</li> - <li>Apple X11 (<a href="http://www.apple.com/support/downloads/x11formacosx.html">for OSX 10.3</a> or - <a href="http://www.apple.com/support/downloads/x11update2006113.html">for OSX 10.4</a>)</li> -</ul> - -<tr><td bgcolor="black"><img src="images/black.png" height="2" width="1"></td></tr> -<tr><td><h4><a name="Downloading_from_SVN">Downloading from SVN</a></h4> -<p>The SVN 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 SVN edition, so here's how:</p> -<p>Make sure you have the <kbd>svn</kbd> program installed.</p> -<ul> -<li><kbd>cd pd/extra</kbd> -<li><kbd>svn checkout http://gridflow.ca/svn/trunk</kbd> -<li><kbd>mv trunk gridflow</kbd></ul> -<p>And the subsequent times, you only do this:<ul> -<li><kbd>cd pd/extra/gridflow</kbd></p> -<li><kbd>svn update</kbd></ul></p></td></tr> - -<tr><td bgcolor="black"><img src="images/black.png" height="2" width="1"></td></tr> -<tr><td><h4><a name="Installation_instructions_(incl._compilation)">Installation instructions (incl. compilation)</a></h4> -<ol> - <ul><li> Install Ruby.</li> - <li>Download GridFlow from the website and uncompress it, or get it from the SVN server.</li> - <li>Run <kbd>./configure</kbd> from the <kbd>gridflow</kbd> directory. Make sure it detects all the components - you want to use with GridFlow. In MacOS you would normally use FINK to install those extra components: <kbd>ruby libjpeg libjpeg-shlibs libpng-shlibs libpng3 libpng3-shlibs libmpeg libmpeg-shlibs</kbd> </li> - - <li>In Debian (lenny), do <kbd> - apt-get install libjpeg62-dev libpng12-dev libmpeg3-dev libquicktime-dev fftw3-dev \ - libaa1-dev libsdl1.2-dev libnetpbm10-dev libx11-dev libxt-dev \ - ruby nasm libglib1.2-dev - </kbd></li> - - <li>Note: you may have to set <kbd>CPLUS_INCLUDE_PATH</kbd> to indicate where to find *.h files, and you -may have to set both <kbd>LIBRARY_PATH</kbd> and <kbd>LD_LIBRARY_PATH</kbd> to indicate where to find -*.so or *.aor *.dylib or *.bundle or *.dll or *.lib files.</li> - <li>Note: you can do <kbd>./configure --help</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>--use-compiler</kbd> you should use a version of <kbd>g++</kbd>, not -directly a version of <kbd>gcc</kbd>, else you get <kbd>undefined symbol</kbd> problems. Some versions of gcc/g++ -are troublesome.</li> - <li>Run <kbd>make</kbd> to produce the executables <kbd>gridflow.so</kbd> and <kbd>gridflow.pd_linux</kbd> or similar</li> <ul> - <li>Loading GridFlow:<ul> - <li>PureData : With a text editor, modify or create <kbd>~/.pdrc</kbd> and write <kbd>-lib gridflow</kbd>. </li> - <li>DesireData : In "Server Preferences", add <kbd>gridflow</kbd> to the list of libraries.</li> </ul> -Note that on MacOS the dot-files are invisible in the Finder but you do <kbd>cd ~/Desktop; ln -s ../.pdrc "PureData Configuration"</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 bgcolor="black"><img src="images/black.png" height="2" width="1"></td></tr> -<tr><td><h4><a name="Other_Tips">Other Tips</a></h4> -<ul> - <li><b>1</b> : you just did a SVN update and now the program does not compile, or -crashes, or changes didn't go through. <ul> - <li>If a new directory is created, you need to do <kbd>cvs update -d</kbd>. - Many people just add that option to their configuration of the SVN software.</li> - <li>When some kinds of changes have happened, you may have to rerun the <kbd>configure</kbd> - program before redoing <kbd>make</kbd>. 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> </ul></li> - <li>PureData Crashing: <ul> - <li>you can start the debugger like <kbd>gdb $(which pd) core.24255</kbd> where the latter part - is the name of a RAM dump file. You can enable those dumps using the shell command <kbd>ulimit -c unlimited</kbd>. - To avoid dumping, you can also start Pd from within the debugger - using <kbd>gdb `which pd`</kbd> then <kbd>run</kbd> then cause the crash.</li> - <li>In GDB, after a crash, you can use the <kbd>where</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>To quit GDB use the <kbd>quit</kbd> command. (really.)</li> </ul></li> </ul></td></tr> - -<tr><td bgcolor="black"><img src="images/black.png" height="2" width="1"></td></tr><tr><td> -<p><font size="-1"> -GridFlow 0.9.3 Documentation<br> -Copyright © 2001-2008 by Mathieu Bouchard -<a href="mailto:matju@artengine.ca">matju@artengine.ca</a> -</font></p> -</td></tr></tbody></table> -</blockquote></body></html> diff --git a/externals/gridflow/doc/introduction.html b/externals/gridflow/doc/introduction.html deleted file mode 100644 index 3dcda73f..00000000 --- a/externals/gridflow/doc/introduction.html +++ /dev/null @@ -1,105 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html><head> - -<title>GridFlow 0.9.3 - 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 leftmargin="0" topmargin="0" bgcolor="#ffffff" marginheight="0" marginwidth="0"> -<table width="100%" cellspacing="10"><tr><td> -<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr> - <td> <img src="images/header1.png" alt="GridFlow" width="384" height="64"></td> - <td width="100%"><img src="images/header2.png" alt="GridFlow" width="100%" height="64"></td> - <td> <img src="images/header3.png" alt="GridFlow" width="32" height="64"></td> -</table> -</td></tr></table> -<blockquote> - -<br> -<table border="0" cellspacing="5" width="100%"> - <tr><td bgcolor="black"><img src="images/black.png" height="2" width="1"></td></tr> - - <tr><td height="16"> - <h4>GridFlow 0.9.3 - introduction</h4> - </td></tr> - <tr> - <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><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><p> The strategy followed by most video plugins for PureData 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><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><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><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><p> In short, GridFlow is a whole new world of possibilities for - the multimedia artist and programmer. - - </p><p>- matju</p><br> -</td></tr> - - <tr><td bgcolor="black"><img src="images/black.png" height="2" width="1"></td></tr> - <tr> - <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><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><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><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><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. -</p></td> - - <tr><td bgcolor="black"><img src="images/black.png" height="2" width="1"></td></tr> - - <tr><td> - <p><font size="-1">GridFlow 0.9.3 Documentation<br> - by Mathieu Bouchard <a href="mailto:matju@artengine.ca">matju@artengine.ca</a> - and<br> - Alexandre Castonguay <a href="mailto:acastonguay@artengine.ca">acastonguay@artengine.ca</a></font></p> - </td> - </tr> - -</table> -</body></html>
\ No newline at end of file diff --git a/externals/gridflow/doc/license.html b/externals/gridflow/doc/license.html deleted file mode 100644 index 4f2ff6cf..00000000 --- a/externals/gridflow/doc/license.html +++ /dev/null @@ -1,70 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html><head><!-- $Id: license.html 3732 2008-06-02 14:30:54Z matju $ --><!-- - GridFlow Reference Manual: Architecture - Copyright (c) 2001,2002,2003,2004 by Mathieu Bouchard ---> - - - -<title>GridFlow 0.9.3 - 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 leftmargin="0" topmargin="0" bgcolor="#ffffff" marginheight="0" marginwidth="0"> -<table width="100%" cellspacing="10"><tr><td> -<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr> - <td> <img src="images/header1.png" alt="GridFlow" width="384" height="64"></td> - <td width="100%"><img src="images/header2.png" alt="GridFlow" width="100%" height="64"></td> - <td> <img src="images/header3.png" alt="GridFlow" width="32" height="64"></td> -</table> -</td></tr></table> -<blockquote> - -<br> -<table border="0" cellspacing="5" width="100%"> - <tr><td bgcolor="black"><img src="images/black.png" height="2" width="1"></td></tr> - <tr><td height="16"><h4>GridFlow 0.9.3 - License</h4> - <table><tr> - <td width="12%"> </td> - <td width="76%"> - <table cellpadding="0" cellspacing="1"><tbody><tr><td bgcolor="black"> - <table cellpadding="20" cellspacing="1"><tbody><tr><td bgcolor="white"> - <p> - Copyright (c) 2001-2008 by Mathieu Bouchard - - </p><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><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><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. - </p></td></tr></table> - </td></tr></table> - </td> - <td width="12%"> </td> - </tr></table> - <br> - </td> - </tr> - <tr><td bgcolor="black"><img src="images/black.png" height="2" width="1"></td></tr> - - <tr><td> - <p><font size="-1">GridFlow 0.9.3 Documentation<br> - Copyright © 2001-2008 by Mathieu Bouchard <a href="mailto:matju@artengine.ca">matju@artengine.ca</a> - </td> - </tr> - -</tbody></table> -</blockquote> -</body></html> diff --git a/externals/gridflow/doc/locale/english.tcl b/externals/gridflow/doc/locale/english.tcl deleted file mode 100644 index 82686a5a..00000000 --- a/externals/gridflow/doc/locale/english.tcl +++ /dev/null @@ -1,191 +0,0 @@ -# this file will not contain any aliases, just the canonical names - -proc say2 {k v} { - say [lindex $k 0] $v - foreach kk [lrange $k 1 end] {say $k "old name of $k : $v"} -} - -proc say3 {k v} { - set kk [regsub ^# $k @] - say2 [list k kk] $v -} - -category "Stuff" -say # "plain numeric operators on grids: + - * / etc" -say #border "add padding on sides of a grid" -say #cast "convert grid from one number type to another" -say #centroid "find centroid (weighted average) of the coordinates of a grid" -say #convolve "compute convolution product of a grid (blur and edge-detection)" -say #dim "get the size (dimensions) of a grid" -say #downscale_by "reduce the size of an image by a whole factor" -say #draw_image "picture-in-picture" -say #draw_points "(future use)" - -category "Data Conversion" -say #to_literal "convert grid to grid-literal (list with a # sign)" -say #to_float "convert grid to sequence of floats" -say #to_list "convert grid to list" -say #to_pix "convert grid to pix (GEM)" -say #to_symbol "convert grid of ASCII codes to symbol" - -category "Stuff" -say #fft "compute forward or inverse one-or-two-dimensional complex FFT of a grid" -say #finished "bang when grid transmission has ended" -say #fold "compute the sum of each row, product of each row, and other similar operations" -say #for "make a grid from all numbers or coordinates in a certain range" -say #from_pix "convert pix (GEM) to grid" -say #import_pix "old name of #from_pix" -say #grade "make an index of the sorting of a grid" -say #import "convert float, list, or symbol ASCII codes, to a grid" -say #inner "scalar (\"dot\") product, matrix product, tensor contraction, image channel remapping, etc." - -category "Hardware and Files" -say #camera "control panel for opening cameras" -say #io.aalib "open an aalib window" -say #io.dc1394 "open a faiawaia \"DC\" camera (not DV) using a Linux-compatible OS" -say #io.grid "read or write a .grid file (GridFlow storage format)" -say #io.jpeg "read or write a .jpeg file" -say #io.mpeg "read a .mpeg video file" -say #io.png "read a .png image file" -say #io.ppm "read or write a .pbm or .pgm or .ppm image file" -say #io.quicktime "read a .mov video file (or perhaps .avi)" -say #io.sdl "open a SDL window" -say #io.videodev "open a V4L1 device (Linux interface for video cameras and video digitisers)" -say #io.x11 "open a X11 window" -say parallel_port "send to and receive from a DB25 parallel port" -say plotter_control "make HPGL commands" - -category "Stuff" -say #labeling "tag connected pixels with region numbers in a two-tone single-channel image" -say #layer "layer two same-sized images" -say #moment "find 1st or 2nd order moment (weighted average or variance) of the coordinates of a grid" -say #noise_gate_yuvs "replaces dark pixels by black pixels in signed YUV images" -say #outer "apply numeric operator on all possible combinations of elements of one grid with elements of another" -say #pack "combine floats on separate inlets to make a grid" -say #perspective "divide each point by its depth" -say #polygonize "(future use)" -say #print "print to console" -say #redim "change the size of a grid by restreaming contents into a new shape" -say #reverse "mirror image of a grid along a dimension" -say #rotatificator "make rotation matrix for any two dimensions chosen from manyou" -say #scale_by "reduce the size of an image by a whole factor" -say #scan "compute the cumulative sums of each row, and other similar operations" -say #store "store image in RAM, in-place picture-in-picture, and make lookups in various ways" -say #transpose "swap two dimensions out of any, in a grid" -say #type "get a symbol representing the number type of a grid" -say #unpack "split a grid into floats on separate outlets" -say @join "join two grids together along any dimension" - -category "Lists" -say foreach "convert a list to a sequence of atom messages" -say listfind "find index of an element in a list" -say listread "find element at an index in a list" -say listflatten "merge all nested lists together, depth-first" -say listreverse "mirror image of a list" - -category "Stuff" -say args "pick up the arguments of an abstraction instance, including nested lists and init-messages" -say ascii "write integer as decimal in ascii codes" -say class_exists "figure out whether a class has been loaded by pd" -say display "print message or grid inside of the patch" -say gf.error "emit error message from the perspective of the current abstraction instance in its parent patch" -say gf.suffix_lookup "find the objectclass corresponding " -say range "multiple moses in cascade" -say receives "multiple receives with common outlet and other outlet telling the name of intended destination" -say route2 "route messages but keep them intact (does not remove selector)" -say send39 "backward-compatibility crutch for dynamic patching in pd 0.39" -say shunt "demultiplexer: send input to separately specified outlet" -say systemtime "time spent by process in kernel mode, as measured by the OS" -say tsctime "high-resolution real time, as measured by the CPU" -say unix_time "real time as measured by the OS, including date" -say usertime "time spent by process in non-kernel mode, as measured by the OS" - -category "Stuff" -say #apply_colormap_channelwise "apply color correction tables separately on each channel" -say #background_model "make mask from learning to distinguish background from foreground" -say #change "send grid only if different from previous grid" -say #checkers "make image of chequered background in two tones of grey" -say #clip "min and max" -say #color "GUI for selecting a colour" -say condition "Castonguay rectangle bounds-checking" -say #contrast "adjust contrast in two different ways" -say count "Castonguay counter" -say #fade_lin "fade in piecewise-linear fashion" -say #fade "fade in exponential-decay fashion (linear recurrence)" -say #fastblur "speedy shortcut for rectangular blur" -say for "make sequence of float messages for each number in a range with specified stepping" -say fps "measure frames per second and make statistics" -say #gamma "apply gamma correction" -say gf.io_generate "for internal use by #in and #out" -say #hueshift "apply hue shift by rotating the color wheel" - -say #in "open file or device for reading or download" -say #out "open file or device for writing or upload" - -say inv* "swapped /" -say inv+ "swapped -" - -say #moment_polar "convert covariance matrix to the longest and shortest radius of an ellipse and a rotation angle" -say #motion_detection "frame difference with some options" -say #mouse "converts mouse events to reports of clicks, drags, unclicks, motions, and separate buttons and wheel" -say gf.oneshot "spigot that shuts itself down after each message" -say pingpong "turns value of a counter into a zigzag between 0 and a given value" - -category "Polygons" -say #polygon_area "find area of a polygon in square pixels" -say #polygon_comparator "find similarity between two polygons independently of rotation, by radial maps and FFT" -say #polygon_each_edge "convert a polygon to a sequence of overlapping 2-sided polygons representing edges" -say #polygon_moment "find average of all points inside of a polygon" -say #polygon_perimetre "find perimetre of a polygon in pixels (euclidian)" -say #polygon_radial_map "find radius of a polygon from a given origin, sampled at equally spaced angles" -say #line_to_polygon "convert line (as point pair) to polygon (rotated rectangle)" -say #draw_rect "draw a rectangle in an image" -say #draw_slider "draw a slider in an image" -say #edit_polygon "draw a polygon in an image and react to mouse events" -say #make_cross "make cross-shaped polygon" -say #draw_polygon "draw polygon in an image" - -category "Stuff" -say #posterize "quantise pixel values" -say #ravel "do #redim so that a grid keeps same number of elements but just one dimension" -say #record "wrapper around \[#in quicktime\]" -say #remap_image "apply object chain on pixel positions to make new image from chosen pixels of the input image" -say #rotate "rotate points through two axes (or rotate pixels as points in a colorspace)" -say #saturation "multiply chroma by some value" -say #scale_to "scale an image from one size to any other size by deleting or duplicating rows and columns" -say #seq_fold "cascade the use of an object on all elements of an incoming grid message sequence" -say seq_fold "cascade the use of an object on all elements of an incoming message sequence" -say #slice "crop an image using a start point (top left) and end point (bottom right)" -say #solarize "like pingpong but on all pixel values of a grid" -say #sort "sort each row of a grid" -say #spread "add noise to each vector (point or pixel)" -say #swap "like \[swap\] for grids" -say #text_to_image "use a fixed-width font grid to make a tiling of characters as specified by a text string" -say #t "like \[t a a\] for grids" -say var.# "like \[f\] for grids" - -category "Colorspace Conversion" -say #rgb_to_yuv "convert RGB to unsigned YUV" -say #yuv_to_rgb "convert unsigned YUV to RGB" -say #rgb_to_rgba "convert RGB to RGBA (but setting alpha to 0)" -say #rgba_to_rgb "convert RGBA to RGB" -say #greyscale_to_rgb "convert greyscale to RGB" -say #rgb_to_greyscale "convert RGB to greyscale" - -category "OpenCV" -say cv.Add "OpenCV addition" -say cv.Div "OpenCV division" -say cv.HaarDetectObjects "OpenCV (future use)" -say cv.Kalman "OpenCV (future use)" -say cv.Mul "OpenCV multiplication" -say cv.Sub "OpenCV subtraction" -say cv.Invert "OpenCV invert matrix" -say cv.SVD "OpenCV singular value decomposition (eigendecomposition)" - -category "Stuff" -say ascii_to_f "converts a list of ascii codes to a float" -say plotter_parser "interprets ascii codes as HPGL commands and output them as messages" -say list.== "test two lists of floats and/or symbols for equality" -say expect "currently does like list.== (will do more than that in the future)" -say #hello "make 7 colour bars" -say #window "a \[#out window\] that can be toggled to appear and disappear" diff --git a/externals/gridflow/doc/make_index.tcl b/externals/gridflow/doc/make_index.tcl deleted file mode 100644 index 7767b0f4..00000000 --- a/externals/gridflow/doc/make_index.tcl +++ /dev/null @@ -1,29 +0,0 @@ -proc say {k v} {set ::say($k) $v} -proc category {k} {} -source locale/english.tcl -puts "#N canvas 0 0 640 480 10 ;" -set y 50 -foreach k [lsort [array names ::say *]] { - set v $::say($k) - if {$k == "#"} {set k "# +"} - if {$k == "#fold"} {set k "#fold +"} - if {$k == "#scan"} {set k "#scan +"} - if {$k == "#outer"} {set k "#outer +"} - if {$k == "#cast"} {set k "#cast i"} - if {$k == "#for"} {set k "#for 0 4 1"} - if {$k == "#redim"} {set k "#redim ()"} - if {$k == "receives"} {set k "receives \$0-"} - if {$k == "send39"} {set k "send39 \$0-patchname"} - set w [string length $k] - regsub "\\$" $k "\\$" k - if {$w<3} {set w 3} - set w [expr {$w*7+2}] - if {$k == "#color"} {set w 156} - puts "#X obj [expr 180-$w] $y $k;" - regsub "," $v " \\, " v - regsub ";" $v " \\; " v - regsub "\\$" $v "\\$" v - puts "#X text 200 $y $v;" - if {$k == "#color"} {incr y 40} - incr y 32 -} diff --git a/externals/gridflow/doc/moulinette.tcl b/externals/gridflow/doc/moulinette.tcl deleted file mode 100644 index 765b03e6..00000000 --- a/externals/gridflow/doc/moulinette.tcl +++ /dev/null @@ -1,208 +0,0 @@ -#!/usr/bin/env tclsh - -proc mset {vars list} {uplevel 1 "foreach {$vars} {$list} {break}"} - -proc write {list} { - set v [join $list " "] - regsub -all "," $v " \\, " v - regsub -all ";" $v " \\; " v - regsub -all "\\$" $v "\\$" v - puts $::fh "$v;" -} - -set fh [open numop.pd w] -write [list #N canvas 0 0 1024 768 10] -set y 0 -set row 0 -set oid 0 -set msgboxes {} -set col1 96 -set col2 512 -set col3 768 -set col4 1024 -set rowsize 32 - -write [list #X obj 0 $y cnv 15 $col4 30 empty empty empty 20 12 0 14 20 -66577 0] -write [list #X text 10 $y op name] -write [list #X text $col1 $y description] -write [list #X text $col2 $y "effect on pixels"] -write [list #X text $col3 $y "effect on coords"] -incr y 32 -incr oid 5 - -# onpixels = meaning in pixel context (pictures, palettes) -# oncoords = meaning in spatial context (indexmaps, polygons) - -# for vecops, the two analogy-columns were labelled: -# meaning in geometric context (indexmaps, polygons, in which each complex number is a point) -# meaning in spectrum context (FFT) in which each number is a (cosine,sine) pair -proc op {op desc {extra1 ""} {extra2 ""}} { - global y - if {$::row&1} {set bg -233280} {set bg -249792} - write [list #X obj 0 $y cnv 15 $::col4 [expr $::rowsize-2] empty empty empty 20 12 0 14 $bg -66577 0] - write [list #X msg 10 $y op $op] - write [list #X text $::col1 $y $desc] - if {$extra1 != ""} {write [list #X text $::col2 $y $extra1]} - if {$extra2 != ""} {write [list #X text $::col3 $y $extra2]} - lappend msgboxes [expr $::oid+1] - incr ::row - incr ::y $::rowsize - incr ::oid 5 -} - -proc draw_columns {} { - write [list #X obj [expr $::col1-1] 0 cnv 0 0 $::y empty empty empty -1 12 0 14 0 -66577 0] - write [list #X obj [expr $::col2-1] 0 cnv 0 0 $::y empty empty empty -1 12 0 14 0 -66577 0] - write [list #X obj [expr $::col3-1] 0 cnv 0 0 $::y empty empty empty -1 12 0 14 0 -66577 0] -} - -proc numbertype {op desc {extra1 ""} {extra2 ""}} {op $op $desc $extra1 $extra2} - -set sections {} -proc section {desc} { - global y - lappend ::sections [list $y $desc] - incr ::y 16 -} - -section {numops} -op {ignore} { A } {no effect} {no effect} -op {put} { B } {replace by} {replace by} -op {+} { A + B } {brightness, crossfade} {move, morph} -op {-} { A - B } {brightness, motion detection} {move, motion detection} -op {inv+} { B - A } {negate then contrast} {180 degree rotate then move} -op {*} { A * B } {contrast} {zoom out} -op {/} { A / B, rounded towards zero } {contrast} {zoom in} -op {div} { A / B, rounded downwards } {contrast} {zoom in} -op {inv*} { B / A, rounded towards zero } -op {swapdiv} { B / A, rounded downwards } -op {%} { A % B, modulo (goes with div) } {--} {tile} -op {swap%} { B % A, modulo (goes with div) } -op {rem} { A % B, remainder (goes with /) } -op {swaprem} { B % A, remainder (goes with /) } -op {gcd} {greatest common divisor} -op {lcm} {least common multiple} -op {|} { A or B, bitwise } {bright munchies} {bottomright munchies} -op {^} { A xor B, bitwise } {symmetric munchies (fractal checkers)} {symmetric munchies (fractal checkers)} -op {&} { A and B, bitwise } {dark munchies} {topleft munchies} -op {<<} { A * (2**(B % 32)), which is left-shifting } {like *} {like *} -op {>>} { A / (2**(B % 32)), which is right-shifting } {like /,div} {like /,div} -op {||} { if A is zero then B else A } -op {&&} { if A is zero then zero else B} -op {min} { the lowest value in A,B } {clipping} {clipping (of individual points)} -op {max} { the highest value in A,B } {clipping} {clipping (of individual points)} -op {cmp} { -1 when A<B; 0 when A=B; 1 when A>B. } -op {==} { is A equal to B ? 1=true, 0=false } -op {!=} { is A not equal to B ? } -op {>} { is A greater than B ? } -op {<=} { is A not greater than B ? } -op {<} { is A less than B ? } -op {>=} {is A not less than B ? } -op {sin*} { B * sin(A) in centidegrees } {--} {waves, rotations} -op {cos*} { B * cos(A) in centidegrees } {--} {waves, rotations} -op {atan} { arctan(A/B) in centidegrees } {--} {find angle to origin (part of polar transform)} -op {tanh*} { B * tanh(A) in centidegrees } {smooth clipping} {smooth clipping (of individual points), neural sigmoid, fuzzy logic} -op {log*} { B * log(A) (in base e) } -op {gamma} { floor(pow(a/256.0,256.0/b)*256.0) } {gamma correction} -op {**} { A**B, that is, A raised to power B } {gamma correction} -op {abs-} { absolute value of (A-B) } -op {rand} { randomly produces a non-negative number below A } -op {sqrt} { square root of A, rounded downwards } -op {sq-} { (A-B) times (A-B) } -op {avg} { (A+B)/2 } -op {hypot} { square root of (A*A+B*B) } -op {clip+} { like A+B but overflow causes clipping instead of wrapping around (coming soon) } -op {clip-} { like A-B but overflow causes clipping instead of wrapping around (coming soon) } -op {erf*} { integral of e^(-x*x) dx ... (coming soon; what ought to be the scaling factor?) } -op {weight} { number of "1" bits in an integer} -op {sin} {sin(A-B) in radians, float only} -op {cos} {cos(A-B) in radians, float only} -op {atan2} {atan2(A,B) in radians, float only} -op {tanh} {tanh(A-B) in radians, float only} -op {exp} {exp(A-B) in radians, float only} -op {log} {log(A-B) in radians, float only} - -section {vecops for complex numbers} -op {C.* } {A*B} -op {C.*conj} {A*conj(B)} -op {C./ } {A/B} -op {C./conj} {A/conj(B)} -op {C.sq- } {(A-B)*(A-B)} -op {C.abs- } {abs(A-B)} -op {C.sin } {sin(A-B)} -op {C.cos } {cos(A-B)} -op {C.tanh } {tanh(A-B)} -op {C.exp } {exp(A-B)} -op {C.log } {log(A-B)} - -write [list #X obj 10 $y outlet] -set outletid $oid -incr oid - -foreach msgbox $msgboxes { - write [list #X connect $msgbox 0 $outletid 0] -} - -draw_columns - -foreach section $sections { - mset {y desc} $section - write [list #X obj 0 $y cnv 15 $::col4 14 empty empty empty 20 12 0 14 -248881 -66577 0] - write [list #X text 10 $y $desc] - incr oid 2 -} - -close $fh -set fh [open numtype.pd w] -write [list #N canvas 0 0 1024 768 10] -set y 0 -set row 0 -set oid 0 -set col1 192 -set col2 384 -set col3 608 -set col4 1024 -set rowsize 64 - -write [list #X obj 0 $y cnv 15 $col4 30 empty empty empty 20 12 0 14 20 -66577 0] -write [list #X text 10 $y op names] -write [list #X text $col1 $y range] -write [list #X text $col2 $y precision] -write [list #X text $col3 $y description] -incr y 32 -incr oid 5 - -numbertype {b u8 uint8} {0 to 255} {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 #in converts to int32 unless otherwise specified.)} -numbertype {s i16 int16} {-32768 to 32767} {1} -numbertype {i i32 int32} {-(1<<31) to (1<<31)-1} {1} { - signed 32-bit integer. this is used by default throughout GridFlow. -} -numbertype {l i64 int64} {-(1<<63) to (1<<63)-1} {1} -numbertype {f f32 float32} {-(1<<128) to (1<<128)} {23 bits or 0.000012%} -numbertype {d f64 float64} {-(1<<2048) to (1<<2048)} {52 bits or 0.000000000000022%} - -draw_columns - -proc p {text} {write [list #X text 10 $::y $text]; incr ::y 60} - -p {High-performance computation requires precise and quite peculiar - definitions of numbers and their representation.} -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 {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 {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.} - -close $fh diff --git a/externals/gridflow/doc/numop.pd b/externals/gridflow/doc/numop.pd deleted file mode 100644 index 6e46041a..00000000 --- a/externals/gridflow/doc/numop.pd +++ /dev/null @@ -1,254 +0,0 @@ -#N canvas 0 0 1024 768 10; -#X obj 0 0 cnv 15 1024 30 empty empty empty 20 12 0 14 20 -66577 0; -#X text 10 0 op name; -#X text 96 0 description; -#X text 512 0 effect on pixels; -#X text 768 0 effect on coords; -#X obj 0 48 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 48 op ignore; -#X text 96 48 A ; -#X text 512 48 no effect; -#X text 768 48 no effect; -#X obj 0 80 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 80 op put; -#X text 96 80 B ; -#X text 512 80 replace by; -#X text 768 80 replace by; -#X obj 0 112 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 112 op +; -#X text 96 112 A + B ; -#X text 512 112 brightness \, crossfade; -#X text 768 112 move \, morph; -#X obj 0 144 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 144 op -; -#X text 96 144 A - B ; -#X text 512 144 brightness \, motion detection; -#X text 768 144 move \, motion detection; -#X obj 0 176 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 176 op inv+; -#X text 96 176 B - A ; -#X text 512 176 negate then contrast; -#X text 768 176 180 degree rotate then move; -#X obj 0 208 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 208 op *; -#X text 96 208 A * B ; -#X text 512 208 contrast; -#X text 768 208 zoom out; -#X obj 0 240 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 240 op /; -#X text 96 240 A / B \, rounded towards zero ; -#X text 512 240 contrast; -#X text 768 240 zoom in; -#X obj 0 272 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 272 op div; -#X text 96 272 A / B \, rounded downwards ; -#X text 512 272 contrast; -#X text 768 272 zoom in; -#X obj 0 304 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 304 op inv*; -#X text 96 304 B / A \, rounded towards zero ; -#X obj 0 336 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 336 op swapdiv; -#X text 96 336 B / A \, rounded downwards ; -#X obj 0 368 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 368 op %; -#X text 96 368 A % B \, modulo (goes with div) ; -#X text 512 368 --; -#X text 768 368 tile; -#X obj 0 400 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 400 op swap%; -#X text 96 400 B % A \, modulo (goes with div) ; -#X obj 0 432 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 432 op rem; -#X text 96 432 A % B \, remainder (goes with /) ; -#X obj 0 464 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 464 op swaprem; -#X text 96 464 B % A \, remainder (goes with /) ; -#X obj 0 496 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 496 op gcd; -#X text 96 496 greatest common divisor; -#X obj 0 528 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 528 op lcm; -#X text 96 528 least common multiple; -#X obj 0 560 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 560 op |; -#X text 96 560 A or B \, bitwise ; -#X text 512 560 bright munchies; -#X text 768 560 bottomright munchies; -#X obj 0 592 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 592 op ^; -#X text 96 592 A xor B \, bitwise ; -#X text 512 592 symmetric munchies (fractal checkers); -#X text 768 592 symmetric munchies (fractal checkers); -#X obj 0 624 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 624 op &; -#X text 96 624 A and B \, bitwise ; -#X text 512 624 dark munchies; -#X text 768 624 topleft munchies; -#X obj 0 656 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 656 op <<; -#X text 96 656 A * (2**(B % 32)) \, which is left-shifting ; -#X text 512 656 like *; -#X text 768 656 like *; -#X obj 0 688 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 688 op >>; -#X text 96 688 A / (2**(B % 32)) \, which is right-shifting ; -#X text 512 688 like / \, div; -#X text 768 688 like / \, div; -#X obj 0 720 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 720 op ||; -#X text 96 720 if A is zero then B else A ; -#X obj 0 752 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 752 op &&; -#X text 96 752 if A is zero then zero else B; -#X obj 0 784 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 784 op min; -#X text 96 784 the lowest value in A \, B ; -#X text 512 784 clipping; -#X text 768 784 clipping (of individual points); -#X obj 0 816 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 816 op max; -#X text 96 816 the highest value in A \, B ; -#X text 512 816 clipping; -#X text 768 816 clipping (of individual points); -#X obj 0 848 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 848 op cmp; -#X text 96 848 -1 when A< \; B \; 0 when A=B \; 1 when A> \; B. ; -#X obj 0 880 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 880 op ==; -#X text 96 880 is A equal to B ? 1=true \, 0=false ; -#X obj 0 912 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 912 op !=; -#X text 96 912 is A not equal to B ? ; -#X obj 0 944 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 944 op >; -#X text 96 944 is A greater than B ? ; -#X obj 0 976 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 976 op <=; -#X text 96 976 is A not greater than B ? ; -#X obj 0 1008 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 1008 op <; -#X text 96 1008 is A less than B ? ; -#X obj 0 1040 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 1040 op >=; -#X text 96 1040 is A not less than B ? ; -#X obj 0 1072 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 1072 op sin*; -#X text 96 1072 B * sin(A) in centidegrees ; -#X text 512 1072 --; -#X text 768 1072 waves \, rotations; -#X obj 0 1104 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 1104 op cos*; -#X text 96 1104 B * cos(A) in centidegrees ; -#X text 512 1104 --; -#X text 768 1104 waves \, rotations; -#X obj 0 1136 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 1136 op atan; -#X text 96 1136 arctan(A/B) in centidegrees ; -#X text 512 1136 --; -#X text 768 1136 find angle to origin (part of polar transform); -#X obj 0 1168 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 1168 op tanh*; -#X text 96 1168 B * tanh(A) in centidegrees ; -#X text 512 1168 smooth clipping; -#X text 768 1168 smooth clipping (of individual points) \, neural sigmoid \, fuzzy logic; -#X obj 0 1200 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 1200 op log*; -#X text 96 1200 B * log(A) (in base e) ; -#X obj 0 1232 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 1232 op gamma; -#X text 96 1232 floor(pow(a/256.0 \, 256.0/b)*256.0) ; -#X text 512 1232 gamma correction; -#X obj 0 1264 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 1264 op **; -#X text 96 1264 A**B \, that is \, A raised to power B ; -#X text 512 1264 gamma correction; -#X obj 0 1296 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 1296 op abs-; -#X text 96 1296 absolute value of (A-B) ; -#X obj 0 1328 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 1328 op rand; -#X text 96 1328 randomly produces a non-negative number below A ; -#X obj 0 1360 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 1360 op sqrt; -#X text 96 1360 square root of A \, rounded downwards ; -#X obj 0 1392 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 1392 op sq-; -#X text 96 1392 (A-B) times (A-B) ; -#X obj 0 1424 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 1424 op avg; -#X text 96 1424 (A+B)/2 ; -#X obj 0 1456 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 1456 op hypot; -#X text 96 1456 square root of (A*A+B*B) ; -#X obj 0 1488 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 1488 op clip+; -#X text 96 1488 like A+B but overflow causes clipping instead of wrapping around (coming soon) ; -#X obj 0 1520 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 1520 op clip-; -#X text 96 1520 like A-B but overflow causes clipping instead of wrapping around (coming soon) ; -#X obj 0 1552 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 1552 op erf*; -#X text 96 1552 integral of e^(-x*x) dx ... (coming soon \; what ought to be the scaling factor?) ; -#X obj 0 1584 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 1584 op weight; -#X text 96 1584 number of "1" bits in an integer; -#X obj 0 1616 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 1616 op sin; -#X text 96 1616 sin(A-B) in radians \, float only; -#X obj 0 1648 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 1648 op cos; -#X text 96 1648 cos(A-B) in radians \, float only; -#X obj 0 1680 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 1680 op atan2; -#X text 96 1680 atan2(A \, B) in radians \, float only; -#X obj 0 1712 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 1712 op tanh; -#X text 96 1712 tanh(A-B) in radians \, float only; -#X obj 0 1744 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 1744 op exp; -#X text 96 1744 exp(A-B) in radians \, float only; -#X obj 0 1776 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 1776 op log; -#X text 96 1776 log(A-B) in radians \, float only; -#X obj 0 1824 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 1824 op C.* ; -#X text 96 1824 A*B; -#X obj 0 1856 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 1856 op C.*conj; -#X text 96 1856 A*conj(B); -#X obj 0 1888 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 1888 op C./ ; -#X text 96 1888 A/B; -#X obj 0 1920 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 1920 op C./conj; -#X text 96 1920 A/conj(B); -#X obj 0 1952 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 1952 op C.sq- ; -#X text 96 1952 (A-B)*(A-B); -#X obj 0 1984 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 1984 op C.abs- ; -#X text 96 1984 abs(A-B); -#X obj 0 2016 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 2016 op C.sin ; -#X text 96 2016 sin(A-B); -#X obj 0 2048 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 2048 op C.cos ; -#X text 96 2048 cos(A-B); -#X obj 0 2080 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 2080 op C.tanh ; -#X text 96 2080 tanh(A-B); -#X obj 0 2112 cnv 15 1024 30 empty empty empty 20 12 0 14 -249792 -66577 0; -#X msg 10 2112 op C.exp ; -#X text 96 2112 exp(A-B); -#X obj 0 2144 cnv 15 1024 30 empty empty empty 20 12 0 14 -233280 -66577 0; -#X msg 10 2144 op C.log ; -#X text 96 2144 log(A-B); -#X obj 10 2176 outlet; -#X obj 95 0 cnv 0 0 2176 empty empty empty -1 12 0 14 0 -66577 0; -#X obj 511 0 cnv 0 0 2176 empty empty empty -1 12 0 14 0 -66577 0; -#X obj 767 0 cnv 0 0 2176 empty empty empty -1 12 0 14 0 -66577 0; -#X obj 0 32 cnv 15 1024 14 empty empty empty 20 12 0 14 -248881 -66577 0; -#X text 10 32 numops; -#X obj 0 1808 cnv 15 1024 14 empty empty empty 20 12 0 14 -248881 -66577 0; -#X text 10 1808 vecops for complex numbers; diff --git a/externals/gridflow/doc/numtype.pd b/externals/gridflow/doc/numtype.pd deleted file mode 100644 index 5bec7cc9..00000000 --- a/externals/gridflow/doc/numtype.pd +++ /dev/null @@ -1,68 +0,0 @@ -#N canvas 0 0 1024 689 10; -#X obj 0 0 cnv 15 1024 30 empty empty empty 20 12 0 14 -195568 -66577 -0; -#X text 10 0 op names; -#X text 192 0 range; -#X text 384 0 precision; -#X text 608 0 description; -#X obj 0 32 cnv 15 1024 62 empty empty empty 20 12 0 14 -249792 -66577 -0; -#X msg 10 32 op b u8 uint8; -#X text 192 32 0 to 255; -#X text 384 32 1; -#X text 608 32 unsigned 8-bit integer. this is the usual size of numbers -taken from files and cameras \, and written to files and to windows. -(however #in converts to int32 unless otherwise specified.); -#X obj 0 96 cnv 15 1024 62 empty empty empty 20 12 0 14 -233280 -66577 -0; -#X msg 10 96 op s i16 int16; -#X text 192 96 -32768 to 32767; -#X text 384 96 1; -#X obj 0 160 cnv 15 1024 62 empty empty empty 20 12 0 14 -249792 -66577 -0; -#X msg 10 160 op i i32 int32; -#X text 192 160 -(1<<31) to (1<<31)-1; -#X text 384 160 1; -#X text 608 160 signed 32-bit integer. this is used by default throughout -GridFlow.; -#X obj 0 224 cnv 15 1024 62 empty empty empty 20 12 0 14 -233280 -66577 -0; -#X msg 10 224 op l i64 int64; -#X text 192 224 -(1<<63) to (1<<63)-1; -#X text 384 224 1; -#X obj 0 288 cnv 15 1024 62 empty empty empty 20 12 0 14 -249792 -66577 -0; -#X msg 10 288 op f f32 float32; -#X text 192 288 -(1<<128) to (1<<128); -#X text 384 288 23 bits or 0.000012%; -#X obj 0 352 cnv 15 1024 62 empty empty empty 20 12 0 14 -233280 -66577 -0; -#X msg 10 352 op d f64 float64; -#X text 192 352 -(1<<2048) to (1<<2048); -#X text 384 352 52 bits or 0.000000000000022%; -#X obj 191 0 cnv 1 1 416 empty empty empty -1 12 0 14 -262144 -66577 -0; -#X obj 383 0 cnv 1 1 416 empty empty empty -1 12 0 14 -262144 -66577 -0; -#X obj 607 0 cnv 1 1 416 empty empty empty -1 12 0 14 -262144 -66577 -0; -#X text 10 436 High-performance computation requires precise and quite -peculiar definitions of numbers and their representation.; -#X text 10 486 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.; -#X text 540 436 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.; -#X text 540 546 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.; diff --git a/externals/gridflow/doc/reference.html b/externals/gridflow/doc/reference.html deleted file mode 100644 index 82d8bf99..00000000 --- a/externals/gridflow/doc/reference.html +++ /dev/null @@ -1,1114 +0,0 @@ -<html><head> -<!-- $Id: reference.html 3731 2008-06-02 14:30:25Z matju $ --> -<title>GridFlow 0.9.3 - 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 leftmargin="0" topmargin="0" style="background-color: rgb(255, 255, 255);" marginheight="0" marginwidth="0"> -<table width="100%" cellspacing="10"><tr><td> -<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr> - <td> <img src="images/header1.png" alt="GridFlow" width="384" height="64"></td> - <td width="100%"><img src="images/header2.png" alt="GridFlow" width="100%" height="64"></td> - <td> <img src="images/header3.png" alt="GridFlow" width="32" height="64"></td> -</table> -</td></tr></table> -<blockquote> - -<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="black"> -<img src="images/black.png" height="2" width="1"></td></tr> - -<tr><td colspan="4" height="16"> - <h4>GridFlow 0.9.3 - Reference Manual: Flow Classes</h4> -</td></tr> -<tr> - <td width="5%" rowspan="2"> </td> - <td width="15%" height="23"> </td> - <td width="80%" height="23"> </td> - <td width="5%" height="23"> </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">#import -</a></li> -<li><a href="##export">#export -</a></li> -<li><a href="##export_list">#export_list -</a></li> -<li><a href="##export_symbol">#export_symbol -</a></li> -<li><a href="##pack">#pack -</a></li> -<li><a href="##color">#color -</a></li> -<li><a href="##unpack">#unpack -</a></li> -<li><a href="##centroid">#centroid -</a></li> -<li><a href="##for">#for -</a></li> -</ul> -<h4><a href="#Objects_for_Computing">Objects for Computing</a></h4><ul> -<li><a href="##"># -</a></li> -<li><a href="#@complex_sq">@complex_sq -</a></li> -<li><a href="##fold">#fold -</a></li> -<li><a href="##scan">#scan -</a></li> -<li><a href="##outer">#outer -</a></li> -<li><a href="##inner">#inner -</a></li> -<li><a href="#@join">@join -</a></li> -<li><a href="##finished">#finished -</a></li> -<li><a href="##cast">#cast -</a></li> -<li><a href="##ravel">#ravel -</a></li> -<li><a href="##grade">#grade -</a></li> -<li><a href="##perspective">#perspective -</a></li> -<li><a href="##transpose">#transpose -</a></li> -<li><a href="##fade">#fade -</a></li> -<li><a href="##fade_lin">#fade_lin -</a></li> -<li><a href="##reverse">#reverse -</a></li> -</ul> -<h4><a href="#Objects_for_Coordinate_Transforms">Objects for Coordinate Transforms</a></h4><ul> -<li><a href="##redim">#redim -</a></li> -<li><a href="##store">#store -</a></li> -<li><a href="##scale_to">#scale_to -</a></li> -<li><a href="##scale_by">#scale_by -</a></li> -<li><a href="##downscale_by">#downscale_by -</a></li> -<li><a href="##spread">#spread -</a></li> -<li><a href="##rotate">#rotate -</a></li> -<li><a href="##remap_image">#remap_image -</a></li> -</ul> -<h4><a href="#Objects_for_Reporting">Objects for Reporting</a></h4><ul> -<li><a href="##dim">#dim -</a></li> -<li><a href="##type">#type -</a></li> -<li><a href="##print">#print -</a></li> -<li><a href="#display">display -</a></li> -</ul> -<h4><a href="#Objects_for_Color_Conversion">Objects for Color Conversion</a></h4><ul> -<li><a href="##apply_colormap_channelwise">#apply_colormap_channelwise -</a></li> -<li><a href="##rgb_to_greyscale">#rgb_to_greyscale -</a></li> -<li><a href="##greyscale_to_rgb">#greyscale_to_rgb -</a></li> -<li><a href="##yuv_to_rgb">#yuv_to_rgb -</a></li> -<li><a href="##rgb_to_yuv">#rgb_to_yuv -</a></li> -</ul> -<h4><a href="#Objects_for_Miscellaneous_Picture_Processing">Objects for Miscellaneous Picture Processing</a></h4><ul> -<li><a href="##convolve">#convolve -</a></li> -<li><a href="##contrast">#contrast -</a></li> -<li><a href="##posterize">#posterize -</a></li> -<li><a href="##solarize">#solarize -</a></li> -<li><a href="##checkers">#checkers -</a></li> -<li><a href="##layer">#layer -</a></li> -<li><a href="##draw_image">#draw_image -</a></li> -<li><a href="##draw_polygon">#draw_polygon -</a></li> -<li><a href="##text_to_image">#text_to_image -</a></li> -<li><a href="##hueshift">#hueshift -</a></li> -</ul> -<h4><a href="#Other_Objects">Other Objects</a></h4><ul> -<li><a href="#rtmetro">rtmetro -</a></li> -<li><a href="#bindpatcher">bindpatcher -</a></li> -<li><a href="#pingpong">pingpong -</a></li> -<li><a href="##global">#global -</a></li> -<li><a href="#fps">fps -</a></li> -<li><a href="#unix_time">unix_time -</a></li> -<li><a href="#ls">ls -</a></li> -<li><a href="#exec">exec -</a></li> -<li><a href="#renamefile">renamefile -</a></li> -<li><a href="#plotter_control">plotter_control -</a></li> -<li><a href="#rubyarray">rubyarray -</a></li> -</ul> -<h4><a href="#jMax_emulation">jMax emulation</a></h4><ul> -<li><a href="#fork">fork -</a></li> -<li><a href="#foreach">foreach -</a></li> -<li><a href="#rubysprintf">rubysprintf -</a></li> -<li><a href="#listflatten">listflatten -</a></li> -<li><a href="#listmake">listmake -</a></li> -<li><a href="#listlength">listlength -</a></li> -<li><a href="#listelement">listelement -</a></li> -<li><a href="#listsublist">listsublist -</a></li> -<li><a href="#listprepend">listprepend -</a></li> -<li><a href="#listappend">listappend -</a></li> -<li><a href="#listreverse">listreverse -</a></li> -<li><a href="#oneshot">oneshot -</a></li> -<li><a href="#inv+">inv+ -</a></li> -<li><a href="#inv*">inv* -</a></li> -<li><a href="#messageprepend">messageprepend -</a></li> -<li><a href="#messageappend">messageappend -</a></li> -<li><a href="#shunt">shunt -</a></li> -<li><a href="#demux">demux -</a></li> -<li><a href="#range">range -</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_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> class </b><a name="#import">#import</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><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> shape <b>(</b><b><i>GridShape|symbol(per_message)</i> shape</b><b>)</b> <br><b>attr</b> cast <b>(</b><b><i>NumberType</i> cast</b><b>)</b> <br><b>method</b> init <b>(</b>shape<b>, </b>cast<b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> 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 0 </b><b>method</b> list <b>(</b><b>)</b> - just like a sequence of ints sent one after another, - except in a single message. <br> - <br><b>inlet 0 </b><b>method</b> symbol <b>(</b><b>)</b> - considered as a list of ascii characters. <br> - <br><b>inlet 0 </b><b>method</b> reset <b>(</b><b>)</b> - aborts the current grid if there is one. <br> - <br><b>inlet 0 </b><b>method</b> 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 1 </b><b>method</b> per_message <b>(</b><b>)</b> - old synonym for "shape per_message" <br> - <br><b>outlet 0 </b><b>method</b> 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> class </b><a name="#export">#export</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <p>this object is the opposite of #import.</p> <br><b>method</b> 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 0 </b><b>method</b> grid <b>(</b><i>grid(dims...)</i> grid<b>)</b> - transforms this grid into a sequence of integer messages. <br> - <br><b>outlet 0 </b><b>method</b> 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> class </b><a name="#export_list">#export_list</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><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> init <b>(</b><b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> 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 0 </b><b>method</b> 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> class </b><a name="#export_symbol">#export_symbol</a></td></tr><tr><td></td><td valign="top"><br> -<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> init <b>(</b><b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> 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 0 </b><b>method</b> 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> class </b><a name="#pack">#pack</a></td></tr><tr><td></td><td valign="top"><br> -<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> trigger_by <b>(</b><b><i>TriggerBy</i> trigger_by</b><b>)</b> <br><b>method</b> init <b>(</b><i>integer</i> inputs<b>)</b> <br> - <br><b>inlet * </b><b>method</b> int <b>(</b><b>)</b> <br> - <br><b>outlet 0 </b><b>method</b> 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> class </b><a name="#color">#color</a></td></tr><tr><td></td><td valign="top"><br> -<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> 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 0 </b><b>method</b> grid <b>(</b><b>)</b> - changes all three values (R,G,B). The grid must - be a Dim(3). <br> - <br><b>inlet 0 </b><b>method</b> 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 0 </b><b>method</b> 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> class </b><a name="#unpack">#unpack</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> init <b>(</b><i>integer</i> outputs<b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> 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 * </b><b>method</b> int <b>(</b><b>)</b> <br> - <br></td></tr><tr><td></td><td></td><td> </td></tr> -<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#centroid">#centroid</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> init <b>(</b><b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> 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 0 </b><b>method</b> 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> class </b><a name="#for">#for</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><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> 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 0 </b><b>method</b> grid <b>(</b><i>grid(index)</i> grid<b>)</b> - replaces the "from" value and produces output. <br> - <br><b>inlet 1 </b><b>method</b> grid <b>(</b><i>grid(index)</i> grid<b>)</b> - replaces the "to" value. <br> - <br><b>inlet 2 </b><b>method</b> grid <b>(</b><i>grid(index_steps)</i> grid<b>)</b> - replaces the "step" value. <br> - <br><b>outlet 0 </b><b>method</b> 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 0 </b><b>method</b> 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> </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> class </b><a name="#">#</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>attr</b> op <b>(</b><b><i>grid</i> op</b><b>)</b> <br><b>attr</b> 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> init <b>(</b>op<b>, </b>right_hand<b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> 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 1 </b><b>method</b> 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 1 </b><b>method</b> 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 0 </b><b>method</b> 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> class </b><a name="@complex_sq">@complex_sq</a></td></tr><tr><td></td><td valign="top"><br> -<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 0 </b><b>method</b> grid <b>(</b><i>grid(dims... {imaginary real})</i> grid<b>)</b> <br> - <br><b>outlet 0 </b><b>method</b> 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> class </b><a name="#fold">#fold</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><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 & 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> 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 0 </b><b>method</b> 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> class </b><a name="#scan">#scan</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><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> init <b>(</b><i>numop2</i> operator<b>, </b><i>grid</i> seed<b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> 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> class </b><a name="#outer">#outer</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> 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 0 </b><b>method</b> 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 1 </b><b>method</b> 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> class </b><a name="#inner">#inner</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><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> init <b>(</b><i>grid</i> right_hand<b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> 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 0 </b><b>method</b> op <b>(</b><i>numop</i> op<b>)</b> - the operation that combines the values from the two grids together. - this defaults to "*" (as in the matrix product) <br> - <br><b>inlet 0 </b><b>method</b> fold <b>(</b><i>numop</i> op<b>)</b> - the operation that combines the result of the "op" operations together. - this defaults to "+" (as in the matrix product) <br> - <br><b>inlet 1 </b><b>method</b> int <b>(</b><b>)</b> - changes the base value to that. <br> - <br><b>inlet 2 </b><b>method</b> 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> class </b><a name="@join">@join</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> 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 0 </b><b>method</b> 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 1 </b><b>method</b> 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> class </b><a name="#finished">#finished</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>inlet 0 </b><b>method</b> 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> class </b><a name="#cast">#cast</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> init <b>(</b><i>numbertype</i> numbertype<b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid</i> grid<b>)</b> any grid<br> - <br><b>outlet 0 </b><b>method</b> 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> class </b><a name="#ravel">#ravel</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid</i> grid<b>)</b> any grid<br> - <br><b>outlet 0 </b><b>method</b> 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> class </b><a name="#grade">#grade</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid</i> grid<b>)</b> any grid<br> - <br><b>outlet 0 </b><b>method</b> 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> class </b><a name="#perspective">#perspective</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> init <b>(</b><i>integer</i> depth<b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid</i> grid<b>)</b> any grid<br> - <br><b>outlet 0 </b><b>method</b> 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> class </b><a name="#transpose">#transpose</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> init <b>(</b><i>integer</i> dim1<b>, </b><i>integer</i> dim2<b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> 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> class </b><a name="#fade">#fade</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> init <b>(</b><i>integer</i> rate<b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> 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> class </b><a name="#fade_lin">#fade_lin</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> init <b>(</b><i>integer</i> maxraise<b>, </b><i>integer</i> maxdrop<b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> 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> class </b><a name="#reverse">#reverse</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> 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> </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> class </b><a name="#redim">#redim</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> 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 0 </b><b>method</b> 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 1 </b><b>method</b> 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 0 </b><b>method</b> 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> class </b><a name="#store">#store</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><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> init <b>(</b><i>grid</i> contents<b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> bang <b>(</b><b>)</b> - the stored grid is fully sent to the outlet. <br> - <br><b>inlet 0 </b><b>method</b> 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 1 </b><b>method</b> 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 1 </b><b>method</b> 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 1 </b><b>method</b> 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> class </b><a name="#scale_to">#scale_to</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> init <b>(</b>size<b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid</i> grid<b>)</b> a 3-channel picture to be scaled.<br> - <br><b>inlet 1 </b><b>method</b> int <b>(</b><b>)</b> a {height width} pair.<br> - <br><b>outlet 0 </b><b>method</b> 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> class </b><a name="#scale_by">#scale_by</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> 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 0 </b><b>method</b> 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 1 </b><b>method</b> grid <b>(</b><i>grid(1 or 2)</i> grid<b>)</b> sets factor<br> - <br><b>outlet 0 </b><b>method</b> 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> class </b><a name="#downscale_by">#downscale_by</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> 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 0 </b><b>method</b> 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 1 </b><b>method</b> grid <b>(</b><i>grid(1 or 2)</i> grid<b>)</b> sets scale factor<br> - <br><b>outlet 0 </b><b>method</b> 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> class </b><a name="#spread">#spread</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><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> init <b>(</b>factor<b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid</i> grid<b>)</b> a coordinate map.<br> - <br><b>inlet 1 </b><b>method</b> int <b>(</b><b>)</b> a spread factor.<br> - <br><b>outlet 0 </b><b>method</b> 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> class </b><a name="#rotate">#rotate</a></td></tr><tr><td></td><td valign="top"><br> -<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> init <b>(</b><i>0...35999</i> angle<b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(anyA 2)</i> grid<b>)</b> <br> - <br><b>inlet 1 </b><b>method</b> int <b>(</b><b>)</b> rotation angle; 0...36000<br> - <br><b>outlet 0 </b><b>method</b> 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> class </b><a name="#remap_image">#remap_image</a></td></tr><tr><td></td><td valign="top"><br> -<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> </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> class </b><a name="#dim">#dim</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><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> init <b>(</b><b>)</b> - no arguments. <br> - <br><b>inlet 0 </b><b>method</b> 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 0 </b><b>method</b> 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> class </b><a name="#type">#type</a></td></tr><tr><td></td><td valign="top"><br> -<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 0 </b><b>method</b> <numeric type symbol> <b>(</b><b>)</b> <br> - <br></td></tr><tr><td></td><td></td><td> </td></tr> -<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#print">#print</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> init <b>(</b><b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> 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> class </b><a name="display">display</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - - GUI object equivalent to [print] and [#print]. <br><b>method</b> (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> </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> class </b><a name="#apply_colormap_channelwise">#apply_colormap_channelwise</a></td></tr><tr><td></td><td valign="top"><br> -<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 0 </b><b>method</b> grid <b>(</b><i>grid(rows columns channels)</i> grid<b>)</b> - picture <br> - <br><b>inlet 1 </b><b>method</b> grid <b>(</b><i>grid(intensities channels)</i> grid<b>)</b> - colormap ("palette") <br> - <br><b>outlet 0 </b><b>method</b> 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> class </b><a name="#rgb_to_greyscale">#rgb_to_greyscale</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(rows columns {red green blue})</i> grid<b>)</b> <br> - <br><b>outlet 0 </b><b>method</b> 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> class </b><a name="#greyscale_to_rgb">#greyscale_to_rgb</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(rows columns {white})</i> grid<b>)</b> <br> - <br><b>outlet 0 </b><b>method</b> 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> class </b><a name="#yuv_to_rgb">#yuv_to_rgb</a></td></tr><tr><td></td><td valign="top"><br> -<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 0 </b><b>method</b> grid <b>(</b><i>grid(rows columns {y u v})</i> grid<b>)</b> <br> - <br><b>outlet 0 </b><b>method</b> 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> class </b><a name="#rgb_to_yuv">#rgb_to_yuv</a></td></tr><tr><td></td><td valign="top"><br> -<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 0 </b><b>method</b> grid <b>(</b><i>grid(rows columns {red green blue})</i> grid<b>)</b> <br> - <br><b>outlet 0 </b><b>method</b> 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> </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> class </b><a name="#convolve">#convolve</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><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> 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 0 </b><b>method</b> 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 1 </b><b>method</b> 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 0 </b><b>method</b> 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> class </b><a name="#contrast">#contrast</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> init <b>(</b>iwhiteness<b>, </b>contrast<b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> 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 1 </b><b>method</b> 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 2 </b><b>method</b> 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 </b><b>method</b> 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> class </b><a name="#posterize">#posterize</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><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> init <b>(</b>levels<b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(rows columns channels)</i> grid<b>)</b> - produces a posterized picture from the input picture. <br> - <br><b>inlet 1 </b><b>method</b> 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> class </b><a name="#solarize">#solarize</a></td></tr><tr><td></td><td valign="top"><br> -<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 0 </b><b>method</b> grid <b>(</b><i>grid(rows columns channels)</i> grid<b>)</b> <br> - <br><b>outlet 0 </b><b>method</b> 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> class </b><a name="#checkers">#checkers</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>inlet 0 </b><b>method</b> 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 0 </b><b>method</b> 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> class </b><a name="#layer">#layer</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>inlet 0 </b><b>method</b> 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 1 </b><b>method</b> 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 0 </b><b>method</b> 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> class </b><a name="#draw_image">#draw_image</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> 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 0 </b><b>method</b> grid <b>(</b><i>grid(y x channels)</i> grid<b>)</b> - picture onto which another picture will be superimposed. <br> - <br><b>inlet 0 </b><b>method</b> 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 0 </b><b>method</b> 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 1 </b><b>method</b> grid <b>(</b><i>grid(y x channels)</i> grid<b>)</b> - picture that will be superimposed onto another picture. <br> - <br><b>inlet 2 </b><b>method</b> 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 0 </b><b>method</b> 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> class </b><a name="#draw_polygon">#draw_polygon</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> 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 0 </b><b>method</b> grid <b>(</b><i>grid(y x channels)</i> grid<b>)</b> - picture on which the polygon will be superimposed. <br> - <br><b>inlet 1 </b><b>method</b> grid <b>(</b><i>grid(channels)</i> grid<b>)</b> - color of each pixel <br> - <br><b>inlet 2 </b><b>method</b> grid <b>(</b><i>grid(vertices {y x})</i> grid<b>)</b> - vertices of the polygon. <br> - <br><b>outlet 0 </b><b>method</b> 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> class </b><a name="#text_to_image">#text_to_image</a></td></tr><tr><td></td><td valign="top"><br> -<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> class </b><a name="#hueshift">#hueshift</a></td></tr><tr><td></td><td valign="top"><br> -<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> </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> class </b><a name="rtmetro">rtmetro</a></td></tr><tr><td></td><td valign="top"><br> -<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> class </b><a name="bindpatcher">bindpatcher</a></td></tr><tr><td></td><td valign="top"><br> -<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> 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> class </b><a name="pingpong">pingpong</a></td></tr><tr><td></td><td valign="top"><br> -<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> init <b>(</b><i>int</i> top<b>)</b> <br> - <br><b>inlet 1 </b><b>method</b> float <b>(</b><i>float</i> top<b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> 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> class </b><a name="#global">#global</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><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> profiler_reset <b>(</b><b>)</b> - resets all the time counters. <br> - <br><b>method</b> 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> class </b><a name="fps">fps</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> 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> init detailed <b>(</b><b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> 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 0 </b><b>method</b> (else) <b>(</b><b>)</b> - messages other than bangs are ignored. <br> - <br><b>outlet 0 </b><b>method</b> float <b>(</b><b>)</b> - non-detailed mode only. - this is the messages-per-second rating. <br> - <br><b>outlet 0 </b><b>method</b> 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> class </b><a name="unix_time">unix_time</a></td></tr><tr><td></td><td valign="top"><br> -<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 0 </b><b>method</b> bang <b>(</b><b>)</b> <br> - <br><b>outlet 0 </b><b>method</b> symbol <b>(</b><b>)</b> <br> -Outputs the time and date in ASCII format <br><b>outlet 1 </b><b>method</b> float <b>(</b><b>)</b> <br> -Outputs the Unix timestamp in seconds <br><b>outlet 2 </b><b>method</b> 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> class </b><a name="ls">ls</a></td></tr><tr><td></td><td valign="top"><br> -<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 0 </b><b>method</b> symbol <b>(</b><b>)</b> - lists all files in a given directory <br> - <br><b>inlet 0 </b><b>method</b> 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> class </b><a name="exec">exec</a></td></tr><tr><td></td><td valign="top"><br> -<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 0 </b><b>method</b> symbol <b>(</b><b>)</b> <br> - <br></td></tr><tr><td></td><td></td><td> </td></tr> -<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="renamefile">renamefile</a></td></tr><tr><td></td><td valign="top"><br> -<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 0 </b><b>method</b> list <b>(</b><b>)</b> <br> - <br></td></tr><tr><td></td><td></td><td> </td></tr> -<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="plotter_control">plotter_control</a></td></tr><tr><td></td><td valign="top"><br> -<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 0 </b><b>method</b> symbol <b>(</b><b>)</b> <br> - <br><b>outlet 0 </b><b>method</b> 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> class </b><a name="rubyarray">rubyarray</a></td></tr><tr><td></td><td valign="top"><br> -<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> </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> class </b><a name="fork">fork</a></td></tr><tr><td></td><td valign="top"><br> -<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 0 </b><b>method</b> (any) <b>(</b><b>)</b> <br> - <br></td></tr><tr><td></td><td></td><td> </td></tr> -<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="foreach">foreach</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>inlet 0 </b><b>method</b> 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> class </b><a name="rubysprintf">rubysprintf</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> init <b>(</b><i>symbol</i> format<b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> 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> class </b><a name="listflatten">listflatten</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>inlet 0 </b><b>method</b> list <b>(</b>...<b>)</b> <br> - <br></td></tr><tr><td></td><td></td><td> </td></tr> -<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="listmake">listmake</a></td></tr><tr><td></td><td valign="top"><br> -<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> init <b>(</b>list...<b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> bang <b>(</b><b>)</b> send "list" to outlet 0<br> - <br><b>inlet 0 </b><b>method</b> 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> class </b><a name="listlength">listlength</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>inlet 0 </b><b>method</b> 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> class </b><a name="listelement">listelement</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> init <b>(</b><i>int</i> index<b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> 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> class </b><a name="listsublist">listsublist</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> init <b>(</b><i>int</i> index<b>, </b><i>int</i> length<b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> 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> class </b><a name="listprepend">listprepend</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> init <b>(</b>list...<b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> 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> class </b><a name="listappend">listappend</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> init <b>(</b>list...<b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> 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> class </b><a name="listreverse">listreverse</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>inlet 0 </b><b>method</b> 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> class </b><a name="oneshot">oneshot</a></td></tr><tr><td></td><td valign="top"><br> -<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> class </b><a name="inv+">inv+</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> init <b>(</b><i>float</i> b<b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> 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> class </b><a name="inv*">inv*</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> init <b>(</b><i>float</i> b<b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> 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> class </b><a name="messageprepend">messageprepend</a></td></tr><tr><td></td><td valign="top"><br> -<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> init <b>(</b>list...<b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> <any> <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> class </b><a name="messageappend">messageappend</a></td></tr><tr><td></td><td valign="top"><br> -<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> init <b>(</b>list...<b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> <any> <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> class </b><a name="shunt">shunt</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - - Compatible with jMax's [demux]. <br><b>method</b> init <b>(</b>n<b>, </b>i<b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> <any> <b>(</b>...<b>)</b> - Routes a message to the active outlet. <br> - <br><b>inlet 1 </b><b>method</b> 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> class </b><a name="demux">demux</a></td></tr><tr><td></td><td valign="top"><br> -<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> class </b><a name="range">range</a></td></tr><tr><td></td><td valign="top"><br> -<br clear="left"><br><br><br clear="left"><br></td><td><br> - <br><b>method</b> init <b>(</b>separators...<b>)</b> <br> - <br><b>inlet 0 </b><b>method</b> 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 1..n </b><b>method</b> 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> </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.9.3 Documentation<br> -Copyright © 2001-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 339862d4..00000000 --- a/externals/gridflow/doc/reference.xml +++ /dev/null @@ -1,1329 +0,0 @@ -<?xml version="1.0" standalone="no" ?> -<!DOCTYPE documentation SYSTEM 'gridflow.dtd'> -<documentation title="Reference Manual: Flow Classes" indexcols="3"> -<!-- $Id: reference.xml 3897 2008-06-17 20:58:38Z alx1 $ --> -<!-- - GridFlow Reference Manual: Class Reference - Copyright (c) 2001-2007 - by Mathieu Bouchard and Alexandre Castonguay ---> - -<section name="Objects for making grids and breaking them down"> - - <class name="#to_float,#export"> - <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="#to_list,#export_list"> - <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="#to_symbol,#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="#for"> - <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="#"> - <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"> - <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 & 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"> - <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"> - <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"> - <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="right_hand" type="grid"/> - </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> - <method name="op"><arg name="op" type="numop"/> - the operation that combines the values from the two grids together. - this defaults to "*" (as in the matrix product) - </method> - <method name="fold"><arg name="op" type="numop"/> - the operation that combines the result of the "op" operations together. - this defaults to "+" (as in the matrix product) - </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"> - <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"> - <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"> - <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"> - <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"> - <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"> - <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="<numeric type symbol>"/></outlet> - </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"> - <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"> - <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"> - <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="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="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="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> -</section> - -<section name="jMax emulation"> - <p>those classes emulate jMax functionality, for use within PureData.</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="foreach"> - <inlet id="0"><method name="list"><rest/> - Outputs N messages, one per list element, in order. - </method></inlet> - </class> - <class name="listflatten"> - <inlet id="0"><method name="list"><rest/> - </method></inlet> - </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"), 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"), 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="<any>"><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="<any>"><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="<any>"><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> -</documentation> diff --git a/externals/gridflow/doc/tutorials/gf_sampling_quantization.pd b/externals/gridflow/doc/tutorials/gf_sampling_quantization.pd deleted file mode 100644 index 4f60217d..00000000 --- a/externals/gridflow/doc/tutorials/gf_sampling_quantization.pd +++ /dev/null @@ -1,57 +0,0 @@ -#N canvas 740 0 704 805 10; -#X obj 2 5 cnv 15 650 15 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 2 -30 cnv 15 700 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 0 741 cnv 15 700 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X text 14 746 GridFlow 0.9.1; -#X text 7 -23 Principles of new media; -#X text 218 152 <-- reduces the size of the image; -#X text 5 3 1.1 sampling; -#X obj 4 314 cnv 15 650 15 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 7 313 1.2 quantization; -#X text 330 85 <-- change the resampling factor (1 to 8); -#X obj 55 80 #in; -#X obj 55 32 tgl 15 0 empty empty empty 17 7 0 10 -4034 -1 -1 1 1; -#X obj 75 259 #out window \, title sampling; -#X obj 55 204 #scale_by; -#X obj 202 86 hradio 15 1 0 8 empty empty empty 0 -8 0 10 -257985 -1 --1 0; -#X obj 202 108 + 1; -#X obj 202 130 t a a; -#X text 218 152 <-- reduces the size of the image; -#X msg 123 55 open babbage.jpg; -#X obj 55 419 #out window \, title quantization; -#X text 230 53 <-- open image first; -#X floatatom 124 365 5 0 0 0 - - -; -#X obj 24 449 #downscale_by 32 smoothly; -#X obj 25 518 display; -#X obj 34 470 #out window \, title really_small_window; -#X text 133 385 <-- reduces the number of possible pixel values; -#X text 121 201 <-- increases the image size by the same factor \, -letting us see the loss of information from the original image; -#X obj 55 152 #downscale_by \, smoothly; -#X obj 127 343 hsl 128 15 2 16 0 0 empty empty empty -2 -8 0 10 -257985 --1 -1 3300 1; -#X obj 55 54 metro 100; -#X obj 55 385 #posterize 2; -#X text 262 342 <-- number of tones per channel; -#X connect 10 0 27 0; -#X connect 11 0 29 0; -#X connect 13 0 12 0; -#X connect 13 0 30 0; -#X connect 14 0 15 0; -#X connect 15 0 16 0; -#X connect 16 0 27 1; -#X connect 16 1 13 1; -#X connect 18 0 10 0; -#X connect 21 0 30 1; -#X connect 22 0 23 0; -#X connect 22 0 24 0; -#X connect 27 0 13 0; -#X connect 28 0 21 0; -#X connect 29 0 10 0; -#X connect 30 0 19 0; -#X connect 30 0 22 0; diff --git a/externals/gridflow/doc/tutorials/gf_tutorial_grid_1.pd b/externals/gridflow/doc/tutorials/gf_tutorial_grid_1.pd deleted file mode 100644 index e86ff88f..00000000 --- a/externals/gridflow/doc/tutorials/gf_tutorial_grid_1.pd +++ /dev/null @@ -1,25 +0,0 @@ -#N canvas 363 183 701 242 10; -#X obj 2 5 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 2 -30 cnv 15 700 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X text 5 5 1.1 What is a grid?; -#X text 7 -23 1 Introduction to Grids; -#X obj 0 178 cnv 15 700 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 523 56 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X obj 537 119 #out window; -#X obj 537 88 #in david.jpg; -#X text 14 183 GridFlow 0.9.0; -#X text 5 28 A grid is composed of rows and columns that contain numeric -data. GridFlow usually interprets images as three-dimensional grids -with rows (height) and columns (width). Each channel is a single colour -\, usually red \, green and blue (RGB). The channels make up the colour -information of an image. Videos are also interpreted as grids since -each frame is a still image.; -#X text 5 125 GridFlow objects that accept or produce grids are identified -by the number sign "#" (a mini grid). From now on \, the term "grid" -is used to identify an image or video.; -#X connect 5 0 7 0; -#X connect 7 0 6 0; diff --git a/externals/gridflow/doc/tutorials/gf_tutorial_grid_2.pd b/externals/gridflow/doc/tutorials/gf_tutorial_grid_2.pd deleted file mode 100644 index 59aecb1a..00000000 --- a/externals/gridflow/doc/tutorials/gf_tutorial_grid_2.pd +++ /dev/null @@ -1,64 +0,0 @@ -#N canvas 376 138 1022 422 10; -#X obj 1 14 cnv 15 460 15 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 4 14 1.2 How to create a grid.; -#X obj 1 14 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 5 14 1.2 Creating a grid using the [#import] object.; -#X text 5 40 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 must be connected to tell the grid which numbers -to display.; -#X text 6 109 Steps to create a grid:; -#X text 7 134 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. -Note how the numbers are positioned in the grid from left to right -and from the top to the bottom.; -#X text 7 229 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. -A 3 by 3 grid will displays 9 numbers.; -#X text 8 291 3 - Connect the objects to a [display] object or a [print] -object to see the resulting grid. You can alter your grid without actually -seeing the image.; -#X obj 1 -30 cnv 15 1020 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 1 -30 cnv 15 780 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X text 6 -23 1 Introduction to Grids; -#X obj 1 356 cnv 15 1020 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 479 285 display; -#X msg 547 154 reset; -#X obj 476 15 cnv 15 545 15 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 476 15 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 673 50 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577 -0; -#X obj 478 223 cnv 15 92 15 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 478 222 #import (3 3); -#X msg 478 51 1 2 3 4 5 6 7 8 9; -#X msg 535 99 1 2 3 4; -#X text 483 15 1.2 Patch example.; -#X text 610 155 <-- resets the grid to only display the numbers from -the list; -#X obj 652 217 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577 -0; -#X text 610 97 <-- click here three times to see how [#import] only -outputs a grid once it recieves the number of values associated with -its dimensions; -#X text 590 217 <-- step 2: click here to create a grid that has 3 -rows and 3 columns (try changing these numbers to alter the dimensions -of the grid).; -#X text 592 287 <-- the display object outputs results.; -#X text 611 50 <-- step 1: click here to view the numbers from the -list in a grid.; -#X text 9 363 GridFlow 0.9.0; -#X connect 14 0 19 0; -#X connect 19 0 13 0; -#X connect 20 0 19 0; -#X connect 21 0 19 0; diff --git a/externals/gridflow/doc/tutorials/gf_tutorial_grid_3.pd b/externals/gridflow/doc/tutorials/gf_tutorial_grid_3.pd deleted file mode 100644 index 4e5e5778..00000000 --- a/externals/gridflow/doc/tutorials/gf_tutorial_grid_3.pd +++ /dev/null @@ -1,30 +0,0 @@ -#N canvas 106 132 652 402 10; -#X obj 7 11 cnv 15 640 15 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 10 11 1.2 How to create a grid.; -#X obj 7 11 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 11 11 1.3 Creating a grid using the [# + 0] object.; -#X obj 7 -29 cnv 15 640 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X text 12 -22 1 Introduction to Grids; -#X obj 279 117 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577 -0; -#X text 216 255 <-- the display object outputs results.; -#X text 217 116 <-- step 1: click on either message box to view the -numbers from the list in a grid.; -#X text 9 36 The [# + 0] object works like [#import] but allows you -to put your grid parameters and values into one message box instead -of having to insert them into the object box.; -#X obj 5 337 cnv 15 640 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X msg 16 113 3 3 # 6 1 3 6 3 324 6 3 4; -#X msg 37 159 3 3 # 1 0 0 0; -#X obj 17 254 display; -#X obj 16 204 cnv 15 37 15 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 16 203 # + 0; -#X text 14 345 GridFlow 0.8.4; -#X connect 11 0 15 0; -#X connect 12 0 15 0; -#X connect 15 0 13 0; diff --git a/externals/gridflow/doc/tutorials/gf_tutorial_image_1.pd b/externals/gridflow/doc/tutorials/gf_tutorial_image_1.pd deleted file mode 100644 index 1c0fa483..00000000 --- a/externals/gridflow/doc/tutorials/gf_tutorial_image_1.pd +++ /dev/null @@ -1,65 +0,0 @@ -#N canvas 523 65 902 461 10; -#X obj 4 323 cnv 15 900 30 empty empty empty 20 12 0 14 -233017 -66577 -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 900 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 obj 450 -67 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 453 -67 1.2 How to create a grid.; -#X obj 450 -67 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 112 167 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 621 48 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577 -0; -#X obj 621 100 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577 -0; -#X text 557 99 <-- step #2 : click here to update the image; -#X text 556 47 <-- step #1 : click here to load the image; -#X text 8 169 step 3: Add a; -#X text 7 136 step 2: Create [#in] object; -#X text 8 202 step 4: Create a [#out window]; -#X text 6 98 step 1:; -#X obj 450 264 cnv 15 25 15 empty empty empty 20 12 0 14 -260818 -66577 -0; -#X text 449 264 Tip:; -#X text 485 263 Remember \, as with the rest of PD \, you can obtain -information regarding specific objects by right-clicking on it. Try -this for [#in].; -#X text 6 250 GridFlow accepts several image formats including .jpg -\, .png \, .tiff.; -#X text 449 213 The [#out window] object must be deleted in order to -close the display window the image is in.; -#X text 8 -46 The following steps outline the items that you need to -open a grid. Whether it be an image or a video you want to open theses -four steps are necessary.; -#X text 8 2 In order for GridFlow to recognize your media files by -file name you have to put them in the "images" folder (located within -the GridFlow directory). Another way to locate an image is to specify -the path to where it is saved on your hard drive in the message box. -; -#X text 452 -46 To view the image you must initialize the patch. Click -on the message box \, and then on the bang (this must be done in the -run mode). The image will appear in a display window \, off to the -side of the patch. Sometimes the display window opens behind the patch -\, try moving the patch if the display seems to be missing.; -#X text 459 -66 2.1 Patch Example; -#X text 8 -68 2.1 Opening an Image; -#X obj 450 140 cnv 15 22 15 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 450 180 #out window; -#X msg 450 48 open b001.jpg; -#X obj 534 99 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X obj 450 139 #in; -#X text 62 113 extension you want to open; -#X text 63 99 Create message box [open< with the file name and; -#X text 11 329 GridFlow 0.9.0; -#X connect 29 0 31 0; -#X connect 30 0 31 0; -#X connect 31 0 28 0; diff --git a/externals/gridflow/doc/tutorials/gf_tutorial_image_2.pd b/externals/gridflow/doc/tutorials/gf_tutorial_image_2.pd deleted file mode 100644 index affb33b7..00000000 --- a/externals/gridflow/doc/tutorials/gf_tutorial_image_2.pd +++ /dev/null @@ -1,63 +0,0 @@ -#N canvas 257 0 660 624 10; -#X obj 3 -37 cnv 15 653 15 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 3 -72 cnv 15 653 30 empty empty empty 20 12 0 14 -233017 -355 -0; -#X obj 3 517 cnv 15 653 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 268 271 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577 -0; -#X obj 152 134 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577 -0; -#X text 88 133 <-- step #2 : start the metro; -#X obj 203 363 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577 -0; -#X obj 246 465 cnv 15 20 15 empty empty empty 20 12 0 14 -260818 -66577 -0; -#X text 111 159 the metro refreshes the display window so you don't -have to reload the grid every time it's altered.; -#X text 204 271 <-- step #1 : load the image; -#X text 245 464 Tip: try replacing this number box with a slider.; -#X text 139 363 <-- step #3 : change the grid's vertical parameters -; -#X obj 247 405 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577 -0; -#X text 15 -38 2.2 Resizing an image; -#X text 10 82 [# pack] lets you resize grids by altering the vertical -and horizontal parameters.; -#X text 10 34 If you want to make your image four times its size \, -you would have to insert a 4 into the object \; [#scale_by 4].; -#X text 9 -10 [#scale_by] resizes grids by multiplying its parameters -(width and height). To resize an image proportionatly a specific scaling -size must be identified within the object.; -#X text 183 405 <-- step #4 : change the grid's horizontal parameters -; -#X text 17 -67 2 Introduction to Images; -#X obj 16 177 metro 10; -#X obj 16 135 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1 -; -#X floatatom 74 368 5 1 4 0 - - -; -#X obj 16 482 #out window; -#X obj 53 295 #in; -#X msg 53 272 load bluemarble.jpg; -#X obj 74 431 #pack 2; -#X obj 16 319 #store; -#X obj 16 319 #store; -#X obj 53 249 loadbang; -#X obj 17 458 cnv 15 63 15 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 16 457 #scale_by; -#X floatatom 118 406 5 0 0 0 - - -; -#X text 11 524 GridFlow 0.8.4; -#X connect 19 0 26 0; -#X connect 19 0 27 0; -#X connect 20 0 19 0; -#X connect 21 0 25 0; -#X connect 23 0 26 1; -#X connect 23 0 27 1; -#X connect 24 0 23 0; -#X connect 25 0 30 1; -#X connect 27 0 30 0; -#X connect 28 0 24 0; -#X connect 30 0 22 0; -#X connect 31 0 25 1; diff --git a/externals/gridflow/doc/tutorials/gf_tutorial_image_3.pd b/externals/gridflow/doc/tutorials/gf_tutorial_image_3.pd deleted file mode 100644 index 03d8c056..00000000 --- a/externals/gridflow/doc/tutorials/gf_tutorial_image_3.pd +++ /dev/null @@ -1,84 +0,0 @@ -#N canvas 0 87 993 482 10; -#X obj 6 38 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 6 3 cnv 15 1000 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 5 149 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 530 134 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X obj 484 163 #in; -#X obj 484 191 cnv 15 42 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X text 8 180 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 text 7 69 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 in GridFlow \, some are very basic -while others are more advanced.; -#X text 9 234 Numeric Operators (numop): transform grids by applying -a mathematical operation to each pixel value.; -#X obj 6 455 cnv 15 1000 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X text 18 37 2.3 Image Manipulation; -#X text 17 148 Image Manipulation Using Numeric Operators; -#X text 8 277 To transform a grid the numop must first be given an -argument. That argument will be applied to every pixel in the grid. -The following three examples show some ways to give the numop an argument. -; -#X obj 460 38 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 465 62 Altering a grid by placing an argument directly into -the numop object.; -#X obj 560 343 cnv 15 42 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 561 382 display; -#X msg 483 278 1 2 3 4 5 6 7 8 9; -#X obj 483 307 #import (3 3); -#X obj 484 382 display; -#X obj 10 38 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 22 37 2.3 Image Manipulation; -#X obj 10 38 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 22 37 2.3 Image Manipulation; -#X obj 672 103 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577 -0; -#X obj 11 352 cnv 15 20 15 empty empty empty 20 12 0 14 -260818 -66577 -0; -#X text 422 361 --->; -#X text 608 103 <-- step #1 : click here to load the image; -#X obj 672 133 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577 -0; -#X obj 624 189 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577 -0; -#X text 608 133 <-- step #2 : click here to view the image; -#X text 658 201 the value (42); -#X text 560 188 <-- step #3 : try altering the argument by changing -; -#X obj 691 276 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577 -0; -#X obj 691 342 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577 -0; -#X text 627 276 <-- step #1 : click here to load the grid; -#X text 20 8 2 Introduction to Images; -#X text 472 37 2.3 Patch Example 1; -#X text 9 352 Tip: To understand how pixels are affected by the numop -test out this numeric grid patch. Each grid value that is output is -multiplied by 42; -#X obj 484 220 #out window; -#X obj 484 191 # * 42; -#X text 727 360 by changing the value (42); -#X text 628 342 <-- step #2 : try altering the argument; -#X obj 560 343 # * 42; -#X text 14 463 GridFlow 0.8.4; -#X msg 484 106 open working.jpg; -#X connect 3 0 4 0; -#X connect 4 0 40 0; -#X connect 17 0 18 0; -#X connect 18 0 19 0; -#X connect 18 0 43 0; -#X connect 40 0 39 0; -#X connect 43 0 16 0; -#X connect 45 0 4 0; diff --git a/externals/gridflow/doc/tutorials/gf_tutorial_image_4.pd b/externals/gridflow/doc/tutorials/gf_tutorial_image_4.pd deleted file mode 100644 index ca6eae3f..00000000 --- a/externals/gridflow/doc/tutorials/gf_tutorial_image_4.pd +++ /dev/null @@ -1,49 +0,0 @@ -#N canvas 240 75 554 435 10; -#X obj 23 -109 #in; -#X obj 95 -59 cnv 15 25 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 95 -84 cnv 15 25 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 96 -34 cnv 15 25 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X msg 95 -59 67; -#X msg 95 -84 2; -#X msg 96 -34 199; -#X text 146 -153 <--; -#X text 145 -82 <--; -#X text 145 -59 <--; -#X text 145 -37 <--; -#X obj 58 -148 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X obj 4 -299 cnv 15 550 15 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 4 -334 cnv 15 550 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 5 69 cnv 15 550 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X text 18 -329 2 Introduction to Images; -#X text 15 -301 2.3 Patch Example 2; -#X text 12 -269 Altering a grid by sending numop an argument using -a message box. This method allows you to send the numop several different -arguments.; -#X obj 209 -206 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577 -0; -#X obj 210 -152 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577 -0; -#X text 145 -206 <-- step #2 : click here to load the image; -#X text 174 -153 Step #3: click on the bang to see the updated image -; -#X obj 215 -59 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577 -0; -#X text 179 -59 step #1 : click on one of the arguments; -#X text 14 77 GridFlow 0.8.4; -#X obj 23 33 #out window; -#X msg 23 -206 open working.jpg; -#X obj 23 -35 # * 1; -#X connect 0 0 27 0; -#X connect 4 0 27 1; -#X connect 5 0 27 1; -#X connect 6 0 27 1; -#X connect 11 0 0 0; -#X connect 26 0 0 0; -#X connect 27 0 25 0; diff --git a/externals/gridflow/doc/tutorials/gf_tutorial_image_5.pd b/externals/gridflow/doc/tutorials/gf_tutorial_image_5.pd deleted file mode 100644 index a0226c88..00000000 --- a/externals/gridflow/doc/tutorials/gf_tutorial_image_5.pd +++ /dev/null @@ -1,52 +0,0 @@ -#N canvas 559 20 560 533 10; -#X obj 2 37 cnv 15 550 15 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 2 2 cnv 15 550 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 2 501 cnv 15 550 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X text 16 7 2 Introduction to Images; -#X text 14 36 2.3 Patch Example 3; -#X text 2 58 Altering a grid using numop with slider and metro. This -combination allows you to scroll through values and modify a grid in -real time.; -#X obj 19 338 cnv 15 38 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 225 207 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577 -0; -#X obj 280 294 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577 -0; -#X text 314 306 the slider; -#X obj 223 122 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577 -0; -#X obj 224 162 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577 -0; -#X obj 21 252 #in; -#X obj 54 295 hsl 128 15 0 255 0 0 empty empty empty -2 -6 0 8 -260818 --1 -1 0 1; -#X obj 53 228 metro 33.3; -#X obj 53 206 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 1 1 -; -#X floatatom 72 326 5 0 0 0 - - -; -#X obj 50 165 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X obj 21 398 #out window; -#X msg 21 121 open scissors.jpg; -#X obj 21 338 # + 0; -#X text 159 122 <-- step #1 : click here to load the image; -#X text 161 206 <-- step #2 : start the metro; -#X text 160 162 <-- step #2 : click here to view the image; -#X text 223 184 or; -#X text 216 294 <-- step #3 : try altering the argument by using; -#X text 11 509 GridFlow 0.9.0; -#X text 4 443 These examples use the [# +] numop. There are several -numeric operators \; they can be found in the numeric operator help -patch (right click on the [# + 0] and select help to view them).; -#X connect 12 0 20 0; -#X connect 13 0 16 0; -#X connect 13 0 20 1; -#X connect 14 0 12 0; -#X connect 15 0 14 0; -#X connect 17 0 12 0; -#X connect 19 0 12 0; -#X connect 20 0 18 0; diff --git a/externals/gridflow/doc/tutorials/gf_tutorial_image_6.pd b/externals/gridflow/doc/tutorials/gf_tutorial_image_6.pd deleted file mode 100644 index e595e5b1..00000000 --- a/externals/gridflow/doc/tutorials/gf_tutorial_image_6.pd +++ /dev/null @@ -1,66 +0,0 @@ -#N canvas 130 10 767 676 10; -#X obj 7 -69 cnv 15 760 15 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 2 425 cnv 15 760 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 4 -220 cnv 15 760 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X text 18 -215 2 Introduction to Images; -#X obj 5 -183 cnv 15 760 15 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 12 -155 When an image is represented as a grid every pixel -value will vary between 0 and 255 Colour wrapping occurs when the result -of an operation on the pixel value is 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 17 -184 2.4 Colour Wrapping; -#X text 15 -69 2.4 [#clip]; -#X text 11 -44 The [#clip] object is used with numops in order to set -a lower and upper range to pixel values. This allows you to avoid over -saturating the colours of your grid.; -#X obj 163 83 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577 -0; -#X obj 19 254 cnv 15 38 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 53 161 hsl 128 15 0 255 0 0 empty empty empty -2 -6 0 8 -260818 --1 -1 0 1; -#X obj 20 56 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1; -#X obj 50 353 #clip; -#X obj 20 78 metro 33.3; -#X obj 75 185 #color; -#X obj 20 385 #out window; -#X obj 20 314 shunt; -#X obj 50 288 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1 -; -#X obj 3 107 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1 -; -#X text 296 211 channel at a time; -#X text 268 196 <-- use colour specific sliders to add values to one -; -#X obj 147 288 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577 -0; -#X text 179 288 click here to redirect the flow of data using the [shunt] -object and see the effect of [#clip]; -#X text 100 83 <-- step #1 : start the metro; -#X text 199 160 <-- use slider to add values to all channels at once -; -#X text 9 432 GridFlow 0.8.4; -#X obj 20 136 #store; -#X obj 66 136 #in sewing.jpg; -#X obj 20 254 # + 0; -#X obj 66 117 loadbang; -#X text 84 288 <-- step #2 :; -#X connect 11 0 29 1; -#X connect 12 0 14 0; -#X connect 13 0 16 0; -#X connect 14 0 27 0; -#X connect 15 0 29 1; -#X connect 17 0 16 0; -#X connect 17 1 13 0; -#X connect 18 0 17 1; -#X connect 19 0 27 0; -#X connect 27 0 29 0; -#X connect 28 0 27 1; -#X connect 29 0 17 0; -#X connect 30 0 28 0; diff --git a/externals/gridflow/doc/tutorials/gf_tutorial_image_7.pd b/externals/gridflow/doc/tutorials/gf_tutorial_image_7.pd deleted file mode 100644 index d7704291..00000000 --- a/externals/gridflow/doc/tutorials/gf_tutorial_image_7.pd +++ /dev/null @@ -1,36 +0,0 @@ -#N canvas 79 206 438 353 10; -#X obj 2 -37 cnv 15 430 15 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 2 -72 cnv 15 430 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 3 244 cnv 15 430 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X text 4 -15 To convert an image to greyscale use [#rgb_to_greyscale]. -It converts a colour information into a black to white gradient.; -#X obj 12 207 cnv 15 25 15 empty empty empty 20 12 0 14 -260818 -66577 -0; -#X text 11 207 Tip:; -#X text 48 201 If you have trouble opening this image refer back to -previous tutorials.; -#X text 16 -67 2 Introduction to Images; -#X text 16 -37 2.5 Greyscale; -#X obj 14 125 cnv 15 110 16 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 15 71 #in; -#X obj 27 51 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1 -; -#X msg 15 27 open working.jpg; -#X text 11 252 GridFlow 0.9.0; -#X obj 15 124 #rgb_to_greyscale; -#X obj 15 145 #greyscale_to_rgb; -#X obj 15 172 #out window \, title greyscale; -#X obj 157 91 #out window \, title original; -#X obj 15 94 t a a; -#X text 124 144 [#out window] still only accepts rgb images; -#X connect 10 0 18 0; -#X connect 11 0 10 0; -#X connect 12 0 10 0; -#X connect 14 0 15 0; -#X connect 15 0 16 0; -#X connect 18 0 14 0; -#X connect 18 1 17 0; diff --git a/externals/gridflow/doc/tutorials/gf_tutorial_image_8.pd b/externals/gridflow/doc/tutorials/gf_tutorial_image_8.pd deleted file mode 100644 index 1697e73b..00000000 --- a/externals/gridflow/doc/tutorials/gf_tutorial_image_8.pd +++ /dev/null @@ -1,61 +0,0 @@ -#N canvas 29 52 836 433 10; -#X obj 3 347 cnv 15 830 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj 4 -18 cnv 15 830 15 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj 4 -52 cnv 15 830 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X text 11 -46 2 Introduction to Images; -#X text 10 -18 2.6 Remap Image; -#X obj 261 229 cnv 15 25 15 empty empty empty 20 12 0 14 -260818 -66577 -0; -#X text 260 229 Tip:; -#X text 290 228 This is a numeric operator. Right click on it for more -information or go back to the tutorial about the numeric operator. -; -#X obj 272 77 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577 -0; -#X obj 321 188 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577 -0; -#X text 355 200 number box to transform image; -#X obj 21 267 cnv 15 85 15 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 20 77 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1 -; -#X obj 20 166 #in; -#X obj 20 104 t b b; -#X obj 99 290 #print; -#X obj 191 128 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X floatatom 210 189 5 0 0 0 - - -; -#X obj 180 152 #for (0 0) (240 320) (1 1); -#X obj 180 102 metro 100; -#X obj 180 77 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 1 1 -; -#X obj 20 266 #remap_image; -#X obj 180 227 # / 1; -#X obj 20 315 #out window; -#X text 231 228 <--; -#X text 11 354 GridFlow 0.8.4; -#X msg 50 135 open working.jpg; -#X obj 110 77 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577 -0; -#X text 12 7 Each numeric operator applies unique effects to a grid. -The standard effect changes when numop is used in combination with -the [#remap_image] object.; -#X text 46 75 <-- step #1; -#X text 207 77 <-- step #2 : start the metro; -#X text 258 188 <-- step #3 : click and drag cursor over; -#X connect 12 0 14 0; -#X connect 13 0 21 0; -#X connect 14 0 13 0; -#X connect 14 1 26 0; -#X connect 16 0 18 0; -#X connect 17 0 22 1; -#X connect 18 0 22 0; -#X connect 19 0 18 0; -#X connect 20 0 19 0; -#X connect 21 0 23 0; -#X connect 21 1 15 0; -#X connect 22 0 21 1; -#X connect 26 0 13 0; diff --git a/externals/gridflow/doc/tutorials/gf_tutorial_image_9.pd b/externals/gridflow/doc/tutorials/gf_tutorial_image_9.pd deleted file mode 100644 index b7684734..00000000 --- a/externals/gridflow/doc/tutorials/gf_tutorial_image_9.pd +++ /dev/null @@ -1,65 +0,0 @@ -#N canvas 157 13 867 556 10; -#X obj -14 522 cnv 15 862 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj -14 34 cnv 15 865 15 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X obj -14 -1 cnv 15 870 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X text -9 5 2 Introduction to Images; -#X text -9 33 2.6 [#convolve]; -#X obj 147 258 #store; -#X obj 147 362 # / 9; -#X msg 297 372 3 3 # 1 1 1 1 1 1 1 1 1; -#X obj -5 353 #out window; -#X obj -5 160 #in; -#X obj 147 177 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1 -; -#X obj -5 119 loadbang; -#X obj 147 206 metro 33.3667; -#X obj -5 218 t a; -#X obj 147 335 #convolve \, seed 4; -#X obj 297 339 loadbang; -#X obj 297 445 display; -#X obj 147 411 #clip; -#X obj 529 390 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577 -0; -#X obj 228 141 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577 -0; -#X obj 229 175 cnv 15 15 15 empty empty empty 20 12 0 14 -259603 -66577 -0; -#X text 164 140 <-- step #1 : load image; -#X text 166 175 <-- step #3 : start metro; -#X obj 297 316 cnv 15 110 15 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X text 331 316 Blurs; -#X text 562 389 apply effect by selecting a message box; -#X text 202 253 <-- The [#store] object stores the last grid that [#convolve] -was applied to. Everytime time the metro bangs \, [#convolve] is applied -to the grid retained in this object \, therefore applying effect on -top of effect.; -#X text 465 390 <-- step #2 :; -#X text -8 529 GridFlow 0.9.0; -#X text -18 502 ((Source convolve.pd : Copyright Mathieu Bouchard 2002) -; -#X msg 296 415 3 3 # 4 0 -1 3 1 0 0 0 4; -#X text -9 55 [#convolve] allows you to apply preset effects such as -blur \, edge sharpen and emboss onto a grid. In this example you can -create two different kinds of "blurs" on an image.; -#X msg -5 140 load working.jpg; -#X obj 147 387 # abs-; -#X connect 5 0 14 0; -#X connect 6 0 33 0; -#X connect 7 0 14 1; -#X connect 9 0 13 0; -#X connect 10 0 12 0; -#X connect 11 0 32 0; -#X connect 12 0 5 0; -#X connect 13 0 5 1; -#X connect 13 0 8 0; -#X connect 14 0 6 0; -#X connect 15 0 7 0; -#X connect 17 0 13 0; -#X connect 30 0 14 1; -#X connect 30 0 16 0; -#X connect 32 0 9 0; -#X connect 33 0 17 0; diff --git a/externals/gridflow/doc/tutorials/gf_tutorial_intro.pd b/externals/gridflow/doc/tutorials/gf_tutorial_intro.pd deleted file mode 100644 index 9113ebb0..00000000 --- a/externals/gridflow/doc/tutorials/gf_tutorial_intro.pd +++ /dev/null @@ -1,86 +0,0 @@ -#N canvas 160 16 884 589 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 obj 6 46 cnv 15 430 15 empty empty empty 20 12 0 14 -179884 -66577 -0; -#X obj 4 232 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 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 obj 446 46 cnv 15 430 15 empty empty empty 20 12 0 14 -179884 -66577 -0; -#X text 645 477 Interfacing with sensors; -#X obj 467 426 pddp_open GridFlow-6; -#X obj 467 452 pddp_open GridFlow-7; -#X text 451 236 2 Introduction to 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 235 cnv 15 15 15 empty empty empty 20 12 0 14 -262144 -66577 -0; -#X text 452 395 4 Intermediate GridFlow; -#X text 10 235 1 Introduction to Pure-Data; -#X text 11 395 3 Intermediate Pure-Data; -#X text 582 563 Stephanie Brodeur and Darsha Hewitt 2006; -#X text 451 46 What is GridFlow?; -#X text 500 550 What is GridFlow? and GridFlow tutorials developed -by; -#X text 453 84 GridFlow is a plug-in for PureData that introduces the -grid (#) 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 11 46 What is PureData (aka PD)?; -#X text 14 85 PureData is an open-source patching environment for multi-media -(audio+image). PureData is a programming language where you create -relationships by connecting visual boxes (rather than typing complex -commands).; -#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.; -#X text 15 141 A basic understanding of PureData is useful when using -GridFlow. If you are new to the PureData programming environment it -is recommended that you follow the Introduction to PureData before -you move onto the GridFlow tutorials.; -#X text 10 13 Welcome to PureData; -#X text 13 551 What is PureData? and PureData tutorials copyright Ben -Bogart 2005 \; (See COPYING.TXT for details); -#X text 642 340 Introduction to live video; -#X text 641 273 Introduction to grids; -#X text 639 296 Introduction to images; -#X text 653 480; -#X obj 467 477 pddp_open GridFlow-8; -#X text 646 451 Motion detection; -#X text 646 426 Advanced video effects; diff --git a/externals/gridflow/doc/tutorials/grid-intro.pd b/externals/gridflow/doc/tutorials/grid-intro.pd deleted file mode 100644 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/pure-data-1.pd b/externals/gridflow/doc/tutorials/pure-data-1.pd deleted file mode 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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/examples/binary_operations.pd b/externals/gridflow/examples/binary_operations.pd deleted file mode 100644 index cf4df98a..00000000 --- a/externals/gridflow/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/examples/blob.pd b/externals/gridflow/examples/blob.pd deleted file mode 100644 index c131ded5..00000000 --- a/externals/gridflow/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 1 1; -#X obj 75 427 #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 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 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 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 402 #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 obj 75 354 #draw_polygon + (3 #); -#X obj 261 494 # + (120 160); -#X obj 19 72 metro 33.367; -#X connect 0 0 9 1; -#X connect 1 0 17 0; -#X connect 2 0 3 0; -#X connect 3 0 26 1; -#X connect 4 0 5 1; -#X connect 5 0 51 0; -#X connect 6 0 53 0; -#X connect 7 0 5 1; -#X connect 8 0 50 1; -#X connect 9 0 0 0; -#X connect 9 0 31 0; -#X connect 10 0 50 1; -#X connect 11 0 13 0; -#X connect 13 0 38 1; -#X connect 14 0 5 1; -#X connect 17 0 9 0; -#X connect 19 0 2 0; -#X connect 20 0 54 0; -#X connect 22 0 52 2; -#X connect 23 0 6 1; -#X connect 25 0 30 0; -#X connect 26 0 52 0; -#X connect 30 0 26 0; -#X connect 30 1 18 0; -#X connect 31 0 32 0; -#X connect 31 1 5 0; -#X connect 31 2 38 0; -#X connect 32 0 45 0; -#X connect 37 0 50 1; -#X connect 38 0 50 0; -#X connect 39 0 52 1; -#X connect 40 0 48 0; -#X connect 45 0 22 0; -#X connect 46 0 21 0; -#X connect 48 0 39 0; -#X connect 50 0 23 0; -#X connect 51 0 6 0; -#X connect 52 0 26 1; -#X connect 52 0 46 0; -#X connect 53 0 22 1; -#X connect 54 0 25 0; 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/cellular_1d.pd b/externals/gridflow/examples/cellular_1d.pd deleted file mode 100644 index 5fa34551..00000000 --- a/externals/gridflow/examples/cellular_1d.pd +++ /dev/null @@ -1,170 +0,0 @@ -#N canvas 104 110 783 543 10; -#X obj 33 103 loadbang; -#X obj 124 361 tgl 15 0 empty empty empty 0 -6 0 8 -260818 -1 -1 0 -1; -#X obj 139 361 tgl 15 0 empty empty empty 0 -6 0 8 -260818 -1 -1 1 -1; -#X obj 154 361 tgl 15 0 empty empty empty 0 -6 0 8 -260818 -1 -1 1 -1; -#X obj 169 361 tgl 15 0 empty empty empty 0 -6 0 8 -260818 -1 -1 0 -1; -#X obj 184 361 tgl 15 0 empty empty empty 0 -6 0 8 -260818 -1 -1 1 -1; -#X obj 199 361 tgl 15 0 empty empty empty 0 -6 0 8 -260818 -1 -1 0 -1; -#X obj 214 361 tgl 15 0 empty empty empty 0 -6 0 8 -260818 -1 -1 1 -1; -#X obj 229 361 tgl 15 0 empty empty empty 0 -6 0 8 -260818 -1 -1 0 -1; -#X obj 124 452 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 --241291 -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 1 1; -#X text 92 465 characteristic number; -#X obj 221 166 nbx 2 14 1 99 0 0 empty empty empty 0 -6 0 10 -241291 --1 -1 1 256; -#X text 79 141 randomizer; -#X text 246 360 specify behaviour here; -#X text 24 234 compute new state; -#X text 245 233 make scrollie; -#X text 297 263 convert bit matrix to rgb image; -#X text 243 246 (window height = 128); -#X obj 159 74 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X obj 172 324 loadbang; -#X obj 75 182 t a a; -#X obj 444 53 loadbang; -#X msg 329 54 3 # 0; -#X msg 505 55 3 # 255; -#X text 370 55 background; -#X text 558 57 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 124 414 #fold +; -#X obj 124 433 #export; -#X obj 159 91 #for 0 256 1; -#X obj 159 110 # == 128; -#X obj 281 296 #store; -#X obj 329 74 #color; -#X obj 505 74 #color; -#X obj 423 135 #pack 6; -#X obj 17 252 #convolve (1 3 # 1 2 4); -#X obj 124 395 # << (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 281 334 #out window; -#X text -3 15 Copyright 2002 Mathieu Bouchard; -#X text -3 1 Cellular_1d; -#X text 253 166 <-- number of new lines per frame; -#X text 178 73 <-- make single dot; -#X text 100 123 restart; -#X obj 281 277 #outer ignore (0); -#X obj 327 296 #redim (2 3); -#X obj 329 134 #unpack 3; -#X obj 505 134 #unpack 3; -#X obj 159 129 #redim (1 256); -#X obj 281 315 #scale_by 2; -#N canvas 79 42 450 300 make_scrollie 0; -#X obj 41 30 inlet one_line; -#X obj 290 30 inlet number_of_lines; -#X obj 42 258 outlet grid; -#X obj 205 205 loadbang; -#X msg 205 224 1 256 # 0; -#X msg 256 87 \$1 256; -#X msg 142 82 set \$1; -#X obj 156 125 t a a; -#X obj 156 144 #finished; -#X obj 142 167 #for 1 128 1; -#X obj 142 205 #store; -#X obj 142 224 @join 0; -#X obj 142 62 max 1; -#X obj 142 186 #outer ignore (0); -#X obj 156 106 #import (1 256); -#X connect 0 0 14 0; -#X connect 1 0 12 0; -#X connect 3 0 4 0; -#X connect 4 0 10 1; -#X connect 5 0 14 1; -#X connect 6 0 9 0; -#X connect 7 0 8 0; -#X connect 7 1 11 1; -#X connect 8 0 9 0; -#X connect 9 0 13 0; -#X connect 10 0 11 0; -#X connect 11 0 10 1; -#X connect 11 0 2 0; -#X connect 12 0 6 0; -#X connect 12 0 5 0; -#X connect 13 0 10 0; -#X connect 14 0 7 0; -#X restore 114 182 pd make_scrollie; -#X obj 17 76 metro 33.3667; -#X obj 124 376 #pack 8 \, \, \, \, \, \, \, \, \,; -#X connect 0 0 12 0; -#X connect 1 0 64 0; -#X connect 2 0 64 1; -#X connect 3 0 64 2; -#X connect 4 0 64 3; -#X connect 5 0 64 4; -#X connect 6 0 64 5; -#X connect 7 0 64 6; -#X connect 8 0 64 7; -#X connect 9 0 35 1; -#X connect 10 0 32 0; -#X connect 11 0 34 0; -#X connect 12 0 31 0; -#X connect 13 0 63 0; -#X connect 15 0 62 1; -#X connect 22 0 39 0; -#X connect 23 0 2 0; -#X connect 23 0 3 0; -#X connect 23 0 7 0; -#X connect 23 0 5 0; -#X connect 24 0 32 1; -#X connect 24 1 62 0; -#X connect 25 0 26 0; -#X connect 25 0 27 0; -#X connect 26 0 42 0; -#X connect 27 0 43 0; -#X connect 30 0 33 0; -#X connect 30 1 34 1; -#X connect 31 0 24 0; -#X connect 32 0 45 0; -#X connect 33 0 11 0; -#X connect 34 0 35 0; -#X connect 35 0 36 0; -#X connect 36 0 24 0; -#X connect 37 0 38 0; -#X connect 38 0 9 0; -#X connect 39 0 40 0; -#X connect 40 0 60 0; -#X connect 41 0 61 0; -#X connect 42 0 58 0; -#X connect 43 0 59 0; -#X connect 44 0 57 0; -#X connect 45 0 30 0; -#X connect 46 0 37 0; -#X connect 56 0 41 0; -#X connect 57 0 41 1; -#X connect 58 0 44 0; -#X connect 58 1 44 1; -#X connect 58 2 44 2; -#X connect 59 0 44 3; -#X connect 59 1 44 4; -#X connect 59 2 44 5; -#X connect 60 0 24 0; -#X connect 61 0 50 0; -#X connect 62 0 56 0; -#X connect 63 0 32 0; -#X connect 64 0 46 0; diff --git a/externals/gridflow/examples/color_correction.pd b/externals/gridflow/examples/color_correction.pd deleted file mode 100644 index 93b1d9fe..00000000 --- a/externals/gridflow/examples/color_correction.pd +++ /dev/null @@ -1,151 +0,0 @@ -#N canvas 37 349 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 25 105 # inv+; -#X obj 25 67 # inv+ 255; -#X obj 85 86 inlet; -#X obj 25 31 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 25 12 inlet; -#X obj 25 86 #outer <; -#X obj 25 124 # & 255; -#X obj 25 48 #for 0 256 1; -#X obj 25 143 outlet; -#X connect 0 0 6 0; -#X connect 1 0 5 0; -#X connect 2 0 5 1; -#X connect 3 0 7 0; -#X connect 4 0 3 0; -#X connect 5 0 0 0; -#X connect 6 0 8 0; -#X connect 7 0 1 0; -#X restore 194 425 pd color correction graph generator; -#X obj 59 285 #in; -#X text 360 284 constant (brightness); -#N canvas 352 112 370 429 color-correction 0; -#X obj 23 191 # + 128; -#X obj 23 172 # /; -#X obj 23 95 # *; -#X obj 89 270 # +; -#X obj 77 95 # max 32; -#X obj 77 134 # tanh* 512; -#X obj 23 57 # gamma; -#X obj 77 114 # << 5; -#X obj 23 76 # - 128; -#X obj 23 153 # tanh* 65535; -#X obj 23 115 # >> 2; -#X obj 95 232 inlet linear; -#X obj 114 270 inlet constant; -#X obj 49 232 # *>>8; -#X obj 77 76 inlet sigma; -#X obj 67 38 inlet gamma; -#X obj 23 19 inlet image; -#X obj 89 308 outlet image; -#X obj 89 289 #clip; -#X connect 0 0 13 0; -#X connect 1 0 0 0; -#X connect 2 0 10 0; -#X connect 3 0 18 0; -#X connect 4 0 2 1; -#X connect 4 0 7 0; -#X connect 5 0 1 1; -#X connect 6 0 8 0; -#X connect 7 0 5 0; -#X connect 8 0 2 0; -#X connect 9 0 1 0; -#X connect 10 0 9 0; -#X connect 11 0 13 1; -#X connect 12 0 3 1; -#X connect 13 0 3 0; -#X connect 14 0 4 0; -#X connect 15 0 6 1; -#X connect 16 0 6 0; -#X connect 18 0 17 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 1 1; -#X obj 29 81 #for 0 256 1; -#X obj 168 340 #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 15 2 color_correction.pd; -#X obj 29 100 #outer ignore (3 #); -#X text 10 494 GridFlow 0.8.3; -#X msg 59 266 load bluemarble.jpg; -#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 44 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 36 0; -#X connect 31 0 30 0; -#X connect 31 0 32 0; -#X connect 32 0 37 0; -#X connect 32 0 35 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 44 0 18 0; -#X connect 46 0 5 0; diff --git a/externals/gridflow/examples/color_detect.pd b/externals/gridflow/examples/color_detect.pd deleted file mode 100644 index 91610cdb..00000000 --- a/externals/gridflow/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/examples/convolve.pd b/externals/gridflow/examples/convolve.pd deleted file mode 100644 index 4b6aeb67..00000000 --- a/externals/gridflow/examples/convolve.pd +++ /dev/null @@ -1,90 +0,0 @@ -#N canvas 17 90 652 511 10; -#X obj 40 102 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X obj 40 220 #store; -#X obj 136 306 # / 9; -#X obj 31 300 #out window; -#X obj 78 175 #in; -#X obj 40 66 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1; -#X text 351 75 step 1: select one of those six grids; -#X obj 78 135 loadbang; -#X obj 40 83 metro 33.3667; -#X obj 78 197 t a; -#X obj 136 287 #convolve \, seed 4; -#X obj 352 95 loadbang; -#X text 13 239 feedback loop; -#X obj 136 325 shunt 2; -#X obj 191 327 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 -1; -#X msg 307 205 0; -#X obj 183 365 # + 128; -#X msg 317 365 1; -#X obj 31 319 fps; -#X obj 31 338 print; -#X obj 5 481 cnv 15 780 30 empty empty empty 20 12 0 14 -200249 -66577 -0; -#X text 13 488 GridFlow 0.8.0; -#X text 13 488 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 18 Copyright 2002 Mathieu Bouchard; -#X text 20 5 convolve.pd; -#X text 526 282 Laplacian masks; -#X text 416 352 Sharpen; -#X text 527 107 Blurs; -#X obj 183 346 # << 4; -#X msg 78 155 open babbage.jpg \, bang; -#X obj 136 344 # abs-; -#X obj 136 392 #clip; -#X msg 416 370 3 3 # -1 -1 -1 -1 17; -#X msg 416 325 3 3 # -1 -1 -1 -1 8; -#X msg 419 302 3 3 # 0 1 0 1 -4 1 0 1 0; -#X msg 413 246 1 3 # 0 9 -9; -#X msg 413 227 1 3 # 0 2 -2; -#X msg 401 127 3 3 # 1 1 1 1 1 1 1 1 1; -#X msg 407 147 3 3 # 4 0 0 0 1 0 0 0 4; -#X msg 397 187 3 3 # 2 2 2 2 -7 2 2 2 2; -#X msg 402 207 3 3 # 0 4 0 4 9 -4 0 -4 0; -#X text 420 170 Simple edge detection; -#X obj 134 197 display; -#X obj 277 186 t a b; -#X obj 287 346 t a b; -#X obj 210 217 # +; -#X connect 0 0 1 0; -#X connect 1 0 10 0; -#X connect 2 0 13 0; -#X connect 3 0 18 0; -#X connect 4 0 9 0; -#X connect 5 0 8 0; -#X connect 7 0 30 0; -#X connect 8 0 0 0; -#X connect 9 0 1 1; -#X connect 9 0 3 0; -#X connect 10 0 2 0; -#X connect 11 0 38 0; -#X connect 13 0 31 0; -#X connect 13 1 29 0; -#X connect 14 0 13 1; -#X connect 15 0 14 0; -#X connect 16 0 32 0; -#X connect 17 0 14 0; -#X connect 18 0 19 0; -#X connect 29 0 16 0; -#X connect 30 0 4 0; -#X connect 31 0 32 0; -#X connect 32 0 9 0; -#X connect 33 0 44 0; -#X connect 34 0 45 0; -#X connect 35 0 45 0; -#X connect 36 0 45 0; -#X connect 37 0 44 0; -#X connect 38 0 44 0; -#X connect 39 0 44 0; -#X connect 40 0 44 0; -#X connect 41 0 44 0; -#X connect 44 0 46 0; -#X connect 44 1 15 0; -#X connect 45 0 46 0; -#X connect 45 1 17 0; -#X connect 46 0 10 1; -#X connect 46 0 43 0; diff --git a/externals/gridflow/examples/cross_fade.pd b/externals/gridflow/examples/cross_fade.pd deleted file mode 100644 index c612e1db..00000000 --- a/externals/gridflow/examples/cross_fade.pd +++ /dev/null @@ -1,76 +0,0 @@ -#N canvas 344 101 680 501 10; -#X obj 13 229 # *>>8; -#X text 40 253 first picture plus a fraction of the difference; -#X obj 13 251 # +; -#X obj 13 210 #store; -#X obj 211 157 # inv+; -#X obj 68 271 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 1 1; -#X obj 264 130 #in; -#X obj 13 191 #finished; -#X text 85 271 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 text 61 213 keep the difference between both pictures; -#X obj 249 91 t b b; -#X obj 249 72 loadbang; -#X obj 13 270 shunt 2; -#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 2784 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 11200 1; -#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 308 #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 obj 13 172 t a a; -#X obj 13 63 metro 33.3667; -#X obj 57 289 #cast i; -#X obj 13 153 #cast s; -#X connect 0 0 2 0; -#X connect 2 0 17 0; -#X connect 3 0 0 0; -#X connect 4 0 3 1; -#X connect 5 0 17 1; -#X connect 7 0 35 0; -#X connect 8 0 32 0; -#X connect 9 0 3 0; -#X connect 12 0 33 0; -#X connect 15 0 30 0; -#X connect 15 1 31 0; -#X connect 16 0 15 0; -#X connect 17 0 13 0; -#X connect 17 1 36 0; -#X connect 18 0 19 0; -#X connect 18 0 20 0; -#X connect 18 0 21 0; -#X connect 20 0 18 1; -#X connect 21 0 22 0; -#X connect 21 0 37 0; -#X connect 29 0 13 0; -#X connect 30 0 12 0; -#X connect 31 0 8 0; -#X connect 32 0 4 1; -#X connect 33 0 4 0; -#X connect 33 0 2 1; -#X connect 34 0 9 0; -#X connect 34 1 0 1; -#X connect 35 0 18 0; -#X connect 36 0 29 0; -#X connect 37 0 34 0; diff --git a/externals/gridflow/examples/doodle.pd b/externals/gridflow/examples/doodle.pd deleted file mode 100644 index 8999b273..00000000 --- a/externals/gridflow/examples/doodle.pd +++ /dev/null @@ -1,51 +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 183 74 t b l; -#X obj 270 93 loadbang; -#X msg 222 74 put_at ( \$1 \$2 0 ); -#X msg 270 112 0 192 255; -#X obj 22 133 #scale_by 8; -#X obj 22 262 #out window; -#X obj 22 295 #mouse; -#X obj 22 314 # / 8; -#X obj 22 333 #export_list; -#X obj 183 93 #store; -#X obj 270 131 #color; -#X obj 22 114 #store (64 64 3 #); -#X obj 200 225 #for (0 0) (8 8) (1 1); -#X obj 200 263 #fold &; -#X obj 211 203 loadbang; -#X obj 189 205 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X msg 196 168 0 0; -#X obj 22 167 #draw_image *>>8 \, tile 1; -#X obj 200 244 # !=; -#X obj 200 282 # * 128; -#X obj 200 301 #outer + (3 # 127); -#X connect 0 0 13 0; -#X connect 1 0 0 0; -#X connect 2 0 11 0; -#X connect 2 1 4 0; -#X connect 3 0 5 0; -#X connect 4 0 13 1; -#X connect 5 0 12 0; -#X connect 5 0 18 0; -#X connect 6 0 19 0; -#X connect 7 0 8 0; -#X connect 8 0 9 0; -#X connect 8 1 9 0; -#X connect 9 0 10 0; -#X connect 10 0 2 0; -#X connect 11 0 13 1; -#X connect 12 0 11 1; -#X connect 13 0 6 0; -#X connect 14 0 20 0; -#X connect 15 0 21 0; -#X connect 16 0 14 0; -#X connect 17 0 14 0; -#X connect 18 0 19 2; -#X connect 19 0 7 0; -#X connect 20 0 15 0; -#X connect 21 0 22 0; -#X connect 22 0 19 1; diff --git a/externals/gridflow/examples/drag_rectangle.pd b/externals/gridflow/examples/drag_rectangle.pd deleted file mode 100644 index 4d5bd6b7..00000000 --- a/externals/gridflow/examples/drag_rectangle.pd +++ /dev/null @@ -1,106 +0,0 @@ -#N canvas 420 110 647 484 10; -#X obj 274 73 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 1 1 -; -#X obj 274 197 #out window; -#X obj 64 224 hsl 128 15 0 319 0 0 x1_o x1_i empty -2 -8 1 10 -262144 --1 -1 8560 1; -#X obj 64 76 hsl 128 15 0 319 0 0 x0_o x0_i empty 0 8 1 10 -262144 --66577 -258699 5215 0; -#X obj 46 93 vsl 15 128 239 0 0 0 y0_o y0_i empty 0 -8 1 10 -262144 --1 -1 10840 1; -#X obj 194 93 vsl 15 128 239 0 0 0 y1_o y1_i empty 0 -8 1 10 -262144 --1 -1 7439 1; -#N canvas 463 375 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 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) (4 2 #); -#X obj 90 37 #unpack; -#X obj 154 42 #unpack; -#X obj 125 62 #pack 4; -#X connect 0 0 10 0; -#X connect 2 0 11 0; -#X connect 4 0 12 0; -#X connect 8 0 9 0; -#X connect 9 0 10 2; -#X connect 10 0 6 0; -#X connect 11 0 13 0; -#X connect 11 1 13 1; -#X connect 12 0 13 2; -#X connect 12 1 13 3; -#X connect 13 0 8 0; -#X restore 274 177 pd make_rectangle; -#X obj 274 123 metro 33.3667; -#X text 21 75 start; -#X text 198 224 end; -#X obj 371 103 loadbang; -#X obj 274 152 #store; -#X obj 436 105 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 358 197 #mouse \, ...; -#X obj 421 145 loadbang; -#X msg 421 164 0 0; -#X obj 385 241 t a; -#X obj 90 402 #out window; -#X obj 129 301 t b a; -#X obj 90 366 #store; -#X msg 91 323 set ( \$1 \$2 ); -#X obj 370 123 #in b001.jpg; -#X text 73 115 drag the mouse; -#X text 99 100 step 2:; -#X text 82 131 inside the; -#X text 80 146 first window; -#X text 261 55 step 1: turn on; -#X text 95 384 cropping (to 2nd window); -#X obj 2 453 cnv 15 640 30 empty empty empty 20 12 0 14 -200249 -66577 -0; -#X text 10 460 GridFlow 0.8.0; -#X text 10 460 GridFlow 0.8.0; -#X obj 3 3 cnv 15 640 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X text 16 16 Copyright 2002 Mathieu Bouchard; -#X text 16 3 drag_rectangle.pd; -#X obj 90 347 #for (0 0) (0 0) (1 1); -#X obj 358 359 unpack; -#X obj 493 354 unpack; -#X obj 395 378 s x0_i; -#X obj 493 392 s y1_i; -#X obj 530 373 s x1_i; -#X obj 358 397 s y0_i; -#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 21 0; -#X connect 11 0 6 0; -#X connect 12 0 21 0; -#X connect 13 0 6 1; -#X connect 13 0 20 0; -#X connect 13 0 16 0; -#X connect 13 0 35 0; -#X connect 13 1 16 0; -#X connect 13 2 16 0; -#X connect 13 2 18 0; -#X connect 14 0 15 0; -#X connect 15 0 6 1; -#X connect 15 0 6 2; -#X connect 16 0 6 2; -#X connect 16 0 36 0; -#X connect 18 0 34 0; -#X connect 18 1 34 1; -#X connect 19 0 17 0; -#X connect 20 0 34 0; -#X connect 21 0 11 1; -#X connect 21 0 19 1; -#X connect 34 0 19 0; -#X connect 35 0 40 0; -#X connect 35 1 37 0; -#X connect 36 0 38 0; -#X connect 36 1 39 0; diff --git a/externals/gridflow/examples/eclipse.pd b/externals/gridflow/examples/eclipse.pd deleted file mode 100644 index 068b1e7d..00000000 --- a/externals/gridflow/examples/eclipse.pd +++ /dev/null @@ -1,77 +0,0 @@ -#N canvas 246 45 635 533 10; -#X floatatom 342 279 5 0 0 0 - - -; -#X obj 61 -35 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 1 1 -; -#X obj 294 237 loadbang; -#X floatatom 294 281 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 289 214 size of subimages; -#X obj 61 17 #camera; -#X obj 61 91 #finished; -#X obj 61 183 # /; -#X obj 61 202 # *; -#X obj 61 229 #store; -#X obj 61 294 #out window; -#X obj 294 299 #pack 2; -#X obj 127 219 #store; -#X obj 127 196 # *; -#X obj 1 418 cnv 15 640 30 empty empty empty 20 12 0 14 -200249 -66577 -0; -#X obj 3 -85 cnv 15 640 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X text 121 17 <-- open this; -#X text 16 -85 eclipse.pd; -#X obj 61 72 t a a; -#X obj 61 110 t b b; -#X obj 61 332 print; -#X obj 61 313 fps detailed; -#X text 9 425 GridFlow 0.8.3; -#X msg 294 259 6; -#X msg 342 259 8; -#X obj 294 318 # inv* (240 320); -#X text 16 -72 Copyright 2002 \, 2006 Mathieu Bouchard; -#X obj 164 114 #for (0 0) (240 320) (1 1); -#X obj 61 164 #store; -#X obj 127 174 #store; -#X obj 61 275 #clip; -#X obj 164 95 loadbang; -#X obj 61 256 # *>>8; -#X obj 61 36 #gamma 600; -#X text 183 145 this is actually like #remap_image but faster; -#X connect 0 0 13 1; -#X connect 1 0 5 0; -#X connect 2 0 26 0; -#X connect 2 0 25 0; -#X connect 3 0 13 0; -#X connect 4 0 7 0; -#X connect 5 0 7 0; -#X connect 7 0 35 0; -#X connect 8 0 21 0; -#X connect 9 0 10 0; -#X connect 10 0 11 0; -#X connect 11 0 34 0; -#X connect 12 0 23 0; -#X connect 13 0 15 1; -#X connect 13 0 27 0; -#X connect 14 0 34 1; -#X connect 15 0 14 0; -#X connect 20 0 8 0; -#X connect 20 1 11 1; -#X connect 20 1 14 1; -#X connect 21 0 30 0; -#X connect 21 1 31 0; -#X connect 23 0 22 0; -#X connect 25 0 3 0; -#X connect 26 0 0 0; -#X connect 27 0 9 1; -#X connect 27 0 10 1; -#X connect 29 0 30 1; -#X connect 29 0 31 1; -#X connect 30 0 9 0; -#X connect 31 0 15 0; -#X connect 32 0 12 0; -#X connect 33 0 29 0; -#X connect 34 0 32 0; -#X connect 35 0 20 0; diff --git a/externals/gridflow/examples/epicycloid.pd b/externals/gridflow/examples/epicycloid.pd deleted file mode 100644 index 000bc8c0..00000000 --- a/externals/gridflow/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/examples/feedback_fractal.pd b/externals/gridflow/examples/feedback_fractal.pd deleted file mode 100644 index abb70e80..00000000 --- a/externals/gridflow/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/examples/fire.pd b/externals/gridflow/examples/fire.pd deleted file mode 100644 index f9aa2ea8..00000000 --- a/externals/gridflow/examples/fire.pd +++ /dev/null @@ -1,300 +0,0 @@ -#N canvas 588 0 632 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 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 0 1; -#X obj 200 39 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 332 379 t a a; -#X text 258 62 height width; -#X obj 100 364 #out window; -#X text 97 308 applying palette; -#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 116 #fold +; -#X obj 127 148 - 4; -#X obj 18 56 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 18 135 # ==; -#X obj 127 129 listelement 0; -#X text 93 10 line generator; -#X obj 18 154 # << 7; -#X obj 127 110 #export_list; -#X obj 18 9 inlet size; -#X obj 18 173 outlet matrix; -#X obj 18 33 t a a; -#X text 154 150 four pixels from bottom; -#X obj 18 78 #for (0 0) (0 0) (1 1); -#X obj 18 97 # & (-1 0); -#X connect 0 0 3 0; -#X connect 1 0 3 1; -#X connect 2 0 12 0; -#X connect 3 0 6 0; -#X connect 4 0 1 0; -#X connect 6 0 9 0; -#X connect 7 0 4 0; -#X connect 8 0 10 0; -#X connect 10 0 2 0; -#X connect 10 1 7 0; -#X connect 10 1 12 1; -#X connect 12 0 13 0; -#X connect 13 0 0 0; -#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 624 360 400 289 fire 0; -#X obj 174 180 #store; -#X obj 61 196 #export_list; -#X obj 6 65 # >> 2; -#X obj 6 235 # & 255; -#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 obj 174 115 list; -#X obj 6 26 t a a; -#X obj 160 215 display; -#X connect 0 0 14 1; -#X connect 1 0 24 1; -#X connect 2 0 14 0; -#X connect 3 0 12 0; -#X connect 4 0 11 0; -#X connect 5 0 21 0; -#X connect 6 0 24 0; -#X connect 7 0 6 0; -#X connect 8 0 11 1; -#X connect 8 0 10 0; -#X connect 8 0 26 0; -#X connect 9 0 0 1; -#X connect 10 0 1 0; -#X connect 11 0 3 0; -#X connect 13 0 22 0; -#X connect 14 0 4 0; -#X connect 15 0 25 0; -#X connect 16 0 13 0; -#X connect 21 0 0 0; -#X connect 22 0 9 0; -#X connect 23 0 2 0; -#X connect 24 0 5 0; -#X connect 25 0 23 0; -#X connect 25 1 7 0; -#X restore 65 240 pd fire generator; -#X text 166 108 note: reset the size if you change the generator; -#X obj 19 67 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 107 48 listsublist 0 2; -#X obj 107 10 inlet; -#X obj 132 151 listsublist 0 48; -#X obj 30 49 t a a; -#X obj 30 284 outlet; -#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 265 # / 5; -#X obj 30 9 r metro; -#X obj 30 131 #export_list; -#X obj 30 29 list; -#X connect 0 0 18 1; -#X connect 1 0 6 0; -#X connect 2 0 5 1; -#X connect 3 0 7 0; -#X connect 3 1 9 1; -#X connect 5 0 2 0; -#X connect 5 0 10 0; -#X connect 6 0 0 0; -#X connect 7 0 8 0; -#X connect 7 0 17 0; -#X connect 8 0 9 0; -#X connect 9 0 7 1; -#X connect 10 0 11 0; -#X connect 11 0 12 0; -#X connect 12 0 13 0; -#X connect 13 0 14 0; -#X connect 14 0 15 0; -#X connect 15 0 4 0; -#X connect 16 0 18 0; -#X connect 17 0 5 0; -#X connect 18 0 3 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 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 262 # - 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 89 inlet pos; -#X obj 47 110 #fold +; -#X connect 1 0 5 0; -#X connect 2 0 3 0; -#X connect 3 0 1 0; -#X connect 3 1 4 0; -#X connect 4 0 1 1; -#X connect 5 0 16 0; -#X connect 6 0 0 0; -#X connect 7 0 6 0; -#X connect 8 0 7 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 12 1; -#X connect 15 0 5 1; -#X connect 16 0 13 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 0; -#X obj 501 203 r cursor; -#X obj 501 223 t a; -#X obj 58 86 spigot; -#X obj 19 86 t b b; -#X obj 115 86 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 1 1 -; -#X obj 49 105 s metro; -#X obj 67 277 #outer ignore (0); -#X text 15 9 Copyright 2001 \, 2005 Mathieu Bouchard; -#X msg 200 62 120 160; -#X obj 500 247 display; -#X obj 99 326 #store; -#X obj 264 422 #outer gamma; -#X obj 204 90 list; -#X obj 115 67 loadbang; -#X obj 71 27 f; -#X obj 96 27 + 1; -#X obj 71 46 sel 100; -#X floatatom 128 48 5 0 0 0 - - -; -#X connect 0 0 19 0; -#X connect 2 0 5 0; -#X connect 3 0 52 0; -#X connect 4 0 21 0; -#X connect 6 0 4 1; -#X connect 7 0 3 0; -#X connect 8 0 23 0; -#X connect 9 0 49 0; -#X connect 10 0 7 0; -#X connect 10 1 52 1; -#X connect 12 0 2 0; -#X connect 12 0 28 0; -#X connect 14 0 21 1; -#X connect 15 0 21 1; -#X connect 18 0 10 0; -#X connect 19 0 18 0; -#X connect 20 0 49 0; -#X connect 21 0 4 1; -#X connect 21 0 47 0; -#X connect 23 0 44 0; -#X connect 28 0 34 0; -#X connect 29 0 32 1; -#X connect 31 0 12 0; -#X connect 32 0 21 1; -#X connect 34 0 36 0; -#X connect 35 0 12 0; -#X connect 36 0 30 0; -#X connect 39 0 15 0; -#X connect 39 1 14 0; -#X connect 39 2 32 0; -#X connect 40 0 39 1; -#X connect 41 0 42 0; -#X connect 42 0 29 0; -#X connect 42 0 14 1; -#X connect 42 0 32 2; -#X connect 42 0 50 0; -#X connect 43 0 53 0; -#X connect 44 0 4 0; -#X connect 44 1 43 0; -#X connect 44 1 46 0; -#X connect 45 0 43 1; -#X connect 47 0 51 0; -#X connect 49 0 6 0; -#X connect 49 0 21 2; -#X connect 49 0 53 1; -#X connect 51 0 35 0; -#X connect 52 0 51 1; -#X connect 53 0 39 0; -#X connect 54 0 45 0; -#X connect 55 0 56 0; -#X connect 55 0 57 0; -#X connect 56 0 55 1; -#X connect 57 0 8 0; -#X connect 57 1 58 0; diff --git a/externals/gridflow/examples/frequency_mask.pd b/externals/gridflow/examples/frequency_mask.pd deleted file mode 100644 index c5a08b52..00000000 --- a/externals/gridflow/examples/frequency_mask.pd +++ /dev/null @@ -1,160 +0,0 @@ -#N canvas 608 0 612 689 10; -#X obj 33 12 tgl 15 0 empty empty empty 17 7 0 10 -24198 -1 -1 0 1 -; -#X obj 33 432 t a a; -#X obj 33 457 # -; -#X obj 33 476 t a a; -#X obj 33 501 # -; -#X obj 33 520 t a a; -#X obj 33 545 # -; -#X obj 33 612 #clip; -#X obj 33 631 #out window; -#X obj 33 593 # + 128; -#X obj 33 574 # << 2; -#X obj 33 650 fps; -#X floatatom 33 669 5 0 0 0 - - -; -#X obj 33 212 #fft \, real; -#X obj 33 193 #cast f; -#X obj 33 250 #fft \, real \, sign 1; -#X obj 33 269 #cast i; -#X obj 33 288 # / 76800; -#X obj 314 55 # sq-; -#X obj 314 74 #fold +; -#X obj 314 169 #out window; -#X obj 314 17 #cast i; -#X obj 314 112 #clip; -#X obj 314 150 #remap_image; -#X obj 402 150 # - (120 160); -#X obj 33 29 metro 10; -#X obj 314 93 # sqrt; -#X obj 314 36 # / 277; -#X text 42 398 2nd derivative effects; -#X text 42 412 chosen because they emphasise noise; -#X obj 33 357 shunt; -#X obj 79 544 #convolve (3 3 # 0 1 0 1 -4 1); -#X obj 72 358 tgl 15 0 empty empty empty 17 7 0 10 -241291 -1 -1 0 -1; -#X obj 314 131 #gamma 768; -#X obj 63 86 #greyscale_to_rgb; -#X obj 33 48 #camera 0 \, size 240 320; -#X obj 314 188 #mouse \, \, \, \,; -#X obj 439 230 sel 1; -#X obj 478 230 sel 1; -#X msg 478 249 0; -#X msg 439 249 1; -#X obj 346 307 pack 0 0 0; -#X obj 33 231 # * (2 f # 1 0); -#X obj 65 333 #out window; -#X obj 33 307 #clip; -#X obj 304 473 #inner (1 0); -#X obj 304 492 # * 255; -#X obj 304 454 #cast i; -#X obj 314 211 t b a; -#X obj 249 230 gf.oneshot; -#X obj 33 67 shunt; -#X obj 72 68 tgl 15 0 empty empty empty 17 7 0 10 -241291 -1 -1 0 1 -; -#X obj 456 304 display; -#X obj 33 112 t a b; -#X obj 304 530 #out window \, title mask; -#X msg 346 326 put_at ( \$1 \$2 0 0 ) \, 1 1 3 2 f # \$3 \$3; -#X obj 239 302 #unpack; -#X obj 239 264 # * -1; -#X obj 239 283 # % (240 320); -#X obj 308 372 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; -#X obj 325 370 loadbang; -#X obj 239 321 pack 0 0 0; -#X obj 304 435 #store (240 320 3 2 f # 1); -#X obj 439 273 t a; -#X msg 339 408 reassign \, 240 320 3 2 f # 1; -#X obj 309 389 t b b; -#X obj 344 230 # + (120 160); -#X obj 344 258 #unpack; -#X obj 304 511 #remap_image; -#X obj 392 511 # - (120 160); -#X connect 0 0 25 0; -#X connect 1 0 2 1; -#X connect 1 1 2 0; -#X connect 2 0 3 0; -#X connect 3 0 4 1; -#X connect 3 1 4 0; -#X connect 4 0 5 0; -#X connect 5 0 6 1; -#X connect 5 1 6 0; -#X connect 6 0 10 0; -#X connect 7 0 8 0; -#X connect 8 0 11 0; -#X connect 9 0 7 0; -#X connect 10 0 9 0; -#X connect 11 0 12 0; -#X connect 13 0 21 0; -#X connect 13 0 42 0; -#X connect 14 0 13 0; -#X connect 15 0 16 0; -#X connect 16 0 17 0; -#X connect 17 0 44 0; -#X connect 18 0 19 0; -#X connect 19 0 26 0; -#X connect 20 0 36 0; -#X connect 21 0 27 0; -#X connect 22 0 33 0; -#X connect 23 0 20 0; -#X connect 23 1 24 0; -#X connect 24 0 23 1; -#X connect 25 0 35 0; -#X connect 26 0 22 0; -#X connect 27 0 18 0; -#X connect 30 0 1 0; -#X connect 30 1 31 0; -#X connect 31 0 10 0; -#X connect 32 0 30 1; -#X connect 33 0 23 0; -#X connect 34 0 53 0; -#X connect 35 0 50 0; -#X connect 36 0 48 0; -#X connect 36 1 48 0; -#X connect 36 4 37 0; -#X connect 36 6 38 0; -#X connect 37 0 40 0; -#X connect 38 0 39 0; -#X connect 39 0 63 0; -#X connect 40 0 63 0; -#X connect 41 0 55 0; -#X connect 41 0 52 0; -#X connect 42 0 15 0; -#X connect 44 0 43 0; -#X connect 44 0 30 0; -#X connect 45 0 46 0; -#X connect 46 0 68 0; -#X connect 47 0 45 0; -#X connect 48 0 49 1; -#X connect 48 1 66 0; -#X connect 49 0 62 0; -#X connect 50 0 53 0; -#X connect 50 1 34 0; -#X connect 51 0 50 1; -#X connect 53 0 14 0; -#X connect 53 1 49 0; -#X connect 55 0 62 1; -#X connect 56 0 61 0; -#X connect 56 1 61 1; -#X connect 57 0 58 0; -#X connect 58 0 56 0; -#X connect 59 0 65 0; -#X connect 60 0 65 0; -#X connect 61 0 55 0; -#X connect 62 0 42 1; -#X connect 62 0 47 0; -#X connect 63 0 61 2; -#X connect 63 0 41 2; -#X connect 64 0 62 1; -#X connect 65 0 62 0; -#X connect 65 1 64 0; -#X connect 66 0 57 0; -#X connect 66 0 67 0; -#X connect 67 0 41 0; -#X connect 67 1 41 1; -#X connect 68 0 54 0; -#X connect 68 1 69 0; -#X connect 69 0 68 1; diff --git a/externals/gridflow/examples/game_of_life.pd b/externals/gridflow/examples/game_of_life.pd deleted file mode 100644 index 425ee065..00000000 --- a/externals/gridflow/examples/game_of_life.pd +++ /dev/null @@ -1,65 +0,0 @@ -#N canvas 429 0 654 368 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 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 t a a; -#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 122 # < (b # 3); -#X obj 28 103 #convolve (3 3 b # 0 0 0 0 1) \, op >> \, seed (b # 251) -; -#X connect 0 0 3 0; -#X connect 3 0 5 0; -#X connect 4 0 1 0; -#X connect 5 0 4 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 640 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 640 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 obj 161 49 for 0 100 1; -#X connect 0 0 15 0; -#X connect 1 0 8 0; -#X connect 3 0 27 0; -#X connect 4 0 24 0; -#X connect 5 0 11 0; -#X connect 6 0 5 0; -#X connect 8 0 7 0; -#X connect 9 0 25 0; -#X connect 9 1 5 1; -#X connect 11 0 9 0; -#X connect 15 0 5 0; -#X connect 22 0 23 0; -#X connect 23 0 9 0; -#X connect 24 0 22 0; -#X connect 25 0 26 0; -#X connect 26 0 1 0; -#X connect 27 0 6 0; diff --git a/externals/gridflow/examples/game_of_life_gem.pd b/externals/gridflow/examples/game_of_life_gem.pd deleted file mode 100644 index 5032ca9e..00000000 --- a/externals/gridflow/examples/game_of_life_gem.pd +++ /dev/null @@ -1,291 +0,0 @@ -#N canvas 608 0 588 612 10; -#X obj 368 33 loadbang; -#X obj 23 48 gemhead; -#N canvas 610 247 578 360 GOL 0; -#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 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 122 # < (b # 3); -#X obj 28 103 #convolve (3 3 b # 0 0 0 0 1) \, op >> \, seed (b # 251) -; -#X connect 0 0 3 0; -#X connect 3 0 5 0; -#X connect 4 0 1 0; -#X connect 5 0 4 0; -#X restore 31 102 pd game of life; -#X text 260 60 init with a random map; -#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 165 # rand (b #); -#X obj 262 184 # == (b # 0); -#X obj 24 41 inlet metro; -#X obj 22 69 route bang reset; -#X obj 31 295 outlet RGB; -#X obj 31 181 #cast i; -#X obj 31 238 #clip; -#X obj 41 257 #apply_colormap_channelwise; -#X obj 207 239 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 31 200 # << 10; -#X obj 234 238 #for 0 256 1; -#X obj 234 257 #outer gamma (3 # 333 555 999); -#X text 261 72 20% white dots; -#X obj 31 162 #outer ignore (4 b #); -#X obj 279 117 t b b; -#X obj 31 276 #scale_by; -#X msg 261 146 128 128 b # 5; -#X obj 31 219 #fade (16 4 1 1); -#X connect 1 0 2 0; -#X connect 2 0 5 0; -#X connect 3 0 30 0; -#X connect 4 0 8 0; -#X connect 5 0 4 0; -#X connect 6 0 29 0; -#X connect 6 1 4 1; -#X connect 8 0 6 0; -#X connect 16 0 17 0; -#X connect 17 0 6 0; -#X connect 18 0 19 0; -#X connect 19 0 4 0; -#X connect 19 1 32 0; -#X connect 21 0 25 0; -#X connect 22 0 31 0; -#X connect 24 0 26 0; -#X connect 25 0 33 0; -#X connect 26 0 27 0; -#X connect 27 0 23 1; -#X connect 29 0 21 0; -#X connect 30 0 32 0; -#X connect 30 1 26 0; -#X connect 31 0 20 0; -#X connect 32 0 16 0; -#X connect 33 0 22 0; -#X restore 144 363 pd GOL; -#X obj 127 278 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1 -; -#X msg 154 336 reset; -#X obj 23 429 rotateXYZ; -#X obj 32 406 #unpack 3; -#X obj 32 349 # +; -#X obj 57 349 t a; -#X obj 32 368 #cast f; -#X obj 32 387 # / (f # 100); -#X floatatom 108 67 5 0 0 0 - - -; -#X obj 76 48 bang; -#X obj 108 48 fps \, period 5; -#X obj 23 215 pix_texture; -#X obj 285 516 #out window; -#X obj 285 63 gemhead 74; -#X obj 53 158 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 1 -; -#X msg 53 172 yflip \$1; -#X obj 285 312 t a b; -#X obj 360 133 vsl 15 128 0 512 0 0 empty empty empty 0 -8 0 8 -241291 --1 -1 3175 1; -#X obj 375 133 vsl 15 128 0 512 0 0 empty empty empty 0 -8 0 8 -241291 --1 -1 3175 1; -#X obj 414 133 vsl 15 128 0 512 0 0 empty empty empty 0 -8 0 8 -241291 --1 -1 6350 1; -#X obj 429 133 vsl 15 128 0 512 0 0 empty empty empty 0 -8 0 8 -241291 --1 -1 6350 1; -#X msg 324 312 snap; -#X obj 360 110 #unpack; -#X obj 413 110 #unpack; -#X obj 285 364 pix_snap; -#X obj 350 267 #pack; -#X obj 404 267 #pack; -#X obj 300 404 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 -1; -#X msg 300 418 yflip \$1; -#X msg 360 90 128 128; -#X msg 413 91 256 256; -#X obj 23 528 cube 4; -#X obj 179 298 + 1; -#X obj 154 317 sel 0; -#X obj 154 298 f; -#X msg 307 437 help; -#X obj 407 289 #to_list; -#X obj 347 289 #to_list; -#X obj 23 196 #to_pix; -#X obj 4 1 cnv 15 500 18 empty empty empty 20 12 0 14 -228992 -66577 -0; -#X text 5 1 [#to_pix]; -#X text 401 2 GridFlow 0.9.3; -#X obj 62 106 separator; -#X obj 23 106 t a a; -#X msg 368 52 create \, 1 \, lighting 1; -#X msg 32 330 60 42 30; -#X obj 144 277 metro 33.3667; -#X floatatom 204 317 5 0 0 0 - - -; -#N canvas 0 0 450 300 lighting 0; -#X obj 22 28 inlet gem; -#X obj 152 210 light; -#X obj 282 210 light; -#X obj 22 47 t a a a; -#X obj 66 66 separator; -#X obj 44 85 separator; -#X obj 22 210 light; -#X obj 133 251 loadbang; -#X obj 22 191 translateXYZ 0 4 4; -#X obj 152 191 translateXYZ 4 0 4; -#X obj 282 191 translateXYZ 4 4 0; -#X msg 61 210 1 0 0; -#X msg 191 210 0 1 0; -#X msg 321 210 0 0 1; -#X connect 0 0 3 0; -#X connect 3 0 8 0; -#X connect 3 1 5 0; -#X connect 3 2 4 0; -#X connect 4 0 10 0; -#X connect 5 0 9 0; -#X connect 7 0 11 0; -#X connect 7 0 12 0; -#X connect 7 0 13 0; -#X connect 8 0 6 0; -#X connect 9 0 1 0; -#X connect 10 0 2 0; -#X connect 11 0 6 1; -#X connect 12 0 1 1; -#X connect 13 0 2 1; -#X restore 62 125 pd lighting; -#X obj 23 509 color 1 1 1; -#X obj 144 382 # inv+ 255; -#X obj 368 71 gemwin 29.97; -#X obj 23 457 shunt; -#X obj 62 458 tgl 15 0 empty empty empty 17 7 0 10 -24198 -1 -1 1 1 -; -#N canvas 0 0 450 300 eight_cubes 0; -#X obj 33 29 inlet gem; -#X obj 33 48 t a a; -#X obj 163 48 separator; -#X obj 33 86 t a; -#X obj 33 105 t a a; -#X obj 163 105 separator; -#X obj 33 143 t a; -#X obj 33 162 t a a; -#X obj 163 162 separator; -#X obj 33 200 t a; -#X obj 33 219 cube 2; -#X obj 33 67 translateXYZ 4 0 0; -#X obj 33 124 translateXYZ 0 4 0; -#X obj 33 181 translateXYZ 0 0 4; -#X obj 163 181 translateXYZ 0 0 -4; -#X obj 163 124 translateXYZ 0 -4 0; -#X obj 163 67 translateXYZ -4 0 0; -#X connect 0 0 1 0; -#X connect 1 0 11 0; -#X connect 1 1 2 0; -#X connect 2 0 16 0; -#X connect 3 0 4 0; -#X connect 4 0 12 0; -#X connect 4 1 5 0; -#X connect 5 0 15 0; -#X connect 6 0 7 0; -#X connect 7 0 13 0; -#X connect 7 1 8 0; -#X connect 8 0 14 0; -#X connect 9 0 10 0; -#X connect 11 0 3 0; -#X connect 12 0 6 0; -#X connect 13 0 9 0; -#X connect 14 0 9 0; -#X connect 15 0 6 0; -#X connect 16 0 3 0; -#X restore 53 476 pd eight_cubes; -#X obj 285 482 #remap_image; -#X obj 204 298 % 256; -#X obj 390 463 % 32; -#X obj 23 239 translateXYZ 0 0 -7; -#X obj 285 457 #import_pix; -#X obj 374 482 # ^; -#X connect 0 0 47 0; -#X connect 0 0 32 0; -#X connect 0 0 33 0; -#X connect 1 0 12 0; -#X connect 1 0 46 0; -#X connect 2 0 53 0; -#X connect 3 0 49 0; -#X connect 4 0 2 0; -#X connect 5 0 55 0; -#X connect 6 0 5 1; -#X connect 6 1 5 2; -#X connect 6 2 5 3; -#X connect 7 0 8 0; -#X connect 7 0 9 0; -#X connect 8 0 7 1; -#X connect 9 0 10 0; -#X connect 10 0 6 0; -#X connect 12 0 13 0; -#X connect 13 0 11 0; -#X connect 14 0 61 0; -#X connect 16 0 19 0; -#X connect 17 0 18 0; -#X connect 18 0 41 0; -#X connect 19 0 27 0; -#X connect 19 1 24 0; -#X connect 20 0 28 0; -#X connect 21 0 28 1; -#X connect 22 0 29 0; -#X connect 23 0 29 1; -#X connect 24 0 27 0; -#X connect 25 0 20 0; -#X connect 25 1 21 0; -#X connect 26 0 22 0; -#X connect 26 1 23 0; -#X connect 27 0 62 0; -#X connect 28 0 40 0; -#X connect 29 0 39 0; -#X connect 30 0 31 0; -#X connect 31 0 62 0; -#X connect 32 0 25 0; -#X connect 33 0 26 0; -#X connect 35 0 59 0; -#X connect 36 0 4 0; -#X connect 37 0 35 0; -#X connect 37 0 36 0; -#X connect 38 0 62 0; -#X connect 39 0 27 2; -#X connect 40 0 27 1; -#X connect 41 0 14 0; -#X connect 45 0 51 0; -#X connect 46 0 41 0; -#X connect 46 1 45 0; -#X connect 47 0 54 0; -#X connect 48 0 7 0; -#X connect 49 0 2 0; -#X connect 49 0 37 0; -#X connect 49 0 48 0; -#X connect 52 0 34 0; -#X connect 53 0 41 1; -#X connect 55 0 52 0; -#X connect 55 1 57 0; -#X connect 56 0 55 1; -#X connect 58 0 15 0; -#X connect 58 1 63 0; -#X connect 59 0 37 1; -#X connect 59 0 50 0; -#X connect 59 0 60 0; -#X connect 60 0 63 1; -#X connect 61 0 5 0; -#X connect 62 0 58 0; -#X connect 63 0 58 1; diff --git a/externals/gridflow/examples/goop.pd b/externals/gridflow/examples/goop.pd deleted file mode 100644 index 8f96d2c4..00000000 --- a/externals/gridflow/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/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/hello-world.pd b/externals/gridflow/examples/hello-world.pd deleted file mode 100644 index 6b8306a3..00000000 --- a/externals/gridflow/examples/hello-world.pd +++ /dev/null @@ -1,39 +0,0 @@ -#N canvas 580 223 489 466 10; -#X obj 21 68 # / 320; -#X obj 21 188 # * 255; -#X obj 21 154 # != 0; -#X obj 21 -11 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X obj 21 100 # inv+ 7; -#X obj 21 16 #for 0 320 1; -#X obj 21 49 # * 7; -#X obj 21 -33 loadbang; -#X text 41 -11 make one line:; -#X text 29 32 numbers 0 to 319; -#X text 30 85 numbers 0 to 6 repeated 45 or 46 times; -#X text 31 117 numbers 7 down to 1 ...; -#X text 28 173 3*1-bit rgb image line; -#X text 28 206 3*8-bit rgb image line; -#X text 150 224 repeat line 240 times; -#X obj 2 -84 cnv 15 500 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X text 15 -85 hello-world.pd; -#X obj 21 135 #outer & (2 4 1); -#X obj 21 223 #redim (240 320 3); -#X obj 1 348 cnv 15 500 30 empty empty empty 20 12 0 14 -200249 -66577 -0; -#X text 8 354 GridFlow 0.8.0; -#X text 8 354 GridFlow 0.8.0; -#X text 15 -71 Copyright 2001 Mathieu Bouchard; -#X obj 21 281 #out window; -#X text 64 321 this is also covered by a new class named [#hello]; -#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 23 0; diff --git a/externals/gridflow/examples/image_stats.pd b/externals/gridflow/examples/image_stats.pd deleted file mode 100644 index b53220fd..00000000 --- a/externals/gridflow/examples/image_stats.pd +++ /dev/null @@ -1,62 +0,0 @@ -#N canvas 308 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 t a a; -#X obj 265 118 #in; -#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 obj 278 193 #fold *; -#X connect 1 0 5 0; -#X connect 2 0 9 0; -#X connect 5 0 4 0; -#X connect 6 0 15 0; -#X connect 7 0 13 0; -#X connect 8 0 14 0; -#X connect 10 0 6 0; -#X connect 10 0 30 0; -#X connect 10 1 18 0; -#X connect 11 0 10 0; -#X connect 11 0 17 0; -#X connect 14 0 0 0; -#X connect 14 0 7 0; -#X connect 15 0 8 0; -#X connect 16 0 12 0; -#X connect 17 0 16 0; -#X connect 17 0 1 0; -#X connect 18 0 32 0; -#X connect 19 0 3 0; -#X connect 19 0 7 1; -#X connect 20 0 11 0; -#X connect 21 0 11 0; -#X connect 22 0 11 0; -#X connect 29 0 2 0; -#X connect 30 0 29 0; -#X connect 32 0 19 0; diff --git a/externals/gridflow/examples/instant_blur.pd b/externals/gridflow/examples/instant_blur.pd deleted file mode 100644 index 15195879..00000000 --- a/externals/gridflow/examples/instant_blur.pd +++ /dev/null @@ -1,142 +0,0 @@ -#N canvas 477 0 743 530 10; -#X obj 13 204 #cast f; -#X obj 13 280 #cast i; -#X obj 50 59 #in teapot.png; -#X obj 193 46 loadbang; -#X obj 13 223 #fft; -#X obj 13 356 #out window; -#X obj 293 270 #fft; -#X obj 293 289 # / (f # 256); -#X text 244 331 B->RGB; -#X obj 348 23 #for (-128 -128) (128 128) (1 1); -#X obj 175 65 t b b; -#X obj 175 48 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 50 40 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1 -; -#X obj 293 213 #t; -#X obj 318 232 #fold +; -#X obj 318 213 #ravel; -#X obj 13 337 #gamma 512; -#X obj 13 375 fps; -#X floatatom 13 394 5 0 0 0 - - -; -#X obj 175 26 metro 33.3667; -#X obj 175 9 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1; -#X obj 348 61 # sq- 128; -#X obj 234 443 #out window; -#X obj 234 367 #cast i; -#X obj 348 80 #fold +; -#X obj 348 99 #cast f; -#X obj 13 78 #store; -#X obj 234 348 # * (f # 255); -#X obj 13 137 #remap_image; -#X obj 111 118 # - 128; -#X obj 111 156 # + 128; -#X floatatom 164 139 5 0 0 0 - - -; -#X obj 111 137 # *>>8; -#X obj 13 261 #fft \, sign 1; -#X obj 385 224 #import () f; -#X obj 13 242 # C.*; -#X obj 293 232 # /; -#X obj 385 125 loadbang; -#X obj 13 318 #inner (2 # 1 0); -#X obj 293 251 #outer * (3 2 f # 1 0); -#X obj 13 185 #outer & (-1 0); -#X obj 67 39 loadbang; -#X obj 385 167 f; -#X obj 293 115 t b b; -#X obj 234 405 #remap_image; -#X obj 330 405 # + 128; -#X msg 164 120 256; -#X obj 164 101 loadbang; -#X obj 435 167 mod 150; -#X obj 410 167 - 1; -#X obj 385 186 - 75; -#X obj 293 194 # <=; -#X obj 234 424 #outer ignore (3 #); -#X obj 385 205 expr pow($f1 \, 4)/666; -#X obj 348 42 # & 255; -#X obj 293 134 #store; -#X obj 348 4 loadbang; -#X obj 331 23 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; -#X msg 385 144 75; -#X obj 13 299 # >> 8; -#X obj 463 391 # **; -#X obj 463 353 t a a; -#X obj 463 372 # put (f # 0.99); -#X obj 570 334 # inv* (f # 1); -#X floatatom 570 299 5 0 0 0 - - -; -#X obj 570 315 #import () f; -#X obj 570 353 # inv+ (f # 1); -#X connect 0 0 4 0; -#X connect 1 0 59 0; -#X connect 2 0 26 1; -#X connect 3 0 11 0; -#X connect 4 0 35 0; -#X connect 5 0 17 0; -#X connect 6 0 7 0; -#X connect 7 0 35 1; -#X connect 9 0 54 0; -#X connect 10 0 26 0; -#X connect 10 1 43 0; -#X connect 11 0 10 0; -#X connect 12 0 2 0; -#X connect 13 0 36 0; -#X connect 13 0 27 0; -#X connect 13 1 15 0; -#X connect 14 0 36 1; -#X connect 15 0 14 0; -#X connect 16 0 5 0; -#X connect 17 0 18 0; -#X connect 19 0 11 0; -#X connect 20 0 19 0; -#X connect 21 0 24 0; -#X connect 23 0 44 0; -#X connect 24 0 25 0; -#X connect 25 0 55 1; -#X connect 26 0 28 0; -#X connect 27 0 23 0; -#X connect 28 0 40 0; -#X connect 28 1 29 0; -#X connect 29 0 32 0; -#X connect 30 0 28 1; -#X connect 31 0 32 1; -#X connect 32 0 30 0; -#X connect 33 0 1 0; -#X connect 34 0 51 1; -#X connect 35 0 33 0; -#X connect 36 0 39 0; -#X connect 37 0 58 0; -#X connect 38 0 16 0; -#X connect 39 0 6 0; -#X connect 40 0 0 0; -#X connect 41 0 2 0; -#X connect 42 0 49 0; -#X connect 42 0 50 0; -#X connect 43 0 55 0; -#X connect 43 1 42 0; -#X connect 44 0 52 0; -#X connect 44 1 45 0; -#X connect 45 0 44 1; -#X connect 46 0 31 0; -#X connect 47 0 46 0; -#X connect 48 0 42 1; -#X connect 49 0 48 0; -#X connect 50 0 53 0; -#X connect 51 0 13 0; -#X connect 52 0 22 0; -#X connect 53 0 34 0; -#X connect 54 0 21 0; -#X connect 55 0 51 0; -#X connect 56 0 9 0; -#X connect 57 0 9 0; -#X connect 58 0 42 0; -#X connect 59 0 38 0; -#X connect 61 0 62 0; -#X connect 61 1 60 1; -#X connect 62 0 60 0; -#X connect 63 0 66 0; -#X connect 64 0 65 0; -#X connect 65 0 63 0; -#X connect 66 0 62 1; diff --git a/externals/gridflow/examples/linear_transform.pd b/externals/gridflow/examples/linear_transform.pd deleted file mode 100644 index d8f9923d..00000000 --- a/externals/gridflow/examples/linear_transform.pd +++ /dev/null @@ -1,225 +0,0 @@ -#N canvas 415 64 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 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 8220 1; -#X obj 444 259 vsl 15 128 -32768 32768 0 0 empty empty empty 0 -8 0 -8 -260818 -1 -1 5796 1; -#X obj 313 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 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 0 1 -; -#X obj 88 334 #pack 4; -#X obj 27 95 t b b; -#X obj 313 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 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 0 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 obj 336 405 / 10000; -#X obj 336 424 exp; -#X obj 505 373 t b; -#X msg 152 435 load teapot.png; -#X obj 288 82 f; -#X msg 393 172 6666; -#X obj 328 273 spigot; -#X obj 385 255 tgl 15 0 empty empty empty 17 7 0 10 -241291 -1 -1 0 -1; -#X obj 344 465 spigot; -#X obj 342 489 display; -#X obj 428 435 # sin*; -#X obj 462 497 display; -#X connect 1 0 28 3; -#X connect 2 0 13 0; -#X connect 3 0 37 0; -#X connect 4 0 15 0; -#X connect 5 0 22 0; -#X connect 6 0 1 0; -#X connect 7 0 28 0; -#X connect 8 0 18 0; -#X connect 9 0 52 0; -#X connect 10 0 7 0; -#X connect 11 0 46 0; -#X connect 13 0 25 0; -#X connect 14 0 28 1; -#X connect 15 0 28 2; -#X connect 16 0 14 0; -#X connect 17 0 47 0; -#X connect 18 0 61 0; -#X connect 18 0 69 1; -#X connect 19 0 63 1; -#X connect 20 0 8 0; -#X connect 22 0 31 0; -#X connect 23 0 63 0; -#X connect 24 0 62 0; -#X connect 25 0 26 0; -#X connect 26 0 39 0; -#X connect 26 0 65 0; -#X connect 27 0 23 1; -#X connect 28 0 53 0; -#X connect 29 0 3 0; -#X connect 29 1 23 0; -#X connect 29 1 35 0; -#X connect 29 1 56 1; -#X connect 29 1 57 1; -#X connect 30 0 19 0; -#X connect 31 0 32 0; -#X connect 32 0 61 0; -#X connect 32 0 18 0; -#X connect 33 0 25 1; -#X connect 34 0 25 1; -#X connect 35 0 33 0; -#X connect 36 0 35 1; -#X connect 37 0 2 0; -#X connect 38 0 28 0; -#X connect 39 0 40 0; -#X connect 46 0 3 1; -#X connect 47 0 69 0; -#X connect 52 0 29 0; -#X connect 53 0 37 1; -#X connect 55 0 54 0; -#X connect 56 0 55 0; -#X connect 57 0 58 0; -#X connect 58 0 59 0; -#X connect 59 0 60 0; -#X connect 60 0 67 0; -#X connect 61 0 17 0; -#X connect 62 0 34 0; -#X connect 63 0 30 0; -#X connect 63 0 17 0; -#X connect 63 0 5 0; -#X connect 64 0 17 0; -#X connect 65 0 56 0; -#X connect 65 0 57 0; -#X connect 66 0 65 1; -#X connect 66 0 67 1; -#X connect 67 0 18 0; -#X connect 67 0 68 0; -#X connect 67 0 69 1; -#X connect 69 0 53 0; -#X connect 69 0 70 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/examples/motion_detect.pd b/externals/gridflow/examples/motion_detect.pd deleted file mode 100644 index c0d00178..00000000 --- a/externals/gridflow/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/examples/nervous_video.pd b/externals/gridflow/examples/nervous_video.pd deleted file mode 100644 index 6009fb59..00000000 --- a/externals/gridflow/examples/nervous_video.pd +++ /dev/null @@ -1,155 +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 1 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 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 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 msg 225 314 reassign \, 64 240 320 3 #; -#X text 226 261 the buffer size decides the maximum loop length and -dimension; -#X msg 225 294 reassign \, 32 240 320 3 #; -#X connect 0 0 49 0; -#X connect 1 1 58 0; -#X connect 1 1 17 1; -#X connect 2 0 20 0; -#X connect 3 0 8 0; -#X connect 4 0 7 0; -#X connect 6 0 5 0; -#X connect 7 0 49 0; -#X connect 8 0 57 0; -#X connect 9 0 57 1; -#X connect 10 0 13 0; -#X connect 11 0 2 0; -#X connect 12 0 6 0; -#X connect 13 0 1 1; -#X connect 14 0 10 0; -#X connect 17 0 18 0; -#X connect 18 0 19 0; -#X connect 18 1 38 0; -#X connect 18 2 24 0; -#X connect 18 3 25 0; -#X connect 19 0 11 0; -#X connect 20 0 3 0; -#X connect 21 0 18 1; -#X connect 24 0 8 0; -#X connect 25 0 8 0; -#X connect 28 0 44 1; -#X connect 28 0 43 1; -#X connect 32 0 37 0; -#X connect 36 0 32 0; -#X connect 37 0 42 0; -#X connect 38 0 8 0; -#X connect 39 0 40 0; -#X connect 40 0 41 0; -#X connect 41 0 42 0; -#X connect 42 0 12 0; -#X connect 43 0 12 0; -#X connect 43 1 47 0; -#X connect 43 2 36 0; -#X connect 43 3 39 0; -#X connect 44 1 47 1; -#X connect 44 2 36 1; -#X connect 44 3 39 1; -#X connect 46 0 12 0; -#X connect 47 0 46 0; -#X connect 48 0 44 0; -#X connect 48 0 57 1; -#X connect 49 0 17 0; -#X connect 49 1 48 0; -#X connect 49 2 1 0; -#X connect 57 0 43 0; -#X connect 58 0 57 1; -#X connect 59 0 57 1; -#X connect 61 0 57 1; diff --git a/externals/gridflow/examples/photo_pianoroll.pd b/externals/gridflow/examples/photo_pianoroll.pd deleted file mode 100644 index 9ad80e38..00000000 --- a/externals/gridflow/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/examples/play_video.pd b/externals/gridflow/examples/play_video.pd deleted file mode 100644 index 530c8e66..00000000 --- a/externals/gridflow/examples/play_video.pd +++ /dev/null @@ -1,44 +0,0 @@ -#N canvas 1036 382 502 475 10; -#X obj 29 221 #in; -#X obj 29 -37 tgl 15 0 empty empty empty 17 7 0 10 -24198 -1 -1 0 1 -; -#X obj 30 323 display; -#X obj -17 -85 cnv 15 500 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj -16 356 cnv 15 500 30 empty empty empty 20 12 0 14 -200249 -66577 -0; -#X text -7 363 GridFlow 0.8.0; -#X text -6 -83 play_video.pd; -#X obj 29 -6 metro 33.333; -#X obj 29 270 #out window \, title video; -#X obj 29 296 fps; -#X text -7 363 GridFlow 0.9.0; -#X text 58 -38 <-- 2 start the metro; -#X floatatom 69 167 5 0 0 0 - - -; -#X msg 94 195 42; -#X text 129 195 <-- select the frame number; -#X text 116 84 libraries. Photo jpeg compression gives slightly; -#X text 118 98 better results than mjpega. Rendering is cpu; -#X text 117 112 intensive so if operations on the images is; -#X text 117 70 Supported codecs will depend on your installed; -#X text 114 166 <-- scrub the video (stop the metro first); -#X text 117 138 such as 320 x 240; -#X text 118 125 needed \, then start with a lower resolution; -#X text 174 29 <-- 1 open a file \, make sure the correct; -#X text 173 43 path is entered in pd's 'Path' preferences.; -#X floatatom 53 246 5 0 0 0 - - -; -#X obj 99 245 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; -#X text 123 244 <-- outputs a bang when finished; -#X text 139 -82 see also [#in]'s help file; -#X msg 46 30 open violoncelle.mov; -#X connect 0 0 8 0; -#X connect 0 1 24 0; -#X connect 0 1 25 0; -#X connect 1 0 7 0; -#X connect 7 0 0 0; -#X connect 8 0 9 0; -#X connect 9 0 2 0; -#X connect 12 0 0 0; -#X connect 13 0 0 0; -#X connect 28 0 0 0; diff --git a/externals/gridflow/examples/plot.pd b/externals/gridflow/examples/plot.pd deleted file mode 100644 index dad9db76..00000000 --- a/externals/gridflow/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/examples/polygon.pd b/externals/gridflow/examples/polygon.pd deleted file mode 100644 index a18980ea..00000000 --- a/externals/gridflow/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/examples/polygon_editor.pd b/externals/gridflow/examples/polygon_editor.pd deleted file mode 100644 index 478a9d0e..00000000 --- a/externals/gridflow/examples/polygon_editor.pd +++ /dev/null @@ -1,23 +0,0 @@ -#N canvas 478 312 450 300 10; -#X obj 41 33 metro 33.3667; -#X obj 23 34 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 1 1; -#X obj 41 52 #store (240 320 3 #); -#X obj 41 219 #out window; -#X obj 115 238 s events; -#X obj 50 73 r events; -#X obj 41 95 t a; -#X obj 122 181 print unused_events; -#X obj 41 181 route2 grid; -#X obj 41 238 route bang; -#X obj 41 147 #edit_polygon put (3 # 255) (3 2 # 0 0 100 200 200 100) -; -#X connect 0 0 2 0; -#X connect 1 0 0 0; -#X connect 2 0 6 0; -#X connect 3 0 9 0; -#X connect 5 0 6 0; -#X connect 6 0 10 0; -#X connect 8 0 3 0; -#X connect 8 1 7 0; -#X connect 9 1 4 0; -#X connect 10 0 8 0; diff --git a/externals/gridflow/examples/postdigital.pd b/externals/gridflow/examples/postdigital.pd deleted file mode 100644 index f54a5b56..00000000 --- a/externals/gridflow/examples/postdigital.pd +++ /dev/null @@ -1,67 +0,0 @@ -#N canvas 681 68 541 475 10; -#X obj 23 2 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 1 1; -#X obj 65 89 #camera; -#X obj 40 149 t a a a; -#X obj 9 188 t a a; -#X msg 39 207 close; -#X msg 27 253 open /tmp/foo.mov \, bang \, cast uint8 \, close; -#X obj 40 1 metro 100; -#X obj 151 194 f; -#X obj 111 194 bang; -#X obj 65 109 #convolve (3 3 # 1 2 1 2 4 2); -#X obj 65 128 # >> 4; -#X obj 40 168 #finished; -#X obj 41 230 #out; -#X obj 27 272 #in; -#X obj 29 302 # -; -#X obj 30 414 #clip; -#X obj 30 452 #out window; -#X obj 14 38 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 34 63 #in babbage.jpg; -#X msg 116 219 open quicktime file /tmp/foo.mov \, codec jpeg \, parameter -jpeg_quality \$1; -#X obj 40 20 shunt; -#X obj 79 21 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 -; -#X obj 30 355 # +; -#X obj 30 336 # << 3; -#X obj 176 194 nbx 3 14 0 100 0 0 empty empty empty 0 -8 0 10 -241291 --1 -1 75 256; -#X msg 176 175 75; -#X obj 176 156 loadbang; -#X text 64 301 compute difference between original image and jpeg decoding -; -#X text 80 336 boost the residue; -#X text 64 355 add boosted residue to the original image; -#X connect 0 0 6 0; -#X connect 1 0 9 0; -#X connect 2 0 11 0; -#X connect 2 1 12 0; -#X connect 2 2 8 0; -#X connect 2 2 14 1; -#X connect 2 2 22 1; -#X connect 3 0 5 0; -#X connect 3 1 4 0; -#X connect 4 0 12 0; -#X connect 5 0 13 0; -#X connect 6 0 20 0; -#X connect 7 0 19 0; -#X connect 8 0 7 0; -#X connect 9 0 10 0; -#X connect 10 0 2 0; -#X connect 11 0 3 0; -#X connect 13 0 14 0; -#X connect 14 0 23 0; -#X connect 15 0 16 0; -#X connect 17 0 18 0; -#X connect 18 0 2 0; -#X connect 19 0 12 0; -#X connect 20 0 18 0; -#X connect 20 1 1 0; -#X connect 21 0 20 1; -#X connect 22 0 15 0; -#X connect 23 0 22 0; -#X connect 24 0 7 1; -#X connect 25 0 24 0; -#X connect 26 0 25 0; diff --git a/externals/gridflow/examples/ripple.pd b/externals/gridflow/examples/ripple.pd deleted file mode 100644 index 3756a874..00000000 --- a/externals/gridflow/examples/ripple.pd +++ /dev/null @@ -1,184 +0,0 @@ -#N canvas 276 26 683 618 10; -#X obj 78 419 #out window; -#X obj 78 105 +; -#X obj 47 326 # +; -#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 text 15 149 distances to middle; -#X obj 18 36 inlet; -#X obj 18 93 #fold +; -#X text 89 95 pythagoras' theorem; -#X obj 18 131 outlet; -#X obj 18 55 #for (-128 -128) (128 128) (1 1); -#X obj 18 112 # sqrt; -#X obj 18 74 # sq-; -#X connect 2 0 6 0; -#X connect 3 0 7 0; -#X connect 6 0 8 0; -#X connect 7 0 5 0; -#X connect 8 0 3 0; -#X restore 164 41 pd distance map; -#X obj 78 440 fps detailed; -#X obj 283 130 loadbang; -#X obj 47 42 t a a; -#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 604 543 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 1 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 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 78 462 print; -#X obj 164 149 # inv* 10000; -#N canvas 392 110 431 233 angle 0; -#X obj 21 133 #outer atan; -#X text 81 154 angles to centre; -#X text 22 13 bang; -#X obj 21 32 inlet; -#X obj 21 56 #for -128 128 1; -#X obj 21 153 outlet 0; -#X obj 21 90 #t; -#X connect 0 0 5 0; -#X connect 3 0 4 0; -#X connect 4 0 6 0; -#X connect 6 0 0 0; -#X connect 6 1 0 1; -#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 637 537 387 220 compute 1; -#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 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 326 429 #color; -#X text 411 410 color of ripple shading; -#X obj 164 329 #for (0 0) (256 256) (1 1); -#X obj 283 170 #outer + (0 9000); -#X obj 47 173 #outer ignore (0 0); -#X obj 40 274 #t; -#X obj 326 391 loadbang; -#X msg 326 410 255 255 100; -#X connect 0 0 6 0; -#X connect 1 0 20 0; -#X connect 1 0 11 1; -#X connect 2 0 15 0; -#X connect 3 0 13 0; -#X connect 3 1 0 0; -#X connect 4 0 21 1; -#X connect 5 0 17 0; -#X connect 5 0 12 1; -#X connect 6 0 24 0; -#X connect 7 0 26 0; -#X connect 8 0 12 0; -#X connect 8 1 10 0; -#X connect 9 0 19 1; -#X connect 9 0 3 1; -#X connect 10 0 1 0; -#X connect 11 0 31 0; -#X connect 12 0 11 0; -#X connect 13 0 0 0; -#X connect 14 0 36 0; -#X connect 15 0 3 0; -#X connect 16 0 8 0; -#X connect 17 0 25 0; -#X connect 19 0 54 0; -#X connect 19 1 2 0; -#X connect 20 0 1 1; -#X connect 21 0 28 0; -#X connect 22 0 51 0; -#X connect 23 0 5 0; -#X connect 25 0 27 1; -#X connect 26 0 52 0; -#X connect 27 0 53 0; -#X connect 28 0 19 0; -#X connect 29 0 40 0; -#X connect 30 0 41 0; -#X connect 31 0 27 0; -#X connect 33 0 15 1; -#X connect 34 0 33 0; -#X connect 36 0 16 0; -#X connect 40 0 42 0; -#X connect 41 0 42 1; -#X connect 42 0 28 1; -#X connect 49 0 13 2; -#X connect 51 0 2 1; -#X connect 52 0 4 0; -#X connect 53 0 21 0; -#X connect 54 0 2 0; -#X connect 54 1 13 1; -#X connect 55 0 56 0; -#X connect 56 0 49 0; diff --git a/externals/gridflow/examples/sand.pd b/externals/gridflow/examples/sand.pd deleted file mode 100644 index 9e7f2d3d..00000000 --- a/externals/gridflow/examples/sand.pd +++ /dev/null @@ -1,392 +0,0 @@ -#N canvas 344 26 680 557 10; -#X text 287 159 disable falling; -#X obj 2 96 t a a; -#X obj 323 314 # != 0; -#X obj 384 352 #fold +; -#X obj 8 442 s position; -#X obj 192 29 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1 -; -#X obj 323 371 #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 323 333 #ravel; -#X obj 217 158 shunt 2; -#X obj 34 96 s size; -#X obj 323 352 #fold +; -#X obj 420 95 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 1 -; -#X obj 452 358 #export; -#X obj 452 320 #ravel; -#X obj 306 220 shunt 2; -#X obj 271 159 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 -1; -#X obj 384 371 #export; -#X obj 367 94 shunt 2; -#X obj 2 230 #greyscale_to_rgb; -#X obj 367 113 r position; -#N canvas 364 105 496 344 falling 0; -#X obj 42 147 # +; -#X text 227 189 vertical falling; -#X obj 42 40 inlet; -#X text 83 40 Dim[rows \, columns \, {height}]; -#X obj 42 168 # +; -#X obj 42 209 # +; -#X text 95 250 Dim[rows \, columns \, {height}]; -#X text 216 129 horizontal falling; -#X obj 42 230 # +; -#X obj 42 103 #store; -#X obj 42 249 outlet; -#X obj 42 84 #finished; -#X obj 110 209 #convolve (2 1 # 1 1) \, fold inv+; -#X obj 110 230 #convolve (3 1 # 1 1 0) \, fold inv+; -#X obj 69 209 # / 4; -#X obj 69 230 # / 4; -#X obj 69 147 # / 4; -#X obj 69 168 # / 4; -#X obj 108 147 #convolve (1 2 # 1 1) \, fold inv+; -#X obj 109 168 #convolve (1 3 # 1 1 0) \, fold inv+; -#X obj 159 78 # rand; -#X obj 123 116 # +; -#X obj 42 59 t a a a; -#X obj 159 59 # put 128; -#X obj 159 97 # - 32; -#X obj 159 116 # div 50; -#X connect 0 0 4 0; -#X connect 2 0 22 0; -#X connect 4 0 5 0; -#X connect 5 0 8 0; -#X connect 8 0 10 0; -#X connect 9 0 0 0; -#X connect 11 0 9 0; -#X connect 12 0 14 0; -#X connect 13 0 15 0; -#X connect 14 0 5 1; -#X connect 15 0 8 1; -#X connect 16 0 0 1; -#X connect 17 0 4 1; -#X connect 18 0 16 0; -#X connect 19 0 17 0; -#X connect 20 0 24 0; -#X connect 21 0 18 0; -#X connect 21 0 19 0; -#X connect 21 0 12 0; -#X connect 21 0 13 0; -#X connect 22 0 11 0; -#X connect 22 1 9 1; -#X connect 22 1 21 0; -#X connect 22 2 23 0; -#X connect 23 0 20 0; -#X connect 24 0 25 0; -#X connect 25 0 21 1; -#X restore 217 178 pd falling sand; -#X obj 2 170 shunt 3; -#X obj 2 480 print; -#X obj 197 65 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X text 210 27 auto; -#N canvas 301 45 536 447 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 112 244 # / 20; -#X obj 112 297 # *; -#X obj 13 244 #store; -#X obj 14 18 inlet; -#X obj 279 51 loadbang; -#X obj 13 38 t a a; -#X obj 112 225 #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 112 206 #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 13 420 outlet; -#X obj 260 53 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X text 122 262 find out how high the compensation torus should be -; -#X obj 112 316 # div 256; -#X obj 36 58 route grid; -#X obj 13 225 #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; -#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 259 326 pd torus; -#X text 66 415 put extra sand as a ring around the hole; -#X obj 112 278 #redim (64 64 1); -#X obj 13 397 #draw_image - (1 1 1 #) (0 0); -#X obj 13 141 #draw_image - (1 1 1 #) (0 0); -#X obj 13 343 shunt 2; -#X obj 64 343 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 1 -; -#X connect 0 0 11 0; -#X connect 1 0 15 0; -#X connect 2 0 24 0; -#X connect 3 0 17 0; -#X connect 4 0 27 0; -#X connect 5 0 7 0; -#X connect 6 0 13 0; -#X connect 7 0 26 0; -#X connect 7 1 18 0; -#X connect 8 0 2 0; -#X connect 11 0 25 2; -#X connect 11 0 26 2; -#X connect 12 0 8 0; -#X connect 13 0 21 0; -#X connect 13 0 22 0; -#X connect 15 0 13 0; -#X connect 17 0 25 1; -#X connect 18 0 1 0; -#X connect 19 0 4 0; -#X connect 20 0 19 0; -#X connect 20 1 12 0; -#X connect 20 1 4 1; -#X connect 21 0 26 1; -#X connect 22 0 3 1; -#X connect 24 0 3 0; -#X connect 25 0 14 0; -#X connect 26 0 20 0; -#X connect 27 0 25 0; -#X connect 27 1 14 0; -#X connect 28 0 27 1; -#X restore 260 132 pd finger; -#X obj 360 286 # -; -#X obj 384 333 #ravel; -#X msg 2 56 240 320; -#X obj 452 339 #fold +; -#X obj 2 211 # + 128; -#X text 375 220 enable stats; -#X text 289 411 checking for conservation of amounts of sand; -#X msg 2 115 \$1 \$2 1 # 0; -#N canvas 499 117 441 278 lighting 0; -#X obj 28 234 outlet; -#X obj 27 18 inlet; -#X text 184 103 colourize the horizontal differences; -#X text 184 149 colourize the vertical differences; -#X obj 60 149 #outer & (0 -1 0); -#X obj 60 129 #convolve (4 1 # 1 -8 8 -1); -#X obj 60 84 #convolve (1 4 # 1 -8 8 -1); -#X obj 28 177 # << 2; -#X obj 28 215 #clip; -#X obj 28 196 # + (220 200 180); -#X obj 27 37 #t; -#X obj 28 56 #greyscale_to_rgb; -#X obj 28 104 # +; -#X obj 28 149 # +; -#X obj 60 104 #outer & (-1 0 0); -#X connect 1 0 10 0; -#X connect 4 0 13 1; -#X connect 5 0 4 0; -#X connect 6 0 14 0; -#X connect 7 0 9 0; -#X connect 8 0 0 0; -#X connect 9 0 8 0; -#X connect 10 0 11 0; -#X connect 10 1 6 0; -#X connect 10 1 5 0; -#X connect 11 0 12 0; -#X connect 12 0 13 0; -#X connect 13 0 7 0; -#X connect 14 0 12 1; -#X restore 24 298 pd lighting; -#X obj 2 461 fps detailed; -#X obj 359 221 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 -1; -#X text 213 65 step; -#X obj 67 183 vradio 15 1 0 3 empty empty empty 0 -6 0 8 -241291 -1 --1 1; -#X obj 2 422 #out window; -#X obj 323 392 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 --262144 -1 -1 0 256; -#X obj 384 392 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 --262144 -1 -1 0 256; -#X obj 452 377 nbx 8 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 --262144 -1 -1 0 256; -#X text 87 196 differential; -#X text 86 181 heightmap; -#X text 86 212 topographic; -#X obj 152 82 t a a; -#X obj 217 220 t a a; -#X obj 2 37 loadbang; -#X text 436 95 disable finger; -#X obj 350 264 t a a; -#X obj 2 192 # << 2; -#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 -25 sand.pd; -#X text -1 21 set size & reset; -#X obj 2 249 #clip; -#X obj 24 279 # << 0; -#X obj 68 144 loadbang; -#X msg 68 163 1; -#X obj 270 115 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 -1; -#X msg 8 76 120 160; -#X obj 192 46 metro 33.3667; -#X obj 2 400 #scale_by 2; -#N canvas 0 0 450 300 topographic 0; -#X obj 35 18 inlet; -#X obj 35 170 #greyscale_to_rgb; -#X obj 35 37 #convolve (3 3 # 1 2 1 2 4 2); -#X obj 35 151 #clip; -#X obj 35 56 # & 127; -#X obj 35 189 outlet; -#X obj 35 75 # abs- 108; -#X obj 35 94 # min 20; -#X obj 35 113 # inv+ 20; -#X obj 35 132 # << 5; -#X connect 0 0 2 0; -#X connect 1 0 5 0; -#X connect 2 0 4 0; -#X connect 3 0 1 0; -#X connect 4 0 6 0; -#X connect 6 0 7 0; -#X connect 7 0 8 0; -#X connect 8 0 9 0; -#X connect 9 0 3 0; -#X restore 46 317 pd topographic; -#X text 0 -12 Copyright 2002 \, 2006 Mathieu Bouchard; -#X obj 384 314 # abs-; -#X connect 1 0 37 0; -#X connect 1 1 13 0; -#X connect 2 0 11 0; -#X connect 3 0 20 0; -#X connect 5 0 68 0; -#X connect 6 0 44 0; -#X connect 7 0 8 0; -#X connect 8 0 12 0; -#X connect 8 1 29 0; -#X connect 9 0 10 0; -#X connect 9 1 21 0; -#X connect 10 0 29 1; -#X connect 11 0 14 0; -#X connect 12 0 24 0; -#X connect 12 1 51 0; -#X connect 14 0 6 0; -#X connect 15 0 21 1; -#X connect 16 0 46 0; -#X connect 17 0 33 0; -#X connect 18 1 17 0; -#X connect 18 1 54 0; -#X connect 19 0 12 1; -#X connect 20 0 45 0; -#X connect 21 0 8 1; -#X connect 22 0 62 0; -#X connect 23 0 9 0; -#X connect 24 0 51 0; -#X connect 25 0 55 0; -#X connect 25 1 63 0; -#X connect 25 2 70 0; -#X connect 27 0 7 0; -#X connect 29 0 12 0; -#X connect 30 0 2 0; -#X connect 30 0 72 0; -#X connect 31 0 3 0; -#X connect 32 0 1 0; -#X connect 33 0 16 0; -#X connect 34 0 22 0; -#X connect 37 0 50 0; -#X connect 38 0 69 0; -#X connect 39 0 26 0; -#X connect 40 0 18 1; -#X connect 42 0 25 1; -#X connect 43 0 39 0; -#X connect 43 0 4 0; -#X connect 50 0 25 0; -#X connect 50 1 7 1; -#X connect 51 0 50 0; -#X connect 51 1 18 0; -#X connect 52 0 32 0; -#X connect 54 0 30 1; -#X connect 54 1 30 0; -#X connect 55 0 34 0; -#X connect 62 0 69 0; -#X connect 63 0 38 0; -#X connect 64 0 65 0; -#X connect 65 0 42 0; -#X connect 66 0 8 1; -#X connect 67 0 1 0; -#X connect 68 0 7 0; -#X connect 69 0 43 0; -#X connect 70 0 69 0; -#X connect 72 0 31 0; diff --git a/externals/gridflow/examples/scratch_video.pd b/externals/gridflow/examples/scratch_video.pd deleted file mode 100644 index b97c0712..00000000 --- a/externals/gridflow/examples/scratch_video.pd +++ /dev/null @@ -1,43 +0,0 @@ -#N canvas 694 45 580 451 10; -#X obj 119 273 listelement 1; -#X floatatom 119 292 5 0 0 0 - - -; -#X floatatom 246 217 5 0 0 0 - - -; -#X obj 119 254 route position; -#X obj 119 177 #in; -#X obj -13 0 cnv 15 580 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj -16 417 cnv 15 580 30 empty empty empty 20 12 0 14 -200249 -66577 -0; -#X text 0 13 Copyright 2003 Alexandre Castonguay; -#X text -4 38 Use the mouse position to scratch the video \, a touchscreen -works well.; -#X obj 119 235 #out window; -#X text 290 215 <-- frame number; -#X text 223 272 <-- get x values; -#X obj 92 130 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 --1; -#X text 0 0 scratch_video.pd; -#X text 16 424 GridFlow 0.9.0; -#X obj 119 334 s frame_number; -#X obj 119 86 r frame_number; -#X floatatom 78 338 5 0 0 0 - - -; -#X msg 197 141 open violoncelle.mov; -#X msg 237 82 get; -#X obj 169 194 route frames; -#X floatatom 169 216 5 0 0 0 - - -; -#X text 336 140 320 x 240 \, 128 frames; -#X obj 119 311 / 2.8; -#X connect 0 0 1 0; -#X connect 1 0 23 0; -#X connect 3 0 0 0; -#X connect 4 0 9 0; -#X connect 4 1 2 0; -#X connect 4 1 20 0; -#X connect 9 0 3 0; -#X connect 12 0 4 0; -#X connect 16 0 4 0; -#X connect 18 0 4 0; -#X connect 19 0 4 0; -#X connect 20 0 21 0; -#X connect 23 0 15 0; -#X connect 23 0 17 0; diff --git a/externals/gridflow/examples/slitscanning.pd b/externals/gridflow/examples/slitscanning.pd deleted file mode 100644 index fe2927f0..00000000 --- a/externals/gridflow/examples/slitscanning.pd +++ /dev/null @@ -1,54 +0,0 @@ -#N canvas 398 50 401 530 10; -#X obj 18 460 #out window; -#X obj 18 205 #store; -#X obj 18 178 #store; -#X obj 93 122 loadbang; -#X obj 18 106 t b b; -#X obj 34 353 @join 0; -#X obj 18 55 tgl 15 0 empty empty empty 17 7 0 10 -24198 -1 -1 0 1 -; -#X obj 18 432 #store; -#X obj 34 284 #t; -#X obj 18 228 #t; -#X obj 78 301 b; -#X obj 18 256 b; -#X obj 18 411 #store; -#X obj 106 349 loadbang; -#X obj 18 83 metro 33.3333; -#X obj 0 498 cnv 15 400 30 empty empty empty 20 12 0 14 -200249 -66577 -0; -#X text 8 505 GridFlow 0.9.0; -#X obj 1 0 cnv 15 400 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X text 14 0 slitscanning.pd; -#X text 14 13 Copyright 2007 Roman Haefeli; -#X text 38 55 <- start / stop; -#X text 155 182 <- set dimensions to 240 320; -#X obj 96 181 cnv 15 50 17 empty empty empty 20 12 0 14 -241291 -66577 -0; -#X obj 96 182 #camera; -#X obj 55 153 #for (119 0) (120 320) (1 1); -#X obj 77 323 #store (600 320 3 #); -#X obj 97 376 #for (0 0) (600 320) (1 1); -#X connect 1 0 9 0; -#X connect 2 0 1 0; -#X connect 3 0 24 0; -#X connect 4 0 2 0; -#X connect 4 1 23 0; -#X connect 5 0 7 1; -#X connect 6 0 14 0; -#X connect 7 0 0 0; -#X connect 7 0 25 1; -#X connect 8 0 5 0; -#X connect 8 1 10 0; -#X connect 9 0 11 0; -#X connect 9 1 8 0; -#X connect 10 0 25 0; -#X connect 11 0 12 0; -#X connect 12 0 7 0; -#X connect 13 0 26 0; -#X connect 14 0 4 0; -#X connect 23 0 1 1; -#X connect 24 0 2 1; -#X connect 25 0 5 1; -#X connect 26 0 12 1; diff --git a/externals/gridflow/examples/spectrogram.pd b/externals/gridflow/examples/spectrogram.pd deleted file mode 100644 index fb6730d2..00000000 --- a/externals/gridflow/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/examples/threshold.pd b/externals/gridflow/examples/threshold.pd deleted file mode 100644 index 0b90b07f..00000000 --- a/externals/gridflow/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/examples/transform.pd b/externals/gridflow/examples/transform.pd deleted file mode 100644 index d8785933..00000000 --- a/externals/gridflow/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/examples/translation_tracker.pd b/externals/gridflow/examples/translation_tracker.pd deleted file mode 100644 index a78b0068..00000000 --- a/externals/gridflow/examples/translation_tracker.pd +++ /dev/null @@ -1,162 +0,0 @@ -#N canvas 734 0 486 689 10; -#X obj 28 15 tgl 15 0 empty empty empty 17 7 0 10 -24198 -1 -1 1 1 -; -#X obj 172 7 bng 15 250 50 0 empty empty empty 17 7 0 10 -241291 -1 --1; -#X obj 189 12 loadbang; -#X obj 28 120 #remap_image; -#X floatatom 378 62 5 0 0 0 - - -; -#X obj 345 83 #pack; -#X obj 28 195 #cast f; -#X obj 28 492 #cast i; -#X obj 172 195 #cast f; -#X obj 172 233 #fft; -#X obj 172 214 #outer * (2 f # 1 0); -#X obj 28 511 #rgb_to_greyscale; -#X obj 29 648 display; -#X obj 28 361 # C.*conj; -#X obj 28 530 #t; -#X obj 28 609 # >=; -#X obj 28 628 #moment; -#X floatatom 378 42 5 0 0 0 - - -; -#X obj 193 610 #moment; -#X obj 194 633 display; -#X obj 191 567 #clip; -#X text 241 459 this is the same as magnitude; -#X text 244 472 because imaginary = 0 here; -#X obj 28 101 #store; -#X obj 28 51 shunt; -#X obj 65 52 tgl 15 0 empty empty empty 17 7 0 10 -241291 -1 -1 0 1 -; -#X obj 58 70 #camera; -#X obj 228 121 gf.oneshot; -#X obj 189 121 t a a; -#X obj 301 122 bng 15 250 50 0 empty empty empty 17 7 0 10 -260818 --1 -1; -#X obj 141 645 fps; -#X obj 142 665 display; -#X obj 141 626 bang; -#X obj 331 216 # inv* (f # 1); -#X obj 172 252 # * (f #); -#X obj 189 31 t b b; -#X obj 233 164 #window A; -#X obj 83 182 #window B; -#X obj 148 183 tgl 15 0 empty empty empty 17 7 0 10 -241291 -1 -1 0 -1; -#X obj 298 165 tgl 15 0 empty empty empty 17 7 0 10 -241291 -1 -1 0 -1; -#X obj 320 587 tgl 15 0 empty empty empty 17 7 0 10 -241291 -1 -1 0 -1; -#X obj 44 568 #fold max; -#X obj 44 549 #ravel; -#X text 83 431 this bufferises the data to avoid an alignment warning -; -#X obj 331 235 # sq- (f #); -#X obj 116 120 # -; -#X obj 11 36 bng 15 250 50 0 empty empty empty 17 7 0 10 -24198 -1 --1; -#X obj 28 240 #fft \, real; -#X obj 350 280 tgl 15 0 empty empty empty 17 7 0 10 -241291 -1 -1 0 -1; -#X obj 28 311 t a; -#X obj 262 291 #cast i; -#X obj 262 386 #clip; -#X obj 172 63 #in pure-data.jpg; -#X msg 331 197 list f # 76800; -#X obj 262 310 # sq-; -#X obj 262 272 spigot; -#X obj 262 329 #fold +; -#X obj 262 348 # sqrt; -#X obj 262 405 #window D; -#X obj 350 261 loadbang; -#X obj 191 586 #window C; -#X obj 191 510 spigot; -#X obj 320 568 loadbang; -#X obj 28 449 #fft \, sign 1 \, real; -#X obj 262 367 # >> 4; -#X obj 28 32 metro 33.3667; -#X obj 191 548 # -; -#X obj 192 529 # >> 6; -#X obj 216 550 nbx 3 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10 --262144 -1 -1 256 256; -#X obj 67 408 tgl 15 0 empty empty empty 17 7 0 10 -241291 -1 -1 0 -1; -#X obj 28 407 shunt; -#X obj 58 430 #t; -#X connect 0 0 65 0; -#X connect 1 0 52 0; -#X connect 2 0 35 0; -#X connect 3 0 37 0; -#X connect 3 0 6 0; -#X connect 3 1 45 0; -#X connect 4 0 5 1; -#X connect 5 0 45 1; -#X connect 6 0 47 0; -#X connect 7 0 11 0; -#X connect 7 0 61 0; -#X connect 8 0 10 0; -#X connect 9 0 34 0; -#X connect 10 0 9 0; -#X connect 11 0 14 0; -#X connect 11 0 18 0; -#X connect 13 0 70 0; -#X connect 14 0 15 0; -#X connect 14 1 42 0; -#X connect 15 0 16 0; -#X connect 16 0 12 0; -#X connect 16 0 32 0; -#X connect 17 0 5 0; -#X connect 18 0 19 0; -#X connect 20 0 60 0; -#X connect 23 0 3 0; -#X connect 24 0 23 0; -#X connect 24 1 26 0; -#X connect 25 0 24 1; -#X connect 26 0 28 0; -#X connect 27 0 36 0; -#X connect 27 0 8 0; -#X connect 28 0 6 0; -#X connect 28 1 27 0; -#X connect 29 0 27 1; -#X connect 30 0 31 0; -#X connect 32 0 30 0; -#X connect 33 0 44 0; -#X connect 34 0 13 1; -#X connect 35 0 52 0; -#X connect 35 1 53 0; -#X connect 38 0 37 1; -#X connect 39 0 36 1; -#X connect 40 0 60 1; -#X connect 40 0 61 1; -#X connect 41 0 15 1; -#X connect 42 0 41 0; -#X connect 44 0 34 1; -#X connect 45 0 3 1; -#X connect 46 0 24 0; -#X connect 47 0 49 0; -#X connect 48 0 55 1; -#X connect 48 0 58 1; -#X connect 49 0 13 0; -#X connect 49 0 55 0; -#X connect 50 0 54 0; -#X connect 51 0 58 0; -#X connect 52 0 23 1; -#X connect 52 0 8 0; -#X connect 53 0 33 0; -#X connect 54 0 56 0; -#X connect 55 0 50 0; -#X connect 56 0 57 0; -#X connect 57 0 64 0; -#X connect 59 0 48 0; -#X connect 61 0 67 0; -#X connect 62 0 40 0; -#X connect 63 0 7 0; -#X connect 64 0 51 0; -#X connect 65 0 24 0; -#X connect 66 0 20 0; -#X connect 67 0 66 0; -#X connect 68 0 66 1; -#X connect 69 0 70 1; -#X connect 70 0 63 0; -#X connect 70 1 71 0; -#X connect 71 0 63 0; diff --git a/externals/gridflow/examples/translation_tracker2.pd b/externals/gridflow/examples/translation_tracker2.pd deleted file mode 100644 index 56eeb2e9..00000000 --- a/externals/gridflow/examples/translation_tracker2.pd +++ /dev/null @@ -1,126 +0,0 @@ -#N canvas 770 0 450 674 10; -#X obj 6 6 tgl 15 0 empty empty empty 17 7 0 10 -24198 -1 -1 0 1; -#X obj 36 170 #cast f; -#X obj 36 208 #fft; -#X obj 36 327 #cast i; -#X obj 36 189 #outer * (2 f # 1 0); -#X obj 180 170 #cast f; -#X obj 180 208 #fft; -#X obj 180 189 #outer * (2 f # 1 0); -#X obj 36 279 #fft \, sign -1; -#X obj 36 151 # - 128; -#X obj 180 151 # - 128; -#X obj 36 346 #rgb_to_greyscale; -#X obj 36 260 # C.*conj; -#X obj 52 403 #fold max; -#X obj 36 365 #t; -#X obj 36 424 # >=; -#X obj 36 443 #moment; -#X obj 199 401 #out window; -#X obj 199 382 #clip; -#X obj 199 363 # + 128; -#X obj 36 298 #inner (2 f # 1 0) \, seed (f #); -#X text 249 294 this is the same as magnitude; -#X text 252 307 because imaginary = 0 here; -#X obj 36 61 #camera; -#X obj 296 467 fps; -#X obj 297 486 display; -#X obj 296 448 bang; -#X obj 331 232 # inv* (f # 1); -#X obj 328 151 loadbang; -#X msg 328 207 list f # 172800; -#X obj 36 227 # * (f #); -#X obj 180 228 # * (f #); -#X obj 52 384 #ravel; -#X msg 332 178 list f # 76800; -#X obj 27 119 #out window; -#X obj 35 483 # % (240 320); -#X obj 35 502 # - (120 160); -#X obj 35 464 # + (120 160); -#X floatatom 252 365 5 0 0 0 - - -; -#X obj 199 344 # >> 5; -#X obj 35 521 # +; -#X obj 60 521 t a; -#X msg 166 514 240 320; -#X obj 136 459 loadbang; -#X obj 89 80 s \$0-meuh; -#X obj 88 606 r \$0-meuh; -#X obj 6 42 t b b; -#X obj 6 647 #out window; -#X obj 35 540 #export_list; -#X obj 52 628 #store; -#X obj 35 559 t b a; -#X obj 272 558 display; -#X msg 74 559 put_at ( \$1 \$2 0 ); -#X obj 136 495 t b b; -#X obj 136 478 bng 15 250 50 0 empty empty empty 17 7 0 10 -260818 --1 -1; -#X obj 6 23 metro 100; -#X msg 136 533 720 960 3 #; -#X obj 6 628 #store; -#X obj 36 80 t a a a; -#X msg 12 585 op avg; -#X connect 0 0 55 0; -#X connect 1 0 4 0; -#X connect 2 0 30 0; -#X connect 3 0 11 0; -#X connect 3 0 39 0; -#X connect 4 0 2 0; -#X connect 5 0 7 0; -#X connect 6 0 31 0; -#X connect 7 0 6 0; -#X connect 8 0 20 0; -#X connect 9 0 1 0; -#X connect 10 0 5 0; -#X connect 11 0 14 0; -#X connect 12 0 8 0; -#X connect 13 0 15 1; -#X connect 14 0 15 0; -#X connect 14 1 32 0; -#X connect 15 0 16 0; -#X connect 16 0 26 0; -#X connect 16 0 37 0; -#X connect 18 0 17 0; -#X connect 19 0 18 0; -#X connect 20 0 3 0; -#X connect 23 0 58 0; -#X connect 24 0 25 0; -#X connect 26 0 24 0; -#X connect 27 0 30 1; -#X connect 27 0 31 1; -#X connect 28 0 33 0; -#X connect 29 0 27 0; -#X connect 30 0 12 0; -#X connect 31 0 12 1; -#X connect 32 0 13 0; -#X connect 33 0 27 0; -#X connect 35 0 36 0; -#X connect 36 0 40 0; -#X connect 37 0 35 0; -#X connect 38 0 19 1; -#X connect 39 0 19 0; -#X connect 40 0 41 0; -#X connect 40 0 48 0; -#X connect 41 0 40 1; -#X connect 42 0 40 1; -#X connect 43 0 54 0; -#X connect 45 0 49 1; -#X connect 46 0 57 0; -#X connect 46 1 23 0; -#X connect 48 0 50 0; -#X connect 48 0 51 0; -#X connect 49 0 57 1; -#X connect 50 0 49 0; -#X connect 50 1 52 0; -#X connect 52 0 57 1; -#X connect 53 0 56 0; -#X connect 53 1 42 0; -#X connect 54 0 53 0; -#X connect 55 0 46 0; -#X connect 56 0 57 1; -#X connect 57 0 47 0; -#X connect 58 0 34 0; -#X connect 58 0 10 0; -#X connect 58 1 9 0; -#X connect 58 2 44 0; -#X connect 59 0 57 0; diff --git a/externals/gridflow/examples/videodev_effects.pd b/externals/gridflow/examples/videodev_effects.pd deleted file mode 100644 index 22a9d443..00000000 --- a/externals/gridflow/examples/videodev_effects.pd +++ /dev/null @@ -1,264 +0,0 @@ -#N canvas 623 0 597 657 10; -#X obj 80 486 tgl 15 0 empty empty crosshair_of_centroid 20 7 0 10 --241291 -1 -1 1 1; -#X obj 71 261 # max 0; -#X obj 27 349 shunt 2; -#X obj 71 131 #downscale_by 2 smoothly; -#X obj 27 484 shunt 2; -#X obj 81 351 tgl 15 0 empty empty gamma_correction 18 7 0 10 -241291 --1 -1 0 1; -#X obj 80 176 tgl 15 0 empty empty frame_difference 18 7 0 10 -241291 --1 -1 0 1; -#X obj 27 47 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1; -#X obj 27 112 shunt 2; -#X obj 27 541 #out window; -#X obj 80 113 tgl 15 0 empty empty smaller_picture 18 7 0 10 -241291 --1 -1 0 1; -#X obj 27 579 print; -#X obj 240 382 #for 0 256 1; -#X floatatom 240 347 5 0 0 0 - - -; -#X obj 99 243 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -260818 --1 -1 0 1; -#X obj 27 295 shunt 2; -#X obj 173 441 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 -1; -#X obj 27 421 shunt 2; -#X obj 27 560 fps detailed; -#X obj 240 309 loadbang; -#X obj 80 421 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 1 -; -#X obj 71 393 #store; -#N canvas 81 205 480 500 sort 0; -#X obj 180 257 # * 255; -#X obj 10 345 # >> 0; -#X obj 113 472 outlet; -#X obj 226 42 inlet; -#X obj 225 191 # / 2; -#X obj 10 325 # +; -#X obj 44 9 inlet; -#X obj 242 150 # - 1; -#X obj 131 422 # +; -#X obj 180 238 # < 176; -#X obj 10 369 #store; -#X obj 91 28 #grade; -#X obj 131 444 # >> 1; -#X obj 283 266 # / 351; -#X obj 91 47 shunt 2; -#X obj 135 66 #grade; -#X obj 144 119 inlet; -#X text 271 128 extract width; -#X obj 10 266 #finished; -#X obj 283 247 # * 255; -#X obj 91 9 #fold +; -#X obj 91 119 shunt 4; -#X obj 117 399 shunt 4; -#X msg 235 126 \$2; -#X obj 211 65 #dim; -#X obj 44 37 t a a; -#X msg 186 127 \$1 \$2; -#X obj 211 85 #export_list; -#X obj 76 146 t a a; -#X obj 10 285 #for (0 0) (288 352) (1 1); -#X obj 106 176 #outer & (0 -1); -#X obj 292 300 #outer ignore (3 #); -#X obj 10 305 # * (1 0); -#X connect 0 0 31 0; -#X connect 1 0 10 0; -#X connect 3 0 14 1; -#X connect 4 0 9 1; -#X connect 5 0 1 0; -#X connect 6 0 25 0; -#X connect 7 0 13 1; -#X connect 8 0 12 0; -#X connect 9 0 0 0; -#X connect 10 0 22 0; -#X connect 11 0 14 0; -#X connect 12 0 2 0; -#X connect 13 0 31 0; -#X connect 14 0 21 0; -#X connect 14 1 15 0; -#X connect 15 0 21 0; -#X connect 16 0 21 1; -#X connect 16 0 22 1; -#X connect 18 0 29 0; -#X connect 19 0 13 0; -#X connect 20 0 11 0; -#X connect 21 0 28 0; -#X connect 21 1 28 0; -#X connect 21 2 9 0; -#X connect 21 3 19 0; -#X connect 22 0 2 0; -#X connect 22 1 8 0; -#X connect 23 0 4 0; -#X connect 23 0 7 0; -#X connect 24 0 27 0; -#X connect 25 0 20 0; -#X connect 25 1 10 1; -#X connect 25 1 24 0; -#X connect 25 1 8 1; -#X connect 26 0 29 1; -#X connect 27 0 23 0; -#X connect 27 0 26 0; -#X connect 28 0 18 0; -#X connect 28 1 30 0; -#X connect 29 0 32 0; -#X connect 30 0 5 1; -#X connect 31 0 2 0; -#X connect 32 0 5 0; -#X restore 71 440 pd sort me out; -#X obj 240 401 # gamma; -#X obj 71 242 # -; -#X obj 80 296 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 1 -; -#N canvas 372 198 399 273 motion 0; -#X obj 15 113 # << 2; -#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 obj 15 162 # abs-; -#X connect 0 0 9 0; -#X connect 1 0 8 0; -#X connect 2 0 0 0; -#X connect 3 0 5 0; -#X connect 5 0 6 0; -#X connect 6 0 4 0; -#X connect 7 0 3 0; -#X connect 8 0 12 0; -#X connect 8 1 2 0; -#X connect 9 0 13 0; -#X connect 9 1 7 0; -#X connect 10 0 9 1; -#X connect 11 0 12 1; -#X connect 12 0 2 1; -#X connect 13 0 5 0; -#X restore 71 223 pd motion detection; -#X obj 117 423 hradio 15 1 0 4 empty empty empty 0 -6 0 8 -241291 -1 --1 0; -#X text 125 261 noise reduction (on find-edges only); -#X obj 27 64 metro 33.3667; -#X obj 27 175 shunt 2; -#X obj 135 191 vradio 15 1 0 2 empty empty empty 0 -6 0 8 -241291 -1 --1 0; -#X floatatom 184 577 5 0 0 0 - - -; -#X floatatom 228 577 5 0 0 0 - - -; -#N canvas 547 147 477 267 crosshair 0; -#X obj 12 224 outlet; -#X obj 12 9 inlet; -#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 175 37 #fade 8; -#X obj 175 18 inlet; -#X obj 54 76 #finished; -#X obj 95 169 # + (120 160); -#X obj 12 205 #draw_polygon + (0 170 0); -#X obj 175 56 t a a; -#X connect 1 0 8 0; -#X connect 2 0 7 0; -#X connect 3 0 2 0; -#X connect 4 0 9 0; -#X connect 5 0 4 0; -#X connect 6 0 3 0; -#X connect 7 0 8 2; -#X connect 8 0 0 0; -#X connect 9 0 6 0; -#X connect 9 1 7 1; -#X restore 71 522 pd crosshair; -#X obj 27 522 t a; -#X text 151 205 emboss; -#X text 152 191 hilite; -#X obj 199 191 vradio 15 1 0 2 empty empty empty 0 -6 0 8 -241291 -1 --1 1; -#X text 218 191 motion; -#X text 219 205 presence; -#X obj -13 625 cnv 15 620 30 empty empty empty 20 12 0 14 -200249 -66577 -0; -#X obj -13 2 cnv 15 620 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X text 0 15 Copyright 2002 Mathieu Bouchard; -#X text 0 1 videodev_effects.pd; -#X obj 71 371 #outer ignore (0); -#X obj 184 539 #moment; -#X obj 240 363 t b a; -#X obj 184 520 #rgb_to_greyscale; -#X obj 71 503 #t; -#X obj 71 314 #fade (16 4 1); -#X obj 27 83 #camera 0; -#X obj 184 558 #unpack; -#X text -5 633 GridFlow 0.9.4; -#X text 236 290 make gamma table; -#X obj 240 420 #to_list; -#X msg 240 328 512; -#N canvas 0 0 450 300 (subpatch) 0; -#X array gamma 256 float 2; -#X coords 0 255 255 0 128 128 1; -#X restore 400 337 graph; -#X text 97 499 (use with "hilite" mode above); -#X obj 240 439 list prepend 0; -#X obj 240 458 s gamma; -#X text 406 467 only for viewing; -#X text 408 482 (not necessary); -#X connect 0 0 4 1; -#X connect 1 0 15 0; -#X connect 2 0 17 0; -#X connect 2 1 45 0; -#X connect 3 0 30 0; -#X connect 4 0 35 0; -#X connect 4 1 49 0; -#X connect 5 0 2 1; -#X connect 6 0 30 1; -#X connect 7 0 29 0; -#X connect 8 0 30 0; -#X connect 8 1 3 0; -#X connect 9 0 18 0; -#X connect 10 0 8 1; -#X connect 12 0 23 0; -#X connect 13 0 47 0; -#X connect 14 0 24 1; -#X connect 15 0 2 0; -#X connect 15 1 50 0; -#X connect 16 0 22 2; -#X connect 17 0 4 0; -#X connect 17 1 22 0; -#X connect 18 0 11 0; -#X connect 19 0 56 0; -#X connect 20 0 17 1; -#X connect 21 0 17 0; -#X connect 22 0 4 0; -#X connect 23 0 21 1; -#X connect 23 0 55 0; -#X connect 24 0 1 0; -#X connect 25 0 15 1; -#X connect 26 0 24 0; -#X connect 27 0 22 1; -#X connect 29 0 51 0; -#X connect 30 0 15 0; -#X connect 30 1 26 0; -#X connect 31 0 26 1; -#X connect 34 0 35 0; -#X connect 35 0 9 0; -#X connect 38 0 26 2; -#X connect 45 0 21 0; -#X connect 46 0 34 1; -#X connect 46 0 52 0; -#X connect 47 0 12 0; -#X connect 47 1 23 1; -#X connect 48 0 46 0; -#X connect 49 0 34 0; -#X connect 49 1 48 0; -#X connect 50 0 2 0; -#X connect 51 0 8 0; -#X connect 52 0 32 0; -#X connect 52 1 33 0; -#X connect 55 0 59 0; -#X connect 56 0 13 0; -#X connect 59 0 60 0; diff --git a/externals/gridflow/examples/wave_1d.pd b/externals/gridflow/examples/wave_1d.pd deleted file mode 100644 index b9cafd74..00000000 --- a/externals/gridflow/examples/wave_1d.pd +++ /dev/null @@ -1,173 +0,0 @@ -#N canvas 560 15 621 659 10; -#X obj 13 13 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 1 1 -; -#X obj 181 29 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 30 128 t a a; -#X obj 17 250 shunt 2; -#X obj 64 251 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 -; -#X obj 45 620 fps; -#X floatatom 71 621 5 0 0 0 - - -; -#X obj 17 269 t a b; -#X obj 7 368 fps; -#X floatatom 7 387 5 0 0 0 - - -; -#X obj 45 419 spigot; -#X obj 76 381 f; -#X obj 109 378 + 1; -#X obj 76 400 == 0; -#X obj 30 30 t b; -#X obj 174 9 loadbang; -#X obj 105 487 loadbang; -#X obj 461 449 loadbang; -#X obj 244 595 unpack 0 0; -#X obj 244 614 inv+ 64; -#X msg 308 595 0 \$1; -#X obj 480 494 t b l; -#X obj 244 633 << 12; -#X obj 17 186 t a a; -#N canvas 627 255 450 300 synth 0; -#X obj 17 16 inlet; -#X obj 17 102 s foo; -#X obj 20 125 tabreceive~ foo; -#X obj 20 259 outlet~; -#X obj 67 238 env~; -#X floatatom 67 257 5 0 0 0 - - -; -#X obj 99 27 loadbang; -#X obj 76 25 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 334 58 table foo 2048; -#X obj 21 144 rifft~; -#X obj 20 201 +~; -#X obj 21 163 expr~ tanh($v1*0.0001); -#X obj 20 182 lop~ 2000; -#X obj 339 24 block~ 2048; -#X obj 17 36 # * 2048; -#X obj 18 58 # /; -#X obj 86 49 #for 1 257 1; -#X obj 17 80 #export_list; -#X connect 0 0 14 0; -#X connect 2 0 9 0; -#X connect 4 0 5 0; -#X connect 6 0 16 0; -#X connect 7 0 16 0; -#X connect 9 0 11 0; -#X connect 10 0 4 0; -#X connect 10 0 3 0; -#X connect 11 0 12 0; -#X connect 12 0 10 0; -#X connect 14 0 15 0; -#X connect 15 0 17 0; -#X connect 16 0 15 1; -#X connect 17 0 1 0; -#X restore 136 437 pd synth; -#X obj 129 459 dac~; -#X text 498 6 1-D wave generator; -#X obj 174 47 #for -128 128 1; -#X obj 174 66 # abs-; -#X obj 174 85 # < 127; -#X obj 159 107 # * 1e+07; -#X obj 159 127 # * -1e+07; -#X obj 30 85 # min; -#X obj 30 104 # max; -#X obj 131 253 #redim (1); -#X obj 461 518 # + (0 6); -#X obj 65 272 #draw_polygon put (1 #); -#X obj 45 448 # >> 12; -#X obj 45 467 #redim (256); -#X obj 45 506 #outer <; -#X obj 105 506 #for 64 -64 -1; -#X obj 45 525 #transpose; -#X obj 45 544 #outer * (3 # 255); -#X obj 45 601 #out window; -#X obj 240 533 #mouse \, ...; -#X obj 244 576 #export_list; -#X obj 30 66 #store (1 256 1 # 0); -#X obj 17 147 # -; -#X obj 45 563 #fade (16 4 1); -#X obj 17 226 # -; -#X obj 109 397 % 2; -#X obj 30 11 metro 20; -#X msg 461 468 4 2 # 0 0 0 4 1 4 1 0; -#X obj 42 205 # >> 8; -#X text 54 186 damping; -#X text 249 147 wave equation; -#X text 88 419 framerate-divider; -#X obj 45 582 #scale_by 2; -#X obj 244 557 # / 2; -#X obj 55 148 #convolve (1 3 # 1 0 1) \, seed 1; -#X obj 37 321 #convolve (1 3 # 1 2 1); -#X obj 37 340 # >> 2; -#X text 180 321 smoothing; -#X text 224 120 cap at plus or minus ten million; -#X text 389 19 Copyright 2004 \, 2007 Mathieu Bouchard; -#X connect 0 0 51 0; -#X connect 1 0 27 0; -#X connect 2 0 47 1; -#X connect 2 1 59 0; -#X connect 3 0 7 0; -#X connect 3 1 36 0; -#X connect 4 0 3 1; -#X connect 5 0 6 0; -#X connect 7 0 46 1; -#X connect 7 0 60 0; -#X connect 7 1 8 0; -#X connect 7 1 11 0; -#X connect 8 0 9 0; -#X connect 10 0 37 0; -#X connect 11 0 12 0; -#X connect 11 0 13 0; -#X connect 12 0 50 0; -#X connect 13 0 10 1; -#X connect 14 0 46 0; -#X connect 15 0 27 0; -#X connect 16 0 40 0; -#X connect 17 0 52 0; -#X connect 18 0 19 0; -#X connect 18 1 20 0; -#X connect 19 0 22 0; -#X connect 20 0 21 0; -#X connect 21 0 52 0; -#X connect 21 1 35 1; -#X connect 22 0 34 0; -#X connect 23 0 49 0; -#X connect 23 1 53 0; -#X connect 24 0 25 0; -#X connect 24 0 25 1; -#X connect 27 0 28 0; -#X connect 28 0 29 0; -#X connect 29 0 30 0; -#X connect 29 0 31 0; -#X connect 30 0 32 1; -#X connect 31 0 33 1; -#X connect 32 0 33 0; -#X connect 33 0 2 0; -#X connect 34 0 36 1; -#X connect 35 0 36 2; -#X connect 36 0 7 0; -#X connect 37 0 38 0; -#X connect 38 0 24 0; -#X connect 38 0 39 0; -#X connect 39 0 41 0; -#X connect 40 0 39 1; -#X connect 41 0 42 0; -#X connect 42 0 48 0; -#X connect 43 0 5 0; -#X connect 43 0 44 0; -#X connect 44 0 58 0; -#X connect 44 1 58 0; -#X connect 44 4 4 0; -#X connect 45 0 18 0; -#X connect 46 0 32 0; -#X connect 47 0 23 0; -#X connect 48 0 57 0; -#X connect 49 0 3 0; -#X connect 50 0 11 1; -#X connect 51 0 14 0; -#X connect 52 0 35 0; -#X connect 53 0 49 1; -#X connect 57 0 43 0; -#X connect 58 0 45 0; -#X connect 59 0 47 0; -#X connect 60 0 61 0; -#X connect 61 0 10 0; diff --git a/externals/gridflow/examples/waves.pd b/externals/gridflow/examples/waves.pd deleted file mode 100644 index d0664a21..00000000 --- a/externals/gridflow/examples/waves.pd +++ /dev/null @@ -1,416 +0,0 @@ -#N canvas 214 26 783 642 10; -#X obj 270 256 #greyscale_to_rgb; -#X obj 167 66 loadbang; -#X obj 107 85 t a a; -#X obj 266 412 print; -#X obj 10 49 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1; -#N canvas 611 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 56 139 #convolve (2 1 #) \, op ignore \, fold inv+; -#X obj 86 101 #outer & (-1 0 0); -#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 12 0; -#X connect 8 1 11 0; -#X connect 9 0 10 1; -#X connect 10 0 8 0; -#X connect 11 0 13 0; -#X connect 12 0 14 0; -#X connect 13 0 4 1; -#X connect 14 0 4 0; -#X restore 260 277 pd lighting; -#X obj 228 468 # / 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 (4000); -#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 227 564 pd finger; -#X obj 141 85 s size; -#X obj 260 353 #scale_by 2; -#X obj 8 243 #store; -#N canvas 243 147 463 307 wave 0; -#X obj 26 20 inlet; -#X obj 23 293 outlet; -#X text 65 205 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 26 39 t a a; -#X obj 207 147 outlet blah; -#X obj 207 125 inlet blah; -#X obj 23 205 # -; -#X obj 23 225 # *>>8 252; -#X obj 20 250 # min 30000; -#X obj 20 270 # max -30000; -#X obj 56 82 #convolve (3 3 # 1 4 1 4 12 4) \, seed 8; -#X obj 56 101 # >> 4; -#X connect 0 0 5 0; -#X connect 5 0 8 1; -#X connect 5 1 12 0; -#X connect 7 0 8 0; -#X connect 8 0 9 0; -#X connect 9 0 10 0; -#X connect 10 0 11 0; -#X connect 11 0 1 0; -#X connect 12 0 13 0; -#X connect 13 0 6 0; -#X restore 8 281 pd wave equation; -#X obj 182 564 t a; -#X obj 107 123 t a; -#X obj 270 232 # >> 1; -#X obj 36 85 s metro; -#X text 491 65 (Best complemented with a touchscreen); -#X obj 366 159 vradio 15 1 0 3 empty empty empty 0 -6 0 8 -262144 -258699 --1 0; -#X text 384 174 height greys; -#X obj 318 96 vradio 15 1 0 3 empty empty empty 0 -6 0 8 -262144 -258699 --1 0; -#X text 336 95 plain; -#X text 336 111 line-art; -#X text 334 46 smooth; -#X obj 317 46 vradio 15 1 0 2 empty empty empty 0 -6 0 8 -262144 -258699 --1 0; -#X text 335 60 raw; -#X obj 442 418 hradio 18 1 1 4 empty empty _1__2__3__4_ 0 -4 0 8 -262144 --258699 -1 0; -#X text 440 397 scale by...; -#X obj 442 438 + 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 433 107 365 432 line-art 0; -#X obj 32 123 # << 8; -#X obj 32 37 inlet; -#X obj 34 256 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 172 # >> 2; -#X obj 31 154 #convolve (3 1 # 1 2 1); -#X obj 33 193 #convolve (1 3 # 1 2 1); -#X obj 35 215 # >> 2; -#X obj 32 60 # / 5; -#X text 146 85 < -5 becomes -256; -#X text 146 100 > +5 becomes +256; -#X connect 0 0 8 0; -#X connect 1 0 11 0; -#X connect 5 0 6 0; -#X connect 6 0 0 0; -#X connect 7 0 9 0; -#X connect 8 0 7 0; -#X connect 9 0 10 0; -#X connect 10 0 2 0; -#X connect 11 0 5 0; -#X restore 281 182 pd line-art; -#X text 628 129 Background colour; -#X text 637 277 enable video; -#X text 382 159 four-colour emboss; -#X obj 345 492 tgl 15 1 empty empty empty 0 -6 0 8 -241291 -1 -1 0 -1; -#X obj 298 472 r metro; -#X text 362 491 rain; -#X obj 260 97 # >> 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 260 59 shunt 2; -#X obj 369 548 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10 --262131 -1 -1 1 256; -#X obj 369 562 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10 --262131 -1 -1 1 256; -#X obj 260 315 # +; -#X obj 397 364 #store; -#X obj 421 296 shunt 2; -#X obj 477 291 vradio 15 1 0 2 empty empty empty 0 -6 0 8 -262144 -258699 --1 0; -#X text 495 290 plain; -#X text 495 307 refraction; -#X obj 260 296 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 397 345 pd heightmap2indexmap; -#X obj -8 82 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1 -; -#X obj 397 326 spigot; -#X text 384 189 no reflection; -#X obj 260 201 shunt 3; -#X obj 260 182 t a; -#X obj 318 232 # put 0; -#X obj 182 545 shunt 2; -#X obj 226 521 shunt 2; -#X obj 10 66 metro 33.3667; -#X obj 8 262 shunt 2; -#X text 78 263 freeze time; -#X obj 61 263 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 1 -; -#X obj 132 123 r feedback; -#X obj 182 583 s feedback; -#X obj 8 303 t a; -#X obj -13 5 cnv 15 780 30 empty empty empty 20 12 0 14 -233017 -66577 -0; -#X obj -15 611 cnv 15 780 30 empty empty empty 20 12 0 14 -200249 -66577 -0; -#X text -7 619 GridFlow 0.8.0; -#X text -7 619 GridFlow 0.8.0; -#X text 0 4 waves.pd; -#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 298 491 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 266 393 fps detailed \, period 2; -#X obj 574 226 #in; -#X obj 344 510 r size; -#X obj 298 510 #store; -#X obj 298 529 # rand; -#X obj 260 372 #out window; -#X obj 260 334 #clip; -#X obj 260 78 #convolve (2 2 #) \, op ignore; -#X obj 369 581 #pack 2; -#X text 0 18 Copyright 2003 \, 2004 \, 2005 Mathieu Bouchard; -#X obj 260 431 #mouse \, ...; -#N canvas 123 224 450 366 doodle 0; -#X obj 26 17 inlet wave; -#X obj 23 258 outlet wave; -#X obj 171 29 inlet tog; -#X obj 306 36 inlet pos; -#X obj 139 9 r metro; -#X obj 138 57 spigot; -#X obj 231 202 # +; -#X obj 137 83 t b b; -#X msg 219 123 4 2 # 0 0 0 1 1 1 1 0; -#X obj 224 158 # * 8; -#X obj 127 334 outlet rgb; -#X obj 347 78 inlet mode; -#X obj 347 221 #redim (1); -#X obj 130 238 #draw_polygon put (0); -#X obj 24 69 # *>>8; -#X obj 129 290 #inner (1 3 # 0 1 1); -#X obj 141 267 # inv+ 256; -#X obj 364 191 # inv+ 256; -#X obj 46 107 loadbang; -#X obj 347 159 # * 256; -#X obj 48 146 #store (240 320 1 # 256); -#X connect 0 0 14 0; -#X connect 2 0 5 1; -#X connect 3 0 6 1; -#X connect 4 0 5 0; -#X connect 5 0 7 0; -#X connect 6 0 13 2; -#X connect 7 0 20 0; -#X connect 7 1 8 0; -#X connect 8 0 9 0; -#X connect 9 0 6 0; -#X connect 11 0 19 0; -#X connect 12 0 13 1; -#X connect 13 0 16 0; -#X connect 13 0 20 1; -#X connect 14 0 1 0; -#X connect 15 0 10 0; -#X connect 16 0 15 0; -#X connect 17 0 12 0; -#X connect 18 0 20 0; -#X connect 19 0 12 0; -#X connect 20 0 13 0; -#X connect 20 0 14 1; -#X restore 128 282 pd doodle; -#X obj 197 282 # +; -#X msg 574 207 load g001.jpg; -#X obj 90 178 route position; -#X msg 90 197 \$3; -#X obj 90 216 & 1; -#X msg 107 66 240 320; -#X obj 573 296 #camera; -#X obj 260 116 shunt 3; -#X obj 302 142 # ** 3; -#X text 336 125 cubit; -#X obj 302 161 # >> 10; -#X connect 0 0 54 0; -#X connect 1 0 103 0; -#X connect 2 0 7 0; -#X connect 2 1 9 0; -#X connect 4 0 64 0; -#X connect 5 0 54 0; -#X connect 6 0 8 1; -#X connect 6 0 97 2; -#X connect 7 0 14 0; -#X connect 8 0 13 0; -#X connect 10 0 91 0; -#X connect 11 0 65 0; -#X connect 12 0 70 0; -#X connect 12 1 97 0; -#X connect 13 0 69 0; -#X connect 14 0 11 1; -#X connect 14 0 45 0; -#X connect 15 0 0 0; -#X connect 18 0 59 1; -#X connect 20 0 105 1; -#X connect 24 0 45 1; -#X connect 26 0 28 0; -#X connect 28 0 10 1; -#X connect 28 0 6 1; -#X connect 29 0 43 0; -#X connect 30 0 104 0; -#X connect 31 0 30 1; -#X connect 32 0 30 0; -#X connect 33 0 60 0; -#X connect 37 0 62 1; -#X connect 37 0 63 1; -#X connect 37 0 81 1; -#X connect 38 0 81 0; -#X connect 40 0 105 0; -#X connect 43 0 44 0; -#X connect 44 0 50 0; -#X connect 45 0 93 0; -#X connect 45 1 105 0; -#X connect 46 0 94 0; -#X connect 47 0 94 1; -#X connect 48 0 98 0; -#X connect 49 0 48 1; -#X connect 50 0 48 1; -#X connect 50 1 49 1; -#X connect 51 0 50 1; -#X connect 51 0 57 1; -#X connect 54 0 48 0; -#X connect 55 0 49 0; -#X connect 56 0 80 0; -#X connect 57 0 55 0; -#X connect 59 0 5 0; -#X connect 59 1 15 0; -#X connect 59 2 61 0; -#X connect 60 0 59 0; -#X connect 60 0 57 0; -#X connect 61 0 0 0; -#X connect 62 0 13 0; -#X connect 62 1 8 0; -#X connect 63 0 62 1; -#X connect 64 0 80 0; -#X connect 65 0 12 0; -#X connect 65 1 70 0; -#X connect 67 0 65 1; -#X connect 68 0 14 0; -#X connect 70 0 62 0; -#X connect 76 0 104 0; -#X connect 77 0 84 0; -#X connect 78 0 77 1; -#X connect 78 0 82 0; -#X connect 80 0 16 0; -#X connect 80 0 11 0; -#X connect 81 0 89 0; -#X connect 82 0 85 0; -#X connect 82 1 83 0; -#X connect 83 0 84 0; -#X connect 85 0 84 0; -#X connect 86 0 3 0; -#X connect 87 0 50 1; -#X connect 88 0 89 1; -#X connect 89 0 90 0; -#X connect 90 0 8 1; -#X connect 91 0 86 0; -#X connect 91 0 96 0; -#X connect 91 0 100 0; -#X connect 92 0 10 0; -#X connect 93 0 40 0; -#X connect 94 0 8 2; -#X connect 96 0 6 0; -#X connect 96 1 6 0; -#X connect 96 4 63 0; -#X connect 96 6 97 1; -#X connect 97 0 12 1; -#X connect 97 1 98 1; -#X connect 98 0 92 0; -#X connect 99 0 87 0; -#X connect 100 0 101 0; -#X connect 101 0 102 0; -#X connect 102 0 97 3; -#X connect 103 0 2 0; -#X connect 104 0 50 0; -#X connect 104 0 77 0; -#X connect 105 0 60 0; -#X connect 105 1 33 0; -#X connect 105 2 106 0; -#X connect 106 0 108 0; -#X connect 108 0 60 0; diff --git a/externals/gridflow/examples/wobble.pd b/externals/gridflow/examples/wobble.pd deleted file mode 100644 index 4d9e352d..00000000 --- a/externals/gridflow/examples/wobble.pd +++ /dev/null @@ -1,56 +0,0 @@ -#N canvas 735 285 450 338 10; -#X obj 31 -32 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; -#X obj 31 226 #out window; -#X obj 212 97 #make_cross; -#X obj 31 15 t b b; -#X obj 212 -17 # << 8; -#X obj 212 78 # >> 8; -#X obj 236 59 t a; -#X obj 212 59 # +; -#X obj 212 40 # +; -#X obj 212 2 # -; -#X obj 212 21 # >> 3; -#X obj 212 -36 #store; -#X obj 31 270 s p0; -#X obj 252 -36 r p0; -#X obj 31 107 #store (240 320 3 #); -#X obj 31 245 #mouse .....; -#X obj 31 164 # >> 4; -#X obj 31 145 #convolve (3 3 # 1 2 1 2 3 2); -#X obj 31 -13 metro 40; -#X obj 236 40 # *>>8 250; -#X text 139 196 click and drag in the window to trigger animations -; -#X obj 31 188 #fade (16 4 1); -#X obj 31 207 #clip; -#X obj 31 126 #draw_polygon + (500 500 500); -#X text 168 262 Copyright 2007 Mathieu Bouchard; -#X connect 0 0 18 0; -#X connect 1 0 15 0; -#X connect 2 0 23 2; -#X connect 3 0 14 0; -#X connect 3 1 11 0; -#X connect 4 0 9 0; -#X connect 5 0 2 0; -#X connect 6 0 7 1; -#X connect 7 0 6 0; -#X connect 7 0 5 0; -#X connect 7 0 9 1; -#X connect 8 0 7 0; -#X connect 8 0 19 0; -#X connect 9 0 10 0; -#X connect 10 0 8 0; -#X connect 11 0 4 0; -#X connect 13 0 11 1; -#X connect 14 0 23 0; -#X connect 15 0 12 0; -#X connect 15 1 12 0; -#X connect 16 0 14 1; -#X connect 16 0 21 0; -#X connect 17 0 16 0; -#X connect 18 0 3 0; -#X connect 19 0 8 1; -#X connect 21 0 22 0; -#X connect 22 0 1 0; -#X connect 23 0 17 0; diff --git a/externals/gridflow/format/aalib.c b/externals/gridflow/format/aalib.c deleted file mode 100644 index f33d8d83..00000000 --- a/externals/gridflow/format/aalib.c +++ /dev/null @@ -1,144 +0,0 @@ -/* - $Id: aalib.c 3624 2008-04-19 02:07:36Z matju $ - - GridFlow - Copyright (c) 2001-2008 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 "../gridflow.h.fcs" -#define aa_hardwareparams aa_hardware_params -#include <aalib.h> -#include <map> - -/* MINNOR is a typo in aalib.h, sorry */ -typedef -#if AA_LIB_MINNOR == 2 - int -#else - enum aa_attribute -#endif -AAAttr; - -static std::map<string,const aa_driver *> drivers; - -\class FormatAALib : Format { - aa_context *context; - aa_renderparams *rparams; - \attr bool autodraw; - bool raw_mode; - /* !@#$ varargs missing here */ - \constructor (t_symbol *mode, string target) { - context=0; autodraw=1; - argc-=2; argv+=2; - char *argv2[argc]; - for (int i=0; i<argc; i++) argv2[i] = strdup(string(argv[i]).data()); - if (mode!=gensym("out")) RAISE("write-only, sorry"); - aa_parseoptions(0,0,&argc,argv2); - for (int i=0; i<argc; i++) free(argv2[i]); - if (drivers.find(target)==drivers.end()) RAISE("unknown aalib driver '%s'",target.data()); - const aa_driver *driver = drivers[target]; - 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}; - post("aalib image size: %s",(new Dim(3,v))->to_s()); - } - ~FormatAALib () {if (context) aa_close(context);} - \decl 0 hidecursor (); - \decl 0 print (int y, int x, int a, string text); - \decl 0 draw (); - \decl 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_chunk(1); -} 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 0 hidecursor () { aa_hidemouse(context); } -\def 0 draw () { aa_flush(context); } -\def 0 print (int y, int x, int a, string text) { - aa_puts(context,x,y,(AAAttr)a,(char *)text.data()); - if (autodraw==1) aa_flush(context); -} - -\def 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++) { - 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); - } - } -} - -\end class FormatAALib { - const aa_driver *const *p = aa_drivers; - for (; *p; p++) drivers[(*p)->shortname] = *p; - install_format("#io.aalib",2,""); -} -void startup_aalib () { - \startall -} diff --git a/externals/gridflow/format/dc1394.c b/externals/gridflow/format/dc1394.c deleted file mode 100644 index 7f107b49..00000000 --- a/externals/gridflow/format/dc1394.c +++ /dev/null @@ -1,287 +0,0 @@ -/* - $Id: dc1394.c 3978 2008-07-04 20:18:01Z matju $ - - GridFlow - Copyright (c) 2001-2008 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 "../gridflow.h.fcs" - -/* speeds are numbered 0 to 5, worth 100<<speednum */ -/* framerates are numbers 32 to 39, worth 1.875<<(frameratenum-32) */ - -#define MODE(x,y,palette) /* nothing for now */ - -static std::map<int,string> feature_names; - -static void setup_modes () { - int i=64; // format 0 - MODE(160,120,YUV444); - MODE(320,240,YUV422); - MODE(640,480,YUV411); - MODE(640,480,YUV422); - MODE(640,480,RGB); - MODE(640,480,MONO); - MODE(640,480,MONO16); - i=96; // format 1 - MODE(800,600,YUV422); - MODE(800,600,RGB); - MODE(800,600,MONO); - MODE(1024,768,YUV422); - MODE(1024,768,RGB); - MODE(1024,768,MONO); - MODE(800,600,MONO16); - MODE(1024,768,MONO16); - i=128; // format 2 - MODE(1280,960,YUV422); - MODE(1280,960,RGB); - MODE(1280,960,MONO); - MODE(1600,1200,YUV422); - MODE(1600,1200,RGB); - MODE(1600,1200,MONO); - MODE(1280,960,MONO16); - MODE(1600,1200,MONO16); - i=256; // format 6 - // MODE_EXIF= 256 - i=288; // format 7 - //MODE_FORMAT7_0, - //MODE_FORMAT7_1, - //MODE_FORMAT7_2, - //MODE_FORMAT7_3, - //MODE_FORMAT7_4, - //MODE_FORMAT7_5, - //MODE_FORMAT7_6, - //MODE_FORMAT7_7 - -// format7 color modes start at #320 and are MONO8 YUV411 YUV422 YUV444 RGB8 MONO16 RGB16 MONO16S RGB16S RAW8 RAW16 -// trigger modes start at #352 and are 0 1 2 3 -// image formats start at #384 and are VGA_NONCOMPRESSED SVGA_NONCOMPRESSED_1 SVGA_NONCOMPRESSED_2 -// and continue at #390 and are STILL_IMAGE FORMAT_SCALABLE_IMAGE_SIZE - -#define FEATURE(foo) feature_names[i++] = #foo; - - i=416; - 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); - FEATURE(TRIGGER_DELAY); - FEATURE(WHITE_SHADING); - FEATURE(FRAME_RATE); - i+=16;/* 16 reserved features */ - FEATURE(ZOOM); - FEATURE(PAN); - FEATURE(TILT); - FEATURE(OPTICAL_FILTER); - i+=12;/* 12 reserved features */ - FEATURE(CAPTURE_SIZE); - FEATURE(CAPTURE_QUALITY); - i+=14;/* 14 reserved features */ - - i=480; // operation modes - //OPERATION_MODE_LEGACY - //OPERATION_MODE_1394B - - i=512; // sensor layouts - //RGGB - //GBRG, - //GRBG, - //BGGR - - i=544; // IIDC_VERSION -#if 0 - IIDC_VERSION(1_04); - IIDC_VERSION(1_20); - IIDC_VERSION(PTGREY); - IIDC_VERSION(1_30); - IIDC_VERSION(1_31); - IIDC_VERSION(1_32); - IIDC_VERSION(1_33); - IIDC_VERSION(1_34); - IIDC_VERSION(1_35); - IIDC_VERSION(1_36); - IIDC_VERSION(1_37); - IIDC_VERSION(1_38); - IIDC_VERSION(1_39); -#endif - -// Return values are SUCCESS FAILURE NO_FRAME NO_CAMERA - -// Parameter flags for dc1394_setup_format7_capture() -//#define QUERY_FROM_CAMERA -1 -//#define USE_MAX_AVAIL -2 -//#define USE_RECOMMENDED -3 - -// The video1394 policy: blocking (wait for a frame forever) or polling (returns if no frames in buffer -// WAIT=0 POLL=1 -}; - -typedef raw1394handle_t RH; -typedef nodeid_t NID; - -#define IO(func,args...) if (func(rh,usenode,args)!=DC1394_SUCCESS) RAISE(#func " failed"); - -\class FormatDC1394 : Format { - RH rh; - int useport; - int usenode; - int framerate_e; - int height; - int width; - dc1394_cameracapture camera; - dc1394_feature_set features; - std::map<int,int> feature_index; - \constructor (t_symbol *mode) { - bool gotone=false; - post("DC1394: hello world"); - rh = raw1394_new_handle(); - if (!rh) RAISE("could not get a handle for /dev/raw1394 and /dev/video1394"); - int numPorts = raw1394_get_port_info(rh,0,0); - raw1394_destroy_handle(rh); - post("there are %d Feuerweuer ports",numPorts); - if (mode!=gensym("in")) RAISE("sorry, read-only"); - for(int port=0; port<numPorts; port++) { - post("trying port #%d...",port); - RH rh = dc1394_create_handle(port); - int numCameras=0xDEADBEEF; - NID *nodes = dc1394_get_camera_nodes(rh,&numCameras,0); - post("port #%d has %d cameras",port,numCameras); - for (int i=0; i<numCameras; i++) { - post("camera at node #%d",nodes[i]); - if (!gotone) {gotone=true; useport=port; usenode=nodes[i];} - } - dc1394_destroy_handle(rh); - } - if (!gotone) RAISE("no cameras available"); - this->rh = dc1394_create_handle(useport); - IO(dc1394_get_camera_feature_set,&features); - dc1394_print_feature_set(&features); - post("NUM_FEATURES=%d",NUM_FEATURES); - for (int i=0; i<NUM_FEATURES; i++) { - dc1394_feature_info &f = features.feature[i]; - int id = f.feature_id; - string name = feature_names.find(id)==feature_names.end() ? "(unknown)" : feature_names[id]; - bool is_there = f.available; - post(" feature %d '%s' is %s",id,name.data(),is_there?"present":"absent"); - if (!is_there) continue; - post(" min=%u max=%u abs_min=%u abs_max=%u",f.min,f.max,f.abs_min,f.abs_max); - } - framerate_e = FRAMERATE_30; - height = 480; - width = 640; - setup(); - } - \decl 0 bang (); - \attr float framerate(); - \attr unsigned brightness(); - \attr unsigned hue(); - \attr unsigned colour(); - //\attr uint16 contrast(); - //\attr uint16 whiteness(); - void setup (); - \decl 0 get (t_symbol *s=0); - \decl 0 size (int height, int width); -}; - -\def 0 get (t_symbol *s=0) { - FObject::_0_get(argc,argv,s); - t_atom a[2]; - if (!s) { - SETFLOAT(a+0,camera.frame_height); - SETFLOAT(a+1,camera.frame_width); - outlet_anything(bself->outlets[0],gensym("size"),2,a); // abnormal (does not use nested list) - unsigned int width,height; - IO(dc1394_query_format7_max_image_size,MODE_FORMAT7_0,&width,&height); - SETFLOAT(a+0,height); - SETFLOAT(a+1,width); - outlet_anything(bself->outlets[0],gensym("maxsize"),2,a); // abnormal (does not use nested list) - } -} -\def 0 size (int height, int width) { - IO(dc1394_set_format7_image_size,MODE_FORMAT7_0,width,height); - this->height = height; - this->width = width; - setup(); -} - -\def unsigned brightness () {unsigned value; dc1394_get_brightness(rh,usenode,&value); return value;} -\def 0 brightness (unsigned value) {dc1394_set_brightness(rh,usenode, value);} -\def unsigned hue () {unsigned value; dc1394_get_hue( rh,usenode,&value); return value;} -\def 0 hue (unsigned value) {dc1394_set_hue( rh,usenode, value);} -\def unsigned colour () {unsigned value; dc1394_get_saturation(rh,usenode,&value); return value;} -\def 0 colour (unsigned value) {dc1394_set_saturation(rh,usenode, value);} - -void FormatDC1394::setup () { - //dc1394_set_format7_image_size(rh,usenode,0,width,height); - IO(dc1394_setup_capture,0,FORMAT_VGA_NONCOMPRESSED,MODE_640x480_MONO,SPEED_400,framerate_e,&camera); - //IO(dc1394_setup_format7_capture,0,MODE_FORMAT7_0,SPEED_400,QUERY_FROM_CAMERA,0,0,width,height,&camera); - if (dc1394_set_trigger_mode(rh,usenode,TRIGGER_MODE_0) != DC1394_SUCCESS) RAISE("dc1394_set_trigger_mode error"); - if (dc1394_start_iso_transmission(rh,usenode)!=DC1394_SUCCESS) RAISE("dc1394_start_iso_transmission error"); -} - -\def float framerate() { - return 1.875 * (1<<(framerate_e-FRAMERATE_1_875)); -} - -\def 0 framerate(float framerate) { - framerate_e = FRAMERATE_1_875; - while (framerate>=1.875 && framerate_e <= FRAMERATE_240) {framerate/=2; framerate_e++;} - setup(); -} - -static volatile int timeout=0; -static void rien (int) {timeout=1; post("timeout2");} - -\def 0 bang () { - //struct itimerval tval; - //tval.it_interval.tv_sec = 1; - //tval.it_interval.tv_usec = 0; - //tval.it_value = tval.it_interval; - //setitimer(ITIMER_REAL,&tval,0); - //signal(SIGALRM,rien); - if (dc1394_single_capture(rh,&camera)!=DC1394_SUCCESS) RAISE("dc1394_single_capture error"); - //setitimer(ITIMER_REAL,0,0); - out=new GridOutlet(this,0,new Dim(height,width,1)); - //out->send(out->dim->prod(),(uint8 *)camera.capture_buffer); - for (int i=0; i<height; i++) out->send(out->dim->prod(1),(uint8 *)camera.capture_buffer+640*i); - //if (dc1394_stop_iso_transmission(rh,usenode)!=DC1394_SUCCESS) RAISE("dc1394_stop_iso_transmission error"); - //post("frame_height=%d",camera.frame_height); - //post("frame_width=%d" ,camera.frame_width); - //post("quadlets_per_frame=%d" ,camera.quadlets_per_frame); - //post("quadlets_per_packet=%d" ,camera.quadlets_per_packet); -} - -\end class FormatDC1394 { - install_format("#io.dc1394",4,""); - setup_modes(); -} -void startup_dc1394 () { - \startall -} diff --git a/externals/gridflow/format/ieee1394-ioctl.h b/externals/gridflow/format/ieee1394-ioctl.h deleted file mode 100644 index f92b5663..00000000 --- a/externals/gridflow/format/ieee1394-ioctl.h +++ /dev/null @@ -1,111 +0,0 @@ -/* Base file for all ieee1394 ioctl's. Linux-1394 has allocated base '#' - * with a range of 0x00-0x3f. */ - -#ifndef __IEEE1394_IOCTL_H -#define __IEEE1394_IOCTL_H - -#include <linux/ioctl.h> -#include <linux/types.h> - - -/* AMDTP Gets 6 */ -#define AMDTP_IOC_CHANNEL _IOW('#', 0x00, struct amdtp_ioctl) -#define AMDTP_IOC_PLUG _IOW('#', 0x01, struct amdtp_ioctl) -#define AMDTP_IOC_PING _IOW('#', 0x02, struct amdtp_ioctl) -#define AMDTP_IOC_ZAP _IO ('#', 0x03) - - -/* DV1394 Gets 10 */ - -/* Get the driver ready to transmit video. pass a struct dv1394_init* as - * the parameter (see below), or NULL to get default parameters */ -#define DV1394_IOC_INIT _IOW('#', 0x06, struct dv1394_init) - -/* Stop transmitting video and free the ringbuffer */ -#define DV1394_IOC_SHUTDOWN _IO ('#', 0x07) - -/* Submit N new frames to be transmitted, where the index of the first new - * frame is first_clear_buffer, and the index of the last new frame is - * (first_clear_buffer + N) % n_frames */ -#define DV1394_IOC_SUBMIT_FRAMES _IO ('#', 0x08) - -/* Block until N buffers are clear (pass N as the parameter) Because we - * re-transmit the last frame on underrun, there will at most be n_frames - * - 1 clear frames at any time */ -#define DV1394_IOC_WAIT_FRAMES _IO ('#', 0x09) - -/* Capture new frames that have been received, where the index of the - * first new frame is first_clear_buffer, and the index of the last new - * frame is (first_clear_buffer + N) % n_frames */ -#define DV1394_IOC_RECEIVE_FRAMES _IO ('#', 0x0a) - -/* Tell card to start receiving DMA */ -#define DV1394_IOC_START_RECEIVE _IO ('#', 0x0b) - -/* Pass a struct dv1394_status* as the parameter */ -#define DV1394_IOC_GET_STATUS _IOR('#', 0x0c, struct dv1394_status) - - -/* Video1394 Gets 10 */ - -#define VIDEO1394_IOC_LISTEN_CHANNEL \ - _IOWR('#', 0x10, struct video1394_mmap) -#define VIDEO1394_IOC_UNLISTEN_CHANNEL \ - _IOW ('#', 0x11, int) -#define VIDEO1394_IOC_LISTEN_QUEUE_BUFFER \ - _IOW ('#', 0x12, struct video1394_wait) -#define VIDEO1394_IOC_LISTEN_WAIT_BUFFER \ - _IOWR('#', 0x13, struct video1394_wait) -#define VIDEO1394_IOC_TALK_CHANNEL \ - _IOWR('#', 0x14, struct video1394_mmap) -#define VIDEO1394_IOC_UNTALK_CHANNEL \ - _IOW ('#', 0x15, int) -/* - * This one is broken: it really wanted - * "sizeof (struct video1394_wait) + sizeof (struct video1394_queue_variable)" - * but got just a "size_t" - */ -#define VIDEO1394_IOC_TALK_QUEUE_BUFFER \ - _IOW ('#', 0x16, size_t) -#define VIDEO1394_IOC_TALK_WAIT_BUFFER \ - _IOW ('#', 0x17, struct video1394_wait) -#define VIDEO1394_IOC_LISTEN_POLL_BUFFER \ - _IOWR('#', 0x18, struct video1394_wait) - - -/* Raw1394's ISO interface */ -#define RAW1394_IOC_ISO_XMIT_INIT \ - _IOW ('#', 0x1a, struct raw1394_iso_status) -#define RAW1394_IOC_ISO_RECV_INIT \ - _IOWR('#', 0x1b, struct raw1394_iso_status) -#define RAW1394_IOC_ISO_RECV_START \ - _IOC (_IOC_WRITE, '#', 0x1c, sizeof(int) * 3) -#define RAW1394_IOC_ISO_XMIT_START \ - _IOC (_IOC_WRITE, '#', 0x1d, sizeof(int) * 2) -#define RAW1394_IOC_ISO_XMIT_RECV_STOP \ - _IO ('#', 0x1e) -#define RAW1394_IOC_ISO_GET_STATUS \ - _IOR ('#', 0x1f, struct raw1394_iso_status) -#define RAW1394_IOC_ISO_SHUTDOWN \ - _IO ('#', 0x20) -#define RAW1394_IOC_ISO_QUEUE_ACTIVITY \ - _IO ('#', 0x21) -#define RAW1394_IOC_ISO_RECV_LISTEN_CHANNEL \ - _IOW ('#', 0x22, unsigned char) -#define RAW1394_IOC_ISO_RECV_UNLISTEN_CHANNEL \ - _IOW ('#', 0x23, unsigned char) -#define RAW1394_IOC_ISO_RECV_SET_CHANNEL_MASK \ - _IOW ('#', 0x24, __u64) -#define RAW1394_IOC_ISO_RECV_PACKETS \ - _IOW ('#', 0x25, struct raw1394_iso_packets) -#define RAW1394_IOC_ISO_RECV_RELEASE_PACKETS \ - _IOW ('#', 0x26, unsigned int) -#define RAW1394_IOC_ISO_XMIT_PACKETS \ - _IOW ('#', 0x27, struct raw1394_iso_packets) -#define RAW1394_IOC_ISO_XMIT_SYNC \ - _IO ('#', 0x28) -#define RAW1394_IOC_ISO_RECV_FLUSH \ - _IO ('#', 0x29) - - -#endif /* __IEEE1394_IOCTL_H */ diff --git a/externals/gridflow/format/jpeg.c b/externals/gridflow/format/jpeg.c deleted file mode 100644 index 80e5e717..00000000 --- a/externals/gridflow/format/jpeg.c +++ /dev/null @@ -1,122 +0,0 @@ -/* - $Id: jpeg.c 3624 2008-04-19 02:07:36Z matju $ - - GridFlow - Copyright (c) 2001-2008 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 "../gridflow.h.fcs" -/* removing macros (removing warnings) */ -#undef HAVE_PROTOTYPES -#undef HAVE_STDLIB_H -#undef EXTERN -extern "C" { -#include <jpeglib.h> -}; - -\class FormatJPEG < Format { - P<BitPacking> bit_packing; - struct jpeg_compress_struct cjpeg; - struct jpeg_decompress_struct djpeg; - struct jpeg_error_mgr jerr; - \constructor (t_symbol *mode, string filename) { - Format::_0_open(0,0,mode,filename); - uint32 mask[3] = {0x0000ff,0x00ff00,0xff0000}; - bit_packing = new BitPacking(is_le(),3,3,mask); - } - \decl 0 bang (); - \decl 0 quality (short quality); - \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_chunk(1); - 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,row); - 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 0 bang () { - //off_t off = ftell(f); - //fseek(f,off,SEEK_SET); - if (gfeof(f)) {outlet_bang(bself->te_outlet); return;} - 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),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,row); - } - jpeg_finish_decompress(&djpeg); - jpeg_destroy_decompress(&djpeg); -} - -\def 0 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); -} - -\classinfo {install_format("#io.jpeg",6,"jpeg jpg");} -\end class FormatJPEG -void startup_jpeg () { - \startall -} diff --git a/externals/gridflow/format/main.c b/externals/gridflow/format/main.c deleted file mode 100644 index caf90672..00000000 --- a/externals/gridflow/format/main.c +++ /dev/null @@ -1,249 +0,0 @@ -/* - $Id$ - - GridFlow - Copyright (c) 2001-2008 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 "../gridflow.h.fcs" -#include <string> -#include <map> -#include <errno.h> -#define L _L_ - -/* API (version 0.9.3) - 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 0 bang() : - 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 0 seek(Integer i) : select one frame to be read next (by number) - def 0 grid() : frame to write - def 0 get (optional Symbol s) : get one attribute value or all of them - def 0 ...() : options - outlet 0 grid() frame just read - outlet 0 ...() everything else - destructor : close a handler -*/ - -std::map<std::string,std::string> suffix_table; -void suffixes_are (const char *name, const char *suffixes) { - std::string name2 = name; - char *suff2 = strdup(suffixes); - char *suff3 = suff2+strlen(suff2); - for (char *s=suff2; s<suff3; s++) if (*s==' ' || *s==',') *s=0; - for (char *s=suff2; s<suff3; s+=strlen(s)+1) { - std::string ss = s; - suffix_table[ss]=name2; - } -} - -\class SuffixLookup : FObject { - \constructor () {} - \decl 0 symbol (t_symbol *str); -}; -\def 0 symbol (t_symbol *str) { - char *s = strdup(str->s_name); - char *t = strrchr(s,'.'); - if (!t) outlet_symbol(bself->outlets[2],gensym(s)); - else { - *t = 0; - outlet_symbol(bself->outlets[1],gensym(t+1)); - std::map<std::string,std::string>::iterator u = suffix_table.find(std::string(t+1)); - if (u==suffix_table.end()) outlet_bang(bself->outlets[0]); - else outlet_symbol(bself->outlets[0],gensym((char *)u->second.data())); - } - free(s); -} -\end class SuffixLookup {install("gf.suffix_lookup",1,3);} - -\class Format : FObject -Format::Format (BFObject *bself, MESSAGE) : FObject(bself,MESSAGE2) { - mode=0; fd=-1; f=0; cast=int32_e; frame=0; - if (argv[0]==gensym("out")) this->mode=2; else - if (argv[0]==gensym("in")) this->mode=4; else RAISE("unknown mode"); -// 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}'" -} - -\def 0 open(t_symbol *mode, string filename) { - const char *fmode; - if (mode==gensym("in")) fmode="r"; else - if (mode==gensym("out")) fmode="w"; else - RAISE("bad mode"); - if (f) _0_close(0,0); - if (mode==gensym("in")) {filename = gf_find_file(filename);} - f = fopen(filename.data(),fmode); - if (!f) RAISE("can't open file '%s': %s",filename.data(),strerror(errno)); - fd = fileno(f); -// case gzfile: -// if (mode==SYM(in)) {filename = GridFlow.find_file(filename);} -// if (mode==:in) {raw_open_gzip_in filename; else raw_open_gzip_out filename;} -// def self.rewind() raw_open(*@raw_open_args); @frame = 0 end unless @rewind_redefined -// @rewind_redefined = true -} -\def 0 close() {if (f) {fclose(f); f=0; fd=-1;}} -\def 0 cast(NumberTypeE nt) {cast = nt;} - -\def 0 seek(int frame) { - if (!frame) {_0_rewind(0,0); return;} - RAISE("don't know how to seek for frame other than # 0"); -} - -// this is what you should use to rewind -// different file-sources may redefine this as something else -// (eg: gzip) -\def 0 rewind () { - if (!f) RAISE("Nothing to rewind about..."); - fseek(f,0,SEEK_SET); - frame = 0; -} - -Format::~Format () {if (f) fclose(f); /*if (fd>=0) close(fd);*/} -\end class Format {} - -/* This is the Grid format I defined: */ -struct GridHeader { - char magic[5]; // = "\7fgrid" on little endian, "\x7fGRID" on big endian - uint8 type; // number of bits. - // the original doc said: "plus one of: 1:unsigned 2:float" but i don't recall what this means. - uint8 reserved; // set this to 0 all of the time. - uint8 dimn; // number of dimensions supported: at least 0..4) - // int32 dimv[dimn]; // number of elements in each dimension. (in the file's endianness!) - // raw data goes after that -}; - -\class FormatGrid : Format { - GridHeader head; - int endian; - NumberTypeE nt; - P<Dim> headerless_dim; // if null: headerful; if Dim: it is the assumed dimensions of received grids - \grin 0 - \constructor (t_symbol *mode, string filename) { - strncpy(head.magic,is_le()?"\7fgrid":"\7fGRID",5); - head.type = 32; - _0_open(0,0,mode,filename); - } - \decl 0 bang (); - \decl 0 headerless (...); - \decl 0 headerful (); - \decl 0 type (NumberTypeE nt); - ~FormatGrid() { - //@stream.close if @stream - //GridFlow.hunt_zombies - } -// \decl void raw_open_gzip_in(string filename); -// \decl void raw_open_gzip_out(string filename); -}; -\def 0 bang () { - P<Dim> dim; - if (feof(f)) {outlet_bang(bself->te_outlet); return;} - if (headerless_dim) { - dim = headerless_dim; - } else { - fread(&head,1,8,f); - uint8 *m = (uint8 *)head.magic; - if (strncmp((char *)m,"\7fgrid",5)==0) endian=1; else - if (strncmp((char *)m,"\7fGRID",5)==0) endian=1; else - RAISE("unknown header, can't read grid from file: " - "%02x %02x %02x %02x %02x %02x %02x %02x", - m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7]); - if (head.type!=32) RAISE("unsupported grid type %d in file",head.type); - // apparently, head.type 8 and 16 worked too. - if (head.reserved!=0) RAISE("unsupported grid reserved field %d in file",head.reserved); - if (head.dimn>16) RAISE("unsupported grid number of dimensions %d in file",head.dimn); - int32 dimv[head.dimn]; - fread(dimv,head.dimn,4,f); - if (endian != is_le()) swap32(head.dimn,(uint32 *)dimv); - dim = new Dim(head.dimn,dimv); - } - GridOutlet out(this,0,dim,nt); - long nn = dim->prod(); -#define FOO(T) {T data[nn]; fread(data,nn,sizeof(T),f); out.send(nn,(T *)data);} -TYPESWITCH(nt,FOO,) -#undef FOO - SUPER; -} - -GRID_INLET(FormatGrid,0) { - if (!headerless_dim) { - fwrite(&head,1,8,f); - fwrite(in->dim->v,in->dim->n,4,f); // forgot the endian here - } -} GRID_FLOW { -#define FOO(T) {T data2[n]; for(int i=0; i<n; i++) data2[i]=(T)data[i]; \ - if (endian!=is_le()) swap_endian(n,data2); \ - fwrite(data2,n,sizeof(T),f);} -TYPESWITCH(nt,FOO,) -#undef FOO -} GRID_FINISH { - fflush(f); -} GRID_END - -\def 0 headerless (...) { - if (argc>=0 && argv[0].a_type==A_LIST) { - t_binbuf *b = (t_binbuf *)argv[0]; argc = binbuf_getnatom(b); argv = (t_atom2 *)binbuf_getvec(b);} - int v[argc]; - for (int i=0; i<argc; i++) v[i] = argv[i]; - headerless_dim = new Dim(argc,v); -} -\def 0 headerful () { headerless_dim = 0; } -//#!@#$ method name conflict ? -\def 0 type (NumberTypeE nt) { - //!@#$ bug: should not be able to modify this _during_ a transfer - switch (nt) { - case uint8_e: head.type= 8; break; - case int16_e: head.type=16; break; - case int32_e: head.type=32; break; - default: RAISE("unsupported type"); - } - this->nt = nt; -} - -//\def void raw_open_gzip_in(string 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";} -//\def void raw_open_gzip_out(string 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 class FormatGrid {install_format("#io.grid",6,"grid");} - -void startup_format () { - \startall -} diff --git a/externals/gridflow/format/mpeg3.c b/externals/gridflow/format/mpeg3.c deleted file mode 100644 index c034f4dc..00000000 --- a/externals/gridflow/format/mpeg3.c +++ /dev/null @@ -1,83 +0,0 @@ -/* - $Id: mpeg3.c 3815 2008-06-06 03:50:40Z matju $ - - GridFlow - Copyright (c) 2001-2008 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 "../gridflow.h.fcs" -#include <stdlib.h> -#include <string.h> -#include <errno.h> - -\class FormatMPEG3 : Format { - mpeg3_t *mpeg; - int track; - ~FormatMPEG3 () {if (mpeg) {mpeg3_close(mpeg); mpeg=0;}} - \constructor (t_symbol *mode, string filename) { - track=0; - // libmpeg3 may be nice, but it won't take a filehandle, only filename - if (mode!=gensym("in")) RAISE("read-only, sorry"); - filename = gf_find_file(filename); - #ifdef MPEG3_UNDEFINED_ERROR - int err; - mpeg = mpeg3_open((char *)filename.data(),&err); - post("mpeg error code = %d",err); - #else - mpeg = mpeg3_open((char *)filename.data()); - #endif - if (!mpeg) RAISE("IO Error: can't open file `%s': %s", filename.data(), strerror(errno)); - } - \decl 0 seek (long frame); - \decl 0 rewind (); - \decl 0 bang (); -}; - -\def 0 seek (long frame) { - mpeg3_set_frame(mpeg,clip(frame,0L,mpeg3_video_frames(mpeg,track)-1),track); -} -\def 0 rewind () {_0_seek(0,0,0);} - -\def 0 bang () { - int nframe = mpeg3_get_frame(mpeg,track); - int nframes = mpeg3_video_frames(mpeg,track); - //post("track=%d; nframe=%d; nframes=%d",track,nframe,nframes); - if (nframe >= nframes) {outlet_bang(bself->te_outlet); return;} - int sx = mpeg3_video_width(mpeg,track); - int sy = mpeg3_video_height(mpeg,track); - int channels = 3; - /* !@#$ the doc says "You must allocate 4 extra bytes in the - last output_row. This is scratch area for the MMX routines." */ - uint8 *buf = NEWBUF(uint8,sy*sx*channels+16); - uint8 *rows[sy]; - for (int i=0; i<sy; i++) rows[i]=buf+i*sx*channels; - mpeg3_read_frame(mpeg,rows,0,0,sx,sy,sx,sy,MPEG3_RGB888,track); - GridOutlet out(this,0,new Dim(sy,sx,channels),cast); - int bs = out.dim->prod(1); - for(int y=0; y<sy; y++) out.send(bs,buf+channels*sx*y); - DELBUF(buf); -// return INT2NUM(nframe); -} - -\classinfo {install_format("#io.mpeg",4,"mpg mpeg");} -\end class FormatMPEG3 -void startup_mpeg3 () { - \startall -} diff --git a/externals/gridflow/format/netpbm.c b/externals/gridflow/format/netpbm.c deleted file mode 100644 index 159903bd..00000000 --- a/externals/gridflow/format/netpbm.c +++ /dev/null @@ -1,119 +0,0 @@ -/* - $Id$ - - GridFlow - Copyright (c) 2001-2008 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 "../gridflow.h.fcs" -extern "C" { -#include <pam.h> -}; - -\class FormatNetPBM : Format { - struct pam inpam, outpam; - \grin 0 - \constructor (t_symbol *mode, string filename) { - Format::_0_open(0,0,mode,filename); - memset(& inpam,sizeof(pam),0); - memset(&outpam,sizeof(pam),0); - } - \decl 0 bang (); -}; -\def 0 bang () { - //inpam.allocation_depth = 3; - pnm_readpaminit(f, &inpam, /*PAM_STRUCT_SIZE(tuple_type)*/ sizeof(struct pam)); - tuple *tuplerow = pnm_allocpamrow(&inpam); - if (inpam.depth!=3) RAISE("image has %d channels instead of 3 channels",inpam.depth); - GridOutlet out(this,0,new Dim(inpam.height,inpam.width,inpam.depth),cast); - uint8 buf[inpam.width*3]; - for (int i=0; i<inpam.height; i++) { - pnm_readpamrow(&inpam, tuplerow); - for (int j=0; j<inpam.width; j++) { - buf[j*3+0] = tuplerow[j][0]; - buf[j*3+1] = tuplerow[j][1]; - buf[j*3+2] = tuplerow[j][2]; - } - out.send(inpam.width*inpam.depth,buf); - } - pnm_freepamrow(tuplerow); -} -GRID_INLET(FormatNetPBM,0) { - if (in->dim->n!=3) RAISE("need 3 dimensions"); - if (in->dim->v[2]!=3) RAISE("need 3 channels"); - outpam.size = sizeof(struct pam); - outpam.len = sizeof(struct pam); - outpam.file = f; - outpam.format = PPM_FORMAT; - outpam.height = in->dim->v[0]; - outpam.width = in->dim->v[1]; - outpam.depth = in->dim->v[2]; - outpam.plainformat = false; - outpam.maxval = 255; - //outpam.allocation_depth = 3; - strcpy(outpam.tuple_type,PAM_PPM_TUPLETYPE); - pnm_writepaminit(&outpam); - in->set_chunk(1); -} GRID_FLOW { - tuple *tuplerow = pnm_allocpamrow(&outpam); - int m = in->dim->v[1]; - for (int i=0; i<n; i+=in->dim->prod(1)) { - for (int j=0; j<m; j++, data+=3) { - tuplerow[j][0] = int(data[0]); - tuplerow[j][1] = int(data[1]); - tuplerow[j][2] = int(data[2]); - } - pnm_writepamrow(&outpam, tuplerow); - } - pnm_freepamrow(tuplerow); -} GRID_FINISH { - fflush(f); -} GRID_END -/* was supposed to be "#io.netpbm" but there's backwards compat. */ -\classinfo {install_format("#io.ppm",6,"ppm pgm pnm pam");} -\end class FormatNetPBM - -/*FormatPPM.subclass("#io:tk",1,1) { - install_rgrid 0 - def initialize(mode) - @id = sprintf("x%08x",object_id) - @filename = "/tmp/tk-#{$$}-#{@id}.ppm" - if mode!=:out then raise "only #out" end - super(mode,:file,@filename) - GridFlow.gui "toplevel .#{@id}\n" - GridFlow.gui "wm title . GridFlow/Tk\n" - GridFlow.gui "image create photo gf#{@id} -width 320 -height 240\n" - GridFlow.gui "pack [label .#{@id}.im -image #{@id}]\n" - end - def _0_rgrid_end - super - @stream.seek 0,IO::SEEK_SET - GridFlow.gui "image create photo #{@id} -file #{@filename}\n" - end - def delete - GridFlow.gui "destroy .#{@id}\n" - GridFlow.gui "image delete #{@id}\n" - end - alias close delete -}*/ - -void startup_netpbm () { - pm_init(0,0); - \startall -} diff --git a/externals/gridflow/format/opengl.c b/externals/gridflow/format/opengl.c deleted file mode 100644 index e4606d4e..00000000 --- a/externals/gridflow/format/opengl.c +++ /dev/null @@ -1,174 +0,0 @@ -/* - $Id: opengl.c 3650 2008-04-25 15:55:52Z matju $ - - GridFlow - Copyright (c) 2001-2008 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 "../gridflow.h.fcs" -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <sys/time.h> -#include <signal.h> -#ifdef __APPLE__ -#include <GLUT/glut.h> -#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 { - int window; - GLuint gltex; - P<BitPacking> bit_packing; - P<Dim> dim; - uint8 *buf; - t_clock *clock; - void call (); - \decl 0 resize_window (int sx, int sy); - \grin 0 - \constructor (t_symbol *mode) { - if (in_use) RAISE("only one #io:opengl object at a time; sorry"); - in_use=true; - if (mode!=gensym("out")) RAISE("write-only, sorry"); - int dummy = 0; - glutInit(&dummy,0); - glutInitDisplayMode(GLUT_RGBA); - resize_window(0,0,320,240); - 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; - uint32 mask[3] = {0xff000000,0x00ff0000,0x0000ff00}; - bit_packing = new BitPacking(4,4,3,mask); - clock = clock_new(this,(t_method)FormatOpenGL_call); - clock_delay(clock,0); - } - - ~FormatOpenGL () { - clock_unset(clock); - if (gltex) glDeleteTextures(1, (GLuint*)&gltex); - if (buf) delete buf; - in_use=false; - if ((unsigned)window!=0xDeadBeef) { - glutDestroyWindow(window); - window=0xDeadBeef; - } - } -}; - -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 - - clock_delay(clock,100); -} -void FormatOpenGL_call (FormatOpenGL *self) {self->call();} - -\def 0 resize_window (int sx, int sy) { - 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; - buf = 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 sx = in->dim->get(1), osx = dim->get(1); - int sy = in->dim->get(0), osy = dim->get(0); - in->set_chunk(1); - 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; - for (; n>0; y++, data+=sxc, n-=sxc) bit_packing->pack(sx, data, buf+y*bypl); - } GRID_FINISH { -} GRID_END - -\classinfo {install_format("#io.opengl",2,"");} -\end class FormatOpenGL -void startup_opengl () { - \startall -} diff --git a/externals/gridflow/format/png.c b/externals/gridflow/format/png.c deleted file mode 100644 index a55ca648..00000000 --- a/externals/gridflow/format/png.c +++ /dev/null @@ -1,116 +0,0 @@ -/* - $Id: png.c 3624 2008-04-19 02:07:36Z matju $ - - GridFlow - Copyright (c) 2001-2008 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 "../gridflow.h.fcs" -extern "C" { -#include <libpng12/png.h> -}; - -\class FormatPNG : Format { - P<BitPacking> bit_packing; - png_structp png; - png_infop info; - \constructor (t_symbol *mode, string filename) { - Format::_0_open(0,0,mode,filename); - uint32 mask[3] = {0x0000ff,0x00ff00,0xff0000}; - bit_packing = new BitPacking(is_le(),3,3,mask); - } - \decl 0 bang (); - \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_chunk(1); - 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,row); - n-=rowsize; data+=rowsize; - } -} GRID_FINISH { -} GRID_END - -\def 0 bang () { - uint8 sig[8]; - if (!fread(sig, 1, 8, f)) {outlet_bang(bself->te_outlet); return;} - 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); - uint8 *image_data = 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), cast); - out.send(rowbytes*height,image_data); - delete[] image_data; - png_destroy_read_struct(&png, &info, NULL); -} - -\classinfo {install_format("#io.png",4,"png");} -\end class FormatPNG -void startup_png () { - \startall -} diff --git a/externals/gridflow/format/pwc-ioctl.h b/externals/gridflow/format/pwc-ioctl.h deleted file mode 100644 index 65805eaa..00000000 --- a/externals/gridflow/format/pwc-ioctl.h +++ /dev/null @@ -1,292 +0,0 @@ -#ifndef PWC_IOCTL_H -#define PWC_IOCTL_H - -/* (C) 2001-2004 Nemosoft Unv. - (C) 2004 Luc Saillard (luc@saillard.org) - - NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx - driver and thus may have bugs that are not present in the original version. - Please send bug reports and support requests to <luc@saillard.org>. - The decompression routines have been implemented by reverse-engineering the - Nemosoft binary pwcx module. Caveat emptor. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -/* This is pwc-ioctl.h belonging to PWC 8.12.1 - It contains structures and defines to communicate from user space - directly to the driver. - */ - -/* - Changes - 2001/08/03 Alvarado Added ioctl constants to access methods for - changing white balance and red/blue gains - 2002/12/15 G. H. Fernandez-Toribio VIDIOCGREALSIZE - 2003/12/13 Nemosft Unv. Some modifications to make interfacing to - PWCX easier - */ - -/* These are private ioctl() commands, specific for the Philips webcams. - They contain functions not found in other webcams, and settings not - specified in the Video4Linux API. - - The #define names are built up like follows: - VIDIOC VIDeo IOCtl prefix - PWC Philps WebCam - G optional: Get - S optional: Set - ... the function - */ - - - /* Enumeration of image sizes */ -#define PSZ_SQCIF 0x00 -#define PSZ_QSIF 0x01 -#define PSZ_QCIF 0x02 -#define PSZ_SIF 0x03 -#define PSZ_CIF 0x04 -#define PSZ_VGA 0x05 -#define PSZ_MAX 6 - - -/* The frame rate is encoded in the video_window.flags parameter using - the upper 16 bits, since some flags are defined nowadays. The following - defines provide a mask and shift to filter out this value. - - In 'Snapshot' mode the camera freezes its automatic exposure and colour - balance controls. - */ -#define PWC_FPS_SHIFT 16 -#define PWC_FPS_MASK 0x00FF0000 -#define PWC_FPS_FRMASK 0x003F0000 -#define PWC_FPS_SNAPSHOT 0x00400000 - - -/* structure for transfering x & y coordinates */ -struct pwc_coord -{ - int x, y; /* guess what */ - int size; /* size, or offset */ -}; - - -/* Used with VIDIOCPWCPROBE */ -struct pwc_probe -{ - char name[32]; - int type; -}; - -struct pwc_serial -{ - char serial[30]; /* String with serial number. Contains terminating 0 */ -}; - -/* pwc_whitebalance.mode values */ -#define PWC_WB_INDOOR 0 -#define PWC_WB_OUTDOOR 1 -#define PWC_WB_FL 2 -#define PWC_WB_MANUAL 3 -#define PWC_WB_AUTO 4 - -/* Used with VIDIOCPWC[SG]AWB (Auto White Balance). - Set mode to one of the PWC_WB_* values above. - *red and *blue are the respective gains of these colour components inside - the camera; range 0..65535 - When 'mode' == PWC_WB_MANUAL, 'manual_red' and 'manual_blue' are set or read; - otherwise undefined. - 'read_red' and 'read_blue' are read-only. -*/ -struct pwc_whitebalance -{ - int mode; - int manual_red, manual_blue; /* R/W */ - int read_red, read_blue; /* R/O */ -}; - -/* - 'control_speed' and 'control_delay' are used in automatic whitebalance mode, - and tell the camera how fast it should react to changes in lighting, and - with how much delay. Valid values are 0..65535. -*/ -struct pwc_wb_speed -{ - int control_speed; - int control_delay; - -}; - -/* Used with VIDIOCPWC[SG]LED */ -struct pwc_leds -{ - int led_on; /* Led on-time; range = 0..25000 */ - int led_off; /* Led off-time; range = 0..25000 */ -}; - -/* Image size (used with GREALSIZE) */ -struct pwc_imagesize -{ - int width; - int height; -}; - -/* Defines and structures for Motorized Pan & Tilt */ -#define PWC_MPT_PAN 0x01 -#define PWC_MPT_TILT 0x02 -#define PWC_MPT_TIMEOUT 0x04 /* for status */ - -/* Set angles; when absolute != 0, the angle is absolute and the - driver calculates the relative offset for you. This can only - be used with VIDIOCPWCSANGLE; VIDIOCPWCGANGLE always returns - absolute angles. - */ -struct pwc_mpt_angles -{ - int absolute; /* write-only */ - int pan; /* degrees * 100 */ - int tilt; /* degress * 100 */ -}; - -/* Range of angles of the camera, both horizontally and vertically. - */ -struct pwc_mpt_range -{ - int pan_min, pan_max; /* degrees * 100 */ - int tilt_min, tilt_max; -}; - -struct pwc_mpt_status -{ - int status; - int time_pan; - int time_tilt; -}; - - -/* This is used for out-of-kernel decompression. With it, you can get - all the necessary information to initialize and use the decompressor - routines in standalone applications. - */ -struct pwc_video_command -{ - int type; /* camera type (645, 675, 730, etc.) */ - int release; /* release number */ - - int size; /* one of PSZ_* */ - int alternate; - int command_len; /* length of USB video command */ - unsigned char command_buf[13]; /* Actual USB video command */ - int bandlength; /* >0 = compressed */ - int frame_size; /* Size of one (un)compressed frame */ -}; - -/* Flags for PWCX subroutines. Not all modules honour all flags. */ -#define PWCX_FLAG_PLANAR 0x0001 -#define PWCX_FLAG_BAYER 0x0008 - - -/* IOCTL definitions */ - - /* Restore user settings */ -#define VIDIOCPWCRUSER _IO('v', 192) - /* Save user settings */ -#define VIDIOCPWCSUSER _IO('v', 193) - /* Restore factory settings */ -#define VIDIOCPWCFACTORY _IO('v', 194) - - /* You can manipulate the compression factor. A compression preference of 0 - means use uncompressed modes when available; 1 is low compression, 2 is - medium and 3 is high compression preferred. Of course, the higher the - compression, the lower the bandwidth used but more chance of artefacts - in the image. The driver automatically chooses a higher compression when - the preferred mode is not available. - */ - /* Set preferred compression quality (0 = uncompressed, 3 = highest compression) */ -#define VIDIOCPWCSCQUAL _IOW('v', 195, int) - /* Get preferred compression quality */ -#define VIDIOCPWCGCQUAL _IOR('v', 195, int) - - -/* Retrieve serial number of camera */ -#define VIDIOCPWCGSERIAL _IOR('v', 198, struct pwc_serial) - - /* This is a probe function; since so many devices are supported, it - becomes difficult to include all the names in programs that want to - check for the enhanced Philips stuff. So in stead, try this PROBE; - it returns a structure with the original name, and the corresponding - Philips type. - To use, fill the structure with zeroes, call PROBE and if that succeeds, - compare the name with that returned from VIDIOCGCAP; they should be the - same. If so, you can be assured it is a Philips (OEM) cam and the type - is valid. - */ -#define VIDIOCPWCPROBE _IOR('v', 199, struct pwc_probe) - - /* Set AGC (Automatic Gain Control); int < 0 = auto, 0..65535 = fixed */ -#define VIDIOCPWCSAGC _IOW('v', 200, int) - /* Get AGC; int < 0 = auto; >= 0 = fixed, range 0..65535 */ -#define VIDIOCPWCGAGC _IOR('v', 200, int) - /* Set shutter speed; int < 0 = auto; >= 0 = fixed, range 0..65535 */ -#define VIDIOCPWCSSHUTTER _IOW('v', 201, int) - - /* Color compensation (Auto White Balance) */ -#define VIDIOCPWCSAWB _IOW('v', 202, struct pwc_whitebalance) -#define VIDIOCPWCGAWB _IOR('v', 202, struct pwc_whitebalance) - - /* Auto WB speed */ -#define VIDIOCPWCSAWBSPEED _IOW('v', 203, struct pwc_wb_speed) -#define VIDIOCPWCGAWBSPEED _IOR('v', 203, struct pwc_wb_speed) - - /* LEDs on/off/blink; int range 0..65535 */ -#define VIDIOCPWCSLED _IOW('v', 205, struct pwc_leds) -#define VIDIOCPWCGLED _IOR('v', 205, struct pwc_leds) - - /* Contour (sharpness); int < 0 = auto, 0..65536 = fixed */ -#define VIDIOCPWCSCONTOUR _IOW('v', 206, int) -#define VIDIOCPWCGCONTOUR _IOR('v', 206, int) - - /* Backlight compensation; 0 = off, otherwise on */ -#define VIDIOCPWCSBACKLIGHT _IOW('v', 207, int) -#define VIDIOCPWCGBACKLIGHT _IOR('v', 207, int) - - /* Flickerless mode; = 0 off, otherwise on */ -#define VIDIOCPWCSFLICKER _IOW('v', 208, int) -#define VIDIOCPWCGFLICKER _IOR('v', 208, int) - - /* Dynamic noise reduction; 0 off, 3 = high noise reduction */ -#define VIDIOCPWCSDYNNOISE _IOW('v', 209, int) -#define VIDIOCPWCGDYNNOISE _IOR('v', 209, int) - - /* Real image size as used by the camera; tells you whether or not there's a gray border around the image */ -#define VIDIOCPWCGREALSIZE _IOR('v', 210, struct pwc_imagesize) - - /* Motorized pan & tilt functions */ -#define VIDIOCPWCMPTRESET _IOW('v', 211, int) -#define VIDIOCPWCMPTGRANGE _IOR('v', 211, struct pwc_mpt_range) -#define VIDIOCPWCMPTSANGLE _IOW('v', 212, struct pwc_mpt_angles) -#define VIDIOCPWCMPTGANGLE _IOR('v', 212, struct pwc_mpt_angles) -#define VIDIOCPWCMPTSTATUS _IOR('v', 213, struct pwc_mpt_status) - - /* Get the USB set-video command; needed for initializing libpwcx */ -#define VIDIOCPWCGVIDCMD _IOR('v', 215, struct pwc_video_command) -struct pwc_table_init_buffer { - int len; - char *buffer; - -}; -#define VIDIOCPWCGVIDTABLE _IOR('v', 216, struct pwc_table_init_buffer) - -#endif diff --git a/externals/gridflow/format/quartz.m b/externals/gridflow/format/quartz.m deleted file mode 100644 index 8ff389a8..00000000 --- a/externals/gridflow/format/quartz.m +++ /dev/null @@ -1,224 +0,0 @@ -/* - $Id: quartz.m 3709 2008-05-21 18:53:54Z matju $ - - GridFlow - Copyright (c) 2001-2008 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> -#include <Cocoa/Cocoa.h> - -#include "../gridflow.h.fcs" - -@interface GFView: NSView { - uint8 *imdata; - int imwidth; - int imheight; -} -- (id) drawRect: (NSRect)rect; -- (id) imageHeight: (int)w width: (int)h; -- (int) imageHeight; -- (int) imageWidth; -- (uint8 *) imageData; -- (int) imageDataSize; -@end - -@implementation GFView - -- (uint8 *) imageData {return imdata;} -- (int) imageDataSize {return imwidth*imheight*4;} -- (int) imageHeight {return imheight;} -- (int) imageWidth {return imwidth;} - -- (id) imageHeight: (int)h width: (int)w { - if (imheight==h && imwidth==w) return self; - post("new size: y=%d x=%d",h,w); - imheight=h; - imwidth=w; - if (imdata) delete imdata; - int size = [self imageDataSize]; - imdata = new uint8[size]; - CLEAR(imdata,size); - NSSize s = {w,h}; - [[self window] setContentSize: s]; - return self; -} - -- (id) initWithFrame: (NSRect)r { - [super initWithFrame: r]; - imdata=0; 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 */ -uint8 *GFView_imageData(GFView *self) {return (uint8 *)[self imageData];} - -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 imageHeight],[self imageWidth]}}; - [self displayRect: r]; - [self setNeedsDisplay: YES]; - [self display]; -} - -struct FormatQuartz; -void FormatQuartz_call(FormatQuartz *self); - -\class FormatQuartz : Format { - NSWindow *window; - NSWindowController *wc; - GFView *widget; /* GridFlow's Cocoa widget */ - t_clock *clock; - \constructor (t_symbol *mode) { - 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]; - clock = clock_new(this,(t_method)FormatQuartz_call); - [window makeFirstResponder: widget]; - post("mainWindow = %08lx",(long)[NSApp mainWindow]); - post(" keyWindow = %08lx",(long)[NSApp keyWindow]); - NSColor *color = [NSColor clearColor]; - [window setBackgroundColor: color]; - } - ~FormatQuartz () { - clock_unset(clock); - clock_free(clock); - clock = 0; - [window autorelease]; - [window setReleasedWhenClosed: YES]; - [window close]; - } - void call (); - \grin 0 -}; - -static NSDate *distantFuture, *distantPast; - -void FormatQuartz::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]; - clock_delay(clock,20); -} -void FormatQuartz_call(FormatQuartz *self) {self->call();} - -template <class T, class S> -static void convert_number_type(int n, T *out, 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; - uint8 *data2 = GFView_imageData(w)+off*4; -// convert_number_type(n,data2,data); - if (c==3) { - while(n) { - data2[0]=255; - data2[1]=(uint8)data[0]; - data2[2]=(uint8)data[1]; - data2[3]=(uint8)data[2]; - data+=3; data2+=4; n-=3; - } - } else { - while(n) { - data2[0]=255; - data2[1]=(uint8)data[0]; - data2[2]=(uint8)data[1]; - data2[3]=(uint8)data[2]; - data+=4; data2+=4; n-=4; - } - } -} GRID_FINISH { - GFView_display(widget); -} GRID_END - -\end class FormatQuartz { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - distantFuture = [NSDate distantFuture]; - distantPast = [NSDate distantPast]; - [NSApplication sharedApplication]; - install_format("#io.quartz",2,""); -} -void startup_quartz () { - \startall -} - diff --git a/externals/gridflow/format/quicktimeapple.c b/externals/gridflow/format/quicktimeapple.c deleted file mode 100644 index 2882168e..00000000 --- a/externals/gridflow/format/quicktimeapple.c +++ /dev/null @@ -1,456 +0,0 @@ -/* - $Id: quicktimeapple.c 3904 2008-06-18 20:32:46Z matju $ - - GridFlow - Copyright (c) 2001-2008 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 <QuickTime/QuickTime.h> -#include <QuickTime/Movies.h> -#include <QuickTime/QuickTimeComponents.h> -#include "../gridflow.h.fcs" -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <CoreServices/CoreServices.h> - -typedef ComponentInstance VideoDigitizerComponent, VDC; -typedef ComponentResult VideoDigitizerError, VDE; - -#if 0 -//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) -*/ -#endif - -static OSErr callback(ComponentInstanceRecord*, char*, long int, long int*, long int, TimeValue, short int, long int) { - post("FormatQuickTimeCamera callback"); - return noErr; -} - -\class FormatQuickTimeCamera : Format { - P<Dim> dim; - uint8 *buf; - uint8 *buf2; - 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; - \constructor (t_symbol *mode) { - //vdc = SGGetVideoDigitizerComponent(c); - 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); - post("Component #%d",n); - char *t = (char *)&cd.componentType; - post(" type='%c%c%c%c'",t[3],t[2],t[1],t[0]); - t = (char *)&cd.componentSubType; - post(" subtype='%c%c%c%c'",t[3],t[2],t[1],t[0]); - post(" name=%08x, *name='%*s'",name, *name, name+1); - post(" info=%08x, *info='%*s'",info, *name, info+1); - n++; - } - post("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) post("could not make new SG channel"); - e=SGSetChannelBounds(m_vc, &rect); - if(e!=noErr) post("could not set SG ChannelBounds"); - e=SGSetChannelUsage(m_vc, seqGrabPreview); - if(e!=noErr) post("could not set SG ChannelUsage"); - e=SGSetDataProc(m_sg,NewSGDataUPP(callback),0); - if (e!=noErr) post("could not set SG DataProc"); - // 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 = new uint8[dataSize]; - buf2 = 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 = 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); - e=SGStartRecord(m_sg); - if (e!=noErr) RAISE("error #%d at SGStartRecord",e); - } - ~FormatQuickTimeCamera() { - if (m_vc) if (::SGDisposeChannel(m_sg, m_vc)) RAISE("SGDisposeChannel"); - if (m_sg) { - if (::CloseComponent(m_sg)) RAISE("CloseComponent"); - if (m_srcGWorld) ::DisposeGWorld(m_srcGWorld); - } - } - \decl 0 bang (); - \grin 0 int -}; - -// /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Components.h - -static int nn(int c) {return c?c:' ';} - -/* -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 0 bang () { - GridOutlet out(this,0,dim); - int n = dim->prod()/4; - for (int i=0; i<n; i++) ((uint32 *)buf2)[i] = ((uint32 *)buf)[i] >> 8; - out.send(dim->prod(),buf2); - SGIdle(m_sg); -} - -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_chunk(0); -} GRID_FLOW { -} GRID_FINISH { -} GRID_END -\end class FormatQuickTimeCamera {install_format("#io.quicktimecamera",4,"");} - -\class FormatQuickTimeApple : Format { - Movie movie; - TimeValue time; - short movie_file; - GWorldPtr gw; /* just like an X11 Image or Pixmap, maybe. */ - uint8 *buffer; - P<Dim> dim; - int nframe, nframes; - \constructor (t_symbol *mode, string filename) { - /*vdc=0;*/ movie=0; time=0; movie_file=0; gw=0; buffer=0; dim=0; nframe=0; nframes=0; - int err; - filename = gf_find_file(filename); - FSSpec fss; - FSRef fsr; - err = FSPathMakeRef((const UInt8 *)filename.data(), &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; - NewMovieFromFile(&movie, movie_file, NULL, NULL, newMovieActive, NULL); - Rect r; - GetMovieBox(movie, &r); - post("handle=%d movie=%d tracks=%d", movie_file, movie, GetMovieTrackCount(movie)); - post("duration=%d; timescale=%d cHz", (long)GetMovieDuration(movie), (long)GetMovieTimeScale(movie)); - nframes = GetMovieDuration(movie); /* i don't think so */ - post("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 = 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)", filename.data(), err, rb_str_ptr(rb_funcall(mGridFlow,SI(macerr),1,INT2NUM(err)))); - RAISE("can't open file `%s': error #%d (0x%08x)", filename.data(), err, err); - } - ~FormatQuickTimeApple() { - if (movie) { - DisposeMovie(movie); - DisposeGWorld(gw); - CloseMovieFile(movie_file); - } - } - \decl 0 codec (string c); - \decl 0 colorspace (string c); - \decl 0 bang (); - \decl 0 seek (int frame); - \decl 0 rewind (); - \grin 0 -}; - -\def 0 seek (int frame) {nframe=frame;} -\def 0 rewind () {_0_seek(0,0,0);} - -\def 0 bang () { - CGrafPtr savedPort; - GDHandle savedDevice; - SetMovieGWorld(movie,gw,GetGWorldDevice(gw)); - Rect r; - GetMovieBox(movie,&r); - PixMapHandle pixmap = GetGWorldPixMap(gw); - short flags = nextTimeStep; - if (nframe>=nframes) {outlet_bang(bself->te_outlet); return;} - if (nframe==0) flags |= nextTimeEdgeOK; - TimeValue duration; - OSType mediaType = VisualMediaCharacteristic; - GetMovieNextInterestingTime(movie, - flags,1,&mediaType,time,0,&time,&duration); - if (time<0) { - time=0; - outlet_bang(bself->te_outlet); - return; - } -// post("quicktime frame #%d; time=%d duration=%d", nframe, (long)time, (long)duration); - SetMovieTimeValue(movie,nframe*duration); - MoviesTask(movie,0); - GridOutlet out(this,0,dim); - uint32 *bufu32 = (uint32 *)buffer; - int n = dim->prod()/4; - int i; - if (is_le()) { - for (; i<n; i++) { - bufu32[i+0]=bufu32[i+0]>>8; - } - } else { - 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_chunk(0); -} GRID_FLOW { -} GRID_FINISH { -} GRID_END - -\def 0 codec (string c) { RAISE("Unimplemented. Sorry."); } -\def 0 colorspace (string c) { RAISE("Unimplemented. Sorry."); } - -\classinfo { - EnterMovies(); - install_format("#io.quicktime",4,"mov"); -} -\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 363c4641..00000000 --- a/externals/gridflow/format/quicktimehw.c +++ /dev/null @@ -1,243 +0,0 @@ -/* - $Id: quicktimehw.c 3878 2008-06-15 04:37:33Z matju $ - - GridFlow - Copyright (c) 2001-2008 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 "../gridflow.h.fcs" -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <map> -#include <vector> - -static std::map<string,std::vector<string> *> codecs; -static std::map<string,string> fourccs; - -\class 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; - int jpeg_quality; // in theory we shouldn't need this, but... - ~FormatQuickTimeHW() {if (anim) quicktime_close(anim);} - \constructor (t_symbol *mode, string filename) { - track=0; dim=0; codec=QUICKTIME_RAW; started=false; force=0; framerate=29.97; bit_packing=0; jpeg_quality=75; -// libquicktime may be nice, but it won't take a filehandle, only filename - filename = gf_find_file(filename); - anim = quicktime_open((char *)filename.data(),mode==gensym("in"),mode==gensym("out")); - if (!anim) RAISE("can't open file `%s': %s (or some other reason that libquicktime won't tell us)", - filename.data(), strerror(errno)); - if (mode==gensym("in")) { - length = quicktime_video_length(anim,track); - post("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,string("rgb")); - quicktime_set_cpus(anim,1); - uint32 mask[3] = {0x0000ff,0x00ff00,0xff0000}; - bit_packing = new BitPacking(is_le(),3,3,mask); - } - \decl 0 bang (); - \decl 0 seek (long frame); - \decl 0 rewind (); - \decl 0 force_size (int32 height, int32 width); - \decl 0 codec (string c); - \decl 0 colorspace (string c); - \decl 0 parameter (string name, int32 value); - \decl 0 framerate (float64 f); - \decl 0 size (int32 height, int32 width); - \decl 0 get (); - \grin 0 int -}; - -\def 0 force_size (int32 height, int32 width) { force = new Dim(height, width); } -\def 0 seek (long frame) { - quicktime_set_video_position(anim,clip(frame,0L,quicktime_video_length(anim,track)-1),track); -} -\def 0 rewind () {_0_seek(0,0,0);} - -\def 0 bang () { - long length = quicktime_video_length(anim,track); - long nframe = quicktime_video_position(anim,track); - if (nframe >= length) {outlet_bang(bself->te_outlet); return;} - /* 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: post("strange quicktime. ask matju."); break; - } - if (force) { - sy = force->get(0); - sx = force->get(1); - } - uint8 *buf = new uint8[sy*sx*channels]; - uint8 *rows[sy]; for (int i=0; i<sy; i++) rows[i]=buf+i*sx*channels; - quicktime_decode_scaled(anim,0,0,sx,sy,sx,sy,colorspace,rows,track); - GridOutlet out(this,0,new Dim(sy,sx,channels),cast); - out.give(sy*sx*channels,buf); - started=true; -// return INT2NUM(nframe); -} - -//!@#$ should also support symbol values (how?) -\def 0 parameter (string name, int32 value) { - int val = value; - //post("quicktime_set_parameter %s %d",name.data(), val); - quicktime_set_parameter(anim, const_cast<char *>(name.data()), &val); - if (name=="jpeg_quality") jpeg_quality=value; -} - -\def 0 framerate (float64 f) { - framerate=f; - quicktime_set_framerate(anim, f); -} - -\def 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_chunk(0); - 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); - } - //post("quicktime jpeg_quality %d", jpeg_quality); - quicktime_set_parameter(anim, (char*)"jpeg_quality", &jpeg_quality); -} 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,(uint8 *)data2); - 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]=(uint8 *)data+i*sx*channels; - quicktime_encode_video(anim,rows,track); - } -} GRID_FINISH { -} GRID_END - -\def 0 codec (string c) { -#ifdef LQT_VERSION - char buf[5]; - strncpy(buf,c.data(),4); - for (int i=c.length(); i<4; i++) buf[i]=' '; - buf[4]=0; - if (fourccs.find(string(buf))==fourccs.end()) - RAISE("warning: unknown fourcc '%s'" /*" (%s)"*/, buf /*, rb_str_ptr(rb_inspect(rb_funcall(fourccs,SI(keys),0)))*/); -#endif - codec = strdup(buf); -} - -\def 0 colorspace (string c) { - if (0) { - } else if (c=="rgb") { channels=3; colorspace=BC_RGB888; - } else if (c=="rgba") { channels=4; colorspace=BC_RGBA8888; - } else if (c=="bgr") { channels=3; colorspace=BC_BGR888; - } else if (c=="bgrn") { channels=4; colorspace=BC_BGR8888; -// } else if (c=="yuv") { channels=3; colorspace=BC_YUV888; - } else if (c=="yuva") { channels=4; colorspace=BC_YUVA8888; - } else if (c=="YUV420P") { channels=3; colorspace=BC_YUV420P; - } else RAISE("unknown colorspace '%s' (supported: rgb, rgba, bgr, bgrn, yuv, yuva)",c.data()); -} - -\def 0 get () { -/* t_atom a[1]; - SETFLOAT(a,(float)length); - outlet_anything(bself->te_outlet,gensym("frames"),1,a); -*/ - t_atom a[1]; - SETFLOAT(a,length); - outlet_anything(bself->outlets[0],gensym("frames"),1,a); - //SUPER; -} - -\classinfo {install_format("#io.quicktime",6,"mov avi"); -// def self.info; %[codecs: #{@codecs.keys.join' '}] end -//#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(); - 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; - } - string name = string(s->name); - std::vector<string> *f = new std::vector<string>(s->num_fourccs); - if (!s->fourccs) { - post("WARNING: no fourccs (quicktime library is broken?)"); - goto hell; - } - //fprintf(stderr,"num_fourccs=%d fourccs=%p\n",s->num_fourccs,s->fourccs); - for (int j=0; j<s->num_fourccs; j++) { - string fn = string(s->fourccs[j]); - f->push_back(fn); - fourccs[fn]=name; - } - codecs[name]=f; - hell:; - } -#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 e87d65c9..00000000 --- a/externals/gridflow/format/sdl.c +++ /dev/null @@ -1,209 +0,0 @@ -/* - $Id: sdl.c 3809 2008-06-05 17:17:54Z matju $ - - GridFlow - Copyright (c) 2001-2008 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 "../gridflow.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> - -struct FormatSDL; -void FormatSDL_call(FormatSDL *self); -static bool in_use = false; -static bool full_screen = false; -static int mousex,mousey,mousem; -SDL_Surface *screen; -FObject *instance; - -static t_symbol *keyboard[SDLK_LAST]; - -static void KEYS_ARE (int i, const char *s__) { - char *s_ = strdup(s__); - char *s = s_; - while (*s) { - char *t = strchr(s,' '); - if (t) *t=0; - keyboard[i] = gensym(s); - if (!t) break; - s=t+1; i++; - } - free(s_); -} - -static void build_keyboard () { - KEYS_ARE(8,"BackSpace Tab"); - KEYS_ARE(13,"Return"); - KEYS_ARE(27,"Escape"); - KEYS_ARE(32,"space exclam quotedbl numbersign dollar percent ampersand apostrophe"); - KEYS_ARE(40,"parenleft parenright asterisk plus comma minus period slash"); - KEYS_ARE(48,"D0 D1 D2 D3 D4 D5 D6 D7 D8 D9"); - KEYS_ARE(58,"colon semicolon less equal greater question at"); - //KEYS_ARE(65,"A B C D E F G H I J K L M N O P Q R S T U V W X Y Z"); - KEYS_ARE(91,"bracketleft backslash bracketright asciicircum underscore grave quoteleft"); - KEYS_ARE(97,"a b c d e f g h i j k l m n o p q r s t u v w x y z"); - //SDLK_DELETE = 127 - KEYS_ARE(256,"KP_0 KP_1 KP_2 KP_3 KP_4 KP_5 KP_6 KP_7 KP_8 KP_9"); - KEYS_ARE(266,"KP_Decimal KP_Divide KP_Multiply KP_Subtract KP_Add KP_Enter KP_Equal"); - KEYS_ARE(273,"KP_Up KP_Down KP_Right KP_Left KP_Insert KP_Home KP_End KP_Prior KP_Next"); - KEYS_ARE(282,"F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15"); - KEYS_ARE(300,"Num_Lock Caps_Lock Scroll_Lock"); - KEYS_ARE(303,"Shift_R Shift_L Control_R Control_L Alt_R Alt_L Meta_L Meta_R"); - KEYS_ARE(311,"Super_L Super_R Mode_switch Multi_key"); -} - -static void report_pointer () { - t_atom a[3]; - SETFLOAT(a+0,mousey); - SETFLOAT(a+1,mousex); - SETFLOAT(a+2,mousem); - outlet_anything(instance->bself->outlets[0],gensym("position"),COUNT(a),a); -} - -static void HandleEvent () { - SDL_Event event; - while (SDL_PollEvent(&event)) { - switch (event.type) { - case SDL_KEYDOWN: case SDL_KEYUP: { - int key = event.key.keysym.sym; - int mod = event.key.keysym.mod; - if (event.type==SDL_KEYDOWN && (key==SDLK_F11 || key==SDLK_ESCAPE || key=='f')) { - full_screen = !full_screen; - SDL_WM_ToggleFullScreen(screen); - break; - } - t_symbol *sel = gensym(const_cast<char *>(event.type==SDL_KEYDOWN ? "keypress" : "keyrelease")); - t_atom at[4]; - mousem &= ~0xFF; - mousem |= mod; - SETFLOAT(at+0,mousey); - SETFLOAT(at+1,mousex); - SETFLOAT(at+2,mousem); - SETSYMBOL(at+3,keyboard[event.key.keysym.sym]); - outlet_anything(instance->bself->outlets[0],sel,4,at); - } break; - case SDL_MOUSEBUTTONDOWN: SDL_MOUSEBUTTONUP: { - if (SDL_MOUSEBUTTONDOWN) mousem |= (128<<event.button.button); - else mousem &= ~(128<<event.button.button); - //post("mousem=%d",mousem); - report_pointer(); - } break; - case SDL_MOUSEMOTION: { - mousey = event.motion.y; - mousex = event.motion.x; - report_pointer(); - } break; - case SDL_VIDEORESIZE: { - } break; - } - } -} - -\class FormatSDL : Format { - P<BitPacking> bit_packing; - P<Dim> dim; - t_clock *clock; - void resize_window (int sx, int sy); - void call (); - \decl 0 setcursor (int shape); - \decl 0 hidecursor (); - \decl 0 title (string title); - \constructor (t_symbol *mode) { - dim=0;screen=0; - 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; - } - instance=this; - clock = clock_new(this,(t_method)FormatSDL_call); - clock_delay(clock,0); - _0_title(0,0,string("GridFlow SDL")); - } - \grin 0 int - ~FormatSDL () { - clock_unset(clock); - clock_free(clock); - SDL_Quit(); - instance=0; - in_use=false; - } -}; - -\def 0 title (string title) { - SDL_WM_SetCaption(title.data(),title.data()); -} - -void FormatSDL::call() {HandleEvent(); clock_delay(clock,20);} -void FormatSDL_call(FormatSDL *self) {self->call();} - -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 sx = in->dim->get(1), osx = dim->get(1); - int sy = in->dim->get(0), osy = dim->get(0); - in->set_chunk(1); - 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; - 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, (uint8 *)screen->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 0 setcursor (int shape) {SDL_ShowCursor(SDL_ENABLE);} -\def 0 hidecursor () {SDL_ShowCursor(SDL_DISABLE);} - -\end class FormatSDL {install_format("#io.sdl",2,"");} -void startup_sdl () { - \startall - build_keyboard(); -} diff --git a/externals/gridflow/format/videodev.c b/externals/gridflow/format/videodev.c deleted file mode 100644 index eb508fbd..00000000 --- a/externals/gridflow/format/videodev.c +++ /dev/null @@ -1,792 +0,0 @@ -/* - $Id: videodev.c 3871 2008-06-12 14:41:53Z matju $ - - GridFlow - Copyright (c) 2001-2008 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. -*/ - -/* bt878 on matju's comp supports only palette 4 */ -/* bt878 on heri's comp supports palettes 3, 6, 7, 8, 9, 13 */ -/* pwc supports palettes 12 and 15 */ - -#include "../gridflow.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> -#include "pwc-ioctl.h" - -//#define error post -static bool debug=0; - -/* **************************************************************** */ - -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 ; - -#define FLAG(_num_,_name_,_desc_) #_name_, -#define OPT(_num_,_name_,_desc_) #_name_, - -/* -static const char *video_type_flags[] = { - FLAG( 0,CAPTURE, "Can capture") - FLAG( 1,TUNER, "Can tune") - FLAG( 2,TELETEXT, "Does teletext") - FLAG( 3,OVERLAY, "Overlay onto frame buffer") - FLAG( 4,CHROMAKEY, "Overlay by chromakey") - FLAG( 5,CLIPPING, "Can clip") - FLAG( 6,FRAMERAM, "Uses the frame buffer memory") - FLAG( 7,SCALES, "Scalable") - FLAG( 8,MONOCHROME, "Monochrome only") - FLAG( 9,SUBCAPTURE, "Can capture subareas of the image") - FLAG(10,MPEG_DECODER, "Can decode MPEG streams") - FLAG(11,MPEG_ENCODER, "Can encode MPEG streams") - FLAG(12,MJPEG_DECODER, "Can decode MJPEG streams") - FLAG(13,MJPEG_ENCODER, "Can encode MJPEG streams") -}; -*/ - -static const char *tuner_flags[] = { - FLAG(0,PAL, "") - FLAG(1,NTSC, "") - FLAG(2,SECAM, "") - FLAG(3,LOW, "Uses KHz not MHz") - FLAG(4,NORM, "Tuner can set norm") - FLAG(5,DUMMY5, "") - FLAG(6,DUMMY6, "") - FLAG(7,STEREO_ON,"Tuner is seeing stereo") - FLAG(8,RDS_ON, "Tuner is seeing an RDS datastream") - FLAG(9,MBS_ON, "Tuner is seeing an MBS datastream") -}; - -static const char *channel_flags[] = { - FLAG(0,TUNER,"") - FLAG(1,AUDIO,"") - FLAG(2,NORM ,"") -}; - -static const char *video_palette_choice[] = { - OPT( 0,NIL, "(nil)") - OPT( 1,GREY, "Linear greyscale") - OPT( 2,HI240, "High 240 cube (BT848)") - OPT( 3,RGB565, "565 16 bit RGB") - OPT( 4,RGB24, "24bit RGB") - OPT( 5,RGB32, "32bit RGB") - OPT( 6,RGB555, "555 15bit RGB") - OPT( 7,YUV422, "YUV422 capture") - OPT( 8,YUYV, "") - OPT( 9,UYVY, "The great thing about standards is ...") - OPT(10,YUV420, "") - OPT(11,YUV411, "YUV411 capture") - OPT(12,RAW, "RAW capture (BT848)") - OPT(13,YUV422P, "YUV 4:2:2 Planar") - OPT(14,YUV411P, "YUV 4:1:1 Planar") - OPT(15,YUV420P, "YUV 4:2:0 Planar") - OPT(16,YUV410P, "YUV 4:1:0 Planar") -}; - -static const char *video_mode_choice[] = { - OPT( 0,PAL, "pal") - OPT( 1,NTSC, "ntsc") - OPT( 2,SECAM,"secam") - OPT( 3,AUTO, "auto") -}; - -#define WH(_field_,_spec_) \ - sprintf(buf+strlen(buf), "%s=" _spec_ " ", #_field_, self->_field_); -#define WHYX(_name_,_fieldy_,_fieldx_) \ - sprintf(buf+strlen(buf), "%s=(%d %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_)); \ - free(foo);} -#define WHCHOICE(_field_,_table_) { \ - char *foo; \ - sprintf(buf+strlen(buf), "%s=%s; ", #_field_, \ - foo=choice_to_s(self->_field_,COUNT(_table_),_table_));\ - free(foo);} - -static char *flags_to_s(int value, int n, const char **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]); - } - if (!*foo) strcat(foo,"0"); - return strdup(foo); -} -static char *choice_to_s(int value, int n, const char **table) { - if (value < 0 || value >= n) { - char foo[64]; - sprintf(foo,"(Unknown #%d)",value); - return strdup(foo); - } else { - return strdup(table[value]); - } -} -static void gfpost(VideoChannel *self) { - char buf[256] = "[VideoChannel] "; - WH(channel,"%d"); - WH(name,"\"%.32s\""); - WH(tuners,"%d"); - WHFLAGS(flags,channel_flags); - WH(type,"0x%04x"); - WH(norm,"%d"); - post("%s",buf); -} -static void gfpost(VideoTuner *self) { - char buf[256] = "[VideoTuner] "; - WH(tuner,"%d"); - WH(name,"\"%.32s\""); - WH(rangelow,"%lu"); - WH(rangehigh,"%lu"); - WHFLAGS(flags,tuner_flags); - WHCHOICE(mode,video_mode_choice); - WH(signal,"%d"); - post("%s",buf); -} -static void gfpost(VideoWindow *self) { - char buf[256] = "[VideoWindow] "; - WHYX(pos,y,x); - WHYX(size,height,width); - WH(chromakey,"0x%08x"); - WH(flags,"0x%08x"); - WH(clipcount,"%d"); - post("%s",buf); -} -static void gfpost(VideoMbuf *self) { - char buf[256] = "[VideoMBuf] "; - WH(size,"%d"); - WH(frames,"%d"); - sprintf(buf+strlen(buf), "offsets=["); - for (int i=0; i<self->frames; i++) { - /* WH(offsets[i],"%d"); */ - sprintf(buf+strlen(buf), "%d%s", self->offsets[i], - i+1==self->frames?"]":", "); - } - post("%s",buf); -} -static void gfpost(VideoMmap *self) { - char buf[256] = "[VideoMMap] "; - WH(frame,"%u"); - WHYX(size,height,width); - WHCHOICE(format,video_palette_choice); - post("%s",buf); -}; - -/* **************************************************************** */ - -\class FormatVideoDev : Format { - VideoCapability vcaps; - VideoPicture vp; - VideoMbuf vmbuf; - VideoMmap vmmap; - uint8 *image; - int queue[8], queuesize, queuemax, next_frame; - int current_channel, current_tuner; - bool use_mmap, use_pwc; - P<BitPacking> bit_packing; - P<Dim> dim; - bool has_frequency, has_tuner, has_norm; - int fd; - int palettes; /* bitfield */ - - \constructor (string mode, string filename) { - queuesize=0; queuemax=2; next_frame=0; use_mmap=true; use_pwc=false; bit_packing=0; dim=0; - has_frequency=false; - has_tuner=false; - has_norm=false; - image=0; - f = fopen(filename.data(),"r+"); - if (!f) RAISE("can't open device '%s': %s",filename.data(),strerror(errno)); - fd = fileno(f); - initialize2(); - } - void frame_finished (uint8 *buf); - - void alloc_image (); - void dealloc_image (); - void frame_ask (); - void initialize2 (); - ~FormatVideoDev () {if (image) dealloc_image();} - - \decl 0 bang (); - \grin 0 int - - \attr int channel(); - \attr int tuner(); - \attr int norm(); - \decl 0 size (int sy, int sx); - \decl 0 transfer (string sym, int queuemax=2); - - \attr t_symbol *colorspace; - \attr long frequency(); - \attr uint16 brightness(); - \attr uint16 hue(); - \attr uint16 colour(); - \attr uint16 contrast(); - \attr uint16 whiteness(); - - \attr bool pwc(); /* 0..1 */ - \attr uint16 framerate(); - \attr uint16 white_mode(); /* 0..1 */ - \attr uint16 white_red(); - \attr uint16 white_blue(); - \attr uint16 white_speed(); - \attr uint16 white_delay(); - \attr int auto_gain(); - \attr int noise_reduction(); /* 0..3 */ - \attr int compression(); /* 0..3 */ - \attr t_symbol *name; - - \decl 0 get (t_symbol *s=0); -}; - -#define DEBUG(args...) 42 -//#define DEBUG(args...) post(args) - -#define IOCTL( F,NAME,ARG) \ - (DEBUG("fd%d.ioctl(0x%08x,0x%08x)",F,NAME,ARG), ioctl(F,NAME,ARG)) -#define WIOCTL( F,NAME,ARG) \ - (IOCTL(F,NAME,ARG)<0 && (error("ioctl %s: %s",#NAME,strerror(errno)),1)) -#define WIOCTL2(F,NAME,ARG) \ - (IOCTL(F,NAME,ARG)<0 && (error("ioctl %s: %s",#NAME,strerror(errno)), RAISE("ioctl error"), 0)) - -\def 0 get (t_symbol *s=0) { - // this is abnormal for a get-function - if (s==gensym("frequency") && !has_frequency ) return; - if (s==gensym("tuner") && !has_tuner ) return; - if (s==gensym("norm") && !has_norm ) return; - if (s==gensym("channel") && vcaps.channels<2) return; - if (!use_pwc && (s==gensym("white_mode") || s==gensym("white_red") || s==gensym("white_blue") || - s==gensym("white_speed") || s==gensym("white_delay") || s==gensym("auto_gain") || - s==gensym("noise_reduction") || s==gensym("compression") || s==gensym("framerate"))) return; - FObject::_0_get(argc,argv,s); - if (!s) { - t_atom a[2]; - SETFLOAT(a+0,vcaps.minheight); - SETFLOAT(a+1,vcaps.minwidth); - outlet_anything(bself->outlets[0],gensym("minsize"),2,a); - SETFLOAT(a+0,vcaps.maxheight); - SETFLOAT(a+1,vcaps.maxwidth); - outlet_anything(bself->outlets[0],gensym("maxsize"),2,a); - char *foo = choice_to_s(vp.palette,COUNT(video_palette_choice),video_palette_choice); - SETSYMBOL(a,gensym(foo)); - free(foo); - outlet_anything(bself->outlets[0],gensym("palette"),1,a); - SETSYMBOL(a,use_mmap ? gensym("mmap") : gensym("read")); - outlet_anything(bself->outlets[0],gensym("transfer"),1,a); - SETFLOAT(a+0,dim->v[0]); - SETFLOAT(a+1,dim->v[1]); - outlet_anything(bself->outlets[0],gensym("size"),2,a); // abnormal (does not use nested list) - } -} - -\def 0 size (int sy, int sx) { - VideoWindow grab_win; - // !@#$ bug here: won't flush the frame queue - dim = new Dim(sy,sx,3); - WIOCTL(fd, VIDIOCGWIN, &grab_win); - if (debug) gfpost(&grab_win); - grab_win.clipcount = 0; - grab_win.flags = 0; - if (sy && sx) { - grab_win.height = sy; - grab_win.width = sx; - } - if (debug) gfpost(&grab_win); - WIOCTL(fd, VIDIOCSWIN, &grab_win); - WIOCTL(fd, VIDIOCGWIN, &grab_win); - if (debug) gfpost(&grab_win); -} - -void FormatVideoDev::dealloc_image () { - if (!image) return; - if (use_mmap) { - munmap(image, vmbuf.size); - image=0; - } else { - delete[] (uint8 *)image; - } -} - -void FormatVideoDev::alloc_image () { - if (use_mmap) { - WIOCTL2(fd, VIDIOCGMBUF, &vmbuf); - //gfpost(&vmbuf); - //size_t size = vmbuf.frames > 4 ? vmbuf.offsets[4] : vmbuf.size; - image = (uint8 *)mmap(0,vmbuf.size,PROT_READ|PROT_WRITE,MAP_SHARED,fd,0); - if (((long)image)==-1) {image=0; RAISE("mmap: %s", strerror(errno));} - } else { - image = new uint8[dim->prod(0,1)*bit_packing->bytes]; - } -} - -void FormatVideoDev::frame_ask () { - 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 = vp.palette; - vmmap.width = dim->get(1); - vmmap.height = dim->get(0); - WIOCTL2(fd, VIDIOCMCAPTURE, &vmmap); - //gfpost(&vmmap); - next_frame = (next_frame+1) % vmbuf.frames; -} - -static uint8 clip(int x) {return x<0?0 : x>255?255 : x;} - -void FormatVideoDev::frame_finished (uint8 *buf) { - string cs = colorspace->s_name; - int downscale = cs=="magic"; - /* picture is converted here. */ - int sy = dim->get(0)>>downscale; - int sx = dim->get(1)>>downscale; - int bs = dim->prod(1)>>downscale; - uint8 b2[bs]; - //post("sy=%d sx=%d bs=%d",sy,sx,bs); - //post("frame_finished, vp.palette = %d; colorspace = %s",vp.palette,cs.data()); - if (vp.palette==VIDEO_PALETTE_YUV420P) { - GridOutlet out(this,0,cs=="magic"?new Dim(sy,sx,3):(Dim *)dim,cast); - if (cs=="y") { - out.send(sy*sx,buf); - } else if (cs=="rgb") { - for(int y=0; y<sy; y++) { - uint8 *bufy = buf+sx* y; - uint8 *bufu = buf+sx*sy +(sx/2)*(y/2); - uint8 *bufv = buf+sx*sy*5/4+(sx/2)*(y/2); - int Y1,Y2,U,V; - for (int x=0,xx=0; x<sx; x+=2,xx+=6) { - Y1=bufy[x] - 16; - Y2=bufy[x+1] - 16; - U=bufu[x/2] - 128; - V=bufv[x/2] - 128; - b2[xx+0]=clip((298*Y1 + 409*V)>>8); - b2[xx+1]=clip((298*Y1 - 100*U - 208*V)>>8); - b2[xx+2]=clip((298*Y1 + 516*U )>>8); - b2[xx+3]=clip((298*Y2 + 409*V)>>8); - b2[xx+4]=clip((298*Y2 - 100*U - 208*V)>>8); - b2[xx+5]=clip((298*Y2 + 516*U )>>8); - } - out.send(bs,b2); - } - } else if (cs=="yuv") { - for(int y=0; y<sy; y++) { - uint8 *bufy = buf+sx* y; - uint8 *bufu = buf+sx*sy +(sx/2)*(y/2); - uint8 *bufv = buf+sx*sy*5/4+(sx/2)*(y/2); - int U,V; - for (int x=0,xx=0; x<sx; x+=2,xx+=6) { - U=bufu[x/2]; - V=bufv[x/2]; - b2[xx+0]=clip(((bufy[x+0]-16)*298)>>8); - b2[xx+1]=clip(128+(((U-128)*293)>>8)); - b2[xx+2]=clip(128+(((V-128)*293)>>8)); - b2[xx+3]=clip(((bufy[x+1]-16)*298)>>8); - b2[xx+4]=clip(128+(((U-128)*293)>>8)); - b2[xx+5]=clip(128+(((V-128)*293)>>8)); - } - out.send(bs,b2); - } - } else if (cs=="magic") { - for(int y=0; y<sy; y++) { - uint8 *bufy = buf +4*sx*y; - uint8 *bufu = buf+4*sx*sy+ sx*y; - uint8 *bufv = buf+5*sx*sy+ sx*y; - for (int x=0,xx=0; x<sx; x++,xx+=3) { - b2[xx+0]=bufy[x+x]; - b2[xx+1]=bufu[x]; - b2[xx+2]=bufv[x]; - } - out.send(bs,b2); - } - } - } else if (vp.palette==VIDEO_PALETTE_RGB32 || vp.palette==VIDEO_PALETTE_RGB24 || vp.palette==VIDEO_PALETTE_RGB565) { - GridOutlet out(this,0,dim,cast); - uint8 rgb[sx*3]; - uint8 b2[sx*3]; - if (cs=="y") { - for(int y=0; y<sy; y++) { - bit_packing->unpack(sx,buf+y*sx*bit_packing->bytes,rgb); - for (int x=0,xx=0; x<sx; x+=2,xx+=6) { - b2[x+0] = (76*rgb[xx+0]+150*rgb[xx+1]+29*rgb[xx+2])>>8; - b2[x+1] = (76*rgb[xx+3]+150*rgb[xx+4]+29*rgb[xx+5])>>8; - } - out.send(bs,b2); - } - } else if (cs=="rgb") { - for(int y=0; y<sy; y++) { - bit_packing->unpack(sx,buf+y*sx*bit_packing->bytes,rgb); - out.send(bs,rgb); - } - } else if (cs=="yuv") { - for(int y=0; y<sy; y++) { - bit_packing->unpack(sx,buf+y*sx*bit_packing->bytes,rgb); - for (int x=0,xx=0; x<sx; x+=2,xx+=6) { - b2[xx+0] = clip( (( 76*rgb[xx+0] + 150*rgb[xx+1] + 29*rgb[xx+2])>>8)); - b2[xx+1] = clip(128+((- 44*rgb[xx+0] - 85*rgb[xx+1] + 108*rgb[xx+2])>>8)); - b2[xx+2] = clip(128+(( 128*rgb[xx+0] - 108*rgb[xx+1] - 21*rgb[xx+2])>>8)); - b2[xx+3] = clip( (( 76*rgb[xx+3] + 150*rgb[xx+4] + 29*rgb[xx+5])>>8)); - b2[xx+4] = clip(128+((- 44*rgb[xx+3] - 85*rgb[xx+4] + 108*rgb[xx+5])>>8)); - b2[xx+5] = clip(128+(( 128*rgb[xx+3] - 108*rgb[xx+4] - 21*rgb[xx+5])>>8)); - } - out.send(bs,b2); - } - } else if (cs=="magic") { - RAISE("magic colorspace not supported with a RGB palette"); - } - } else { - RAISE("unsupported palette %d",vp.palette); - } -} - -/* these are factors for RGB to analog YUV */ -// Y = 66*R + 129*G + 25*B -// U = - 38*R - 74*G + 112*B -// V = 112*R - 94*G - 18*B - -// strange that read2 is not used and read3 is used instead -static int read2(int fd, uint8 *image, int n) { - int r=0; - while (n>0) { - int rr=read(fd,image,n); - if (rr<0) return rr; else {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 0 bang () { - if (!image) alloc_image(); - 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) frame_ask(); - 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]; - frame_ask(); -} - -GRID_INLET(FormatVideoDev,0) { - RAISE("can't write."); -} GRID_FLOW { -} GRID_FINISH { -} GRID_END - -\def 0 norm (int value) { - 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)) { - post("no tuner #%d", value); - } else { - vtuner.mode = value; - gfpost(&vtuner); - WIOCTL(fd, VIDIOCSTUNER, &vtuner); - } -} - -\def int norm () { - VideoTuner vtuner; - vtuner.tuner = current_tuner; - if (0> IOCTL(fd, VIDIOCGTUNER, &vtuner)) {post("no tuner #%d", current_tuner); return -1;} - return vtuner.mode; -} - -\def 0 tuner (int value) { - 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); - has_norm = (vtuner.mode<=3); - int meuh; - has_frequency = (ioctl(fd, VIDIOCGFREQ, &meuh)>=0); -} -\def int tuner () {return current_tuner;} - -#define warn(fmt,stuff...) post("warning: " fmt,stuff) - -\def 0 channel (int value) { - VideoChannel vchan; - vchan.channel = value; - current_channel = value; - if (0> IOCTL(fd, VIDIOCGCHAN, &vchan)) warn("no channel #%d", value); - //gfpost(&vchan); - WIOCTL(fd, VIDIOCSCHAN, &vchan); - if (vcaps.type & VID_TYPE_TUNER) _0_tuner(0,0,0); - has_tuner = (vcaps.type & VID_TYPE_TUNER && vchan.tuners > 1); -} -\def int channel () {return current_channel;} - -\def 0 transfer (string sym, int queuemax=2) { - if (sym=="read") { - dealloc_image(); - use_mmap = false; - post("transfer read"); - } else if (sym=="mmap") { - dealloc_image(); - use_mmap = true; - alloc_image(); - queuemax=min(queuemax,vmbuf.frames); - post("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_) {\ - WIOCTL(fd, VIDIOCGPICT, &vp); \ - vp._name_ = _name_; \ - WIOCTL(fd, VIDIOCSPICT, &vp);} - -#define PICTURE_ATTRGET(_name_) { \ - WIOCTL(fd, VIDIOCGPICT, &vp); \ - /*gfpost("getting %s=%d",#_name_,vp._name_);*/ \ - return vp._name_;} - -\def uint16 brightness () {PICTURE_ATTRGET(brightness)} -\def 0 brightness (uint16 brightness){PICTURE_ATTR( brightness)} -\def uint16 hue () {PICTURE_ATTRGET(hue)} -\def 0 hue (uint16 hue) {PICTURE_ATTR( hue)} -\def uint16 colour () {PICTURE_ATTRGET(colour)} -\def 0 colour (uint16 colour) {PICTURE_ATTR( colour)} -\def uint16 contrast () {PICTURE_ATTRGET(contrast)} -\def 0 contrast (uint16 contrast) {PICTURE_ATTR( contrast)} -\def uint16 whiteness () {PICTURE_ATTRGET(whiteness)} -\def 0 whiteness (uint16 whiteness) {PICTURE_ATTR( whiteness)} -\def long frequency () { - long value; - //if (ioctl(fd, VIDIOCGFREQ, &value)<0) {has_frequency=false; return 0;} - WIOCTL(fd, VIDIOCGFREQ, &value); - return value; -} -\def 0 frequency (long frequency) { - WIOCTL(fd, VIDIOCSFREQ, &frequency); -} - -\def 0 colorspace (t_symbol *colorspace) { /* y yuv rgb magic */ - string c = colorspace->s_name; - if (c=="y") {} - else if (c=="yuv") {} - else if (c=="rgb") {} - else if (c=="magic") {} - else RAISE("got '%s' but supported colorspaces are: y yuv rgb magic",c.data()); - WIOCTL(fd, VIDIOCGPICT, &vp); - int palette = (palettes&(1<<VIDEO_PALETTE_RGB24)) ? VIDEO_PALETTE_RGB24 : - (palettes&(1<<VIDEO_PALETTE_RGB32)) ? VIDEO_PALETTE_RGB32 : - (palettes&(1<<VIDEO_PALETTE_RGB565)) ? VIDEO_PALETTE_RGB565 : - VIDEO_PALETTE_YUV420P; - vp.palette = palette; - WIOCTL(fd, VIDIOCSPICT, &vp); - WIOCTL(fd, VIDIOCGPICT, &vp); - if (vp.palette != palette) { - post("this driver is unsupported: it wants palette %d instead of %d",vp.palette,palette); - return; - } - if (palette == VIDEO_PALETTE_RGB565) { - //uint32 masks[3] = { 0x00fc00,0x003e00,0x00001f }; - uint32 masks[3] = { 0x00f800,0x007e0,0x00001f }; - bit_packing = new BitPacking(is_le(),2,3,masks); - } else if (palette == VIDEO_PALETTE_RGB32) { - uint32 masks[3] = { 0xff0000,0x00ff00,0x0000ff }; - bit_packing = new BitPacking(is_le(),4,3,masks); - } else { - uint32 masks[3] = { 0xff0000,0x00ff00,0x0000ff }; - bit_packing = new BitPacking(is_le(),3,3,masks); - } - this->colorspace=gensym(c.data()); - dim = new Dim(dim->v[0],dim->v[1],c=="y"?1:3); -} - -\def bool pwc () {return use_pwc;} -\def 0 pwc (bool pwc) {use_pwc=pwc;} - -void set_pan_and_tilt(int fd, char what, int pan, int tilt) { /*unused*/ - // if (!use_pwc) return; - struct pwc_mpt_angles pma; - pma.absolute=1; - WIOCTL(fd, VIDIOCPWCMPTGANGLE, &pma); - pma.pan = pan; - pma.tilt = tilt; - WIOCTL(fd, VIDIOCPWCMPTSANGLE, &pma); -} - -\def uint16 framerate() { - if (!use_pwc) return 0; - struct video_window vwin; - WIOCTL(fd, VIDIOCGWIN, &vwin); - return (vwin.flags & PWC_FPS_MASK) >> PWC_FPS_SHIFT; -} - -\def 0 framerate(uint16 framerate) { - if (!use_pwc) return; - struct video_window vwin; - WIOCTL(fd, VIDIOCGWIN, &vwin); - vwin.flags &= ~PWC_FPS_FRMASK; - vwin.flags |= (framerate << PWC_FPS_SHIFT) & PWC_FPS_FRMASK; - WIOCTL(fd, VIDIOCSWIN, &vwin); -} - -/* those functions are still mostly unused */ -//void set_compression_preference(int fd, int pref) {if (use_pwc) WIOCTL(fd, VIDIOCPWCSCQUAL, &pref);} - -\def int auto_gain() {int auto_gain=0; if (use_pwc) WIOCTL(fd, VIDIOCPWCGAGC, &auto_gain); return auto_gain;} -\def 0 auto_gain (int auto_gain) {if (use_pwc) WIOCTL(fd, VIDIOCPWCSAGC, &auto_gain);} - -//void set_shutter_speed(int fd, int pref) {if (use_pwc) WIOCTL(fd, VIDIOCPWCSSHUTTER, &pref);} - -\def uint16 white_mode () { - if (!use_pwc) return 0; - struct pwc_whitebalance pwcwb; - WIOCTL(fd, VIDIOCPWCGAWB, &pwcwb); - if (pwcwb.mode==PWC_WB_AUTO) return 0; - if (pwcwb.mode==PWC_WB_MANUAL) return 1; - return 2; -} - -\def 0 white_mode (uint16 white_mode) { - if (!use_pwc) return; - struct pwc_whitebalance pwcwb; - WIOCTL(fd, VIDIOCPWCGAWB, &pwcwb); - if (white_mode==0) pwcwb.mode = PWC_WB_AUTO; - else if (white_mode==1) pwcwb.mode = PWC_WB_MANUAL; - /*else if (strcasecmp(mode, "indoor") == 0) pwcwb.mode = PWC_WB_INDOOR;*/ - /*else if (strcasecmp(mode, "outdoor") == 0) pwcwb.mode = PWC_WB_OUTDOOR;*/ - /*else if (strcasecmp(mode, "fl") == 0) pwcwb.mode = PWC_WB_FL;*/ - else {error("unknown mode number %d", white_mode); return;} - WIOCTL(fd, VIDIOCPWCSAWB, &pwcwb);} - -\def uint16 white_red() {if (!use_pwc) return 0; - struct pwc_whitebalance pwcwb; WIOCTL(fd, VIDIOCPWCGAWB, &pwcwb); return pwcwb.manual_red;} -\def uint16 white_blue() {if (!use_pwc) return 0; - struct pwc_whitebalance pwcwb; WIOCTL(fd, VIDIOCPWCGAWB, &pwcwb); return pwcwb.manual_blue;} -\def 0 white_red(uint16 white_red) {if (!use_pwc) return; - struct pwc_whitebalance pwcwb; WIOCTL(fd, VIDIOCPWCGAWB, &pwcwb); - pwcwb.manual_red = white_red; WIOCTL(fd, VIDIOCPWCSAWB, &pwcwb);} -\def 0 white_blue(uint16 white_blue) {if (!use_pwc) return; - struct pwc_whitebalance pwcwb; WIOCTL(fd, VIDIOCPWCGAWB, &pwcwb); - pwcwb.manual_blue = white_blue;WIOCTL(fd, VIDIOCPWCSAWB, &pwcwb);} - -\def uint16 white_speed() {if (!use_pwc) return 0; - struct pwc_wb_speed pwcwbs; WIOCTL(fd, VIDIOCPWCGAWBSPEED, &pwcwbs); return pwcwbs.control_speed;} -\def uint16 white_delay() {if (!use_pwc) return 0; - struct pwc_wb_speed pwcwbs; WIOCTL(fd, VIDIOCPWCGAWBSPEED, &pwcwbs); return pwcwbs.control_delay;} -\def 0 white_speed(uint16 white_speed) {if (!use_pwc) return; - struct pwc_wb_speed pwcwbs; WIOCTL(fd, VIDIOCPWCGAWBSPEED, &pwcwbs); - pwcwbs.control_speed = white_speed; WIOCTL(fd, VIDIOCPWCSAWBSPEED, &pwcwbs);} -\def 0 white_delay(uint16 white_delay) {if (!use_pwc) return; - struct pwc_wb_speed pwcwbs; WIOCTL(fd, VIDIOCPWCGAWBSPEED, &pwcwbs); - pwcwbs.control_delay = white_delay; WIOCTL(fd, VIDIOCPWCSAWBSPEED, &pwcwbs);} - -void set_led_on_time(int fd, int val) { - struct pwc_leds pwcl; WIOCTL(fd, VIDIOCPWCGLED, &pwcl); - pwcl.led_on = val; WIOCTL(fd, VIDIOCPWCSLED, &pwcl);} -void set_led_off_time(int fd, int val) { - struct pwc_leds pwcl; WIOCTL(fd, VIDIOCPWCGLED, &pwcl); - pwcl.led_off = val; WIOCTL(fd, VIDIOCPWCSLED, &pwcl);} -void set_sharpness(int fd, int val) {WIOCTL(fd, VIDIOCPWCSCONTOUR, &val);} -void set_backlight_compensation(int fd, int val) {WIOCTL(fd, VIDIOCPWCSBACKLIGHT, &val);} -void set_antiflicker_mode(int fd, int val) {WIOCTL(fd, VIDIOCPWCSFLICKER, &val);} - -\def int noise_reduction() { - if (!use_pwc) return 0; - int noise_reduction; - WIOCTL(fd, VIDIOCPWCGDYNNOISE, &noise_reduction); - return noise_reduction; -} -\def 0 noise_reduction(int noise_reduction) { - if (!use_pwc) return; - WIOCTL(fd, VIDIOCPWCSDYNNOISE, &noise_reduction); -} -\def int compression() { - if (!use_pwc) return 0; - int compression; - WIOCTL(fd, VIDIOCPWCSCQUAL, &compression); - return compression; -} -\def 0 compression(int compression) { - if (!use_pwc) return; - WIOCTL(fd, VIDIOCPWCGCQUAL, &compression); -} - -void FormatVideoDev::initialize2 () { - WIOCTL(fd, VIDIOCGCAP, &vcaps); - _0_size(0,0,vcaps.maxheight,vcaps.maxwidth); - char namebuf[33]; - memcpy(namebuf,vcaps.name,sizeof(vcaps.name)); - int i; - for (i=32; i>=1; i--) if (!namebuf[i] || !isspace(namebuf[i])) break; - namebuf[i]=0; - while (--i>=0) if (isspace(namebuf[i])) namebuf[i]='_'; - name = gensym(namebuf); - WIOCTL(fd, VIDIOCGPICT,&vp); - palettes=0; - int checklist[] = {VIDEO_PALETTE_RGB565,VIDEO_PALETTE_RGB24,VIDEO_PALETTE_RGB32,VIDEO_PALETTE_YUV420P}; -#if 1 - for (size_t i=0; i<sizeof(checklist)/sizeof(*checklist); i++) { - int p = checklist[i]; -#else - for (size_t p=0; p<17; p++) { -#endif - vp.palette = p; - ioctl(fd, VIDIOCSPICT,&vp); - ioctl(fd, VIDIOCGPICT,&vp); - if (vp.palette == p) { - palettes |= 1<<p; - post("palette %d supported",p); - } - } - _0_colorspace(0,0,gensym("rgb")); - _0_channel(0,0,0); -} - -\end class FormatVideoDev {install_format("#io.videodev",4,"");} -void startup_videodev () { - \startall -} diff --git a/externals/gridflow/format/x11.c b/externals/gridflow/format/x11.c deleted file mode 100644 index 91beb0bc..00000000 --- a/externals/gridflow/format/x11.c +++ /dev/null @@ -1,656 +0,0 @@ -/* - $Id: x11.c 3982 2008-07-04 20:49:12Z matju $ - - GridFlow - Copyright (c) 2001-2008 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 "../gridflow.h.fcs" -#include <ctype.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <string> -#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 - -/* X11 Error Handler type */ -typedef int (*XEH)(Display *, XErrorEvent *); - -struct FormatX11; -void FormatX11_call(FormatX11 *p); - -\class 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; - bool use_stripes; /* use alternate conversion in 256-color mode */ - bool shared_memory; - bool xvideo; -/* 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 */ - 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; - t_clock *clock; - std::string title; -#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; /* ils sont fous ces romains */ - unsigned char *data; - int last_encoding; -#endif - ~FormatX11 () { - clock_unset(clock); - if (is_owner) XDestroyWindow(display,window); - XSync(display,0); - dealloc_image(); - if (imagegc) XFreeGC(display,imagegc); - XCloseDisplay(display); - } - 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 search_window_tree (Window xid, Atom key, const char *value, int level=0); - \constructor (...) { - shared_memory=false; xvideo=false; use_stripes=false; window=0; ximage=0; image=0; is_owner=true; - dim=0; lock_size=false; override_redirect=false; clock=0; imagegc=0; -#ifdef HAVE_X11_SHARED_MEMORY - shm_info=0; -#endif - int sy=240, sx=320; // defaults - argv++, argc--; - t_symbol *domain = argc<1 ? gensym("here") : argv[0]; - int i; - char host[256]; - if (domain==gensym("here")) { - open_display(0); - i=1; - } else if (domain==gensym("local")) { - if (argc<2) RAISE("open x11 local: not enough args"); - sprintf(host,":%ld",long(argv[1])); - open_display(host); - i=2; - } else if (domain==gensym("remote")) { - if (argc<3) RAISE("open x11 remote: not enough args"); - sprintf(host,"%s:%ld",string(argv[1]).data(),long(argv[2])); - open_display(host); - i=3; - } else if (domain==gensym("display")) { - if (argc<2) RAISE("open x11 display: not enough args"); - strcpy(host,string(argv[1]).data()); - for (int k=0; host[k]; k++) if (host[k]=='%') host[k]==':'; - post("mode `display', DISPLAY=`%s'",host); - open_display(host); - i=2; - } else RAISE("x11 destination syntax error"); - for(;i<argc;i++) { - if (argv[i]==gensym("override_redirect")) override_redirect = true; - else if (argv[i]==gensym("use_stripes")) use_stripes = true; - else RAISE("argument '%s' not recognized",string(argv[i]).data()); - } - pos[1]=pos[0]=0; - parent = root_window; - if (i>=argc) { - } else { - const t_atom2 &winspec = argv[i]; - if (winspec==gensym("root")) { - window = root_window; - is_owner = false; - } else if (winspec==gensym("embed")) { - string title = argv[i+1]; - sy = sx = pos[0] = pos[1] = 0; - parent = search_window_tree(root_window,XInternAtom(display,"WM_NAME",0),title.data()); - if (parent == 0xDeadBeef) RAISE("Window not found."); - } else if (winspec==gensym("embed_by_id")) { - const char *winspec2 = string(argv[i+1]).data(); - if (strncmp(winspec2,"0x",2)==0) { - parent = strtol(winspec2+2,0,16); - } else { - parent = atoi(winspec2); - } - } else { - if (winspec.a_type==A_SYMBOL) { - const char *winspec2 = string(winspec).data(); - 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_window(sx,sy); // "resize" also takes care of creation - 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?"); - } - clock = clock_new(this,(t_method)FormatX11_call); - clock_delay(clock,0); - show_section(0,0,sx,sy); - } - - \decl 0 bang (); - void call (); - \decl 0 out_size (int sy, int sx); - \decl 0 setcursor (int shape); - \decl 0 hidecursor (); - \decl 0 set_geometry (int y, int x, int sy, int sx); - \decl 0 move (int y, int x); - \decl 0 shared_memory (bool toggle); - \decl 0 xvideo (bool toggle); - \decl 0 title (string title=""); - \decl 0 warp (int y, int x); - \grin 0 int -}; - -/* ---------------------------------------------------------------- */ - -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; -#ifndef HAVE_X11_XVIDEO - if (xvideo) RAISE("xvideo not available (recompile)"); -#endif -#ifndef HAVE_X11_SHARED_MEMORY - if (shared_memory) RAISE("xshm not available (recompile)"); -#endif - if (xvideo) { -#ifdef HAVE_X11_XVIDEO - if (shared_memory) { -#ifdef HAVE_X11_SHARED_MEMORY - -#endif // shm - } else { - XvPutImage(display,port,window,imagegc,ximage, - xvi, 0, 0, image_width, image_height, - drwX - (vo_panscan_x >> 1), drwY - (vo_panscan_y >> 1), - vo_dwidth + vo_panscan_x, - vo_dheight + vo_panscan_y); - - } -#endif // xvideo - } else { - if (shared_memory) { -#ifdef HAVE_X11_SHARED_MEMORY - 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 -#endif // xshm - } else { - XPutImage(display,window,imagegc,ximage,x,y,x,y,sx,sy); - XFlush(display); - } - } -} - -/* window manager hints, defines the window as non-resizable */ -void FormatX11::set_wm_hints () { - if (!is_owner) return; - XWMHints wmh; - char buf[256],*bufp=buf; - if (title=="") { - sprintf(buf,"GridFlow (%d,%d,%d)",dim->get(0),dim->get(1),dim->get(2)); - } else { - sprintf(buf,"%.255s",title.data()); - } - 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) { - t_atom a[3]; - SETFLOAT(a+0,y); - SETFLOAT(a+1,x); - SETFLOAT(a+2,state); - outlet_anything(bself->outlets[0],gensym("position"),COUNT(a),a); -} - -void FormatX11::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 (mode==2) 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); - t_atom at[4]; - t_symbol *sel = gensym(const_cast<char *>(e.type==KeyPress ? "keypress" : "keyrelease")); - SETFLOAT(at+0,ek->y); - SETFLOAT(at+1,ek->x); - SETFLOAT(at+2,ek->state); - SETSYMBOL(at+3,gensym(buf)); - outlet_anything(bself->outlets[0],sel,4,at); - //XFree(kss); - }break; - case MotionNotify:{ - XMotionEvent *em = (XMotionEvent *)&e; - report_pointer(em->y,em->x,em->state); - }break; - case DestroyNotify:{ - post("This window is being closed, so this handler will close too!"); - delete this; /* really! what else could i do here anyway? */ - return; - }break; - case ConfigureNotify:break; // as if we cared - } - } - clock_delay(clock,20); -} -void FormatX11_call(FormatX11 *p) {p->call();} - -\def 0 bang () { - XGetSubImage(display, window, 0, 0, dim->get(1), dim->get(0), (unsigned)-1, ZPixmap, ximage, 0, 0); - GridOutlet out(this,0,dim,cast); - int sy=dim->get(0), sx=dim->get(1), bs=dim->prod(1); - uint8 b2[bs]; - for(int y=0; y<sy; y++) { - uint8 *b1 = image + 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) { - post("XErrorEvent: type=0x%08x display=0x%08x xid=0x%08x", - xee->type, xee->display, xee->resourceid); - post("... 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->shared_memory==1) { - post("(note: turning shm off)"); - current_x11->shared_memory = 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; - if (!shared_memory) { - 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 = new uint8[size]; - ximage->data = (int8 *)image; - } else { -#ifdef HAVE_X11_SHARED_MEMORY - shm_info = new XShmSegmentInfo; - ximage = XShmCreateImage(display,visual,depth,ZPixmap,0,shm_info,sx,sy); - if (!ximage) {post("x11: will retry without shared memory"); shared_memory=false;} - XSync(display,0); - if (!shared_memory) return alloc_image(sx,sy); - int size = ximage->bytes_per_line*ximage->height; - 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)); - image = (uint8 *)ximage->data; - 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 (!shared_memory) return alloc_image(sx,sy); -#endif - } -#ifdef HAVE_X11_XVIDEO - if (xvideo) { - 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++) post("XvEncodingInfo: name='%s' encoding_id=0x%08x",enc[i].name,enc[i].encoding_id); - post("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"); -*/ - } -#endif - int status = XInitImage(ximage); - if (status!=1) post("XInitImage returned: %d", status); - return true; -retry: - post("couldn't allocate image buffer for output... retrying..."); - return alloc_image(sx,sy); -} - -void FormatX11::dealloc_image () { - if (!ximage) return; - if (!shared_memory) { - XFree(ximage); ximage=0; image=0; - } else { -#ifdef HAVE_X11_SHARED_MEMORY - shmdt(ximage->data); - XShmDetach(display,shm_info); - if (shm_info) {delete shm_info; shm_info=0;} - XFree(ximage); - ximage = 0; - image = 0; -#endif - } - if (xvideo) { -#ifdef HAVE_X11_XVIDEO - //if (data) delete[] data; - if (xvi) XFree(xvi); - xvi=0; - //data=0; -#endif - } -} - -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(); - - XSelectInput(display, window, - ExposureMask|StructureNotifyMask|PointerMotionMask| - ButtonPressMask|ButtonReleaseMask|ButtonMotionMask| - KeyPressMask|KeyReleaseMask); - - 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 sx = in->dim->get(1), osx = dim->get(1); - int sy = in->dim->get(0), osy = dim->get(0); - in->set_chunk(1); - 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; - 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 0 out_size (int sy, int sx) { resize_window(sx,sy); } - -\def 0 setcursor (int shape) { - shape = 2*(shape&63); - Cursor c = XCreateFontCursor(display,shape); - XDefineCursor(display,window,c); - XFlush(display); -} - -\def 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) - xvideo = true; -#elif defined(HAVE_X11_SHARED_MEMORY) - shared_memory = !! XShmQueryExtension(display); -#else - shared_memory = false; -#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 0 move (int y, int x) { - pos[0]=y; pos[1]=x; - XMoveWindow(display,window,x,y); - XFlush(display); -} - -\def 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 0 shared_memory (bool toggle) {shared_memory = toggle;} -\def 0 xvideo (bool toggle) {xvideo = toggle;} - -\def 0 warp (int y, int x) { - XWarpPointer(display,None,None,0,0,0,0,x,y); - XFlush(display); -} - -\def 0 title (string title="") {this->title = title; set_wm_hints();} - -\end class FormatX11 {install_format("#io.x11",6,"");} -void startup_x11 () { - \startall -} - diff --git a/externals/gridflow/gridflow.c b/externals/gridflow/gridflow.c deleted file mode 100644 index 5fe428bc..00000000 --- a/externals/gridflow/gridflow.c +++ /dev/null @@ -1,885 +0,0 @@ -/* - $Id: rubyext.c 3621 2008-04-19 01:47:38Z matju $ - - GridFlow - Copyright (c) 2001-2008 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 "gridflow.h.fcs" -#include <ctype.h> -#include <stdarg.h> -#include <unistd.h> -#include <sys/time.h> -#include <signal.h> -#include <setjmp.h> -#include <stdlib.h> -//#include <cstdlib> -#include <sys/stat.h> -#include <time.h> -#include <string.h> -#include <stdio.h> -#include <fcntl.h> -#include <limits.h> -#ifdef HAVE_GEM -#include "Base/GemPixDualObj.h" -#endif - -/* for exception-handling in 0.9.0... Linux-only */ -#ifndef MACOSX -#include <exception> -#include <execinfo.h> -#endif -#undef check - -std::map<string,FClass *> fclasses; -std::map<t_class *,FClass *> fclasses_pd; - -//using namespace std; - -BuiltinSymbols bsym; - -Barf::Barf(const char *s, ...) { - char buf[1024]; - va_list ap; - va_start(ap,s); - vsnprintf(buf,1024,s,ap); - buf[1023]=0; - va_end(ap); - text = strdup(buf); -} -Barf::Barf(const char *file, int line, const char *func, const char *s, ...) { - char buf[1024]; - va_list ap; - va_start(ap,s); - int n = vsnprintf(buf,1024,s,ap); - if (n<1024) snprintf(buf+n, 1024-n, "\n%s:%d:in `%s'", file, line, func); - buf[1023]=0; - va_end(ap); - text = strdup(buf); -} - -void pd_oprint (std::ostream &o, int argc, t_atom *argv) { - for (int i=0; i<argc; i++) { - t_atomtype t = argv[i].a_type; - if (t==A_FLOAT) o << argv[i].a_float; - else if (t==A_SYMBOL) o << argv[i].a_symbol->s_name; - else if (t==A_POINTER) o << "(pointer)"; - else if (t==A_COMMA) o << ","; - else if (t==A_SEMI) o << ";"; - else if (t==A_LIST) { - t_binbuf *b = (t_binbuf *)argv[i].a_gpointer; - o << "["; - pd_oprint(o,binbuf_getnatom(b),binbuf_getvec(b)); - o << "]"; - } else o << "(atom of type " << t << ")"; - if (i!=argc-1) o << " "; - } -} - -void pd_post (const char *s, int argc, t_atom *argv) { - std::ostringstream os; - if (s) os << s << ": "; - pd_oprint(os,argc,argv); - post("%s",os.str().data()); -} - -void pd_oprintf (std::ostream &o, const char *s, int argc, t_atom *argv) { - int i=0; - for (; *s; s++) { - if (*s!='%') {o << (char)*s; continue;} - s++; // skip the % - if (*s=='f') { - if (!argc) RAISE("not enough args"); - if (argv[i].a_type != A_FLOAT) RAISE("expected float"); - o << argv[i].a_float; - } - if (*s=='s') { - if (!argc) RAISE("not enough args"); - if (argv[i].a_type != A_SYMBOL) RAISE("expected symbol"); - o << argv[i].a_symbol->s_name; - } - if (*s=='_') { - if (!argc) RAISE("not enough args"); - char buf[MAXPDSTRING]; - atom_string(&argv[i],buf,MAXPDSTRING); - o << buf; - } - if (*s=='%') { - o << "%"; - continue; - } - RAISE("sorry, this format string is not supported yet"); - } -} - -//---------------------------------------------------------------- -// 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); -} - -NumberTypeE NumberTypeE_find (string s) { - if (number_type_dict.find(s)==number_type_dict.end()) RAISE("unknown number type \"%s\"", s.data()); - return number_type_dict[s]->index; -} - -NumberTypeE NumberTypeE_find (const t_atom &x) { - if (x.a_type!=A_SYMBOL) RAISE("expected number-type (as symbol)"); - return NumberTypeE_find(string(x.a_symbol->s_name)); -} - -// don't touch. -static void gfmemcopy32(int32 *as, int32 *bs, long n) { - ptrdiff_t 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, long 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; } -} - -//---------------------------------------------------------------- - -//#define DEBUG - -extern "C" { - void *gfmalloc(size_t n) { -#ifdef DEBUG - static long cumul=0; - uint64 t = gf_timeofday(); -#endif - void *p = memalign(16,n); - long align = (long)p & 15; - if (align) fprintf(stderr,"malloc alignment = %ld mod 16\n",align); -#ifdef DEBUG - t = gf_timeofday() - t; cumul += t; post("malloc p=%p bytes=%ld time=%ld cumul=%ld",p,(long)n,(long)t,(long)cumul); -#endif - return p; - } - void gffree(void *p) { -#ifdef DEBUG - static long cumul=0; - uint64 t = gf_timeofday(); -#endif - free(p); -#ifdef DEBUG - t = gf_timeofday() - t; cumul += t; post("free p=%p time=%ld cumul=%ld",p, (long)t,(long)cumul); -#endif - } -}; - -//---------------------------------------------------------------- - -uint64 gf_timeofday () { - timeval t; - gettimeofday(&t,0); - return t.tv_sec*1000000+t.tv_usec; -} - -#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 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 swap64 (long n, uint64 *data) { - NTIMES({ - uint64 x = *data; - x = (x<<32) | (x>>32); - x = ((x&0x0000ffff0000ffffLL)<<16) | ((x>>16)&0x0000ffff0000ffffLL); - x = ((x&0x00ff00ff00ff00ffLL)<< 8) | ((x>> 8)&0x00ff00ff00ff00ffLL); - *data++ = x; - }) -} - -/* this could be faster (use asm) */ -void swap32 (long n, 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 (long n, uint16 *data) {NTIMES({ uint16 x = *data; *data++ = (x<<8) | (x>>8); })} - -/* **************************************************************** */ - -template <class T> -static void default_pack(BitPacking *self, long n, T *in, 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));}} - -template <class T> -static void default_unpack(BitPacking *self, long n, uint8 * in, 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, long n, T * in, 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, long n, T *in, uint8 *out) { - int32 * o32 = (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 = (uint8 *)o32; - NTIMES( out[2]=in[0]; out[1]=in[1]; out[0]=in[2]; out+=3; in+=3; ) -} - -template <class T> -static void unpack3_888(BitPacking *self, long n, uint8 *in, T *out) { - NTIMES( out[2]=in[0]; out[1]=in[1]; out[0]=in[2]; out+=3; in+=3; ) -} - -/* -template <> -static void pack3_888(BitPacking *self, long n, uint8 * in, uint8 * out) { - uint32 * o32 = uint32 *((uint32 *)out.p,n*3/4); - uint32 * i32 = 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 = (uint8 *)o32; - in = (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, long n, T * in, uint8 * out) { - int32 * o32 = (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, long n, T * in, uint8 * out) { -/* NTIMES( out[2]=in[0]; out[1]=in[1]; out[0]=in[2]; out+=4; in+=4; ) */ - int32 * i32 = (int32 *)in; - int32 * o32 = (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}, - {unpack3_888, unpack3_888, unpack3_888}, -}; - -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[1]), - 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:; -#if 0 - ::post("Bitpacking: endian=%d bytes=%d size=%d packeri=%d", - endian, bytes, size, packeri); - ::post(" packer=0x%08x unpacker=0x%08x",this->packer,this->unpacker); - ::post(" mask=[0x%08x,0x%08x,0x%08x,0x%08x]",mask[0],mask[1],mask[2],mask[3]); -#endif -} - -bool BitPacking::is_le() { - return endian==1 || (endian ^ ::is_le())==3; -} - -template <class T> -void BitPacking::pack(long n, T * in, uint8 * out) { - switch (NumberTypeE_type_of(in)) { - case uint8_e: packer->as_uint8(this,n,(uint8 *)in,out); break; - case int16_e: packer->as_int16(this,n,(int16 *)in,out); break; - case int32_e: packer->as_int32(this,n,(int32 *)in,out); break; - default: RAISE("argh"); - } -} - -template <class T> -void BitPacking::unpack(long n, uint8 * in, T * out) { - switch (NumberTypeE_type_of(out)) { - case uint8_e: unpacker->as_uint8(this,n,in,(uint8 *)out); break; - case int16_e: unpacker->as_int16(this,n,in,(int16 *)out); break; - case int32_e: unpacker->as_int32(this,n,in,(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,(S *)0,(uint8 *)0); \ - ((BitPacking*)0)->unpack(0,(uint8 *)0,(S *)0); -EACH_NUMBER_TYPE(FOO) -#undef FOO -} - -std::vector<string> gf_data_path; -string gf_find_file (string x) { - if (strchr(x.data(),'/')) return x; - int n = gf_data_path.size(); - struct stat dummy; - for (int i=0; i<n; i++) { - string s = gf_data_path[i]+"/"+x; - if (lstat(s.data(),&dummy)==0) return s; - } - return x; -} - -/* **************************************************************** */ - -#undef pd_class -#define pd_class(x) (*(t_pd *)x) -#define pd_classname(x) (fclasses_pd[pd_class(x)]->name.data()) - -static FMethod funcall_lookup (FClass *fclass, const char *sel) { - int n = fclass->methodsn; - for (int i=0; i<n; i++) if (strcmp(fclass->methods[i].selector,sel)==0) return fclass->methods[i].method; - if (fclass->super) return funcall_lookup(fclass->super,sel); - return 0; -} -static FMethod funcall_lookup (BFObject *bself, const char *sel) { - return funcall_lookup(fclasses_pd[pd_class(bself)],sel); -} - -void call_super(int argc, t_atom *argv) {/* unimplemented */} - -//**************************************************************** -// BFObject - -struct BFProxy : t_object { - BFObject *parent; - t_inlet *inlet; - int id; -}; - -static t_class *BFProxy_class; - -static void BFObject_anything (BFObject *bself, int winlet, t_symbol *selector, int ac, t_atom2 *at) { - try { - t_atom2 argv[ac+1]; - for (int i=0; i<ac; i++) argv[i+1] = at[i]; - int argc = handle_braces(ac,argv+1); - SETFLOAT(argv+0,winlet); - char buf[256]; - sprintf(buf,"_n_%s",selector->s_name); - FMethod m; - m = funcall_lookup(bself,buf); - if (m) {m(bself->self,argc+1,argv); return;} - sprintf(buf,"_%d_%s",winlet,selector->s_name); - m = funcall_lookup(bself,buf); - if (m) {m(bself->self,argc,argv+1); return;} - m = funcall_lookup(bself,"anything"); - if (m) {SETSYMBOL(argv+0,gensym(buf)); m(bself->self,argc+1,argv); return;} - pd_error((t_pd *)bself, "method '%s' not found for inlet %d in class '%s'",selector->s_name,winlet,pd_classname(bself)); - } catch (Barf &oozy) {pd_error(bself,"%s",oozy.text);} -} -static void BFObject_anything0 (BFObject *self, t_symbol *s, int argc, t_atom2 *argv) { - BFObject_anything(self,0,s,argc,argv); -} -static void BFProxy_anything (BFProxy *self, t_symbol *s, int argc, t_atom2 *argv) { - BFObject_anything(self->parent,self->id,s,argc,argv); -} - -static void *BFObject_new (t_symbol *classsym, int ac, t_atom *at) { - string name = string(classsym->s_name); - if (fclasses.find(name)==fclasses.end()) {post("GF: class not found: '%s'",classsym->s_name); return 0;} - t_class *qlass = fclasses[name]->bfclass; - BFObject *bself = (BFObject *)pd_new(qlass); - try { - int argc = ac; - t_atom argv[argc]; - for (int i=0; i<argc; i++) argv[i] = at[i]; - argc = handle_braces(argc,argv); - //pd_post(classsym->s_name,argc,argv); -#ifdef HAVE_GEM - CPPExtern::m_holder = (t_object *)bself; -#ifdef HAVE_HOLDNAME - CPPExtern::m_holdname = const_cast<char *>("keep_gem_happy"); -#endif -#endif - int j; - for (j=0; j<argc; j++) if (argv[j].a_type==A_COMMA) break; - - bself->self = 0; - bself->mom = (t_canvas *)canvas_getcurrent(); - bself->ninlets = 1; - bself->noutlets = 0; - bself->inlets = new BFProxy*[1]; - bself->outlets = new t_outlet*[1]; - bself->inlets[0] = 0; // inlet 0 of this table is not in use - bself->ninlets_set( fclasses[classsym->s_name]->ninlets ,false); - bself->noutlets_set(fclasses[classsym->s_name]->noutlets,false); - t_allocator alloc = fclasses[string(classsym->s_name)]->allocator; - bself->self = alloc(bself,0,j,(t_atom2 *)argv); -#ifdef HAVE_GEM - CPPExtern::m_holder = 0; -#ifdef HAVE_HOLDNAME - CPPExtern::m_holdname=0; -#endif -#endif - - while (j<argc) { - j++; - int k=j; - for (; j<argc; j++) if (argv[j].a_type==A_COMMA) break; - if (argv[k].a_type==A_SYMBOL) pd_typedmess((t_pd *)bself,argv[k].a_symbol,j-k-1,argv+k+1); - } - return bself; - } catch (Barf &oozy) {pd_error(bself,"%s",oozy.text); return 0;} -} - -static void BFObject_delete (BFObject *bself) { - try {delete bself->self;} catch (Barf &oozy) {pd_error(bself,"%s",oozy.text);} - bself->ninlets_set(1,false); - delete[] bself->inlets; - delete[] bself->outlets; -} - -//**************************************************************** - -// from pd/src/g_canvas.c -struct _canvasenvironment { - t_symbol *ce_dir; /* directory patch lives in */ - int ce_argc; /* number of "$" arguments */ - t_atom *ce_argv; /* array of "$" arguments */ - int ce_dollarzero; /* value of "$0" */ -}; - -#include "bundled/g_canvas.h" - -static void BFObject_undrawio (BFObject *bself) { -#ifndef HAVE_DESIREDATA - if (!bself->mom || !glist_isvisible(bself->mom)) return; - t_rtext *rt = glist_findrtext(bself->mom,bself); - if (!rt) return; - glist_eraseiofor(bself->mom,bself,rtext_gettag(rt)); -#endif -} - -static void BFObject_redraw (BFObject *bself) { -#ifndef HAVE_DESIREDATA - if (!bself->mom || !glist_isvisible(bself->mom)) return; - t_rtext *rt = glist_findrtext(bself->mom,bself); - if (!rt) return; - gobj_vis((t_gobj *)bself,bself->mom,0); - gobj_vis((t_gobj *)bself,bself->mom,1); - canvas_fixlinesfor(bself->mom,(t_text *)bself); -#endif -} - -/* warning: deleting inlets that are connected will cause pd to crash */ -void BFObject::ninlets_set (int n, bool draw) { - if (!te_binbuf) draw=false; - if (n<1) RAISE("ninlets_set: n=%d must be at least 1",n); - if (draw) BFObject_undrawio(this); - if (ninlets<n) { - BFProxy **noo = new BFProxy*[n]; - memcpy(noo,inlets,ninlets*sizeof(BFProxy*)); - delete[] inlets; - inlets = noo; - while (ninlets<n) { - BFProxy *p = inlets[ninlets] = (BFProxy *)pd_new(BFProxy_class); - p->parent = this; - p->id = ninlets; - p->inlet = inlet_new(this, &p->ob_pd, 0,0); - ninlets++; - } - } else { - while (ninlets>n) { - ninlets--; - inlet_free(inlets[ninlets]->inlet); - pd_free((t_pd *)inlets[ninlets]); - } - } - if (draw) BFObject_redraw(this); -} -/* warning: deleting outlets that are connected will cause pd to crash */ -void BFObject::noutlets_set (int n, bool draw) { - if (!te_binbuf) draw=false; - if (n<0) RAISE("noutlets_set: n=%d must be at least 0",n); - if (draw) BFObject_undrawio(this); - if (noutlets<n) { - t_outlet **noo = new t_outlet*[n>0?n:1]; - memcpy(noo,outlets,noutlets*sizeof(t_outlet*)); - delete[] outlets; - outlets = noo; - while (noutlets<n) outlets[noutlets++] = outlet_new(this,&s_anything); - } else { - while (noutlets>n) outlet_free(outlets[--noutlets]); - } - if (draw) BFObject_redraw(this); -} - -void add_creator2(FClass *fclass, const char *name) { - fclasses[string(name)] = fclass; - class_addcreator((t_newmethod)BFObject_new,gensym((char *)name),A_GIMME,0); -} - -//**************************************************************** - -struct t_namelist; -extern t_namelist *sys_searchpath, *sys_helppath; -extern "C" void namelist_append_files(t_namelist *, char *); -static void add_to_path(char *dir) { - char bof[1024]; - sprintf(bof,"%s/abstractions",dir); namelist_append_files(sys_searchpath,bof); - sprintf(bof,"%s/deprecated",dir); namelist_append_files(sys_searchpath,bof); - sprintf(bof,"%s/doc/flow_classes",dir); namelist_append_files(sys_helppath, bof); -} - -//---------------------------------------------------------------- - -void fclass_install(FClass *fclass, FClass *super, size_t bytes) { - fclass->super = super; - if (fclass->startup) fclass->startup(fclass); - fclass->bytes = bytes; -} - -void install2(FClass *fclass, const char *name, int inlets, int outlets) { - fclass->ninlets = inlets; - fclass->noutlets = outlets; - fclass->name = string(name); - fclass->bfclass = class_new(gensym((char *)name), (t_newmethod)BFObject_new, (t_method)BFObject_delete, - sizeof(BFObject), CLASS_DEFAULT, A_GIMME,0); - fclasses[string(name)] = fclass; - fclasses_pd[fclass->bfclass] = fclass; - class_addanything(fclass->bfclass,(t_method)BFObject_anything0); -} - -/* This code handles nested lists because PureData (all versions including 0.40) doesn't do it */ -int handle_braces(int ac, t_atom *av) { - int stack[16]; - int stackn=0; - int j=0; - t_binbuf *buf = binbuf_new(); - for (int i=0; i<ac; ) { - int close=0; - if (av[i].a_type==A_SYMBOL) { - const char *s = av[i].a_symbol->s_name; - while (*s=='(') { - if (stackn==16) {binbuf_free(buf); RAISE("too many nested lists (>16)");} - stack[stackn++]=j; - s++; - } - const char *se = s+strlen(s); - while (se>s && se[-1]==')') {se--; close++;} - if (s!=se) { - binbuf_text(buf,(char *)s,se-s); - if ((binbuf_getnatom(buf)==1 && binbuf_getvec(buf)[0].a_type==A_FLOAT) || binbuf_getvec(buf)[0].a_type==A_COMMA) { - av[j++] = binbuf_getvec(buf)[0]; - } else { - char ss[MAXPDSTRING]; - int n = min(se-s,MAXPDSTRING-1); - sprintf(ss,"%.*s",n,s); - SETSYMBOL(av+j,gensym(ss)); j++; // av[j++] = gensym(s); - } - } - } else av[j++]=av[i]; - i++; - while (close--) { - if (!stackn) {binbuf_free(buf); RAISE("close-paren without open-paren",av[i]);} - t_binbuf *a2 = binbuf_new(); /* leak because there is no deallocation mechanism whatsoever */ - int j2 = stack[--stackn]; - binbuf_add(a2,j-j2,av+j2); - j=j2; - SETLIST(av+j,a2); - j++; - } - } - binbuf_free(buf); - if (stackn) RAISE("too many open-paren (%d)",stackn); - return j; -} - -// foreach macro from desiredata: -#define foreach(ITER,COLL) for(typeof(COLL.begin()) ITER = COLL.begin(); ITER != (COLL).end(); ITER++) - -\class FObject -\def 0 get (t_symbol *s=0) { - FClass *fc = fclasses_pd[pd_class(bself)]; - if (!s) { - t_atom a[1]; - foreach(attr,fc->attrs) { - SETSYMBOL(a,gensym((char *)attr->second->name.data())); - pd_typedmess((t_pd *)bself,gensym("get"),1,a); - } - } else { - //t_atom a[1]; - //outlet_anything(bself->outlets[bself->noutlets-1],s,1,a); - FMethod m = funcall_lookup(bself,"___get"); - t_atom2 a[1]; - SETSYMBOL(a,s); - if (m) m(this,1,a); - } -} -\def 0 help () { - FClass *fc = fclasses_pd[pd_class(bself)]; - post("attributes ("); - foreach(attr,fc->attrs) post(" %s %s;",attr->second->type.data(),attr->second->name.data()); - post(")"); - post("methods ("); - for (int i=0; i<fc->methodsn; i++) post(" %s",fc->methods[i]); - post(")"); -} -\classinfo {} -\end class - -void startup_number(); -void startup_flow_objects(); -void startup_format(); -STARTUP_LIST(void) - -void blargh () { -#ifdef MACOSX - fprintf(stderr,"unhandled exception\n"); -#else - void *array[25]; - int nSize = backtrace(array, 25); - char **symbols = backtrace_symbols(array, nSize); - for (int i=0; i<nSize; i++) fprintf(stderr,"%d: %s\n",i,symbols[i]); - free(symbols); -#endif -} - -// those are not really leaks but deleting them make them disappear from valgrind -// however, there's still a problem doing it, so, we won't do it. -static void gridflow_unsetup () { -/* - foreach(iter,fclasses_pd) { - FClass *fc = iter->second; - foreach(iter2,fc->attrs) delete iter2->second; - fc->FClass::~FClass(); - } -*/ -} - -// note: contrary to what m_pd.h says, pd_getfilename() and pd_getdirname() -// don't exist; also, canvas_getcurrentdir() isn't available during setup -// (segfaults), in addition to libraries not being canvases ;-) -// AND ALSO, CONTRARY TO WHAT m_pd.h SAYS, open_via_path()'s args are reversed!!! -extern "C" void gridflow_setup () { - post("GridFlow " GF_VERSION ", Copyright (c) 2001-2008 Mathieu Bouchard"); - post("GridFlow was compiled on "__DATE__", "__TIME__); - //std::set_terminate(__gnu_cxx::__verbose_terminate_handler); - std::set_terminate(blargh); - try { - char *dirname = new char[MAXPDSTRING]; - char *dirresult = new char[MAXPDSTRING]; - char *nameresult; - if (getcwd(dirname,MAXPDSTRING)<0) {post("AAAARRRRGGGGHHHH!"); exit(69);} - int fd=open_via_path(dirname,"gridflow/gridflow",PDSUF,dirresult,&nameresult,MAXPDSTRING,1); - if (fd<0) fd=open_via_path(dirname, "gridflow",PDSUF,dirresult,&nameresult,MAXPDSTRING,1); - if (fd>=0) close(fd); else post("%s was not found via the -path!","gridflow"PDSUF); - /* nameresult is only a pointer in dirresult space so don't delete[] it. */ - add_to_path(dirresult); - BFProxy_class = class_new(gensym("gf.proxy"),0,0,sizeof(BFProxy),CLASS_PD|CLASS_NOINLET, A_NULL); - class_addanything(BFProxy_class,BFProxy_anything); - gf_data_path.push_back(string(dirresult)+"/images"); - srandom(rdtsc()); -#define FOO(_sym_,_name_) bsym._sym_ = gensym(_name_); -BUILTIN_SYMBOLS(FOO) -#undef FOO - startup_number(); - \startall - startup_flow_objects(); - startup_format(); - STARTUP_LIST() - //sys_gui("bind . <Motion> {puts %W}\n"); - sys_vgui(".mbar.help add command -label \"GridFlow index\" -command {pd pd open index.pd %s/doc \\;}\n",dirresult); - delete[] dirresult; - delete[] dirname; - } catch (Barf &oozy) {post("gridflow_setup error: %s",oozy.text);} - signal(SIGSEGV,SIG_DFL); - signal(SIGABRT,SIG_DFL); - signal(SIGBUS, SIG_DFL); - atexit(gridflow_unsetup); -} diff --git a/externals/gridflow/gridflow.h b/externals/gridflow/gridflow.h deleted file mode 100644 index 85eeefd2..00000000 --- a/externals/gridflow/gridflow.h +++ /dev/null @@ -1,926 +0,0 @@ -/* - $Id$ - - GridFlow - Copyright (c) 2001-2007 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 __GRIDFLOW_H -#define __GRIDFLOW_H - -#define GF_VERSION "0.9.4" - -#include "m_pd.h" -#include "config.h" -#include <vector> -#include <string> -#include <sstream> -#include <map> -#include <stdlib.h> -#include <string.h> -#include <signal.h> -#include <stdarg.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 - -#ifndef a_float -#define a_float a_w.w_float -#define a_symbol a_w.w_symbol -#define a_gpointer a_w.w_gpointer -#endif - -#define gensym(s) gensym(const_cast<char *>(s)) -#define sys_vgui(FMT,ARGS...) sys_vgui(const_cast<char *>(FMT),ARGS) -#define sys_gui(s) sys_gui(const_cast<char *>(s)); - -#ifndef DESIREDATA -#define A_LIST t_atomtype(13) /* (t_binbuf *) */ -#endif -// the use of w_gpointer here is fake, just because there's no suitable member in the union -static inline void SETLIST(t_atom *a, t_binbuf *b) {a->a_type = A_LIST; a->a_gpointer = (t_gpointer *)b;} -static inline void SETNULL(t_atom *a) {a->a_type = A_NULL; a->a_gpointer = 0;} - -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, -// that is, the same as around any other whole number. -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) {return (a/b)-((a<0)&&!!(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) {T r=1; for(;;) {if (b&1) r*=a; b>>=1; if (!b) return r; a*=a;}} -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> static inline T clip(T a, T lower, T upper) {return a<lower?lower:a>upper?upper:a;} -//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..63) 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..63) 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];} - -static inline uint64 rdtsc() -#if defined(HAVE_PENTIUM) -{uint64 x; __asm__ volatile (".byte 0x0f, 0x31":"=A"(x)); return x;} -#else -{return 0;} -#endif - -#ifdef HAVE_LITE -#define EACH_INT_TYPE(MACRO) MACRO(uint8) MACRO(int16) MACRO(int32) -#define EACH_FLOAT_TYPE(MACRO) MACRO(float32) -#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) - -// 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; } - -struct Barf { - char *text; - Barf(const char *s, ...); - Barf(const char *file, int line, const char *func, const char *s, ...); - ~Barf() {free(text);} -}; - -#include <stdio.h> -extern "C" void *gfmalloc(size_t n); -extern "C" void gffree(void *p); -#if __GNUC__<4 -#define ALLOCPREFIX static inline -#else -#define ALLOCPREFIX inline -#endif -#include "base/new.h" -ALLOCPREFIX void *operator new (size_t n) throw (std::bad_alloc) {return gfmalloc(n);} -ALLOCPREFIX void *operator new[] (size_t n) throw (std::bad_alloc) {return gfmalloc(n);} -ALLOCPREFIX void *operator new (size_t n, const std::nothrow_t&) throw () {return gfmalloc(n);} -ALLOCPREFIX void *operator new[] (size_t n, const std::nothrow_t&) throw () {return gfmalloc(n);} -ALLOCPREFIX void operator delete (void*p) throw() {gffree(p);} -ALLOCPREFIX void operator delete[](void*p) throw() {gffree(p);} -ALLOCPREFIX void operator delete (void*p, const std::nothrow_t&) throw() {gffree(p);} -ALLOCPREFIX void operator delete[](void*p, const std::nothrow_t&) throw() {gffree(p);} - -#define NEWBUF(T,N) (new T[N]) -#define DELBUF(A) (delete[] A) - -#ifdef __WIN32__ -#define INT winINT -#define random rand -#undef send -#undef close -#define sigjmp_buf jmp_buf -#define siglongjmp longjmp -#endif - -//#define _L_ post("%s:%d in %s",__FILE__,__LINE__,__PRETTY_FUNCTION__); -#define _L_ fprintf(stderr,"%s:%d in %s\n",__FILE__,__LINE__,__PRETTY_FUNCTION__); -#define RAISE(args...) throw Barf(__FILE__,__LINE__,__PRETTY_FUNCTION__,args) -#define VA int argc, t_atom2 *argv -// returns the size of a statically defined array -#define COUNT(_array_) ((int)(sizeof(_array_) / sizeof((_array_)[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]); \ - post("%s",foo);} - -//**************************************************************** - -struct FObject; -struct t_atom2; -typedef void (*FMethod)(FObject *, int, t_atom2 *); -typedef std::string string; - -#define BUILTIN_SYMBOLS(MACRO) \ - MACRO(_grid,"grid") MACRO(_bang,"bang") MACRO(_float,"float") \ - MACRO(_list,"list") MACRO(_sharp,"#") \ - MACRO(_in,"in") MACRO(_out,"out") - -extern struct BuiltinSymbols { -#define FOO(_sym_,_str_) t_symbol *_sym_; -BUILTIN_SYMBOLS(FOO) -#undef FOO -} bsym; - -struct Numop; -struct Pointer; -#define INT(x) convert(x,(int32*)0) -#define TO(T,x) convert(x,(T*)0) - -// trick to be able to define methods in t_atom -struct t_atom2 : t_atom { - bool operator == (t_symbol *b) {return this->a_type==A_SYMBOL && this->a_symbol==b;} - bool operator != (t_symbol *b) {return !(*this==b);} - operator float32 () const { - if (a_type!=A_FLOAT) RAISE("expected float"); - return a_float;} - operator bool () const {float f = round(float32(*this)); - if (f<0 || f>=2) RAISE("value %f is out of range",f); - return (bool)f;} - operator uint8 () const {float f = round(float32(*this)); - if (f<0 || f>=0x100) RAISE("value %f is out of range",f); - return (uint8)f;} - operator int16 () const {float f = round(float32(*this)); - if (f<-0x8000 || f>=0x8000) RAISE("value %f is out of range",f); - return (int16)f;} - operator uint16 () const {float f = round(float32(*this)); - if (f<0 || f>=0x10000) RAISE("value %f is out of range",f); - return (uint16)f;} - operator int32 () const {float f = round(float32(*this)); - if (f<-0x80000000LL || f>=0x80000000LL) RAISE("value %f is out of range",f); - return (int32)f;} - operator uint32 () const {float f = round(float32(*this)); - if (f<0 || f>=0x100000000LL) RAISE("value %f is out of range",f); - return (uint32)f;} - operator long () const { - return sizeof(long)==sizeof(int32) ? (int32)*this : (int64)*this;} - operator uint64 () const { - if (a_type!=A_FLOAT) RAISE("expected float"); - return (uint64)round(a_float);} - operator int64 () const { - if (a_type!=A_FLOAT) RAISE("expected float"); - return (int64)round(a_float);} - operator float64 () const { - if (a_type!=A_FLOAT) RAISE("expected float"); - return a_float;} - operator t_symbol * () const { - if (a_type!=A_SYMBOL) RAISE("expected symbol"); - return a_symbol;} - operator std::string () const { - if (a_type!=A_SYMBOL) RAISE("expected symbol"); - return std::string(a_symbol->s_name);} - operator void * () const { - if (a_type!=A_POINTER) RAISE("expected pointer"); - return a_gpointer;} - operator t_binbuf * () const { - if (a_type!=A_LIST) RAISE("expected nested list"); - return (t_binbuf *)a_gpointer;} -}; - -template <class T> T convert(const t_atom &x, T *foo) {const t_atom2 *xx = (const t_atom2 *)&x; return (T)*xx;} - -//**************************************************************** - -//template <class T> class P : 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;} - operator T *() {return p;} -//#undef INCR -//#undef DECR -}; - -void gfmemcopy(uint8 *out, const uint8 *in, long n); -template <class T> inline void COPY(T *dest, T *src, long n) { - gfmemcopy((uint8*)dest,(const uint8*)src,n*sizeof(T)); -} -template <class T> inline void CLEAR(T *dest, long n) { - memset(dest,0,n*sizeof(T)); -} -template <class T> static void memswap (T *a, T *b, long n) { - T c[n]; COPY(c,a,n); COPY(a,b,n); COPY(b,c,n); -} - -//**************************************************************** - -struct CObject { - int32 refcount; - CObject() : refcount(0) {} - virtual ~CObject() {} - virtual void changed (t_symbol *s=0) {} -}; - -// you shouldn't use MethodDecl directly (used by source_filter.rb) -struct MethodDecl {const char *selector; FMethod method;}; - -#undef check - -//**************************************************************** -// a Dim is a list of dimensions that describe the shape of a grid -typedef int32 Card; /* should be switched to long int soon */ -struct Dim : CObject { - static const Card MAX_DIM=16; // maximum number of dimensions in a grid - Card n; - Card v[MAX_DIM]; // real stuff - void check(); // test invariants - Dim(Card n, Card *v){this->n=n; COPY(this->v,v,n); check();} - Dim() {n=0; check();} - Dim(Card a) {n=1;v[0]=a; check();} - Dim(Card a,Card b) {n=2;v[0]=a;v[1]=b; check();} - Dim(Card a,Card b,Card c){n=3;v[0]=a;v[1]=b;v[2]=c;check();} - Dim(Dim *a, Dim *b, Dim *c=0) { - n=a->n+b->n; if(c) n+=c->n; - if (n>Dim::MAX_DIM) RAISE("too many dims"); - COPY(v ,a->v,a->n); - COPY(v+a->n,b->v,b->n); - if(c) COPY(v+a->n+b->n,c->v,c->n); - } - Card count() {return n;} - Card get(Card i) {return v[i];} -/* Dim *range(Card i, Card j) {return new Dim(...);} */ - Card prod(Card start=0, Card end=-1) { - if (end<0) end+=n; - Card tot=1; - for (Card 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 (Card i=0; i<n; i++) if (v[i]!=o->v[i]) return false; - return true; - } -}; - -//**************************************************************** -//NumberTypeE is a very small int identifying the type of the (smallest) elements of a grid - -#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)) - -#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(int16,16,0, "i16,s") \ - MACRO(int32,32,0, "i32,i") \ - MACRO(int64,64,NT_NOTLITE, "i64,l") \ - MACRO(float32,32,NT_FLOAT, "f32,f") \ - MACRO(float64,64,NT_NOTLITE|NT_FLOAT, "f64,d") - -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 - -struct NumberType : CObject { - 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_) {} -}; - -NumberTypeE NumberTypeE_find (string sym); -NumberTypeE NumberTypeE_find (const t_atom &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; NONLITE(case float64_e: C(float64) break;) \ - default: E; RAISE("type '%s' not available here",number_type_table[T].name);} -#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].name);} - -//**************************************************************** -//BitPacking objects encapsulate optimised loops of bitfield conversion (mostly for I/O) -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, long n, S *in, uint8 *out); -EACH_INT_TYPE(FOO) -#undef FOO -}; -struct Unpacker { -#define FOO(S) void (*as_##S)(BitPacking *self, long n, uint8 *in, S *out); -EACH_INT_TYPE(FOO) -#undef FOO -}; - -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); -// main entrances to Packers/Unpackers - template <class T> void pack(long n, T *in, uint8 *out); - template <class T> void unpack(long n, uint8 *in, T *out); -}; - -int high_bit(uint32 n); -int low_bit(uint32 n); -void swap16(long n, uint16 *data); -void swap32(long n, uint32 *data); -void swap64(long n, uint64 *data); -inline void swap_endian(long n, uint8 *data) {} -inline void swap_endian(long n, int16 *data) {swap16(n,(uint16 *)data);} -inline void swap_endian(long n, int32 *data) {swap32(n,(uint32 *)data);} -inline void swap_endian(long n, int64 *data) {swap64(n,(uint64 *)data);} -inline void swap_endian(long n, float32 *data) {swap32(n,(uint32 *)data);} -inline void swap_endian(long n, float64 *data) {swap64(n,(uint64 *)data);} - -//**************************************************************** -// Numop objects encapsulate optimised loops of simple operations - -enum LeftRight { at_left, at_right }; - -template <class T> -struct NumopOn { - // Function Vectorisations - typedef void (*Map )( long n, T *as, T b ); Map map; - typedef void (*Zip )( long n, T *as, T *bs); Zip zip; - typedef void (*Fold)(long an, long n, T *as, T *bs); Fold fold; - typedef void (*Scan)(long an, long n, T *as, T *bs); Scan 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}; ... - void (*neutral)(T *,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, - void (*neu)(T *,LeftRight), AlgebraicCheck n, AlgebraicCheck a) : - map(m), zip(z), fold(f), scan(s), neutral(neu), is_neutral(n), is_absorbent(a) {} - NumopOn() : map(0),zip(0),fold(0),scan(0),neutral(0),is_neutral(0),is_absorbent(0) {} - NumopOn(const NumopOn &z) { - map=z.map; zip=z.zip; fold=z.fold; scan=z.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) - -struct Numop { - const char *name; - t_symbol *sym; - int flags; - int size; // numop=1; vecop>1 -#define FOO(T) NumopOn<T> on_##T; \ - NumopOn<T> *on(T &foo) { \ - if (!on_##T.map) RAISE("operator %s does not support type "#T,name); \ - return &on_##T;} -EACH_NUMBER_TYPE(FOO) -#undef FOO - template <class T> inline void map(long n, T *as, T b) { - on(*as)->map(n,(T *)as,b);} - template <class T> inline void zip(long n, T *as, T *bs) { - on(*as)->zip(n,(T *)as,(T *)bs);} - template <class T> inline void fold(long an, long n, T *as, T *bs) { - typename NumopOn<T>::Fold f = on(*as)->fold; - if (!f) RAISE("operator %s does not support fold",name); - f(an,n,(T *)as,(T *)bs);} - template <class T> inline void scan(long an, long n, T *as, T *bs) { - typename NumopOn<T>::Scan f = on(*as)->scan; - if (!f) RAISE("operator %s does not support scan",name); - f(an,n,(T *)as,(T *)bs);} - - Numop(const char *name_, -#define FOO(T) NumopOn<T> op_##T, -EACH_NUMBER_TYPE(FOO) -#undef FOO - int flags_, int size_) : name(name_), flags(flags_), size(size_) { -#define FOO(T) on_##T = op_##T; -EACH_NUMBER_TYPE(FOO) -#undef FOO - sym=gensym((char *)name); - } -}; - -extern NumberType number_type_table[]; -extern std::map<string,NumberType *> number_type_dict; -extern std::map<string,Numop *> op_dict; -extern std::map<string,Numop *> vop_dict; - -static inline NumberTypeE convert(const t_atom &x, NumberTypeE *bogus) { - if (x.a_type!=A_SYMBOL) RAISE("expected number-type"); return NumberTypeE_find(string(x.a_symbol->s_name));} - - -static Numop *convert(const t_atom &x, Numop **bogus) { - if (x.a_type!=A_SYMBOL) RAISE("expected numop (as symbol)"); - string k = string(x.a_symbol->s_name); - if (op_dict.find(k)==op_dict.end()) { - if (vop_dict.find(k)==vop_dict.end()) RAISE("expected two-input-operator, not '%s'", k.data()); - return vop_dict[k]; - } else return op_dict[k]; -} - -// **************************************************************** -struct Grid : CObject { - P<Dim> dim; - NumberTypeE nt; - void *data; - int state; /* 0:borrowing 1:owning -1:expired(TODO) */ - Grid(P<Dim> dim, NumberTypeE nt, bool clear=false) { - state=1; - if (!dim) RAISE("hell"); - init(dim,nt); - if (clear) {long size = bytes(); CLEAR((char *)data,size);} - } - Grid(const t_atom &x) {state=1; init_from_atom(x);} - Grid(int n, t_atom *a, NumberTypeE nt_=int32_e) {state=1; init_from_list(n,a,nt_);} - template <class T> Grid(P<Dim> dim, T *data) { - state=0; this->dim=dim; - this->nt=NumberTypeE_type_of((T *)0); - this->data = data; - } - // parens are necessary to prevent overflow at 1/16th of the word size (256 megs) - long bytes() { return dim->prod()*(number_type_table[nt].size/8); } - P<Dim> to_dim () { return new Dim(dim->prod(),(int32 *)*this); } -#define FOO(T) operator T *() { return (T *)data; } -EACH_NUMBER_TYPE(FOO) -#undef FOO - Grid *dup () { /* always produce an owning grid even if from a borrowing grid */ - Grid *foo=new Grid(dim,nt); - memcpy(foo->data,data,bytes()); - return foo; - } - ~Grid() {if (state==1 && 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); - if (!data) RAISE("out of memory (?) trying to get %ld bytes",bytes()); - } - //fprintf(stderr,"rdata=%p data=%p align=%d\n",rdata,data,align); - } - void init_from_atom(const t_atom &x); - void init_from_list( int n, t_atom *a, NumberTypeE nt=int32_e); -}; -static inline Grid *convert (const t_atom &r, Grid **bogus) {return new Grid(r);} - -// 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( P<Grid> _p) : P<Grid>(), dc(0), next(0) {dc=_p.dc; p=_p.p; INCR;} - PtrGrid( Grid *_p) : P<Grid>(), dc(0), next(0) { - 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;} -}; -#undef INCR -#undef DECR - -static inline P<Dim> convert(const t_atom &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(const t_atom &x, PtrGrid *foo) {return PtrGrid(convert(x,(Grid **)0));} - -//**************************************************************** -// 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, long n, T *data) { \ - ((C*)(in->parent))->grin_##I(in,n,data); } \ - template <class T> void C::grin_##I (GridInlet *in, long n, 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((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(((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, long n, T *data); \ - void flow(GridInlet *in, long n, T *data) const {flow_##T(in,n,data);} -EACH_NUMBER_TYPE(FOO) -#undef FOO -} GridHandler; - -struct FObject; -struct GridInlet : CObject { - FObject *parent; - const GridHandler *gh; -private: - FObject *sender; -public: - P<Dim> dim; - NumberTypeE nt; - long dex; -private: - PtrGrid buf;// factor-chunk buffer - long bufi; // buffer index: how much of buf is filled -public: - int mode; // 0=ignore; 4=ro; 6=rw -// long allocfactor,allocmin,allocmax,allocn; -// uint8 *alloc; - - GridInlet(FObject *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(long factor); // obsolete - void set_chunk(long whichdim); - void set_mode(int mode_) { mode=mode_; } - int32 factor() {return buf?buf->dim->prod():1;} - void begin(int argc, t_atom2 *argv); - void finish(); /* i thought this should be private but maybe it shouldn't. */ - - // n=-1 is begin, and n=-2 is finish; GF-0.9 may have n=-3 meaning alloc (?). - template <class T> void flow(int mode, long n, T *data); - void from_list(VA, NumberTypeE nt=int32_e) {Grid t(argc,argv,nt); from_grid(&t);} - void from_atom(VA) {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); -}; - -//**************************************************************** -// for use by source_filter.rb ONLY (for \grin) -#ifndef HAVE_LITE -#define GRIN(TB,TS,TI,TL,TF,TD) {TB,TS,TI,TL,TF,TD} -#else -#define GRIN(TB,TS,TI,TL,TF,TD) {TB,TS,TI,TF} -#endif // HAVE_LITE -#define MESSAGE t_symbol *sel, int argc, t_atom2 *argv -#define MESSAGE2 sel,argc,argv -#define MESSAGE3 t_symbol *, int, t_atom2 * -struct AttrDecl { - string name; - string type; - AttrDecl(string name_, string type_) {name=name_; type=type_;} -}; -struct BFObject; -typedef FObject *(*t_allocator)(BFObject *,MESSAGE3); -struct FClass { - t_allocator allocator; // returns a new C++ object - void (*startup)(FClass *); - const char *cname; // C++ name (not PD name) - int methodsn; MethodDecl *methods; - FClass *super; - int ninlets; - int noutlets; - t_class *bfclass; - string name; - size_t bytes; - std::map<string,AttrDecl *> attrs; -}; - -void fclass_install(FClass *fc, FClass *super, size_t bytes); - -//**************************************************************** -// GridOutlet represents a grid-aware outlet -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 long MIN_PACKET_SIZE = 1<<8; - static const long MAX_PACKET_SIZE = 1<<12; -// those are set only once - FObject *parent; // not a P<> because of circular refs - P<Dim> dim; // dimensions of the grid being sent - NumberTypeE nt; - std::vector<GridInlet *> inlets; // which inlets are we connected to -// those are updated during transmission - long dex; // how many numbers were already sent in this connection - - GridOutlet(FObject *parent_, int woutlet, P<Dim> dim_, NumberTypeE nt_=int32_e); - ~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(long n, 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(long n, T *data); - - // third way to send (upcoming, in GF-1.1.??) is called "ask". - template <class T> void ask(int &n, T *&data, long factor, long min, long max); - -private: - bool frozen; // is the "begin" phase finished? - PtrGrid buf; // temporary buffer - long bufi; // number of bytes used in the buffer - void begin(int woutlet, P<Dim> dim, NumberTypeE nt=int32_e); - template <class T> void send_direct(long n, T *data); - void finish() { - flush(); - for (uint32 i=0; i<inlets.size(); i++) inlets[i]->finish(); - dim=0; - } -}; - -//**************************************************************** - -#define CHECK_GRIN(class,i) \ - if (in.size()<=i) in.resize(i+1); \ - if (!in[i]) in[i]=new GridInlet((FObject *)this,&class##_grid_##i##_hand); - -#define CHECK_ALIGN16(d,nt) \ - {int bytes = 16; \ - int align = ((ulong)(void*)d)%bytes; \ - if (align) {_L_;post("%s(%s): Alignment Warning: %s=%p is not %d-aligned: %d", \ - ARGS(this), __PRETTY_FUNCTION__,#d,(void*)d,bytes,align);}} - -struct BFProxy; -struct BFObject : t_object { - void *gemself; // this absolutely needs to be the first field, to make GEM happy - FObject *self; - int ninlets,noutlets; // per object settings (not class) - BFProxy **inlets; // direct access to inlets (not linked lists) - t_outlet **outlets; // direct access to outlets (not linked lists) - t_canvas *mom; - void ninlets_set(int n, bool draw=true); - void noutlets_set(int n, bool draw=true); -}; - -// represents objects that have inlets/outlets -\class FObject : CObject { - BFObject *bself; // point to PD peer - std::vector<P<GridInlet> > in; - P<GridOutlet> out; - FObject(BFObject *bself, MESSAGE) : bself(bself) {bself->self = this;} - template <class T> void send_out(int outlet, int argc, T *argv) { - t_atom foo[argc]; - for (int i=0; i<argc; i++) SETFLOAT(&foo[i],argv[i]); - outlet_list(bself->outlets[outlet],&s_list,argc,foo); - } - 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 0 get (t_symbol *s=0); - \decl 0 help (); -}; -\end class - -uint64 gf_timeofday(); -extern "C" void Init_gridflow (); -extern Numop *op_add,*op_sub,*op_mul,*op_div,*op_mod,*op_shl,*op_and,*op_put; - -#define ARGS(OBJ) "(some object...)" -#define NOTEMPTY(_a_) if (!(_a_)) RAISE("in [%s], '%s' is empty",ARGS(this), #_a_); -#define SAME_TYPE(_a_,_b_) \ - if ((_a_)->nt != (_b_)->nt) RAISE("%s: same type please (%s has %s; %s has %s)", ARGS(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]);}}} - -void suffixes_are (const char *name, const char *suffixes); -#define install(name,inlets,outlets) install2(fclass,name,inlets,outlets) -void install2(FClass *fclass, const char *name, int inlets, int outlets); -#define add_creator(name) add_creator2(fclass,name) -void add_creator2(FClass *fclass, const char *name); -#define install_format(name,mode,suffixes) do {install(name,1,1); suffixes_are(name,suffixes);} while(0) -void call_super(int argc, t_atom *argv); -#define SUPER call_super(argc,argv); - -\class Format : FObject { - int mode; - int fd; - FILE *f; - NumberTypeE cast; - long frame; - Format(BFObject *, MESSAGE); - \decl 0 open (t_symbol *mode, string filename); - \decl 0 close (); - \decl 0 cast (NumberTypeE nt); - \decl 0 seek(int frame); - \decl 0 rewind (); - ~Format (); -}; - -extern std::vector<string> gf_data_path; -string gf_find_file (string x); -void pd_oprintf (std::ostream &o, const char *s, int argc, t_atom *argv); -void pd_oprint (std::ostream &o, int argc, t_atom *argv); -void pd_post (const char *s, int argc, t_atom *argv); - -inline void set_atom (t_atom *a, uint8 v) {SETFLOAT(a,(float)v);} -inline void set_atom (t_atom *a, int16 v) {SETFLOAT(a,(float)v);} -inline void set_atom (t_atom *a, int32 v) {SETFLOAT(a,(float)v);} -inline void set_atom (t_atom *a, uint32 v) {SETFLOAT(a,(float)v);} -inline void set_atom (t_atom *a, long v) {SETFLOAT(a,(float)v);} -inline void set_atom (t_atom *a, float32 v) {SETFLOAT(a,v);} -inline void set_atom (t_atom *a, float64 v) {SETFLOAT(a,v);} -inline void set_atom (t_atom *a, t_symbol *v) {SETSYMBOL(a,v);} -inline void set_atom (t_atom *a, Numop *v) {SETSYMBOL(a,v->sym);} -inline void set_atom (t_atom *a, t_binbuf *v) {SETLIST(a,v);} - -extern std::map<string,FClass *> fclasses; -int handle_braces(int ac, t_atom *av); - -extern FClass ciFObject, ciFormat; - -#endif // __GF_GRID_H diff --git a/externals/gridflow/images/README b/externals/gridflow/images/README deleted file mode 100644 index 20ba6aa3..00000000 --- a/externals/gridflow/images/README +++ /dev/null @@ -1,81 +0,0 @@ -$Id: README 2501 2006-07-24 16:25:29Z matju $ - -Here's the file to list the authors of the pictures - -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. - -babbage.jpg : - (check provenance) -Charles Babbage (1791-1871) is widely regarded as the first computer pioneer and -the great ancestral figure in the history of computing. Babbage excelled in a variety of -scientific and philosophical subjects though his present-day reputation rests largely -on the invention and design of his vast mechanical calculating engines. His -Analytical Engine conceived in 1834 is one of the startling intellectual feats of the -nineteenth century. The design of this machine possesses all the essential logical -features of the modern general purpose computer. -from -> http://www.sciencemuseum.org.uk/on-line/babbage/index.asp - -etch_a_sketch.jpg : - by Stephanie Brodeur and Darsha Hewitt, 2006 - -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. - -lite_brite_code.jpg : - by Stephanie Brodeur and Darsha Hewitt, 2006 - -lite_brite_1.jpg : - by Stephanie Brodeur and Darsha Hewitt, 2006 - -litmus.jpg : - by Alexandre Castonguay, 2006. - -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. (?) - -scissors.jpg, sewing.jpg, working.jpg : - original source (?) - by Stephanie Brodeur and Darsha Hewitt, 2006 - -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 Binary files differdeleted file mode 100644 index 444bf24e..00000000 --- a/externals/gridflow/images/b001.jpg +++ /dev/null diff --git a/externals/gridflow/images/babbage.jpg b/externals/gridflow/images/babbage.jpg Binary files differdeleted file mode 100644 index 1f8eef37..00000000 --- a/externals/gridflow/images/babbage.jpg +++ /dev/null diff --git a/externals/gridflow/images/bluemarble.jpg b/externals/gridflow/images/bluemarble.jpg Binary files differdeleted file mode 100644 index ea182f5f..00000000 --- a/externals/gridflow/images/bluemarble.jpg +++ /dev/null diff --git a/externals/gridflow/images/david.jpg b/externals/gridflow/images/david.jpg Binary files differdeleted file mode 100644 index 453da2f2..00000000 --- a/externals/gridflow/images/david.jpg +++ /dev/null diff --git a/externals/gridflow/images/etch_a_sketch.jpg b/externals/gridflow/images/etch_a_sketch.jpg Binary files differdeleted file mode 100644 index f8eed72a..00000000 --- a/externals/gridflow/images/etch_a_sketch.jpg +++ /dev/null diff --git a/externals/gridflow/images/g001.jpg b/externals/gridflow/images/g001.jpg Binary files differdeleted file mode 100644 index ff2b5019..00000000 --- a/externals/gridflow/images/g001.jpg +++ /dev/null diff --git a/externals/gridflow/images/lada.jpg b/externals/gridflow/images/lada.jpg Binary files differdeleted file mode 100644 index d53a5ed2..00000000 --- a/externals/gridflow/images/lada.jpg +++ /dev/null diff --git a/externals/gridflow/images/lena.jpg b/externals/gridflow/images/lena.jpg Binary files differdeleted file mode 100644 index 11c051f1..00000000 --- a/externals/gridflow/images/lena.jpg +++ /dev/null diff --git a/externals/gridflow/images/lite_brite_1.jpg b/externals/gridflow/images/lite_brite_1.jpg Binary files differdeleted file mode 100644 index a1539779..00000000 --- a/externals/gridflow/images/lite_brite_1.jpg +++ /dev/null diff --git a/externals/gridflow/images/lite_brite_code.jpg b/externals/gridflow/images/lite_brite_code.jpg Binary files differdeleted file mode 100644 index 56676033..00000000 --- a/externals/gridflow/images/lite_brite_code.jpg +++ /dev/null diff --git a/externals/gridflow/images/litmus.jpg b/externals/gridflow/images/litmus.jpg Binary files differdeleted file mode 100644 index f360e76c..00000000 --- a/externals/gridflow/images/litmus.jpg +++ /dev/null diff --git a/externals/gridflow/images/lucida-typewriter-12.grid.gz b/externals/gridflow/images/lucida-typewriter-12.grid.gz Binary files differdeleted file mode 100644 index 276eef0d..00000000 --- a/externals/gridflow/images/lucida-typewriter-12.grid.gz +++ /dev/null diff --git a/externals/gridflow/images/opensource.png b/externals/gridflow/images/opensource.png Binary files differdeleted file mode 100644 index aca9d1cf..00000000 --- a/externals/gridflow/images/opensource.png +++ /dev/null diff --git a/externals/gridflow/images/pmask.png b/externals/gridflow/images/pmask.png Binary files differdeleted file mode 100644 index 007e79a3..00000000 --- a/externals/gridflow/images/pmask.png +++ /dev/null diff --git a/externals/gridflow/images/pure-data.jpg b/externals/gridflow/images/pure-data.jpg Binary files differdeleted file mode 100644 index 18804a32..00000000 --- a/externals/gridflow/images/pure-data.jpg +++ /dev/null diff --git a/externals/gridflow/images/r001.jpg b/externals/gridflow/images/r001.jpg Binary files differdeleted file mode 100644 index c2374f9c..00000000 --- a/externals/gridflow/images/r001.jpg +++ /dev/null diff --git a/externals/gridflow/images/rose.jpg b/externals/gridflow/images/rose.jpg Binary files differdeleted file mode 100644 index b34ca5d3..00000000 --- a/externals/gridflow/images/rose.jpg +++ /dev/null diff --git a/externals/gridflow/images/scissors.jpg b/externals/gridflow/images/scissors.jpg Binary files differdeleted file mode 100644 index d4ddf344..00000000 --- a/externals/gridflow/images/scissors.jpg +++ /dev/null diff --git a/externals/gridflow/images/sewing.jpg b/externals/gridflow/images/sewing.jpg Binary files differdeleted file mode 100644 index e5d3933a..00000000 --- a/externals/gridflow/images/sewing.jpg +++ /dev/null diff --git a/externals/gridflow/images/teapot.png b/externals/gridflow/images/teapot.png Binary files differdeleted file mode 100644 index 3632eb7c..00000000 --- a/externals/gridflow/images/teapot.png +++ /dev/null diff --git a/externals/gridflow/images/test.mpeg b/externals/gridflow/images/test.mpeg Binary files differdeleted file mode 100644 index ddb18a4c..00000000 --- a/externals/gridflow/images/test.mpeg +++ /dev/null diff --git a/externals/gridflow/images/tux.tga.gz b/externals/gridflow/images/tux.tga.gz Binary files differdeleted file mode 100644 index c6c4bc46..00000000 --- a/externals/gridflow/images/tux.tga.gz +++ /dev/null diff --git a/externals/gridflow/images/violoncelle.mov b/externals/gridflow/images/violoncelle.mov Binary files differdeleted file mode 100644 index f2b65539..00000000 --- a/externals/gridflow/images/violoncelle.mov +++ /dev/null diff --git a/externals/gridflow/images/working.jpg b/externals/gridflow/images/working.jpg Binary files differdeleted file mode 100644 index 412dba53..00000000 --- a/externals/gridflow/images/working.jpg +++ /dev/null diff --git a/externals/gridflow/optional/fftw.c b/externals/gridflow/optional/fftw.c deleted file mode 100644 index e35bc9b9..00000000 --- a/externals/gridflow/optional/fftw.c +++ /dev/null @@ -1,114 +0,0 @@ -/* - GridFlow - Copyright (c) 2001-2008 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 "../gridflow.h.fcs" -#include <fftw3.h> - -#define C(x) ((fftwf_complex *)x) - -\class GridFFT : FObject { - fftwf_plan plan; - P<Dim> lastdim; /* of last input (for plan cache) */ - long lastchans; /* of last input (for plan cache) */ - \attr int sign; /* -1 or +1 */ - \attr int skip; /* 0 (y and x) or 1 (x only) */ - \attr bool real; - bool lastreal; - \constructor () {sign=-1; plan=0; lastdim=0; lastchans=0; skip=0; real=false;} - \grin 0 float32 -}; -\def 0 sign (int sign) { - if (sign!=-1 && sign!=1) RAISE("sign should be -1 or +1"); - this->sign=sign; - fftwf_destroy_plan(plan); -} -\def 0 skip (int skip) { - if (skip<0 || skip>1) RAISE("skip should be 0 or 1"); - this->skip=skip; - if (plan) {fftwf_destroy_plan(plan); plan=0;} -} -GRID_INLET(GridFFT,0) { - if (in->nt != float32_e) RAISE("expecting float32"); - if (real && sign==-1) { - if (in->dim->n != 2 && in->dim->n != 3) RAISE("expecting 2 or 3 dimensions: rows,columns,channels?"); - } else { - if (in->dim->n != 3 && in->dim->n != 4) RAISE("expecting 3 or 4 dimensions: rows,columns,channels?,complex"); - if (in->dim->get(in->dim->n-1)!=2) RAISE("expecting Dim(...,2): real,imaginary (got %d)",in->dim->get(2)); - } - in->set_chunk(0); -} GRID_FLOW { - if (skip==1 && !real) RAISE("can't do 1-D FFT in real mode, sorry"); - Dim *dim; - if (!real) dim = in->dim; - else if (sign==-1) { - int v[Dim::MAX_DIM]; - for (int i=0; i<in->dim->n; i++) v[i]=in->dim->v[i]; - v[in->dim->n] = 2; - dim = new Dim(in->dim->n+1,v); - } else dim = new Dim(in->dim->n-1,in->dim->v); - GridOutlet out(this,0,dim,in->nt); - float32 *tada = (float32 *)memalign(16,dim->prod()*sizeof(float32)); - long chans = in->dim->n>=3 ? in->dim->get(2) : 1; - CHECK_ALIGN16(data,in->nt) - CHECK_ALIGN16(tada,in->nt) - if (plan && lastdim && lastdim!=in->dim && chans!=lastchans && real==lastreal) {fftwf_destroy_plan(plan); plan=0;} - int v[] = {in->dim->v[0],in->dim->v[1],in->dim->n>2?in->dim->v[2]:1}; -// if (chans==1) { -// if (skip==0) plan = fftwf_plan_dft_2d(v[0],v[1],data,tada,sign,0); -// if (skip==1) plan = fftwf_plan_many_dft(1,&v[1],v[0],data,0,1,v[1],tada,0,1,v[1],sign,0); -// } - if (skip==0) { - //plan = fftwf_plan_dft_2d(v[0],v[1],data,tada,sign,0); - if (!plan) { - int embed[] = {dim->v[0],dim->v[1]}; - if (!real) {plan=fftwf_plan_many_dft( 2,&v[0],chans,C(data),0 ,chans,1,C(tada),0 ,chans,1,sign,0);} - else if (sign==-1) {plan=fftwf_plan_many_dft_r2c(2,&v[0],chans, data ,embed,chans,1,C(tada),embed,chans,1,0);} - else {plan=fftwf_plan_many_dft_c2r(2,&v[0],chans,C(data),embed,chans,1, tada ,embed,chans,1,0);} - } - if (!real) fftwf_execute_dft( plan,C(data),C(tada)); - else if (sign==-1) fftwf_execute_dft_r2c(plan, data ,C(tada)); - else fftwf_execute_dft_c2r(plan,C(data), tada ); - } - if (skip==1) { - if (!plan) plan=fftwf_plan_many_dft(1,&v[1],chans,C(data),0,chans,1,C(tada),0,chans,1,sign,0); - //plan = fftwf_plan_many_dft(1,&v[1],v[0],C(data),0,1,v[1],C(tada),0,1,v[1],sign,0); - long incr = v[1]*chans; - for (int i=0; i<v[0]; i++) fftwf_execute_dft(plan,C(data)+i*incr,C(tada)+i*incr); - } - if (real && sign==-1) { - for (int i=0; i<v[0]; i++) { - int h = mod(-i,v[0]); - T *tada2 = tada + (h*v[1]+v[1]/2)*v[2]*2; - T *tada3 = tada + (i*v[1]+v[1]/2)*v[2]*2; - for (int j=1+v[1]/2; j<v[1]; j++) { - tada2-=v[2]*2; tada3+=v[2]*2; - for (int k=0; k<v[2]; k++) {tada3[k+k]=tada2[k+k]; tada3[k+k+1]=-tada2[k+k+1];} - } - } - } - out.send(out.dim->prod(),tada); - free(tada); - lastdim=in->dim; lastchans=chans; lastreal=real; -} GRID_END -\end class {install("#fft",1,1);} -void startup_fftw () { - \startall -} diff --git a/externals/gridflow/optional/gem.c b/externals/gridflow/optional/gem.c deleted file mode 100644 index 4280855f..00000000 --- a/externals/gridflow/optional/gem.c +++ /dev/null @@ -1,171 +0,0 @@ -/* - $Id: gem.c 3865 2008-06-11 21:13:58Z matju $ - - GridFlow - Copyright (c) 2001-2008 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 "../gridflow.h.fcs" -#include "Base/GemPixDualObj.h" - -struct GridToPix; -struct GridToPixHelper : GemPixObj { - GridToPix *boss; - CPPEXTERN_HEADER(GridToPixHelper,GemPixObj) -public: - GridToPixHelper () {} - virtual void startRendering(); - virtual void render(GemState *state); - virtual bool isRunnable () {return true;} // required to keep GEM 0.9.1 (the real 0.9.1) happy -}; -CPPEXTERN_NEW(GridToPixHelper) - -// in 0: gem -// in 1: grid -// out 0: gem -\class GridToPix : FObject { - GridToPixHelper *helper; - P<BitPacking> bit_packing; - pixBlock m_pixBlock; - \attr bool yflip; - GridToPix (BFObject *bself, MESSAGE) : FObject(bself,MESSAGE2) { - yflip = false; - imageStruct &im = m_pixBlock.image = imageStruct(); - im.ysize = 1; - im.xsize = 1; - im.csize = 4; - im.format = GL_RGBA; - im.type = GL_UNSIGNED_BYTE; - im.allocate(); - *(int*)im.data = 0x0000ff; - uint32 mask[4] = {0x0000ff,0x00ff00,0xff0000,0x000000}; - bit_packing = new BitPacking(is_le(),4,4,mask); - helper = new GridToPixHelper; - helper->boss = this; - bself->gemself = helper; - } - ~GridToPix () {} - \grin 1 int -}; -GRID_INLET(GridToPix,1) { - if (in->dim->n != 3) RAISE("expecting 3 dimensions: rows,columns,channels"); - if (in->dim->get(2) != 4) RAISE("expecting 4 channels (got %d)",in->dim->get(2)); - in->set_chunk(1); - imageStruct &im = m_pixBlock.image; - im.clear(); - im.ysize = in->dim->get(0); - im.xsize = in->dim->get(1); - im.csize = in->dim->get(2); - im.type = GL_UNSIGNED_BYTE; - im.allocate(); - im.format = GL_RGBA; - /* - switch (in->dim->get(2)) { - case 4: im.format = GL_RGBA; break; - default: RAISE("you shouldn't see this error message."); - } - */ -} GRID_FLOW { - uint8 *buf = (uint8 *)m_pixBlock.image.data; - /*!@#$ it would be nice to skip the bitpacking when we can */ - long sxc = in->dim->prod(1); - long sx = in->dim->v[1]; - long sy = in->dim->v[0]; - if (yflip) {for (long y= in->dex/sxc; n; data+=sxc, n-=sxc, y++) bit_packing->pack(sx,data,buf+y*sxc);} - else {for (long y=sy-1-in->dex/sxc; n; data+=sxc, n-=sxc, y--) bit_packing->pack(sx,data,buf+y*sxc);} -} GRID_END -\end class { - install("#to_pix",2,0); // outlets are 0 because GEM makes its own outlet instead - add_creator("#export_pix"); - GridToPixHelper::real_obj_setupCallback(fclass->bfclass); -} -void GridToPixHelper::obj_setupCallback(t_class *) {} -void GridToPixHelper::startRendering() {boss->m_pixBlock.newimage = 1;} -void GridToPixHelper::render(GemState *state) {state->image = &boss->m_pixBlock;} - -//------------------------------------------------------------------------ - -struct GridFromPix; -struct GridFromPixHelper : GemPixObj { - GridFromPix *boss; - CPPEXTERN_HEADER(GridFromPixHelper,GemPixObj) -public: - GridFromPixHelper () {} - virtual void render(GemState *state); - virtual bool isRunnable () {return true;} // required to keep GEM 0.9.1 (the real 0.9.1) happy -}; -CPPEXTERN_NEW(GridFromPixHelper) - -// in 0: gem (todo: auto 0 = manual mode; bang = send next frame; type = number type attr) -// out 0: grid -\class GridFromPix : FObject { - GridFromPixHelper *helper; - P<BitPacking> bit_packing; - \attr bool yflip; - GridFromPix () : FObject(0,0,0,0) {RAISE("don't call this. this exists only to make GEM happy.");} - GridFromPix (BFObject *bself, MESSAGE) : FObject(bself,MESSAGE2) { - uint32 mask[4] = {0x0000ff,0x00ff00,0xff0000,0x000000}; - bit_packing = new BitPacking(is_le(),4,4,mask); - yflip = false; - bself->gemself = (GemPixObj *)this; - helper = new GridFromPixHelper; - helper->boss = this; - bself->gemself = helper; - } - virtual ~GridFromPix () {} - void render(GemState *state) { - if (!state->image) {::post("gemstate has no pix"); return;} - imageStruct &im = state->image->image; - if (im.format != GL_RGBA ) {::post("can't produce grid from pix format %d",im.format); return;} - if (im.type != GL_UNSIGNED_BYTE) {::post("can't produce grid from pix type %d", im.type ); return;} - int32 v[] = { im.ysize, im.xsize, im.csize }; - GridOutlet out(this,0,new Dim(3,v)); - long sxc = im.xsize*im.csize; - long sy = v[0]; - uint8 buf[sxc]; - for (int y=0; y<v[0]; y++) { - uint8 *data = (uint8 *)im.data+sxc*(yflip?y:sy-1-y); - bit_packing->pack(im.xsize,data,buf); - out.send(sxc,buf); - } - } -}; - -void GridFromPixHelper::obj_setupCallback(t_class *) {} - -\end class { - install("#from_pix",2,1); - add_creator("#import_pix"); - GridFromPixHelper::real_obj_setupCallback(fclass->bfclass); -} -void GridFromPixHelper::render(GemState *state) {boss->render(state);} - -//------------------------------------------------------------------------ - -void startup_gem () { - \startall -} - -/* -virtual void processRGBAImage(imageStruct &image) {} -virtual void processRGBImage (imageStruct &image) {} -virtual void processGrayImage(imageStruct &image) {} -virtual void processYUVImage (imageStruct &image) {} -*/ - diff --git a/externals/gridflow/optional/opencv.c b/externals/gridflow/optional/opencv.c deleted file mode 100644 index e9393afc..00000000 --- a/externals/gridflow/optional/opencv.c +++ /dev/null @@ -1,380 +0,0 @@ -/* - $Id: opencv.c 3977 2008-07-04 20:15:08Z matju $ - - GridFlow - Copyright (c) 2001-2008 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 "../gridflow.h.fcs" -#include <opencv/cv.h> -#include <errno.h> - -int ipl_eltype(NumberTypeE e) { - switch (e) { - case uint8_e: return IPL_DEPTH_8U; - // IPL_DEPTH_8S not supported - // IPL_DEPTH_16U not supported - case int16_e: return IPL_DEPTH_16S; - case int32_e: return IPL_DEPTH_32S; - case float32_e: return IPL_DEPTH_32F; - case float64_e: return IPL_DEPTH_64F; - default: RAISE("unsupported type %s",number_type_table[e].name); - } -} - -NumberTypeE gf_ipltype(int e) { - switch (e) { - case IPL_DEPTH_8U: return uint8_e; - // IPL_DEPTH_8S not supported - // IPL_DEPTH_16U not supported - case IPL_DEPTH_16S: return int16_e; - case IPL_DEPTH_32S: return int32_e; - case IPL_DEPTH_32F: return float32_e; - case IPL_DEPTH_64F: return float64_e; - default: RAISE("unsupported IPL type %d",e); - } -} - -int cv_eltype(NumberTypeE e) { - switch (e) { - case uint8_e: return CV_8U; - // CV_8S not supported - // CV_16U not supported - case int16_e: return CV_16S; - case int32_e: return CV_32S; - case float32_e: return CV_32F; - case float64_e: return CV_64F; - default: RAISE("unsupported type %s",number_type_table[e].name); - } -} - -NumberTypeE gf_cveltype(int e) { - switch (e) { - case CV_8U: return uint8_e; - // CV_8S not supported - // CV_16U not supported - case CV_16S: return int16_e; - case CV_32S: return int32_e; - case CV_32F: return float32_e; - case CV_64F: return float64_e; - default: RAISE("unsupported CV type %d",e); - } -} - -enum CvMode { - cv_mode_auto, - cv_mode_channels, - cv_mode_nochannels, -}; - -CvMode convert (const t_atom2 &x, CvMode *foo) { - if (x==gensym("auto")) return cv_mode_auto; - if (x==gensym("channels")) return cv_mode_channels; - if (x==gensym("nochannels")) return cv_mode_nochannels; - RAISE("invalid CvMode"); -} - -CvArr *cvGrid(PtrGrid g, CvMode mode, int reqdims=-1) { - P<Dim> d = g->dim; - int channels=1; - int dims=g->dim->n; - //post("mode=%d",(int)mode); - if (mode==cv_mode_channels && g->dim->n==0) RAISE("CV: channels dimension required for 'mode channels'"); - if ((mode==cv_mode_auto && g->dim->n>=3) || mode==cv_mode_channels) channels=g->dim->v[--dims]; - if (channels>64) RAISE("CV: too many channels. max 64, got %d",channels); - //post("channels=%d dims=%d nt=%d",channels,dims,g->nt); - //post("bits=%d",number_type_table[g->nt].size); - //if (dims==2) return cvMat(g->dim->v[0],g->dim->v[1],cv_eltype(g->nt),g->data); - if (reqdims>=0 && reqdims!=dims) RAISE("CV: wrong number of dimensions. expected %d, got %d", reqdims, dims); - if (dims==2) { - CvMat *a = cvCreateMatHeader(g->dim->v[0],g->dim->v[1],CV_MAKETYPE(cv_eltype(g->nt),channels)); - cvSetData(a,g->data,g->dim->prod(1)*(number_type_table[g->nt].size/8)); - return a; - } - RAISE("unsupported number of dimensions (got %d)",g->dim->n); - //return 0; -} - -IplImage *cvImageGrid(PtrGrid g /*, CvMode mode */) { - P<Dim> d = g->dim; - if (d->n!=3) RAISE("expected 3 dimensions, got %s",d->to_s()); - int channels=g->dim->v[2]; - if (channels>64) RAISE("too many channels. max 64, got %d",channels); - CvSize size = {d->v[1],d->v[0]}; - IplImage *a = cvCreateImageHeader(size,ipl_eltype(g->nt),channels); - cvSetData(a,g->data,g->dim->prod(1)*(number_type_table[g->nt].size/8)); - return a; -} - -\class CvOp1 : FObject { - \attr CvMode mode; - \constructor () {mode = cv_mode_auto;} - /* has no default \grin 0 handler so far. */ -}; -\end class {} - -\class CvOp2 : CvOp1 { - PtrGrid r; - \constructor (Grid *r=0) {this->r = r?r:new Grid(new Dim(),int32_e,true);} - virtual void func(CvArr *l, CvArr *r, CvArr *o) {/* rien */} - \grin 0 - \grin 1 -}; -GRID_INLET(CvOp2,0) { - SAME_TYPE(in,r); - if (!in->dim->equal(r->dim)) RAISE("dimension mismatch: left:%s right:%s",in->dim->to_s(),r->dim->to_s()); - in->set_chunk(0); -} GRID_FLOW { - PtrGrid l = new Grid(in->dim,(T *)data); - PtrGrid o = new Grid(in->dim,in->nt); - CvArr *a = cvGrid(l,mode); - CvArr *b = cvGrid(r,mode); - CvArr *c = cvGrid(o,mode); - func(a,b,c); - cvReleaseMat((CvMat **)&a); - cvReleaseMat((CvMat **)&b); - cvReleaseMat((CvMat **)&c); - out = new GridOutlet(this,0,in->dim,in->nt); - out->send(o->dim->prod(),(T *)o->data); -} GRID_END -GRID_INPUT2(CvOp2,1,r) {} GRID_END -\end class {} - -#define FUNC(CLASS) CLASS(BFObject *bself, MESSAGE):CvOp2(bself,MESSAGE2) {} virtual void func(CvArr *l, CvArr *r, CvArr *o) - -\class CvAdd : CvOp2 {FUNC(CvAdd) {cvAdd(l,r,o,0);}}; -\end class {install("cv.Add",2,1);} -\class CvSub : CvOp2 {FUNC(CvSub) {cvSub(l,r,o,0);}}; -\end class {install("cv.Sub",2,1);} -\class CvMul : CvOp2 {FUNC(CvMul) {cvMul(l,r,o,1);}}; -\end class {install("cv.Mul",2,1);} -\class CvDiv : CvOp2 {FUNC(CvDiv) {cvDiv(l,r,o,1);}}; -\end class {install("cv.Div",2,1);} -\class CvAnd : CvOp2 {FUNC(CvAnd) {cvAnd(l,r,o,0);}}; -\end class {install("cv.And",2,1);} -\class CvOr : CvOp2 {FUNC(CvOr ) {cvOr( l,r,o,0);}}; -\end class {install("cv.Or" ,2,1);} -\class CvXor : CvOp2 {FUNC(CvXor) {cvXor(l,r,o,0);}}; -\end class {install("cv.Xor",2,1);} - -\class CvInvert : CvOp1 { - \constructor () {} - \grin 0 -}; -GRID_INLET(CvInvert,0) { - if (in->dim->n!=2) RAISE("should have 2 dimensions"); - if (in->dim->v[0] != in->dim->v[1]) RAISE("matrix should be square"); - in->set_chunk(0); -} GRID_FLOW { - //post("l=%p, r=%p", &*l, &*r); - PtrGrid l = new Grid(in->dim,(T *)data); - PtrGrid o = new Grid(in->dim,in->nt); - CvArr *a = cvGrid(l,mode); - CvArr *c = cvGrid(o,mode); - //post("a=%p, b=%p", a, b); - cvInvert(a,c); - cvReleaseMat((CvMat **)&a); - cvReleaseMat((CvMat **)&c); - out = new GridOutlet(this,0,in->dim,in->nt); - out->send(o->dim->prod(),(T *)o->data); -} GRID_END -\end class {install("cv.Invert",1,1);} - -\class CvSVD : CvOp1 { - \grin 0 - \constructor () {} -}; -GRID_INLET(CvSVD,0) { - if (in->dim->n!=2) RAISE("should have 2 dimensions"); - if (in->dim->v[0] != in->dim->v[1]) RAISE("matrix should be square"); - in->set_chunk(0); -} GRID_FLOW { - PtrGrid l = new Grid(in->dim,(T *)data); - PtrGrid o0 = new Grid(in->dim,in->nt); - PtrGrid o1 = new Grid(in->dim,in->nt); - PtrGrid o2 = new Grid(in->dim,in->nt); - CvArr *a = cvGrid(l,mode); - CvArr *c0 = cvGrid(o0,mode); - CvArr *c1 = cvGrid(o1,mode); - CvArr *c2 = cvGrid(o2,mode); - cvSVD(a,c0,c1,c2); - cvReleaseMat((CvMat **)&a); - cvReleaseMat((CvMat **)&c0); - cvReleaseMat((CvMat **)&c1); - cvReleaseMat((CvMat **)&c2); - out = new GridOutlet(this,2,in->dim,in->nt); out->send(o2->dim->prod(),(T *)o2->data); - out = new GridOutlet(this,1,in->dim,in->nt); out->send(o1->dim->prod(),(T *)o1->data); - out = new GridOutlet(this,0,in->dim,in->nt); out->send(o0->dim->prod(),(T *)o0->data); -} GRID_END -\end class {install("cv.SVD",1,3);} - -\class CvSplit : CvOp1 { - int channels; - \constructor (int channels) { - if (channels<0 || channels>64) RAISE("channels=%d is not in 1..64",channels); - this->channels = channels; - bself->noutlets_set(channels); - } -}; -\end class {} - -\class CvHaarDetectObjects : FObject { - \attr double scale_factor; /*=1.1*/ - \attr int min_neighbors; /*=3*/ - \attr int flags; /*=0*/ - \constructor () { - scale_factor=1.1; - min_neighbors=3; - flags=0; - //cascade = cvLoadHaarClassifierCascade("<default_face_cascade>",cvSize(24,24)); - const char *filename = OPENCV_SHARE_PATH "/haarcascades/haarcascade_frontalface_alt2.xml"; - FILE *f = fopen(filename,"r"); - if (!f) RAISE("error opening %s: %s",filename,strerror(errno)); - fclose(f); - cascade = (CvHaarClassifierCascade *)cvLoad(filename,0,0,0); - int s = cvGetErrStatus(); - post("cascade=%p, cvGetErrStatus=%d cvErrorStr=%s",cascade,s,cvErrorStr(s)); - //cascade = cvLoadHaarClassifierCascade(OPENCV_SHARE_PATH "/data/haarcascades/haarcascade_frontalface_alt2.xml",cvSize(24,24)); - storage = cvCreateMemStorage(0); - } - CvHaarClassifierCascade *cascade; - CvMemStorage *storage; - \grin 0 -}; -GRID_INLET(CvHaarDetectObjects,0) { - in->set_chunk(0); -} GRID_FLOW { - PtrGrid l = new Grid(in->dim,(T *)data); - IplImage *img = cvImageGrid(l); - CvSeq *ret = cvHaarDetectObjects(img,cascade,storage,scale_factor,min_neighbors,flags); - int n = ret ? ret->total : 0; - out = new GridOutlet(this,0,new Dim(n,2,2)); - for (int i=0; i<n; i++) { - CvRect *r = (CvRect *)cvGetSeqElem(ret,i); - int32 duh[] = {r->y,r->x,r->y+r->height,r->x+r->width}; - out->send(4,duh); - } -} GRID_END -\end class {install("cv.HaarDetectObjects",2,1);} - -\class CvKalmanWrapper : CvOp1 { - CvKalman *kal; - \constructor (int dynam_params, int measure_params, int control_params=0) { - kal = cvCreateKalman(dynam_params,measure_params,control_params); - } - ~CvKalmanWrapper () {if (kal) cvReleaseKalman(&kal);} - \decl void _0_bang (); - \grin 0 - \grin 1 -}; - -void cvMatSend(const CvMat *self, FObject *obj, int outno) { - int m = self->rows; - int n = self->cols; - int e = CV_MAT_TYPE(cvGetElemType(self)); - int c = CV_MAT_CN( cvGetElemType(self)); - GridOutlet *out = new GridOutlet(obj,0,new Dim(m,n)); - for (int i=0; i<m; i++) { - uchar *meuh = cvPtr2D(self,i,0,0); - switch (e) { - case CV_8U: out->send(c*n, (uint8 *)meuh); break; - case CV_16S: out->send(c*n, (int16 *)meuh); break; - case CV_32S: out->send(c*n, (int32 *)meuh); break; - case CV_32F: out->send(c*n,(float32 *)meuh); break; - case CV_64F: out->send(c*n,(float64 *)meuh); break; - } - } -} - -\def void _0_bang () { - const CvMat *r = cvKalmanPredict(kal,0); - cvMatSend(r,this,0); -} - -GRID_INLET(CvKalmanWrapper,0) { - in->set_chunk(0); -} GRID_FLOW { - PtrGrid l = new Grid(in->dim,(T *)data); - CvMat *a = (CvMat *)cvGrid(l,mode,2); - const CvMat *r = cvKalmanPredict(kal,a); - cvMatSend(r,this,0); -} GRID_END - -GRID_INLET(CvKalmanWrapper,1) { - in->set_chunk(0); -} GRID_FLOW { - PtrGrid l = new Grid(in->dim,(T *)data); - CvMat *a = (CvMat *)cvGrid(l,mode,2); - const CvMat* r = cvKalmanCorrect(kal,a); - cvMatSend(r,this,0); -} GRID_END -\end class {install("cv.Kalman",2,1);} - -//\class CvEllipse : FObject { -// \grin 0 -//}; -//GRID_INLET(CvEllipse,0) { -// in->set_chunk(0); -//} GRID_FLOW { -//} GRID_END -//\end class {install("cv.Ellipse",1,1);} - -/* -void cvEllipse( CvArr* img, CvPoint center, CvSize axes, double angle, - double start_angle, double end_angle, CvScalar color, - int thickness=1, int line_type=8, int shift=0 ); -CvSeq* cvApproxPoly( const void* src_seq, int header_size, CvMemStorage* storage, - int method, double parameter, int parameter2=0 ); -void cvCalcOpticalFlowHS( const CvArr* prev, const CvArr* curr, int use_previous, - CvArr* velx, CvArr* vely, double lambda, - CvTermCriteria criteria ); -void cvCalcOpticalFlowLK( const CvArr* prev, const CvArr* curr, CvSize win_size, - CvArr* velx, CvArr* vely ); -void cvCalcOpticalFlowBM( const CvArr* prev, const CvArr* curr, CvSize block_size, - CvSize shift_size, CvSize max_range, int use_previous, - CvArr* velx, CvArr* vely ); -void cvCalcOpticalFlowPyrLK( const CvArr* prev, const CvArr* curr, CvArr* prev_pyr, CvArr* curr_pyr, - const CvPoint2D32f* prev_features, CvPoint2D32f* curr_features, - int count, CvSize win_size, int level, char* status, - float* track_error, CvTermCriteria criteria, int flags ); -void cvCalcBackProject( IplImage** image, CvArr* back_project, const CvHistogram* hist ); -void cvCalcHist( IplImage** image, CvHistogram* hist, int accumulate=0, const CvArr* mask=NULL ); -CvHistogram* cvCreateHist( int dims, int* sizes, int type, float** ranges=NULL, int uniform=1 ); -void cvSnakeImage( const IplImage* image, CvPoint* points, int length, - float* alpha, float* beta, float* gamma, int coeff_usage, - CvSize win, CvTermCriteria criteria, int calc_gradient=1 ); -int cvMeanShift( const CvArr* prob_image, CvRect window, CvTermCriteria criteria, CvConnectedComp* comp ); -int cvCamShift( const CvArr* prob_image, CvRect window, CvTermCriteria criteria, CvConnectedComp* comp, CvBox2D* box=NULL ); -*/ - -/* **************************************************************** */ - -static int erreur_handleur (int status, const char* func_name, const char* err_msg, const char* file_name, int line, void *userdata) { - cvSetErrStatus(CV_StsOk); - // we might be looking for trouble because we don't know whether OpenCV is throw-proof. - RAISE("OpenCV error: status='%s' func_name=%s err_msg=\"%s\" file_name=%s line=%d",cvErrorStr(status),func_name,err_msg,file_name,line); - // if this breaks OpenCV, then we will have to use post() or a custom hybrid of post() and RAISE() that does not cause a - // longjmp when any OpenCV functions are on the stack. - return 0; -} - -void startup_opencv() { - /* CvErrorCallback z = */ cvRedirectError(erreur_handleur); - \startall -} diff --git a/externals/gridflow/tests/#print-test.pd b/externals/gridflow/tests/#print-test.pd deleted file mode 100644 index c1625618..00000000 --- a/externals/gridflow/tests/#print-test.pd +++ /dev/null @@ -1,30 +0,0 @@ -#N canvas 770 206 450 483 10; -#X msg 32 29 0 #; -#X msg 48 67 2 3 5; -#X msg 56 86 2 2 # 2 3 5 7; -#X msg 63 105 2 2 2 # 2 3 5 7 11 13 17 19; -#X msg 40 48 list # 2; -#X msg 211 222 base 8; -#X msg 228 281 trunc 10; -#X msg 236 300 maxrows 0; -#X msg 202 203 base 2; -#X msg 221 241 base 16; -#X msg 73 125 2 2 2 # 2 -3 5 -7 -11 13 -17 19; -#X msg 83 145 2 2 2 s # 2 -3 5 -7 -11 13 -17 19; -#X msg 93 165 2 2 2 f # 2 -3 5 -7 -11 13 -17 19; -#X obj 32 379 #print; -#X obj 32 360 t a; -#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 14 0 13 0; diff --git a/externals/gridflow/tests/Makefile b/externals/gridflow/tests/Makefile deleted file mode 100644 index 6f81ac9f..00000000 --- a/externals/gridflow/tests/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -all:: malloc-test - -COMMON = Makefile - -malloc-test: malloc-test.c $(COMMON) - g++ -xc++ -O3 malloc-test.c -o malloc-test - diff --git a/externals/gridflow/tests/args-2-test.pd b/externals/gridflow/tests/args-2-test.pd deleted file mode 100644 index 66bada4c..00000000 --- a/externals/gridflow/tests/args-2-test.pd +++ /dev/null @@ -1,17 +0,0 @@ -#N canvas 460 0 760 300 10; -#X obj 36 19 loadbang; -#X obj 36 38 args (first s foo) (second f 42) (third s bar) (fourth -f 23) *; -#X obj 36 87 print o1; -#X obj 113 87 print o2; -#X obj 190 87 print o3; -#X obj 268 88 print o4; -#X obj 345 87 print o5; -#X obj 423 87 print o6; -#X connect 0 0 1 0; -#X connect 1 0 2 0; -#X connect 1 1 3 0; -#X connect 1 2 4 0; -#X connect 1 3 5 0; -#X connect 1 4 6 0; -#X connect 1 5 7 0; diff --git a/externals/gridflow/tests/args-test.pd b/externals/gridflow/tests/args-test.pd deleted file mode 100644 index 8fd716ba..00000000 --- a/externals/gridflow/tests/args-test.pd +++ /dev/null @@ -1,23 +0,0 @@ -#N canvas 128 60 450 464 10; -#X obj 14 36 args-2-test a 1 b 2 c 3 d 4 \, canadiens 5 \, nordiques -2; -#X text 12 257 o5: bang; -#X text 12 270 o4: 23; -#X text 12 101 o5: list c 3 d 4; -#X text 12 114 o4: 2; -#X text 12 127 o3: symbol b; -#X text 12 140 o2: 1; -#X text 12 153 o1: symbol a; -#X text 12 166 o6: canadiens 5; -#X text 12 179 o6: nordiques 2; -#X text 12 192 o5: bang; -#X text 12 205 o4: 23; -#X text 12 231 o2: 1; -#X text 12 244 o1: symbol a; -#X text 12 283 o3: symbol bar; -#X text 12 296 o2: 42; -#X text 12 309 o1: symbol foo; -#X obj 14 56 args-2-test a 1 (a b c); -#X obj 14 76 args-2-test; -#X text 15 14 order of those 3 objects is important; -#X text 12 218 o3: list a b c; diff --git a/externals/gridflow/tests/cv.SVD-test.pd b/externals/gridflow/tests/cv.SVD-test.pd deleted file mode 100644 index 9d1c1ddd..00000000 --- a/externals/gridflow/tests/cv.SVD-test.pd +++ /dev/null @@ -1,37 +0,0 @@ -#N canvas 770 0 450 464 10; -#X obj 48 105 cv.SVD; -#X obj 49 320 display; -#X floatatom 49 27 5 0 0 0 - - -; -#X floatatom 88 27 5 0 0 0 - - -; -#X floatatom 49 43 5 0 0 0 - - -; -#X floatatom 88 43 5 0 0 0 - - -; -#X obj 48 86 #redim (2 2); -#X msg 160 33 4 f # 2 3 5 7; -#X obj 48 67 #pack 4 f; -#X obj 161 191 display; -#X obj 12 185 display; -#X obj 48 280 #inner \, seed (f #); -#X obj 178 280 #inner \, seed (f #); -#X obj 48 261 #store; -#X obj 48 238 #finished; -#X obj 48 145 t a a; -#X obj 307 189 display; -#X connect 0 0 10 0; -#X connect 0 0 15 0; -#X connect 0 1 9 0; -#X connect 0 1 13 1; -#X connect 0 2 16 0; -#X connect 0 2 12 1; -#X connect 2 0 8 0; -#X connect 3 0 8 1; -#X connect 4 0 8 2; -#X connect 5 0 8 3; -#X connect 6 0 0 0; -#X connect 7 0 6 0; -#X connect 8 0 6 0; -#X connect 11 0 1 0; -#X connect 12 0 11 1; -#X connect 13 0 11 0; -#X connect 14 0 13 0; -#X connect 15 0 14 0; -#X connect 15 1 12 0; diff --git a/externals/gridflow/tests/foreach-test.pd b/externals/gridflow/tests/foreach-test.pd deleted file mode 100644 index e5ad35d3..00000000 --- a/externals/gridflow/tests/foreach-test.pd +++ /dev/null @@ -1,8 +0,0 @@ -#N canvas 496 228 450 300 10; -#X obj 51 64 foreach; -#X msg 51 45 2 3 5 7; -#X obj 51 83 print; -#X msg 86 22 2 foo bar 7 11 foo; -#X connect 0 0 2 0; -#X connect 1 0 0 0; -#X connect 3 0 0 0; diff --git a/externals/gridflow/tests/fps-test.pd b/externals/gridflow/tests/fps-test.pd deleted file mode 100644 index c92b5940..00000000 --- a/externals/gridflow/tests/fps-test.pd +++ /dev/null @@ -1,75 +0,0 @@ -#N canvas 750 206 450 427 10; -#X obj 32 13 metro; -#X obj 32 -4 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 -; -#X obj 32 125 t b b; -#X obj 32 212 print a; -#X obj 71 193 print b; -#X obj 32 38 random 400; -#X msg 148 5 mode real; -#X msg 148 25 mode user; -#X msg 148 45 mode system; -#X msg 148 65 mode cpu; -#X obj 80 99 t a; -#X msg 148 85 mode logical; -#X msg 148 105 mode process; -#X obj 319 105 print user; -#X obj 319 151 print system; -#X obj 327 46 t b b; -#X obj 327 20 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; -#X obj 319 86 usertime; -#X obj 162 239 #out window; -#X obj 162 184 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; -#X msg 162 220 240 320 3 # 255 0 0; -#X obj 319 132 systemtime; -#X obj 319 181 tsctime; -#X obj 319 200 print tsc; -#X obj 319 223 timer; -#X obj 319 242 print logical; -#X obj 319 263 realtime; -#X obj 319 303 cputime; -#X obj 319 322 print process; -#X obj 319 282 print real; -#X obj 162 201 metro 10; -#X obj 71 125 fps_ruby detailed; -#X obj 32 144 fps detailed; -#X connect 0 0 5 0; -#X connect 1 0 0 0; -#X connect 2 0 32 0; -#X connect 2 1 31 0; -#X connect 5 0 0 1; -#X connect 5 0 2 0; -#X connect 6 0 10 0; -#X connect 7 0 10 0; -#X connect 8 0 10 0; -#X connect 9 0 10 0; -#X connect 10 0 31 0; -#X connect 10 0 32 0; -#X connect 11 0 10 0; -#X connect 12 0 10 0; -#X connect 15 0 17 0; -#X connect 15 0 21 0; -#X connect 15 0 22 0; -#X connect 15 0 24 0; -#X connect 15 0 26 0; -#X connect 15 0 27 0; -#X connect 15 1 17 1; -#X connect 15 1 21 1; -#X connect 15 1 22 1; -#X connect 15 1 24 1; -#X connect 15 1 26 1; -#X connect 15 1 27 1; -#X connect 16 0 15 0; -#X connect 17 0 13 0; -#X connect 19 0 30 0; -#X connect 20 0 18 0; -#X connect 21 0 14 0; -#X connect 22 0 23 0; -#X connect 24 0 25 0; -#X connect 26 0 29 0; -#X connect 27 0 28 0; -#X connect 30 0 20 0; -#X connect 31 0 4 0; -#X connect 32 0 3 0; diff --git a/externals/gridflow/tests/gf.error-2-test.pd b/externals/gridflow/tests/gf.error-2-test.pd deleted file mode 100644 index 644b92c3..00000000 --- a/externals/gridflow/tests/gf.error-2-test.pd +++ /dev/null @@ -1,6 +0,0 @@ -#N canvas 145 95 450 300 10; -#X obj 47 65 gf.error file not open; -#X msg 47 46 bang; -#X obj 47 27 inlet; -#X connect 1 0 0 0; -#X connect 2 0 1 0; diff --git a/externals/gridflow/tests/gf.error-test.pd b/externals/gridflow/tests/gf.error-test.pd deleted file mode 100644 index 7c7ef395..00000000 --- a/externals/gridflow/tests/gf.error-test.pd +++ /dev/null @@ -1,4 +0,0 @@ -#N canvas 630 126 450 300 10; -#X obj 17 37 gf.error-2-test; -#X msg 17 18 bang; -#X connect 1 0 0 0; diff --git a/externals/gridflow/tests/malloc-test.c b/externals/gridflow/tests/malloc-test.c deleted file mode 100644 index d5445dcc..00000000 --- a/externals/gridflow/tests/malloc-test.c +++ /dev/null @@ -1,36 +0,0 @@ -#include <stdlib.h> -#include <time.h> -#include <sys/time.h> -#include <stdio.h> - -typedef long long uint64; - -uint64 gf_timeofday () { - timeval t; - gettimeofday(&t,0); - return t.tv_sec*1000000+t.tv_usec; -} -static void test1 (size_t n) { - uint64 t = gf_timeofday(); - for (int i=0; i<10000; i++) free(malloc(n)); - t = gf_timeofday() - t; - printf("10000 mallocs of %7ld bytes takes %7ld us (%f us/malloc)\n",n,(long)t,t/(float)10000); -} -static void test2 (size_t n) { - uint64 t = gf_timeofday(); - // the real calloc is lazy, let's try a manual (strict) calloc - //for (int i=0; i<10000; i++) free(calloc(1,n)); - for (int i=0; i<10000; i++) { - long *p = (long *)malloc(n); - size_t nn=n/sizeof(long); - for (size_t j=0; j<nn; j++) p[j] = 0; - free(p); - } - t = gf_timeofday() - t; - printf("10000 callocs of %7ld bytes takes %7ld us (%f us/calloc)\n",n,(long)t,t/(float)10000); -} -int main () { - for (int i=0; i<20; i++) {test1(4<<i); test2(4<<i);} - //for (int i=0; i<20; i++) test1(4096*(32+i)); - return 0; -} diff --git a/externals/gridflow/tests/opencv-test1.pd b/externals/gridflow/tests/opencv-test1.pd deleted file mode 100644 index 7bc67a57..00000000 --- a/externals/gridflow/tests/opencv-test1.pd +++ /dev/null @@ -1,72 +0,0 @@ -#N canvas 435 74 620 429 10; -#X obj 332 41 #in g001.jpg; -#X obj 275 316 #out window; -#X obj 105 7 t b b; -#X obj 105 -10 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 190 339 #out window \, title cv; -#X obj 399 277 # -; -#X obj 399 296 # * 16; -#X obj 399 315 # + 128; -#X obj 399 334 #clip; -#X obj 399 353 #out window; -#X obj 105 31 #in b001.jpg; -#X obj 190 301 spigot; -#X obj 275 236 spigot; -#X obj 415 238 spigot; -#X obj 354 234 spigot; -#X obj 451 182 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 -1; -#X obj 118 143 realtime; -#X obj 178 142 #finished; -#X obj 332 60 t a a; -#X obj 118 162 nbx 8 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 9 --262144 -1 -1 26.297 256; -#X obj 154 117 t a a b; -#X obj 13 121 realtime; -#X obj 73 120 #finished; -#X obj 13 140 nbx 8 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 9 --262144 -1 -1 26.084 256; -#X obj 49 95 t a a b; -#X obj 105 50 t a a; -#X obj 206 208 cv.Mul; -#X obj 305 188 # *; -#X obj 190 320 # >> 8; -#X obj 275 296 # >> 8; -#X connect 0 0 18 0; -#X connect 2 0 10 0; -#X connect 2 1 0 0; -#X connect 3 0 2 0; -#X connect 5 0 6 0; -#X connect 6 0 7 0; -#X connect 7 0 8 0; -#X connect 8 0 9 0; -#X connect 10 0 25 0; -#X connect 11 0 28 0; -#X connect 12 0 29 0; -#X connect 13 0 5 1; -#X connect 14 0 5 0; -#X connect 15 0 13 1; -#X connect 15 0 14 1; -#X connect 15 0 12 1; -#X connect 15 0 11 1; -#X connect 16 0 19 0; -#X connect 17 0 16 1; -#X connect 18 0 26 1; -#X connect 18 1 27 1; -#X connect 20 0 17 0; -#X connect 20 1 27 0; -#X connect 20 2 16 0; -#X connect 21 0 23 0; -#X connect 22 0 21 1; -#X connect 24 0 22 0; -#X connect 24 1 26 0; -#X connect 24 2 21 0; -#X connect 25 0 24 0; -#X connect 25 1 20 0; -#X connect 26 0 11 0; -#X connect 26 0 14 0; -#X connect 27 0 12 0; -#X connect 27 0 13 0; -#X connect 28 0 4 0; -#X connect 29 0 1 0; diff --git a/externals/gridflow/tests/opencv-test2.pd b/externals/gridflow/tests/opencv-test2.pd deleted file mode 100644 index f1b67fd3..00000000 --- a/externals/gridflow/tests/opencv-test2.pd +++ /dev/null @@ -1,49 +0,0 @@ -#N canvas 532 160 585 459 10; -#X obj 401 173 cv.Add (240 320 3 #); -#X obj 414 212 cv.Sub (240 320 3 #); -#X msg 412 145 3 3 3 #; -#X obj 338 135 display; -#X obj 337 91 #redim (1 1); -#X obj 337 56 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 --262144 -1 -1 0 256; -#X obj 337 72 #pack 1; -#X floatatom 351 238 5 0 0 0 - - -; -#X obj 351 274 display; -#X obj 350 254 # / 3; -#X obj 337 110 cv.Div (1 1 6 # 3); -#X obj 22 211 cv.HaarDetectObjects; -#X obj 22 20 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1 -; -#X obj 120 83 #in images/sewing.jpg; -#X obj 179 189 #out window; -#X obj 120 121 #cast b; -#X obj 22 405 fps detailed; -#X obj 22 424 print; -#X obj 120 64 loadbang; -#X obj 192 62 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; -#X obj 22 386 bang; -#X obj 120 102 #downscale_by 2 smoothly; -#X obj 22 37 metro 100; -#X obj 23 245 display; -#X obj 22 102 #camera; -#X obj 21 150 #cast b; -#X connect 2 0 0 0; -#X connect 4 0 10 0; -#X connect 5 0 6 0; -#X connect 6 0 4 0; -#X connect 7 0 9 0; -#X connect 9 0 8 0; -#X connect 10 0 3 0; -#X connect 11 0 23 0; -#X connect 12 0 22 0; -#X connect 13 0 21 0; -#X connect 16 0 17 0; -#X connect 18 0 13 0; -#X connect 19 0 13 0; -#X connect 20 0 16 0; -#X connect 21 0 15 0; -#X connect 22 0 24 0; -#X connect 24 0 25 0; -#X connect 25 0 11 0; -#X connect 25 0 14 0; diff --git a/externals/gridflow/tests/plotter_control-test.pd b/externals/gridflow/tests/plotter_control-test.pd deleted file mode 100644 index bff1e2ca..00000000 --- a/externals/gridflow/tests/plotter_control-test.pd +++ /dev/null @@ -1,51 +0,0 @@ -#N canvas 598 366 622 323 10; -#X obj 34 101 plotter_control; -#X obj 122 120 t a; -#X msg 469 54 42 \, 100 \, -30; -#X text 439 167 52 50 49 48 48 45 51 48; -#X obj 34 120 list prepend; -#X obj 12 12 loadbang; -#X msg 12 31 bang; -#X obj 469 73 ascii; -#X obj 440 148 display; -#X obj 499 128 list prepend; -#X obj 439 35 t b b; -#X obj 439 18 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; -#X obj 439 128 seq_fold; -#X obj 483 235 #to_symbol; -#X obj 483 254 #import; -#X obj 484 274 display; -#X msg 483 216 65 13 10 66; -#X msg 34 69 PU \, pd \, pa 200 300 \, SP 3 \, ip 1 2 3 \, other foo -50 70 \, print hello world \, print_from_ascii 29 29 13 10; -#X obj 12 158 expect 80 85 59 10 80 68 59 10 80 65 50 48 48 44 51 48 -48 59 10 83 80 51 59 10 73 80 49 44 50 44 51 59 10 70 79 79 53 48 44 -55 48 59 10 76 66 104 101 108 108 111 32 119 111 114 108 100 3 59 10 -76 66 29 29 13 10 3 59 10; -#X obj 12 50 t b a b; -#X obj 12 139 list; -#X obj 13 217 display; -#X connect 0 0 4 0; -#X connect 1 0 4 1; -#X connect 2 0 7 0; -#X connect 4 0 1 0; -#X connect 4 0 20 1; -#X connect 5 0 6 0; -#X connect 6 0 19 0; -#X connect 7 0 12 1; -#X connect 9 0 12 3; -#X connect 10 1 2 0; -#X connect 11 0 10 0; -#X connect 12 0 8 0; -#X connect 12 1 9 0; -#X connect 12 2 9 1; -#X connect 13 0 14 0; -#X connect 14 0 15 0; -#X connect 16 0 13 0; -#X connect 17 0 0 0; -#X connect 18 0 21 0; -#X connect 19 0 20 0; -#X connect 19 1 17 0; -#X connect 19 2 4 1; -#X connect 20 0 18 0; diff --git a/externals/gridflow/tests/plotter_parser-test.pd b/externals/gridflow/tests/plotter_parser-test.pd deleted file mode 100644 index dd333c1b..00000000 --- a/externals/gridflow/tests/plotter_parser-test.pd +++ /dev/null @@ -1,67 +0,0 @@ -#N canvas 770 0 450 350 10; -#X obj 75 101 plotter_parser; -#X obj 267 102 display; -#X obj 75 82 #in grid pd.hpgl \, headerless; -#X obj 75 33 until; -#X obj 75 16 bng 15 250 50 0 empty empty empty 17 7 0 10 -24198 -1 --1; -#X obj 8 16 tgl 15 0 empty empty empty 17 7 0 10 -24198 -1 -1 1 1; -#X msg 82 60 rewind; -#X obj 177 101 print bogus; -#X obj 9 255 #draw_hpgl; -#X obj 9 280 #out window; -#X obj 255 238 listread ( 480 640 3 #); -#X floatatom 255 222 5 0 0 0 - - -; -#X obj 255 257 listflatten; -#X obj 256 316 display; -#X obj 311 282 print; -#X msg 282 191 2 (3 5 (7) ()) 11; -#X obj 313 306 list length; -#X floatatom 313 328 5 0 0 0 - - -; -#X msg 41 236 255 255 255; -#X obj 41 217 loadbang; -#X obj 86 144 print command; -#X obj 8 33 metro 1; -#X msg 55 192 480 640 3 #; -#X obj 9 192 #store; -#X obj 55 173 loadbang; -#X obj 86 125 spigot; -#X obj 132 126 tgl 15 0 empty empty empty 17 7 0 10 -241291 -1 -1 0 -1; -#X obj 9 299 fps; -#X floatatom 9 320 5 0 0 0 - - -; -#X obj 166 18 bng 15 250 50 0 empty empty empty 17 7 0 10 -258699 -1 --1; -#X connect 0 0 8 2; -#X connect 0 0 25 0; -#X connect 0 1 7 0; -#X connect 2 0 0 0; -#X connect 2 1 1 0; -#X connect 2 1 3 1; -#X connect 2 1 5 0; -#X connect 3 0 2 0; -#X connect 4 0 3 0; -#X connect 5 0 21 0; -#X connect 6 0 2 0; -#X connect 8 0 9 0; -#X connect 8 0 23 1; -#X connect 8 1 23 0; -#X connect 9 0 27 0; -#X connect 10 0 12 0; -#X connect 11 0 10 0; -#X connect 12 0 14 0; -#X connect 12 0 16 0; -#X connect 12 0 13 0; -#X connect 15 0 12 0; -#X connect 16 0 17 0; -#X connect 18 0 8 1; -#X connect 19 0 18 0; -#X connect 21 0 2 0; -#X connect 22 0 23 1; -#X connect 23 0 8 0; -#X connect 24 0 22 0; -#X connect 25 0 20 0; -#X connect 26 0 25 1; -#X connect 27 0 28 0; -#X connect 29 0 6 0; -#X connect 29 0 22 0; diff --git a/externals/gridflow/tests/range-test.pd b/externals/gridflow/tests/range-test.pd deleted file mode 100644 index f647b576..00000000 --- a/externals/gridflow/tests/range-test.pd +++ /dev/null @@ -1,35 +0,0 @@ -#N canvas 425 235 452 370 10; -#X obj 136 103 range 20 50 100; -#X obj 83 25 vsl 15 128 0 127 0 0 empty empty empty -2 -6 0 8 -262144 --1 -1 0 1; -#X obj 157 71 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 --262144 -1 -1 0 256; -#X floatatom 138 48 5 0 0 0 - - -; -#X obj 236 129 print d; -#X obj 202 149 print c; -#X obj 169 170 print b; -#X obj 136 190 print a; -#X msg 125 27 -1000 \, -1 \, 0 \, 19 \, 20 \, 49 \, 50 \, 99 \, 100 -\, 1000; -#X obj 125 8 loadbang; -#X text 17 186 a: -1000; -#X text 17 199 a: -1; -#X text 17 212 a: 0; -#X text 17 224 a: 19; -#X text 17 236 b: 20; -#X text 17 249 b: 49; -#X text 17 262 c: 50; -#X text 17 276 c: 99; -#X text 17 290 d: 100; -#X text 17 303 d: 1000; -#X msg 236 72 500; -#X connect 0 0 7 0; -#X connect 0 1 6 0; -#X connect 0 2 5 0; -#X connect 0 3 4 0; -#X connect 1 0 0 0; -#X connect 2 0 0 0; -#X connect 3 0 0 0; -#X connect 8 0 0 0; -#X connect 9 0 8 0; -#X connect 20 0 0 3; diff --git a/externals/gridflow/tests/suppressions.valg3 b/externals/gridflow/tests/suppressions.valg3 deleted file mode 100644 index 3a425765..00000000 --- a/externals/gridflow/tests/suppressions.valg3 +++ /dev/null @@ -1,201 +0,0 @@ -{ - dl1 - Memcheck:Addr8 - obj:/lib/ld-2.3.5.so - obj:/lib/ld-2.3.5.so - obj:/lib/ld-2.3.5.so -} -{ - unknown1 - Memcheck:Cond - obj:/lib/ld-2.3.5.so - obj:/lib/ld-2.3.5.so - obj:/lib/ld-2.3.5.so - obj:/lib/ld-2.3.5.so - obj:/lib/ld-2.3.5.so -} -{ - unknown2 - Memcheck:Cond - obj:/lib/ld-2.3.5.so - obj:/lib/tls/i686/cmov/libc-2.3.5.so - obj:/lib/ld-2.3.5.so - fun:_dl_open - obj:/lib/tls/i686/cmov/libdl-2.3.5.so -} -{ - unknown3 - Memcheck:Cond - obj:/lib/ld-2.3.5.so - obj:/lib/ld-2.3.5.so - obj:/lib/tls/i686/cmov/libc-2.3.5.so - obj:/lib/ld-2.3.5.so - fun:_dl_open -} -{ - libX11 - Memcheck:Param - write(buf) - obj:/lib/ld-2.3.5.so - fun:__write_nocancel - obj:/usr/lib/libX11.so.6.2.0 - fun:_X11TransWrite -} -{ - alsa1 - Memcheck:Addr1 - fun:strlen - fun:vfprintf - fun:vsprintf - fun:sprintf - fun:alsa_getdevs -} -{ - alsa2 - Memcheck:Addr1 - fun:_IO_default_xsputn - fun:vfprintf - fun:vsprintf - fun:sprintf - fun:alsa_getdevs -} -{ - alsa3 - Memcheck:Addr2 - fun:mempcpy - fun:vfprintf - fun:vsprintf - fun:sprintf - fun:alsa_getdevs -} -{ - alsa4 - Memcheck:Param - ioctl(arg) - obj:/lib/ld-2.3.6.so - fun:snd_pcm_prepare - fun:snd_pcm_hw_params - fun:alsaio_setup - fun:alsa_open_audio - obj:* -} -{ - alsa5 - Memcheck:Param - ioctl(generic) - obj:/lib/ld-2.3.6.so - fun:snd_pcm_link - fun:alsa_open_audio - obj:* -} -{ - alsa6 - Memcheck:Param - ioctl(arg) - obj:/lib/ld-2.3.6.so - fun:snd_pcm_prepare - fun:alsa_send_dacs -} -{ - alsa7 - Memcheck:Addr4 - fun:mempcpy - fun:vfprintf - fun:vsprintf - fun:sprintf - fun:alsa_getdevs -} -{ - alsa8 - Memcheck:Param - ioctl(arg) - obj:/lib/ld-2.3.6.so - fun:snd_pcm_prepare - fun:alsa_open_audio - obj:* -} -{ - alsa9 - Memcheck:Leak - fun:malloc - fun:snd_dlobj_cache_add - obj:/usr/lib/libasound.so.2.0.0 - fun:alsa_getdevs -} -{ - alsa10 - Memcheck:Leak - fun:calloc - fun:snd_ctl_new - fun:snd_ctl_hw_open - fun:_snd_ctl_hw_open - obj:/usr/lib/libasound.so.2.0.0 - fun:alsa_getdevs -} -{ - alsa11 - Memcheck:Leak - fun:calloc - obj:/usr/lib/libasound.so.2.0.0 - obj:/usr/lib/libasound.so.2.0.0 - obj:/usr/lib/libasound.so.2.0.0 - obj:/usr/lib/libasound.so.2.0.0 - obj:/usr/lib/libasound.so.2.0.0 - obj:/usr/lib/libasound.so.2.0.0 - obj:/usr/lib/libasound.so.2.0.0 - fun:snd_config_update_r - fun:snd_config_update - fun:snd_ctl_open - fun:alsa_getdevs -} -{ - dlopen1 - Memcheck:Cond - obj:/lib/ld-2.3.6.so - obj:/lib/tls/i686/cmov/libc-2.3.6.so - obj:/lib/ld-2.3.6.so - fun:_dl_open -} -{ - dlopen2 - Memcheck:Cond - obj:/lib/ld-2.3.6.so - obj:/lib/ld-2.3.6.so - obj:/lib/ld-2.3.6.so - obj:/lib/tls/i686/cmov/libc-2.3.6.so - obj:/lib/ld-2.3.6.so - fun:_dl_open -} -{ - fclass1 - Memcheck:Leak - fun:* - fun:* - fun:_Z14fclass_installP6FClassS0_j -} -{ - fclass2 - Memcheck:Leak - fun:malloc - fun:strdup - fun:_Z12suffixes_arePKcS0_ - fun:_Z17FormatX11_startupP6FClass - fun:_Z14fclass_installP6FClassS0_j - fun:_Z11startup_x11v -} -{ - cv1 - Memcheck:Leak - fun:malloc - obj:/lib/ld-2.3.6.so - fun:_dl_open - obj:/lib/tls/i686/cmov/libdl-2.3.6.so - obj:/lib/ld-2.3.6.so - obj:/lib/tls/i686/cmov/libdl-2.3.6.so - fun:dlopen - fun:cvUseOptimized - fun:cvRegisterModule - fun:_ZN8CvModuleC1EP12CvModuleInfo - obj:/home/matju/lib/libcxcore.so.2.0.0 - obj:/lib/ld-2.3.6.so -} |